> On Sep 20, 2015, at 02:04, Quincey Morris 
> <[email protected]> wrote:
> 
> On Sep 19, 2015, at 20:09 , Alex Hall <[email protected] 
> <mailto:[email protected]>> wrote:
>> 
>> [_NSControllerObjectProxy copyWithZone:]: unrecognized selector sent to 
>> instance 0x608000000ae0
>> 
>> failed to set (contentViewController) user defined inspected property on 
>> (NSWindow): -[_NSControllerObjectProxy copyWithZone:]: unrecognized selector 
>> sent to instance 0x608000000ae0
> 
> I dunno, the things mentioned in the message don’t really go together. 
> “contentViewController” is a property of a NSWindowController, not a 
> NSWindow, and its value ought to be a NSViewController, not anything related 
> to a NSController (which is something entirely different, in spite of the 
> similar name).

You're right, that *is* weird. I didn't pick up on that while reading the 
errors, and I'm not sure why that might be happening. I did add an NSController 
(that's the second binding I mentioned), and its only connection was to a label 
inside a scroll view. As soon as I removed that connection, I got 0 errors. At 
least I have the source of the problem now and can work with that controller to 
figure out why it happened. How it got bound to the window I have no idea, 
because no such connection was in the inspector, only one to that label.
> 
> This could be a memory management error (the original object has been 
> deallocated, and the memory re-used for another object), an invalid 
> connection in the storyboard, or just a misleading message. Or any 
> combination of those.
> 
>> Failed to connect (tweetTextField) outlet from (Cinnamon.ViewController) to 
>> (NSTextView): missing setter or instance variable
> 
>>      @IBOutlet weak var tweetScrollView:NSScrollView!
>>      var tweetTextField:NSTextView { //all we need here is the text view 
>> inside the scroll view
>>              get {
>>                      return tweetScrollView.contentView.documentView as! 
>> NSTextView
>>              }
>>      }
> 
> It kinda looks like you once had tweetTextField set up as an outlet, then 
> changed it to a normal property. If it was actually connected in the 
> storyboard when you changed it, IB would remember the name, and that it used 
> to represent an outlet. (IB tries not to throw away connections you 
> previously made, in case they’re only temporarily missing from the source.) 
> This is harmless if the source property is really gone, but I’d guess that IB 
> sees it’s come back again, and is therefore trying to make the connection at 
> run time — and of course it can’t without a setter or a non-computed property.
> 
> The solution would be to find the connection in the IB inspector and manually 
> disconnect it. At that point, the outlet should disappear from IB completely.

Yes, it did disappear. I never realized the Connections Inspector shows all 
connections if you highlight a scene, that's good to know. I'd been using the 
ruler of my view controller, since that's where I make connections from anyway. 
I know this seems a difficult feature to not notice, but it's not at all 
obvious what an inspector is doing when you're using VoiceOver as it takes at 
least seven keystrokes just to get to the Inspector from the storyboard, so I 
don't do it if I don't have to.

Yes, I'd originally had tweetTextField as an outlet bound to a text field, but 
changed it when I switched to a textView instead. The old connection was indeed 
still there, but as far as I could tell, there was no mention of any warning 
about anything wrong. It'd be awesome if Xcode could put that in the scene in 
he outline table, something like "my view scene, has 1 invalid connection". 
I'll file an enhancement request.
> 
> Incidentally, this would be another bug to report, possibly two. The first 
> bug is that IB didn’t realize it’s not really an outlet any more. The second 
> is that IB marks invalid outlets with a little exclamation point icon, and I 
> suspect this is very hard or impossible to detect via VO. (Even if the 
> accessibility information tells you that it’s so marked, you’d have to check 
> each outlet individually to find out. If you can see the inspector, a single 
> glance tells you if there are any invalid outlets.)


--
Have a great day,
Alex Hall
[email protected]

_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to