XBROWSE WITH KEY PRESSED CONTROL+C - BUG

XBROWSE WITH KEY PRESSED CONTROL+C - BUG

Postby gss200610 » Fri Jun 10, 2011 12:05 am

if someone already noticed this and can give me a hint.

xbrowse to receive the focus and you press control + c it to the executable to run it with xHarbour even compiling the pulp samples.

now realized something compiling with buildh not to harbor the bug would be something that makes the xHarbour control + c to overthrow the app?
Would anyone be able to give me a hint thank use Fivewin 05.11 + xHarbour 1.21-9381 and bcc 582.

IT IS VERY STRANGE BECAUSE COMPILING WITH HARBOUR WORKS NORMAL, NOW WITH THE BUG xHarbour AND THE EXECUTABLE.
gss200610
 
Posts: 36
Joined: Sat Jun 19, 2010 10:09 am
Location: Goiania - Goias - Brasil

Re: XBROWSE WITH KEY PRESSED CONTROL+C - BUG

Postby gss200610 » Fri Jun 10, 2011 12:26 am

unable to reach a conclusion, if built with xHarbour svn bug in the control + c, ie the rev. 6741, 6714 works well.
gss200610
 
Posts: 36
Joined: Sat Jun 19, 2010 10:09 am
Location: Goiania - Goias - Brasil

Re: XBROWSE WITH KEY PRESSED CONTROL+C - BUG

Postby nageswaragunupudi » Fri Jun 10, 2011 4:32 am

When Ctrl-C is pressed, XBrowse tries to load Excel, if not done earlier. This is done through a function ExcelObj() in the module \fwh\source\function\olefuncs.prg.

The code to load Excel or other office applciation in olefuncs.prg is this:
Code: Select all  Expand view
  TRY
      oObj  := GetActiveObject( cApp )
   CATCH
      TRY
         oObj  := CreateObject( cApp )
      CATCH
      END
   END
 

It has been reported by all users of xHarbour commerical and users of some versions of free xHarbour that their programs were hanging while executing "GetActiveObject( cApp )".

It was recommended to them to replace the above code with :
Code: Select all  Expand view
  TRY
      oObj  := TOleAuto():New( cApp )
   CATCH
   END
 

This solution appeared to have solved their problems.

In some other cases of xHarbour users of some versions, when the excel object is loaded ( in either version of the above code ) the excel application was exiting with a Windows error code. I experienced this personally too.

Logically it is difficult to say why TOleAuto():New( cApp ) should give rise to such an error and that too only with some versions of xHarbour.

However changing all declarations of variables inside ExcelObj(), WordObj(), etc as "static" instead of "local" resolved the issue, though I can not explain this logically.

You may try tweaking with olefuncs.prg and help us with your feedback.

Latest build of 11.05 released on 6th June resolved this problem atleast in my case.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 79 guests