[Zope] forms and variable mix-ups

Pavlos Christoforou pavlos@gaaros.msrc.sunysb.edu
Tue, 4 Jan 2000 22:02:49 -0500 (EST)


Hi Ed -

I did not read all your post carefully so forgive me if I mention obvious
things to you.

method arguments can have default values. For example:

def A(address,phone=''):
	pass

will require one to pass the address parameter but if the phone parameter
is ommitted it will default to ''. It is important to remember that
arguments with default values must all come after the ones without. A
quick glance at the source code did not show such problems but I think I
noticed cases where there was a mismatch in parameter positions. This
might explain the mismatch in passed values.  	

> Also, how to make it not freak out with a single selection.  Do I force it
> into a list on the input form?

Yes by appending a :list directive on your form variable.

Hope this helps

Pavlos