Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    583
    Vote Rating
    9
    Dumas will become famous soon enough

      0  

    Default Documentation bug in Ext.data.Store::add

    Documentation bug in Ext.data.Store::add


    REQUIRED INFORMATION




    Sencha Touch version tested:
    • Sencha Touch 2.x documentaiton

    Description:
    • The documentation claims that it takes an array of model instances, but in the example it also takes an model configurations.
    • Also there is often used a singular (model), which is confusing. I had to check the source to be sure how to use it.
      http://docs.sencha.com/touch/2-0/#!/...ore-method-add

    The result that was expected:
    • Please make possible usages clearer.
      myStore.add({some: 'data2'}, {some: 'other data2'});
      myStore.add([{some: 'data2'}, {some: 'other data2'}]);
      myStore.add(new MyApp.data.MyModel({some: 'data2'}));
      ...
    Best regards,
    Roland

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,652
    Vote Rating
    901
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    In 2.1 the accepted has been changed to

    Ext.data.Model[]/Ext.data.Model... model
    So it says it can accept an array and a single model. In the example it also shows that it can accept single config objects.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    583
    Vote Rating
    9
    Dumas will become famous soon enough

      0  

    Default


    Ok, the first sentence is not really english "Adds Model instance to the Store. ", but the rest seems ok.

    Bug can be closed.

Thread Participants: 1