On 16 Jan 2006, at 18:10, Meiqun Xiawrote:
>> We are trying to implement the OSX Spelling in our Carbon application
>> replacing a proprietary system we were using previously. I don't want
>> to use the Cocoa spelling panel as I want to use dialogs we already
>> have (and we have enough problems using Cocoa windows in our
>> application).
>>
>> I seem to be able to access most of the functionality I need but I
>> can't find any way to implement the "Learn" button (ie add word to
>> user dictionary).
>
> If you don't want MLTE to handle this command automatically for
> you, you need to call TXNSetEventTarget to set your own Carbon
> Event Target, then handle the events. If you just want to add a
> word to user dictionary, this is what you need to do:
> 1. get the current selection
> 2. add the word to user dictionary
> 3. remove the mark for the word
> If you believe you did everything correctly, but still can't make
> "learn" working, please file a bug and enclose your sample code to
> the bug.
Presumably this solution only applies if you are using MLTE - we draw
our own text using ATSUI so we handle the carbon input events
ourselves. I presume that the kHICommandLearnWord event is something
sent to the application when someone clicks the Learn button in the
Cocoa spelling panel - but I need to know how to get the same
functionality using my own dialog. How do I add the word to the user
dictionary (step 2)? Can I send the kHICommandLearnWord event - and
if so does it have any parameters I need to set (eg the word to be
added?)
Vanessa
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (
Carbon-dev@list...)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/subscriber%40opensubscriber.com
This email sent to
subscriber@open...
opensubscriber is not affiliated with the authors of this message nor responsible for its content.