🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #954

Re: [NXApp run]

#954
From: Jim Large
Date: Mon, 31 Aug 1992 14:30
42 lines
1713 bytes
In article <1992Aug25.092051@fdr.jsc.nasa.gov> shirley@fdr.jsc.nasa.gov (Bill  
Shirley [CSC]) writes:
> 
> Does the -run method of Application NEED to be invoked.
> I need a little bit more control over the event loop.

  I've found that some desirable things happen when -[Application run] is
called.  The only one I know about for sure is that the application's icon
(which is highlighted when you launch the app) becomes unhighlighted.

  That's why I did the following when I had to port an alien program to
NeXTStep:

@interface Controller:Object
@end

@implementation Controller
- appDidInit:sender {
    [NXApp stop];
    return self;
    }
@end

void main(
  int argc,
  char *argv[]
  )
  /*main*/ {
    NXApp = ...
    ...
    [NXApp setDelegate:[[Controller alloc] init]];
    [NXApp run];
    while( 1 )
      /*main loop*/ {
        ...
      /*main loop*/ }
  /*main*/ }

----------------+------------------+------------------------------------
     |\ /|      |  Jim Large       |  Visual Understanding Systems, Inc.
     | V |      |  jml@visus.com   |  2100 Wharton St.                  
   \_|   |__    |  (412)488-3600   |  Pittsburgh, PA  15203             
Technical Details
Message-ID: <1992Aug31.143034.12176@visus.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!ibis!menu!tuna!usenet
References: <1992Aug25.092051@fdr.jsc.nasa.gov>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!ibis!menu!tuna!usenet
From: jml@visus.com (Jim Large)
Newsgroups: comp.sys.next.programmer
Subject: Re: [NXApp run]
Message-ID: <1992Aug31.143034.12176@visus.com>
Date: 31 Aug 92 14:30:34 GMT
References: <1992Aug25.092051@fdr.jsc.nasa.gov>
Sender: usenet@visus.com (Usenet news reciever)
Organization: Visual Understanding Systems, Pgh PA
Lines: 42
Nntp-Posting-Host: taco.visus.com