Re: Your posting on Ink
Re: Your posting on Ink
- Subject: Re: Your posting on Ink
- From: Raleigh Ledet <email@hidden>
- Date: Wed, 8 Feb 2006 12:54:32 -0800
I would say that Ink *is* ready for Cocoa. it's just that Apple
hasn't created a Cocoa wrapper API to Ink yet. Again, if people would
like to see a Cocoa API for Ink, please file an enhancement request
for it on RADAR.
-raleigh
On Feb 8, 2006, at 12:27 PM, Gideon King wrote:
Sure, post this to the list - it is really saying that it's not
really Cocoa ready - people need to be aware of this and the
suggested workaround.
Gideon King
NovaMind Software
Mind Mapping Software
<www.nova-mind.com>
On 09/02/2006, at 5:03 AM, Raleigh Ledet wrote:
Gideon,
When the user Inks a phrase, the recognized words of that phrase
is sent to the app as special InkText events. If the app does not
handle these events, Ink will turn around and send the words to
the app on the pasteboard via a paste event. When they come
through in the pasteboard, they are just the recognized words and
all of the underlying Ink attributes (such as alternative
recognitions) are lost.
What you need to do is create a custom NSTextView that catches the
InkTextEvent. When you get an InkTextEvent, add the recognized
word as a string with attributes. One of the attributes, is
obviously going to be al lthe alternates and perhaps even a copy
of the InkEventRef itself. Then you have to override the right
click behavior and setup the correct contextual menu when the user
right clicks on text that has you custom Ink attribute.
Keep in mind, that InkTextEvents will not come through the normal
NSEvent route. You must setup carbon event handlers to catch these
events yourself and deal with them that way. Personally, I would
write my own cocoa wrapper class around the InkTextEvent so that
the rest of my app saw a cocoa interface and all my carbon calls
where localized to the wrapper class.
Do you mind if I repost this to the Cocoa list?
-raleigh
On Feb 7, 2006, at 4:36 AM, Gideon King wrote:
Wow, thanks for all the information - looks really useful. I have
one other question that you may be able to help out with - if I
have an NSTextView that the user is editing, and they write some
text, there is available a list of alternate interpretations -
the ink window allows the user to select a different
interpretation using a drop down menu - how do I do this in my
application? I saw a method for getting a list of alternate
interpretations, but am not sure how in cocoa to know when the
input came from a person writing.
Thanks
Gideon King
NovaMind Software
Mind Mapping Software
<www.nova-mind.com>
On 27/01/2006, at 8:53 AM, Raleigh Ledet wrote:
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden