Unit 'mui' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#os4units]

MUIM_FindUData

Find a userdata in objects and childrens list and return the object

Declaration

Source position: mui.pas line 617

const MUIM_FindUData = MUIB_MUI or $42c196;

Description

DoMethod(obj, MUIM_FindUData, [UData: IPTR]);

UData
- userdata to look for.

This method tests if the MUIA_UserData of the object contains the given UData and returns the object pointer in this case.

Although this is not very useful for single objects, performing this method on objects that handle children can become very handy. In this case, all the children (any maybe their children) are tested against UData and the first matching object is returned.

This method is especially useful if you created your menu tree with a NewMenu structure and you want to find the object pointer for a single menu item.

Note: If you have many objects in your application, MUIM_FindUData may take quite long. You can limit the amount of time by performing the method not on the application but on the window or even on the group/family your object is placed in.

See also

MUIM_GetUData

  

MUIM_SetUData

  

Find a userdata in objects and childrens list and set an attribute of the object


Documentation generated on: 2021-07-30