Git Product home page Git Product logo

Comments (5)

jpmckinney avatar jpmckinney commented on July 25, 2024

Code needs to be:

Child.__super__.foo.call(this);

Also, the Child's constructor won't call the Parent's constructor. You need to use __super__ if you want that.

from ajax-solr.

nlwillia avatar nlwillia commented on July 25, 2024

Thank you for clarifying. I got off on the inheritance trail because of something I observed with ParameterHashStore earlier this week, but your suggestion works and so does ParameterHashStore when I now test it in isolation, so I'll take another look at my code.

from ajax-solr.

nlwillia avatar nlwillia commented on July 25, 2024

So, funny story, the first thing I did in response to your suggestion was hop over to ParameterHashStore and add a call to the super constructor. ...Then I played with my example for a while and forgot I had changed ParameterHashStore when I went back to test it in isolation. In fact, without the explicit call, it does fail for the following example:

var Manager = new AjaxSolr.Manager({
    solrUrl: 'http://evolvingweb.ca/solr/reuters/'
});
Manager.setStore(new AjaxSolr.ParameterHashStore());
Manager.init();

An error occurs in ParameterHashStore.init on the expression "exposed.length" because exposed is undefined.

Sorry for the confusion, but unless I'm again missing something about the usage, it looks like ParameterHashStore needs to call the super constructor. Other classes (possibly ParameterYUIStore?) may have the same problem.

from ajax-solr.

jpmckinney avatar jpmckinney commented on July 25, 2024

Ah, good catch! I've pushed a fix. Let me know if it works now.

from ajax-solr.

nlwillia avatar nlwillia commented on July 25, 2024

Much better, thanks!

from ajax-solr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.