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: Nicola Pero
Subject: Re: How to make a window visible ?
Date: Mon, 14 Jan 2002 08:46:50 +0000 (GMT)

> Under other OpenStep implementations sending the method "makeKeyAndOrderFront"
> to a window makes it visible. This does not appear to happen under GNUstep, 
> how do I actually get a window to appear on the screen ? I have
> included the very short code I am using below - I insrted the 'puts()' calls
> dependent on the return from 'isVisible' so that I can see at what point the
> window becomes visible. Under OS42 it does so when ordered front, under 
> GNUstep
> it is never made visisble. i assume I have missed some obvious step somewhere,
> thanks for any help !

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
... which won't work - you can't order front any window before the
application is 'launched'.

You probably want to create an application delegate, and move the code to
order front the window into applicationDidFinishLaunching:.

I wrote a tutorial about it once,

http://www.gnustep.it/nicola/Tutorials/WindowsAndButtons/

it should explain how to create a simple window and ordering it front
correctly, including full working source code and explanation of the
start-up sequence.

Hope this helps.




reply via email to

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