BTNBMP Question
Posted: Wed Oct 29, 2014 8:32 pm
I realize there are two threads going on the buttons, but this didn't necessarily fit in either so I'm trying a new one.
I moving a lot of existing FUNCTION code into classes, as METHODs to be far more efficient. In doing so, I'm seeing a consistent behavior. Please consider the following two sections of a METHOD. The ::invnum is a field in a database object which is opened within the class.
REDEFINE BTNBMP RESOURCE "HROK" ID 2101 OF oDpw3 TOOLTIP "Use part" PROMPT "Use";
ACTION ( retval := ::invnum, oDpw3:end() ) NOBORDER TRANSPARENT
REDEFINE XBROWSE oLpa ID 2100 OF oDpw3 ON DBLCLICK( retval := ::invnum, oDpw3:end() )
This is a lookup list. Note the ACTION and DBLCLICK code is identical. If I click on the Bitmap, the program stops working ( no clear error message ). If I double click on an item, it successfully returns the value to the calling program. Both of these sections are in the exact same method.
This is built with FWH 13.08, Harbour, and Microsoft Visual Studio 2013. If I have the same calls in a FUNCTION by the same name, it works. In a CLASS METHOD, however, the error occurs.
I'd love some thoughts on this.
Tim
I moving a lot of existing FUNCTION code into classes, as METHODs to be far more efficient. In doing so, I'm seeing a consistent behavior. Please consider the following two sections of a METHOD. The ::invnum is a field in a database object which is opened within the class.
REDEFINE BTNBMP RESOURCE "HROK" ID 2101 OF oDpw3 TOOLTIP "Use part" PROMPT "Use";
ACTION ( retval := ::invnum, oDpw3:end() ) NOBORDER TRANSPARENT
REDEFINE XBROWSE oLpa ID 2100 OF oDpw3 ON DBLCLICK( retval := ::invnum, oDpw3:end() )
This is a lookup list. Note the ACTION and DBLCLICK code is identical. If I click on the Bitmap, the program stops working ( no clear error message ). If I double click on an item, it successfully returns the value to the calling program. Both of these sections are in the exact same method.
This is built with FWH 13.08, Harbour, and Microsoft Visual Studio 2013. If I have the same calls in a FUNCTION by the same name, it works. In a CLASS METHOD, however, the error occurs.
I'd love some thoughts on this.
Tim