Re: binding window titles
Re: binding window titles
- Subject: Re: binding window titles
- From: Jeff Gilbert <email@hidden>
- Date: Sat, 4 Jun 2005 21:38:01 -0500
Thanks for the suggestions, Lee.On Jun 4, 2005, at 9:06 PM, Lee Morgan wrote: On Jun 4, 2005, at 9:53 PM, Jeff Gilbert wrote: I am upgrading an app to use bindings (I can see I will eliminate a ton of code, yeah!). I try to bind the window title using a Title with Pattern to include an attribute from an object in the window. If I update said attribute, the window title updates nicely. However, when the window first appears, it has the default window title (i.e. the document title). I even tried putting [self synchronizeWindowTitleWithDocumentName] in windowDidLoad but it has no effect. The only way I can make it work is to also override windowTitleForDocumentDisplayName:. Is there something I am missing?
OK, two stabs at this... 1 - If your window's bound value is null you should bind the "NULL Placeholder", might consider binding the "No Selection" value also.
I tried that, but it didn't work for any of No Selection Placeholder, Not Applicable Placeholder or Null Placeholder. 2 - When you change your window's bound value programmatically you should use the following, um.. structure....can't think of the word right now.
[owningObject willChangeValueForKey:@"windowBoundValueKey"]; // Change value here [owningObject didChangeValueForKey:@"windowBoundValueKey"];
Changing the bound value is not a problem. The only problem is when the window is first shown. However, it may have to do with the timing of the binding being configured. I will investigate when the binding occurs in relation to the window loading. Does anybody know when the title would be set by the title binding?
thanks, Jeff |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden