Re: Trouble assigning datasource and delegate to an instance of NSTableView
Re: Trouble assigning datasource and delegate to an instance of NSTableView
- Subject: Re: Trouble assigning datasource and delegate to an instance of NSTableView
- From: Peter Hudson <email@hidden>
- Date: Thu, 28 Mar 2019 23:39:15 +0000
Hi Alex
After some thought i cast the object in question to (id) and the compiler was
happy, and the program runs.
Guess i need to read up on this aspect of the language.
Peter
> On 28 Mar 2019, at 23:29, Alex Zavatone <email@hidden> wrote:
>
> Not sure if this is a right answer, but what happens if you weakify the
> instance?
>
> Also, I suspect this is for MacOS, not iOS?
>
> What happens if you try to recreate this in a simple case in a fresh project?
>
> Alex Zavatone
>
> Sent from my iPhone
>
>> On Mar 28, 2019, at 5:58 PM, Peter Hudson <email@hidden> wrote:
>>
>> Hi there
>>
>> The class I am trying to use as a datasource and delegate to an NSTableView
>> adopts the required protocols and implements the required methods :-
>>
>> @interface ImportTool <NSTableViewDataSource, NSTableViewDelegate,
>> NSEncoding> : NSObject
>>
>> etc …
>>
>>
>> But when I try to assign an instance of ImportScript as datasource and
>> delegate to the table view in question I get the following warning :-
>>
>> Assigning to 'id<NSTableViewDataSource> _Nullable' from incompatible type
>> 'ImportTool *__strong’
>>
>>
>> Any suggestions gratefully received !
>>
>> Peter
>> _______________________________________________
>>
>> Cocoa-dev mailing list (email@hidden)
>>
>> 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:
>>
>> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden