| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Jun 30, 2006, at 7:06 PM, email@hidden wrote:
When the 2nd call succeeds with same handler/spec but different data, can you confirm that the handler begins to receive the *new* data and not the old data?
Larry
Kevin G.
In all the following, I am using 1 EventSpec per call to InstallEventHandler
If I register the same handler with the same EventSpec same target, but different user data, it succeeds.
If I register the same handler with two different EventSpecs, but the same target and user data it fails with error eventHandlerAlreadyInstalledErr
The manual says this error should come from registering the same handler with the same EventSpec twice; it says nothing about dependence on user data. (This behavior doesn't make much sense, either.)
Is this a bug in InstallEventHandler?
As an example, I attempted to install the array event_defs below in the obvious programmatic way.
struct CommandDef { int evtClass; int evtType; EventHandlerUPP handler; UInt32 targetID; void * userData; }; typedef struct CommandDef CommandDef;
static OSStatus Keypress( EventHandlerCallRef inCallRef, EventRef inEvent, void *inUserData );
const CommandDef event_defs [] = { { 'keyb', kEventRawKeyDown, Keypress, 0, NULL }, // SUCCEED // Bug? { 'keyb', kEventRawKeyDown, Keypress, 0, (void*)1 }, // SUCCEED? // Bug? { 'keyb', kEventRawKeyRepeat, Keypress, 0, NULL }, // FAIL? { 'FAKE', 'FAKE', Keypress, 0, NULL } // FAIL? };
_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden
_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden
| References: | |
| >Behavior of InstallEventHandler differs from Reference (10.3.9) (From: P McIlroy <email@hidden>) | |
| >Re: Behavior of InstallEventHandler differs from Reference (10.3.9) (From: email@hidden) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.