Passing item as argument

function addTabChannel () 
{
	var Selection = ligdSummary.getSelection();
        var Title = Selection.get(0).chno;
        .......
        .......
}

sc.Menu.create({
    autodraw:"true",
	click : addTabChannel()  <-----
})

How do i pass my ligdSummary into it ? When i run it , it prompt me the ligdSummary doesn’t have tht properties . :slight_smile:

Thank , if you can guide me .

P.s : When i write it on visual Builder , it works . Somehow , when i write it at eclipse , it’s failed

Add quotes around “addTabChannel()”. Otherwise, it executes immediately (before Menu.create() is even called).