John Darrington <[EMAIL PROTECTED]> writes:

> On Thu, Jun 08, 2006 at 09:47:36AM -0700, Ben Pfaff wrote:
>      John Darrington <[EMAIL PROTECTED]> writes:
>      
>      > Another problem I've encountered:  I'm getting this assertion in
>      > casefile_append : 
>      >
>      >  assert (cf->mode == WRITE);
>      >
>      > Would it not be appropriate to allow write-after-read for random
>      > casereaders ?
>      
>      It should be possible, although I'll note that writing is not
>      associated with a casereader.
>
> I mean't that would it be acceptable if casefile_get_random_reader
> didn't put the casefile into READ mode ?

Ah, yes, probably.

>      I'm beginning to believe that casefiles should not be used for
>      GUI access.  Instead, we should create a new, more dynamic
>      structure for GUI access, one that supports the casefile
>      operations.  For convenience, I'll call it a "flexfile", because
>      it's flexible.  The GUI would use flexfiles where the TUI uses
>      casefiles.  I'd write a wrapper that allowed them to be used
>      interchangeably.
>
> Rather than a wrapper, how about an inheritance mechanism?  So that a
> flexifile inherits from a casefile, and can do everything a casefile
> can and more. Or perhaps have them both implementing a common abstract
> data type.  It might be easier to use that way.

Yes, one of those is really what I meant.

> In the mean time, I've just commented out that assertion in
> casefile_append, and so far, haven't noticed any untoward consequences.

It's probably OK.  I think I meant it as a policy enforcement
mechanism, not as a guard against internal consistency.
-- 
"In this world that Hugh Heffner had made,
 he alone seemed forever bunnyless."
--John D. MacDonald


_______________________________________________
pspp-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/pspp-dev

Reply via email to