home *** CD-ROM | disk | FTP | other *** search
-
- /*********** PopUpConversion: declarations ***********/
-
- replace "NSPopUpList" with "NSPopUpButton"
-
- replace "\<AppKit/NSPopUpList.h>" with "<AppKit/NSPopUpButton.h>"
-
- /*********** PopUpConversion: functions ***********/
-
- replace "NSAttachPopUpList(<button>, <list>)" with same
- error "PopUpConversion: NSAttachPopUpList() is obsolete. Use the NSPopUpButton class."
-
- replace "NSCreatePopUpListButton(<button>, <list>)" with same
- error "PopUpConversion: NSCreatePopUpListButton() is obsolete. Use the NSPopUpButton class."
-
- /*********** PopUpConversion: obsolete ***********/
-
- replacemethod "popUp:" with same
- error "PopUpConversion: 'popUp:' is obsolete because it is no longer necessary."
-
- replace "[<rec> buttonFrame]" with "[<rec> frame]" /*???*/
-
- replacemethod "buttonFrame" with same
- error "PopUpConversion: 'getButtonFrame:' is obsolete. Use the frame method instead"
-
- /*********** PopUpConversion: prep for renaming ***********/
- replace "[[<rec> target] <old>]" with "[<rec> <new>]"
- where ("<old>", "<new>") isOneOf {
- ("removeItemAtIndex:", "removeItemAtIndex:"),
- ("setPullsDown:", "setPullsDown:"),
- ("addItem:", "addItemWithTitle:"),
- ("insertItem:atIndex:", "insertItemWithTitle:atIndex:"),
- ("removeItem:", "removeItemWithTitle:"),
- ("indexOfItem:", "indexOfItemWithTitle:"),
- ("selectedItem", "titleOfSelectedItem"),
- ("itemList", "itemMatrix")
- }
-
- replace "[<rec> <old>]" with "[<rec> <new>]"
- where ("<old>", "<new>") isOneOf {
- ("removeItemAtIndex:", "removeItemAtIndex:"),
- ("setPullsDown:", "setPullsDown:"),
- ("addItem:", "addItemWithTitle:"),
- ("insertItem:atIndex:", "insertItemWithTitle:atIndex:"),
- ("removeItem:", "removeItemWithTitle:"),
- ("indexOfItem:", "indexOfItemWithTitle:"),
- ("selectedItem", "titleOfSelectedItem"),
- ("itemList", "itemMatrix")
- }
- warning "PopUpConversion: This message should be sent to an NSPopUpButton, but is probably being sent to an NSPopUpList"
-
- /*********** PopUpConversion: collapse messages which can be ***********/
-
- replace "[[<rec> itemMatrix] selectedRow]" with "[<rec> indexOfSelectedItem]"
-
- /*********** PopUpConversion: removeItemExceptions ***********/
-
- replace "<t var> = [<rec> removeItem:<item>];" with "{
- <t var> = [<rec> itemWithTitle:<item>];
- [<rec> removeItemWithTitle:<item>];
- }"
-
- replace "<t var> = [<rec> removeItemAtIndex:<index>];" with "{
- <t var> = [<rec> itemAtIndex:<index>];
- [<rec> removeItemAtIndex:<index>];
- }"
-
-
- /*********** PopUpConversion: Warn against using matrix directly ***********/
-
- replacemethod "itemMatrix" with same
- warning "PopUpConversion: Consider NSPopUpButton methods instead of using itemMatrix to access items in a pop-up list."
-
-