$popup.currentItemId Returns the popup item ID that owns the executing code
Usage
$popup.currentItemId()
Description
When called inside a popup item's callback, this function returns the ID of the popup item. Outside of callback code, $null is returned.
Examples
#clean any previous popup by the same name setmenu test popup.clear test popup.destroy test #create the popup popup.create test popup.addPrologue(test) { # loop ten times foreach(%i,0,1,2,3,4,5,6,7,8,9) { # delete previous created item to avoid duplication popup.delItem test %i # create a test item using %i as its "item id" popup.addItem(test, item%i, , %i) { #get back "item id" inside the callback debug "chosen item $popup.currentItemId()"; } } } setmenu test test
See also
popup.show, popup.additem

Index, Functions