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.

Inheritance of Functions in User-Objects

8 posts in Objects Last posting was on 2003-03-11 21:00:18.0Z
Christoph_Haertel Posted on 2003-03-10 18:09:08.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: Christoph_Haertel
Date: Mon, 10 Mar 2003 13:09:08 -0500
Subject: Inheritance of Functions in User-Objects
Lines: 19
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_EFCE2A09246309180063B69285256CE5.0063B6BB85256CE5@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.objects:7236
Article PK: 734526

Hi,

does anyone know, how I can declare functions in an inherited user-object
with the same name and the same arguments, but with some changed code, as
the function and arguments in the parent object?

Everytime I'll try this, PowerBuilder says "this function exists already in
the parent", and I can't save my object.

I'm very confused about this "feature", because you can override any
event-scripts in windows etc.

I'm working with PB 7.0.3.

Thank you for support,

Christoph

email: christoph.haertel@rauser-ag.com


Scott Morris Posted on 2003-03-10 18:52:32.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Scott Morris" <bogus@microsoft.com>
Subject: Re: Inheritance of Functions in User-Objects
Date: Mon, 10 Mar 2003 13:52:32 -0500
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: ip19-gadivinv-a8.atl1.exsbs.net 65.205.162.19
Message-ID: <364_ZyPgvjz5CHA.182@forums.sybase.com>
References: <364_EFCE2A09246309180063B69285256CE5.0063B6BB85256CE5@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7239
Article PK: 734528

Don't create a new function. Just select the function you want to
override/extend from the dropdown and start typing in the script pane. Note
that the editor does not automatically assume you are extending the
functionality - there is no ancestorreturnvalue automatically
declared/populated.

<Christoph_Haertel> wrote in message
news:EFCE2A09246309180063B69285256CE5.0063B6BB85256CE5@webforums...
> Hi,
>
> does anyone know, how I can declare functions in an inherited user-object
> with the same name and the same arguments, but with some changed code, as
> the function and arguments in the parent object?
>
> Everytime I'll try this, PowerBuilder says "this function exists already
in
> the parent", and I can't save my object.
>
> I'm very confused about this "feature", because you can override any
> event-scripts in windows etc.
>
> I'm working with PB 7.0.3.
>
> Thank you for support,
>
> Christoph
>
> email: christoph.haertel@rauser-ag.com


heyo Posted on 2003-03-11 20:35:00.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: heyo
Date: Tue, 11 Mar 2003 15:35:00 -0500
Subject: Re: Inheritance of Functions in User-Objects
Lines: 10
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_2977D227733974D80071113585256CE6.006E089F85256CE5@webforums>
References: <364_EFCE2A09246309180063B69285256CE5.0063B6BB85256CE5@webforums> <364_ZyPgvjz5CHA.182@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.objects:7244
Article PK: 734536

You cannot even check the "extend ancestor script"-flag,
but you can call the ancestor method by hand. e.g.

// some things to be done before

return = super::functionname(parameter)

// some thing to be done afterwards

Note that you can't use "call" in functions.


Doug Lewis Posted on 2003-03-10 18:16:44.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Doug Lewis" <lewisd@get-integrated.com>
Subject: Re: Inheritance of Functions in User-Objects
Date: Mon, 10 Mar 2003 10:16:44 -0800
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: mail.get-integrated.com 206.111.240.34
Message-ID: <364_XnlxkPz5CHA.231@forums.sybase.com>
References: <364_EFCE2A09246309180063B69285256CE5.0063B6BB85256CE5@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7237
Article PK: 734530

to override built in PB events, I usually find it necessary to export the
script and add them there, then re-import.

<Christoph_Haertel> wrote in message
news:EFCE2A09246309180063B69285256CE5.0063B6BB85256CE5@webforums...
> Hi,
>
> does anyone know, how I can declare functions in an inherited user-object
> with the same name and the same arguments, but with some changed code, as
> the function and arguments in the parent object?
>
> Everytime I'll try this, PowerBuilder says "this function exists already
in
> the parent", and I can't save my object.
>
> I'm very confused about this "feature", because you can override any
> event-scripts in windows etc.
>
> I'm working with PB 7.0.3.
>
> Thank you for support,
>
> Christoph
>
> email: christoph.haertel@rauser-ag.com


Arnd Schmidt Posted on 2003-03-11 21:00:18.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: Arnd Schmidt <arnd.schmidt@gmx.de>
Subject: Re: Inheritance of Functions in User-Objects
Date: Tue, 11 Mar 2003 22:00:18 +0100
X-Newsreader: Forte Agent 1.8/32.548
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 27
NNTP-Posting-Host: pD9017FF1.dip0.t-ipconnect.de 217.1.127.241
Message-ID: <364_r8js6vkr5hpuqf53vul63vf745bubu3pvm@4ax.com>
References: <364_EFCE2A09246309180063B69285256CE5.0063B6BB85256CE5@webforums> <364_XnlxkPz5CHA.231@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7242
Article PK: 734532

i always select the Event from the "Event Id " list box.

Did i missed something?!

Greetings

Arnd Schmidt

On Mon, 10 Mar 2003 10:16:44 -0800, "Doug Lewis" <lewisd@get-integrated.com>

wrote:

>to override built in PB events, I usually find it necessary to export the
>script and add them there, then re-import.
>
>
><Christoph_Haertel> wrote in message
>news:EFCE2A09246309180063B69285256CE5.0063B6BB85256CE5@webforums...
>> Hi,
>>
>> does anyone know, how I can declare functions in an inherited user-object
>> with the same name and the same arguments, but with some changed code, as
>> the function and arguments in the parent object?
>>
>> Everytime I'll try this, PowerBuilder says "this function exists already
>in
>> the parent", and I can't save my object.
>>
>> I'm very confused about this "feature", because you can override any
>> event-scripts in windows etc.
>>
>> I'm working with PB 7.0.3.
>>
>> Thank you for support,
>>
>> Christoph
>>
>> email: christoph.haertel@rauser-ag.com
>


Arnd Schmidt Posted on 2003-03-11 20:53:39.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: Arnd Schmidt <arnd.schmidt@gmx.de>
Subject: Re: Inheritance of Functions in User-Objects
Date: Tue, 11 Mar 2003 21:53:39 +0100
X-Newsreader: Forte Agent 1.8/32.548
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 21
NNTP-Posting-Host: pD9017FF1.dip0.t-ipconnect.de 217.1.127.241
Message-ID: <364_nois6vkreoamgse2nci8qf6avhhitmqbnh@4ax.com>
References: <364_EFCE2A09246309180063B69285256CE5.0063B6BB85256CE5@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7243
Article PK: 734531

You don't have to declare a _new_ function!!!

Select the function that you want to override from the "Function List"
and type your code into the Script Editor.

That's all.

On Mon, 10 Mar 2003 13:09:08 -0500, Christoph_Haertel wrote:

>Hi,
>
>does anyone know, how I can declare functions in an inherited user-object
>with the same name and the same arguments, but with some changed code, as
>the function and arguments in the parent object?
>
>Everytime I'll try this, PowerBuilder says "this function exists already in
>the parent", and I can't save my object.
>
>I'm very confused about this "feature", because you can override any
>event-scripts in windows etc.
>
>I'm working with PB 7.0.3.
>
>Thank you for support,
>
>Christoph
>
>email: christoph.haertel@rauser-ag.com


Mathieu Gendron Posted on 2003-03-10 18:44:50.0Z
Newsgroups: sybase.public.powerbuilder.objects
Reply-To: "Mathieu Gendron" <i_dont_wanna_be_spammed_mgendron@siq.gouv.qc.ca>
From: "Mathieu Gendron" <i_dont_wanna_be_spammed_mgendron@siq.gouv.qc.ca>
Subject: Re: Inheritance of Functions in User-Objects
Date: Mon, 10 Mar 2003 13:44:50 -0500
Lines: 33
Organization: SIQ
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: ext72001.gouv.qc.ca 142.213.72.1
Message-ID: <364_I1xQ5fz5CHA.325@forums.sybase.com>
References: <364_EFCE2A09246309180063B69285256CE5.0063B6BB85256CE5@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7240
Article PK: 734533

It works fine with PB6 and 8, I don't see why it shouldn't work with 7. You
open the object, select the function, then you add your script... it
overrides the ancestor function automatically....

--
Mathieu Gendron, ia
http://www.siq.gouv.qc.ca/


<Christoph_Haertel> a écrit dans le message news:
EFCE2A09246309180063B69285256CE5.0063B6BB85256CE5@webforums...

> Hi,
>
> does anyone know, how I can declare functions in an inherited user-object
> with the same name and the same arguments, but with some changed code, as
> the function and arguments in the parent object?
>
> Everytime I'll try this, PowerBuilder says "this function exists already
in
> the parent", and I can't save my object.
>
> I'm very confused about this "feature", because you can override any
> event-scripts in windows etc.
>
> I'm working with PB 7.0.3.
>
> Thank you for support,
>
> Christoph
>
> email: christoph.haertel@rauser-ag.com


Doug Lewis Posted on 2003-03-10 18:54:29.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Doug Lewis" <lewisd@get-integrated.com>
Subject: Re: Inheritance of Functions in User-Objects
Date: Mon, 10 Mar 2003 10:54:29 -0800
Lines: 44
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: get-integrated.com 206.111.240.34
Message-ID: <364_K9Pdqkz5CHA.231@forums.sybase.com>
References: <364_EFCE2A09246309180063B69285256CE5.0063B6BB85256CE5@webforums> <364_I1xQ5fz5CHA.325@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7238
Article PK: 734527

Is the object in questions top level ancestor a "system object" or a "user
object"?

"Mathieu Gendron" <i_dont_wanna_be_spammed_mgendron@siq.gouv.qc.ca> wrote in
message news:I1xQ5fz5CHA.325@forums.sybase.com...
> It works fine with PB6 and 8, I don't see why it shouldn't work with 7.
You
> open the object, select the function, then you add your script... it
> overrides the ancestor function automatically....
>
> --
> Mathieu Gendron, ia
> http://www.siq.gouv.qc.ca/
>
>
> <Christoph_Haertel> a écrit dans le message news:
> EFCE2A09246309180063B69285256CE5.0063B6BB85256CE5@webforums...
> > Hi,
> >
> > does anyone know, how I can declare functions in an inherited
user-object
> > with the same name and the same arguments, but with some changed code,
as
> > the function and arguments in the parent object?
> >
> > Everytime I'll try this, PowerBuilder says "this function exists already
> in
> > the parent", and I can't save my object.
> >
> > I'm very confused about this "feature", because you can override any
> > event-scripts in windows etc.
> >
> > I'm working with PB 7.0.3.
> >
> > Thank you for support,
> >
> > Christoph
> >
> > email: christoph.haertel@rauser-ag.com
>
>