Antonio
Here is my attempt to use your suggestion ..
- Code: Select all Expand view
Application
===========
Path and name: C:\Fox\VehSql-MH\Veh32.Exe (32 bits)
Size: 5,952,512 bytes
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20150518)
FiveWin Version: FWHX 15.04
Windows version: 6.2, Build 9200
Time from start: 0 hours 0 mins 7 secs
Error occurred at: 06/07/2016, 11:28:11
Error description: Error BASE/1005 Class: 'NIL' has no property: BWHEN
Args:
[ 1] = U
[ 2] = B {|| ... }
Stack Calls
===========
Called from: => _BWHEN( 0 )
Called from: VEHVIEW.PRG => _VEHVIEW( 737 )
Called from: VEHBROW.PRG => (b)_VBROW( 507 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 581 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 815 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1723 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 1549 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3355 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1057 )
Called from: MAIN.PRG => MAIN( 509 )
What I would like to do is use your codeblock and if bWhen is true .. enable otherwise disable at runtime.. Here is my code :
- Code: Select all Expand view
REDEFINE GET oPERMASSN VAR cPERMASSN ID 138 of oGRPS PICTURE "@!";
valid cPERMASSN $ "YN' '" UPDATE
REDEFINE GET oOPERATOR VAR xOPERATOR ID 121 of oGRPS PICTURE "@!" BITMAP "find" ;
when ( cPERMASSN = 'Y' .or. xOPERATOR <> " " );
Action( LightGreyGrad(), _Drvrget( xOperator, cMODE, oOperator, oRsVEH, "VEHICLES", "OPERATOR", "BUTTON", oFontB ),;
GreenBlueGrad(),oContact:SetFocus(),oContact:oJump := oContact )
oOperator:lAdjustBtn := .t.
oOperator:oBtn:bWhen := {| | if( ( cPERMASSN = 'Y' .or. xOPERATOR <> " " ), oOperator:oBtn:Enable(), oOperator:oBtn:Disable() ) }
Appreciate your help.
Thanks
Rick Lipkin