In essence, I'm wondering if q4:contentobject can be called from within another object's handler or if I'm attempting to use the tag in an unsupported way. I can call objects directly with contentobject, but as I mentioned in my previous post, I'm getting an error.

I currently use the Spectra tag of the same way in the way that I'm attempting to in FarCry.

Phil Truesdale wrote:

In a nutshell, I'm trying to call a q4:contentobject from within a display handler and I'm getting an error.


I've extracted a complex body element (array of structures of an array of structures) from an existing Spectra application and have been putting it back together in FarCry. This is how I approached it.

I have a body property as part of my custom article type that is an array table.

The array table for body is populated with an array of objectIDs. Each objectID represents what I've called a section. Each section has a title and another array table that contains objectIDs.

The array table for section can contain objectIDs for other embeded objects (most commonly xhtml blocks, but also other assets like popup images, lists of links, video, slideshow, etc.). The xhtml blocks are their own simple type.

I have it all put together but when I start working in the display handlers for the parent article type, I'm getting an error trying to do contentobject calls against the objectids (from the array tables) in the section and xhtml blocks. If I call the objects directly, ie, not nested in another object's display handler, they work fine. I tested again, and any 'nested' contentobject call (in one object trying to contentobject call another) yields an error.

The exact error is:

//**** start error ***//
Element is undefined in a CFML structure referenced as part of an expression. The error occurred in C:\resource\Applications\fourq\tags\contentobject.cfm: line 33
Called from C:\resource\Applications\MC_farcry\packages\types\_mcArticle\display.cfm: line 12
Called from C:\resource\Applications\MC_farcry\packages\types\mcArticle.cfc: line 23
Called from : line 1
Called from C:\resource\Applications\fourq\tags\contentobject.cfm: line 45
Called from C:\resource\Applications\farcry_core\tags\navajo\display.cfm: line 233
Called from C:\resource\Applications\farcry_core\tags\navajo\display.cfm: line 1
Called from C:\resource\Applications\MC_farcry\www\index.cfm: line 4



31 : q4 = createObject("component", "farcry.fourq.fourq");
32 : typename = q4.findType(attributes.objectid);
33 : setVariable("attributes.typename", application.types[typename].typePath);
34 : }
35 :
//*** end error ***//


For what it is worth, all the objects I'm adding to the array tables were created using contentobjectcreate.

Any insight would be appreciated.
Thanks,
Phil



--- You are currently subscribed to farcry-dev as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to