• 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: Modal event processing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Modal event processing


  • Subject: Re: Modal event processing
  • From: Charlie Dickman <email@hidden>
  • Date: Fri, 06 Jul 2012 09:30:26 -0400

Actually, no, I'm not trying to mimic user interaction but that's an idea worth thinking about.

The program demonstrates how to play Chinese Mah-Jong as described in A.D. Millington's (excellent) book "The Complete Book of Mah-Jong so it runs on a timer driven dispatcher to have each player in turn play his hand.

The problem I am having is that outside events like a click in the menu bar or a keyboard event have a hard time getting through.

On Jul 5, 2012, at 11:19 PM, Yingshen Yu wrote:

> Are you trying to mimic user interactions with Cocoa UI?
> If I understand you right, it might be easier to do it with accessibility API, so you can write a normal Cocoa App and a write another app to mimic user interaction to this cocoa app.
>
> -Jonny
>
>
> 在 2012-7-6,上午3:57,Charlie Dickman <email@hidden> 写道:
>
>> I have a demonstration app that is basically operating on a 0.15 second timer loop. The problem I am having is that even with a periodic timer going off it is very difficult to get menu events and mouse clicks in window controls through to be processed. I have tried setting up an additional flow of events using
>> (NSEvent) + (void)startPeriodicEventsAfterDelay:(NSTimeInterval)delaySecondswithPeriod:(NSTimeInterval)periodSeconds
>>
>> as well as
>>
>> [[NSRunLoop currentRunLoop] runUntilDate: [NSDate dateWithTimeIntervalSinceNow: t != 0. ? t * 1.01 : .01]]
>>
>> (where t can be set arbitrarily but is typically called with a value of 0.15) but none of this improves response. Is there anything else to try?
>>
>> Charlie Dickman
>> email@hidden
>>
>>
>>
>> _______________________________________________
>>
>> Cocoa-dev mailing list (email@hidden)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden

Charlie Dickman
email@hidden



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Modal event processing (From: Charlie Dickman <email@hidden>)
 >Re: Modal event processing (From: Yingshen Yu <email@hidden>)

  • Prev by Date: RE: wacky image stretching on rotation (repost)
  • Next by Date: Re: Modal event processing
  • Previous by thread: Re: Modal event processing
  • Next by thread: Re: Modal event processing
  • Index(es):
    • Date
    • Thread