O7 -> O$: hiding buttons when no current record
Hi $All,
I’m converting an Omnis 7 library to Omnis Studio, and I’ve come across a weird situation that I’m not sure how to fix.
In the O7 library, the properties of certain buttons were set so that the button wasn’t visible when a current record was loaded: “inactive when no record loaded”, and “do not gray”. When I converted it to O$, I noticed that the converter inserted some code into the $event on each button:
onEvDisabled
Do $cfield.$visible.$assign(kfalse) returns #F
onEvEnabled
Do $cfield.$visible.$assign(ktrue) returns #F
The problem is, the buttons are initially hidden, and when I load a record, they are not displayed.
(Status events are turned on for the fields in question)
I added some code to the $redraw for the window, but it seemed to be out of sync ie if I opened the window, the buttons were hidden. I clicked “Next” to load the next record, still no buttons. I clicked “Next” again and the buttons are displayed.
The window $event:
Begin Reversible Block
Set main file {DEBTORS}
End Reversible Block
Do $cwind.$objs.$sendall($ref.$enabled.$assign(kTrue))
Do default
I’m sure I’m missing something simple – it’s been a long time since I’ve done any O7 work!
Any input greatly appreciated!
Regards,
Paul.
A good example of quantum superposition is not only the classical 1930’s Schrodinger’s Cat experiments but on every BandAid has the phrase, “Sterile unless opened”.
—
Paul W. Mulroney We Don’t Do Simple Pty Ltd
pmulroney@logicaldevelopments.com.au Trading as Logical Developments
www.logicaldevelopments.com.au ACN 161 009 374
Ph: +61 8 9458 3889 86 Coolgardie Street
BENTLEY WA 6102
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com