User Tools

Site Tools


macros:function:handles.createhandlereference

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
macros:function:handles.createhandlereference [2020/04/05 08:20] icke_siegenmacros:function:handles.createhandlereference [2021/06/10 18:06] (current) – external edit 127.0.0.1
Line 12: Line 12:
 ^ ::: | index ( [[macros:type:int32]] ) : Index of the handle within this page. | ^ ::: | index ( [[macros:type:int32]] ) : Index of the handle within this page. |
 ^ return value | [[macros:identifier:handle]] |   ^ return value | [[macros:identifier:handle]] |  
 +
 +Used to pass a handle reference when creating a new one, when the handle does not yet exist. 
 +
 +Page and index are 0-based, e.g. ("Groups", 0, 0) is the first button on page 1 in the groups window.
 +
 +Gregory Haynes gives a good explanation for its use when a function requires a handle which is yet to be created (here: [[:macros:function:Group.QuickCreateGroup]]):
 +
 +> The handle search converter which is used to interpret the "Location=Groups,1,10" is designed to find a handle based on the description. If there is no matching handle i.e. a recorded group then it will return null (nothing) and therefore it cannot be used to specify a location where nothing exists. What you need instead is a handle reference so you could do something like the following:
 +>
 +> ''Group.QuickCreateGroup(Handles.CreateHandleReference("Groups", 1, 10), userNumber:10, "Group 10", 0)''
  
 == Example in ==  == Example in == 
macros/function/handles.createhandlereference.1586074807.txt.gz · Last modified: 2020/04/05 08:20 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki