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

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

The SystemClock events happen as they should. If you try to postln, then those all have to wait until the dialog finishes. I've made some simplifications to the code, which I've committed.

oh, use the scvm defer both in and out of the routine.

actually i was planning on using the SCDialog class also to get

a single path (returnObject would be a string),
get a single path for saving (returnObject would be a string),
get color (return object would be a Color)
get a document (text or .rtf) as text

and any other modal.
if someone wants, they can add extension filters etc.

so its better to call it returnObject rather than returnArray.

i'll change that when i add the other methods.

that's also why i was using the (id) temp rather than passing it in an arg: because the different methods might have different numbers and types of args etc.
and its messy calling it with the invocation.

also i forgot [temp release].
committed that.

Try this (it requires a change I committed to Function.sc):


SynthDef("tink", { arg freq = 1000;
	Out.ar(0, SinOsc.ar(freq, 0, Line.ar(0.2,0,0.1,doneAction: 2)));
s.sendMsg("/d_load", "synthdefs/tink.scsyndef");

CocoaDialog.getPaths({arg x; "ok".postln; x.postln },{"cancel".postln})

{ s.sendMsg(\s_new, \tink, 1001, 1, 0, \freq, 1000); 1 }.play(SystemClock);

{ s.sendMsg(\s_new, \tink, 1002, 1, 0, \freq, 800); 1 }.play(AppClock);


--- james mccartney james@xxxxxxxxxxxxxx <http://www.audiosynth.com> SuperCollider - a real time synthesis programming language for the PowerMac.

sc-dev mailing list