• 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: makeObjectsPerformSelector on a sub class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: makeObjectsPerformSelector on a sub class


  • Subject: Re: makeObjectsPerformSelector on a sub class
  • From: Nick Zitzmann <email@hidden>
  • Date: Wed, 21 Mar 2012 13:32:22 -0600

On Mar 21, 2012, at 8:56 AM, Pascal Harris wrote:

> I've put a breakpoint in scrambleState - and it never gets called. I'm guessing that 'makeObjectsPerformSelector' fails to work because scrambleState is not a method in UIView. Question is, what do I need to do in order to ensure that this code gets called?

It's not a method of UIView; it's a method of various collection objects. And to ensure that it's being called, you must break on the -makeObjectsPerformSelector: line and ensure that:

1. The code is actually reaching that line.
2. self.view is not nil.
3. self.view.subviews is not nil.
4. self.view.subviews actually has objects in it & is therefore not empty.
5. The line is not throwing an exception.

For 2, 3, and 4 above, you can use the debugger console and the "po" debugger command to evaluate the code. Note that you will have to use bracket notation instead of dot notation with the po command or it will think you're trying to print the object's internals rather than the result of sending a message to an accessor.

For 5, you should turn on breaking on ObjC exceptions in the debugger. You can do that by clicking on the + button in the breakpoints view in Xcode and then choosing to break on exceptions.

Nick Zitzmann
<http://www.chronosnet.com/>


_______________________________________________

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: 
 >makeObjectsPerformSelector on a sub class (From: Pascal Harris <email@hidden>)

  • Prev by Date: Re: makeObjectsPerformSelector on a sub class
  • Next by Date: Re: asynchronous nsurlconnection in nsoperation
  • Previous by thread: Re: makeObjectsPerformSelector on a sub class
  • Next by thread: Re: makeObjectsPerformSelector on a sub class
  • Index(es):
    • Date
    • Thread