O7 -> O$: hiding buttons when no current record
Wendy
wizardcompserv at gmail.com
Mon Sep 11 04:50:27 EDT 2017
I do not know if this helps - but I have got round this by adding a method
when the screen is opened to test for a record and makes the buttons visible
or invisible as required
There is probably another way to do it but this works !
Kind regards
Wendy Osbaldestin
Wizard Computer Services
Tel: 01260271647
Mobile: 07740541021
-----Original Message-----
From: omnisdev-en [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf
Of Paul Mulroney
Sent: 11 September 2017 03:51
To: Omnis-dev list
Subject: 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 at 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 http://lists.omnis-dev.com
More information about the omnisdev-en
mailing list