Subject Re: Form2PopupMenu
From Tom <IHaveNoEmail@ddress>
Date Fri, 25 Apr 2025 15:24:43 -0400
Newsgroups dbase.getting-started

On 4/25/25 12:32 PM, Tom wrote:
> Given:
>
> set procedure to A2Demo.pop ADDITIVE // local folder ...
> form.popupMenu = new A2DemoPopup(form,"A2POP") // menu belongs to form
> *
> What is the proper way to refer to refer to the popup menu item "List"
> of the popup menu from the form to which it is attached so that I may
> set it's enabled property to true or false? Tried lots of combinations,
> none of which were successful yet. Fingers are tired of typing so I will
> ask. :)
> *
> Tom
*
? type("form.popupMenu.LIST") // 'O'
? form.popupMenu.LIST.text // &List
? form.popupMenu.LIST.enabled // false
*
//form.popupMenu.LIST.enabled = {||true} // Data type mismatch.
Expecting:  Logical
*
// form.popupMenu.LIST.enabled = true // Still not enabled ???
*
bEnabled = true // private memvar ...
form.popupMenu.LIST.enabled = bEnabled  // Still not enabled ???
*
Really getting annoyed by this. These are additional attempts. All the ?
attempts work and return correct values. The {||true} attempt returns an
error. The 'true' attempt does not return an error but it does not
change the enabled. Neither does the memvar attempt. Seems the attempts
can see the menu.list object but not change it.

Tom