home *** CD-ROM | disk | FTP | other *** search
- /*********** InterfaceBuilder.h tops conversion script ***********/
-
- replace "\<apps/InterfaceBuilder.h>" with "<InterfaceBuilder/InterfaceBuilder.h>"
- replace "\<Apps/InterfaceBuilder.h>" with "<InterfaceBuilder/InterfaceBuilder.h>"
-
- replacemethod "<sel>" with same {
- replace "<notification_type>" with "(NSNotification *)"
- replace "<notification_param>" with "notification"
- replace "<implementation>" with "id <IBDocuments> *aDocument = [notification object];
- <implementation>"
- }
- within ("<implementation>") {
- replace "<notification_param>" with "aDocument"
- }
- where "<sel>" isOneOf {
- "didOpenDocument:<notification>",
- "willSaveDocument:<notification>",
- "didSaveDocument:<notification>",
- }
-
- replace "- <mtype rettype> <b old>" with "<b new>"
- where ("<old>", "<new>") isOneOf {
- ("didOpenDocument:", "- (void)didOpenDocument:")
- ("willSaveDocument:", "- (void)willSaveDocument:")
- ("didSaveDocument:", "- (void)didSaveDocument:")
- ("finishInstantiate", "- (void)finishInstantiate")
- }
-
- replacemethod "<sel>" with same {
- replace "<rettype>" with "(void)"
- } within ("<implementation>") {
- replace "return self;" with "return;"
- replace "return super;" with "return;"
- replace "return (self)" with "return;"
- } where "<sel>" isOneOf {
- "didOpenDocument:"
- "willSaveDocument:"
- "didSaveDocument:"
- "finishInstantiate"
- }
-
- replacemethod "<sel>" with same {
- replace "<rettype>" with "(NSString *)"
- } within ("<implementation>") {
- replace "return <s value>;" with "return [NSString stringWithCString:<value>];"
- } where "<sel>" isOneOf {
- "getInspectorClassName"
- "getConnectInspectorClassName"
- "getSizeInspectorClassName"
- "getHelpInspectorClassName"
- "getEditorClassName"
- }
-
- replace "getInspectorClassName" with "inspectorClassName"
-
- replace "getConnectInspectorClassName" with "connectInspectorClassName"
-
- replace "getSizeInspectorClassName" with "sizeInspectorClassName"
-
- replace "getHelpInspectorClassName" with "helpInspectorClassName"
-
- replace "getEditorClassName" with "editorClassName"
-
- replace "getIBImage" with "imageForViewer"
-
- replace "[<palette> associateObject:<obj> type:<type> with:<view>]" with "[<palette> associateObject:<obj> ofType:<type> withView:<view>]"
-
- replacemethod "initWith:inDocument:" with "editObject:inDocument:"
-
- replace "[<editor> initWith:<object> inDocument:<document>]" with "[<editor> editObject:<object> inDocument:<document>]"
-
- replace "redrawSelection" with "drawSelection"
-
- replacemethod "renewObject:to:" with "replaceObject:withObject:"
-
- replace "@implementation<w w1><isKindOf(IBInspector) class><w w2><any code><w w3>@end" with same
- within ("<code>") {
- replace "object" with "[self object]"
- replace "window" with "[self window]"
- replace "okButton" with "[self okButton]"
- replace "revertButton" with "[self revertButton]"
- replace "[self [self object]]" with "[self object]"
- replace "[self [self window]]" with "[self window]"
- replace "[self [self okButton]]" with "[self okButton]"
- replace "[self [self revertButton]]" with "[self revertButton]"
- replace "- <mtype rettype> <b old>" with "<b new>"
- where ("<old>", "<new>") isOneOf {
- ("ok:", "- (void)ok:")
- ("revert:", "- (void)revert:")
- }
- replacemethod "<sel>" with same {
- replace "<rettype>" with "(void)"
- } within ("<implementation>") {
- replace "return <retvalue>;" with "<retvalue>; return;"
- } where "<sel>" isOneOf {
- "ok:"
- "revert:"
- }
- }
-
- replace "@interface<w w1><isKindOf(IBInspector) class><w w2><any code><w w3>@end" with same
- within ("<code>") {
- replace "- <mtype rettype> <b old>" with "<b new>"
- where ("<old>", "<new>") isOneOf {
- ("ok:", "- (void)ok:")
- ("revert:", "- (void)revert:")
- }
- }
-