Oh sure, it's possible. I'm not sure if you can use the
cfa_contentObjectData and cfa_contentObjectProperty tags to accesss the
typeID property, but you could certainly do this through a home-brewed SQL
statement. However, if you wanted to stay in the realm of Spectra, you could
write a new custom handler that converts an object to the other type.
Something like this perhaps?

I've not tried this, but I imagine that something like this code would work
for you. In the example below, I've deleted the original object which is a
little dangerous.  You could perhaps assign it to a new objectID of the
original type? That way you'd be making a copy without the risk of deleting
your original. What do you guys think?

-----

        <CFA_handler OBJECT="myObject">
                <!--- hold the new TypeID --->
                <CFSET newTypeID="x">
                
                <!--- preserve the object id --->
                <CFSET theID = myObject.ObjectID>
                <!--- get the contents of the old object --->
                <CFA_contentObjectGet
                        ...
                        r_stObject="stObject"
                >
                <!--- delete the old object --->
                <CFA_contentObjectDelete
                        ...
                        OBJECTID="#theID#"
                >
                <!--- create the new object with the preserved objectID --->
                <CFA_contentObjectCreate
                        ...
                        TYPEID="#newTypeID#"
                        OBJECTID="#theID#"
                        stProperties="#stObject#"
                >
        </CFA_handler>

-
Nate Smith, 
Lead Developer 
[EMAIL PROTECTED] 
www.doceus.com 



-----Original Message-----
From: Lanny R. Udey [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 5:32 PM
To: Spectra-Talk
Subject: Changing the type of an object


Hi,

I want to change the TYPE of an object so that I can just use type security
on it instead of object security. I don't want to move all the objects, just
some based on their label.

We have cloned the type to make the new type. What I am not sure about is,
can you change the type of an object? I can't seem to find a tag to do that.
Is it possible?

I have these objects in containers so don't want to change the IDs,
otherwise I would just copy the contents and put it in new objects in the
new type.

Thanks

Lanny Udey
Hofstra University
[EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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