Re: cfloop: strange error
#dirlist# is a query object (it's the name you gave your . you need to make a specfic reference to the 'size' "column" returned by the cfdirectory call. You also need to reference a particular row. you can do , which will always give you the size of the first file returned in the call. will give you a specific "row" from the , where 'n' is the row number. On 12/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I'm using a image component and trying to loop through the uploaded file > until the size requirement > is met. However, I'm not sure about this error message. Is there anything > wrong with my cfloop? > All the path variables are good and in a global_variables.cfm file in the Web > root. > > > > > > myImage.readImage("#babysoftheweek_org_image_path##FORM.first_name#_#FORM.last_name#_#FORM.babys_name#.jpg") > /> > myImage.writeImage("#babysoftheweek_resize_path##FORM.first_name#_#FORM.last_name#_#FORM.babys_name#_resized.jpg", > "jpg", "100") /> > myImage.readImage("#babysoftheweek_resize_path##FORM.first_name#_#FORM.last_name#_#FORM.babys_name#_resized.jpg") > /> > > myImage.writeImage("#babysoftheweek_resize_path##FORM.first_name#_#FORM.last_name#_#FORM.babys_name#_resized.jpg", > "jpg", "100") /> > > filter="#FORM.first_name#_#FORM.last_name#_#FORM.babys_name#_resized.jpg" > name="dirlist"> > > line 355 > > > > ERROR: > Complex object types cannot be converted to simple values. > The expression has requested a variable or an intermediate expression result > as a simple value, however, the result cannot be converted to a simple value. > Simple values are strings, numbers, boolean values, and date/time values. > Queries, arrays, and COM objects are examples of complex values. > The most likely cause of the error is that you are trying to use a complex > value as a simple one. For example, you might be trying to use a query > variable in a tag. This was possible in ColdFusion 2.0 but creates an > error in later versions. > > The error occurred in : line 1 > Called from D:\Inetpub\wwwroot\Yobaby\BabyStuff\babies_of_the_week.cfm: line > 355 > Called from D:\Inetpub\wwwroot\Yobaby\BabyStuff\babies_of_the_week.cfm: line > 310 > Called from D:\Inetpub\wwwroot\Yobaby\BabyStuff\babies_of_the_week.cfm: line 1 > > ~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264366 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfloop: strange error
Try dumping file.filesize to make sure it looks right? ~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264363 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfloop: strange error
I dunno, but it looks like one of those variables you're referring to is maybe a struct. And you're refering to it like it isn't. Will ~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264361 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
cfloop: strange error
I'm using a image component and trying to loop through the uploaded file until the size requirement is met. However, I'm not sure about this error message. Is there anything wrong with my cfloop? All the path variables are good and in a global_variables.cfm file in the Web root. line 355 ERROR: Complex object types cannot be converted to simple values. The expression has requested a variable or an intermediate expression result as a simple value, however, the result cannot be converted to a simple value. Simple values are strings, numbers, boolean values, and date/time values. Queries, arrays, and COM objects are examples of complex values. The most likely cause of the error is that you are trying to use a complex value as a simple one. For example, you might be trying to use a query variable in a tag. This was possible in ColdFusion 2.0 but creates an error in later versions. The error occurred in : line 1 Called from D:\Inetpub\wwwroot\Yobaby\BabyStuff\babies_of_the_week.cfm: line 355 Called from D:\Inetpub\wwwroot\Yobaby\BabyStuff\babies_of_the_week.cfm: line 310 Called from D:\Inetpub\wwwroot\Yobaby\BabyStuff\babies_of_the_week.cfm: line 1 ~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264356 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4