home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / OpenStepConversion / ConversionScripts / SpellCheckerConversion.tops < prev    next >
Encoding:
Text File  |  1995-07-14  |  3.9 KB  |  88 lines

  1. /*********** SpellCheckerConversion: NXReadOnlyTextStream protocol ***********/
  2.  
  3. replace "NXReadOnlyTextStream" with same
  4.     error "SpellCheckerConversion:  NXReadOnlyTextStream is obsolete.  Spell checking is now based on NSString."
  5.  
  6. replacemethod "<sel>" with same
  7.     error "SpellCheckerConversion:  NXReadOnlyTextStream is obsolete.  Spell checking is now based on NSString"
  8.     where "<sel>" isOneOf  {
  9.     "openTextStream", 
  10.     "closeTextStream", 
  11.     "currentCharacterOffset", 
  12.     "isAtEOTS", 
  13.     "readCharacters:count:", 
  14.     "seekToCharacterAt:relativeTo:", 
  15.     }
  16.  
  17. /*********** SpellCheckerConversion: NXSelectText protocol ***********/
  18.  
  19. replace "NXSelectText" with same
  20.     error "SpellCheckerConversion:  NSSelectText is obsolete.  Spell checking clients are now responsible for selecting misspelled words"
  21.  
  22. replacemethod "<sel>" with same
  23.     error "SpellCheckerConversion:  <sel> is obsolete.  Spell checking clients are now responsible for selecting misspelled words"
  24.     where "<sel>" isOneOf  {
  25.     "makeSelectionVisible", 
  26.     "readCharactersFromSelection:count:", 
  27.     "selectCharactersFrom:to:",
  28.     "selectionCharacterCount"
  29.     }
  30.  
  31. /*********** SpellCheckerConversion: NXIgnoreMisspelledWords protocol ***********/
  32.  
  33. replace "- (int)spellDocumentTag<w w>{<scope body>}"
  34. with "- (int)spellDocumentTag<w w>{<scope body>}
  35.  
  36. - (void)ignoreSpelling:(id)sender<w w>{
  37.     [[NSSpellChecker sharedSpellChecker] ignoreWord:[sender stringValue] inSpellDocumentWithTag:[self spellDocumentTag]];
  38. }"
  39.  
  40. /*********** SpellCheckerConversion: NXSpellChecker class ***********/
  41.  
  42. replace "NXSpellCheckMode" with same
  43.     error "SpellCheckerConversion:  NXSpellCheckMode is obsolete"
  44.  
  45. replacemethod "<sel>" with same
  46.     error "SpellCheckerConversion:  -[NXSpellChecker <sel>] is obsolete; use -[NSSpellChecker checkSpellingOfString:startingAt:] instead."
  47.     where "<sel>" isOneOf {
  48.         "checkSpelling:of:",
  49.     }
  50.  
  51. replacemethod "<sel>" with same
  52.     error "SpellCheckerConversion:  -[NXSpellChecker <sel>] is obsolete; use -[NSSpellChecker checkSpellingOfString:startingAt:language:wrap:spellDocument:wordCount:] instead."
  53.     where "<sel>" isOneOf {
  54.     "checkSpelling:of:wordCount:"
  55.     }
  56.  
  57. replacemethod "closeSpellDocument:" with "closeSpellDocumentWithTag:"
  58.  
  59. replacemethod "ignoredWordsForSpellDocument:" with "ignoredWordsInSpellDocumentWithTag:" {
  60.     replace "<rettype>" with "(NSArray *)"
  61.     }
  62.     error "SpellCheckerConversion: 'ignoredWordsInSpellDocumentWithTag:' (used to be 'ignoredWordsForSpellDocument') now returns NSArray of NSStrings (used to return char **)"
  63.  
  64. replacemethod "setIgnoreWords:<1> forSpellDocument:" with "setIgnoredWords:<1> inSpellDocumentWithTag:" {
  65.     replace "<1_type>" with "(NSArray *)"
  66.     }
  67.     error "SpellCheckerConversion: 'setIgnoredWords:inSpellDocumentWithTag:' (used to be 'setIgnoreWords:forSpellDocument:') now takes NSArray of NSStrings as first argument (used to take char **)"
  68.    
  69. /*********** SpellCheckerConversion: NXSpellServer delegate methods ***********/
  70.  
  71. replacemethod "addGuess:" with same
  72.     error "SpellCheckerConversion:  'addGuess' is obsolete.  'spellServer:suggestGuessesForWord:inLanguage:' returns an NSArray of guesses directly"
  73.     
  74. replacemethod "spellServer:findMisspelledWord:length:inLanguage:inTextStream:startingAt:wordCount:countOnly:" with same
  75.     error "SpellCheckerConversion:  change to 'spellServer:findMisspelledWordInString:language:wordCount:countOnly:'"
  76.     
  77. replacemethod "spellServer:suggestGuessesForWord:inLanguage:" with same {
  78.     replace "<rettype>" with "(NSArray *)"
  79.     }
  80.     error "SpellCheckerConversion:  'spellServer:suggestGuessesForWord:inLanguage:' now returns an NSArray of NSString containing the guesses (used to return void)"
  81.  
  82. /*********** SpellCheckerConversion: name changes ***********/
  83.  
  84. replacemethod "<old>" with "<new>"
  85.     where ("<old>", "<new>") isOneOf {
  86.     ("setWordFieldValue:", "setWordFieldStringValue:"),
  87.     ("isInUserDictionary:caseSensitive:", "isWordInUserDictionaries:caseSensitive:")
  88.     }