[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] SCMenuItem problems



Okay, fixed.

On 8 Mar 2009, at 13:38, Scott Wilson wrote:

I don't know how you arrived at this way of doing things, but certainly not from the help files. default should be private possibly.

On 8 Mar 2009, at 11:39, Wouter Snoei wrote:

Hi all,

I'm not sure if the SCMenuItem stuff is still work in progress, but I'm experiencing some trouble when trying to add things to the Library menu with it:


// [1] If the Library menu is not already there;

SCMenuItem( CocoaMenuItem.default, "Hi" );  // doesn't do anything

CocoaMenuItem.add(["Hi"])

In general this is how you should add to Library.

As for the rest I'll take a look. I think it's that default is not being cleared and you can't add to a dead menu. Not sure what's the best approach...

S.



// [2] To get the Library menu there it seems required to do it via
// GUI.menuItem.add() once:

GUI.menuItem.add( [ "Hi1" ] );
SCMenuItem( CocoaMenuItem.default, "Hi2" ); // now it works

// [3] But, if I now do:

CocoaMenuItem.clearCustomItems;

// and try to do [2] again I get:


// -> ERROR: Primitive '_NewMenuItem' failed.

// [4] And things get worse. If I want to add a separator line
// (after recompiling and doing [2] again):

SCMenuSeparator( CocoaMenuItem.default, 1 ); // shows up correctly

// and try to quit, recompile or do:

CocoaMenuItem.clearCustomItems; // SC crashes ..


any thoughts? (btw I'm using rev 8892)

cheers,
Wouter



_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/