• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Writing a custom spell service
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing a custom spell service


  • Subject: Re: Writing a custom spell service
  • From: Ondra Cada <email@hidden>
  • Date: Fri, 31 Aug 2001 17:29:18 +0200

Stefan,

>>>>>> Stefan Kreutter (SK) wrote at Fri, 31 Aug 2001 16:37:26 +0200:
SK> First of all the documentation [1,2] to NSSpellServer seems pretty old
SK> and outdated (has it ever been updated since the NEXTSTEP days?

Uh-oh, where you get the docs from?!? True is that the old server was quite
"non-OO", in a sense, with its C-arrays and C-strings (ouch). The NeXTStep
way of spelling server was deprecated long ago, though! You should use the
methods documented in the new NSSpellServer.html (Foundation):

-(NSRange)spellServer:(NSSpellServer*)sender
findMisspelledWordInString:(NSString*)s language:(NSString*)language
wordCount:(int*)wordCount countOnly:(BOOL)countOnly;
-(NSArray*)spellServer:(NSSpellServer*)sender
suggestGuessesForWord:(NSString*)word inLanguage:(NSString*)language;

Do you have them in your documentation?

The only one thing outdated is the format of the Service Availability
Notice, which changed to Info plist. Here's mine for example:

=== cut here ===
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>CFBundleIdentifier</key>
<string>cz.ocs.OCSpeller</string>
<key>CFBundleName</key>
<string>OCSpeller</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>NOTE</key>
<string>Please, do NOT change this file -- It was generated by
ProjectBuilder.</string>
<key>NSBGOnly</key>
<string>1</string>
<key>NSExecutable</key>
<string>OCSpeller.daemon</string>
<key>NSExtensions</key>
<dict/>
<key>NSIcon</key>
<string>dummy.tiff</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSServices</key>
<array>
<dict>
<key>NSExecutable</key>
<string>OCSpeller.daemon</string>
<key>NSLanguages</key>
<array>
<string>Czech</string>
<string>Slovak</string>
</array>
<key>NSSpellChecker</key>
<string>OCSoftware</string>
</dict>
</array>
</dict>
</plist>
=== cut here ===
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc


  • Follow-Ups:
    • Re: Writing a custom spell service
      • From: Stefan Kreutter <email@hidden>
References: 
 >Writing a custom spell service (From: Stefan Kreutter <email@hidden>)

  • Prev by Date: Re: Writing a custom spell service
  • Next by Date: Re: Writing a custom spell service
  • Previous by thread: Re: Writing a custom spell service
  • Next by thread: Re: Writing a custom spell service
  • Index(es):
    • Date
    • Thread