Branch: Tag:

2001-06-14

2001-06-14 20:07:11 by Johan Schön <js@opera.com>

Made all the width constants ints instead, so that they can be overriden in derived classes.

Rev: server/etc/modules/Variable.pmod/module.pmod:1.53

1: - // $Id: module.pmod,v 1.52 2001/06/13 22:03:26 nilsson Exp $ + // $Id: module.pmod,v 1.53 2001/06/14 20:07:11 js Exp $      #include <module.h>   #include <roxen.h>
554:   {    inherit Variable;    constant type = "String"; -  constant width = 40; +  int width = 40;    //! The width of the input field. Used by overriding classes.       array(string) verify_set_from_form( mixed new )
576:   {    inherit String;    constant type = "Text"; -  constant cols = 60; +  int cols = 60;    //! The width of the textarea -  constant rows = 10; +  int rows = 10;    //! The height of the textarea    string render_form( RequestID id, void|mapping additional_args )    {
597:   //! Password variable (uses crypt)   {    inherit String; -  constant width = 20; +  int width = 20;    constant type = "Password";       int(0..1) set_from_form( RequestID id )
629:   {    inherit String;    constant type = "File"; -  constant width = 50; +  int width = 50;       string read( )    //! Read the file as a string.
657:   {    inherit String;    constant type = "Location"; -  constant width = 50; +  int width = 50;       array verify_set( string value )    {
675:   {    inherit String;    constant type = "URL"; -  constant width = 50; +  int width = 50;       array verify_set_from_form( string new_value )    {
688:   {    inherit String;    constant type = "Directory"; -  constant width = 50; +  int width = 50;       array verify_set( string value )    {
915:   {    inherit Variable;    constant type="List"; -  constant width = 40; +  int width = 40;       string transform_to_form( mixed what )    //! Override this function to do the value->form mapping for
1118:   {    inherit List;    constant type="IntList"; -  constant width=20; +  int width=20;       string transform_to_form(int what) { return (string)what; }    int transform_from_form(string what,mapping v) { return (int)what; }
1129:   {    inherit List;    constant type="DirectoryList"; -  constant width=20; +  int width=20;       static int _prec = 3;