Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

TCL(Tool Command Language) Scripting

how to pass the arguments to the function?


I do not succeed to pass the last argument, who knows the way in order
to make it?

My code

package require ag

set agset [AG::CreateAGSet aa]
set tl [AG::CreateTimeline $agset]
set ag [AG::CreateAG $agset $tl]
set a1 [AG::CreateAnchor $ag]
set a2 [AG::CreateAnchor $ag]
set a3 [AG::CreateAnchor $ag]
set ann1 [AG::CreateAnnotation $ag $a1 $a2 word]
AG::SetFeature $ann1 label hello
set ann2 [AG::CreateAnnotation $ag $a2 $a3 word]
AG::SetFeature $ann2 label world

puts [AG::toXML $agset]
AG::Store AG test.xml $agset ?here the problem?

------------------------------------------------------------------------

void AGAPI::Store  (  string    format,    string    filename,
Id    id,    hash< string, string >    options = NULL  )

   Store an annotation graph in a given format.

Parameters:
format  Annotation file format. Possible formats are: AG, TreeBank,
SwitchBoard, TF, LCF, CAG and ATLAS.
filename  The name of the file to be stored.
id  The id of ag/agset to be stored.
options  A hash table of option-value pairs for format specific
options.

AG format
The AG format is an XML representation of annotation graph data model,
and the official format for annotation graphs.

Format name: ATLAS Interchange Format level 0 or Annotation Graph
format
AGLIB format name: AG
Input/Output: yes/yes
Resources: DTD, Annotation Graph Toolkit
Programming interface
Load(format, filename, id, sigInfo, options)

returns a list of AGIds loaded
format: AG
filename: name of the file to load
id: optional, ignored
sigInfo: optional, ignored
options: optional
Option Posible values Description
dtd A path or URL to the DTD Specifies the location of the DTD. If not
present, the system id in DOCTYPE declaration in the document is used
by default.
encoding ASCII, UTF-8, UTF-16, UCS4, IBM037, IBM1140, ISO-8859-1,
Windows-1252 Force the loader to treat the document as if it's in the
specified encoding. By default, the encoding specified in XML
declaration is used. If none are given, defaults to UTF-8.
DTDvalidation true, false Tells the loader whether or not to perform a
DTD validation. Default value is true.

Store(format, filename, id, options)

returns an empty string
format: AG
filename: name of the file to load
id: AGId or AGSetId to be stored
options: optional
Option Posible values Description dtd A path or URL to the DTD
Specifies the location of the DTD in the output
           file. Default value is http://agtk.sf.net/doc/xml/ag-1.1.dtd
           encoding Any encoding allowed for XML Writes the encoding
in the XML declaration of output file. If not
           given, no encoding will be written in the XML declaration.

On May 17, 5:45 am, rosariomiglio@gmail.com wrote:

So, are you saying that the first line of AG::Store outputs its
argumetns and you only get AG and test.xml as arguments?  If so, that
means that by that statement, agset no longer has a value -right
before AG::Store, add the line:

puts "agset is . $agset ."
and you should see
agset is . .
if I am right. Otherwise, if agset has a value, but the first line of
AG::Store outputs only 2 arguments, then the AG code is somehow
corrupting your program stack.

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc