Re: simpleBrowser example has setCellClass setting a cell to an instance?

2009-09-29 Thread Ken Ferry
On Tue, Sep 29, 2009 at 5:35 PM, jon  wrote:

> oh,  i was thinking that method was inherited from the NSControl class...
>
> great,  so now i still can't figure out why my custom Cell methods are not
> firing  still looking for the problem..
>

+cellClass is consulted whenever an NSControl needs to make an NSCell from
scratch for itself.

Nib unarchiving is an interesting case where NSControl *doesn't* need to
make a cell, so +cellClass doesn't get called.  Why?  Because the cell was
already created, at design time in the nib.  It's just unarchived.

If that's the case you're in, select the cell in IB and change its
class.


-Ken


>
> Jon.
>
>
>
> On Sep 29, 2009, at 6:28 PM, Jens Alfke wrote:
>
>
>> On Sep 29, 2009, at 5:19 PM, jon wrote:
>>
>>   [fsBrowser setCellClass: [FSBrowserCell class]];
>>>
>>> fsBrowser is an instance,
>>>
>>>  IBOutlet NSBrowser*fsBrowser;
>>>
>>> yet isn't setCellClass a class method?
>>>
>>
>> No, it's a regular instance method; just look in NSBrowser.h:
>>
>> - (void)setCellClass:(Class)factoryId;
>>
>> —Jens
>>
>
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/kenferry%40gmail.com
>
> This email sent to kenfe...@gmail.com
>
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: simpleBrowser example has setCellClass setting a cell to an instance?

2009-09-29 Thread jon
oh,  i was thinking that method was inherited from the NSControl  
class...


great,  so now i still can't figure out why my custom Cell methods are  
not firing  still looking for the problem..


Jon.


On Sep 29, 2009, at 6:28 PM, Jens Alfke wrote:



On Sep 29, 2009, at 5:19 PM, jon wrote:


  [fsBrowser setCellClass: [FSBrowserCell class]];

fsBrowser is an instance,

  IBOutlet NSBrowser*fsBrowser;

yet isn't setCellClass a class method?


No, it's a regular instance method; just look in NSBrowser.h:

- (void)setCellClass:(Class)factoryId;

—Jens


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: simpleBrowser example has setCellClass setting a cell to an instance?

2009-09-29 Thread Jens Alfke


On Sep 29, 2009, at 5:19 PM, jon wrote:


   [fsBrowser setCellClass: [FSBrowserCell class]];

fsBrowser is an instance,

   IBOutlet NSBrowser*fsBrowser;

yet isn't setCellClass a class method?


No, it's a regular instance method; just look in NSBrowser.h:

- (void)setCellClass:(Class)factoryId;

—Jens___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


simpleBrowser example has setCellClass setting a cell to an instance?

2009-09-29 Thread jon

how is the simpleBrowser example that is provided with xcode doing this?

[fsBrowser setCellClass: [FSBrowserCell class]];

fsBrowser is an instance,

IBOutlet NSBrowser*fsBrowser;

yet isn't setCellClass a class method?

i tried the same thing and got a warning?

thanks,
Jon.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com