Issue 7276 in pharo: [BUG]: Menu item goes to wrong parent

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 7276 in pharo: [BUG]: Menu item goes to wrong parent

pharo
Status: Accepted
Owner: [hidden email]
CC: [hidden email]
Labels: Type-Bug

New issue 7276 by [hidden email]: [BUG]: Menu item goes to wrong  
parent
http://code.google.com/p/pharo/issues/detail?id=7276

Pharo2.0a
Latest update: #20476

Given:
menuCommandOn: aBuilder
        <worldMenu>
       
        (aBuilder item: #'MyParent')
                with: [
                        (aBuilder item: #'MyChild')
                                action: [ self open ] ].

If there is an existing item in the menu named 'MyParent', then my child  
goes under it, instead of the one specified.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7276 in pharo: [BUG]: Menu item goes to wrong parent

pharo

Comment #1 on issue 7276 by [hidden email]: [BUG]: Menu item goes to  
wrong parent
http://code.google.com/p/pharo/issues/detail?id=7276

This is a bug introduced in 2.0. It did not occur in 1.4 14459


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7276 in pharo: [BUG]: Menu item goes to wrong parent

pharo

Comment #2 on issue 7276 by [hidden email]: [BUG]: Menu item goes to  
wrong parent
http://code.google.com/p/pharo/issues/detail?id=7276

I do not understand what the bug is ?

The snippet you provide add an entry MyChild under the item MyParent

What is the problem ?


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7276 in pharo: [BUG]: Menu item goes to wrong parent

pharo
Updates:
        Cc: [hidden email]

Comment #3 on issue 7276 by [hidden email]: [BUG]: Menu item goes to  
wrong parent
http://code.google.com/p/pharo/issues/detail?id=7276

It works except when there is existing item with the same name as the  
parent...

ClassOne class>>menuCommandOn: aBuilder
        <worldMenu>
       
        (aBuilder item: #'MyParent')
                parent: #'Tools;
                action: [ self open ].
               
ClassTwo class>>menuCommandOn: aBuilder
        <worldMenu>
       
        (aBuilder item: #'MyParent')
                with: [
                        (aBuilder item: #'MyChild')
                                action: [ self open ] ].

MyChild goes under the MyParent entry in ClassOne's menu


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7276 in pharo: [BUG]: Menu item goes to wrong parent

pharo

Comment #4 on issue 7276 by [hidden email]: [BUG]: Menu item goes to  
wrong parent
http://code.google.com/p/pharo/issues/detail?id=7276

And ?
For me it looks like the expected behavior since item names are unique

But what you can do is specify an entry id and a different name


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7276 in pharo: [BUG]: Menu item goes to wrong parent

pharo

Comment #5 on issue 7276 by [hidden email]: [BUG]: Menu item goes to  
wrong parent
http://code.google.com/p/pharo/issues/detail?id=7276

Huh? This can't possibly be correct! How can two different projects know  
what other menu items are installed?? If Project 1 loads ClassOne, with  
menu item 'Tools'->'MyParent', and then Project 2 loads ClassTwo, with menu  
items [World Menu Top Level'->'MyParent'->'MyChild', where the  
two 'MyParents' have no logical connection save for the coincidence of  
having the same name, Project 2's 'MyParent' will "disappear" and go into  
Tools.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7276 in pharo: [BUG]: Menu item goes to wrong parent

pharo

Comment #6 on issue 7276 by [hidden email]: [BUG]: Menu item goes to  
wrong parent
http://code.google.com/p/pharo/issues/detail?id=7276

Ok, you have a point :)

Maybe in parent one should be able to specify the whole parents path


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7276 in pharo: [BUG]: Menu item goes to wrong parent

pharo

Comment #7 on issue 7276 by [hidden email]: [BUG]: Menu item goes to  
wrong parent
http://code.google.com/p/pharo/issues/detail?id=7276

That would solve my specific problem, but unless it was made mandatory,  
registration would still not be robust in the face of name conflicts. The  
weird thing is that it worked fine in 1.4! What was the thing you were  
saying about an entry id? Could that help me for now?


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7276 in pharo: [BUG]: Menu item goes to wrong parent

pharo

Comment #8 on issue 7276 by [hidden email]: [BUG]: Menu item goes to  
wrong parent
http://code.google.com/p/pharo/issues/detail?id=7276

I remember fixing something that could be related to this, but it was  
months ago

I think you can write something like

(aBuilder item: #UniqueIdNotAlreadyTaken)
      name: 'MyParent(IDoNotCareIfAlreadyUsed)'
      with: ...


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7276 in pharo: [BUG]: Menu item goes to wrong parent

pharo

Comment #9 on issue 7276 by [hidden email]: [BUG]: Menu item goes to  
wrong parent
http://code.google.com/p/pharo/issues/detail?id=7276

See 5220, may be related


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7276 in pharo: [BUG]: Menu item goes to wrong parent

pharo

Comment #10 on issue 7276 by [hidden email]: [BUG]: Menu item goes  
to wrong parent
http://code.google.com/p/pharo/issues/detail?id=7276

See Issue 5220, may be related


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker