10:
description: Moon
graphicFile: res:/dx9/model/worldobject/planet/moon.red
38:
description: Caldari Frigate Bantam
graphicFile: res:/dx9/model/ship/caldari/Frigate/CF1/CF1_T1.red
sofFactionName: caldaribase
sofHullName: cf1_t1
sofRaceName: caldari
<cfscript>
yamlPath = 'c:/databases/';
yamlGraphicIDs = parseYaml(yamlPath & 'graphicIDs.yaml');
function parseYaml(file)
{
Yaml = createObject('java','org.yaml.snakeyaml.Yaml','c:/lucee/lib/snakeyaml-1.15.jar');
yamlFileData = FileRead(arguments.file);
return Yaml.load(yamlFileData);
}
</cfscript>
Igal Sapir
Lucee Core Developer
Lucee.org
--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/82b0198c-99ea-4c6a-91a8-02e762b120d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/WSne0EeMFkY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/551AC0B8.4060206%40lucee.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAMT%2B4CASOuy3z2qmN_XvhZGF2HxnhJ%3DUsWdFE_qNXcTWmVnUPQ%40mail.gmail.com.
return struct.containsKey(key) && struct.get(key,null)!=null
But the above struct.containsKey() will call something like in the Java class lucee.runtime.type.wrap.MapAsStruct (which is called by Caster)boolean contains = map.containsKey(key.getString());
And here key is the Collection.Key class which getString() method return a java.lang.String...
I concluded that it was the workflow because the struct provided to structKeyExists() is not a StructImpl but a java.util.LinkedHashMap
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/551AC431.20201%40lucee.org.
Calling structKeyExists() will always returned FALSE if :
- The underlying struct is a not a CFML Struct (say LinkedHashMap)
- AND if its keys are not Strings e.g LinkedHashMap<Integer,Object>.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAMT%2B4CC1M39E_%2BrnaaGehjK_wkzgfd4WOpW%2BEVV_ePgZArO51Q%40mail.gmail.com.
I'll post a cfml example (I think I'm currently using Lucee 4.5.1.000). I'll do it later because I'm currently in a train to get home (not sure I'll have internet connection...)
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/551AC954.3060608%40lucee.org.
<cfset list=createObject("java","java.util.LinkedHashMap").init()>
<cfset list.put(javaCast("int",10),{description="First value"})>
<cfset list.put(javaCast("int",20),{description="Second value"})>
<cfset list.put(javaCast("int",30),{description="Third value"})>
<cfset list.put(javaCast("int",40),javaCast("null",0))>
<cfset keys=structKeyList(list)>
<cfoutput>
<cfloop list="#keys#" index="key">
Key #key# : Exists in CFML ? #structKeyExists(list,javaCast("int",key))# - Exists in Java ? #list.containsKey(javaCast("int",key))#<br>
</cfloop>
</cfoutput>
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/82b0198c-99ea-4c6a-91a8-02e762b120d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/WSne0EeMFkY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/551AC0B8.4060206%40lucee.org.
--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAMT%2B4CASOuy3z2qmN_XvhZGF2HxnhJ%3DUsWdFE_qNXcTWmVnUPQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/WSne0EeMFkY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/551AC431.20201%40lucee.org.
--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAMT%2B4CC1M39E_%2BrnaaGehjK_wkzgfd4WOpW%2BEVV_ePgZArO51Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/WSne0EeMFkY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+unsubscribe@googlegroups.com.
<cfset list=createObject("java","java.util.LinkedHashMap").init()>
<cfset list.put(javaCast("int",10),{description="First value"})>
<cfset list.put(javaCast("int",20),{description="Second value"})>
<cfset list.put(javaCast("int",30),{description="Third value"})>
<cfset list.put(javaCast("int",40),javaCast("null",0))>
<cfset keys=structKeyList(list)>
<cfoutput>
<cfloop list="#keys#" index="key">
Key #key# : Exists in CFML ? #structKeyExists(list,javaCast("int",key))# - Exists in Java ? #list.containsKey(javaCast("int",key))#<br>
</cfloop>
</cfoutput>Key 10 : Exists in CFML ? false - Exists in Java ? true
Key 20 : Exists in CFML ? false - Exists in Java ? true
Key 30 : Exists in CFML ? false - Exists in Java ? true
Key 40 : Exists in CFML ? false - Exists in Java ? true
<!--- The Javadoc doesn't tell much on what it does exactly...but it seems working In fact given a Java Map it will recursively convert any keys to String using the Java toString() result. It will recursively convert values to a CFML object only for a limited predefined Java types. Otherwise it leave them as-is ---> <cfset cfmlValue=createObject("java","lucee.runtime.java.JavaProxy").toCFML(mapWithIntegerKeys)> <!--- This will return TRUE ---> <cfset result=structKeyExists(cfmlValue,"existingKeyAsString")>
--
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/WSne0EeMFkY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/79ad982d-8794-47ce-bc0c-fa1779bcc920%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/85860bf1-92df-4650-8c89-2c788998db85%40googlegroups.com.