[vwnc] How to change pbundleMenu

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

[vwnc] How to change pbundleMenu

Federico.Balaguer
Hello List,

a couple students need to add a menuitem to the context menu of the list of bundles in the Refactoring Browser. They are building a tool for submitting students assignments from inside the browser to a "hand-in service" (implemented in VW).

Anyway, they tried editing the pbundleMenu (of class Refactory.Browser.BrowserNavigator). They added the new menuitem by hand and also they tried with the menu editor tool.
Nothing seems to work,  the new menuitem does not appear as part of the context menu.

Could someone give me a hint about it? Thanks!

Federico

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] How to change pbundleMenu

thomas.hawker

Federico,

 

Did you try using pragmas?

 

storeSubmitBundle

      <menuItem: #(#submitBundle #students 'Submit Bundle...')

            nameKey: #submitBundle

            enablement: #isBundleSelected

            indication: nil

            menu: #(#pundleMenu)

            position: 15>

 

      … your code goes here …

 

Cheers!

 

Tom Hawker

Senior Framework Developer

Home

+1 (408) 274-4128

The Environment:

We take it personally

Office

+1 (408) 576-6591

Mobile

+1 (408) 835-3643

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Federico Balaguer
Sent: Tuesday, November 24, 2009 10:29 AM
To: VW NC
Subject: [vwnc] How to change pbundleMenu

 

Hello List,

a couple students need to add a menuitem to the context menu of the list of bundles in the Refactoring Browser. They are building a tool for submitting students assignments from inside the browser to a "hand-in service" (implemented in VW).

Anyway, they tried editing the pbundleMenu (of class Refactory.Browser.BrowserNavigator). They added the new menuitem by hand and also they tried with the menu editor tool.
Nothing seems to work,  the new menuitem does not appear as part of the context menu.

Could someone give me a hint about it? Thanks!

Federico

IMPORTANT NOTICE
Email from OOCL is confidential and may be legally privileged.  If it is not
intended for you, please delete it immediately unread.  The internet
cannot guarantee that this communication is free of viruses, interception
or interference and anyone who communicates with us by email is taken
to accept the risks in doing so.  Without limitation, OOCL and its affiliates
accept no liability whatsoever and howsoever arising in connection with
the use of this email.  Under no circumstances shall this email constitute
a binding agreement to carry or for provision of carriage services by OOCL,
which is subject to the availability of carrier's equipment and vessels and
the terms and conditions of OOCL's standard bill of lading which is also
available at http://www.oocl.com.

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] How to change pbundleMenu

Niall Ross
Dear Federico,
    in 7.6, the Refactoring Browser is a mix of (mainly) an action
system and (sometimes) pragmas.  Thomas Hawker's code shows how the
pragmas are added.  I mention the action system so you can understand
why you will not find pragmas for many menu items, and why positioning
may be complex (can be easiest just to keep trying numbers till it looks
right).  If you can make a pragma work for you it is definitely
recommended.  Making a mistake when changing the action array can lock
up whole the RB menu system - non-trivial understanding of the RB is
then required to clean up and continue using the image.

I'm writing on the assumption this work is targetted at 7.6.  In older
VWs, you may wish instead to aim a pragma at the action system.  To see
the action system, go to the class-side of RBCommand and execute the
code in the comment of the method actionArray.  To see how to populate
it with a pragma see my _long_ comment in the BrowserCodeTool>>action:
method that the custom refactoring RB project adds (e.g. load
Tools-Refactoring Browser VW7.5 CS12 RC1 into a VW7.5 image, not a 7.6
with which it is incompatible).

HTH
             Yours faithfully
                Niall Ross

> Federico,
>
>  
>
> Did you try using pragmas?
>
>  
>
> storeSubmitBundle
>
>       <menuItem: #(#submitBundle #students 'Submit Bundle...')
>
>             nameKey: #submitBundle
>
>             enablement: #isBundleSelected
>
>             indication: nil
>
>             menu: #(#pundleMenu)
>
>             position: 15>
>
>  
>
>       … your code goes here …
>
>  
>
> Cheers!
>
>  
>
> Tom Hawker
>
>
>
> Senior Framework Developer
>
> Home
>
>
>
> +1 (408) 274-4128
>
>
>
> *The Environment:*
>
> */We take it personally/*
>
> Office
>
>
>
> +1 (408) 576-6591
>
> Mobile
>
>
>
> +1 (408) 835-3643
>
>  
>
> ------------------------------------------------------------------------
>
> *From:* [hidden email] [mailto:[hidden email]] *On
> Behalf Of *Federico Balaguer
> *Sent:* Tuesday, November 24, 2009 10:29 AM
> *To:* VW NC
> *Subject:* [vwnc] How to change pbundleMenu
>
>  
>
> Hello List,
>
> a couple students need to add a menuitem to the context menu of the
> list of bundles in the Refactoring Browser. They are building a tool
> for submitting students assignments from inside the browser to a
> "hand-in service" (implemented in VW).
>
> Anyway, they tried editing the pbundleMenu (of class
> Refactory.Browser.BrowserNavigator). They added the new menuitem by
> hand and also they tried with the menu editor tool.
> Nothing seems to work,  the new menuitem does not appear as part of
> the context menu.
>
> Could someone give me a hint about it? Thanks!
>
> Federico
>
>IMPORTANT NOTICE
>Email from OOCL is confidential and may be legally privileged.  If it is not
>intended for you, please delete it immediately unread.  The internet
>cannot guarantee that this communication is free of viruses, interception
>or interference and anyone who communicates with us by email is taken
>to accept the risks in doing so.  Without limitation, OOCL and its affiliates
>accept no liability whatsoever and howsoever arising in connection with
>the use of this email.  Under no circumstances shall this email constitute
>a binding agreement to carry or for provision of carriage services by OOCL,
>which is subject to the availability of carrier's equipment and vessels and
>the terms and conditions of OOCL's standard bill of lading which is also
>available at http://www.oocl.com.
>
>------------------------------------------------------------------------
>
>_______________________________________________
>vwnc mailing list
>[hidden email]
>http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>  
>


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] How to change pbundleMenu

Federico.Balaguer
In reply to this post by thomas.hawker
Thomas,

thank you very much for your kind reply! it worked.

Federico

On Tue, Nov 24, 2009 at 4:51 PM, <[hidden email]> wrote:

Federico,

 

Did you try using pragmas?

 

storeSubmitBundle

      <menuItem: #(#submitBundle #students 'Submit Bundle...')

            nameKey: #submitBundle

            enablement: #isBundleSelected

            indication: nil

            menu: #(#pundleMenu)

            position: 15>

 

      … your code goes here …

 

Cheers!

 

Tom Hawker

Senior Framework Developer

Home

+1 (408) 274-4128

The Environment:

We take it personally

Office

+1 (408) 576-6591

Mobile

+1 (408) 835-3643

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Federico Balaguer
Sent: Tuesday, November 24, 2009 10:29 AM
To: VW NC
Subject: [vwnc] How to change pbundleMenu

 

Hello List,

a couple students need to add a menuitem to the context menu of the list of bundles in the Refactoring Browser. They are building a tool for submitting students assignments from inside the browser to a "hand-in service" (implemented in VW).

Anyway, they tried editing the pbundleMenu (of class Refactory.Browser.BrowserNavigator). They added the new menuitem by hand and also they tried with the menu editor tool.
Nothing seems to work,  the new menuitem does not appear as part of the context menu.

Could someone give me a hint about it? Thanks!

Federico

IMPORTANT NOTICE
Email from OOCL is confidential and may be legally privileged.  If it is not
intended for you, please delete it immediately unread.  The internet
cannot guarantee that this communication is free of viruses, interception
or interference and anyone who communicates with us by email is taken
to accept the risks in doing so.  Without limitation, OOCL and its affiliates
accept no liability whatsoever and howsoever arising in connection with
the use of this email.  Under no circumstances shall this email constitute
a binding agreement to carry or for provision of carriage services by OOCL,
which is subject to the availability of carrier's equipment and vessels and
the terms and conditions of OOCL's standard bill of lading which is also
available at http://www.oocl.com.


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] How to change pbundleMenu

Federico.Balaguer
In reply to this post by Niall Ross
Niall

Thanks for your reply. They are working with a 7.6 image, when they first asked me I think I looked at an older image 7.5 or 7.4 which was of no help at all. Now I started to understand why.

Thanks again. Federico

On Tue, Nov 24, 2009 at 6:28 PM, Niall Ross <[hidden email]> wrote:
Dear Federico,
  in 7.6, the Refactoring Browser is a mix of (mainly) an action system and (sometimes) pragmas.  Thomas Hawker's code shows how the pragmas are added.  I mention the action system so you can understand why you will not find pragmas for many menu items, and why positioning may be complex (can be easiest just to keep trying numbers till it looks right).  If you can make a pragma work for you it is definitely recommended.  Making a mistake when changing the action array can lock up whole the RB menu system - non-trivial understanding of the RB is then required to clean up and continue using the image.

I'm writing on the assumption this work is targetted at 7.6.  In older VWs, you may wish instead to aim a pragma at the action system.  To see the action system, go to the class-side of RBCommand and execute the code in the comment of the method actionArray.  To see how to populate it with a pragma see my _long_ comment in the BrowserCodeTool>>action: method that the custom refactoring RB project adds (e.g. load Tools-Refactoring Browser VW7.5 CS12 RC1 into a VW7.5 image, not a 7.6 with which it is incompatible).

HTH
           Yours faithfully
              Niall Ross

Federico,

 
Did you try using pragmas?

 
storeSubmitBundle

     <menuItem: #(#submitBundle #students 'Submit Bundle...')

           nameKey: #submitBundle

           enablement: #isBundleSelected

           indication: nil

           menu: #(#pundleMenu)

           position: 15>

 
     … your code goes here …

 
Cheers!

 
Tom Hawker

       

Senior Framework Developer

Home

       

+1 (408) 274-4128

       

*The Environment:*

*/We take it personally/*

Office

       

+1 (408) 576-6591

Mobile

       

+1 (408) 835-3643

 
------------------------------------------------------------------------

*From:* [hidden email] [mailto:[hidden email]] *On Behalf Of *Federico Balaguer
*Sent:* Tuesday, November 24, 2009 10:29 AM
*To:* VW NC
*Subject:* [vwnc] How to change pbundleMenu

 
Hello List,

a couple students need to add a menuitem to the context menu of the list of bundles in the Refactoring Browser. They are building a tool for submitting students assignments from inside the browser to a "hand-in service" (implemented in VW).

Anyway, they tried editing the pbundleMenu (of class Refactory.Browser.BrowserNavigator). They added the new menuitem by hand and also they tried with the menu editor tool.
Nothing seems to work,  the new menuitem does not appear as part of the context menu.

Could someone give me a hint about it? Thanks!

Federico

IMPORTANT NOTICE
Email from OOCL is confidential and may be legally privileged.  If it is not
intended for you, please delete it immediately unread.  The internet
cannot guarantee that this communication is free of viruses, interception
or interference and anyone who communicates with us by email is taken
to accept the risks in doing so.  Without limitation, OOCL and its affiliates
accept no liability whatsoever and howsoever arising in connection with
the use of this email.  Under no circumstances shall this email constitute
a binding agreement to carry or for provision of carriage services by OOCL,
which is subject to the availability of carrier's equipment and vessels and
the terms and conditions of OOCL's standard bill of lading which is also
available at http://www.oocl.com.

------------------------------------------------------------------------

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
 




_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc