[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: StyledText issue

The eclipse 3.4 release is scheduled for the end of June.

"dnise" <dnise@xxxxxxxxxxx> wrote in message
news:frn8ed$74m$1@xxxxxxxxxxxxxxxxxxxx
> Christian wrote:
>
> > dnise schrieb:
> >> dnise wrote:
> >>
> >>> HI All:
> >>> I met a strange problem in SWT developing.  I can entry into my
> >>> application when i start up it, the MenuBar,ToolBar and other
Interface
> >>> of my
> >>> application can be shown completely. There is an other  sub-Interface
> >>> which includes some StyleText Cotrol in application.
> >>> the whole system would be crash while clicking this menu that can
entry
> >>> this sub-interface. what's the problem with it ?
> >>> can anyone tell me ? Exceptions as follows:
> >>>
> >>> java.lang.IllegalArgumentException: Argument not valid
> >>>         at org.eclipse.swt.SWT.error(Unknown Source)
> >>>         at org.eclipse.swt.SWT.error(Unknown Source)
> >>>         at org.eclipse.swt.SWT.error(Unknown Source)
> >>>         at org.eclipse.swt.graphics.TextLayout.getLineIndex(Unknown
> >>>         Source) at
> >>>         org.eclipse.swt.custom.StyledText.getOffsetAtPoint(Unknown
> >>>         Source) at
org.eclipse.swt.custom.StyledText.doPageDown(Unknown
> >>>         Source) at
> >>>         org.eclipse.swt.custom.StyledText.invokeAction(Unknown Source)
> >>>         at org.eclipse.swt.custom.StyledText.handleKey(Unknown Source)
> >>>         at org.eclipse.swt.custom.StyledText.handleKeyDown(Unknown
> >>>         Source) at
> >>>         org.eclipse.swt.custom.StyledText$7.handleEvent(Unknown
Source)
> >>>         at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown
Source)
> >>>         at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at
> >>>         org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at
> >>>         org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at
> >>>         org.eclipse.swt.widgets.Widget.sendKeyEvent(Unknown Source) at
> >>>         org.eclipse.swt.widgets.Widget.gtk_key_press_event(Unknown
> >>>         Source) at
> >>>         org.eclipse.swt.widgets.Control.gtk_key_press_event(Unknown
> >>>         Source) at
> >>>         org.eclipse.swt.widgets.Composite.gtk_key_press_event(Unknown
> >>>         Source) at org.eclipse.swt.widgets.Widget.windowProc(Unknown
> >>>         Source) at org.eclipse.swt.widgets.Control.windowProc(Unknown
> >>>         Source) at org.eclipse.swt.widgets.Display.windowProc(Unknown
> >>>         Source) at
> >>>         org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native
> >>>         Method) at
> >>>         org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(Unknown
> >>>         Source) at org.eclipse.swt.widgets.Display.eventProc(Unknown
> >>>         Source) at
> >>>
org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native
> >>>         Method) at
> >>>
org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(Unknown
> >>>         Source) at
> >>>         org.eclipse.swt.widgets.Display.readAndDispatch(Unknown
Source)
> >>>         at
> >>>
> net.heartsome.xlfedit.view.XLFEditMain.show(XLFEditMain.java:4192)
> >>>         at
> >>>
> net.heartsome.xlfedit.view.XLFEditMain.main(XLFEditMain.java:4207)
> >>>
> >>> Thanks in advance.
> >>>
> >>> Dnise
> >>>
> >>> 2008-03-12
> >>
> >> HI all:
> >> I'm sorry i made a mistake.I can entry into the system while i clicking
> >> the meun. It would be crash when the StyledText was refreshed . It
seems
> >> as if there was a String "E28029" in the StyledText.It would be crash
> >> when it contained "E28929" . can anyone tell me what's the problem?
> >>
> >> thanks in advance..
> >>
> >>
> >> best regards
> >>
> >> dinse
> >
> >
> > it looks like as if you are determining the Current Text under the mouse
> > with the method StyledText.getOffsetAtPoint( Point)
> >
> > Though if no text is under this method an IllegalArgumentException will
> > be thrown.
> > I can't tell you how to circumvent this RuntimeExceptions... just came
> > to this problem and the only solution for me was to catch it ... ugly
> > but seems to work.
>
>
> Hi all:
> Thanks for you reply. I have solved this problem through catching
> Exceptions and returning the index "-1".Then it's work.But I thought It's
> not a good solution.If anyone has better advice,please tell me. by the
way,
> when will the eclipse 3.4 release? I hope it's not  long time.
>
>
> best regards
>
> Dnise