Hello Wolfgang, thank you for making things a bit clearer.
> > {Property.get 'oz.home'} gives me a list of characters while
> > {Property.get 'platform.name'} gives me a string.
...
> > (47|117|115|114|47|108|105|98|47|109|,,,|,,, vs. 'linux-i486')?
> In Oz, a string _is_ a list of characters. You can display such a
> string with "System.showInfo".
That's the trick - I used "Show" as this was the very first in the
tutorial...
> The result of {Property.get 'platform.name'} is an _atom_. [...] It
> makes sense to use atoms for 'platform.name' because the set of
> possible results tends to be limited.
>
> Paths (like the value of 'oz.home') are better represented as strings
> because there are many different paths and strings are easier to
> decompose, append etc.
It's because I found my beforementioned problem caused in
$MOZART_SRC/share/lib/wp/Tk.oz:
Platform = {Property.get 'platform.name'}
PLTFRM = ({Property.get 'oz.home'} #
'/platform/'#Platform#'/')
TKEXE = case {Property.get 'platform.arch'}
of 'darwin' then 'OzWish.app/Contents/MacOS/OzWish'
else 'tk.exe' end
where I took the # operator as string (or list) concatenuation and tried
to find out what's really happening with the very limited knowledge of a
beginner (Using {Show SOMETHING} in the emulator).
Your explaination tells me, that Mozart has some implicit (lazy) type
conversion mechanism or that atoms can be used as strings, because in
the 2nd line PLTFRM is bound to a concatenuation of a string and 3
atoms.
Cheers,
Eckard
signature.asc
Description: PGP signature
_________________________________________________________________________________ mozart-users mailing list [email protected] http://www.mozart-oz.org/mailman/listinfo/mozart-users
