defctxmenu("WFrame", "Frame", {
        menuentry("Close", "WRegion.rqclose_propagate(_, _sub)"), 
})

i want to defctxmenu according to the WClientWin.get_ident.class, i.e.
if the class name of the WClientWin is "VBox", menu item "Close" will do
somthing else other than "WRegion.rqclose_propagate", i have write codes
as below:

function my_close(reg)
    if --class is VBox then
    ...
    --but i can't get the class name because WClientWin.get_ident() need
    --a WClientWin as parameter
    else
        WRegion.rqclose_propagate(reg)") 
    end
end
defctxmenu("WFrame", "Frame", {
                   menuentry("Close", "my_close(_)"),
})


that is, how could my_close() takes two parameters, WRegion and
WClientWin
-- 
sunway

Reply via email to