I figured this out. What I was trying to do was fine, but in my grid object
I was creating cells like createObject("component", "cfc.cell").
Since grid and cell are in the same folder/package I really should only
create them like createObject("component", "cell").
Obvious to most probably, but I hope it helps someone down the line.
Thanks,
Aaron J. White
On Wednesday, July 10, 2013 9:50:31 AM UTC-5, Aaron J. White wrote:
>
> Hello Guys,
>
>
>
> I am getting the error at the bottom of this message when I try to return
> a component from another component. The odd thing is that I don't always
> get the error and sometimes (rarely) it works just fine. Also, it looks
> like I am confusing OpenBD with my mapping to the cfc folder. I am sure I
> am making some simple mistake so if anyone is able to point it out to me I
> would be grateful.
>
>
>
> I am returning a component called cell from another component called grid
> and both components are in my cfc folder in the root of my application.
>
> In my application.cfc I use a mapping like: <cfmapping
> logicalpath="cfc" relativepath="cfc/" />
>
> I create objects just fine like: <cfset grid = createObject("component",
> "cfc.grid").init() />
>
>
>
> The grid.getCell() function is simply:
>
>
>
> <cffunction name="getCell" *returntype="*cell*"* access="public"
> output="false" hint="gets the cell with the given name">
>
> <cfargument name="name" type="string" />
>
> <cfset cell = variables.cells[arguments.name] />
>
> <cfreturn cell />
>
> </cffunction>
>
>
>
> *struct*
>
> column
>
> 2
>
> detail
>
> Function: getCell
>
> errorcode
>
> errorCode.runtimeError
>
> errorlogfile
>
> [REMOVED]
>
> extendedinfo
>
> *Formal type: cell, Actual type: cfc.cell*, [REMOVED]/cfc/cell.cfc
>
> line
>
> 194
>
> message
>
> The value returned from function getCell() is not of type cell
>
>
>
> Again, thanks for any help.
>
> Aaron J. White
>
>
>
>
>
--
--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en
---
You received this message because you are subscribed to the Google Groups "Open
BlueDragon" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.