Go Back   SmartClient Forums > Technical Q&A
Wiki Register Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 3rd Aug 2012, 07:32
ThomasH ThomasH is offline
Registered Developer
 
Join Date: Aug 2009
Posts: 119
Default 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
Reply With Quote
  #2  
Old 3rd Aug 2012, 09:31
Isomorphic Isomorphic is offline
Administrator
 
Join Date: May 2006
Posts: 30,516
Default

ISC_Drawing should be loaded last out of that list - only ISC_Charts comes after.
Reply With Quote
  #3  
Old 6th Aug 2012, 00:23
ThomasH ThomasH is offline
Registered Developer
 
Join Date: Aug 2009
Posts: 119
Default

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>
Reply With Quote
  #4  
Old 6th Aug 2012, 09:52
Isomorphic Isomorphic is offline
Administrator
 
Join Date: May 2006
Posts: 30,516
Default

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.
Reply With Quote
  #5  
Old 8th Aug 2012, 07:11
ThomasH ThomasH is offline
Registered Developer
 
Join Date: Aug 2009
Posts: 119
Default

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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
DrawPane doesn't display barrettt Smart GWT Technical Q&A 3 17th May 2012 18:17
Drawing Canvas gsaxena Smart GWT Technical Q&A 41 8th Mar 2012 16:36
Problems with FormItems rainer_ac Smart GWT Technical Q&A 0 28th Jun 2011 07:21
Keyboard scrolling problems with ListGrid and Chrome AW Smart GWT Technical Q&A 3 28th Apr 2010 20:27
GUI problems with showcase on Linux mgbf Smart GWT Technical Q&A 2 29th Nov 2009 10:21

© 2010,2011 Isomorphic Software. All Rights Reserved