Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Disabling menu items in descendent script

2 posts in DataWindow Last posting was on 2009-09-25 01:09:42.0Z
Anthony Posted on 2009-09-24 14:29:43.0Z
Sender: 5ba0.4abb817c.1804289383@sybase.com
From: Anthony
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Disabling menu items in descendent script
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4abb8257.5bce.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 24 Sep 2009 07:29:43 -0700
X-Trace: forums-1-dub 1253802583 10.22.241.41 (24 Sep 2009 07:29:43 -0700)
X-Original-Trace: 24 Sep 2009 07:29:43 -0700, 10.22.241.41
Lines: 10
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:89998
Article PK: 419185

I have a popup menu whose menu items that I need to
enable/disable. This popup menu is created in an ancestor
script.

How do I go about disabling/enabling those popup menu items
in the descendent script? I understand that this might
happen in the rbuttonup event.

Please advise. Thank you. (PB 11.2 Build 8616, Win XP Pro
SP2)


Jeremy Lakeman Posted on 2009-09-25 01:09:42.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Disabling menu items in descendent script
Date: Thu, 24 Sep 2009 18:09:42 -0700 (PDT)
Organization: http://groups.google.com
Lines: 36
Message-ID: <964b7436-fedd-494e-8da3-084c6e88ea6f@33g2000vbe.googlegroups.com>
References: <4abb8257.5bce.1681692777@sybase.com>
NNTP-Posting-Host: 203.122.242.105
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1253840982 1798 127.0.0.1 (25 Sep 2009 01:09:42 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 25 Sep 2009 01:09:42 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 33g2000vbe.googlegroups.com; posting-host=203.122.242.105; posting-account=euaBtgoAAAC_vDxfsxmpMKlBxHaHpmRS
User-Agent: G2/1.0
X-HTTP-Via: 1.1 fly.essential.com.au:3128 (squid/2.5.STABLE8), 1.0 asp.essential.intranet:3128 (squid/2.5.STABLE8)
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!33g2000vbe.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90001
Article PK: 419199


On Sep 24, 11:29 pm, Anthony wrote:
> I have a popup menu whose menu items that I need to
> enable/disable. This popup menu is created in an ancestor
> script.
>
> How do I go about disabling/enabling those popup menu items
> in the descendent script?   I understand that this might
> happen in the rbuttonup event.
>
> Please advise. Thank you.  (PB 11.2 Build 8616, Win XP Pro
> SP2)

If you want to hook into the middle of an existing process, the
easiest way to do it is to change the existing process so it triggers
an event / function on itself that can be overridden in a descendant
class without needing to override the entire process.

eg;
ancestor;

event rbuttonup;
m_popup lm_popup

lm_popup=create m_popup
this.event ue_before_popup(lm_popup)
lm_popup.popmenu()
end event

event ue_before_popup(m_popup am_popup);
// no-op
end event

descendant;
event ue_before_popup(m_popup am_popup);
am_popup.m_item.enabled=false
end event