Giter Site home page Giter Site logo

Comments (6)

akudev avatar akudev commented on May 29, 2024

Hi,

not sure I get the point... this scenario works fine for e.g. commons.DropdownBoxRenderer and also a simple definition like:
var r1 = sap.ui.core.Renderer.extend(sap.ui.commons.ButtonRenderer);
var r2 = sap.ui.core.Renderer.extend(r1);
works. And I don't immediately see where "_super" is overwritten.
Can you provide a failing jsbin example?

Thanks
Andreas

from openui5.

cmastrandrea avatar cmastrandrea commented on May 29, 2024

This happens when extending the PanelRenderer, since it has a static function object:

var r1 = sap.ui.core.Renderer.extend(sap.ui.commons.PanelRenderer);
var r2 = sap.ui.core.Renderer.extend(r1);

from openui5.

akudev avatar akudev commented on May 29, 2024

Doesn't fail for me...:
http://jsbin.com/qecuyuyu/1/edit

from openui5.

cmastrandrea avatar cmastrandrea commented on May 29, 2024

Modified example at http://jsbin.com/qecuyuyu/7/edit shows the failure. If you look in the console, you'll see "Uncaught TypeError: Cannot read property 'apply' of undefined" errors.

from openui5.

machwitt avatar machwitt commented on May 29, 2024

Dear cmastrandrea,
Thank you very much for reporting this one
I forwarded this internally as ticket 0120031469 0000770032 2014.

Best regards,
Martin

from openui5.

machwitt avatar machwitt commented on May 29, 2024

Dear cmastrandrea,
just received some feedback on this one: As a workaround, you could rely on the renderer inheritance that Notepad controls provide:

If you specify a renderer as object literal or function, the Notepad controls automatically let that object inherit from the renderer of the base class. and this inheritance does not use the Renderer.extend
but an improved implementation based on a prototype chain.

Nevertheless, this issue is still open and we need to be workon it.

Best Regards,
Martin

from openui5.

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.