Made my first commit (ever). Let me know if I did anything wrong. On Sunday, December 2, 2012 11:26:34 PM UTC-5, C Anthony Risinger wrote: > > On Sun, Dec 2, 2012 at 8:56 PM, Grant Pitel <[email protected]<javascript:>> > wrote: > > I want to submit a new function to pyjamas.ui.MenuItem. Presently, the > > MenuItem widget does not have an insert method. Therefore, to place a > new > > menu in the middle, all the items had to be popped and re-inserted. To > make > > matters worst, popping an item from a menu will destroy all its sub > menus! > > The whole thing was driving me batty. I enclosed a modification to > > MenuBar.py that seems to work for me and will successfully add a menu > item > > someplace other than the end. The function will be handy to those with > > changing menus (in my case menu items get added based on permissions). > My > > programming skills and pyjamas knowledge are weak, so please review the > > code. Can developer please submit? Thanks. > > can you open an issue/pull-req on github? it's pretty > easy/straight-forward: > > - sign in > - "fork" pyjs > - (follow instructions) > - create branch (please avoid using master) > - push changes to that branch > - open pull-request on that branch > - (after pushing branch github will ask on site if you want to make a > request) > > ...at a glance change looks fine to me, although insert() > traditionally returns None... i'm not hugely partial one way or the > other but it should match other insert() methods throughout the lib > (consistently inconvenient > inconsistently convenient) -- just double > check that before submit. > > -- > > C Anthony >
--
