You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

michel

Professional

  • "michel" started this thread

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

1

Wednesday, September 23rd 2009, 1:53pm

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.

    Source code

    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

Wednesday, September 23rd 2009, 3:05pm

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.

michel

Professional

  • "michel" started this thread

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

3

Wednesday, September 23rd 2009, 3:11pm

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.

michel

Professional

  • "michel" started this thread

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

4

Wednesday, September 23rd 2009, 4:28pm

Hi Jarredja,

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

Quoted

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

Wednesday, September 23rd 2009, 7:12pm

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

michel

Professional

  • "michel" started this thread

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

6

Wednesday, September 23rd 2009, 7:52pm

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

Thursday, September 24th 2009, 10:54am

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