[mcclim-devel] pathname and accept

rpgoldman at real-time.com rpgoldman at real-time.com
Wed Aug 10 14:57:17 UTC 2005


[Apologies if this is a dumb question...]

AFAICT there's no way for me to try to ACCEPT a pathname that is
constrained to refer to a file that already exists.  Is this true?

I could imagine trying to create a new presentation subtype of
pathname that would meet this constraint.  

But doesn't it seem that it would have been reasonable to make a
pathname a compound type that would allow for constraints?

Also, I have been looking at the Allegro CLIM UG and the CLIM 2 spec,
and I have not been able to determine what sort of guarantees ACCEPT
provides.  When it reads one of my previously-existing pathnames, for
example, will it be obligated to run presentation-typep at some point
to check that the filename is actually previously-extant?  Or is it
allowed to just hope that the user has typed in a string that refers
to a previously-existing filename, instead of the name of his
grandmother's dog?

I don't know exactly how to test this, but my rudimentary tests with
trace seem to indicate that ACCEPT isn't doing any verification.  Is
that right?  

If so, and I want to enforce this constraint, should I be making an
:around method for accept that will check the constraint and either
return if it's satisfied, or invoke call-next-method if it's violated?

I would have thought that there would have been some protocol for bad
input (e.g., raise a particular exceptionq), but my cursory examination
of the spec doesn't reveal any such.

Thanks,
Robert



More information about the mcclim-devel mailing list