• 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
Value transformer needed?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Value transformer needed?


  • Subject: Value transformer needed?
  • From: Steve Weller <email@hidden>
  • Date: Sat, 2 Jul 2005 21:35:22 -0700


I am working through the NSPersistentDocument Core Data Tutorial and have arrived at a place where a value transformer is needed (I think).


ADC Home > Reference Library > Documentation > Cocoa > Data Management > NSPersistentDocument Core Data Tutorial > Adding a Department Object >

Add two text fields to the window. Bind the value of one to the department's name (bind to the Department object controller's selection.name), the other to the department's budget-the latter requires a number formatter.

By number formatter I think it means value transformer since I get this error:

2005-07-02 21:28:12.334 Core1[4268] Unacceptable type of value for attribute: property = "budget"; desired type = NSDecimalNumber; given type = NSCFString; value = 123.

when I type a number into the Budget box and hit return.

I think I need to add a value transformer to the Bindings panel for the NSTextField that corresponds to Budget. If this is the case, I can see how to add it and register it, but don't know what it should transform from and to.

If I need a number formatter, then where do I add it and what should it format?

--

How much art could an artichoke choke if an artichoke could choke art?
_______________________________________________
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: Value transformer needed?
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: Thwarting classdump, etc.
  • Next by Date: Re: NSTableView & different columns
  • Previous by thread: Extending NSTextView with 'modal' editing
  • Next by thread: Re: Value transformer needed?
  • Index(es):
    • Date
    • Thread