[ 
https://issues.apache.org/jira/browse/PIVOT-665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12927851#action_12927851
 ] 

Christian Schlichtherle edited comment on PIVOT-665 at 11/3/10 10:00 AM:
-------------------------------------------------------------------------

I mean it's not possible to even compile the code at 
http://pivot.apache.org/tutorials/menu-bars.html against Pivot 1.5.2. You'ld 
have to add a Component parameter to the Action.perform() methods first. Then, 
you would experience this exception.

The class e.schlichtherle.truemirror.gui.Main is just a renamed local copy of 
the MenuBar class of the tutorial with this change so that it compiles.

EDIT: I figured I have incorrectly changed the document to load in line 84 to 
the same WTKX file as in line 142. Unfortunately the document.wtkx file is 
missing on the tutorial page. Sorry.

You are telling me I should upgrade to 2.0 beta. I am fine to do so. Is there a 
way to download JARs, Javadoc and Tutorial code for Pivot 2.0 already? I dont 
want to check out the trunk and build everything myself using Ant.

      was (Author: christians):
    I mean it's not possible to even compile the code at 
http://pivot.apache.org/tutorials/menu-bars.html against Pivot 1.5.2. You'ld 
have to add a Component parameter to the Action.perform() methods first. Then, 
you would experience this exception.

The class e.schlichtherle.truemirror.gui.Main is just a renamed local copy of 
the MenuBar class of the tutorial with this change so that it compiles.

At this point I am left with a tutorial from your website that doesn't work 
with your latest release and I can't find updated tutorial code. Now you are 
telling me I should upgrade to 2.0 beta. I am fine to do so. Is there a way to 
download JARs, Javadoc and Tutorial code for Pivot 2.0 already? I dont want to 
check out the trunk and build everything myself using Ant.
  
> Menu bar tutorial does not work with Pivot 1.5.2
> ------------------------------------------------
>
>                 Key: PIVOT-665
>                 URL: https://issues.apache.org/jira/browse/PIVOT-665
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk
>    Affects Versions: 1.5.2
>         Environment: JDK 1.6.0_22; Windows Vista patched up to date.
>            Reporter: Christian Schlichtherle
>
> I can't get the tutorial at http://pivot.apache.org/tutorials/menu-bars.html 
> to work with Pivot 1.5.2. First I needed to add a Component parameter to 
> Action.perform() but now I am stuck with the following exception:
> java.lang.IllegalArgumentException: Window parent must be null or display.
>         at org.apache.pivot.wtk.Window.setParent(Window.java:400)
>         at org.apache.pivot.wtk.Container.insert(Container.java:151)
>         at org.apache.pivot.wtk.Container.add(Container.java:131)
>         at org.apache.pivot.wtk.Border.setContent(Border.java:113)
>         at org.apache.pivot.wtk.Border.<init>(Border.java:55)
>         at de.schlichtherle.truemirror.gui.Main$2.perform(Main.java:84)
>         at org.apache.pivot.wtk.Button.press(Button.java:367)
>         at org.apache.pivot.wtk.Menu$Item.press(Menu.java:214)
>         at 
> org.apache.pivot.wtk.skin.MenuItemSkin.mouseUp(MenuItemSkin.java:142)
>         at 
> org.apache.pivot.wtk.Component$ComponentMouseButtonListenerList.mouseUp(Component.java:462)
>         at org.apache.pivot.wtk.Component.mouseUp(Component.java:2610)
>         at org.apache.pivot.wtk.Container.mouseUp(Container.java:742)
>         at org.apache.pivot.wtk.Container.mouseUp(Container.java:742)
>         at org.apache.pivot.wtk.Container.mouseUp(Container.java:742)
>         at org.apache.pivot.wtk.Container.mouseUp(Container.java:742)
>         at org.apache.pivot.wtk.Container.mouseUp(Container.java:742)
>         at 
> org.apache.pivot.wtk.ApplicationContext$DisplayHost.processMouseEvent(ApplicationContext.java:874)
>         at java.awt.Component.processEvent(Component.java:6032)
>         at 
> org.apache.pivot.wtk.ApplicationContext$DisplayHost.processEvent(ApplicationContext.java:655)
>         at java.awt.Component.dispatchEventImpl(Component.java:4630)
>         at java.awt.Component.dispatchEvent(Component.java:4460)
>         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
>         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)
> I appears that new Border(Container container) tries to set the container as 
> it's own parent which makes no sense to me.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to