Fritz Zaucker wrote:
> Well, the API says that it expects an [][] ... that's what the current check
> enforces. May be, the length check could be added to that.
>
> On the other hand, one could also allow a NULL parameter and use that for
> resetting.
>
> But I think this should actually be consistent through all table models and
> thus be decided by the Qooxdoo-gods ...
>   
Well, the simple table does allow an empty array "[]" for setData. 
Perhaps smart table should also support it? Also, when I set data, it 
doesn't raise a "dataChanged" event like the simple table. Maybe smart 
table should call the super class method too, that way you don't need to 
write logic which is already written in simple table? Just my 2 cents :)
> I don't know. I am not even sure it is faster (although I would assume that
> it should be faster as it doesn't have to copy data) and it uses less memory
> (no copy of data).
>
> I just found SmartTableModel very elegant for implementing search as you
> type.
>   
Also, in the demo at 
SmartTableModel/trunk/demo/searchAsYouType/source/class/smart/searchAsYouType/Application.js,
 
the view "All" isn't used when the search field is empty. I think using 
it at line 132 like this would be optimal:
>
> this.debug('timer fired');
>           this.__searchTimer.stop();
>           if(this.search_field.getValue() == ""){
>             this.debug("Empty search field, showing all rows ...");
>             tableModel.updateView(this.views["All"].id);
>             tableModel.setView(this.views["All"].id);
>           } else {
>             this.debug("Showing rows matching search field ...");
>             tableModel.updateView(this.views["SearchAsYouType"].id);
>             tableModel.setView(this.views["SearchAsYouType"].id);
>           }
Now, there's no search happening if the search field is empty, except 
for the initial view computation at line 239 of Smart.js.

cheers,
skar.

-- 
--
The life so short, the craft so long to learn. 


------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to