From kfm-devel Sat Mar 10 04:59:46 2001 From: Dawit Alemayehu Date: Sat, 10 Mar 2001 04:59:46 +0000 To: kfm-devel Subject: Re: Form Completion X-MARC-Message: https://marc.info/?l=kfm-devel&m=98420057324552 On Friday 09 March 2001 20:16, Richard Moore wrote: > On Friday 09 March 2001 23:23, Dawit Alemayehu wrote: > > On Friday 09 March 2001 15:30, Malte Starostik wrote: > > > Hello, > > > > > > as suggested by Tackat on IRC I tried myself on form completion as in > > > IE 5 for KHTML. The attached patch does this, seems to work okay, but > > > I'm not sure if I put it into the Right Places (pat. pending). Does it > > > look okay to commit or should it be done in a different place? > > > -Malte > > > > I did not know the khtml form used KLineEdit and KCombobox.... > > Anyways, one thing I noticed that I have reservations about is > > > > edit->completionObject()->setItems(static_cast(view)->formCom > >pl etionItems(element->name().string())); > > > > this looks like a KLineEdit call and means that a completion object is > > going to be created for all input widgets on a page. This IMHO is too > > expensive specially on web-pages with large input fields. The best thing > > to do here is to create the completion object and share it among all the > > created widgets and delete it when you are done with it... > > Do you mean have a single completion object that contains completions from > all the fields in the form, or one that is cleared and repopulated when the > keyboard focus widget changes? The first one. You can have one completion object that contains all the entries and use that single completion object for all the input fields (lineedits). This way not only would you save resource ( no completion object with the same number of entries duplicated ), but also have all the items available for every widget. Another option is to save the entries per domain much like cookies, javascript, java ; so that those entries are only available in the appropriate site ? I do not know it is a good idea, but it is definitely an option. BTW, I have not tried this feature in either Mozilla or IE so I do not know how it is supposed to work. Regards, Dawit A.