discuss-gnustep
[Top][All Lists]
Advanced

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

Re: How to make a window visible ?


From: Pete French
Subject: Re: How to make a window visible ?
Date: Mon, 14 Jan 2002 11:09:05 +0000

> Hi - from the code below, I suspect that you are trying to order your
> window front in your main function, before the application is made active

Its not really an application - I never go into the application run loop,
the windows are all created and drawn from within my own main code.

> ... which won't work - you can't order front any window before the
> application is 'launched'.

Hmmm. Unfortunate if you are trying to create windows from a command
line program (as most of the software I wish to port does). Also there
must be some way of doing it because NSRunAlertPanel manages to
do this with no applicaion present (in fact the example file for
the makefiles does just this with no application in sight...)

I did eventually get the window to come up by sending it "orderFrontRegardless"
but thats not helped too much as now I cannot make any of the stuff I draw into
into it appear. I have tried all sorts of different ways to flush the graphics
state to the screen, but none of them seem to work (though dragging other
windows over it does start to show parts of whats in the window)

One again, however, NSRunAlertPanel manages to do this - in fact adding an
alert panel at the end of the program will flush all the output to the
screen and make what I drew into my window visible ! I'm starting to walk
through the alert panel code to see if I can find out how it does this...

> I wrote a tutorial about it once,
> http://www.gnustep.it/nicola/Tutorials/WindowsAndButtons/

Its a good tutorial (I did find and read it) but doesnt really apply to my
case as I am not using the application loop.

You might think its an odd thing to do, but a lot of what I have worked on
involves add OpenStep capabilities to existing software,soyou cant
just get rid of  the existing C run loop. Probably the most widely used
program which does this is gnuplot - the OpenStep conversion of this is
exactly what I am aiming at.

Thnaks for the suggestions...

-bat.



reply via email to

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