home *** CD-ROM | disk | FTP | other *** search
Wrap
/*********** GeneralAPIConversion: simple name changes ***********/ replacemethod "<old>" with "<new>" where ("<old>", "<new>") isOneOf { ("addCol", "addColumn"), ("addSubview::relativeTo:", "addSubview:positioned:relativeTo:"), ("allocFromZone:", "allocWithZone:"), ("allowMultipleFiles:", "setAllowsMultipleFiles:"), ("allowsMultipleFiles", "allowsMultipleSelection"), ("altImage", "alternateImage"), ("altTitle", "alternateTitle"), ("areLinksVerifiedByDelegate", "delegateVerifiesLinks"), ("becomeActiveApp", "becomeActiveApplication"), ("boundsAngle", "boundsRotation"), ("calcTargetForAction:", "targetForAction:"), ("cellAt::", "cellAtRow:column:"), ("cellFrameAt::", "cellFrameAtRow:column:"), ("clearSelectedCell", " deselectSelectedCell"), ("columnOf:", "columnOfMatrix:"), ("columnsAreSeparated", "separatesColumns"), ("constrainScroll:", "constrainScrollPoint:"), ("defaultParaStyle", "defaultParagraphStyle"), ("destinationAppName", "destinationApplicationName"), ("dividerHeight", "dividerThickness"), ("docView", "documentView"), ("docVisibleRect", "documentVisibleRect"), ("documentClosed", "noteDocumentClosed"), ("documentEdited", "noteDocumentEdited"), ("documentReverted", "noteDocumentReverted"), ("documentSaved", "noteDocumentSaved"), ("documentSavedAs:", "noteDocumentSavedAs:"), ("documentSavedTo:", "noteDocumentSavedTo:"), ("doesAutosizeCells", "autosizesCells"), ("doesBecomeKeyOnlyIfNeeded", "becomesKeyOnlyIfNeeded"), ("doesHideOnDeactivate", "hidesOnDeactivate"), ("doesShowAlpha", "showsAlpha"), ("doesTreatFilePackagesAsDirectories", "treatsFilePackagesAsDirectories"), ("drawArrow::", "drawArrow:highlight:"), ("drawCellAt::", "drawCellAtRow:column:"), ("drawDivider:", "drawDividerInRect:") } replacemethod "<old>" with "<new>" where ("<old>", "<new>") isOneOf { ("edit:inView:editor:delegate:event:", "editWithFrame:inView:editor:delegate:event:"), ("findAncestorSharedWith:", "ancestorSharedWithView:"), ("findAvailableTypeFrom:", "availableTypeFromArray:"), ("findCellWithTag:", "cellWithTag:"), ("findDestinationLinkWithSelection:", "destinationLinkWithSelection:"), ("findFont:traits:weight:size:", "fontWithFamily:traits:weight:size:"), ("findIndexWithTag:", "indexOfCellWithTag:"), ("findViewWithTag:", "viewWithTag:"), ("freeGState", "releaseGState"), ("freeGlobally", "releaseGlobally"), ("getFieldEditor:for:", "fieldEditor:forObject:"), ("getLink:andManager:isMultiple:", "getLink:manager:isMultiple:"), ("getLoadedCellAtRow:inColumn:", "loadedCellAtRow:column:"), ("getNumRows:numCols:", "getNumberOfRows:columns:"), ("getParameter:", "cellAttribute:"), ("getPeriodicDelay:andInterval:", "getPeriodicDelay:interval:"), ("getRow:andCol:forPoint:", "getRow:column:forPoint:"), ("getRow:andCol:ofCell:", "getRow:column:ofCell:"), ("getSel::", "getSelectionStart:end:"), ("getTitleFromPreviousColumn:", "setTakesTitleFromPreviousColumn:"), ("getWordsInDictionary:", "wordsInDictionary:"), ("horizPagination", "horizontalPagination"), ("horizScroller", "horizontalScroller"), ("ignoreMultiClick:", "setIgnoresMultiClick:") } replacemethod "<old>" with "<new>" where ("<old>", "<new>") isOneOf { ("initFrame:mode:cellClass:numRows:numCols:", "initWithFrame:mode:cellClass:numberOfRows:numberOfColumns:"), ("initFrame:mode:cellClass:numRows:numCols:", "initWithFrame:mode:prototype:numberOfRows:numberOfColumns:"), ("initFrame:mode:prototype:numRows:numCols:", "initWithFrame:mode:prototype:numberOfRows:numberOfColumns:"), ("initFrame:mode:prototype:numRows:numCols:", "initWithFrame:mode:prototype:numberOfRows:numberOfColumns:"), ("initFrame:text:alignment:", "initWithFrame:text:alignment:"), ("initFromFile:", "initWithContentsOfFile:"), ("initFromImage:", "initWithImage:"), ("initFromPasteboard:", "initWithPasteboard:") ("initFromPickerMask:withColorPanel:", "initWithPickerMask:colorPanel:"), ("initGState", "setUpGState"), ("initSize:", "initWithSize:"), ("initTitle:", "initWithTitle:"), ("insertColAt:", "insertColumn:"), ("insertRowAt:", "insertRow:"), ("intercell", " intercellSpacing"), ("isBranchSelectionEnabled", "allowsBranchSelection"), ("isClickForHelpEnabled", "clickForHelpAllowed"), ("isDocEdited", "isDocumentEdited"), ("isEmptySelectionEnabled", "allowsEmptySelection"), ("isFontPanelEnabled", "usesFontPanel"), ("isGraphicsImportEnabled", "importsGraphics"), ("isHorizCentered", "isHorizontallyCentered"), ("isHorizontalScrollerEnabled", "hasHorizontalScroller"), ("isMultipleSelectionEnabled", "allowsMultipleSelection"), ("isVertCentered", "isVerticallyCentered"), ("makeCellAt::", "makeCellAtRow:column:"), ("numLinks", "numberOfLinks"), ("numVisibleColumns", "numberOfVisibleColumns"), ("panel:compareFilenames::checkCase:", "panel:compareFilename:with:caseSensitive:"), ("putCell:at::", "putCell:atRow:column:") } replacemethod "<old>" with "<new>" where ("<old>", "<new>") isOneOf { ("rawScroll:", "scrollToPoint:"), ("reenableFlushWindow", "enableFlushWindow"), ("reflectScroll:", "reflectScrolledClipView:"), ("registerServicesMenuSendTypes:andReturnTypes:", "registerServicesMenuSendTypes:returnTypes:"), ("renewRows:cols:", "renewRows:columns:"), ("resignActiveApp", "resignActiveApplication"), ("reuseColumns:", "setReusesColumns:"), ("runModalFor:", "runModalForWindow:"), ("scrollCellToVisible::", "scrollCellToVisibleAtRow:column:"), ("scrollClip:to:", "scrollClipView:toPoint:"), ("select:inView:editor:delegate:start:length:", "selectWithFrame:inView:editor:delegate:start:length:"), ("selectCellAt::", "selectCellAtRow:column:"), ("selectTextAt::", "selectTextAtRow:column:"), ("selectedCol", "selectedColumn"), ("separateColumns:", "setSeparatesColumns:"), ("setAllowsMultipleFiles:", "setAllowsMultipleSelection:"), ("setAltImage:", " setAlternateImage:"), ("setAltTitle:", " setAlternateTitle:"), ("setAutosizeCells:", "setAutosizesCells:"), ("setBecomeKeyOnlyIfNeeded:", "setBecomesKeyOnlyIfNeeded:"), ("setBranchSelectionEnabled:", "setAllowsBranchSelection:"), ("setClickForHelpEnabled:", "setClickForHelpAllowed:"), ("setCopyOnScroll:", "setCopiesOnScroll:"), ("setDocCursor:", "setDocumentCursor:"), ("setDocEdited:", "setDocumentEdited:"), ("setDocView:", "setDocumentView:"), ("setDynamicScrolling:", "setScrollsDynamically:"), ("setEmptySelectionEnabled:", "setAllowsEmptySelection:") } replacemethod "<old>" with "<new>" where ("<old>", "<new>") isOneOf { ("setFloatValue::", "setFloatValue:knobProportion:"), ("setFont:paraStyle:", "setFont:paragraphStyle:"), ("setFreeWhenClosed:", "setReleasedWhenClosed:"), ("setGraphicsImportEnabled:", "setImportsGraphics:"), ("setHideOnDeactivate:", "setHidesOnDeactivate:"), ("setHorizCentered:", "setHorizontallyCentered:"), ("setHorizPagination:", "setHorizontalPagination:"), ("setHorizScroller:", "setHorizontalScroller:"), ("setHorizScrollerRequired:", "setHasHorizontalScroller:"), ("setHorizontalScrollerEnabled:", "setHasHorizontalScroller:"), ("setImage:at::", "setImage:atRow:column:"), ("setIntercell:", " setIntercellSpacing:"), ("setInterline:", " setInterlineSpacing:"), ("setLink:andManager:isMultiple:", "setLink:manager:isMultiple:"), ("setLinksVerifiedByDelegate:", "setDelegateVerifiesLinks:"), ("setMultipleSelectionEnabled:", "setAllowsMultipleSelection:"), ("setParaStyle:", "setParagraphStyle:"), ("setParameter:to:", "setCellAttribute:to:"), ("setPeriodicDelay:andInterval:", "setPeriodicDelay:interval:"), ("setSelectionFrom:to:anchor:lit:", "setSelectionFrom:to:anchor:highlight:"), ("setShowAlpha:", "setShowsAlpha:"), ("setState:at::", "setState:atRow:column:"), ("setTitle:at::", "setTitle:atRow:column:"), ("setVertCentered:", "setVerticallyCentered:"), ("setVertPagination:", "setVerticalPagination:"), ("setVertScroller:", "setVerticalScroller:"), ("setVertScrollerRequired:", "setHasVerticalScroller:"), ("sourceAppName", "sourceApplicationName"), ("sourceEdited", "noteSourceEdited"), ("splitView:getMinY:maxY:ofSubviewAt:", "splitView:constrainMinCoordinate:maxCoordinate:ofSubviewAt:"), ("textDelegate", "delegate"), ("setTextDelegate:", "setDelegate:"), ("validRequestorForSendType:andReturnType:", "validRequestorForSendType:returnType:"), ("validateSize:", "setValidateSize:"), ("vertPagination", "verticalPagination"), ("vertScroller", "verticalScroller"), ("windowNum", "windowNumber"), } /*********** GeneralAPIConversion: init methods ***********/ replace "<t object> = [[<b alloc>] initFrame:<rect> image:<image> tag:<tag> target:<target> action:<sel> key:<key> enabled:<flag>];" with "{ <t object> = [[<b alloc>] initWithFrame:<rect>]; [<t object> setImage:<image>]; [<t object> setTag:<tag>]; [<t object> setTarget:<target>]; [<t object> setAction:<sel>]; [<t object> setKeyEquivalent:<key>]; [<t object> setEnabled:<flag>]; }" replace "<t object> = [[<b alloc>] initFrame:<rect> title:<title> tag:<tag> target:<target> action:<sel> key:<key> enabled:<flag>];" with "{ <t object> = [[<b alloc>] initWithFrame:<rect>]; [<t object> setTitle:<title>]; [<t object> setTag:<tag>]; [<t object> setTarget:<target>]; [<t object> setAction:<sel>]; [<t object> setKeyEquivalent:<key>]; [<t object> setEnabled:<flag>]; }" /*********** GeneralAPIConversion: open panel, save panel ***********/ replacemethod "panel:filterFile:inDirectory:" with "panel:shouldShowFilename:" warning "GeneralNamingConversion: 'panel:shouldShowFilename:' (used to be 'panel:filterFile:inDirectory') takes an absolute path ; directory is no longer passed in" replacemethod "filenames" with same warning "GeneralNamingConversion: 'filenames' now returns absolute paths" replacemethod "panelValidateFilenames:" with "panel:isValidFilename:<file>" { replace "<file_type>" with "(NSString *)" replace "<file_param>" with "_file" replace "<file_arg>" with "FILENEEDED" } within ("<implementation>") { replace "[<sender_param filename]" with "_file" } replacemethod "chooseDirectories" with "setCanChooseFiles:<flag>" { replace "<flag_arg>" with "!<flag_arg>" } within ("<implementation>") { replace "<flag_param>" with "!<flag_param>" } /*********** GeneralAPIConversion: NSBox ***********/ replace "@interface <isKindOf(NSBox)<w w1><any interface><w w2>@end" with same within ("<interface>") { replacemethod "update" with same error "GeneralNamingConversion: The View 'update' method is obsolete" } /*********** GeneralAPIConversion: NSMatrix ***********/ replace "[<matrix> removeRowAt:<row> andFree:<flag>]" with "[<matrix> removeRow:<row>]" warning "GeneralNamingConversion: The old andFree:<flag> argument no longer exists; now the removed cell is released. You might want to assure that this is the correct behavior." replace "[<matrix> removeColAt:<row> andFree:<flag>]" with "[<matrix> removeCol:<row>]" warning "GeneralNamingConversion: The old andFree:<flag> argument no longer exists; now the removed cell is released. You might want to assure that this is the correct behavior." /*********** GeneralAPIConversion: other method changes ***********/ replace "[<obj> draggedImageCopy]" with "[[<obj> draggedImage] retain]" replacemethod "isDraggingSourceLocal" with same error "GeneralNamingConversion: 'isDraggingSourceLocal' is obsolete. draggingSource returns nil if the dragging source is not local." replacemethod "highlightCellAt:<row> :<col> lit:<flag>" with "highlightCell:<flag> atRow:<row> column:<col>" /*********** GeneralAPIConversion: obsolete methods ***********/ replacemethod "isClickForHelpEnabled" with same error "GeneralNamingConversion: 'isClickForHelpEnabled' is obsolete. This feature is now always enabled (ctr+alt on black hardware and F1 on white hardware)." replacemethod "setClickForHelpEnabled:" with same error "GeneralNamingConversion: 'setClickForHelpEnabled:' is obsolete. This feature is now always enabled (ctr+alt on black hardware and F1 on white hardware)." /*********** GeneralAPIConversion: nextstd.h ***********/ replace "NX_MALLOC(<var>, <type>, <num>)" with "<var> = malloc((<num>) * sizeof(<type>))" replace "NX_REALLOC(<var>, <type>, <num>)" with "<var> = realloc(<var>, (<num>) * sizeof(<type>))" replace "NX_FREE" with "free" replace "NX_ZONEMALLOC(<b zone>, <b var>, <b type>, <b num>)" with "<b var> = NSZoneMalloc(<b zone>, (<b num>) * sizeof(<b type>))" replace "NX_ZONEREALLOC(<b zone>, <b var>, <b type>, <b num>)" with "<b var> = NSZoneRealloc(<b zone>, <b var>, (<b num>) * sizeof(<b type>))" replace "NX_ZONEREALLOC" with same warning "GeneralNamingConversion: This occurrence of NX_ZONEREALLOC could not be replaced with NSZoneMalloc and needs intervention." replace "NX_ZONEMALLOC" with same warning "GeneralNamingConversion: This occurrence of NX_ZONEMALLOC could not be replaced with NSZoneMalloc and needs intervention." replace "NX_ASSERT(<exp>, <string str>);" with "NSAssert(<exp>, @<str>);" replace "NX_ASSERT(<exp>, <exp str>);" with "NSAssert1(<exp>, @\"%@\", <str>);" /*********** GeneralAPIConversion: file name changes ***********/ replace "\"colorPicking.h\"" with "\"NSColorPicking.h\"" replace "<AppKit/colorPicking.h>" with "<AppKit/NSColorPicking.h>" replace "\"drag.h\"" with "\"NSDragging.h\"" replace "<AppKit/drag.h>" with "<AppKit/NSDragging.h>" replace "\"errors.h\"" with "\"NSErrors.h\"" replace "<AppKit/errors.h>" with "<AppKit/NSErrors.h>" replace "\"readOnlyTextStream.h\"" with "\"NSReadOnlyTextStream.h\"" replace "<AppKit/readOnlyTextStream.h>" with "<AppKit/NSReadOnlyTextStream.h>" replace "\"workspaceRequest.h\"" with "\"NSWorkspace.h\"" replace "<AppKit/workspaceRequest.h>" with "<AppKit/NSWorkspace.h>" replace "#include \"timer.h\"" with "/*#include \"timer.h\"*/" replace "#include <AppKit/timer.h>" with "/*#include <AppKit/timer.h>*/" replace "#include \"nextstd.h\"" with "/*#include \"nextstd.h\"*/" replace "#include <AppKit/nextstd.h>" with "/*#include <AppKit/nextstd.h>*/" replace "#import \"timer.h\"" with "/*#import \"timer.h\"*/" replace "#import <AppKit/timer.h>" with "/*#import <AppKit/timer.h>*/" replace "#import \"nextstd.h\"" with "/*#import \"nextstd.h\"*/" replace "#import <AppKit/nextstd.h>" with "/*#import <AppKit/nextstd.h>*/" /*********** GeneralAPIConversion: an obsolete type ***********/ replace "<unitName>" with same error "GeneralNamingConversion: The 'NXMeasurementUnit' type and <unitName> are obsolete. You can get the users unit preference by reading the 'NSMeasurementUnit' default." where "<unitName>" isOneOf { "NSInchUnit", "NSCentimeterUnit", "NSPointUnit", "NSPicaUnit" } /*********** GeneralAPIConversion: architecture/byte_order.h ***********/ replace "#import <architecture/byte_order.h>" with "#import <Foundation/NSByteOrder.h>" replace "#include <architecture/byte_order.h>" with "#import <Foundation/NSByteOrder.h>" replace "NXByteOrder" with "NSByteOrder" replace "NX_UnknownByteOrder" with "NS_UnknownByteOrder" replace "NX_LittleEndian" with "NS_LittleEndian" replace "NX_BigEndian" with "NS_BigEndian" replace "NXSwappedFloat" with "NSSwappedFloat" replace "NXSwappedDouble" with "NSSwappedFloat" replace "NXHostByteOrder" with "NSHostByteOrder" replace "NXSwapBigShortToHost" with "NSSwapBigShortToHost" replace "NXSwapBigIntToHost" with "NSSwapBigIntToHost" replace "NXSwapBigLongToHost" with "NSSwapBigLongToHost" replace "NXSwapBigLongLongToHost" with "NSSwapBigLongLongToHost" replace "NXSwapBigDoubleToHost" with "NSSwapBigDoubleToHost" replace "NXSwapBigFloatToHost" with "NSSwapBigFloatToHost" replace "NXSwapHostShortToBig" with "NSSwapHostShortToBig" replace "NXSwapHostIntToBig" with "NSSwapHostIntToBig" replace "NXSwapHostLongToBig" with "NSSwapHostLongToBig" replace "NXSwapHostLongLongToBig" with "NSSwapHostLongLongToBig" replace "NXSwapHostDoubleToBig" with "NSSwapHostDoubleToBig" replace "NXSwapHostFloatToBig" with "NSSwapHostFloatToBig" replace "NXSwapLittleShortToHost" with "NSSwapLittleShortToHost" replace "NXSwapLittleIntToHost" with "NSSwapLittleIntToHost" replace "NXSwapLittleLongToHost" with "NSSwapLittleLongToHost" replace "NXSwapLittleLongLongToHost" with "NSSwapLittleLongLongToHost" replace "NXSwapLittleDoubleToHost" with "NSSwapLittleDoubleToHost" replace "NXSwapLittleFloatToHost" with "NSSwapLittleFloatToHost" replace "NXSwapHostShortToLittle" with "NSSwapHostShortToLittle" replace "NXSwapHostLongToLittle" with "NSSwapHostLongToLittle" replace "NXSwapHostLongLongToLittle" with "NSSwapHostLongLongToLittle" replace "NXSwapHostDoubleToLittle" with "NSSwapHostDoubleToLittle" replace "NXSwapHostFloatToLittle" with "NSSwapHostFloatToLittle" replace "NXSwapBigShortToHost" with "NSSwapBigShortToHost" replace "NXSwapBigIntToHost" with "NSSwapBigIntToHost" replace "NXSwapBigLongToHost" with "NSSwapBigLongToHost" replace "NXSwapBigLongLongToHost" with "NSSwapBigLongLongToHost" replace "NXSwapBigDoubleToHost" with "NSSwapBigDoubleToHost" replace "NXSwapBigFloatToHost" with "NSSwapBigFloatToHost" replace "NXSwapHostShortToBig" with "NSSwapHostShortToBig" replace "NXSwapHostIntToBig" with "NSSwapHostIntToBig" replace "NXSwapHostLongToBig" with "NSSwapHostLongToBig" replace "NXSwapHostLongLongToBig" with "NSSwapHostLongLongToBig" replace "NXSwapHostDoubleToBig" with "NSSwapHostDoubleToBig" replace "NXSwapHostFloatToBig" with "NSSwapHostFloatToBig" replace "NXSwapLittleShortToHost" with "NSSwapLittleShortToHost" replace "NXSwapLittleIntToHost" with "NSSwapLittleIntToHost" replace "NXSwapLittleLongToHost" with "NSSwapLittleLongToHost" replace "NXSwapLittleLongLongToHost" with "NSSwapLittleLongLongToHost" replace "NXSwapLittleDoubleToHost" with "NSSwapLittleDoubleToHost" replace "NXSwapLittleFloatToHost" with "NSSwapLittleFloatToHost" replace "NXSwapHostShortToLittle" with "NSSwapHostShortToLittle" replace "NXSwapHostIntToLittle" with "NSSwapHostIntToLittle" replace "NXSwapHostLongToLittle" with "NSSwapHostLongToLittle" replace "NXSwapHostLongLongToLittle" with "NSSwapHostLongLongToLittle" replace "NXSwapHostDoubleToLittle" with "NSSwapHostDoubleToLittle" replace "NXConvertSwappedDoubleToHost" with "NSConvertSwappedDoubleToHost" replace "NXConvertSwappedFloatToHost" with "NSConvertSwappedFloatToHost" replace "NXConvertHostDoubleToSwapped" with "NSConvertHostDoubleToSwapped" replace "NXConvertHostFloatToSwapped" with "NSConvertHostFloatToSwapped" replace "NXSwapShort" with "NSSwapShort" replace "NXSwapInt" with "NSSwapInt" replace "NXSwapLong" with "NSSwapLong" replace "NXSwapLongLong" with "NSSwapLongLong" replace "NXSwapDouble" with "NSSwapDouble" replace "NXSwapFloat" with "NSSwapFloat" /*********** GeneralAPIConversion: NSAlert ***********/ replace "NSRunLocalizedAlertPanel(<table>, <title>, <msg>, <defaultButton>, <alternateButton>, <otherButton>, <b args>)" with "NSRunAlertPanel(<title>, <msg>, <defaultButton>, <alternateButton>, <otherButton>, <b args>)" warning "GeneralNamingConversion: NSRunLocalizedAlertPanel is obsolete, and has been converted to NSRunAlertPanel. You may need to localize the arguments using the StringTable <table>."