Thanks all you've given me a lot to consider. Once the latest project crush
is over I'll be getting back to this.

Regards,

larry

> -----Original Message-----
> From: Jim Davis [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, April 20, 2005 10:47 AM
> To: [email protected]
> Subject: RE: [CFCDev] Brain blockage - detecting whether a 
> cfc is already been instantiated
> 
> 
> What are the handles on the component?  For example are these 
> stored in a struct or another "collection" CFC?
> 
> If so you might consider creating "slots" for all of your 25 
> possibles (25 struct keys for example) - they would begin as 
> blanks and then, as needed be used to hold CFC references.
> 
> You could then use "IsObject()" (in the positive) or 
> "IsSimpleValue()" (in the negative) to determine if the CFC 
> for that slot has been created.
> 
> Something like:
> 
> AllCollections = StructNew();
> AllCollections.TypeOne = "";
> AllCollections.TypeTwo = "";
> 
> Then later:
> 
> If (IsSimpleValue(AllCollections.TypeTwo)) {
>       AllCollections.TypeTwo = CreateObject(...);
> } else {
>       
> AllCollections.TypeTwo.UseSomeMethodThatYoudUseIfItsInstantiated()
> };
> 
> Of course I might be missing something.
> 
> Jim Davis
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 
> > Behalf Of Lyons, Larry
> > Sent: Wednesday, April 20, 2005 8:59 AM
> > To: '[email protected]'
> > Subject: RE: [CFCDev] Brain blockage - detecting whether a cfc is 
> > already been instantiated
> > 
> > Here's the situation, we have up to 25 different biological 
> collection 
> > datasets, each returning a very different set of 
> information. In the 
> > search component we call a java services layer to initially 
> return a 
> > list of items
> > that fit the user's search criteria. Then the app loops 
> through the item
> > list, calling a collection specific CFC that gets the 
> detailed information
> > regarding that product item. Since the returned list may 
> have multiple
> > items
> > from one collection, I only want to instantiate a component 
> once, so I
> > needed a way to testing whether a particular component has 
> already been
> > instantiated.
> > 
> > larry
> > 
> > > -----Original Message-----
> > > From: Jim Davis [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, April 19, 2005 10:31 PM
> > > To: [email protected]
> > > Subject: RE: [CFCDev] Brain blockage - detecting whether a cfc is 
> > > already been instantiated
> > >
> > >
> > > > -----Original Message-----
> > > > From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] 
> > > > On Behalf Of Lyons, Larry
> > > > Sent: Tuesday, April 19, 2005 12:49 PM
> > > > To: '[email protected]'
> > > > Subject: [CFCDev] Brain blockage - detecting whether a cfc
> > > is already
> > > > been instantiated
> > > >
> > > > Hi,
> > > >
> > > > I must be suffering from a brain block here, but is there
> > > any way to
> > > > tell whether a CFC has already been instantiated?
> > >
> > > Do you mean that the "init()" method is run?
> > >
> > > I extend a root CFC with all my CFCs - it sets a variable called 
> > > "DPInit" to "false" in the pseudo constructor and then, 
> in the real 
> > > constructor I set this to "true".  Of course the extended 
> components 
> > > must call the super.init as well.
> > >
> > > I can then do "cfif instance.DPInit" anyplace I want to 
> to determine 
> > > if the
> > > init() method has run.
> > >
> > > Jim Davis
> > >
> > >
> > >
> > >
> > >
> > > ----------------------------------------------------------
> > > You are subscribed to cfcdev. To unsubscribe, send an email to 
> > > [email protected] with the words 'unsubscribe cfcdev' as the 
> > > subject of the email.
> > >
> > > CFCDev is run by CFCZone (www.cfczone.org) and supported by 
> > > CFXHosting (www.cfxhosting.com).
> > >
> > > An archive of the CFCDev list is available at 
> > > www.mail-archive.com/[email protected]
> > >
> > >
> > 
> > 
> > This electronic communication, together with any attachments, may 
> > contain information that is legally privileged, confidential or 
> > otherwise private. The information is intended only for the 
> use of the 
> > individual or entity to which it is addressed. If you are not the 
> > intended recipient, please be aware that any disclosure, copying, 
> > distribution or use of the contents of this communication or any 
> > attachment is strictly prohibited. If you have received this 
> > communication in error, please immediately notify the original
> > sender and delete the received information from your 
> system. Thank you.
> > 
> > 
> > 
> > ----------------------------------------------------------
> > You are subscribed to cfcdev. To unsubscribe, send an email to 
> > [email protected] with the words 'unsubscribe cfcdev' as 
> the subject 
> > of the email.
> > 
> > CFCDev is run by CFCZone (www.cfczone.org) and supported by 
> CFXHosting 
> > (www.cfxhosting.com).
> > 
> > An archive of the CFCDev list is available at 
> > www.mail-archive.com/[email protected]
> 
> 
> 
> 
> 
> 
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email 
> to [email protected] with the words 'unsubscribe cfcdev' as 
> the subject of the email.
> 
> CFCDev is run by CFCZone (www.cfczone.org) and supported by 
> CFXHosting (www.cfxhosting.com).
> 
> An archive of the CFCDev list is available at 
> www.mail-archive.com/[email protected]
> 
> 


This electronic communication, together with any attachments, may contain
information that is legally privileged, confidential or otherwise private.
The information is intended only for the use of the individual or entity to
which it is addressed. If you are not the intended recipient, please be
aware that any disclosure, copying, distribution or use of the contents of
this communication or any attachment is strictly prohibited. If you have
received this communication in error, please immediately notify the original
sender and delete the received information from your system. Thank you. 



----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]


Reply via email to