GRASS GIS wrote: > #102: new tabs in GUI have required last > -----------------------+---------------------------------------------------- > Reporter: cmbarton | Owner: [email protected] > Type: defect | Status: new > Priority: major | Milestone: 6.3.0 > Component: Tcl | Version: svn-trunk > Resolution: | Keywords: > -----------------------+---------------------------------------------------- > Comment (by hamish): > > Replying to [comment:4 glynn]: > > Replying to [comment:1 hamish]: > Hamish: > > > For r.colors, v.in.ascii the input can come from stdin which is why those > > > input filenames are not required by the parser, although piping to stdin > isn't > > > really an option from a GUI window. > Glynn: > > I suggest modifying the parser so that "-" is always accepted for > "old,file" > > options. > > > > Providing incorrect type information so that "-" works is a rather ugly > hack. > > What I was trying to get at was the modules work like "if input file is > NULL, assume input comes from stdin". I don't think those modules actually > have code to deal with input=-, they will treat that as a filename not > something special. Some modules do recognize that trick, for consistency's > sake I suppose all that can read from stdin should, and if the parser > needs to be aware of that then so be it. > > And AFAIK the parser does not actually check to see if an "old,file" > option's answer actually exists. It leaves that to the module. All it > provides is the folder file picker GUI. (Same is true for cell, vector, > group, ... elements) (??) > > So the type isn't being dropped to accomodate 'oldfile=-', ->required is > being dropped to accomodate "if input file is NULL, assume input comes > from stdin". > > > not sure if we're talking about the same thing here...
Okay. I misinterpreted "filenames are not required" as "files are not required (to exist)". Realistically, we either need a more expressive type system, with union types, or we have to eliminate all of these special cases. BTW, the specific issue with "mode" flags (e.g. "r.colors -l") could be dealt with fairly easily by adding a field to "struct Flag" to indicate that the flag suppresses any requirements. That way, you wouldn't have to do without ->required settings because of "exceptional" cases. -- Glynn Clements <[EMAIL PROTECTED]> _______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
