Notes and request about Combobox plugin

  • Hi,

    Here some notes and request about the Combobox plugin.

    • It seems that only one combobox can be used at the same time.
    • plugin[combobox].selectitem(Item_X); does not work when called from <krpano onstart=""> or when it is inside an <action> that is called from <krpano onstart="">. That wants to say, it is not possible to synchronize the selected Combobox Item with a different pano than the first pano defined for the first Combobox Item.

      Using this code the Debugger says: WARNING: unknow action command: plugin[combobox].selectitem and the Combobox stays on first Item...

    • When Combobox Items are set with additem(Item_X1, something_to_do ); instead of <action name=combobox:Item_x> then it is not possible to call action(combobox:Item_x). It seems obvious but there is no possibility any-more to call the actions associated to the Combobox Items ...
    • Perhaps it can be interesting to add a new attribute, something as an Item_ID... With an attribute like this it would be possible to call a Combobox Item instead if the value of that Item is modified... This comes because I was trying to respond to a thread from Tim2420 where the Combobox Items have to be changed to be displayed in the selected language...

    That's all.. *whistling* *wink*

    Salut.

  • Hi Jarredja,

    In fact, it is not so simple... *smile* *wacko*

    Quote

    I believe if you add another combobox as a different name, such as combobox1.swf and direct a path to it, you can have an additional combobox in your tour.

    You are right... There is 2 different "instance" of Combobox... But, in the moment they are created when the xml is loaded, they seems identical . *attention* Same Items name, same actions to do, same number of Items even if one of them have defined more Items than the other...

    If you add a button, for example, that call an action to setup new items for one of the Combobox, this combobox is actualized as expected...
    Conclusion: there is 2 different Combobox as you suggested before... So, more than one Combobox it is possible BUT... *wink*

    Salut.

  • Hi jarredja,

    YES... *thumbup* I had not seen it before… Thanks. *wink*

    It is a good example to illustrate another of the note above:

    • When Combobox Items are set with additem(Item_X1, something_to_do ); instead of <action name=combobox:Item_x> then it is not possible to call action(combobox:Item_x). It seems obvious but there is no possibility any-more to call the actions associated to the Combobox Items ...
    • Perhaps it can be interesting to add a new attribute, something as an Item_ID... With an attribute like this it would be possible to call a Combobox Item instead if the value of that Item is modified... This comes because I was trying to respond to a thread from Tim2420 where the Combobox Items have to be changed to be displayed in the selected language...

    Salut.

  • Hi,

    It seems that only one combobox can be used at the same time.

    that's only true for the "default" behavior of the combobox plugin,
    by default it looks after loading for all actions which are named like "combobox:...." and adds them...

    but when using the manually adding method, then more comboboxes are possible:
    possible to use more than 1 combobox?


    plugin[combobox].selectitem(Item_X); does not work when called from <krpano onstart="">

    that has something to do with the plugin loading,
    it takes a bit until the plugin was loaded, and it's possible that the "onstart" will be called before the loading was one,

    solutions could be:
    1. to use - preload="true"- for the combobox plugin (then it will be forced to be loaded before onstart)
    2. or use the "onloaded" event of the plugin, it will be called when the plugin was loaded it is and ready for use,


    When Combobox Items are set with additem(Item_X1, something_to_do ); instead of <action name=combobox:Item_x> then it is not possible to call action(combobox:Item_x).

    additem() will not create a new action,
    it will assign the given code to the item,


    Perhaps it can be interesting to add a new attribute, something as an Item_ID... With an attribute like this it would be possible to call a Combobox Item instead if the value of that Item is modified.

    of course, an item id, would be better
    (a complete new combobox plugin (not based on the Flash combobox anymore) with more possibilities is still planned)

    best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!