Not necessarily.  The "type" of a component is the "entire" component
name.

Try putting:
"farcry.Public.www.lighthousepro.components.IssueBean"
as the argument type.

Also make sure it is also the return type coming from the bean's init()
method, if defined.  (Just in case.)

You could have:
farcry_1_.Public.www.lighthousepro.components.IssueBean
farcry_2_.Public.www.lighthousepro.components.IssueBean

Which are both valid objects.  Your client component would not know
which IssueBean to use unless you specify the entire path.  This is
especially true when the components are in different directories.  If
all components are in the same directory, you can just use IssueBean.

I prefer using the entire path, starting from the mapping point, just to
make sure I'm not accidentally calling the wrong component.  (It has
happened to me and is very confusing when it happens.)

M!ke

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Raymond Camden
Sent: Thursday, April 28, 2005 3:26 PM
To: [email protected]
Subject: [CFCDev] issue with cfargument

A user is reporting an error on one of my projects and it doesn't make
any kind of sense. The code in question does...

<cfset iBean = createObject("component","components.IssueBean")>
crap, crap, crap
<cfset iBean = application.IssueDAO.create(iBean)>

IssueDAO throws this error:

The argument IBEAN passed to function create() is not of type IssueBean.


Which doesn't make any kind of sense. I did a dump of iBean, and
getMetaData on iBean. It is definitely a component. The name is a bit
odd though:

farcry.Public.www.lighthousepro.components.IssueBean 

Shouldn't the last entry on the item be all that matters?


----------------------------------------------------------
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