[Zope] [solved] formulator not reproducing its own results

martin f krafft madduck@madduck.net
Sat, 3 May 2003 22:31:43 +0200


--FFoLq8A0u+X9iRU8
Content-Type: text/plain; charset=iso-8859-15
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

> Do you know what the python-equivalent of atoi() is? I have an
> idea...
>
> [...]
>=20
> I don't think it's this way around. I think formulator is fine
> dealing with integers, but Zope interferes with strings... So i need
> to atoi()...

Ha, got it! atoi() aka int() it was. If I convert the
request/form/field_actitle to an integer like so:

  actitle python:int(request.field_actitle)

the whole thing works like a charm.

Score!!!!

I used to have

  actitle request/form/field_actitle|nothing

but postfixing |nothing to the python script above produces an
error. Do you know how I can do the equivalent?

I tried

  python:test(request.has_key('field_actitle'), field_actitle, nothing)

but then, when field_actitile is missing, Zope complains about the
unresolved name.

--=20
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
=20
keyserver problems? http://keyserver.kjsl.com/~jharris/keyserver.html
get my key here: http://madduck.net/me/gpg/publickey
=20
i wish this wish not to be granted!
                                        -- achilles (hofstadter's geb)



----- End forwarded message -----

--=20
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
=20
keyserver problems? http://keyserver.kjsl.com/~jharris/keyserver.html
get my key here: http://madduck.net/me/gpg/publickey
=20
the reason the mainstream is thought of as a stream
is because it is so shallow.

--FFoLq8A0u+X9iRU8
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+tCcvIgvIgzMMSnURAovsAKCOZM832QEeDoXvX5J+U8ncgIQXRQCgkaIm
UF6FBS+4KBqoYq/VUmFquCw=
=oFBp
-----END PGP SIGNATURE-----

--FFoLq8A0u+X9iRU8--