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

Re: [sc-dev] Cocoa Dialog Problem

On Tuesday, December 24, 2002, at 05:49 PM, Casey Basichis wrote:

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

this error has nothing to do with the CocoaDialog.

heres the code for the button

loadButton.action = {
	path = nil;
		arg paths;
		path = paths.at(0);
		(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
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.
sc-dev mailing list