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.

looping through objects?

3 posts in Objects Last posting was on 2004-11-25 09:29:21.0Z
rkelty Posted on 2004-11-24 20:06:37.0Z
Sender: 5a65.41a4e789.1804289383@sybase.com
From: rkelty@umich.edu
Newsgroups: sybase.public.powerbuilder.objects
Subject: looping through objects?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <41a4e9c8.5a9d.1681692777@sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 24 Nov 2004 12:06:32 -0800, 10.22.241.42
Lines: 11
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 24 Nov 2004 12:06:33 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 24 Nov 2004 12:06:37 -0800
X-Trace: forums-1-dub 1101326797 10.22.108.75 (24 Nov 2004 12:06:37 -0800)
X-Original-Trace: 24 Nov 2004 12:06:37 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8112
Article PK: 735383

Does anyone know how to loop through all the objects in a
window?

I would like to be able to do something in the main window
open event and have it trickle down to all the controls in
the window. Specifically, I would like to register all the
controls in the window using the PFC resize.of_register
function.

Thanks,
Bob


"Chris Werner" <cw[please_no_spam] Posted on 2004-11-24 20:51:38.0Z
From: "Chris Werner" <cw[please_no_spam]@f-s.de>
Newsgroups: sybase.public.powerbuilder.objects
References: <41a4e9c8.5a9d.1681692777@sybase.com>
Subject: Re: looping through objects?
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 62.8.156.42
X-Original-NNTP-Posting-Host: 62.8.156.42
Message-ID: <41a4f45a@forums-1-dub>
Date: 24 Nov 2004 12:51:38 -0800
X-Trace: forums-1-dub 1101329498 62.8.156.42 (24 Nov 2004 12:51:38 -0800)
X-Original-Trace: 24 Nov 2004 12:51:38 -0800, 62.8.156.42
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8114
Article PK: 735381

Is the windows control[] array a solution for you?



<rkelty@umich.edu> schrieb im Newsbeitrag
news:41a4e9c8.5a9d.1681692777@sybase.com...

> Does anyone know how to loop through all the objects in a
> window?
>
> I would like to be able to do something in the main window
> open event and have it trickle down to all the controls in
> the window. Specifically, I would like to register all the
> controls in the window using the PFC resize.of_register
> function.
>
> Thanks,
> Bob


ALP Posted on 2004-11-25 09:29:21.0Z
From: "ALP" <alp_nospam@ciger.be>
Newsgroups: sybase.public.powerbuilder.objects
References: <41a4e9c8.5a9d.1681692777@sybase.com>
Subject: Re: looping through objects?
Lines: 58
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; Original
Organization: CIGER sa
Message-ID: <1101374956.816454@avoriaz.ciger.be>
Cache-Post-Path: avoriaz.ciger.be!unknown@pcalp.cigersoft.be
X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/)
NNTP-Posting-Host: avoriaz.ciger.be
X-Original-NNTP-Posting-Host: avoriaz.ciger.be
Date: 25 Nov 2004 01:29:21 -0800
X-Trace: forums-1-dub 1101374961 193.74.104.225 (25 Nov 2004 01:29:21 -0800)
X-Original-Trace: 25 Nov 2004 01:29:21 -0800, avoriaz.ciger.be
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8120
Article PK: 735389

I use the recursive window function

(none) wf_TriggerAll ( graphicobject ago, string as_eventname, long
al_wordparm, long al_longparm)

window lw
windowobject lwo[]
userobject luo
tab ltab
boolean hasControl
int i,ni

hasControl=FALSE
choose case ago.TypeOf()
case Window!
lw=ago
lwo=lw.Control
hasControl=TRUE
case UserObject!
luo=ago
lwo=luo.Control
hasControl=TRUE
case Tab!
ltab=ago
lwo=ltab.Control
hasControl=TRUE
case menu!,menucascade!,mdiclient!
return
end choose

ago.TriggerEvent(as_eventname,al_wordparm,al_longparm)
if hasControl then
ni=UpperBound(lwo)
for i=1 to ni
wf_triggerall(lwo[i],as_eventname,al_wordparm,al_longparm)
next
end if


By example, I call it in the open event :
wf_triggerall(this,"e_windowOpenning",0,0)


<rkelty@umich.edu> a écrit dans le message de news:
41a4e9c8.5a9d.1681692777@sybase.com...

> Does anyone know how to loop through all the objects in a
> window?
>
> I would like to be able to do something in the main window
> open event and have it trickle down to all the controls in
> the window. Specifically, I would like to register all the
> controls in the window using the PFC resize.of_register
> function.
>
> Thanks,
> Bob