discuss-gnustep
[Top][All Lists]
Advanced

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

Re: a window for a tool


From: Adam Fedor
Subject: Re: a window for a tool
Date: Tue, 21 May 2002 13:34:04 -0600
User-agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:0.9.8) Gecko/20020310

Chris B.Vetter wrote:
On Tue, 21 May 2002 20:45:39 +0200 (CEST)
Pascal Bourguignon <pjb@informatimago.com> wrote:
[...]

What's a tool?  What's an application?

[...]

So either you use application.make,  or you'll have to add gnustep-gui
to the libraries to be linked with your "tool".


Obviously, you cannot use NSPanel(s) in a tool that's designed for
a pure text console, eg a daemon like, say, gdomap.

However, it's an interesting issue, eg. for Interface, as Interface is compiled
as a tool -- but being able to use NSPanel(s) in Interface WOULD make sense,
eg for notifications if sth goes wrong (error handler), questions (wanna quit?)
or a mere copyright notice...

So the question "(how) is it possible to use NSPanel in a Tool?" IS valid, IMHO.



Well you ought to be able to just get the sharedApplication object (which makes the 'connection' to the window server), then start up your own runloop which will receive and process events (see NSApplication for examples). This should not start up anything else unless it's absolutely needed - although I woundn't expect to be able to do any more than throw up an alert panel or something similer.

I haven't actually tried this, but if it doesn't work that way, one could reasonably consider it a bug (patches *happily* accepted).



--
Adam Fedor, Digital Optics Corp.      | I'm glad I hate spinach, because
http://www.doc.com                    | if I didn't, I'd eat it, and you
                                      | know how I hate the stuff.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]