1
0
Fork 0

GSM48: Create a factory for the optional elements

For adding an optional element call with nameOrDefault.
This commit is contained in:
Holger Hans Peter Freyther 2010-12-02 00:04:01 +01:00
parent d29b9b973a
commit 730d9612d8
1 changed files with 1 additions and 0 deletions

View File

@ -582,6 +582,7 @@ IEMessage subclass: GSM48MSG [
self addVariable: aName asSymbol.
self compile: '%1 [ ^ %1 ]' % {aName}.
self compile: '%1OrDefault [ ^ %1 ifNil: [%1 := %2 createDefault.]]' % {aName. aClass}.
self Optional add: (aName asSymbol -> aClass).
]