No, no reason, except a structure with numbers as keys is essentially an
array anyway. That doesn't help me with best practices for getting the
data into and out of the instance. 

-----Original Message-----
From: Qasim Rasheed [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 21, 2006 12:28 PM
To: CF-Talk
Subject: Re: Using arrays in a simple bean

Is there are reason you cannot use Structure for meeting sponsors?

e.g.

<cfset variables.instance.sponsors = StructNew() /> <cfset
variable.instance.sponsors[sponser1] = 'Name of Sponsor' /> ......

HTH

On 12/21/06, Everett, Al (NIH/NIGMS) [C] <[EMAIL PROTECTED]> wrote:
>
> I'm using a bean cfc for an instance of a meeting. Each meeting can 
> have between 0 and 10 sponsors. (These are just string values.)
>
> Rather than have setSponsor1, getSponsor1, setSponsor2 etc. and have 
> 10 different properties in the instance, I thought I'd put it into an 
> array. This has two other side effects: Memory isn't taken up by 
> undefined variables and it should easily allow for future 
> expansion/contraction if the business rules should change.
>
> I'm having a bit of trouble getting my head around the best way to do 
> the getter/setter methods. Has anyone done something similar that I 
> could crib for ideas?
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264768
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to