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

Re: [sc-users] Main.sc and stand-alone application



Okay Tadashi (and James),

I've committed the following, which is a simple fix which should do for the time being:

else if (IsSym(parentObj)) {
PyrSymbol *parentSymbol;
int err = slotSymbolVal(parentObj, &parentSymbol);
if (err) return err;
if (strcmp(parentSymbol->name, "Help")==0) {
parentMenu = [[[NSApp mainMenu] itemWithTitle:@"Help"] submenu];
if(!parentMenu) parentMenu = [[[NSApp mainMenu] itemWithTitle:@"ヘルプ"] submenu];
}

Unfortunately I don't know how to test this using the Japanese nib (I think the OS just tells it what to use I think), but IAC this should be in the next alpha when it comes out, so let me know if it works (no error and the help tree appears in the menu).

S.


On Dec 26, 2008, at 2:27 AM, Usami Tadashi wrote:

Sorry to bother you over and over again...
I downloaded 3.3 alpha, unzipped, and installed into /Applications.
I put myApp.rtf in /Applications/SuperCollider.
I changed?/Applications/SuperCollider/SCClassLibrary/DefaultLibrary/Main.sc
with addition of:
interpreter.executeFile(String.scDir ++ "/myApp.rtf");
Then, I was able to start up SC, just as usual. My application didn't come up.
The post window says:
ERROR: Primitive '_NewMenuItem' failed.
Wrong type.
RECEIVER:
Instance of CocoaMenuItem {? ? (154D7B00, gc=EC, fmt=00, flg=00, set=03)
? instance variables [7]
? ? dataptr : RawPointer 55D950
? ? name : "Help Tree"
? ? parent : Symbol 'Help'
? ? children : nil
? ? state : false
? ? isBranch : true
? ? action : nil
}
CALL STACK:
MethodError:reportError ? 15573B90
arg this = <instance of PrimitiveFailedError>
Nil:handleError ? 15571670
arg this = nil
arg error = <instance of PrimitiveFailedError>
Thread:handleError ? 15576320
arg this = <instance of Thread>
arg error = <instance of PrimitiveFailedError>
Object:throw ? 15574910
arg this = <instance of PrimitiveFailedError>
Object:primitiveFailed ? 15572030
arg this = <instance of CocoaMenuItem>
CocoaMenuItem:init ? 15E36190
arg this = <instance of CocoaMenuItem>
arg argparent = 'Help'
arg argindex = 8
arg argname = "Help Tree"
arg hasSubmenu = true
arg argaction = nil
< FunctionDef in Method Meta_Help:addToMenu> ? 15E360F0
arg parent = 'Help'
arg dict = <instance of Dictionary>
arg name = "Help Tree"
arg index = 8
var menu = nil
var keys = nil
Meta_Help:addToMenu ? 155D11E0
arg this = class Help
var ugens = nil
var menu = nil
var addSubMenu = <instance of Function>
OSXPlatform:startup ? 154C3C20
arg this = <instance of OSXPlatform>
Main:startup ? 154C3BC0
arg this = <instance of Main>


Maybe I made a very stupid mistake. Any hints?

Tadashi


: H. James Harkins
.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman