I'm looking for a way to call a code block upon exiting a popup. I would like to refresh items on the screen based on the item chosen in a popup. The only way I can see to do this is to refresh with a codeblock called by Valid, but this requires exiting the Get. Perhaps a new "POPEXIT" ?
If there is a way to do this now, I would appreciate being pointed in the right direction.
Thanks in advance.
GeneB
Call a codeblock when exiting a Popup ?
Re: Call a codeblock when exiting a Popup ?
You can do what you want inside the current code block.
Just make sure that the last value returned by the code block is the value you want put into the get.
Just make sure that the last value returned by the code block is the value you want put into the get.
Code: Select all
@ .. DCGET cVar POPUP {|c|PickVar(c),RefreshItems(c,GetList),c}
FUNCTION PickVar( c )
.. pick something
RETURN c
FUNCTION RefreshItems( c, GetList )
IF c == 'TEST'
DC_GetRefresh(GetList,'TEST')
ENDIF
RETURN nil
The eXpress train is coming - and it has more cars.
Re: Call a codeblock when exiting a Popup ?
Works perfectly. Thanks for the tip.
Roger, you just turned a light bulb on in my head. I'm converting a huge program I wrote from Clipper to Express. I'm making headway, and it's a chore, but this one seemingly insignificant tip just made me see the power in manipulating Express's own code blocks. I'm finally starting to think in Express and not in Clipper.
Thanks again, GeneB
Roger, you just turned a light bulb on in my head. I'm converting a huge program I wrote from Clipper to Express. I'm making headway, and it's a chore, but this one seemingly insignificant tip just made me see the power in manipulating Express's own code blocks. I'm finally starting to think in Express and not in Clipper.
Thanks again, GeneB
Re: Call a codeblock when exiting a Popup ?
Excellent way to start the New Year. 

The eXpress train is coming - and it has more cars.