menu.addCheckbox(sibling)

Hi everyone,

I’m trying to a a checkbox in my menu. If this is really easy to add it as a ‘child’ item, I have some difficulties to add it as a ‘sibling item’. Here is my code :

//menu is created. object name = 'self.menu'
self.menu.addNewSibling("DELETE", "END1", "Verification ended (1)", false, "validate.png",null);
self.menu.addCheckbox("child","END1",null,"END2","Verification ended (2)",false,false);

self.menu.addCheckbox("sibling","END3",null,"END1","Verification ended (3)",false,false);

I do have my “END1” and “END2” items built correctly, but the “END3” item doesn’t appear. What do I do wrong ?

Regards,

Hi,

if you want to add END3 item after END1, you should call the following:

self.menu.addCheckbox(“sibling”,“END1”,null,"END3 ",“Verification ended (3)”,false,false);

The second parameter is the previous item id.

Still doesn’t work. I’m catching this error in firebug :

Please check attached demo
menu.zip (27.7 KB)