Ferry <[EMAIL PROTECTED]> wrote:
>
> > From: Ken Ferry <[EMAIL PROTECTED]>
> > Subject: Re: Comparing the Class
> > To: "Graham Cox" <[EMAIL PROTECTED]>
> > Cc: "cocoa-dev Dev"
> > Date: Wednesday, October 15, 2008, 6:59 PM
> > &
On Wed, Oct 15, 2008 at 6:17 PM, Melissa J. Turner <[EMAIL PROTECTED]> wrote:
> It's generally unwise to do this kind of thing if you're dealing with class
> clusters or bridged classes (which category includes both NSString and
> NSNumber). The class you actually get may not be what you're expecti
A category could be a nice OO solution here that avoids having the dreaded if
else.
--- On Wed, 10/15/08, Ken Ferry <[EMAIL PROTECTED]> wrote:
> From: Ken Ferry <[EMAIL PROTECTED]>
> Subject: Re: Comparing the Class
> To: "Graham Cox" <[EMAIL PROTECT
On 16 Oct 2008, at 12:59 pm, Ken Ferry wrote:
A category can add a protocol adoption, actually.
Cool, I didn't know that :) Obj-C is a great language, isn't it?
--Graham
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post
>
> Hi,
>>
>> when comparing the class of two objects I usually do [obj1
>> isKindOfClass:[obj2 class]]. But if I say have the Class as an input value
>> to a method:
>>
>> - (void) bla:(Class) inClass
>> {
>>if (/* inClass is an NSString *
On 16 Oct 2008, at 12:20 am, Ruotger Skupin wrote:
Hi,
when comparing the class of two objects I usually do [obj1
isKindOfClass:[obj2 class]]. But if I say have the Class as an input
value to a method:
- (void) bla:(Class) inClass
{
if (/* inClass is an NSString
On Oct 15, 2008, at 06:20, Ruotger Skupin wrote:
Hi,
when comparing the class of two objects I usually do [obj1
isKindOfClass:[obj2 class]]. But if I say have the Class as an input
value to a method:
- (void) bla:(Class) inClass
{
if (/* inClass is an NSString
On 15 Oct 2008, at 14:20, Ruotger Skupin wrote:
Hi,
when comparing the class of two objects I usually do [obj1
isKindOfClass:[obj2 class]]. But if I say have the Class as an input
value to a method:
- (void) bla:(Class) inClass
{
if (/* inClass is an NSString
Hi,
when comparing the class of two objects I usually do [obj1
isKindOfClass:[obj2 class]]. But if I say have the Class as an input
value to a method:
- (void) bla:(Class) inClass
{
if (/* inClass is an NSString */)
{
// do stuff
}
else if