• 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: supplying default values to popup in table
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: supplying default values to popup in table


  • Subject: Re: supplying default values to popup in table
  • From: J Tichenor <email@hidden>
  • Date: Fri, 15 Oct 2004 09:32:06 +0100


On 15-Oct-04, at 3:42 AM, Theodore Petrosky wrote:

What is the best way to supply a default value to a
popup in a tableview that is controlled by an
arrayController?

I tried creating a valueTransformer that supplied the
default string if there was no value. This works fine
for viewing but the selectedValue is not updated. I
guess I could create my own add: method that adds a
row to the array then supply the default with the
setter methods. There must be an easier way.

Why not set the default value in the model and just let the popup display that. If the model is taking the default anyway (assuming so), I've always set it during -init. That way default values are assigned in one place and not spread throughout the View?

James


Ted



__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden

This email sent to email@hidden


_______________________________________________
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
References: 
 >supplying default values to popup in table (From: Theodore Petrosky <email@hidden>)

  • Prev by Date: NSLock vs. NSRecursiveLock
  • Next by Date: Re: NSLock vs. NSRecursiveLock
  • Previous by thread: supplying default values to popup in table
  • Next by thread: -[NSUserDefaultsController save:]
  • Index(es):
    • Date
    • Thread