Next_Object_Id - cUIObject
Called by the switch message to determine the object_id of the next object to go to in the focus tree
Type: Function
Return Data Type: Handle
Parameters
| Parameter | Type | Description |
|---|---|---|
| bNoDescend | Boolean | bNoDescend controls whether the search for the next object will descend levels of the focus tree. If it is false, the descent will take place. |
Syntax
Function Next_Object_Id Boolean bNoDescend Returns Handle
Call Example
Get Next_Object_Id bNoDescend to HandleVariable
Description
The Next_object_id function is called by the switch message to determine the object_id of the next object to go to in the focus tree. The message is sent to the current object, which may use this message to change the destination of a navigation if necessary. The bNoDescend flag controls whether the search for the next object will descend levels of the focus tree. If it is false, the descent will take place.
function next_object_id integer skip_down returns integer
integer new_obj
move Self to new_obj
repeat
forward get next_object_id of new_obj skip_down to new_obj
until (ok_to_enter(new_obj))
function_return new_obj
end_function
In the above example, the function is augmented to switch to objects that satisfy the condition ok_to_enter message. This will cause invalid objects to be skipped in the standard navigation scheme.
Return Value
If a value is returned, that's the object to move to. If zero is returned, no focus change should take place.