Author Topic: Submenu cann't expand by Script function RegisterPlugin()  (Read 7582 times)

Offline Chun Jiu

  • Multiple posting newcomer
  • *
  • Posts: 71
  • My Girlfriend
    • EasilyGCC
Submenu cann't expand by Script function RegisterPlugin()
« on: June 04, 2015, 03:23:00 pm »
It is always only display the first submenu ...

windows 7 64bit
C::B svn 10320 x64 with wxWidgets 2.8.12
TDM-GCC-64
---------------------------------------

class TestPlugin extends cbScriptPlugin {
    // mandatory to setup the plugin's info
    constructor() {
        info.name = _T("EasilyGCC");
        info.title = _T("Target Setup");
        info.version = _T("0.1a");
        info.license = _T("GPL");
    }
    // optional to create menubar items
    function GetMenu() {
        local entries = ::wxArrayString();
        entries.Add(_T("Project/EasilyGCC/EasilyGCC0"), 1);
        entries.Add(_T("Project/EasilyGCC/EasilyGCC1/Arch1"), 1);
        entries.Add(_T("Project/EasilyGCC/EasilyGCC1/Arch2"), 1);
        entries.Add(_T("Project/EasilyGCC/EasilyGCC1/Arch3"), 1);
        entries.Add(_T("Project/EasilyGCC/EasilyGCC2"), 1);
        entries.Add(_T("Project/EasilyGCC/EasilyGCC3"), 1);
        return entries;
    }
}

RegisterPlugin(TestPlugin());
I love my girlfriend like c++!    :-)

http://pan.baidu.com/s/1feNwU
easilygcc is a gmail's email.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Submenu cann't expand by Script function RegisterPlugin()
« Reply #1 on: June 05, 2015, 04:43:05 pm »
This bug should be fixed in SVN trunk by OBF, see: [r10322].
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Chun Jiu

  • Multiple posting newcomer
  • *
  • Posts: 71
  • My Girlfriend
    • EasilyGCC
Re: Submenu cann't expand by Script function RegisterPlugin()
« Reply #2 on: June 05, 2015, 05:56:37 pm »
This bug should be fixed in SVN trunk by OBF, see: [r10322].

Thank you very much, it is now normal work.
I love my girlfriend like c++!    :-)

http://pan.baidu.com/s/1feNwU
easilygcc is a gmail's email.