Title: Job Opportunities
Andrew,
 
Something here i don't get. Why wouldn't a class be available? Did someone forget to write it? Does your application accept "outside requests" to create classes that may or may not exist?
 
You could use a try / catch block and if CreateObject() throws an error, catch it and create your default class. But if indeed that's along the lines of what you're after, something seems a little amiss in the architecture. There may be a more solid way to do what you need.
 
Maybe the exact detail would help flesh it out, rather than a theoretical explanation?
 
 
 
 -----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Andrew Scott
Sent: Friday, November 25, 2005 4:16 AM
To: [email protected]
Subject: [CFCDev] Facade - how to?

I was hoping that someone might be able to help me out here; I am looking at creating a super class which can be extended by child objects, simple enough. But I also need to create a façade to interface to these objects.

 

Now I have been reading this list awhile now and not 100% sure on how to go about this. The façade needs to know what type of object to return, based on criteria for example this is what I am thinking.

 

Vehicle – Super

 

Car – Child

 

What I am interested to know, is how to I go looking for the required class and return a default class if the object I am looking for Is not there, so if I was looking for a bike and that class wasn’t available return say a default of the Vehicle class or something.

 

Anyway I have the concept just not the know how to go about it, so I little code examples would be good thanks.

 

Sorry if this has been asked a thousand times already.

 

 

Regards
Andrew Scott
Analyst Programmer

CMS Transport Systems
Level 2/33 Bank Street
South Melbourne, Victoria, 3205

Phone: 03 9699 7988  -  Fax: 03 9699 7976


Quote:
"Space...is big. Really big. You just won't believe how vastly hugely mindbogglingly big it is. I mean you may think it's a long way down the road to the chemist, but that's just peanuts to space. " Douglas Adams
------------------------------------------------------------------------------------------------------

----------------------------------------------------------
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]

Reply via email to