On Tue, 6 Oct 2009, skar wrote:

> Fritz Zaucker wrote:
>> Or neither should support it. But I agree, that all the models should handle
>> this consistently. My feeling is, that an empty array is not a [][], but I
>> am not sure ...
>>
> I think having zero rows must be possible for a table, and at least
> simple table supports it. If smart table also supports it, it'd be nice.

I am not arguing against zero rows. My only concern is, that currently an
undocumented feature (passing [] instead of [][]) is used to zero it.

>> I will make a separate post to the mailing list on that question, I think at
>> the moment it is buried too deeply in the SmartTableModel thread and might
>> not get the attention of the powers in charge ...
>>
> Yup, a separate thread is good.

Will do.

>> BTW, it might not be so trivial to allow an empty array in Smart.setData()
>> and just return if length==0. If you look at the code for setData(), you'll
>> see that there are several calls to routines updating indices, etc.
>>
> Yes, it needs a little thinking which I didn't do :)

:-)

>> And note, there is also a call to __clearSelection()! So your previous
>> problem with the selection not being cleared is most likely not a bug, but
>> caused by you returning from setData() before this line is reached?
>
> Yup, I wasn't clearing it properly, now it works fine :)

Good.

>> Yes, I will update the demo as you suggest. I am not sure if update of the
>> "All" view is necessary at all.
>
> Yup, it isn't necessary to expose it to the user. It can be a hidden
> default view which is shown when the search field value is empty "".
> Also the smart view also is checking every row against the search field
> value when the data from the server is set and the search field is still
> empty. I think the initial All and Smart view should be equivalent and
> shouldn't do any search at all, since both all and smart view would be
> the same.

It's just a demo, not an implementation of a SmartTableModel method ... ;-)

Perhaps that could be done, but I am not sure how to abstract it enough,
e.g. in case of multiple searchable columns ...

Cheers,
Fritz

-- 
Oetiker+Partner AG              tel: +41 62 775 9903 (direct)
Fritz Zaucker                        +41 62 775 9900 (switch board)
Aarweg 15                            +41 79 675 0630 (mobile)
CH-4600 Olten                   fax: +41 62 775 9905
Schweiz                         web: www.oetiker.ch

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to