TW.getItem( parent, title, label, items [, currentIndex [, editable? ] ] )
http://code.google.com/p/texworks/issues/detail?id=221
A cancel by the User returns the object: undefined
items is an array and could be directly entered in the function.
switch (TW.getItem(null, "This Doesn\'t always Show - Os dependant"
, "Please Make a Choice"
, ["Pizza", "Fish\'n Chips", "Chicken"]
, 1
, true
)// 1 - "Fish\'n Chips" will be default - zero based index, true - here means can edit
)
{
case "Pizza":
choiceMeans = "Going Italian";
break;
case "Fish\'n Chips":
choiceMeans = "Going British";
break;
case "Chicken":
choiceMeans = "Universal";
break;
case undefined:
choiceMeans = "Going Hungry";
break;
default : // edited by User
choiceMeans = "Personal Choices Not Allowed";
break;
} // End. switch (TW.getItem(
TW.information(null,"Tw Message", choiceMeans);
Created with the Personal Edition of HelpNDoc: Free iPhone documentation generator