Leopard Notes
James Sentman
james at sentman.com
Sun Jan 6 09:31:49 PST 2008
HI Folks,
Some of you may have noticed some ire in my voice when I posted about
Leopard ;) But you may also have noticed Michael mentioning a beta
that was more or less compatible with it now. I thought I'd give you
the specifics as there aren't any included with any "docmentation" or
anything like that with the beta yet...
Memory Leaks: Leopard broke some basic functionality for carbon apps.
from 10.5 all windows leaked memory with every refresh. There was
nothing that the programmer could do! It made carbon apps completely
unable to run for extended periods like XTension needs to. In 10.5.1
they fixed about half of this and I was able to work around most of
the problems for XTension. You may experience some drawing oddities. I
think I have all of them cleared up, but if you see a window that
opens and doesn't draw itself right away or something like that please
let me know. View windows still leak memory in 10.5.1 as they were too
complicated to apply the same fix as the other windows. Also some of
the sheet and drop down configuration windows will still leak memory
as those types of windows cannot be worked around in the same way.
That shouldn't be a problem as I wouldn't expect you'd walk away from
your server and leave a modal dialog window open, but I mention it
just the same. So dont leave view windows open on your server for
extended periods of time. Apple has acknowledged this bug and like I
said fixed it partially in 10.5.1 and hopefully the rest of the way in
10.5.2 when that arrives. I will test and let you all know.
USB and serial interfaces: Dean and some others reported that the
keyspan drivers were having trouble. My non-long term testing here
shows that thigns are working again in 10.5.1 but problems could still
crop up. Our own direct USB and serial interfaces seem to be working,
but I haven't tested every combination of things. Make sure that all
the peripherals that you count on have updated drivers or a statement
that they work on Leopard!
AppleScript changes: Leopard switched applescript to entirely
"unicode" text. This is the one that is likely to cause you the most
pain. XTension is now able to accept unicode text form all it's verbs
and will return unicode text from verbs if you're running leopard.
This will get most people running but there are a few places where you
still may run into trouble. Say you already have a unit property, or
other text saved off in an already compiled script. Lets say you have
a unit property with the text "hello" and you retrieve that via a
script and compare it with "hello in the script to see if they are the
same. Well they WONT be the same even though they LOOK the same
because they are encoded differently under the hood and AppleScript
for some reason fails to automatically handle that. This is a
situation where "hello" is not "hello" If you run up against this
where you're comparing strings in scripts to strings stored that way
you may have to convert them yourself by specifically casting them to
unicode before comparing like:
set MyStupidString to ((get unit property "an old value from before
the update") as unicode text)
the "as unicode" part will specifically fix the encoding for old
stuff. For new stuff you wont have to do this as any new strings you
set will come from the unicode version of AppleScript anyway and be
already encoded properly.
I'm not sure yet what all the implications of this change are. It
cannot be turned off though so going forward we are going to have to
learn to live with it. I am sure that other subtle and interesting
interactions will turn up as we go forward. There are already new
machines out there that cannot be reloaded with 10.4 so at some point
we'll all be biting this particular bullet. Until all the fun is
worked out though it's my advise that you not upgrade your machine and
then walk out the door for an extended vacation ;)
Thanks,
James
James Sentman http://sentman.com http://MacHomeAutomation.com
More information about the XTensionlist
mailing list