RE: SP2 Enhancement Speculation (was Threading Issue)
Docs to get you started will be included in the SP2 Release Candidate, due out shortly on the Allaire Beta site. Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED]
RE: SP2 Enhancement Speculation (was Threading Issue)
StructAppend() If this is what I think it is, then I shall praise (and buy beer for) the developer who finally put this in. I have a zillion cases of: CFIF NOT StructKeyExists(struct,var) CFSET struct[var]="" /CFIF CFSET struct[var]=ListAppend(struct[var],value) If this can be shortened to StructAppend(struct,var,value), I will be a very happy man. Be very happy now! You can do this in 4.5.x with StructInsert. If you specify a fourth argument, you can allow it to both insert and update: cfset rs = StructInsert(struct, var, value, "true") (I still want a StructKeys() function that returns a list/array of key names, tho. Yes, I know, I can generate one, but I want a function for it. :) Your wish is answered. I'm not sure when StructKeyArray and StructKeyList were introduced, but they're listed in the documentation within CF Studio 4.5.1. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED]
RE: SP2 Enhancement Speculation (was Threading Issue)
If I had to guess... StructFindKey is the same as StructKeyExists, but maybe it returns the value automatically. StructFindValue() perhaps returns the key that matches a value. StructFindKey(), StructFindValue() I'm at a complete loss for these. Anyone got any ideas? Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED]
RE: SP2 Enhancement Speculation (was Threading Issue)
I said: CFIF NOT StructKeyExists(struct,var) CFSET struct[var]="" /CFIF CFSET struct[var]=ListAppend(struct[var],value) To which Dave said: You can do this in 4.5.x with StructInsert. If you specify a fourth argument, you can allow it to both insert and update: cfset rs = StructInsert(struct, var, value, "true") Ummm, not quite. It'd be more like: !--- This doesn't work --- CFSET StructInsert(struct,var,ListAppend(StructFind(struct,var),value),"true") !--- Nor does this --- CFSET StructUpdate(struct,var,ListAppend(StructFind(struct,var),value)) But, you can't do that because the StructFind() will fail if var is not already a part of struct. Replacing StructFind() with an operator[] call won't work, either, for the same reason. I'm not sure when StructKeyArray and StructKeyList were introduced, but they're listed in the documentation within CF Studio 4.5.1. Tres cool. :) I'd missed them, completely. Interesting how the documentation says that they will return the keys in any order, but they are always alphabetical (just as they have always been). Wonder what the deal with that is? At any rate, I guess I'll have to update my little function cheatsheet that I have on my wall. Anyone got a one-page PDF of the functions and their parameters that is up to date? I could make one, but if there is one already out there, then I shan't bother. Thanks, Rick Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message with 'unsubscribe' in the body to [EMAIL PROTECTED]