Hi,
> When the .toString() or .toSource() method is used on an AEDesc value, the
> string data
> returned is truncated with an ellipsis, as in:
>
> Me.the_clipboard( 'ustl' ).toString(); // when styled unicode is on the
> clipboard
> //
> //=>
> "ustl($000000020000008C000000000000001400000020000000010000000100000000\
> xC9$)\x00"
>
> where \xC9 is the MacRoman ellipsis character. The hex codes are cut off after
> the 32nd
> byte. This is problematic, both in that it means the value cannot be reused
> with the .build()
> method of AEDescs, and in that a scripter can't work with the data in any
> other way, ie: I
> tried using the .as() method to get at the data in other ways, but without
> success.
>
> So I was thinking that .toString() should be kept as is for simple debugging
> purposes, but
> that calling .toSource() on an AEDesc should return a complete hex dump.
The problem here is that I'm using the system's AEPrint calls, and somewhere
along the way Apple decided to truncate long hex strings (happens with
aliases as well). I've filed a bug with Apple on this, but its pretty low
on their priority list.
> P.S. Am I the only one who is shocked that JSOSA hasn't caught on more in the
> Mac
> scripting community??? It's such a brilliant language, and Mark's integration
> with OSA is so
> brilliantly done. So why aren't more people using it???
I think its a combination of things:
1) chicken-and-eng: no easy way to distribute scripts that use JSOSA
requires the user to install JSOSA
2) JSOSA isn't enough better than AS to justify the effort - AS works for
most people
3) JavaScript is for the Web in people's minds
Cheers
-Mark
------------------------------------------------------------------------
Mark Alldritt Late Night Software Ltd.
Phone: 250-380-1725 Script Debugger 4.0 - AppleScript IDE
WEB: http://www.latenightsw.com/ FaceSpan 4.3 - AppleScript RAD
Affrus 1.0 - Perl Debugging