Re: OK, but what do 'attributes' look like?
Re: OK, but what do 'attributes' look like?
- Subject: Re: OK, but what do 'attributes' look like?
- From: Scott Anguish <email@hidden>
- Date: Tue, 9 Mar 2004 17:24:01 -0500
On Mar 9, 2004, at 5:00 PM, Mel Walker wrote:
On Mar 9, 2004, at 2:10 PM, email@hidden wrote:
there are other situations. For example, you might keep your own
data
attached to that that you can detect when you're using a selection
containing that information (I've done something similar, in that
text
was attached to ranges of text in the selection as additional
information.
Can you provide a "such as" for this? I'm wracking my brain trying to
think of what extra info might be attached.
sure.
the application I was speaking of there allowed you to annotate a
range of text in a document (it was an educational application).
So the range of text that was annotated had a 'DFAnnotationAttribute'
that contained a pointer to the object containing the annotation.
when the user selected the text, the annotated range was found in the
selection range, and the UI presented the annotation to the user. Also
the annotated ranges were presented differently to the user in the
NSTextView (the largest one was outlined in red, any smaller ones in
yellow as I recall)
any objects that you need to attach to a range of text can be done
with custom attributes. Another option might be using a range to
contain a cite or glossary element for the specific range.
_______________________________________________
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.