[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] File chooser?
Hi Dan
Is there any kind of file-chooser GUI component available in SC? I
can't find one anywhere, but just in case it's hidden somewhere I
thought I'd better ask.
Yes, there is the CocoaDialog. Have a look at the helpfile pasted
here below.
Alternatively, it would be nice if the SCDragSink could take a
filepath if a file is dropped onto it from Finder, but that doesn't
seem to happen.
Yes, I was thinking about this myself yesterday. It would be nice
in live situations to be able to drag a soundfile from a folder
onto some SCView in order to load it into a buffer and play.
(it would be faster than having to use the CocoaDialog).
I am not aware of this being possible? Can somebody prove me wrong?
thor
----------
CocoaDialog<x-tad-smaller>
</x-tad-smaller>File dialogs that utilize OS X Cocoa services.
<x-tad-smaller>
</x-tad-smaller>*getPaths(okFunc,cancelFunc)
<x-tad-smaller>
(
</x-tad-smaller><x-tad-smaller>CocoaDialog</x-tad-smaller><x-tad-smaller>.getPaths({ </x-tad-smaller><x-tad-smaller>arg</x-tad-smaller><x-tad-smaller> paths;
paths.do({ </x-tad-smaller><x-tad-smaller>arg</x-tad-smaller><x-tad-smaller> p;
p.postln;
})
},{
</x-tad-smaller><x-tad-smaller>"cancelled"</x-tad-smaller><x-tad-smaller>.postln;
});
)
</x-tad-smaller>*savePanel(okFunc,cancelFunc)
<x-tad-smaller>(
</x-tad-smaller><x-tad-smaller>CocoaDialog</x-tad-smaller><x-tad-smaller>.savePanel({ </x-tad-smaller><x-tad-smaller>arg</x-tad-smaller><x-tad-smaller> path;
path.postln;
},{
"cancelled".postln;
});
)
</x-tad-smaller>