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

Re: [sc-dev] Cocoa primitives

something like this (from SCView::keyDown)

    PyrSymbol *method = getsym("ok");
    pthread_mutex_lock (&gLangMutex);
        VMGlobals *g = gMainVMGlobals;
        g->canCallOS = true;
        ++g->sp;  SetObject(g->sp, receiver);
        runInterpreter(g, method, 1);
        g->canCallOS = false;
    pthread_mutex_unlock (&gLangMutex);

pthread_mutex_lock waits till it gets the lock, right ?

nothing needs to be passed back to the method, since the CocoaDialog
instance still holds the original returnSlot object.

so this system should work for getting paths, strings, colors etc.

On Tuesday, December 17, 2002, at 02:30 PM, crucial felix wrote:

now here i need to make sure that i re-enter correctly. i need to call the interpreter, and to do that i need to obtain a lock

	// "receiver perform sc method 'ok' "

i think SCVirtualMachine could have a method:

-(void)object:(PyrObject*)object perform:(PyrSymbol*)selector