FROM : Douglas Davidson
DATE : Tue Apr 05 23:01:17 2005
On Apr 5, 2005, at 1:46 PM, Daniel Child wrote:
> Now, however, I am thoroughly confused. On the one hand, some
> people are suggesting that IMEs can only be done using Carbon.
> (That suggestion admittedly put me in a temporary state of shock,
> since I know nothing about Carbon and reckoned I'd been wasting my
> time learning Cocoa.) Now, all the "NS" class methods and protocols
> you mention seem to be in Cocoa, but you refer me to (Carbon) TSM
> documentation.
>
> So should I write my model in Cocoa (for the linguistic data) with
> a Carbon plugin, or is it just the opposite (Carbon base with Cocoa
> plugin). Or am I totally off the mark? Is MVC an inappropriate
> paradigm? And to interact with the character palette (which seems
> to to have a very modern feel => Cocoa-based?) would you use the
> Carbon or Cocoa API?
>
Cocoa and Carbon aren't really two entirely different things; they
interact and work together, sharing a great deal of common
functionality. When you write an input method, remember that it will
potentially run as a plugin in every application on the system,
Carbon or Cocoa. The way that the input method communicates with its
host application is through a Carbon interface, TSM. The way that
the UI elements in the host application communicate with the input
method is different depending on whether the app is Carbon or Cocoa;
Cocoa views like NSTextView use NSTextInput to communicate with input
methods, and Cocoa under the hood handles the translation between
this and TSM.
I know of no particular reason why you shouldn't write your input
method using Cocoa for as much of it as you choose. There may be
some quirks associated with displaying Cocoa windows in a Carbon
application, that you might run into when your input method was
loaded into a Carbon application, if your input method puts up
windows of its own--check the documentation on Carbon-Cocoa interaction.
Douglas Davidson
DATE : Tue Apr 05 23:01:17 2005
On Apr 5, 2005, at 1:46 PM, Daniel Child wrote:
> Now, however, I am thoroughly confused. On the one hand, some
> people are suggesting that IMEs can only be done using Carbon.
> (That suggestion admittedly put me in a temporary state of shock,
> since I know nothing about Carbon and reckoned I'd been wasting my
> time learning Cocoa.) Now, all the "NS" class methods and protocols
> you mention seem to be in Cocoa, but you refer me to (Carbon) TSM
> documentation.
>
> So should I write my model in Cocoa (for the linguistic data) with
> a Carbon plugin, or is it just the opposite (Carbon base with Cocoa
> plugin). Or am I totally off the mark? Is MVC an inappropriate
> paradigm? And to interact with the character palette (which seems
> to to have a very modern feel => Cocoa-based?) would you use the
> Carbon or Cocoa API?
>
Cocoa and Carbon aren't really two entirely different things; they
interact and work together, sharing a great deal of common
functionality. When you write an input method, remember that it will
potentially run as a plugin in every application on the system,
Carbon or Cocoa. The way that the input method communicates with its
host application is through a Carbon interface, TSM. The way that
the UI elements in the host application communicate with the input
method is different depending on whether the app is Carbon or Cocoa;
Cocoa views like NSTextView use NSTextInput to communicate with input
methods, and Cocoa under the hood handles the translation between
this and TSM.
I know of no particular reason why you shouldn't write your input
method using Cocoa for as much of it as you choose. There may be
some quirks associated with displaying Cocoa windows in a Carbon
application, that you might run into when your input method was
loaded into a Carbon application, if your input method puts up
windows of its own--check the documentation on Carbon-Cocoa interaction.
Douglas Davidson
| Related mails | Author | Date |
|---|---|---|
| Daniel Child | Apr 5, 03:01 | |
| Satoshi Matsumoto | Apr 5, 03:31 | |
| Daniel Child | Apr 5, 07:35 | |
| Douglas Davidson | Apr 5, 18:15 | |
| Daniel Child | Apr 5, 22:46 | |
| Satoshi Matsumoto | Apr 5, 22:56 | |
| Douglas Davidson | Apr 5, 23:01 | |
| Aki Inoue | Apr 5, 23:06 | |
| Aki Inoue | Apr 5, 23:08 |






Cocoa mail archive

