Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SWT TableColumn - SWTError - "Cannot set text"

 
Jay Damon
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recently encountered a scenario where attempting to set the text for an SWT TableColumn widget fails with an InvocationTargetException / SWTError and the message "Cannot set text". There is nothing special about the column text, i.e. no special characters or mnemonics. It just fails. The same code works for other scenarios.

I took a look at the SWT source for the TableColumn class and found only one place where the "Cannot set text" error is thrown - see code fragment below - but I cannot see why I should have encountered a problem.

Any suggestions as to what the problem may be would be appreciated. Thanks!

 
Jay Damon
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I have found the problem. After performing additional testing, this appears to be a "No more handles" issue although that was NOT the exception message I received initially. Apparently SWT imposes a hard limit that only allows SWT widgets to be nested up to 50 deep. Adding an additional widget, regardless of type, triggers a "No more handles" exception.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic