[comp.sys.next] about the little example program

daniel@vicorp.UUCP (Daniel Dee) (08/02/89)

Newsgroups: comp.sys.next
Subject: about the little example program
Expires: 
References: 
Sender: 
Reply-To: daniel@nextday.UUCP (Daniel Dee)
Followup-To: 
Distribution: usa
Organization: V. I. Corporation, Amherst, Massachusetts
Keywords: Little

Hi, I've been playing around with the Little example
program and I've the following problem. First the application
window is never activated until you click on the window.
The Shell from which the application is launched
remains the activated application. I got around this
by activating the application myself, i.e.,

[NXApp activateSelf:YES];

even though the manual warns against doing this.
Is there a better way for handling this?

Second, I can't seem to make the now active application
flash the text carat right after it's activated so that
I can start typing instead of clicking that window first.
How do I do this?

Any help will be appreciated.

-- daniel (ddee@vicorp.uu.net)

ali@polya.Stanford.EDU (Ali T. Ozer) (08/04/89)

In article <6023@vicorp.UUCP> daniel@vicorp.UUCP (Daniel Dee) writes:
>Hi, I've been playing around with the Little example 
>program and I've the following problem. First the application
>window is never activated until you click on the window.
>The Shell from which the application is launched
>remains the activated application. I got around this
>by activating the application myself, i.e.,
>
>[NXApp activateSelf:YES];

When you run apps from a Shell, the Shell remains the active app
until you explicitly activate the other app. This way you won't be
surprised & confused if you keep on typing on the Shell and suddenly the 
other app starts running and Shell is deactivated. 

Applications start off being active when you launch them from the
Workspace Manager. To do this properly with "little," you need to
give it an icon.

>Second, I can't seem to make the now active application
>flash the text carat right after it's activated so that
>I can start typing instead of clicking that window first.
>How do I do this?

The Text object needs to be the "first responder" of the window. You can
make it the first responder with the makeFirstResponder method of Window.

Ali Ozer, NeXT Developer Support
aozer@NeXT.com