Redirecting the parent slot of the bank account


Moving slots from the bank account to traits:

Redirecting the parent slot of the bank account

Then, we want to change the bank account's parent slot to refer to this new object. If we bring up the middle-button menu on the parent slot button in our bank account, we'll see an item labelled `Grab pointer'. Invoking this item draws an arrow out of the slot, and puts the head of the arrow in the hand. We can drop the arrow head on our new object; it becomes the parent of the bank account. You can retract the arrow if you desire by using the same menu (item `Retract'), or by clicking on the tail of the arrow.

Moving the deposit and withdraw methods into the traits

Finally, we can move the deposit: and withdraw: slots from the bank account into the traits object. To do this use the `Move' middle-button menu item on each slot, dropping the slot on the traits object.

[ Previous ] [ Index ] [ Next ]