I came across a couple of interesting behaviours last night.  My stack
started behaving strangely, in an area of functionality where I hadn't been
working.  A backup was fine, but I couldn't see the difference.  So I
downloaded Geoff Canyon's mcRipper, with the intention of ripping old and
new stacks into xml, and then comparing these two text files (using BBEdit).

This turned into a huge rocker cover issue.  I won't bore you with the trail
I wended, but at the end of it I found two behaviours which could at least
be described as interesting - one down to MetaCard, one to Revolution.

The Revolution part is that many objects have a custom property
"scriptChecksum", which consists of 16 characters - or rather, 16 bytes.
Evidently, it is possible for these bytes to be zero.

The MetaCard part is that it is possible for strings to contain the
character whose code is zero; and such strings can be stored in fields; and
fields containing such a character can be happily scrolled over from top to
bottom and back again.  However, when scripts attempt to access the contents
of a field, which contains such a character, almost - but not quite -
everything behaves as though the contents end immediately before the null.
If you ask for the length of the text, or the number of lines, it will be
reported for the portion before the null.  You can select a range of text
including the null character, and do copy - only the part of the selection
before the text will be in the clipboard.  On the other hand, you can also
select a portion of the text after the null, such that the selection does
not itself contain a null - you will then get the text you selected in the
clipboard.  Actually these behaviours are not quite consistent; at least in
Revolution, I've sometimes been able to copy the text containing the null -
but doing "Select All" stops before it.  I'm not certain whether this is
differences between MC and Rev, or between the data I got from using the
Ripper, and data I synthesised using numtochar(0).

It's also worth noting that if you muck around with these interesting things
long enough, you may destabilise the environment, crash, and possibly freeze
altogether (at least in Rev, at least on Mac).

So for MC: since nulls are mostly supported in strings and fields, perhaps
the remaining strange behaviours should be fixed.  For Rev: as long as nulls
aren't fully supported, perhaps it would be better if the checksums didn't
contain them - eg render them out as a string of hex digits.  And lastly to
Geoff - until either or both those things change, perhaps mcRipper could be
enhanced to save strings containing nulls in some escaped format!

  Ben Rubinstein               |  Email: [EMAIL PROTECTED]
  Cognitive Applications Ltd   |  Phone: +44 (0)1273-821600
  http://www.cogapp.com        |  Fax  : +44 (0)1273-728866


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to