Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

Re: RE : save attributes in ascii file

New Message Reply Date view Thread view Subject view Author view

Subject: Re: RE : save attributes in ascii file
From: Paul Caplat (paul.caplat@gmail.com)
Date: Fri Nov 10 2006 - 14:40:18 CET

Thank you Christophe,
I really had no idea what to do with all these t1 and t2 ;-)

Apparently the bad settings of VW are due to the mac version (bouhouhou, why
is it so hard to work with so excellent machines ??!! and worse with the
macintel for which there is no VW release, whereas it is the more robust,
powerful and nice-looking computer I have ever seen :-( ).
Anyway, thanks again !
Paul

2006/11/9, Christophe Le Page <christophe.l@chula.ac.th>:
>
> Dear Paul,
>
>
>
> Clearly the settings of your VisualWorks image are incorrect.
> Getting decompiled code make it very difficult to understand how a method
> works…
>
> Not only have you lost the names of the variables, but also the
> explanatory comments:
>
> *"Save the attributes of the intances of aClass on a file
> 'aStringOrFilename' *
>
> *attributes <OrderedCollection> ex: OrderedCollection ('seed' 'context')*
>
> *file <Filename> ex:
> aFATFilename('d:\vw7nc\cormas\Models\TSE\data\titi.txt') or*
>
> *file <String> ex: 'titi.txt' it will be save into data/"*
>
>
>
> Thus to enter the first argument as a literal value, if you just want to
> export one attribute named #xx, you should use
>
> *#('xx')*
> As for the last argument, you should use
>
> *$; *
>
> and not
>
> *Cormas separator*
>
>
>
> HTH,
>
> clp
>
>
>
>
>
> -----Message d'origine-----
> *De :* owner-cormas@cirad.cirad.fr [mailto:owner-cormas@cirad.cirad.fr] *De
> la part de* Paul Caplat
> *Envoyé :* jeudi 9 novembre 2006 20:15
> *À :* Liste CORMAS
> *Objet :* save attributes in ascii file
>
>
>
> Hi All,
> I am trying to make my model save some of the grid's attributes during the
> simulation.
> I use the following method:
>
> saveAttributes:#xx
> fromClass: Class
> inFile: 'file.txt'
> separator: Cormas separator
>
> I have also tried to put "$;" as "separator:" argument.
> My Class is never nil, the attribute #xx neither, it ranges from 0 to 200.
>
> Then I get a "Unhandled exception: Message not understood: #n" that arises
> in an "optimized block" in the "CormasModel>>getAttributesType: t1
> fromInstances: t2", in the line
> "t3:=t2 detect:[: t8 | t8 perform: t7 asSymbol) isNil not]"
>
> As the whole is decompiled code I am not very sure I have understood how
> it works, but the ".t7" value is weird: $n "16r006E", and probably the
> "message not understood:#n" refers to the n after the $ ???
>
> thank you for your help
> Paul
>
>
> ,,,
> (o o)
> --oOO--(_)--OOo----------------------------
>
> Dr Paul Caplat
> postdoctoral fellow
> Departments of Environmental Biology / Maths & Stats
> University of Guelph
> Guelph On, N1G2W1
> Canada
>
> .oooO Oooo.
> ===( )==( )===========
> \ ( ) /
> \_) (_/
>

-- 
           ,,,
         (o o)
--oOO--(_)--OOo----------------------------

Dr Paul Caplat postdoctoral fellow Departments of Environmental Biology / Maths & Stats University of Guelph Guelph On, N1G2W1 Canada

.oooO Oooo. ===( )==( )=========== \ ( ) / \_) (_/

New Message Reply Date view Thread view Subject view Author view
 

Back to home