• 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: Spinning Pizza Wheel. Why?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Spinning Pizza Wheel. Why?


  • Subject: Re: Spinning Pizza Wheel. Why?
  • From: Brian Christmas <email@hidden>
  • Date: Sat, 28 Mar 2015 16:44:29 +1100


 G’day all, and thanks Shane

Two questions if you don’t mind

I’ve defined the method as  ShanesFord's fordEvent() & set my ShanesFord to current application's ObjectWithFords



Q1 Do I need to define a property for ‘ShanesFord’ ? i.e. property ShanesFord : missing value


Q2 Will ‘ShanesFord' work in my other script Objects, and if so, do I need to define a property in each?

Regards

Santa


Now that's only clearing two types of event. I picked on them because they trap attempts to cancel a script, which was appropriate to the context. However, it's quite possible for other events to begin banking up, especially mouse movements, so it might be worthwhile adding NSMouseMovedMask in there too.

There is, in fact, a catch-all NSAnyEventMask, and in an ideal world, that's what I'd suggest. The problem is that it's an integer value beyond AppleScript's integer range, which means it gets converted to a real and doesn't work.

In Brian's case he might be better to use the Myriad Helpers equivalent, where it's defined as the -fordEvent method in the ObjectWithFords class. It should be quicker because it's done in Objective-C, but more importantly it uses NSAnyEventMask. So he'd define a property to hold an instance, and initialize it early:

set my notStan to current application's ObjectWithFords

And from then on he'd call it like this:

notStan's fordEvent()

-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>
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
  • Follow-Ups:
    • Re: Spinning Pizza Wheel. Why?
      • From: Shane Stanley <email@hidden>
References: 
 >Spinning Pizza Wheel. Why? (From: Brian Christmas <email@hidden>)
 >Re: Spinning Pizza Wheel. Why? (From: Stan Cleveland <email@hidden>)
 >Re: Spinning Pizza Wheel. Why? (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Spinning Pizza Wheel. Why?
  • Next by Date: Re: Spinning Pizza Wheel. Why?
  • Previous by thread: Re: Spinning Pizza Wheel. Why?
  • Next by thread: Re: Spinning Pizza Wheel. Why?
  • Index(es):
    • Date
    • Thread