Re: NSCell with URL
Re: NSCell with URL
- Subject: Re: NSCell with URL
- From: Charles Romestant <email@hidden>
- Date: Sat, 21 Mar 2009 15:36:51 +1930
well first step is done,
made my custom NSCell and its working, now i need to optimize it, and i 'm
guessing run it through a RE before so i can add the link? ( any ideas on
displaying URLS?)
On Sat, Mar 21, 2009 at 10:43 AM, Charles Romestant <email@hidden>wrote:
> Thank you for your reply,
> the method itself right now is very fast, i m using a custom class for the
> first column ( displays NSIMage) that caches the images, and the second
> column is pure text , that comes from the xml.
>
> What I want is the NSCell on the second column to support formatted text, (
> some bold letters, URL detecting/parsing so that I can click on it ).
>
> I m wondering if this can be done easily with prebuilt functions, or if
> this has to be done in a custom NSCell class. If it's the latter, could you
> point me in the right direction as to how to implement this properly?
>
> thank you in advance
>
> Charles.
>
>
> On Sat, Mar 21, 2009 at 5:42 AM, Alexander Spohr <email@hidden> wrote:
>
>>
>> Am 20.03.2009 um 15:02 schrieb Charles Romestant:
>>
>> But I don't see how to do this.
>>> I tried NSAttributedString but its painfully slow ( seems that (id
>>> )tableView:(NSTableView *)tv objectValueForTableColumn:(NSTableColumn
>>> *)tableColumn
>>> row:(int)row is called on every refresh resize of the page),
>>> plus i did not get to put the URL in there either, just some colours.
>>>
>>> What would be the proper way to go about this.
>>>
>>
>>
>> First, make the above method fast! That thing has to be fast, as it will
>> be called every time the data changes. Cache your contents /
>> NSAttributedStrings in an NSArray.
>>
>> Only after that method is really fast think about how to get your cell to
>> do what you want.
>>
>> atze
>>
>>
>
>
> --
> Lic. Charles M. Romestant F.
> Phone: +58412 622 2298
>
>
>
--
Lic. Charles M. Romestant F.
Phone: +58412 622 2298
_______________________________________________
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