You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Duto <ol...@pasteur.fr> on 2011/03/27 11:19:26 UTC

java.lang.IndexOutOfBoundsException: index -1 out of bounds

Hello, 

I get  this error :
java.lang.RuntimeException: Error getting property "text" for type
org.apache.pivot.wtk.TextArea.
	at org.apache.pivot.beans.BeanAdapter.get(BeanAdapter.java:237)
	at org.apache.pivot.beans.BeanAdapter.get(BeanAdapter.java:44)
	at
org.apache.pivot.beans.NamespaceBinding.getTransformedSourceValue(NamespaceBinding.java:219)
	at
org.apache.pivot.beans.NamespaceBinding$2.propertyChanged(NamespaceBinding.java:77)
	at
org.apache.pivot.beans.BeanMonitor$PropertyChangeListenerList.propertyChanged(BeanMonitor.java:83)
	at
org.apache.pivot.beans.BeanMonitor$BeanInvocationHandler.invoke(BeanMonitor.java:45)
	at $Proxy10.textChanged(Unknown Source)
	at
org.apache.pivot.wtk.TextArea$TextAreaContentListenerList.textChanged(TextArea.java:518)
	at
org.apache.pivot.wtk.TextArea$ParagraphSequence.remove(TextArea.java:421)
	at org.apache.pivot.wtk.TextArea.setText(TextArea.java:722)
	at org.apache.pivot.wtk.TextArea.setText(TextArea.java:667)
	at net.libertyland.gui.component.LoginSheet.initialize(LoginSheet.java:107)
	at
org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:521)
	at
org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:883)
	at
org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:435)
	at
org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:614)
	at
org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:568)
	at net.libertyland.gui.Danly.startup(Danly.java:31)
	at
org.apache.pivot.wtk.DesktopApplicationContext$2.run(DesktopApplicationContext.java:594)
	at
org.apache.pivot.wtk.ApplicationContext$QueuedCallback.run(ApplicationContext.java:1474)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
	at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.IndexOutOfBoundsException: index -1 out of bounds.
	at
org.apache.pivot.collections.ArrayList.verifyIndexBounds(ArrayList.java:577)
	at org.apache.pivot.collections.ArrayList.get(ArrayList.java:346)
	at org.apache.pivot.wtk.TextArea.getParagraphAt(TextArea.java:853)
	at org.apache.pivot.wtk.TextArea.getText(TextArea.java:632)
	at org.apache.pivot.wtk.TextArea.getText(TextArea.java:606)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.pivot.beans.BeanAdapter.get(BeanAdapter.java:232)
	... 27 more

If I use this bxml file :


	function displayError(text) {
		return text != null &amp;&amp; text != "";
	}



	
		
	


Best regards

Duto


--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/java-lang-IndexOutOfBoundsException-index-1-out-of-bounds-tp2738505p2738505.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: java.lang.IndexOutOfBoundsException: index -1 out of bounds

Posted by Greg Brown <gk...@verizon.net>.
Can you submit a JIRA ticket and provide a small code sample that demonstrates the issue? Thanks.
G

On Mar 27, 2011, at 5:19 AM, Duto wrote:

> Hello, 
> 
> I get  this error :
> java.lang.RuntimeException: Error getting property "text" for type
> org.apache.pivot.wtk.TextArea.
> 	at org.apache.pivot.beans.BeanAdapter.get(BeanAdapter.java:237)
> 	at org.apache.pivot.beans.BeanAdapter.get(BeanAdapter.java:44)
> 	at
> org.apache.pivot.beans.NamespaceBinding.getTransformedSourceValue(NamespaceBinding.java:219)
> 	at
> org.apache.pivot.beans.NamespaceBinding$2.propertyChanged(NamespaceBinding.java:77)
> 	at
> org.apache.pivot.beans.BeanMonitor$PropertyChangeListenerList.propertyChanged(BeanMonitor.java:83)
> 	at
> org.apache.pivot.beans.BeanMonitor$BeanInvocationHandler.invoke(BeanMonitor.java:45)
> 	at $Proxy10.textChanged(Unknown Source)
> 	at
> org.apache.pivot.wtk.TextArea$TextAreaContentListenerList.textChanged(TextArea.java:518)
> 	at
> org.apache.pivot.wtk.TextArea$ParagraphSequence.remove(TextArea.java:421)
> 	at org.apache.pivot.wtk.TextArea.setText(TextArea.java:722)
> 	at org.apache.pivot.wtk.TextArea.setText(TextArea.java:667)
> 	at net.libertyland.gui.component.LoginSheet.initialize(LoginSheet.java:107)
> 	at
> org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:521)
> 	at
> org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:883)
> 	at
> org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:435)
> 	at
> org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:614)
> 	at
> org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:568)
> 	at net.libertyland.gui.Danly.startup(Danly.java:31)
> 	at
> org.apache.pivot.wtk.DesktopApplicationContext$2.run(DesktopApplicationContext.java:594)
> 	at
> org.apache.pivot.wtk.ApplicationContext$QueuedCallback.run(ApplicationContext.java:1474)
> 	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
> 	at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
> 	at
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
> 	at
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
> 	at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
> 	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
> 	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
> 	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
> Caused by: java.lang.IndexOutOfBoundsException: index -1 out of bounds.
> 	at
> org.apache.pivot.collections.ArrayList.verifyIndexBounds(ArrayList.java:577)
> 	at org.apache.pivot.collections.ArrayList.get(ArrayList.java:346)
> 	at org.apache.pivot.wtk.TextArea.getParagraphAt(TextArea.java:853)
> 	at org.apache.pivot.wtk.TextArea.getText(TextArea.java:632)
> 	at org.apache.pivot.wtk.TextArea.getText(TextArea.java:606)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.pivot.beans.BeanAdapter.get(BeanAdapter.java:232)
> 	... 27 more
> 
> If I use this bxml file :
> 
> 
> 	function displayError(text) {
> 		return text != null &amp;&amp; text != "";
> 	}
> 
> 
> 
> 	
> 		
> 	
> 
> 
> Best regards
> 
> Duto
> 
> 
> --
> View this message in context: http://apache-pivot-users.399431.n3.nabble.com/java-lang-IndexOutOfBoundsException-index-1-out-of-bounds-tp2738505p2738505.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.


Re: java.lang.IndexOutOfBoundsException: index -1 out of bounds

Posted by Duto <ol...@pasteur.fr>.
Oki I think I understand the problem :

It's due to the TextArea component haven't a text property, the accessor set
and get build text.

Duto

--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/java-lang-IndexOutOfBoundsException-index-1-out-of-bounds-tp2738505p2738661.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.