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.

Object names dynamically

2 posts in Objects Last posting was on 2002-09-18 13:58:00.0Z
Butenaers_Bart Posted on 2002-09-18 07:42:48.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: Butenaers_Bart
Date: Wed, 18 Sep 2002 03:42:48 -0400
Subject: Object names dynamically
Lines: 14
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_D1F85EFB130B6837002A5EC185256C38.002A5F0785256C38@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:921
Article PK: 713487

The content of a report object (ro_report) in a composite datawindow (dw1)
can be accessed by using following statement :

any la_content
la_content = dw1.object.ro_report.object.data

Is it possible to access such an object dynamically when you have the
object name in a string variable ? Because following source gives an error
about a non-existing object property ls_obj_name.

any la_content
string ls_obj_name
ls_obj_name = "ro_report"
la_content = dw1.object.ls_obj_name.object.data


Chris Pollach Posted on 2002-09-18 13:58:00.0Z
Newsgroups: sybase.public.powerbuilder.objects
Reply-To: "Chris Pollach" <cpollach@ajja.com>
From: "Chris Pollach" <cpollach@ajja.com>
Subject: Re: Object names dynamically
Date: Wed, 18 Sep 2002 09:58:00 -0400
Lines: 35
Organization: STD Inc
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: firewall.scc-csc.gc.ca 209.47.227.130
Message-ID: <364_GTXsZ1xXCHA.197@forums.sybase.com>
References: <364_D1F85EFB130B6837002A5EC185256C38.002A5F0785256C38@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:920
Article PK: 713486

You can NOT use the "." (dot" notation for DW objects as variables. Try
the GetChild ( ) method.

IE:
DataWindowChild io_dwc
string ls_obj_name
ls_obj_name = "ro_report"
DC.GetChild (ls_obj_name", io_dwc)
IF IsValid(io_dwc) = TRUE THEN
io_dwc.GetItemxxxx()
END IF

Regards .... Chris

<Butenaers_Bart> wrote in message
news:D1F85EFB130B6837002A5EC185256C38.002A5F0785256C38@webforums...
> The content of a report object (ro_report) in a composite datawindow (dw1)
> can be accessed by using following statement :
>
> any la_content
> la_content = dw1.object.ro_report.object.data
>
> Is it possible to access such an object dynamically when you have the
> object name in a string variable ? Because following source gives an
error
> about a non-existing object property ls_obj_name.
>
> any la_content
> string ls_obj_name
> ls_obj_name = "ro_report"
> la_content = dw1.object.ls_obj_name.object.data