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 refer a visual object dinamically

3 posts in Objects Last posting was on 2003-01-12 21:28:26.0Z
Massimo Pucci Posted on 2003-01-03 17:07:38.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Massimo Pucci" <m.pucci@sisteda.it>
Subject: how to refer a visual object dinamically
Date: Fri, 3 Jan 2003 18:07:38 +0100
Lines: 8
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
NNTP-Posting-Host: 213.82.190.196
Message-ID: <364_Q4wre00sCHA.198@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:653
Article PK: 713224

my problem is quite simple : i want to refer to a group of visual object of
the same type (known at compile time, ex: radiobutton : rb_1, rb_2,
...rb_10) in a window function inside a while loop.
Can anyone help me ?
Thanks
Massimo


Roy Kiesler [TeamSybase] Posted on 2003-01-03 17:12:06.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
Subject: Re: how to refer a visual object dinamically
Date: Fri, 3 Jan 2003 12:12:06 -0500
Lines: 22
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: host131.percussion.com 208.252.62.131
Message-ID: <364_hrczM30sCHA.161@forums.sybase.com>
References: <364_Q4wre00sCHA.198@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:652
Article PK: 713220

Loop through the window's control array, and use the TypeOf() function for
each member -- it should return an Object enumerated type with a value of
RadioButton!.

--
<hopethishelps/>
Roy Kiesler [TeamSybase]
Sybase Developer Network (SDN) -- http://sdn.sybase.com

"Massimo Pucci" <m.pucci@sisteda.it> wrote in message
news:Q4wre00sCHA.198@forums.sybase.com...
> my problem is quite simple : i want to refer to a group of visual object
of
> the same type (known at compile time, ex: radiobutton : rb_1, rb_2,
> ...rb_10) in a window function inside a while loop.
> Can anyone help me ?
> Thanks
> Massimo
>
>


Joost A. Bloemsma Posted on 2003-01-12 21:28:26.0Z
Newsgroups: sybase.public.powerbuilder.objects
Date: Sun, 12 Jan 2003 22:28:26 +0100
From: "Joost A. Bloemsma" <Joost.A@Bloemsma.Net>
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Maybe even faster
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 35
NNTP-Posting-Host: fia187-16-100.dsl.hccnet.nl 80.100.16.187
Message-ID: <364_3E21DDFA.75A4081D@Bloemsma.Net>
References: <364_Q4wre00sCHA.198@forums.sybase.com> <364_hrczM30sCHA.161@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:623
Article PK: 713195

Declare an array of radio buttons as instance variable, and store the handles
to the radio buttons in this array. Then use this array in the loop.

Instance vars:
RadioButton irb_Array[]

Open event window:
int li_UBound, li_Count

li_UBound = UpperBound(This.Control)

FOR li_Count = 1 TO li_UBound
IF This.Control[li_Count].TypeOf() = RadioButton! THEN
irb_Array[UpperBound(irb_Array) + 1] = This.Control[li_Count]
END IF
NEXT

Then use array in loop.

Improves performance becouse the loop will be smaller (don't have to loop
through all of the controls) and you don't have to call the TypeOf() function
each time.

Greetings, Joost

"Roy Kiesler [TeamSybase]" wrote:

> Loop through the window's control array, and use the TypeOf() function for
> each member -- it should return an Object enumerated type with a value of
> RadioButton!.
>
> --
> <hopethishelps/>
> Roy Kiesler [TeamSybase]
> Sybase Developer Network (SDN) -- http://sdn.sybase.com
>
> "Massimo Pucci" <m.pucci@sisteda.it> wrote in message
> news:Q4wre00sCHA.198@forums.sybase.com...
> > my problem is quite simple : i want to refer to a group of visual object
> of
> > the same type (known at compile time, ex: radiobutton : rb_1, rb_2,
> > ...rb_10) in a window function inside a while loop.
> > Can anyone help me ?
> > Thanks
> > Massimo
> >
> >