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

[sc-dev] Cocoa Dialog Problem



But why cant i have a Buffer.read in the completion
function?  Im getting an error (ERROR:
Message 'bufferAllocator' not understood.)

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