[SOLVED ] bug with plugin name starting with a number ?

  • Hi,

    have a plugin image, but if name contains "360_" not show up on screen

    ex:

    Code
    <plugin devices="" altonloaded="" keep="true" name="360" url="gfx/360_simulator.png" alturl="" altscale="" handcursor="false" visible="true" alpha="1.0" blendmode="normal" align="lefttop" edge="lefttop" x="3" y="550" autoscale="false" zorder="100" parent="stage"/>

    if plugin name is :
    name="360"
    ok image is visible

    if plugin name is :
    name="360_"
    name="360_simulator"
    name="360_any"
    OR
    name="360simulator"

    image is not visible, when name include "360_" OR "360simulator"

    may be these names are reserved for krpano core engine, but hadn't see it in doc,
    can you reproduce this bug ?
    i tried several times with browser cache empty.

    or my computer crazy ??


    Thanks

    z *smile*
    make me pulling my hairs to figure out what's wrong with my code *cursing*

    Edited once, last by zadda (April 13, 2012 at 7:16 PM).

  • names need to start with a letter, not a number

    <plugin name="p360" />

    I usually prefix it with a p_ for plugins or h_ for hotspots if I use numbers.

    The reseaon behind this, is because plugins are mapped as a sort of special array. In other words

    plugin[0].name is the same as plugin[the_first_plugin_in_krpano].name

  • thanks for the head up,
    i didn't know that ...

    my bad,

    this is in official doc :

    Quote

    Important notes about the name attribute:
    Each name must begin with an alphabetic character! A number as name is not allowed! When a name begins with a numeric character then the name will be interpreted as array index. This is okay for read access but not for defining.

    thanks *smile*

    z

Participate now!

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