• 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: Howard Moon <email@hidden>
  • Date: Fri, 25 Oct 2002 14:14:09 -0700

Urs,
thanks for replying. I have your code you pointed me to earlier this week. What's happening there is that you use a static global for the class reference. Then, it gets set properly the first time. Later, making a second call to RegisterToolboxObjectClass actually FAILS (with a -22080 result), which verify_noerr() ignores apparently. However, this does not change the reference previously set, which is still valid since it was not un-registered! Thus, your code works, although not neatly. I could do the same, I suppose, but I'd sure like to know how to do this without using a global static variable. Thanks for the help...

-Howard


I know what you're talking about, but I don't know the answer anymore (has been probably late of night when I found the cure)...

However, I never Unregistered a Control, cause that crashed when the control was still in use (I think this relies to the order of calling inherited destructors, a problem I never really got enlightment of despite intensive Stroustrup studies). I never had any problems with registering it twice, maybe because my handler is static C code and the System being too surprised to complain :-)

What I noticed is, that the control handler gets called already _before_ all the other objects are ready to use. Hence I do intensive NULL pointer checking before calling any additional callbacks or drawing graphics.

I have no practical advice for your current situation, but as my latest code seems to be not crashing (though not exactly working perfectly nor being free of hacks), I can send you a current snapshot. If you have patience till Sunday, I hope to get source of my whole CoreGraphics-AU-GUI framework (CAUGui) out to the list members.

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: Urs Heckmann <email@hidden>
    • Re: CreateCustomControl crash (Urs...?)
      • From: Airy André <email@hidden>
References: 
 >Re: CreateCustomControl crash (Urs...?) (From: Urs Heckmann <email@hidden>)

  • Prev by Date: Re: Filing of User Presets - naming convention
  • Next by Date: Re: Filing of User Presets - naming convention
  • Previous by thread: Re: CreateCustomControl crash (Urs...?)
  • Next by thread: Re: CreateCustomControl crash (Urs...?)
  • Index(es):
    • Date
    • Thread