at:tutorial:objects
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
at:tutorial:objects [2007/07/10 21:52] – small tvcutsem | at:tutorial:objects [2007/07/10 22:00] – added tvcutsem | ||
---|---|---|---|
Line 124: | Line 124: | ||
In AmbientTalk, | In AmbientTalk, | ||
- | As any field in AmbientTalk objects, the '' | + | Because |
< | < | ||
- | > def openConnection := object: {...}; | + | def openConnection := object: |
- | > def closedConnection := object: {...}; | + | def send(msg) |
- | > def connection := object: { | + | }; |
- | def open() { | + | def closedConnection := object: |
- | super := openConnection.new(); | + | def send(msg) |
- | }; | + | }; |
- | def close() { | + | def connection := object: |
- | super := closedConnection.new(); | + | def init() |
- | }; | + | |
- | } | + | }; |
+ | | ||
+ | super := openConnection; | ||
+ | }; | ||
+ | def close() { | ||
+ | super := closedConnection; | ||
+ | }; | ||
+ | } | ||
</ | </ | ||
+ | |||
+ | In the above example, the '' | ||
<note important> | <note important> |
at/tutorial/objects.txt · Last modified: 2013/05/17 20:23 by tvcutsem