[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: HTML forms
From:       "Dirk A . Mueller" <mueller () kde ! org>
Date:       2000-04-11 9:37:54
[Download RAW message or body]

On Mon, 10 Apr 2000, Waldo Bastian wrote:

> "inital value" as well. Shouldn't the RenderFormElements store the "initial 
> value" in addition to the actual "value"? 

Yes and no.  when ::attach()'ing a Render*FormElement the RenderFormElement
should get it's default value set (TextArea and Select can't be handled that
way because their default values are not known at that place) as current
value. 

from that time on the Render*FormElements contain the current value and the
HTMLInput*Elements contain the default value. retrieving the other is done
by querying the object (both objects have pointers to each other). 

> Currently HTMLInputElement::setDefaultValue() and 
> HTMLInputElement::setValue() both set the same thing.
> 
> The difference becomes visible when you "reset" the form. In that case the 
> "initial values" are supposed to be used.

that's why the ::reset() functions in the render-tree set their state
according to the attached object from the object-tree. 

I'm not yet completely sure how that behaviour needs to be redone for the
Javascript support. JS should probably be able to both change
the default value and the current value I think. or can JS only change
current value?

> *hm* Something else: RenderTextArea calls reset() from within layout(). That 
> means that resizing a page resets the textarea. (render_form.cpp:796) 
> RenderSelect calls reset() and layout() from within close(). Should 
> RenderTextArea do the same?

That's right. It's a left-over from older code. I'll fix it. 

> Trying to find my way in khtml :-)

If you're working on forms, could you please give me a quicknote on which
areas you work on so that the work doesn't get duplicated?

There are quite some things still to do: 

a) DHTML bindings (::blur(), onClick() etc etc)
b) supporting more form elements (input file, hierarchical select, HTML4
    BUTTON)
the last one is a bit complicated because I need to make it act just like a
normal block element with inline childs.  
c) CSS support (overwriting widget sizes, setting/storing/retrieving the
widget colors)
d) remaining layouting issues 

BTW, the http cache is still terrible broken. Do you intend to fix it?

 
Dirk

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic