![]() ![]() | color-point-dialogue - A sample construction and sample dialogue with ColorPoint. | Lecture 3 - slide 7 : 43 Program 3 |
> (define cp (new-instance color-point 5 6 'red)) > (send 'get-color cp) red > (send 'getx cp) 5 > (send 'gety cp) 6 > (send 'point-info cp) (5 6 point) > (define cp-1 (send 'add cp (new-instance color-point 1 2 'green))) > (send 'getx cp-1) 6 > (send 'gety cp-1) 8 > (send 'get-color cp-1) Message not understood: get-color > (send 'type-of cp-1) point > (send 'point-info cp-1) (6 8 point)