[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ReadText() Arguments



If you are using a css script, and you want to read into environments[0], you 
first have to create the eventspec as described in section 11.7 of the 
manual, then you would do

.environments[0].ReadText("xor.pat", .environments[0].event_specs[0], 
NAME_FIRST);

Note that css automatically knows how to convert a file name ("xor.pat") into 
the istream& arg for this function.  If you call it in C++ you'd need to 
create a stream & open it first.  If you call it from the GUI it pulls up 
file dialog to get the stream.  Hope this helps,

- Randy

On Wednesday 14 July 2004 09:53 am, Agosto, Jorge wrote:
> Hello:
>
>
> I need some help with the ReadText function of PDP++.
>
> I been trying to load events from a file, but have not been successful.
> I am learning C++ at the same time as PDP++, and I have read the PDP++
> user guide (CSS & Environment) but still do not understand what are the
> arguments for the ReadText() function.
>
> Can you please send me an example of the ReadText() function for the
> xor.proj  in the demos?
> This will be my file:
>
> p00 0 0 1
> p01 0 1 1
> p10 1 0 1
> p11 1 1 0
>
> Thanks in advance for your help.
>
> Jorge Agosto,
> 787-466-5784
>
> PD
> I am using the script object to load the file.