| | | Some Mysteries of objectdraw, Explained |
Some Mysteries of objectdraw, Explained
Today, we are going to resolve some mysteries about Grace and the
code that you have been writing this semester. Here are some
questions that should bother you:
- When writing methods in an object that inherits graphicApplication, why can
you refer to "canvas" without declaring it, but you
have to pass the canvas explicitly as a parameter to other
classes?
- Usually when we call methods that we have not defined in our
class, we say someObject.someMethod().
There are some exceptions to this rule, like startGraphics,
append, prepend.
Why don't we need to include an object?
| | | Some Mysteries of objectdraw, Explained |