• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: bug or feature?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug or feature?


  • Subject: Re: bug or feature?
  • From: Jon Pugh <email@hidden>
  • Date: Wed, 17 Oct 2001 20:47:51 -0700

At 9:07 PM -0600 10/17/2001, Donald S. Hall wrote:
>I was under the impression that global variables were not persistent from run to run, only properties were.

You were wrong.

>I was surprised to discover that global variables seem in fact to also be persistent.

Now you are enlightened.

>I wanted to use the fact that 'x' was undefined to determine if my applet was already running when its open handler was invoked by drag and drop.

You can detect if you were launched without a d&d in the run handler. The open handler will be called directly if you are launched with a d&d. You can uninitialize your variable in the quit handler for the next launch. You can tell when you are double clicked while running with the reopen handler.

I don't know why you would care, so I can't be more precise about a technique to use.

Jon


  • Follow-Ups:
    • Re: bug or feature?
      • From: garbanzito <email@hidden>
References: 
 >bug or feature? (From: "Donald S. Hall" <email@hidden>)

  • Prev by Date: bug or feature?
  • Next by Date: Script launcher
  • Previous by thread: bug or feature?
  • Next by thread: Re: bug or feature?
  • Index(es):
    • Date
    • Thread