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.

Get Child Objects Name at Run Time

5 posts in Objects Last posting was on 2008-09-19 14:34:18.0Z
Chau Posted on 2008-09-18 01:26:26.0Z
From: "Chau" <chau@dsa.com.au>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Get Child Objects Name at Run Time
Lines: 11
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48d1ae42$1@forums-1-dub>
Date: 17 Sep 2008 18:26:26 -0700
X-Trace: forums-1-dub 1221701186 10.22.241.152 (17 Sep 2008 18:26:26 -0700)
X-Original-Trace: 17 Sep 2008 18:26:26 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9773
Article PK: 736907

Does any one knows how to get the Child Objects name, i.e if i have created
a non visual object A and have 3 inherit childrens named B, C, D is there
any system functions to call from object A and get all the descendant
objects name which return B,C,D.

I know the Show Hierarchy in Browser Object did show objects at design time,
but what's i really want is get these childs name at run time.

Thanks


Jeremy Lakeman Posted on 2008-09-19 00:35:26.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Get Child Objects Name at Run Time
Date: Thu, 18 Sep 2008 17:35:26 -0700 (PDT)
Organization: http://groups.google.com
Lines: 25
Message-ID: <c658a88f-39a9-4b7b-9596-d17bf42c3ffe@2g2000hsn.googlegroups.com>
References: <48d1ae42$1@forums-1-dub>
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 1221784526 16070 127.0.0.1 (19 Sep 2008 00:35:26 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 19 Sep 2008 00:35:26 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 2g2000hsn.googlegroups.com; posting-host=203.122.242.105; posting-account=euaBtgoAAAC_vDxfsxmpMKlBxHaHpmRS
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1,gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 fly.essential.com.au:3128 (squid/2.5.STABLE8), 1.0 asp.essential.intranet:3128 (squid/2.5.STABLE8)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!nntp1.roc.gblx.net!nntp.gblx.net!nntp.gblx.net!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!postnews.google.com!2g2000hsn.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9774
Article PK: 736905


On Sep 18, 10:26 am, "Chau" <c...@dsa.com.au> wrote:
> Does any one knows how to get the Child Objects name, i.e if i have created
> a non visual object A and have 3 inherit childrens named B, C, D is there
> any system functions to call from object A and get all the descendant
> objects name which return B,C,D.
>
> I know the Show Hierarchy in Browser Object did show objects at design time,
> but what's i really want is get these childs name at run time.
>
> Thanks

You can scan your entire library list looking for them.
Read the help for the following functions / properties;

classdefinition lc
ls_libs = GetLibraryList(...)
ls_objects = LibraryDirectory(...)
lc = FindClassDefinition(...)
lc.ancestor.name

It's not going to be very fast though. You might want to do this scan
once on startup, or even cache the results somewhere when you build
your application.


Chau Posted on 2008-09-19 02:24:44.0Z
From: "Chau" <chau@dsa.com.au>
Newsgroups: sybase.public.powerbuilder.objects
References: <48d1ae42$1@forums-1-dub> <c658a88f-39a9-4b7b-9596-d17bf42c3ffe@2g2000hsn.googlegroups.com>
Subject: Re: Get Child Objects Name at Run Time
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48d30d6c@forums-1-dub>
Date: 18 Sep 2008 19:24:44 -0700
X-Trace: forums-1-dub 1221791084 10.22.241.152 (18 Sep 2008 19:24:44 -0700)
X-Original-Trace: 18 Sep 2008 19:24:44 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9775
Article PK: 736909

Thanks for your solution, i guess that the only way for resolved my problem
at the moment, and wait unitl the ClassDefinition object has a new
Decendant property.

"Jeremy Lakeman" <jeremy.lakeman@gmail.com> wrote in message
news:c658a88f-39a9-4b7b-9596-d17bf42c3ffe@2g2000hsn.googlegroups.com...

On Sep 18, 10:26 am, "Chau" <c...@dsa.com.au> wrote:
> Does any one knows how to get the Child Objects name, i.e if i have
> created
> a non visual object A and have 3 inherit childrens named B, C, D is there
> any system functions to call from object A and get all the descendant
> objects name which return B,C,D.
>
> I know the Show Hierarchy in Browser Object did show objects at design
> time,
> but what's i really want is get these childs name at run time.
>
> Thanks

You can scan your entire library list looking for them.
Read the help for the following functions / properties;

classdefinition lc
ls_libs = GetLibraryList(...)
ls_objects = LibraryDirectory(...)
lc = FindClassDefinition(...)
lc.ancestor.name

It's not going to be very fast though. You might want to do this scan
once on startup, or even cache the results somewhere when you build
your application.


Roland Smith [TeamSybase] Posted on 2008-09-19 13:37:16.0Z
From: "Roland Smith [TeamSybase]" <rsmith_at_trusthss_dot_com>
Newsgroups: sybase.public.powerbuilder.objects
References: <48d1ae42$1@forums-1-dub> <c658a88f-39a9-4b7b-9596-d17bf42c3ffe@2g2000hsn.googlegroups.com> <48d30d6c@forums-1-dub>
Subject: Re: Get Child Objects Name at Run Time
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48d3ab0c@forums-1-dub>
Date: 19 Sep 2008 06:37:16 -0700
X-Trace: forums-1-dub 1221831436 10.22.241.152 (19 Sep 2008 06:37:16 -0700)
X-Original-Trace: 19 Sep 2008 06:37:16 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9776
Article PK: 736906

It would be helpful if you told us why you want to do this. Is this a
business application or a developers tool? A completely different approach
might come to mind if we knew the purpose.

There is zero chance that Sybase is going to add a function that returns a
list of descendants at runtime. They are much too busy with other things.

The only way this can be done is to get a list of all the objects in all the
libraries of the app and check each objects ancestor hierarchy for the
object name you are interested in. Depending on the size of the application,
this could take several minutes to complete.

Since this information is fixed at compile time, the most efficient approach
would be to create a separate program to do this analysis and put the
results in the database. Then the program would have quick access at run
time.


M. Searer Posted on 2008-09-19 14:34:18.0Z
From: "M. Searer" <nospam@nospam.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <48d1ae42$1@forums-1-dub> <c658a88f-39a9-4b7b-9596-d17bf42c3ffe@2g2000hsn.googlegroups.com> <48d30d6c@forums-1-dub>
In-Reply-To: <48d30d6c@forums-1-dub>
Subject: Re: Get Child Objects Name at Run Time
Lines: 38
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48d3b86a$1@forums-1-dub>
Date: 19 Sep 2008 07:34:18 -0700
X-Trace: forums-1-dub 1221834858 10.22.241.152 (19 Sep 2008 07:34:18 -0700)
X-Original-Trace: 19 Sep 2008 07:34:18 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9777
Article PK: 736910

actually, they can't create a decendent list since that structure is built at compile time.
recall you can inherit from pbds and share objects between applications

"Chau" <chau@dsa.com.au> wrote in message news:48d30d6c@forums-1-dub...
> Thanks for your solution, i guess that the only way for resolved my problem
> at the moment, and wait unitl the ClassDefinition object has a new
> Decendant property.
>
> "Jeremy Lakeman" <jeremy.lakeman@gmail.com> wrote in message
> news:c658a88f-39a9-4b7b-9596-d17bf42c3ffe@2g2000hsn.googlegroups.com...
> On Sep 18, 10:26 am, "Chau" <c...@dsa.com.au> wrote:
>> Does any one knows how to get the Child Objects name, i.e if i have
>> created
>> a non visual object A and have 3 inherit childrens named B, C, D is there
>> any system functions to call from object A and get all the descendant
>> objects name which return B,C,D.
>>
>> I know the Show Hierarchy in Browser Object did show objects at design
>> time,
>> but what's i really want is get these childs name at run time.
>>
>> Thanks
>
> You can scan your entire library list looking for them.
> Read the help for the following functions / properties;
>
> classdefinition lc
> ls_libs = GetLibraryList(...)
> ls_objects = LibraryDirectory(...)
> lc = FindClassDefinition(...)
> lc.ancestor.name
>
> It's not going to be very fast though. You might want to do this scan
> once on startup, or even cache the results somewhere when you build
> your application.
>
>