# $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.
Syntax Specification

    $popup.currentItemId()

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

KVIrc 4.2.0.6190 Documentation
Generated by root at Mon Sep 23 13:56:02 2013