pspp-dev
[Top][All Lists]
Advanced

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

Re: Function categories


From: John Darrington
Subject: Re: Function categories
Date: Tue, 17 Apr 2007 08:24:23 +0800
User-agent: Mutt/1.5.9i

On Mon, Apr 16, 2007 at 08:39:19AM -0600, Ben Pfaff wrote:

     > Would it be possible to make an api which provides an iterator which
     > can be used to return all the functions which belong to a given
     > combination of catagories?  It may be better to use bitfields instead
     > of sequential enums.
     
     I was thinking more of an API that directly exports a hierarchy
     of categories containing functions.  Based on a quick look at the
     GTK docs, this could be pushed into a GtkTreeStore pretty easily?

I guess that approach is possible.  But it does involve unnecessary
copying of data, and it does mean that if we later decide to change
the view presented to the user, it's more difficult.   If the user
interface looks like:

All Functions >
 ABS
 ARCCOS
 ...
Trig Functions >
 ARCCOS
 ARCSIN
 ...
Stats Functions >
 BETA.CDF
 BETA.PDF
 BETA.IDF
 GAMMA.CDF
 ...
Stats by Distribution >
 CDF >
  BETA.CDF
  GAMMA.CDF
  ...
 PDF >
  BETA.PDF
  ...
 IDF >
  BETA.IDF
  ...
Stats by Family >
 BETA >
  ...
 GAMMA >
  ...
 POISSION >
  ...
 ...

Then, every item has to be stored in the GtkTreeStore at least twice
(once under its own  category, and once under  "All Functions"). Stats
like BETA.CDF would have to be stored 4 times.

I was thinking of a custom object, which stores no data, but
implements GtkTreeModel, and calls on the lower level api to deliver
its data.

Either approach is possible, but I think the latter follows the MVC
paradigm, and would be easier to work with if we later decide to
change the look and feel of the GUI. 

J'

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.


Attachment: signature.asc
Description: Digital signature


reply via email to

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