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.

How to call this function...

4 posts in Objects Last posting was on 2009-10-08 02:27:01.0Z
neil Posted on 2009-10-06 07:17:10.0Z
Sender: 734d.4acaeb65.1804289383@sybase.com
From: Neil
Newsgroups: sybase.public.powerbuilder.objects
Subject: How to call this function...
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4acaeef6.73f0.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 6 Oct 2009 00:17:10 -0700
X-Trace: forums-1-dub 1254813430 10.22.241.41 (6 Oct 2009 00:17:10 -0700)
X-Original-Trace: 6 Oct 2009 00:17:10 -0700, 10.22.241.41
Lines: 16
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9927
Article PK: 737055

As an alternative to my previous post. This is want I would
like to do:

I have a custom visual userobject with datawindows in it.
The userobject then is embedded into a tabpage in a tab
control. The userobject has functions in it. Certain
datawindows in that userobject have code from rbuttondown
event that pops-up a menu. In a menu, it will call a
function from the userobject.

Now, how can I do it? the script in the menu
(parentwindow.trigger function dynamic wf_po1()) will search
the window function, not the userobject function. that
causes runtime error.

Any ideas would be much appreciated. Thanks.


Jeremy Lakeman Posted on 2009-10-08 01:01:44.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: How to call this function...
Date: Wed, 7 Oct 2009 18:01:44 -0700 (PDT)
Organization: http://groups.google.com
Lines: 32
Message-ID: <8761f948-295f-4ccb-9b0c-b3b4173c23ce@a37g2000prf.googlegroups.com>
References: <4acaeef6.73f0.1681692777@sybase.com>
NNTP-Posting-Host: 219.90.186.150
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1254963704 17605 127.0.0.1 (8 Oct 2009 01:01:44 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 8 Oct 2009 01:01:44 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: a37g2000prf.googlegroups.com; posting-host=219.90.186.150; posting-account=euaBtgoAAAC_vDxfsxmpMKlBxHaHpmRS
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; 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!a37g2000prf.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9932
Article PK: 737058


On Oct 6, 5:17 pm, Neil wrote:
> As an alternative to my previous post. This is want I would
> like to do:
>
> I have a custom visual userobject with datawindows in it.
> The userobject then is embedded into a tabpage in a tab
> control. The userobject has functions in it. Certain
> datawindows in that userobject have code from rbuttondown
> event that pops-up a menu. In a menu, it will call a
> function from the userobject.
>
> Now, how can I do it? the script in the menu
> (parentwindow.trigger function dynamic wf_po1()) will search
> the window function, not the userobject function. that
> causes runtime error.
>
> Any ideas would be much appreciated. Thanks.

Add an instance variable to the menu class, say;
powerobject ip_caller

then in the clicked event of each item;
ip_caller.triggerevent('ue_<menu name>')

then in the dw control rbuttondown event;
m_popup lm_popup
lm_popup.ip_caller=this
lm_popup.popmenu(...)

and finally;
dw_1.event ue_<menu name>;
//do stuff when the menu item is chosen...


neil Posted on 2009-10-08 02:27:01.0Z
Sender: 734d.4acaeb65.1804289383@sybase.com
From: Neil
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: How to call this function...
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4acd4df5.5ff5.1681692777@sybase.com>
References: <8761f948-295f-4ccb-9b0c-b3b4173c23ce@a37g2000prf.googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 7 Oct 2009 19:27:01 -0700
X-Trace: forums-1-dub 1254968821 10.22.241.41 (7 Oct 2009 19:27:01 -0700)
X-Original-Trace: 7 Oct 2009 19:27:01 -0700, 10.22.241.41
Lines: 34
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9933
Article PK: 737062

Great help sir. thank you so much.

> On Oct 6, 5:17 pm, Neil wrote:
> > As an alternative to my previous post. This is want I
> > would like to do:
> >
> > I have a custom visual userobject with datawindows in
> > it. The userobject then is embedded into a tabpage in a
> > tab control. The userobject has functions in it. Certain
> > datawindows in that userobject have code from
> > rbuttondown event that pops-up a menu. In a menu, it
> > will call a function from the userobject.
> >
> > Now, how can I do it? the script in the menu
> > (parentwindow.trigger function dynamic wf_po1()) will
> > search the window function, not the userobject function.
> > that causes runtime error.
> >
> > Any ideas would be much appreciated. Thanks.
>
> Add an instance variable to the menu class, say;
> powerobject ip_caller
>
> then in the clicked event of each item;
> ip_caller.triggerevent('ue_<menu name>')
>
> then in the dw control rbuttondown event;
> m_popup lm_popup
> lm_popup.ip_caller=this
> lm_popup.popmenu(...)
>
> and finally;
> dw_1.event ue_<menu name>;
> //do stuff when the menu item is chosen...


Scott Morris Posted on 2009-10-06 12:39:49.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <4acaeef6.73f0.1681692777@sybase.com>
Subject: Re: How to call this function...
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4acb3a95$1@forums-1-dub>
Date: 6 Oct 2009 05:39:49 -0700
X-Trace: forums-1-dub 1254832789 10.22.241.152 (6 Oct 2009 05:39:49 -0700)
X-Original-Trace: 6 Oct 2009 05:39:49 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9929
Article PK: 737059


<Neil> wrote in message news:4acaeef6.73f0.1681692777@sybase.com...
> As an alternative to my previous post. This is want I would
> like to do:
>
> I have a custom visual userobject with datawindows in it.
> The userobject then is embedded into a tabpage in a tab
> control. The userobject has functions in it. Certain
> datawindows in that userobject have code from rbuttondown
> event that pops-up a menu. In a menu, it will call a
> function from the userobject.
>
> Now, how can I do it? the script in the menu
> (parentwindow.trigger function dynamic wf_po1()) will search
> the window function, not the userobject function. that
> causes runtime error.

So the datawindow pops the menu, but doesn't "tell" the menu who to "talk"
to. That's a hint. You can look at the pfc code to see how it does the
same thing.