On Sat, 19 Mar 2005 15:52:47 +0100, Zoran Vasiljevic <[EMAIL PROTECTED]> wrote:
> On Saturday 19 March 2005 15:45, Stephen Deasey wrote:
> 
> > Do these 'is' functions have a C API?  I think they're Tcl only, right?
> 
> yeah... I think we should stick to built-in object types really.
> 
> > Could get crazy...  :-)
> 
> And in order not to get crazy: KISS (keep it simple and stupid)
> Anyways, first things first: TCL_BREAK and &objc, right?
> 
> Zoran
> 
> BTW: do cc: on the naviserver-devel list so others can
> see what we're cooking.

Woops, silly Gmail... :-)

I've added basic option parsing without any fancy stuff.  It was the
easiest thing to implement and it leaves all our options (ha ha) open
for the future.

proc aproc {args} {
    ns_parseargs {-foo {-bar BAR} -- required {default DEF} args} $args
    # ...
}

There are some more examples in tests/ns_parseargs.test

I do think the type checking attributes are a good idea, but I'm not
going to have time to look at that any time soon.  If any one else
would like to, that would be great.

Oh yeah, I think I finally got the parsing right :-)   Ns_ObjvProc's
now return either TCL_OK, TCL_ERROR or TCL_BREAK.  It's actually
shorter code.  I hope everything looks ok now.

Reply via email to