On Jul 31, 2008, at 13:02, Pete Callaway wrote:

- (void)setSelectedPage:(PageEntity*)newPage
{
        if (newPage == _selectedPage)
                return;
                
        [self willChangeValueForKey:@"selectedPage"];
        _selectedPage = newPage;
        [self didChangeValueForKey:@"selectedPage"];
}

- (PageEntity*)selectedPage
{
        // Probably OTT
        [self willAccessValueForKey:@"selectedPage"];
        PageEntity *page = _selectedPage;
        [self didAccessValueForKey:@"selectedPage"];

        return page     
}

So this is a Core Data application? If so, is "selectedPage" a property defined in the Core Data model, or not?

If it is, you probably should be using primitiveSelectedPage and setPrimitiveSelectedPage to access your instance variable. If not, you're using a property behind Core Data's back, and I didn't have great success when I tried doing that -- though I expect it is doable and I was just Doing It Wrong. (Also, will/didAccessValueForKey makes no sense for properties not in the Core Data model, AFAIK.)

Or, you may be looking in the wrong place for the problem. Are you sure that PageEntity is KVO compliant for the property "stringContent"?


_______________________________________________

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

This email sent to [EMAIL PROTECTED]

Reply via email to