Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Mittwoch, 23. September 2009, 13:53

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.

    Quellcode

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    
    <krpano version="1.0.8" onstart="action(Load_Pano2)">
    
    	<plugin name="combobox" url="%SWFPATH%/plugins/combobox.swf" />
    	<action name="combobox:Pano1">
    		loadpano(pano1.xml,null,MERGE,BLEND(1));
    	</action>
    	<action name="combobox:Pano2">
    		loadpano(pano2.xml,null,MERGE,BLEND(1));
    	</action>
    	
    	<action name="Load_Pano1">
    		loadpano(pano1.xml,null,MERGE,BLEND(1));
    		plugin[combobox].selectitem(Pano1);
    	</action>	
    	<action name="Load_Pano2">
    		loadpano(pano2.xml,null,MERGE,BLEND(1));
    		plugin[combobox].selectitem(Pano2);
    	</action>	
    
    </krpano>
    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* ;-)

Salut.

2

Mittwoch, 23. September 2009, 15:05

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.

3

Mittwoch, 23. September 2009, 15:11

Hi Jarredja,

This does not work *sad* .... The second Combobox acts the same way as the first one ... There is two identical Combobox with same Items....

Salut.

4

Mittwoch, 23. September 2009, 16:28

Hi Jarredja,

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

Zitat

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... ;-)

Salut.

5

Mittwoch, 23. September 2009, 19:12

Michel, Check out this link. It is a basic setup of two comboboxes and it uses the same .swf file.



possible to use more than 1 combobox?

Jarredja

6

Mittwoch, 23. September 2009, 19:52

Hi jarredja,

YES... *thumbup* I had not seen it before… Thanks. ;-)

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.

7

Donnerstag, 24. September 2009, 10:54

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