In the original RefactoringBrowser, if you wanted to move an instance variable up in the hierarchy, you would select the superclass and perform pull up instance variable. It would then open a dialog where you chose what subclass instance variable you wanted to pull up. Since we were at the superclass in the browser instead of the instance variable, I chose pull up instance variable for the name. At that time, we hadn���t implemented context selection menu options for the class definition, so we didn���t have a way to select an instance variable in the browser without opening a dialog.> On Mar 25, 2017, at 2:27 PM, Stephane Ducasse <stepharo.self@gmail.com> wrote:
>
> Hi guys
>
> I wonder why we have push up method and pull up instance variables.
> I remember that long time ago we got a discussion but I forgot.
> Do you remember?
>
> Stef (writing chapters for new books for total newbies: yes the future pharoers)
Later, I implemented push up method. In this case, the browser already supported selecting methods, so it didn���t make sense to have the user move to the superclass, perform pull up method, and then select the method you want to pull up from a dialog.
Essentially, the push vs. pull naming was based on where you were in the browser. If the thing to move wasn���t where you were in the browser, then pull was used ��� you would reach over to the other place and pull it to you. However, if the thing was currently where you were in the browser, then you would push it to the new location.
Of course, the current browser doesn���t follow my push vs. pull naming convention. When you pull up an instance variable, you need to have the class that defines the variable selected.
John Brant