NSTableView displaying a coordinate pair
NSTableView displaying a coordinate pair
- Subject: NSTableView displaying a coordinate pair
- From: Dave Sopchak <email@hidden>
- Date: Sat, 19 Oct 2002 22:06:18 -0700
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.