Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

RE : save attributes in ascii file

New Message Reply Date view Thread view Subject view Author view

Subject: RE : save attributes in ascii file
From: Christophe Le Page (christophe.l@chula.ac.th)
Date: Fri Nov 10 2006 - 03:42:56 CET

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.
===( )==( )===========
        \ ( ) /
         \_) (_/

New Message Reply Date view Thread view Subject view Author view
 

Back to home