[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: SWTError inserting an element in the toolbar
|
It sounds like you are leaking and Windows is running out of resources. Can
you recreate the error after commenting sections of your code? If you don't
create the tree, does the problem go away?
"Pepe" <jafloresg@xxxxxxxxxx> wrote in message
news:d55d4n$ro0$1@xxxxxxxxxxxxxxxxxxx
> Hi,
> We have a RCP Application that is creating a tree in a view. After
a
> long startup process, we create the tree control and we try to insert some
> elements.
> In some cases (we are not able to reproduce always), the insert
> process throws an SWTError:
>
>
> org.eclipse.swt.SWTError: Item not added
>
> at org.eclipse.swt.SWT.error(SWT.java:2717)
>
> at org.eclipse.swt.SWT.error(SWT.java:2616)
>
> at org.eclipse.swt.SWT.error(SWT.java:2587)
>
> at org.eclipse.swt.widgets.Widget.error(Widget.java:381)
>
> at org.eclipse.swt.widgets.Tree.createItem(Tree.java:285)
>
> at org.eclipse.swt.widgets.TreeItem.<init>(TreeItem.java:77)
>
> We have checked the source code of the Tree.createItem method:
>
> if (OS.SendMessage (handle, OS.TB_INSERTBUTTON, index, lpButton) == 0) {
> error (SWT.ERROR_ITEM_NOT_ADDED);
> }
>
> Looking the Windows API, it explains that when it can not insert the
> element, the TB_INSERTBUTTON message process return 0. But it doesn't
> explain in which conditions it can not insert the element. We have tried
to
> use the OS.GetLastError() method but always return 0;
>
> Why it can not insert the element? There is a tool, or a API to find the
> windows error?
> Can somebody help us?
>
> Thank you in advance
>
>