pspp-dev
[Top][All Lists]
Advanced

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

Re: GUI-casefile interaction.


From: Ben Pfaff
Subject: Re: GUI-casefile interaction.
Date: Sun, 18 Jun 2006 19:22:03 -0700
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

John Darrington <address@hidden> writes:

> What steps to I have to take to prepare the casefile for participation
> in a procedure, and to run a sort procedure on it and read it back to
> the GUI ?

SORT is kind of a special case.  If you just want to sort a
casefile, you can use the sort_execute() function.  Pass it a
casereader and some criteria and it'll return a new casefile that
contains the same data sorted according to those criteria.

For other procedures, you'll have to deal with the interface in
data/procedure.h.  Make sure that you initialize it at program
startup with proc_init().

To execute a procedure, you need to make sure the active file
dictionary is in default_dict.  Then you need to provide the
cases with proc_set_source(), probably using
storage_source_create() to create the case source.

You can then execute the procedure with procedure() or some
variant.

Afterward, you can retrieve the data output by the procedure with
proc_capture_output().  (If you don't, then the output
automatically becomes the input for the next procedure.)

There's no programmatic interface for any of the preexisting
procedures.  I imagine that we'll have to introduce one.  That
will involve rewriting a good bit of code, but it may be
worthwhile in itself in the end.
-- 
"...In the UNIX world, people tend to interpret `non-technical user'
 as meaning someone who's only ever written one device driver."
--Daniel Pead




reply via email to

[Prev in Thread] Current Thread [Next in Thread]