Announcement

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

    Problems showing DrawLabel

    Hi,

    I have a strange problem, executing:
    Code:
    isc.VLayout.create({
    	autoDraw:true,
    	id: "drawPaneLayout",
    	showEdges: true,
    	height: 500,
    	width: 400,
    	members: [
    		isc.DrawPane.create({
    			ID: "mainPane",
    			showEdges: true,
    			width: '100%',
    			height: '100%',
    			overflow: "hidden",
    			cursor: "auto",
    			canDrag:true,
    			drawItems: [
    				isc.DrawLabel.create({        
    					left: 1,
    					top: 1,
    					contents: "Hello World"
    				})
    			]	
    
    		})
    	]
    });
    In any SmartClient Example Browser tab works as expected. I shows “Hello World”

    But executing the same code in a HTML file:
    Code:
    <HTML>
     <HEAD>
      <SCRIPT>var isomorphicDir="/isomorphic/";</SCRIPT>
      <SCRIPT SRC=/isomorphic/system/modules/ISC_Core.js></SCRIPT>
      <SCRIPT SRC=/isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
      <SCRIPT SRC=/isomorphic/system/modules/ISC_Containers.js></SCRIPT>
      <SCRIPT SRC=/isomorphic/system/modules/ISC_Drawing.js></SCRIPT>
      <SCRIPT SRC=/isomorphic/system/modules/ISC_Grids.js></SCRIPT>
      <SCRIPT SRC=/isomorphic/system/modules/ISC_Forms.js></SCRIPT>
      <SCRIPT SRC=/isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
      <SCRIPT SRC=/isomorphic/system/modules/ISC_RichTextEditor.js></SCRIPT>
      <SCRIPT SRC=/isomorphic/skins/Enterprise/load_skin.js></SCRIPT>
     </HEAD>
     <BODY>
     <SCRIPT>
    isc.VLayout.create({
    	autoDraw:true,
    	id: "drawPaneLayout",
    	showEdges: true,
    	height: 500,
    	width: 400,
    	members: [
    		isc.DrawPane.create({
    			ID: "mainPane",
    			showEdges: true,
    			width: '100%',
    			height: '100%',
    			overflow: "hidden",
    			cursor: "auto",
    			canDrag:true,
    			drawItems: [
    				isc.DrawLabel.create({        
    					left: 1,
    					top: 1,
    					contents: "Hello World"
    				})
    			]	
    
    		})
    	]
    });
    </SCRIPT>
    </BODY>
    </HTML>
    does not show “Hello World”. It shows an empty DrawPane.

    Can you please give me a hint what I´m doing wrong?

    Greetings Thomas

    #2
    ISC_Drawing should be loaded last out of that list - only ISC_Charts comes after.

    Comment


      #3
      OK, I put ISC_Drawing at the last position like below. But it still does not show "Hello World".

      Code:
      <HTML>
       <HEAD>
        <SCRIPT>var isomorphicDir="/isomorphic/";</SCRIPT>
        <SCRIPT SRC=/isomorphic/system/modules/ISC_Core.js></SCRIPT>
        <SCRIPT SRC=/isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
        <SCRIPT SRC=/isomorphic/system/modules/ISC_Containers.js></SCRIPT>
        <SCRIPT SRC=/isomorphic/system/modules/ISC_Grids.js></SCRIPT>
        <SCRIPT SRC=/isomorphic/system/modules/ISC_Forms.js></SCRIPT>
        <SCRIPT SRC=/isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
        <SCRIPT SRC=/isomorphic/system/modules/ISC_RichTextEditor.js></SCRIPT>
        <SCRIPT SRC=/isomorphic/skins/Enterprise/load_skin.js></SCRIPT>
        <SCRIPT SRC=/isomorphic/system/modules/ISC_Drawing.js></SCRIPT>
       </HEAD>
       <BODY>
       <SCRIPT>
      isc.VLayout.create({
      	autoDraw:true,
      	id: "drawPaneLayout",
      	showEdges: true,
      	height: 500,
      	width: 400,
      	members: [
      		isc.DrawPane.create({
      			ID: "mainPane",
      			showEdges: true,
      			width: '100%',
      			height: '100%',
      			overflow: "hidden",
      			cursor: "auto",
      			canDrag:true,
      			drawItems: [
      				isc.DrawLabel.create({        
      					left: 1,
      					top: 1,
      					contents: "Hello World"
      				})
      			]	
      
      		})
      	]
      });
      </SCRIPT>
      </BODY>
      </HTML>

      Comment


        #4
        We're seeing "Hello World" show up as expected. Can you try this just in a plain SDK with no customizations and outside the context of your application?

        Also, load_skin.js does come after ISC_Drawing - it comes after all ISC_* modules. But it wouldn't cause this issue.

        Comment


          #5
          We have no customizations of the SmartClient code.

          I found the solution for us. Setting autoDraw: false in the draw pane shows “Hello World”.

          The position of ISC_Drawing is arbitrary.

          Comment

          Working...
          X