You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by JohnRodey <ti...@yahoo.com> on 2010/03/05 21:16:11 UTC

Question about Menu

Im trying to add a right-click style menu to a tableview to basically show
detailed information about a selected entry in the table.  Except I can't
get it to come up without a check mark beside it.  If I mark
toggleButton="false" I get the following exception:

An error occurred while processing  element <Menu.Item> starting at line
number 24 in file
http://localhost:8080/myproject/lib/myproject_pivot.jar!/com/pivot/searcher/menu.wtkx:
java.lang.IllegalStateException: Button is not in toggle mode.
	at org.apache.pivot.wtk.Button.setButtonGroup(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             ...

My wtkx:
Menu.Item buttonData="Display Details" toggleButton="false"
buttonGroup="$myMenuGroup" action="displayDetailedDataAction"/>


Any ideas?
-- 
View this message in context: http://n3.nabble.com/Question-about-Menu-tp431134p431134.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: Question about Menu

Posted by JohnRodey <ti...@yahoo.com>.
Thanks!  That did the trick
-- 
View this message in context: http://n3.nabble.com/Question-about-Menu-tp431134p435451.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: Question about Menu

Posted by Greg Brown <gk...@mac.com>.
Looks like you are adding it to a button group. That is what is causing the check mark to appear. If you don't need this behavior, you can simply remove the buttonGroup attribute.

On Mar 5, 2010, at 3:16 PM, JohnRodey wrote:

> 
> Im trying to add a right-click style menu to a tableview to basically show
> detailed information about a selected entry in the table.  Except I can't
> get it to come up without a check mark beside it.  If I mark
> toggleButton="false" I get the following exception:
> 
> An error occurred while processing  element <Menu.Item> starting at line
> number 24 in file
> http://localhost:8080/myproject/lib/myproject_pivot.jar!/com/pivot/searcher/menu.wtkx:
> java.lang.IllegalStateException: Button is not in toggle mode.
> 	at org.apache.pivot.wtk.Button.setButtonGroup(Unknown Source)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>             ...
> 
> My wtkx:
> Menu.Item buttonData="Display Details" toggleButton="false"
> buttonGroup="$myMenuGroup" action="displayDetailedDataAction"/>
> 
> 
> Any ideas?
> -- 
> View this message in context: http://n3.nabble.com/Question-about-Menu-tp431134p431134.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.