Announcement

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

    DrawRect and mouse events

    Hi,

    how can the events of a DrawRect be configured?
    The follwing code does not fire any event.

    What I´m doing wrong here?

    Greetings Thomas

    Code:
    isc.VLayout.create({
    	id: "drawPaneLayout",
    	autoDraw: true,
    	height: "100%",
    	width: "100%",
    	members: [
    		isc.DrawPane.create({
    			ID: "drawPane",
    			autoDraw: false,
    			cursor: "default",
    			height: "100%",
    			drawItems: [
    				isc.DrawRect.create({
    					id: "drawPaneRect",
    					mouseOut: function() {alert("mouseOut");},
    					mouseOver: function() {alert("mouseOver");},
    					mouseMove: function() {alert("mouseMove");},
    					mouseDown: function() {alert("mouseDown");},
    					mouseUp: function() {alert("mouseUp");},
    					width: 140,	
    					height: 140,
    					left: 60,
    					top: 60
    				})
    			]
    		})
    	]
    });

    #2
    Possibly you are using 3.0 whereas event support was added in 3.1?

    Comment


      #3
      Sorry, what do you mean with 3.0 instead 3.1? SmartGWT? The example above is in JavaScript using SmartClient 8.2.

      You men SmartClient 8.3? The events are also not working with SC 8.3.

      What can be done in order to use the events with DrawItems?

      Greetings Thomas

      Comment


        #4
        Hi Thomas
        We're having trouble reproducing this issue.

        If you haven't already, please try the latest nightly build from http://smartclient.com/builds
        You can also verify exactly which SmartClient build you're using by evaluating "isc.version" in the developer console.

        If the issue persists with the latest nightly build, we'd be interested in knowing:

        - which browser(s) (and operating system) are you seeing the issue on?
        - how exactly are you deploying this test code (running in the Feature Explorer or in a separate standalone HTML page?) If you're loading this in a separate HTML page, can you show us the full source of that HTML page (there may be some subtle setting such as the doctype of the page, or something to do with the modules being loaded that is causing this behavior for you).

        Regards
        Isomorphic Software

        Comment


          #5
          Hi,

          with SmartClient v82p_2012-08-15_Pro no events are working.

          With SmartClient SNAPSHOT_v83d_2012-08-15_Pro all events are working beside "mouseOut". The event "mouseOut" leads to "Maximum call stack exceeded" after some time.

          Could you please also fix the issue that the Drawing documentation is not available in the pro build?
          http://forums.smartclient.com/showthread.php?t=23028

          Greetings Thomas

          Comment


            #6
            We're not seeing the problem with mouseOut leading to a maximum call stack exceeded error.
            Two things to consider on this:
            1) There is a fair chance this is a case where the native alert is interfering with normal browser events in a way that leads to this error. We'd recommend you rework your test to use logWarn rather than alert calls to verify the events are firing and see if the error persists.
            2) If it does persist, since it's working for us, we suspect this is browser-specific. Can you let us know what browser and operating system you're using when you encounter the error, and also whether you are literally copy/pasting the above code into a feature explorer example "source" window to execute, or whether you're running the code from a standalone HTML page. If a standalone page, please include the full source of that page.

            Thanks
            Isomorphic Software

            Comment


              #7
              Hi,

              the example above with isc.say() has made the trouble as event handler.

              Normal event handling works like expected.

              Thank you for the hints.

              Greetings Thomas

              Comment

              Working...
              X