[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

startup.self aliases



Two of the aliases defined in the sample startup.self file (on page
I-31 of the Self System manual) are incorrect.  They should read:

rs = ( _ReadSnapshotIfFail: [ | :name. :err. | 'Snapshot' _ReadSnapshot ] ).
ws = ( _WriteSnapshotIfFail: [ | :name. :err. | 'Snapshot' _WriteSnapshot ] ).

The problem with the original versions is that failure blocks are
passed two arguments (i.e. the name of the failing primitive and an
error string indicating the reason for failure).  Normally, extra
arguments passed to blocks can be ignored, since "block.self" defines
"value:With:" to just resend "value:", and "value:" to resend "value".
But before "block.self" has been read in, this capability isn't
available.  Hence the addition of explicit arguments to the failure
blocks to avoid silly "value:With:" message-not-understood errors.

-- Craig