• 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: CreateCustomControl crash (Urs...?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CreateCustomControl crash (Urs...?)


  • Subject: Re: CreateCustomControl crash (Urs...?)
  • From: Urs Heckmann <email@hidden>
  • Date: Sat, 26 Oct 2002 19:17:46 +0200

Am Freitag, 25.10.02, um 23:14 Uhr (Europe/Berlin) schrieb Howard Moon:

Later, making a second call to RegisterToolboxObjectClass actually FAILS (with a -22080 result), which verify_noerr() ignores apparently.

Hi,

I have found a new way to deal with this without using static data (which is not that easy in a plugin-driven environment).

I now use a manager object to resolve every call of a Carbon control and direct events to appropriate callbacks of the different control wrappers. In the manager class I register controls this way:

char defString[ 64 ];

UInt32 myAddress= (UInt32) this;

sprintf ( defString, "com.myGui.main%d.cntrl", myAddress );

verify_noerr(RegisterToolboxObjectClass (
CFStringCreateWithCString(NULL, defString, kCFStringEncodingISOLatin1 ),
NULL,
4,
CEventList,
NewEventHandlerUPP (myControlHandler),
this,
&ControlClass));

If the control already exists (when forgotten to call UnregisterToolboxObjectClass), the address is valid pointer to my class and everything is fine. Still not elegant but obviously no pain...?

Cheers,

;) Urs
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: CreateCustomControl crash (Urs...?)
      • From: Howard Moon <email@hidden>
    • Re: CreateCustomControl crash (Urs...?)
      • From: Howard Moon <email@hidden>
References: 
 >Re: CreateCustomControl crash (Urs...?) (From: Howard Moon <email@hidden>)

  • Prev by Date: Re: accessing mCarbonPane
  • Next by Date: Re: accessing mCarbonPane
  • Previous by thread: Re: CreateCustomControl crash (Urs...?)
  • Next by thread: Re: CreateCustomControl crash (Urs...?)
  • Index(es):
    • Date
    • Thread