lowercase/uppercase issue (bug?)

  • I encountered something unexpected:

    Code
    <enum name="floors">
    	<item name="Floor_1" data="mydata" />
    	<item name="Floor_2" data="mydata" />
    	<item name="Floor_3" data="mydata" />
        </enum>
    
    
    trace("first floor: ", get(enum[floors].item[0].name));

    Why does it say "floor_1" instead of "Floor_1"?

    This is unexpected, because in all the rest of krpano's behavior, it does distinguish between upper and lowercase.
    For example:

    Code
    if("Floor_1" == "floor_1", trace("true"), trace"false") )


    will return false...

    So one would expect that krpano would also respect the case when returning names...

    - Ronny D'Hoore

    Edited once, last by rdhoore108 (September 12, 2010 at 1:12 PM).

  • Yes, you are right, apparently it doesn't support quotes between [ ]. And also I should have written get(enum[floors].item["Floor_1"].name) if I wanted to remain consistent with my own example. *rolleyes*

    Anyhow, it was simply to enhance my first point, which still remains valid. Why does krpano return a name in lowercase even though a capital was used its definition in the xml? *question* *confused*

    - Ronny D'Hoore

  • Hi Ronny *smile* ,

    Yes... Krpano is amazing *g* ...

    Code
    <action name="playing">
    		showlog();
    		if ("test" == "test", trace("true"," - ","test"," - ",get("test")), trace("false"," - ","test"," - ",get("test")));
    		set("test",helo Ronny);
    		if ("test" == "test", trace("true"," - ","test"," - ",get("test")), trace("false"," - ","test"," - ",get("test")));
    	</action>

    result:
    INFO: false - test - null
    INFO: false - helo Ronny - helo Ronny

    SAlut...

Participate now!

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