Actually that code was the entire contents of my create tag. But based on
your second response, I have a new question. :)

If I shouldn't actually create the object in the create handler (which would
explain my infinite looping btw), can/should I still create the embedded
objects that go into my custom object? The reason I ask this is that when
using the default create handler, I was getting objects with embedded
objects that were not structs, but were the number 0 instead.

I'd hate to have to check the struct everytime the edit handler is called to
see if the object has just been created and now needs to have the child
objects embedded.

Thanks for all the help Ray,
Nate
 

-----Original Message-----
From: Raymond Camden [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 3:09 PM
To: Spectra-Talk
Subject: RE: Infinite Looping When Creating an Object


FYI, this brings up some interesting points:

1) The create handler should NOT be used to create the object. When you do:

<CFA_ContentObjectCreate ...>

Spectra itself will call your create handler AFTER it makes the object. You
should use the Create handler to do stuff like logging the create, or
initialization(sp), etc.

Ditto for the delete handler. When you do:

<CFA_ContentOjbectDelete>

Spectra will call your delete handler, but your delete handler should NOT
have another coDelete in it. (I made that mistake back in the old days of
Spectra. :)

=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Allaire

Email   : [EMAIL PROTECTED]
ICQ UIN : 3679482

"My ally is the Force, and a powerful ally it is." - Yoda

> -----Original Message-----
> From: Nate Smith [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 16, 2001 2:36 PM
> To: Spectra-Talk
> Subject: Infinite Looping When Creating an Object
>
>
> Hey all,
>
> I know I heard something about this before, but now I need to
> hear it again.
> When I'm creating an object from the webtop > object page, the
> server locks
> up on me and creates hundreds of new objects without ever going
> to the edit
> handler. In this code sample, I'm creating an object of type
> myArticle which
> has several embedded objects. One of these objects is a custom link object
> that has an embedded image object. I can't figure out why the code loops
> infinitely. Can anyone shed some light?
>
> Thanks,
> Nate
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to