Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Class.observe() not working for Class.destroy() method

    SmartClient version: v11.1p_2017-07-19/LGPL Development Only
    Browser: Chrome version 49.0.2623.112 m

    It seems that in SmartClient version 9.0 and later, the Class.observe() method does not work when set up to observe calls to the destroy() method on object that extends Class. When I run the following code using SmartClient 8.3, clicking the "Destroy" button causes an alert box to pop up:

    isc.defineClass("DestroyListener");
    isc.DestroyListener.addProperties({
    sayDestroying: function() {
    isc.say("Destroying");
    }
    });

    var destroyListener = isc.DestroyListener.create();
    var object = isc.Class.create();
    destroyListener.observe(object, "destroy", "observer.sayDestroying()");

    isc.IButton.create({
    title: "Destroy",
    click: function() {
    object.destroy();
    }
    });


    When I run the same code using SmartClient version 9.0 or higher, clicking the button does not cause the alert box to pop up. I do not see any JavaScript error in the Chrome Developer Tools Console. Is there a way to get this working in version 9.0 or later?

    #2
    Thank you for the simple test. This issue is fixed in builds dated July 29 or later.

    Comment


      #3
      Thank you!

      Comment

      Working...
      X