%ud - User data

Purpose

To provide a user data for a control.

Syntax

winio@('%ud', loc(data1))

Description

%ud allows user data to be associated with a given control. It can be useful when inside a callback to be able to retrieve data that is not directly a property of the control. For example, if you have buttons that launch reports you may want to store details about which report to run with the button. %ud allows you to do this. %ud takes an INTEGER(7) argument that is the location of the associated data. It works like %lc (Handle of Last Control) in that it relates to the previous control in the winio@ list.

The address of this data can be retrieved by calling CLEARWIN_INFO@ or by calling GET_USER_DATA@. A call to CLEARWIN_INFO@ can be made from within a callback function for the associated control. It takes the form

INTEGER(7) addr
addr = CLEARWIN_INFO@("USER_DATA")


If %ud is placed before any controls then that data relates to the window itself. This data can be retrieved by using CLEARWIN_INFO@("USER_WINDOW_DATA").

See also

GET_USER_DATA@, SET_USER_DATA@

 

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited