Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I access an object in a DWObject having its name ?

Status
Not open for further replies.

lolo327

Programmer
Nov 25, 2003
14
GB
How can I access an object in a DWObject having its name ?


Here is a little piece of code. dw_list is a Datawindow and dw_2 is a nested report in the datawindow.

//-----------------------------------
String ls_StringObjects
String ls_ListObjects[]
DWObject ldwo

ldwo = dw_list.Object.dw_2

ls_StringObjects = ldwo_Object.DataWindow.Objects

lnv_CstString.of_ParseToArray (ls_StringObjects,"~t",ls_ListObjects[])
//------------------------------------

After this, ls_ListObjects[] is an array that contains all the name of the objects that are in dw_2.

example :
ls_ListObjects[1] = "t_1"
ls_ListObjects[2] = "dw_3"
ls_ListObjects[3] = "t_2"


How can I access the properties of dw_3 ?

Tips : I can not use the "describe" method because dw_2 is a DWObject and not a Datawindow.




 
just user dot notation.
to access the data property of dw_2 for example, you could use:
dw_list.object.dw_2.Object.data

--
regards,
Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top