[Dojo-interest] itemfilereadstores

Jean-Rubin Leonard jrleonard at gmail.com
Tue Aug 16 13:40:10 EDT 2011


The use of widget.get('value') is when you are trying to access a widget's
property. store.getValue is to return store data. They serve different
purpose and don't apply to the same objects.
JR

On Tue, Aug 16, 2011 at 12:12 PM, dojonewb <martingaleh at yahoo.com> wrote:

> Sorry, didn't mean to offend the person who invented this thing.  It's
> quite
> nice.
>
> I have more quesstions
> What's the best practice for using getValue?  If I make
>
> D = new fileitem etc...
>
> D.fetch(
>  {query: {},
>  onComplete: function(i){
>    now we're in the global scope.  Do we just always use hitch? like
>
>  onComplete: dojo.hitch(this, function(i)...
>
>
> Also, onComplete returns an object that holds all the items.  If I only
> expect
> one item back, I've just been doing item[0].somevalue
>
> But if we use D.getValue(item, 'value'), isn't that really meant for
> looping
> through the items?
>
> Do we just forEach through it and expect the loop to run once?
>
> Finally, I thought somehow getValue was going to be changed to
> widget.get('value') in some instances.  So that I"m ready for later, is
> get('value') not going to be made for itemfilereadstore because it's
> abundantly
> clear that we want the value?
>
> Thanks for the help.  Hopefully one day I'll get good enough at this that
> I'll
> need to use onBegin
>
> ________________________________________________________
> Dojotoolkit: http://dojotoolkit.org
> Reference Guide: http://dojotoolkit.org/reference-guide
> API Documentation: http://dojotoolkit.org/api
> Tutorials: http://dojotoolkit.org/documentation
>
> Dojo-interest at mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-interest/attachments/20110816/43044a7c/attachment.htm 


More information about the Dojo-interest mailing list