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

Re: [Sc-devel] detecting whether a gui widget is swing or not?

well after all, why not add a method in SCView and JSCView : gui, like

+ SCView {
	gui { ^CocoaGUI }

+ JSCView {
	gui { ^SwingGUI }

---> if( aView.gui.id === \cocoa, { }, { }) ???

ciao, -sciss-

Am 15.01.2008 um 23:00 schrieb James Harkins:

That isn't quite safe because someone might create some GUI widgets in
swing, then switch to cocoa while the swing objects still exist. That
should rarely happen, but if something breaks because we didn't think
of a corner case, that's kind of bad.

In any event, my situation is checking a specific widget, not for the
overall GUI scheme.

On Jan 15, 2008 4:46 PM, Jan Trutzschler <sc3@xxxxxxxxxxxxxxxxx> wrote:
don't know if this is relevant here, but i check for swing like this:
if(GUI.current == SwingGUI){"swing ".postln}{"cocoa ".postln};

James Harkins /// dewdrop world

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman
Sc-devel mailing list