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

Reply
 
Thread Tools Search this Thread
  #1  
Old 16th May 2012, 06:11
davidbo davidbo is offline
Registered Developer
 
Join Date: May 2012
Posts: 1
Default How to update an existing DrawItem?

Hi,
I'm using smartGwt version 3.0 and FF browser.
I'm creating a graph of nodes (Canvas objects) connected by DrawLinePath. When the user moves a node, I'd like to re-position the line.
My problem is that I cannot find a way to update the position of an existing line. The only alternative I found is to erase the old line and create a new one. Is it the correct practice?
Two related questions:
1) should I call erase() or destroy() method on the old line?
2) sometimes when I erase() an old line I get a
WARN:DrawLinePath:isc_DrawLinePath_43:DrawItem not yet drawn - exiting erase()
How can I check whether a line was already drawn (and need to be erased) or not?

Thanks for the help, David
Reply With Quote
  #2  
Old 16th May 2012, 10:16
Isomorphic Isomorphic is offline
Administrator
 
Join Date: May 2006
Posts: 30,535
Default

At the moment, yes, the simplest thing is to destroy() and re-create a DrawLinePath that you want to modify. Using destroy() will avoid the error message related to erase() as well.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
DSRequest Update requires non-empty value error parthsavi Smart GWT Technical Q&A 1 11th Apr 2012 09:05
ListGrid Group Summary updating on add/remove but not on update? dsammut Smart GWT Technical Q&A 3 9th Apr 2012 21:19
Strange values serialization archie01 Smart GWT Technical Q&A 2 15th Jan 2012 21:42
Is it possible to update an existing FacetChart with new data? jay.l.fisher Smart GWT Technical Q&A 2 19th Nov 2011 17:17
To get the records as such in the bean into the update method. Triumph Technical Q&A 4 20th Feb 2008 08:49

© 2010,2011 Isomorphic Software. All Rights Reserved