On Dec 29, 2012, at 7:22, Keary Suska <[email protected]> wrote:

> Anything else you can think of?

Well, I have part of the answer. I think there are 2 bugs, though it's not 
entirely clear.

AFAICT, the reason it's showing the No Selection placeholder is roundabout. It 
*isn't* displaying the No Selection placeholder as a result of the binding. 
It's actually displaying the Placeholder String of the *text field* (when you 
delete the contents after there's initially been something there), but when you 
originally created the binding Xcode changed the Placeholder String in the text 
field to the No Selection string from the binding. At least, that's what 
happened to me.

This appears to be a bug in Xcode, and it only happened when I first 
established the binding. After that, playing with the binding placeholders 
didn't have any effect on the text field Placeholder String. (However, Xcode 
did crash dramatically one time, right after I changed a binding placeholder 
and tried to select the text field. That seems relevant.)

The second bug (I think) is that the field editor displays the text field 
Placeholder String at first (i.e. when you delete the contents after there's 
initially been something there), but the appropriate binding placeholder at 
other times. I still suspect this is a timing issue with NIB loading, where the 
text field caches the placeholder it's going to tell the field editor to use 
before it's seen that there's going to be a binding that supplies a different 
placeholder.

The workaround for the first bug (which would make the second bug moot) is to 
change the text field Placeholder String to match the binding's Null 
placeholder. Of course, that means you'll still have to go in and edit (or at 
least check) each text field in Xcode.

I dunno about  a workaround for the second bug (which would make the first one 
moot, I suppose). Perhaps if your could arrange to re-set the text field to its 
initial value after the window has been displayed, the field editor problem 
would go away. Or perhaps you'd have to to set it to the empty string or nil, 
before you re-set it to the correct thing. Or perhaps you'd have to re-set it 
before the field editor is created.

The controller has no role in any of this. In my testing, I didn't even use one,

_______________________________________________

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