• 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
Re: binding window titles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: binding window titles


  • Subject: Re: binding window titles
  • From: Lee Morgan <email@hidden>
  • Date: Sat, 4 Jun 2005 22:06:09 -0400

On Jun 4, 2005, at 9:53 PM, Jeff Gilbert wrote:

Hopefully this won't fall on deaf ears, with WWDC right around the corner :-)


Sadly, not all of us can drive across country to get to WWDC :-\

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.

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"];

Hope that helps,
Lee
 _______________________________________________
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

  • Follow-Ups:
    • Re: binding window titles
      • From: Jeff Gilbert <email@hidden>
References: 
 >binding window titles (From: Jeff Gilbert <email@hidden>)

  • Prev by Date: binding window titles
  • Next by Date: Crash in AppKit?
  • Previous by thread: binding window titles
  • Next by thread: Re: binding window titles
  • Index(es):
    • Date
    • Thread