heres the code for the button
loadButton.action = {
path = nil;
CocoaDialog.getPaths({
arg paths;
path = paths.at(0);
string.string_(BaseName(path));
(buffer != nil).if({buffer.free});
buffer = Buffer.read(path);
}, {"Canceled".postln}, 1);
};
--------------------------------------------------
The dialog primitive puts up the dialog and returns
immediately. Your
completion function should contain the code to do
what you want to
happen after the dialog is dismissed. One thing you
can do is wrap the
code that calls the dialog in a Routine, create a Wait
condition
object, and immediately after the dialog call, you
wait on the
condition which you signal in your completion function.
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
_______________________________________________
sc-dev mailing list
sc-dev@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-dev