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.

AncestorReturnValue two levels in.

5 posts in DataWindow Last posting was on 2009-11-11 17:27:24.0Z
dana.b.willey Posted on 2009-11-11 16:01:18.0Z
Sender: 3cac.4afabbbb.846930886@sybase.com
From: dana.b.willey@snet.net
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: AncestorReturnValue two levels in.
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4afadfce.4296.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 11 Nov 2009 08:01:18 -0800
X-Trace: forums-1-dub 1257955278 10.22.241.41 (11 Nov 2009 08:01:18 -0800)
X-Original-Trace: 11 Nov 2009 08:01:18 -0800, 10.22.241.41
Lines: 9
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90248
Article PK: 409853

On the ItemChanged event of our ancestor we are doing date
validation edits and if it fails I want to return a 1 so it
will not move off the field. I have the DataWindow
ItemChanged Event on the Window, the User object DataWindow
ItemChanged event with code in it, that is inherited from an
ancestor framework. I would like from the DataWindow
ItemChanged event by pass the user Object and look at the
framework return code. Is there a way to check the
AncestorReturnValue two levels below?


HarryLai Posted on 2009-11-11 16:12:22.0Z
From: "HarryLai" <nospam_harrylhy@bigfoot.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4afadfce.4296.1681692777@sybase.com>
In-Reply-To: <4afadfce.4296.1681692777@sybase.com>
Subject: Re: AncestorReturnValue two levels in.
Lines: 4
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8089.726
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8089.726
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4afae266$1@forums-1-dub>
Date: 11 Nov 2009 08:12:22 -0800
X-Trace: forums-1-dub 1257955942 10.22.241.152 (11 Nov 2009 08:12:22 -0800)
X-Original-Trace: 11 Nov 2009 08:12:22 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90249
Article PK: 409854

No, but you can declare the instance variables to remember the extra return values.


<dana.b.willey@snet.net> ¦b¶l¥ó±i¶K¤º®e¥D¦® 4afadfce.4296.1681692777@sybase.com ¤¤¼¶¼g...

> On the ItemChanged event of our ancestor we are doing date
> validation edits and if it fails I want to return a 1 so it
> will not move off the field. I have the DataWindow
> ItemChanged Event on the Window, the User object DataWindow
> ItemChanged event with code in it, that is inherited from an
> ancestor framework. I would like from the DataWindow
> ItemChanged event by pass the user Object and look at the
> framework return code. Is there a way to check the
> AncestorReturnValue two levels below?


Ivaylo Ivanov Posted on 2009-11-11 16:14:20.0Z
From: "Ivaylo Ivanov" <n0_S_p_a_m_i.ivanov@isy-dc.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4afadfce.4296.1681692777@sybase.com>
Subject: Re: AncestorReturnValue two levels in.
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4afae2dc$1@forums-1-dub>
Date: 11 Nov 2009 08:14:20 -0800
X-Trace: forums-1-dub 1257956060 10.22.241.152 (11 Nov 2009 08:14:20 -0800)
X-Original-Trace: 11 Nov 2009 08:14:20 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90250
Article PK: 409855

Override the event in the lowest level, manually call ItemChanged of the
two-levels-up ancestor and check the AncestorReturnValue:

long ll_retvalue
call fwUserObjectName::ItemChanged
ll_retvalue = AncestorReturnValue

Can this be of help to you?

Also, notice that this indirect ancestor call cannot be applied for webform
applications due to the .NET translation of the call which sometimes can be
wrong.

Regards,
Ivaylo

<dana.b.willey@snet.net> wrote in message
news:4afadfce.4296.1681692777@sybase.com...
> On the ItemChanged event of our ancestor we are doing date
> validation edits and if it fails I want to return a 1 so it
> will not move off the field. I have the DataWindow
> ItemChanged Event on the Window, the User object DataWindow
> ItemChanged event with code in it, that is inherited from an
> ancestor framework. I would like from the DataWindow
> ItemChanged event by pass the user Object and look at the
> framework return code. Is there a way to check the
> AncestorReturnValue two levels below?


dana.b.willey Posted on 2009-11-11 16:22:32.0Z
Sender: 3cac.4afabbbb.846930886@sybase.com
From: dana.b.willey@snet.net
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: AncestorReturnValue two levels in.
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4afae4c8.43b4.1681692777@sybase.com>
References: <4afae2dc$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 11 Nov 2009 08:22:32 -0800
X-Trace: forums-1-dub 1257956552 10.22.241.41 (11 Nov 2009 08:22:32 -0800)
X-Original-Trace: 11 Nov 2009 08:22:32 -0800, 10.22.241.41
Lines: 34
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90251
Article PK: 409856

Actually, this did not work. The AncestorReturnValue is 0.
Good suggestion and hint.
DBW

> Override the event in the lowest level, manually call
> ItemChanged of the two-levels-up ancestor and check the
> AncestorReturnValue:
>
> long ll_retvalue
> call fwUserObjectName::ItemChanged
> ll_retvalue = AncestorReturnValue
>
> Can this be of help to you?
>
> Also, notice that this indirect ancestor call cannot be
> applied for webform applications due to the .NET
> translation of the call which sometimes can be wrong.
>
> Regards,
> Ivaylo
>
> <dana.b.willey@snet.net> wrote in message
> news:4afadfce.4296.1681692777@sybase.com...
> > On the ItemChanged event of our ancestor we are doing
> > date validation edits and if it fails I want to return a
> > 1 so it will not move off the field. I have the
> > DataWindow ItemChanged Event on the Window, the User
> > object DataWindow ItemChanged event with code in it,
> > that is inherited from an ancestor framework. I would
> > like from the DataWindow ItemChanged event by pass the
> > user Object and look at the framework return code. Is
> > there a way to check the AncestorReturnValue two levels
> below?
>
>


"Paul Horan[Sybase]" <phoran_remove Posted on 2009-11-11 17:27:24.0Z
From: "Paul Horan[Sybase]" <phoran_remove@remove_sybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <4afadfce.4296.1681692777@sybase.com>
Subject: Re: AncestorReturnValue two levels in.
Lines: 34
Organization: Sybase
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4afaf3fc@forums-1-dub>
Date: 11 Nov 2009 09:27:24 -0800
X-Trace: forums-1-dub 1257960444 10.22.241.152 (11 Nov 2009 09:27:24 -0800)
X-Original-Trace: 11 Nov 2009 09:27:24 -0800, vip152.sybase.com
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:90254
Article PK: 409859

You don't bypass the intermediate ancestor by skipping over the natural call
sequence, you bypass it by using flow-of-control logic in that intermediate
ancestor!

In other words, don't override anything. Let the event processing flow
proceed normally from top ancestor to bottom.
In the UserObject script, add this code at the top:

If AncestorReturnValue <> 0 then
// ignore my entire event
Return AncestorReturnValue
End if

Now the framework will fire first - if it detects an error, the event in the
userobject will still fire, but simply pass along the ancestor's
returnvalue.

--
Paul Horan[Sybase]
http://blogs.sybase.com/phoran/

<dana.b.willey@snet.net> wrote in message
news:4afadfce.4296.1681692777@sybase.com...
> On the ItemChanged event of our ancestor we are doing date
> validation edits and if it fails I want to return a 1 so it
> will not move off the field. I have the DataWindow
> ItemChanged Event on the Window, the User object DataWindow
> ItemChanged event with code in it, that is inherited from an
> ancestor framework. I would like from the DataWindow
> ItemChanged event by pass the user Object and look at the
> framework return code. Is there a way to check the
> AncestorReturnValue two levels below?