search : struct functions

select a category, or use search below
(searches all categories and all time range)

displaying top 100 results

Inconsistent Results when using Struct Functions on data returned by a CF Web Service.
Comment on Inconsistent Results when using Struct Functions on data returned by a CF Web Service. by Milan C.
where we've encountered this: 1. Add the following line to Application.cfc: 2. Create a Coldbox handler file with the following function: public void function testFunction() { var test_structs = [ { foo: "foovalue", bar: { baz: "bazvalue" } }, { foo2: "foovalue2", bar2
Struct Member Function is invalid construct
2673460 CF-4126525 Language Adam Cameron Struct elements lost when sorting Repro: sorted = structNew("sorted"); sorted.azure = "blue"; sorted.adze = "tool"; sorted.adam = "dork"; sorted.alabama = 3; sorted = structNew("sorted", function(e1,e2){ return e1.len() - e2.len(); }); Result: adze
2609207 CF-3911226 General Server Raymond Camden Struct map as a member func broken This is broken: person = {name:"Ray", age:41}; youngerPerson = person.map(function(key,value,struct) { writedump(arguments); }); ----------------------------- Additional Watson Details
StructEach not mentioned on list of struct functions
: PreRelease User User Name:Aaron Neff Note Added: Reproduced w/ this: sorted = structNew("sorted", function(e1,e2){ return e1.len() - e2.len(); }); sorted.azure = "blue"; sorted.adze = "tool"; sorted.adam = "dork"; sorted.alabama = 3; writeDump(sorted); Date Added :2015-11-17 10
2609381 CF-3851982 Nikhil S. Updated the callback function of StructFilter to 'function(key, value, [, struct])'
Comment on keyExists member function not available on all struct objects by External U.
2608509 CF-4073787 Language Abram Adams Add Support for Map/Reduce/Filter/Each Functions for Query Objects Duplicate ID: CF-3713323 Title says it all. We should have Map/Reduce/Filter/Each member functions for query objects. The query object should be treated like an array of structs, i.e: [{id
Bug 79738:(Watson Migration Closure)Using StructDelete() function on the URL struct (and possibly the Form struct) to remove all elements, then using the StructIsEmpty() function on the URL (or Form) struct returns that the struct is no
Comment on Preserve case for Struct keys for Serialization Does Not Work by External U.
2608509 CF-4073787 External U. For some functionality we have, we have to convert a query object to an array of structs, then pass that array to serializeJSON() in order to get JSON in the format expected by some UI controls. We also have tons of query of queries in our code base, using filter
Comment on keyExists member function not available on all struct objects by External U.
Comment on Bug 79738:(Watson Migration Closure)Using StructDelete() function on the URL struct (and possibly the Form struct) to remove all elements, then using the StructIsEmpty() function on the URL (or Form) struct returns that the struct is no by External U.
Comment on [ANeff] Doc Bug for: struct member functions duplicated in docs by CFwatson U.
2609471 CF-3844976 Suchika S. append member functions for Array and Struct to return array/struct respectively. These member-functions have changed. StructAppend() & ArrayAppend() will continue to retuen boolean values. Thanks, Suchika.
CFFiddle for Spreadsheet, List, Struct, and Date/Time functions
StructGet member function missing from documentation
2609381 CF-3851982 Language Aaron Neff [ANeff] Bug for: structFilter/struct.filter() UDF arguments missing struct The struct argument is missing within the UDF passed to structFilter/struct.filter() Repro (just uncomment each and run): function myFunction(){writeDump(ARGUMENTS); abort
2596886 CF-3505517 External U. You cant even break down the error on a particular case. Sometimes there is an error, sometimes not. Sometimes the values in the struct in a loop are the same... Horrible bug, dont use literal structs in function.
[ANeff] Doc Bug for: struct member functions duplicated in docs
Comment on [ANeff] Doc Bug for: struct member functions duplicated in docs by Saurav G.
Comment on [ANeff] Doc Bug for: struct member functions duplicated in docs by External U.
Comment on [ANeff] Doc Bug for: struct member functions duplicated in docs by External U.
2609671 CF-3810965 Nikhil S. Updated the callback function of ArrayFilter to 'function(item, [,index, array])' Updated the callback function of ListFIlter to 'function(item, [,index, list, delimiter, includeEmptyFields])' Updated the callback function of StructFilter to 'function(key, value
2610327 CF-3710345 Language Adam Cameron struct.get() not implemented SSIA... you've implemented almost all struct functions as methods, but have not done .get(). For the sake of completeness and homogeneity, you should. -- Adam ----------------------------- Additional Watson Details
2608475 CF-4085682 External U. At World Singles we've switched away from query results completely to arrays of structs and it's not only faster, it's much more convenient since you can then leverage all the normal map / filter / reduce stuff along with regular array and struct functions
2610329 CF-3710336 Language Adam Cameron struct.filter() missing It looks like all struct functions have had their methods implemented except for structFilter(). Repro: // structFilter.cfm base = {a="b", c="d", e="f"}; filtered = structFilter(base, function(k,v){ return k == "a" || v =="f
2608294 CF-4134200 Immanuel N. Henry, Argument scope is a struct. A toList member function on struct does not exist. Calling a toList on the Array itself works "return arguments[1].toList(); "
Comment on Member functions can't be chained to struct/array literals by External U.
Comment on Please add more built-in closure functions: Array/Struct/List/QueryMap, Array/Struct/List/QueryReduce by External U.
/deserialized as an ordered struct (since functions cannot be serialized) Thoughts? Thanks!, -Aaron
: Create a simple function that accepts a struct: public void function SimpleFunction1 (struct incomingStruct) { WriteOutput("This is SimpleFunction1."); } Call that function with a named, inline struct shortcut: SimpleFunction1(incomingStruct={item1="ok",item2="go"}); Works fine so far. Now, wrap
2610327 CF-3710345 Awdhesh K. This implementation is there and is being covered as part of underlying java map. So if you do.. st = {a="b",c="d"}; st.get(a); it should work. You might have confused it with CF function StructGet, which is not a strcut function rather work with String.. What I
4691150 CF-4203264 Language Cfcatch object is not really a struct Problem Description: CFCatch object is not really a struct in ColdFusion and isStruct() returns false. Lucee Server correctly handles this and catch objects actually inherit from StructImple which gives full struct functionality
keyExists member function not available on all struct objects
CFCLIENT: Data structure: structFindValue : structFindValue functions returns an array of struct, path value of this struct shows array index of 2 when it should be 3
2610328 CF-3710341 Awdhesh K. strcut.find is implemented on top of StructFind functionality and its throw error for ages. Agreed that the structFind behavior is not completely correct but its not possible to correct now as it might cause major backward compatibility issue.
Comment on [ANeff] Doc Bug for: struct member functions duplicated in docs by Saurav G.
="CFIDE.scheduler.ITaskEventHandler" { public void function init () { writeDump(var="Executing init method", output="console"); writeDump(var=application, output="console"); } public boolean function onTaskStart (struct context) { return true; } public void function onMisfire (struct context
2610254 CF-3714525 Language : Functions ext-user struct : filter : Exception message needs to be corrected Code snippet: filteredKeyValue = structObj.Filter(function(key, value){ }); Actual: Message is shown as : An exception occurred while calling the function filter..(Exrta dot needs
a(n ordered) struct of structs. Like functions, "json" should not be a returntype but perhaps a "returnformat" or just skip it since it can be serialized easily enough.
Comment on Null Pointer Exception sometimes caused by function expression (closure) inside literal struct by External U.
Comment on CFCLIENT: Data structure: structFindValue : structFindValue functions returns an array of struct, path value of this struct shows array index of 2 when it should be 3 by Adobe D.
Comment on CFCLIENT: Data structure: structFindValue : structFindValue functions returns an array of struct, path value of this struct shows array index of 2 when it should be 3 by CFwatson U.
Comment on CFCLIENT: Data structure: structFindValue : structFindValue functions returns an array of struct, path value of this struct shows array index of 2 when it should be 3 by External U.
5747630 CF-4204401 Language structCopy cannot be used on exception object Problem Description: structCopy cannot be used on exception object Steps to Reproduce: var getNull = function(){}; try { foo = createObject( 'java', 'java.io.File' ).init( getNull() ); } catch( any e ) { e = structCopy( e
for the following also - return {success: false, data: cfcatch}; //throws "CFCATCH is undefined" error var err = cfcatch; return {success: false, data: err}; //throws "err is undefined" error Steps to Reproduce: public STRUCT function blah(){ try{ return {success: true, data: 'Cold
2673073 CF-4153051 Language : Member Functions Aaron Neff [ANeff] ER for: struct.toUnordered() Struct should have a .toUnordered() member function for converting ordered-to-unordered w/o using StructNew(). For ordered-to-unordered conversion, please compare these: unordered = structNew().append(anyStruct
Comment on [ANeff] Doc Bug for: struct member functions duplicated in docs by External U.
Comment on [ANeff] Doc Bug for: struct member functions duplicated in docs by CFwatson U.
4353965 CF-4202535 Debugging : CFDump,Language : Null Support [ANeff] Bug for: dump displays local scope as [undefined struct element] Issue: dump displays local scope as [undefined struct element] Steps to Reproduce: 1) Enable NULL support 2) Run: function f() { myVar = NULL//if this isn
Comment on CFFiddle for Spreadsheet, List, Struct, and Date/Time functions by Saurav Ghosh
Comment on Member functions can't be chained to struct/array literals by External U.
Comment on Member functions can't be chained to struct/array literals by External U.
Comment on Member functions can't be chained to struct/array literals by External U.
Comment on Member functions can't be chained to struct/array literals by External U.
6472567 CF-4205912 Michael D. Further testing reveals that the bug exists if any scope is specified in the isNull() function isNull(struct.key) <-- fails isNull(struct.struct.key) <-- fails
Array = listToArray("b||a||c", "|", true); writeOutput(myArray.filter(myFunction)); /*myStruct = {one="b",two="a",three="c"}; structEach(myStruct, myFunction);//bug: doesn't return struct*/ /*myStruct = {one="b",two="a",three="c"}; myStruct.each(myFunction);//bug: doesn't return struct*/ /*myStruct
Comment on Bug 82915:(Watson Migration Closure)When passing cfcatch to a function, inside function if you do isStruct() around the variable that cfcatch is being passed to isStruct returns false even though when you dump the variable the dump says by Bradley W.
"; s["b"] = "d"; s["a"] = "q"; s.each(function(key) {writeOutput(key);}); structEach(s, function(key) {writeOutput(key);}); Actual result: JS errors Expected result: zbazba ----------------------------- Additional Watson Details ----------------------------- Watson Bug ID: 4092029 Reason
2609052 CF-3941304 Suchika S. Fix verified on build no: 295636 Test case location: //depot/qa/cf/regression/coretests/coldfusion/member-functions/Struct/Bugs/CF-3941304.cfm
6374809 CF-4205517 Language : Struct Functions Undefined Variable Thrown on Function Return Problem Description: Running the provided code throws an undefined variable error, even though the variable is declared on the line above the return. Steps to Reproduce: {code
Comment on Please add more built-in closure functions: Array/Struct/List/QueryMap, Array/Struct/List/QueryReduce by External U.
Comment on Please add more built-in closure functions: Array/Struct/List/QueryMap, Array/Struct/List/QueryReduce by Suchika S.
2596695 CF-3806526 External U. same on 9.0.2 example: public void function SimpleFunction1 (struct incomingStruct) { writelog(application = true, type = "information", file = "sean", text = "This is SimpleFunction1."); } writelog(application = true, type = "information", file = "sean", text
Bug 83765:if the persistent entity doesn't have any property, theproperties of mapped super class are not returned in the getmetaData()method and the struct key "functions" doens't exists in the top levelstruct
Comment on Unexpected result when setting inline struct inside function call that's inside a CFIF/CFELSE that's inside a CFOUTPUT query loop by Charlie A.
2673073 CF-4153051 Suchika S. Since the function struct.ToUnordered does not have a compelling case and performance of Ordered structs are indeed better than unordered one I am closing the bug! @ Aaron, You may log an enhancement for the performance white paper of Ordered Struct. We will look
Comment on [ANeff] ER for: relevant string, struct and array member functions on XML variables by Vijay M.
6410546 CF-4205756 Language : Struct Functions structSort callback does not accept non simple values Problem Description: Running the following code causes the error: Stack Trace coldfusion.runtime.StructSortValueNotSimpleException: The specified element Thomas does not contain a simple value
New(); is very handy and intuitive.But what is not intuitive is that this stops us from doing something like this in a function definition.function myfunction(struct myStruct={}, array myArray=[])This errors with invalid CFML, and should be fixed. Method: function foo(struct s = {}, array a = []){ return
2608475 CF-4085682 External U. Hi Luis, Which are you proposing? 1) For tags/functions to never return a query and always return an array of structs instead -or- 2) For tags/functions to optionally return either a query or an array of structs Thanks!, -Aaron
2599941 CF-3039556 External U. +1, this issue of code breaking when "local" is set to anything other than a struct, needs to be fixed. (I think we should be allowed to specify, at function-level & component-level, the name of the struct we wish to have used for Explicit Local Scope. Also, if a
exception message: "The function accepts 1 parameter." (singular) Some repro examples: myStruct = {1="b"}; myStruct.each(function(){}, 2);//"The function accepts 1 parameters." (should be "parameter") myVar = "b"; writeOutput(myVar.left(1, 2));//"The function accepts 1 parameters." (should
5936419 CF-4204712 Documentation StructDelete() return not described correctly Problem Description: On https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-s/structdelete.html The documentation says that the function "Returns the updated struct.". In reality
Comment on IsNull() doesn't work on missing key of struct returned from function call by Bradley W.
Comment on IsNull() doesn't work on missing key of struct returned from function call by Vamseekrishna N.
2673657 CF-4119454 External U. No mention here either: https://helpx.adobe.com/coldfusion/developing-applications/the-cfml-programming-language/using-arrays-and-structures/creating-and-using-structures.html And the code examples are rubbish. No mention of struct iteration functions here either
2612212 CF-3540467 External U. Would be quite useful to be able to pass an argumentCollection struct to built-in functions just like one can with UDFs
2672732 CF-4175006 Saurav G. The live docs (updated with callback functions for ListSort and StructSort) are: https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-l/listsort.html https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-s/structsort.html
Argument is not treated as a struct by Query functions
also supported member function for StructGetSorted, anyStruct.getSorted() // sorted struct in ascending order similarly all combinations will work in member function too Date Added :2015-10-29 05:00:09.0 Added By: PreRelease User User Name:Abram Adams Note Added: Entered Feature. Date Added :2015
Comment on Null Pointer Exception sometimes caused by function expression (closure) inside literal struct by External U.
Comment on Applying the function serializeJson() to a struct containing a string whose value is boolean or numeric, removes the string's quotation marks. by A. B.
and that cfc is modified by other function/thread, I doubt struct can the track this optimally.
. The issue here is that the implementation of the baseline struct and array functions have always been a bit limp: they should *always* have returned the struct/array in question. These functions should be altered accordingly, and also accordingly the member function versions should also be modified
Comment on Member functions can't be chained to struct/array literals by External U.
Comment on Member functions can't be chained to struct/array literals by External U.
Comment on Member functions can't be chained to struct/array literals by External U.
Comment on Member functions can't be chained to struct/array literals by External U.
Comment on Member functions can't be chained to struct/array literals by External U.
Comment on keyExists member function not available on all struct objects by External U.
Dump([ type=e.type, message=e.message ]); } StructOrdered function f(StructOrdered st){ return st; } try { result = f(ordered); } catch (any e){ writeDump([ type=e.type, message=e.message ]); } Expectation: That one can specify a type of structOrdered for params
3554667 CF-4199857 Aaron N. A couple of advantages: (a) defaults don't need to be specified, (b) built-in-functions can be updated/enhanced instead of new functions added [StructSort() could've been enhanced instead of adding StructToSorted()]. Thanks!, -Aaron
Comment on Please add more built-in closure functions: Array/Struct/List/QueryMap, Array/Struct/List/QueryReduce by External U.
Comment on [ANeff] ER for: relevant string, struct and array member functions on XML variables by Aaron N.
(action="update", task="myTask", url="http://a.com", interval="daily", startdate=createDate(2015,9,29), starttime="00:00 AM", eventhandler="MyCFC"); MyCFC.cfc ----------- component implements="CFIDE.scheduler.ITaskEventHandler" { public boolean function onTaskStart(struct context) {return true;} public void