- Code: Select all Expand view
lBuild := .F.
DEFINE BUTTON oBut[2] OF oBar PROMPT "Edit" RESOURCE "edit32" ;
ACTION ( (cAlias)->(RelBuilder(oBrw,oBrwAct,aInto,@lBuild)),;
oBrw:Refresh() ,;
oBrw:SetFocus(),;
oWnd:AevalWhen() )
...
DEFINE BUTTON oBut[4] OF oBar PROMPT "Set Relations" RESOURCE "buildall" GROUP ;
WHEN (lBuild);
......
oBrw:bkeyDown := { | nkey | IIF(nkey==13 , EVAL(oBut[2]:bAction) ,;
IIF(nkey==VK_DELETE .AND. EVAL(oBut[3]:bWhen) ,;
EVAL(oBut[3]:bAction) , ) )}
oBrw:bLDblClick := {||EVAL(oBut[2]:bAction) }
Relbuilder set lBuild to .T. when the save button is clicked
Using button edit works as expected after editing oBut[4] changes from disabled in enabled
BUT enter or doubleclicking in the browse let edit , but doesn't change obut[4] : it is still disabled !
Placing a tracelog in the when clausule from obut[4] : When (tracelog(lBuild) , lBuild) :
When the edit button is used , i can see that oWnd:AevalWhen() is executed , lBuild = .T.
Using enter or doubleclicking : AevalWhen seems not to be executed !!!!!!!
Frank