• 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: Strange Warning in initialize method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange Warning in initialize method


  • Subject: Re: Strange Warning in initialize method
  • From: Thaddeus Cooper <email@hidden>
  • Date: Wed, 23 Aug 2006 13:50:04 -0700

DOH! That was it. I forgot to change the class from NSObject to NSValueTransformer. Boy do I feel dumb.

Thanks Andrew!

--Thaddeus O. Cooper
(email@hidden)

On Aug 23, 2006, at 1:42 PM, Andrew Farmer wrote:

On 23 Aug 06, at 13:24, Thaddeus Cooper wrote:
Hi all --

I have a method in my app delegate that is registering two value transformers, the first registration compiles fine, but I get a warning on the second registration that says:

warning: passing argument 1 of 'setValueTransformer:forName:' from distinct Objective-C type

<snip>

+ (void) initialize {
ValuePlusOne *valuePlusOneTransformer;
ColumnNameToIcon *columnNameToIconTransformer;

valuePlusOneTransformer = [[[ValuePlusOne alloc] init] autorelease];
[NSValueTransformer setValueTransformer:valuePlusOneTransformer forName:@"valuePlusOne"]; // this works

columnNameToIconTransformer = [[[ColumnNameToIcon alloc] init] autorelease];
[NSValueTransformer setValueTransformer:columnNameToIconTransformer forName:@"columnNameToIcon"]; // warning here
}

Are you sure ColumnNameToIcon is a subclass of NSValueTransformer?

_______________________________________________ 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: 
 >Strange Warning in initialize method (From: Thaddeus Cooper <email@hidden>)
 >Re: Strange Warning in initialize method (From: Andrew Farmer <email@hidden>)

  • Prev by Date: NSSQLiteStoreType and remove (REPOST)
  • Next by Date: Controlling custom control/view participation in the keyboard loop?
  • Previous by thread: Re: Strange Warning in initialize method
  • Next by thread: NSSQLiteStoreType and remove (REPOST)
  • Index(es):
    • Date
    • Thread