experimental code for better module handling

This commit is contained in:
hyunghwan.chung
2016-11-18 18:11:13 +00:00
parent dab3423f12
commit eaa9dbc958
21 changed files with 1314 additions and 323 deletions

View File

@ -66,6 +66,8 @@
#method(#class) new: anInteger
{
| x |
## TODO: check if the class is a fixed class.
## if so, raise an exception.
x := self basicNew: anInteger.
x initialize. "TODO: assess if it's good to call 'initialize' from new."
^x.
@ -175,6 +177,11 @@
## TODO: add = and ~= for equality check.
## -------------------------------------------------------
## COMMON QUERIES
## -------------------------------------------------------
#method isNil
{
"^self == nil."
@ -201,6 +208,16 @@
^true.
}
#method isError
{
^false
}
#method(#class) isError
{
^false
}
## -------------------------------------------------------
## -------------------------------------------------------
@ -287,6 +304,7 @@
{
self class cannotInstantiate
}
}
#class Object(Apex)