Yeah... thank God it's Sci-Fi Friday, or I'd cry about no native 
Object.clone() again.

----- Original Message ----- 
From: "hank williams" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Friday, January 13, 2006 5:52 PM
Subject: Re: [Flashcoders] Copying a DataSet


Yeah, I really meant there is no such thing as passing *complex*
variables in flash, for the reason I explained.

Hank

On 1/13/06, JesterXL <[EMAIL PROTECTED]> wrote:
> Strings and Numbers are passed by val.  Can't remember what else is, 
> though.
>
> ----- Original Message -----
> From: "hank williams" <[EMAIL PROTECTED]>
> To: "Flashcoders mailing list" <[email protected]>
> Sent: Friday, January 13, 2006 5:26 PM
> Subject: Re: [Flashcoders] Copying a DataSet
>
>
> There is no such thing as passing variables by value in flash. Having
> a language automatically create major system data structures seems
> fraught with the potential for unintended consequences because of the
> hierarchical nature of data structures which point to data structures.
>
>  If you want to make a copy, you need to explicitly make a copy of it.
> This is not actually so easy if you are not careful. What you really
> want to do is create a new dataset and set the dataProvider of the new
> dataset to the dataProvider of the old dataset. This will have the
> effect of copying everything out of the old dataset into the new one.
> The reason for this, which is not obvious, is that the dataprovider
> field is really a "getter" function that copys data (value) rather
> than copy's pointers or references.
>
> Regards
> Hank
>
> On 1/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Can I pass a DataSet byVal and not byRef?  I want to create a second
> > DataSet
> > to filter, sort, do some calculations, etc and leave the original 
> > DataSet
> > intact.
> > _______________________________________________
> > Flashcoders mailing list
> > [email protected]
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to