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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to