addItem() of JUCE not exposed to Lua ?

Home Forums General Programming addItem() of JUCE not exposed to Lua ?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #29223
    synth
    Participant
      • Topics: 13
      • Replies: 35
      • Total: 48

      Hi,
      I want to add some items inside a lua method, to a CtrlrCombo. I see that CtrlrCombo has not exposed its underlying ComboBox’s addItem() :

      void CtrlrCombo::wrapForLua(lua_State *L)
      {
      	using namespace luabind;
      
      	module(L)
          [
      		class_<CtrlrCombo, bases<CtrlrComponent,CtrlrLuaObject> >("CtrlrCombo")
      			.def("getOwnedComboBox", &CtrlrCombo::getOwnedComboBox)
      			.def("getSelectedId", &CtrlrCombo::getSelectedId)
      			.def("getSelectedItemIndex", &CtrlrCombo::getSelectedItemIndex)
      			.def("setSelectedId", &CtrlrCombo::setSelectedId)
      			.def("setSelectedItemIndex", &CtrlrCombo::setSelectedItemIndex)
      			.def("getText", &CtrlrCombo::getText)
      			.def("setText", &CtrlrCombo::setText)
      	];
      }

      Is there some other method to add items ? Or can you add it ?

      #29232
      atom
      Keymaster
        • Topics: 159
        • Replies: 2945
        • Total: 3104
        • ★★★★★

        I’ll add it asap.

        scratch that…
        as you can see there is a special method: getOwnedComboBox() that returns a JUCE ComboBox object, and the entire CmboBox class is bound i LComboBox so you can directly manipulate the combo in that component.

        • This reply was modified 9 years, 6 months ago by atom.
        #29238
        synth
        Participant
          • Topics: 13
          • Replies: 35
          • Total: 48

          Thanks !

        Viewing 3 posts - 1 through 3 (of 3 total)
        • The forum ‘Programming’ is closed to new topics and replies.
        There is currently 0 users and 67 guests online
        No users are currently active
        Forum Statistics
        Threads: 2,495, Posts: 17,374, Members: 77,605
        Most users ever online was 12 on January 22, 2019 3:47 pm
        Ctrlr