Re: I can't step into any message of Objective-C object
Re: I can't step into any message of Objective-C object
- Subject: Re: I can't step into any message of Objective-C object
- From: Chan-gu Lee <email@hidden>
- Date: Sun, 30 Mar 2008 21:34:13 +0900
Hi, Jean (I'm sorry, if I say wrong).
I've forgotten to remind the proxy object.
Thanks to your explanation.
Regards.
Chan-gu Lee
2008. 03. 30, 오후 9:17, Jean-Daniel Dupas 작성:
When you use binding, Cocoa will "replace*" your observed object by
a proxy object. This proxy object is responsible to trigger "change
notifications" when you change an observed value.
This is probably what prevent gdb to "step into".
If you want to write a custom accessor that behave the same than you
normal accessor, you have to do something like this:
- (void)setNewValue:(int)number {
[self willChangeValueForKey:@"value"];
m_value = value;
[self didChangeValueForKey:@"value"];
}
*: In fact, it does not really replace your instance, but instead
use isa swizzling to transform your instance into a custom subclass
that performs this work).
Le 30 mars 08 à 14:02, Chan-gu Lee a écrit :
Hi, all who concerns to my symptom.
Here is another issue related with this symptom.
I found additional stack frame called _NSSetIntValueAndNotify
between callee of
setNumber: and setNumber:.
I think that it may cause Xcode step over the message of Objective-
C class.
So, I decided to define another message whose name is setNewValue:
at the same
place with setNumber:, and make call setNewValue: instead of
setNumber:.
Here is replaced code.
- (IBAction)setNumber:(id)sender
{
int new_number = [[m_TextField stringValue] intValue] ;
[m_MyData setNewValue:new_number] ;
// previouslt, it was [m_MyData setNumber:new_number] ;
}
When I tried with above code, it operated perfectly.
Is there a difference in the way of dispatching message between
normal message and
property accessor?
Regards.
Chan-gu Lee
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden