Re: NSTableView displaying a coordinate pair
Re: NSTableView displaying a coordinate pair
- Subject: Re: NSTableView displaying a coordinate pair
- From: Jonathan Jackel <email@hidden>
- Date: Sun, 20 Oct 2002 10:12:04 -0400
You could override -description in your CoordPair class to return a string
that includes both RA and dec. Check the NSObject protocol docs.
Jonathan
on 10/20/02 1:06 AM, Dave Sopchak at email@hidden wrote:
>
Hi all,
>
I'm working on a telescope controller app, and using an NSTableView to
>
display a list of GuideStar objects (name, right ascension and
>
declination, local altitude and azimuth). I have no trouble displaying
>
the guide star's name in one column of the view, but in displaying the
>
RA and dec of the object, which I have defined for my convenience as an
>
object called "CoordPair", the only way I can think of to display this
>
would be to make two columns, RA and dec, to display each value, and
>
make methods to my GuideStar class that will allow the NSTableView
>
columns' identifiers to access the RA and dec of the underlying
>
CoordPair object separately. I suppose it would work, but I would not
>
need these methods for anything else, and seems a bit of a kludge.
>
>
Is there a more elegant way of doing this, such as displaying the two
>
instance variables of a CoordPair object in the same column? Could this
>
be done by subclassing NSFormatter, for example?
>
>
Any and all help, much appreciated.
>
>
Dave
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.