Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Menu constructor Event ??

144 views
Skip to first unread message

Lilian Pigallio

unread,
Mar 17, 2006, 9:47:31 AM3/17/06
to
Hi all,

I need a "constructor" event in my menu to put some script in it.

In fact my application open a popup menu and I want to change dynamically
the popup menu without changing all the scripts where it is called.

My idea is to put my script in the menu itself. but where?

Lilian.


philipsalgannik

unread,
Mar 17, 2006, 1:55:09 PM3/17/06
to
If you are willing to create all your menus dynamically,
then there is a way of having a real constructor scripted.

Paul Horan[TeamSybase]

unread,
Mar 17, 2006, 7:55:43 PM3/17/06
to
<kludge>
We coded a hidden menu item, and coded the "constructor" code into its
Clicked event. Then the Open event in the ancestor class triggers
menu.m_setup( clicked! )
</kludge>

--
Paul Horan[TeamSybase]
Cynergy Systems
www.cynergysystems.com

"Lilian Pigallio" <lpig...@nospam.com> wrote in message
news:441abc26@forums-2-dub...

Lilian Pigallio

unread,
Mar 20, 2006, 6:43:11 AM3/20/06
to
My menus are not created dynamically but greyed dynamically (user access
rights)... what is your solution?

<Philip Salgannik> a écrit dans le message de
news:441af632.19b...@sybase.com...

philipsalgannik

unread,
Mar 20, 2006, 11:42:10 AM3/20/06
to
Well, if you create them dynamically, then you can create
them form one base item, in that case you can hack the
source of the menu, putting either a global function call
(or even a menu level function call if it's there) like this
one for e.g.:
forward
global type m_base_item from menu
end type
end forward

global type m_base_item from menu
end type
global m_base_item m_base_item

on m_base_item.create
m_base_item=this
call super::create
f_test("Menu Creation")
end on

on m_base_item.destroy
call super::destroy
end on

Lilian Pigallio

unread,
Mar 21, 2006, 11:20:23 AM3/21/06
to
Good tip :)

<Philip Salgannik> a écrit dans le message de

news:441ecb74.50e...@sybase.com...

0 new messages