I'd probably just use an empty string. You could also just leave it undefined, and get would throw an error if you try to retrieve it - if that makes sense for your application. It may make more sense to have the get return "" if the arg doesn't exist, or perhaps even add a method that checks to see if the arg exists. Probably overkill there.
======================================================================== === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email : [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Justin Balog > Sent: Thursday, September 25, 2003 10:22 AM > To: '[EMAIL PROTECTED]' > Subject: RE: [CFCDev] Optional Instances of Components > > > > I guess that was a bad exmaple, and it should be. Lets the > the optional attribute was name? How might you handle that? Thanks, > > Justin > > -----Original Message----- > From: Raymond Camden [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 25, 2003 10:10 AM > To: [EMAIL PROTECTED] > Subject: RE: [CFCDev] Optional Instances of Components > > > Why wouldn't it not just be a boolean? > > <cfset variables.tail = false or true> > > ============================================================== > ========== > === > Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc > (www.mindseye.com) > Member of Team Macromedia > (http://www.macromedia.com/go/teammacromedia) > > Email : [EMAIL PROTECTED] > Blog : www.camdenfamily.com/morpheus/blog > Yahoo IM : morpheus > > "My ally is the Force, and a powerful ally it is." - Yoda > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of Justin Balog > > Sent: Thursday, September 25, 2003 9:45 AM > > To: '[EMAIL PROTECTED]' > > Subject: [CFCDev] Optional Instances of Components > > > > > > > > Howdy, > > > > I am just curious how you might handle optional instances > > vars in components. Lets say I have a dog cfc. It always > > has a weight, but as my dog (a welsh corgi) can attest he has > > no tail. Therefore, a dog may or may not have a tail. Does > > that mean that I just have an empty instance var? Here is how > > I would currently write it. Then if the arguments were > > available, I would use the setters individually? Is there a > > better way to do it? Thanks much! ----Sorry for the short > > hand bellow. > > ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
