Results 1 to 4 of 4

Thread: Why Operation Object Change his properties adding '_' before the name

  1. #1
    Sencha Premium Member
    Join Date
    Sep 2011
    Posts
    13

    Default Why Operation Object Change his properties adding '_' before the name

    In previous versions of ExtJs i use to work overriding the method doRequest of the class "Ext.data.proxy.Server". After imported all my project to 5.1 from 4.2, i start to receive errors message saying: params not exist or proxy not exist. This properties exists in the object request after the exiecution of this sentence request = me.buildRequest(operation, callback, scope). I debug the js file and in 5.1 all of this properties appears with '_' before.
    This is correct?? I have to search all the code and change evrithing with this new form of treat this properties? In the help on you web this properties appears normal without '_'.
    Anybody can put more clear for me this questions?

    Thanks Gonzalo.

  2. #2
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Answers
    512

    Default

    And what if you use getters instead of accessing properties directly? Instead of this._something try this.getSomething().
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


  3. #3
    Sencha Premium Member
    Join Date
    Sep 2011
    Posts
    13

    Default thanks, using the method fix the problem

    Quote Originally Posted by jsakalos View Post
    And what if you use getters instead of accessing properties directly? Instead of this._something try this.getSomething().
    But why the change in the behavior of that properties, why now they have this '_', but in the help there is nothing about that symbol, the properties exists but without it. Do you know something?

    Thanks. Gonzalo.

  4. #4
    Sencha User
    Join Date
    Jun 2008
    Posts
    242
    Answers
    22

    Default

    See http://docs.sencha.com/extjs/5.1/5.1...ass-cfg-config

    Config: {} properties are now protected so the convention is to use _, I suppose.

    Sencha?

Similar Threads

  1. Replies: 0
    Last Post: 12 Jun 2011, 10:39 AM
  2. change properties for node object
    By amt779 in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 16 Aug 2010, 3:43 AM
  3. Replies: 13
    Last Post: 21 Jul 2010, 11:12 AM
  4. Can i change object properties...?
    By rvent in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 30 May 2008, 12:21 PM
  5. Beginner: Adding properties to Datastore object...
    By violinista in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 15 May 2007, 9:19 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •