home *** CD-ROM | disk | FTP | other *** search
Wrap
/*********** FactoryMethodConversion: Application *************/ replace "[<isKindOf(Application) app> new]" with "[<app> sharedApplication]" /*********** FactoryMethodConversion: Button *************/ replace "[<isKindOf(Button) class> newFrame:<frame> title:<title> tag:<tag> target:<target> action:<action> key:<key> enabled:<enabled>]" with "[[<class> alloc] initFrame:<frame> icon:<title> tag:<tag> target:<target> action:<action> key:<key> enabled:<enabled>]" replace "[<isKindOf(Button) class> newFrame:<frame> title:<title> tag:<tag> target:<target> action:<action> key:<key> enabled:<enabled>]" with "[[<class> alloc] initFrame:<frame> title:<title> tag:<tag> target:<target> action:<action> key:<key> enabled:<enabled>]" /*********** FactoryMethodConversion: Cell *************/ replace "[<isKindOf(Cell) class> newIconCell:<arg>]" with "[[<class> alloc] initIconCell:<arg>]" replace "[<isKindOf(Cell) class> newIconCell]" with "[[<class> alloc] init]" replace "[<isKindOf(Cell) class> newTextCell:<arg>]" with "[[<class> alloc] initTextCell:<arg>]" replace "[<isKindOf(Cell) class> newTextCell]" with "[[<class> alloc] init]" replace "[<isKindOf(Cell) class> new]" with "[[<class> alloc] init]" /*********** FactoryMethodConversion: ChoosePrinter *************/ replace "[<isKindOf(ChoosePrinter) app> new]" with "[<app> choosePrinter]" /*********** FactoryMethodConversion: FontPanel *************/ replace "[<isKindOf(FontPanel) app> new]" with "[<app> sharedFontPanel]" /*********** FactoryMethodConversion: FontManager *************/ replace "[<isKindOf(FontPanel) app> new]" with "[<app> sharedFontManager]" /*********** FactoryMethodConversion: Matrix *************/ replace "[<isKindOf(Matrix) class> newFrame:<frame> mode:<mode> prototype:<aCell> numRows:<rows> numCols:<cols>]]" with "[[<class> alloc] initFrame:<frame> mode:<mode> cellClass:<aCell> numRows:<rows> numCols:<cols>]]" replace "[<isKindOf(Matrix) class> newFrame:<frame> mode:<mode> prototype:<aCell> numRows:<rows> numCols:<cols>]]" with "[[<class> alloc] initFrame:<frame> mode:<mode> prototype:<aCell> numRows:<rows> numCols:<cols>]]" /*********** FactoryMethodConversion: Menu *************/ replace "[<isKindOf(Menu) class> newTitle:<arg>]" with "[[<class> alloc] initTitle:<arg>]" replace "[<isKindOf(Menu) class> new]" with "[[<class> alloc] init]" /*********** FactoryMethodConversion: NXBitmapImageRep *************/ replace "[<isKindOf(NXBitmapImageRep) class> newData:<data> pixelsWide:<width> pixelsHigh:<height> bitsPerSample:<bps> samplesPerPixel:<spp> hasAlpha:<alpha> isPlanar:<planar> colorSpace:<colorSpace> bytesPerRow:<bpr> bytesPerPixel:<bpr>]" with "[[<class> alloc] initData:<data> pixelsWide:<width> pixelsHigh:<height> bitsPerSample:<bps> samplesPerPixel:<spp> hasAlpha:<alpha> isPlanar:<planar> colorSpace:<colorSpace> bytesPerRow:<bpr> bytesPerPixel:<bpr>]" replace "[<isKindOf(NXBitmapImageRep) class> newData:<data> pixelsWide:<width> pixelsHigh:<height> bitsPerSample:<bps> samplesPerPixel:<spp> hasAlpha:<alpha> isPlanar:<planar> colorSpace:<colorSpace>]" with "[[<class> alloc] initData:<data> pixelsWide:<width> pixelsHigh:<height> bitsPerSample:<bps> samplesPerPixel:<spp> hasAlpha:<alpha> isPlanar:<planar> colorSpace:<colorSpace>]" replace "[<isKindOf(NXBitmapImageRep) class> newDataPlanes:<data> pixelsWide:<width> pixelsHigh:<height> bitsPerSample:<bps> samplesPerPixel:<spp> hasAlpha:<alpha> isPlanar:<planar> colorSpace:<colorSpace> bytesPerRow:<bpr> bytesPerPixel:<bpr>]" with "[[<class> alloc] initDataPlanes:<data> pixelsWide:<width> pixelsHigh:<height> bitsPerSample:<bps> samplesPerPixel:<spp> hasAlpha:<alpha> isPlanar:<planar> colorSpace:<colorSpace> bytesPerRow:<bpr> bytesPerPixel:<bpr>]" replace "[<isKindOf(NXBitmapImageRep) class> newFromFile:<arg>]" with "[[<class> alloc] initFromFile:<arg>]" replace "[<isKindOf(NXBitmapImageRep) class> newFromSection:<arg>]" with "[[<class> alloc] initFromSection:<arg>]" replace "[<isKindOf(NXBitmapImageRep) class> newFromStream:<arg>]" with "[[<class> alloc] initFromStream:<arg>]" /*********** FactoryMethodConversion: NXCachedImageRep *************/ replace "[<isKindOf(NXCachedImageRep) class> newFromWindow:<win> rect:<rect>]" with "[[<class> alloc] initFromWindow:<win> rect:<rect>]" /*********** FactoryMethodConversion: NXColorPanel *************/ replace "[<isKindOf(NXColorPanel) class> sharedInstance:NO]" with "([<class> sharedColorPanelExists] ? [NSColorPanel sharedColorPanel] : nil)" replace "[<isKindOf(NXColorPanel) app> sharedInstance:<flag>]" with "[<app> sharedColorPanel]" /*********** FactoryMethodConversion: NXCursor *************/ replace "[<isKindOf(NXCursor) class> newFromImage:<image>]" with "[[<class> alloc] initFromImage:<image>]" /*********** FactoryMethodConversion: NXCustomImageRep *************/ replace "[<isKindOf(NXCustomImageRep) class> newDrawMethod:<sel> inObject:<obj>]" with "[[<class> alloc] initDrawMethod:<sel> inObject:<obj>]" /*********** FactoryMethodConversion: NXDataLinkPanel *************/ replace "[<isKindOf(NXDataLinkPanel) app> new]" with "[<app> sharedDataLinkPanel]" /*********** FactoryMethodConversion: NXEPSImageRep *************/ replace "[<isKindOf(NXEPSImageRep) class> newFromFile:<arg>]" with "[[<class> alloc] initFromFile:<arg>]" replace "[<isKindOf(NXEPSImageRep) class> newFromSection:<arg>]" with "[[<class> alloc] initFromSection:<arg>]" replace "[<isKindOf(NXEPSImageRep) class> newFromStream:<arg>]" with "[[<class> alloc] initFromStream:<arg>]" /*********** FactoryMethodConversion: NXHelpPanel *************/ replace "[<isKindOf(NXHelpPanel) app> newForDirectory:<dir>]" with same error "FactoryMethods: NXHelpPanel is obsolete. Use NSHelpManager." replace "[<isKindOf(NXHelpPanel) app> new]" with same error "FactoryMethods: NXHelpPanel is obsolete. Use NSHelpManager." /*********** FactoryMethodConversion: NXImage *************/ replace "[<isKindOf(NXImage) class> newFromFile:<arg>]" with "[[<class> alloc] initFromFile:<arg>]" replace "[<isKindOf(NXImage) class> newFromImage:<image> rect:<rect>]" with "[[<class> alloc] initFromImage:<image> rect:<rect>]" replace "[<isKindOf(NXImage) class> newFromSection:<arg>]" with "[[<class> alloc] initFromSection:<arg>]" replace "[<isKindOf(NXImage) class> newFromStream:<arg>]" with "[[<class> alloc] initFromStream:<arg>]" replace "[<isKindOf(NXImage) class> newSize:<size>]" with "[[<class> alloc] initSize:<size>]" replace "[<isKindOf(NXImage) class> new]" with "[[<class> alloc] init]" /*********** FactoryMethodConversion: NXSpellChecker *************/ replace "[<isKindOf(NXSpellChecker) class> sharedInstance:NO]" with "([<class> sharedSpellCheckerExists] ? [NSColorPanel sharedSpellChecker] : nil)" replace "[<isKindOf(NXSpellChecker) app> sharedInstance:<flag>]" with "[<app> sharedSpellChecker]" /*********** FactoryMethodConversion: OpenPanel *************/ replace "[<isKindOf(OpenPanel) app> new]" with "[<app> openPanel]" warning "FactoryMethods: [<app> openPanel] used to be [<app> new]. Open panels are no longer shared. 'openPanel' returns a new, autoreleased open panel in the default configuration. To maintain state, retain and reuse one open panel (or manually re-set the state each time.)" /*********** FactoryMethodConversion: PageLayout *************/ replace "[<isKindOf(PageLayout) app> new]" with "[<app> pageLayout]" /*********** FactoryMethodConversion: Pasteboard *************/ replace "[<isKindOf(Pasteboard) app> newByFilteringData:<data> ofType:<type>]" with "[<app> pasteboardByFilteringData:<data> ofType:<type>]" replace "[<isKindOf(Pasteboard) app> newByFilteringFile:<filename>]" with "[<app> pasteboardByFilteringFile:<filename>]" replace "[<isKindOf(Pasteboard) app> newByFilteringTypesInPasteboard:<pboard>]" with "[<app> pasteboardByFilteringTypesInPasteboard:<pboard>]" replace "[<isKindOf(Pasteboard) app> newName:<name>]" with "[<app> pasteboardWithName:<name>]" replace "[<isKindOf(Pasteboard) app> newUnique]" with "[<app> pasteboardWithUniqueName]" replace "[<isKindOf(Pasteboard) app> new]" with "[<app> generalPasteboard]" /*********** FactoryMethodConversion: PrintPanel *************/ replace "[<isKindOf(PrintPanel) app> new]" with "[<app> printPanel]" /*********** FactoryMethodConversion: SavePanel *************/ replace "[<isKindOf(SavePanel) app> new]" with "[<app> savePanel]" warning "FactoryMethods: [<app> savePanel] used to be [<app> new]. Save panels are no longer shared. 'savePanel' returns a new, autoreleased save panel in the default configuration. To maintain state, retain and reuse one save panel (or manually re-set the state each time.)" /*********** FactoryMethodConversion: Text *************/ replace "[<isKindOf(Text) class> newFrame:<frame> text:<text> alignment:<align>]" with "[[<class> alloc] initFrame:<frame> text:<text> alignment:<align>]" /*********** FactoryMethodConversion: View *************/ replace "[<isKindOf(View) class> newFrame:<frame>]" with "[[<class> alloc] initFrame:<frame>]" replace "[<isKindOf(View) class> new]" with "[[<class> alloc] init]" /*********** FactoryMethodConversion: Window *************/ replace "[<isKindOf(Window) class> newContent:<content> style:<style> backing:<type> buttonMask:<mask> defer:<flag> screen:<screen>]" with "[[<class> alloc] initContent:<content> style:<style> backing:<type> buttonMask:<mask> defer:<flag> screen:<screen>]" replace "[<isKindOf(Window) class> newContent:<content> style:<style> backing:<type> buttonMask:<mask> defer:<flag>]" with "[[<class> alloc] initContent:<content> style:<style> backing:<type> buttonMask:<mask> defer:<flag>]" /*********** FactoryMethodConversion: Declarations and implementations *************/ replace "[<obj> new]" with "[<obj> CONVERSIONnew]" replace "[<obj> sharedInstance:" with "[<obj> CONVERSIONsharedInstance:" replace "[<obj> newUnique]" with "[<obj> CONVERSIONnewUnique]" replace "[<obj> newName:" with "[<obj> CONVERSIONnewName:" replace "@<intOrImp><w w><isKindOf(Application) class><w w1><any code><w w2>@end" with same within ("<code>") { replacemethod "new" with "sharedApplication" } where "<intOrImp>" isOneOf { "interface", "implementation" } replace "@<intOrImp><w w><isKindOf(ChoosePrinter) class><w w1><any code><w w2>@end" with same within ("<code>") { replacemethod "new" with "choosePrinter" } where "<intOrImp>" isOneOf { "interface", "implementation" } replace "@<intOrImp><w w><isKindOf(NXDataLinkPanel) class><w w1><any code><w w2>@end" with same within ("<code>") { replacemethod "new" with "sharedDataLinkPanel" } where "<intOrImp>" isOneOf { "interface", "implementation" } replace "@<intOrImp><w w><isKindOf(FontPanel) class><w w1><any code><w w2>@end" with same within ("<code>") { replacemethod "new" with "sharedFontPanel" } where "<intOrImp>" isOneOf { "interface", "implementation" } replace "@<intOrImp><w w><isKindOf(FontManager) class><w w1><any code><w w2>@end" with same within ("<code>") { replacemethod "new" with "sharedFontManager" } where "<intOrImp>" isOneOf { "interface", "implementation" } replace "@<intOrImp><w w><isKindOf(NXColorPanel) class><w w1><any code><w w2> @end" with same within ("<code>") { replacemethod "sharedInstance:" with "sharedColorPanel" } where "<intOrImp>" isOneOf { "interface", "implementation" } replace "@<intOrImp><w w><isKindOf(OpenPanel) class><w w1><any code><w w2>@end" with same within ("<code>") { replacemethod "new" with "openPanel" } where "<intOrImp>" isOneOf { "interface", "implementation" } replace "@<intOrImp><w w><isKindOf(PageLayout) class><w w1><any code><w w2>@end" with same within ("<code>") { replacemethod "new" with "pageLayout" } where "<intOrImp>" isOneOf { "interface", "implementation" } replace "@<intOrImp><w w><isKindOf(Pasteboard) class><w w1><any code><w w2>@end" with same within ("<code>") { replacemethod "new" with "generalPasteboard" replacemethod "newByFilteringData:ofType:" with "pasteboardByFilteringData:ofType:" replacemethod "newByFilteringTypesInPasteboard:" with "pasteboardByFilteringTypesInPasteboard:" replacemethod "newByFilteringFile:" with "pasteboardByFilteringFile:" replacemethod "newName:" with "pasteboardWithName:" replacemethod "newUnique" with "pasteboardWithUniqueName" } where "<intOrImp>" isOneOf { "interface", "implementation" } replace "@<intOrImp><w w><isKindOf(SavePanel) class><w w1><any code><w w2>@end" with same within ("<code>") { replacemethod "new" with "savePanel" } where "<intOrImp>" isOneOf { "interface", "implementation" } replace "@<intOrImp><w w><isKindOf(NXSpellChecker) class><w w1><any code><w w2>@end" with same within ("<code>") { replacemethod "sharedInstance" with "sharedSpellChecker" } where "<intOrImp>" isOneOf { "interface", "implementation" } replace "@<intOrImp><w w><isKindOf(PrintPanel) class><w w1><any code><w w2>@end" with same within ("<code>") { replacemethod "new" with "printPanel" } where "<intOrImp>" isOneOf { "interface", "implementation" } replace "CONVERSIONnew" with "new" replace "CONVERSIONnewName" with "newName" replace "CONVERSIONnewUnique" with "newUnique" replace "CONVERSIONsharedInstance" with "sharedInstance"