FROM : Clark S. Cox III
DATE : Tue Nov 19 14:16:13 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday, Nov 18, 2002, at 14:44 US/Eastern, Robert Miller wrote:
> Hello,
>
> Does anyone know if it is possible to determine 'where' an
> NSFormatter is being used. That is, if I have one attached to an
> NSTableView -> NSTableColumn dataCell. Is it possible to get a
> backward reference to the NSTableView given the NSFormatter reference > ?
No, there isn't, at least not to my knowledge. That being said, I
actually think that it's a good idea that we can't get any kind of
reference back to the cell being formatted. A formatters only job is to
blindly convert strings to object values, and object values to strings,
and returning any errors that come up in the process. IMHO, that
seperation of duties is a good idea, and prevents formatters from
becoming overly complex.
That being said, you could probably achieve this by adding an instance
variable to your NSFormatter subclass that points to a particular cell,
and simply setting that variable when you attach the formatter. The
problem with this approach is that a single formatter can be attached
to multiple cells.
- --
http://homepage.mac.com/clarkcox3/
<email_removed>
Clark S. Cox, III
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (Darwin)
iEYEARECAAYFAj3aOaUACgkQd6STocYT1xVLFACeMtRTNhXxUyHTbzoyP0WRCSRF
u8oAn1vamRud2fdTyk8qvocSVL827EB5
=k64z
-----END PGP SIGNATURE-----
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Tue Nov 19 14:16:13 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday, Nov 18, 2002, at 14:44 US/Eastern, Robert Miller wrote:
> Hello,
>
> Does anyone know if it is possible to determine 'where' an
> NSFormatter is being used. That is, if I have one attached to an
> NSTableView -> NSTableColumn dataCell. Is it possible to get a
> backward reference to the NSTableView given the NSFormatter reference > ?
No, there isn't, at least not to my knowledge. That being said, I
actually think that it's a good idea that we can't get any kind of
reference back to the cell being formatted. A formatters only job is to
blindly convert strings to object values, and object values to strings,
and returning any errors that come up in the process. IMHO, that
seperation of duties is a good idea, and prevents formatters from
becoming overly complex.
That being said, you could probably achieve this by adding an instance
variable to your NSFormatter subclass that points to a particular cell,
and simply setting that variable when you attach the formatter. The
problem with this approach is that a single formatter can be attached
to multiple cells.
- --
http://homepage.mac.com/clarkcox3/
<email_removed>
Clark S. Cox, III
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (Darwin)
iEYEARECAAYFAj3aOaUACgkQd6STocYT1xVLFACeMtRTNhXxUyHTbzoyP0WRCSRF
u8oAn1vamRud2fdTyk8qvocSVL827EB5
=k64z
-----END PGP SIGNATURE-----
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Robert Miller | Nov 18, 20:44 | |
| Clark S. Cox III | Nov 19, 14:16 |






Cocoa mail archive

