tpsnet2m01
24th June 2003, 20:21
Using funcions change.object, map.object, and unmap.object require an object ID. Does anyone know how to produce a list of objects when created by an existing standard session. I didn't get very far. I am able to get the ID of the current main window with current.mwindow(). This object has sub objects and I am hoping the is some hidden function which identifies them.

NvanBeest
25th June 2003, 00:44
Unless you build the complete session yourself, I don't think there is an easy way. There are no functions provided to traverse the object tree that I know of. This tree can be extremely complex. With the web-interface, I added a screen with the object tree of a window, and here is an example of (part of) the tree for the menu browser.

NvanBeest
25th June 2003, 00:45
And another example: maintaining company details.

NPRao
25th June 2003, 01:45
Nico:

That was awesome.... ;)

tpsnet2m01:

Refer to the lower level tools function in the CMS -

query.object() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_user_interface_objects_query_object)

Example 2
To retrieve the IDs of the subobjects that occur within a particular area of a graphical window.

long part.list(20) | max. 20 parts
long num.parts
query.object( gwin_id,
DsNx, 5,
DsNy, 5,
DsNsize, 20, | maximum number of parts
DsNwidth, 30,
DsNheight, 30,
DsNsubObjectArray, part.list, num.parts )
The num.parts argument now contains the number of subobjects that occur within the specified area (in this case, 2). The part.list array contains the IDs of the subobjects (in this example, it contains the IDs of gp1 and gp2).