• 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
Returning a Boolean in a NSValueTransformer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Returning a Boolean in a NSValueTransformer


  • Subject: Returning a Boolean in a NSValueTransformer
  • From: Dario Mèndez Musicò <email@hidden>
  • Date: Sat, 24 Sep 2005 15:51:20 +0200

I'm developing an application wich makes massive use of Cocoa Bindings to display data.
I never had any particular problems, but now I'd need to make an NSButton appear enabled or disabled whenever a value is somethning or not.


So I set up an NSValueTransformer to pick up a string value from my data and perform an isEqualToString: command.

If the string is "N/A" i should return NO in order to make the NSButton disabled, else i'll return YES.
However this method doesn't work and crashes my app, it also issues warnings about maiking pointer from integer without a cast.
So I *guess* it's something about non overriding the + (Class) transformedValueClass method...
I tried returning BOOL there but it just goes out with a parse error before BOOL, and YES or NO do the same, of course.


I'd like to know if anybody else did something like this and could help me figure this out.

Thanks in advance.





___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it
_______________________________________________
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: Returning a Boolean in a NSValueTransformer
      • From: Jim Correia <email@hidden>
  • Prev by Date: Re: Need Help With NSScrollView & possible NSClipView
  • Next by Date: Re: Returning a Boolean in a NSValueTransformer
  • Previous by thread: Re: Delegates and multiple views
  • Next by thread: Re: Returning a Boolean in a NSValueTransformer
  • Index(es):
    • Date
    • Thread