• 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
Accessing undefined instance hangs application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Accessing undefined instance hangs application


  • Subject: Accessing undefined instance hangs application
  • From: Dave <email@hidden>
  • Date: Sat, 1 Jan 2011 19:34:51 -0600

This bug took a few hours to track down and simplify:

Accessing an undefined property by invoking a handler via an instance reference hangs the application. A 'kill' is necessary to terminate the application.


script UndefinedReferenceBombAppDelegate
property parent : class "NSObject"


on applicationWillFinishLaunching_(aNotification)
--my noSuchProperty -- THIS REPORTS key value non-compliance
set callObj to current application's TestClass's alloc()'s init()
log "here1"
callObj's accessUndefinedMy()
log "here2" -- NEVER REACHED
end applicationWillFinishLaunching_


on applicationShouldTerminate_(sender)
return current application's NSTerminateNow
end applicationShouldTerminate_
end script

script TestClass
property parent : class "NSObject"


on accessUndefinedMy()
log "accessUndefinedMy()"
-- return noSuchProperty -- THIS REPORTS undefined variable
return my noSuchProperty -- THIS HANGS APPLICATION
end accessUndefinedMy
end script



-- Dave

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Next by Date: External script handler return value will not cast to number
  • Next by thread: External script handler return value will not cast to number
  • Index(es):
    • Date
    • Thread