Parameter | Description |
---|---|
bNoDescend | 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. |
If a value is returned, that's the object to move to. If zero is returned, no focus change should take place.
Function Next_Object_Id integer bNoDescend Returns Integer
Call: | Get Next_Object_Id bNoDescend to IntegerVariable |
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.
The messages next_object_id and prior_object_id are used to determine what the next or prior object would be for keyboard navigation. They are called by the next and previous messages to change focus. You should also be able to call them to figure out where the focus should be.
Prior to DF8.2, a return of zero, sometimes meant "no focus change" and it sometimes meant, "a focus change has taken place". This was a bad design. You would send a message to get the next object and instead of getting an object, a focus event might take place. This occurred because these messages sent child_wrapping and our packages used this to occasionally perform focus changes. Child_wrapping would change the focus and return 1, which caused the next_object_id and prior_object_id to return 0. You had no way to determine what that return of 0 actually meant.
In 8.2 we no longer use child_wrapping for this purpose (actually we do not use it at all). Instead we use a new method named OnChildWrapping. OnChildWrapping never changes the focus; it returns an object handle that indicates where the focus should go. The next_object_id / prior_object_id messages use this so it can determine where the next focus will be.
This means that next_object_id / prior_object_id will never change the focus any more. They return a value that indicates where the focus ought to go. If 0 is returned, a focus change is not possible. Therefore you can always safely call these methods without worrying that the focus might get changed without you knowing it.
IMPORTANT NOTE: Child_wrapping is now obsolete. It still works but you should use the new message OnChildWrapping.