1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    2
    Vote Rating
    0
    ulrich.b is on a distinguished road

      0  

    Default Unanswered: Override Model.isEqual()

    Unanswered: Override Model.isEqual()


    My model class contains an array field. My problem is that, the standard Model-class doesn't recognize a set()-call with the same value, because the isEqual()-Method just uses the === operator.

    Is it a good idea to overwrite the isEqual()-method? In the documentation it's marked with @private. What exactly does this annotation mean?

  2. #2
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,114
    Answers
    83
    Vote Rating
    30
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    I think your can override it for that specific model. But === does type comparison, isn't is possible to cast the input in the correct type?

    Private means very often: 'not in the docs'. So you are not sure the function is still there with the next release. But this one I think you can override, no problem.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    2
    Vote Rating
    0
    ulrich.b is on a distinguished road

      0  

    Default


    Many thanks for your answer.

    Quote Originally Posted by tvanzoelen View Post
    But === does type comparison, isn't is possible to cast the input in the correct type?
    Thats not possible, because the JavaScript === operator works just for scalar values, and I have an array (i.e. the expression [] === [] or {}==={} both return false).

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi