0

I was looking for something discussed in following posts.

Gap above NSMenuItem custom view.

Reverse engineering an NSMenu for a Status Bar Item

I tried the carbon code provided by Pierre Bernard

initially, i was getting same error "EXC_BAD_ACCESS on the line InstallControlEventHandler" like other had. I play with the code lots and accidently found the solution.

I have just replaced the InstallControlEventHandler function call to HIViewInstallEventHandler and everything is working fine.

Hope this will help others. Let me know if anyone need further clarification.

Special thanks to Pierre Bernard to provide great code.

Thanks

Community
  • 1
  • 1
AmitSri
  • 1,209
  • 1
  • 20
  • 48
  • Please post your question as a question, and then post the answer separately and accept it is described in the [FAQ], rather than posting the answer in the question body and pseudotagging the title as [Solved]. – razlebe Jul 09 '11 at 09:10
  • Thanks for the tip, will keep this in mind. – AmitSri Jul 09 '11 at 09:13
  • I suggest carrying it out with this question, otherwise it'll likely be closed. – razlebe Jul 09 '11 at 09:16
  • I can't give my own answer right now, as i have to wait for next 7-8 hours. Till, i have am keeping it like that.You can edit the post, if it will help to keep the post open. Anyway,this post is only to help other like me not for calculating votes. :). Thanks for your concern. – AmitSri Jul 09 '11 at 09:28

1 Answers1

0

Just replace the InstallControlEventHandler function call to HIViewInstallEventHandler and code will work fine.

Thanks

AmitSri
  • 1,209
  • 1
  • 20
  • 48