• 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
Why is my object getting set two times?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why is my object getting set two times?


  • Subject: Why is my object getting set two times?
  • From: Chris Tracewell <email@hidden>
  • Date: Tue, 12 May 2009 09:16:16 -0700

While debugging I noticed that a custom object's set method is being invoked twice. I have theViewController that is the files owner of my Nib. theViewController has a myObject property. myObject is bound in the Nib using an NSObjectController to the file's owner's myObject property. Automatically prepares content is unchecked in IB. In theViewController I override setMyObject to do some prep work, I also call [super setMyObject:sender] first as that is where the myObject property is defined.

When I load the window and thus the view everything works fine but all of the methods I perform in setMyObject show up twice when I log them. I have been trying to track down where I might be sending setMyObject twice, but am baffled. Here is the log output

2009-05-12 08:50:23.229 myApp[21135:10b] SVController BEFORE adding DetailController view to SV
2009-05-12 08:50:23.281 myApp[21135:10b] SENDER = <TKProductGroup: 0x12d7a50>
2009-05-12 08:50:23.283 myApp[21135:10b] myIDAttributeSet = (null) :: (null)
2009-05-12 08:50:23.322 myApp[21135:10b] SVController AFTER adding DetailController view to SV
2009-05-12 08:50:23.324 myApp[21135:10b] SENDER = <TKProductGroup: 0x10afed0>
2009-05-12 08:50:23.324 myApp[21135:10b] myIDAttributeSet = (null) :: (null)


I know this question is pretty difficult to answer without seeing all of the code, but wanted to ask in case this is a normal bindings issue and nothing to worry about OR if it is a sign of something serious screwed up in my code and thus needing further attention.



Thanks


Chris _______________________________________________

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


  • Prev by Date: Re: how to enable by-default the dock menu "open at login" option
  • Next by Date: Special requirements for the window param of NSAlert beginSheetModalForWindow?
  • Previous by thread: Re: Breaking underlining on descenders
  • Next by thread: Special requirements for the window param of NSAlert beginSheetModalForWindow?
  • Index(es):
    • Date
    • Thread