>>Hmm, so how can I reliably tell I'm holding a struct and not a CFC ?
>>isStruct() and not isObject() ?
I think you can tell when you are holding a struct and not a CFC like this:
this is a struct
this is an Object
Since isObject() will only return true if it is an object, if you che
On Monday 04 Aug 2008, Brian Kotek wrote:
> CFCs can also be treated as structures for most purposes.
> StructKeyExists(), StructKeyList(), etc. will all work on a CFC instance.
Hmm, so how can I reliably tell I'm holding a struct and not a CFC ?
isStruct() and not isObject() ?
--
Tom Chiverton
CFCs can also be treated as structures for most purposes. StructKeyExists(),
StructKeyList(), etc. will all work on a CFC instance.
On Mon, Aug 4, 2008 at 7:31 AM, Tom Chiverton
<[EMAIL PROTECTED]>wrote:
> When is a struct (as given by isStruct()) not a struct ?
> Answer: When it's a (value) obje
>> From my understanding, I thought an object was a special kind of
structure - a structure with processes (methods).
On the other hand, it may look and act like an object, but it isn't one.
The code below shows that you can create a structure that 'looks' like an
object, (with what appears to be
> The following code creates an object with a few simple properties, and
> dumps
> this OK as an object i.e. component.
> It then says that this is a struct, before confirming again it's an
> object !
>From my understanding, I thought an object was a special kind of structure - a
>structure
When you call duplicate(cfcatch) it returns a structure. Then you can pass
it to a UDF where the argument type is struct and use all struct functions
on it.
That's also how cfdump works. If it gets an exception, it duplicates it.
HTH,
Sam
---
Blog:
You might try creating an empty struct and then setting the CFCATCH into it:
foo = structNew();
foo = cfcatch;
Alternately, you could just use the new struct as a wrapper:
foo = structNew();
foor['error'] = cfcatch;
I haven't tried either, but if the first doesn't work, the second almost
certai
#cfcatch.getClass().toString()#
returns "class coldfusion.runtime.CustomException"
#s.getClass().toString()#
returns "class coldfusion.runtime.Struct"
-nathan strutz
-Original Message-
From: Craig Earls [mailto:[EMAIL PROTECTED]
Sent: Friday, February 06, 2004 8:31 PM
To: CF-T
8 matches
Mail list logo