[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
199.14
The v200-tagged code in CVS for MzScheme and MrEd is now version 199.14.
Changes:
* Converted many MrEd classes to have by-name initialization
arguments. The order is unchanged from previous versions of MrEd,
but arguments have been added. For example, the complete list of
frame% argument is now: `label', `parent', `width', `height', `x',
`y', `style', `enabled', `border', `spacing', `alignment',
`min-width', `min-height', `stretchable-width', and
`stretchable-height'. Another notable addition is the
`paint-callback' argument to canvas%, which sets the default action
of the `on-paint' method.
In some cases, a class was not converted because the constructor is
overloaded (e.g., color%, which takes either a color name or three
numbers). Overloading doesn't map well to keywords.
In the documentation, the converted classes are described with
`instantiate' instead of `make-object' (though `make-object' still
works, too, since no old arguments were removed or reordered).
* Changed slightly the way initialization arguments are handled in
the class system (defined by the "class.ss" library).
1) When by-position arguments are converted to by-name arguments,
and when there are more by-position arguments than init
variables in the instantiated class, then the leftover arguments
are converted using the superclass's init variables, and so
on. If a class contains an `init-rest' declaration without a
variable, then leftover by-position arguments are instead
rejected with a "too many arguments" error. (If the class
contains an `init-rest' declaration with a variable, then the
leftover by-position arguments are accumulated into a list.)
Consequently, a class like
(class frame%
(super-instantiate ()))
accepts by-position arguments just like frame%.
The expansion of a `class100' form always has an `init-rest'
clause.
2) Multiple by-name arguments can use the same name, which is
potentially useful when an initialization variable is shadowed
by a derived class; by-name arguments are consumed leftmost
first, and implicit arguments to `super-instantiate' or
`super-init' are always added to the right of the argument list.
The main consequence is in error reporting; illegal by-name
arguments that happen to have the same name as an internal
superclass argument (i.e., internal in the sense that a
corresponding value is provided to `super-instantiate' or
`super-init') are reported as unused arguments, instead of
duplicate arguments.
* When a (Unix-format) relative-path string is used with `require',
an exception is raised if the path contains anything other than
alpha-numeric characters, -, _, ., and space, or if the path
contains a leading or trailing slash.
* Added `module-compiled-imports'.
* Fixed syntax bugs introduced in 199.13.
* Revised and indexed new parts of the MzScheme manual.
The MzScheme, MzLib, and MrEd document bundles have been updated.
Matthew
- Follow-Ups:
- Re: 199.14
- From: Alexey Mahotkin <alexm@jet.msk.su>
- Re: 199.14
- From: Alexey Mahotkin <alexm@jet.msk.su>
- Re: 199.14
- From: Alexey Mahotkin <alexm@jet.msk.su>