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

[sc-dev] CocoaDialog works, sched doesn't

re: the last problem.
i am now storing the PyrObject rather than the slot.
i am still totally mystified as to why that made a difference.

but now...

I am using
NSThread + (void)detachNewThreadSelector:(SEL)aSelector toTarget:(id)aTarget withObject:(id)anArgument

to start a thread on an SCDialog object method that runs the modal dialog to get the file names.
so it should be a completely different thread than the app is running.

but scheduling is still interrupted.

when i select each file in the file browser, the app clock is
allowed to update briefly. (mouse event passed control back to the app).

when the dialog is finished, i use SC VM defer to run the method to set the
return values and call "ok" or "cancel".
that all works fine.

i = 0;
	i = i + 1;
the system clock works fine while i'm in the dialog.
it can't actually do the postln, but when control returns to the app,
it posts all the numbers it would have during the break.  i assume then
it also couldn't fire any OSC scheduled events etc.

i = 0;
	i = i + 1;
the app clock can only function when full control is left with the app.
when control returns to the app, it resumes where it left off.

so after all this struggle, it doesn't seem like there is a way to get
sclang to spawn a thread ???

there has to be a way.