1. #1
    Sencha User
    Join Date
    Mar 2013
    Posts
    18
    Vote Rating
    2
    BridgeSense is on a distinguished road

      0  

    Default Unanswered: (DataItem) Is record.get the same as record.data?

    Unanswered: (DataItem) Is record.get the same as record.data?


    I noticed in the updateRecord function that i can handle my data using either record.get('someField') or record.data.someField. Are they both the same or record.data.someField more static?

    I created some DataItems so that several components would keep up to date with the changes to the database auto-magically.

    My issue is that all of my models have associations (nestled fields). In order for me to iterate through the nestled fields to build my components, I've been using record.data. I haven't figured out the equivalent record.get command.

    I just want to be sure that using the record.data nomenclature will allow for the components to dynamically update the same way as record.get would.

    Thanks!

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,522
    Answers
    3447
    Vote Rating
    814
    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


    They both will function the same. You could technically change the data property to another name and that's where the get method will handle it.
    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.

Thread Participants: 1