> Is it possible to specify which argument you are passing into 
> a method when creating an object? When I use the following 
> syntax, the method assigns the first parameter to the first 
> argument, the second parameter to the second argument and so on:
> 
> <cfset productItemGateway = createObject("component", 
> "productItemGateway").init(Application.dsn)>
> <cfset getProductsAndItems =
> productItemGateway.getProductAndItems(url.formatID,url.catID) />
> 
> When I was using <cfinvoke /> I would just add an attribute 
> like formatID="url.formatID". Is there any way of doing 
> something similar using createObject()?

You can specify name-value pairs ("named notation") in any order; the
default notation where you specify the values in order is called "positional
notation".

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!



----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to