ArrayCollection.addItem( not just a reference! )

What I'm trying to do is something like
ArrayUtilities.duplicate(object), but using the ArrayCollection.
Also, I haven't been able to find ArrayUtilities.duplicate (it was
referenced in the O'Reily book on AS3).
I have an object of a custom class, and I want to make an
array of them where I can change the original object and not have
it change the array.
For Example:
import controls.Source; //Source is a custom class I created
in the controls dir/folder
[Bindable] public var source:Source;
source.field1="something"; //where field1 is defined as a
String in the Source class
[Bindable] public var destination:ArrayCollection = new
ArrayCollection();
public function addSourceToDestination():void
destination.addItem(source);
source.field1="anything else";
Alert.show(source.field1);
Alert.show(destination[0].field1);
// will show two alert boxes that both say 'anything else'
How do I fix this? I need to save the contents of a form into
an array, then be able to clear the form for re-population and
not have those changes reflected until I add the object to the
next position in the array.
I'll address modifying the contents of the Array later on,
that shouldn't be as difficult.
Can someone
PLEASE help me? I've been pulling my hair out for 3 days,
now I'm running out of hair.
*/

I may be missunderstanding how you ment to implement that,
but I changed my Source class to extend ArrayCollection then after
getting rid of the compiler errors (overloading where not
permitted) I couldn't get it to .clone(). I also tried extending
ArrayCollection in my main class (the code snippet from above is in
a custom class that implements another custom class) and that
didn't work either.
I'm not sure that extending ArrayCollection is the right way
to go. I don't need to add an Array to an Array, I need to add an
Object to an Array by value, not reference. I know that the problem
is with the way AS3 handles composite data types. It makes sense
from a memory saving side, but it does limit functionality in
certain instances. What I need a workaround, as I'm sure there is.
I need
ArrayCollectionVariable[n] =(set by value)= ObjectVariable;
then I
clear the values in ObjectVariable add new values to it,
then add those
new values to ArrayCollectionVariable[n+1] and so on, so
that ArrayCollectionVariable[x] would be a snapshot of what
ObjectVariable would've been when it was added (via a fancy
function stored in a class that this all will take place
in).

Similar Messages

  • Can I clear all the history for a selected site like CNN, not just one "reference" at a time for CNN

    I want to be able to clear certain parts of history. Not all of it for a time, and not just one "entry" at a time. For example: I have lots of entries in history for CNN or ESPN website. Can i remove all of the CNN entries at one time? Clearing it in that kind of grouping. I hope this is clear I am not so good with computer lingo. Thanks

    You can also use a colon (:) that is present to specify the protocol in the search bar.
    In the site bar you can sort by visited date and in the library you can click a column header (e.g. location) to the the history items.
    Note that you can copy (drag/drop) history items to a bookmarks folder to save (preserve) them as bookmarks.
    You would need to use a place: query and create a so called smart folder to have more control.
    *https://developer.mozilla.org/en/Places_query_URIs

  • How to add a button in top ribbons of ALL library types (Not just document libraries)?

    Hi there,
    How to add this custom button on all Library Types (Not just document libraries)?
    RegistrationId="101" RegistrationType="List" adds this button to Document Libraries only - which does not work for me.
    Thanks so much.

    Hi,
    According to your post, my understanding is that you wanted to add a custom button on the ribbon of all the library.
    You can refer to the following code snippet, it would add a custom button “Site Settings” on the ribbon of all the libraries.
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <CustomAction Id="ListViewCustomization" Location="CommandUI.Ribbon.ListView" RegistrationId="101" RegistrationType="List" Title="List View Ribbon Customization">
    <CommandUIExtension>
    <CommandUIDefinitions>
    <CommandUIDefinition Location="Ribbon.Documents.Share.Controls._children">
    <Button Id="ListViewButton" Command="ListViewButtonCommand" Description="Go to Settings" LabelText="Site Settings" TemplateAlias="o2" Sequence="93"/>
    </CommandUIDefinition>
    </CommandUIDefinitions>
    <CommandUIHandlers>
    <CommandUIHandler Command="ListViewButtonCommand" CommandAction="/_layouts/settings.aspx" />
    </CommandUIHandlers>
    </CommandUIExtension>
    </CustomAction>
    </Elements>
    More reference: http://msdn.microsoft.com/en-us/library/ms473643.aspx
    Thanks & Regards,
    Jason 
    Jason Guo
    TechNet Community Support

  • Since the 3.3 update all photo's sync not just top of stack

    Since updating to 3.3, all version of photos in my Aperture library now sync to my iPhone, not just the top of the stack (or picks photo.)  Has anyone else had this issue and/or figured out a way to resolve?  Or is this a bug introduced in the update???

    Yep, this is a *horrible* bug.  At least we hope it's a bug and not the worst feature ever.  It's definitely something occuring in 3.3 and not in 3.2.4 or earlier.  It's also inconsistent with how Aperture handles Picks/Stacks in other aspects.
    There may be a fix for some people.  iTunes will only sync Previews.  So you could delete the Previews of all the non-Picks.  Of course this could be unreasonably time consuming.
    But... There's also a Preview bug in Aperture 3.3!
    There are inconsistencies in when Aperture will generate Previews in 3.3.  It should not generate Previews for images less than the preset Preview resoluton set in Preferences.  However, this isn't always the case.  In fact, it may generate Previews, or not, depending on the portrait/landscape orientation of the image.  The bottom line is that if the Preview isn't generated due to this bug, then it references the Original as the Preview.  This means that for a given image that is affected by the bug, you can't delete the non-existent Preview...
    Which means even the "Delete Previews You Don't Want Sycn'd" work-around also won't work since you can't delete Previews that haven't been generated.
    This is a total nightmare because you may find yourself syncing lots of multiple versions of the same image to the preciously small storage of an iOS device, but also browsing on the device (especially Apple TV) is annoying because of the duplicates.  Additionally, you may be sync'ing extremely large sized Originals (and duplicates thereof) instead of Previews.
    Please send a bug report on the Aperture feedback page here:
    http://www.apple.com/feedback/aperture.html

  • How can i print all the tab pages not just the first page (tab)

    how can i print all the tab pages not just the first page (tab)

    You would need to do this programmatically. Here's one way:
    Attachments:
    Example_VI_BD6.png ‏3 KB

  • I want to move voice memos from iPhone to PC (not just sync to itunes)

    Hi,
    I want to move voice memos from my iPhone to Windows desktop. I saw several posts about syncing them to iTunes. Thats not what i want. I want to copy them to my desktop not just sync to iTunes. Unable to copy - paste from iTunes either.

    impossible to do anything simple on iTunes, I managed to wipe all my recorded voice memos when I tried to move my files from iphone to desktop, instead they just "sync" I never got the point with sync, why can't you just export files and import files from desktop, simple as that why make it so complicated

  • Is there a voice recording app for ipad that shares directly via iMessage (not just email) - like voice memos does on iphone?

    Does any-one perhaps know whether there's a voice recording app for ipad that shares directly via iMessage (not just email) - like voice memo does on iphone?

    You can't do anything in the background of iOS. Apps are still one at a time (with a few exceptions like Music), and suspend when the app is closed. It's also against the App Store guidelines to sell apps that would allow such actions.
    Though, maybe you could get your Voice Memos saved to MP3's, which can play in the background of other apps.

  • Importing a photo folder just with references creates a photo library 2/3 of its size. crazy!

    after ignoring iphoto for many reasons over the last years i thought i give it a try with the new photo app.
    i imported a 70gb photo folder - turning OFF to copy it into the library first, just refering to them - and now it ate up all my space by creating a 41gb (!!!) photo library just with references alone. so now i have a 70gb folder plus an index file that is 41gb big. i am beyond baffled.
    am i doing something wrong here or are they crazy?
    they cannot possibly think this is a smart way to store photos with the small internal hard drives they give us nowadays can they?

    it gets even worse. "photos" has created empty subfolders of almost every photo in my original photo folder.
    thank you apple. good job.

  • I am going to buy a Mac desktop and want to know how to transfer all my purchases and uploaded music from my PC. How can I do this to ensure all videos and music transfer over and not just purchases?

    I am going to buy a Mac desktop and want to know how to transfer all my purchases and uploaded music from my PC. I originally started using iTunes on my PC so it has everything I have ever purchased or uploaded from my own collection of music.
    How can I do this to ensure all videos and music transfer over and not just purchases? Do they do it at the Apple Store or at Best Buy? help!

    Move iTunes Library from PC to MAC
    http://www.macworld.com/article/146958/2010/03/move_itunes_windows_mac.html
    Also, See here if you need to...  iTunes to an External Drive
    http://support.apple.com/kb/HT1751

  • Passing A List To The Struct, Not Just A Single Value

    I need for my structure to go through a list, not just one
    value and I can't see how to get it to work. Say for example the
    offer code is 8 and someone has 2 8's that apply...it is only
    accepting 1 and the other goes unnoticed. Would someone please help
    me figure this out before I bite all of my fingernails off. I'm
    attached a .cfm of the page, but here's the code as well I'm
    talking about. What am I doing wrong?
    <cfelseif currentOffer.saleCodeType_id EQ 8>
    <!--- This is a "specific items" offer. These are
    combinable. --->
    <cfquery name="qryApplySpecificItems"
    datasource="#REQUEST.db#">
    UPDATE shoppingCart_lineItem
    SET price = price - (price * #currentOffer.parameter#),
    title = title + ' - DISCOUNT PRICE',
    expireDate = saleCode.endDate,
    salecode_id = saleCode.saleCode_id
    FROM shoppingCart_lineItem
    INNER JOIN saleCode ON (saleCode.saleCode_id =
    #currentOffer.id#)
    LEFT JOIN product_viewType ON
    (shoppingCart_lineItem.product_id = product_viewType.product_id)
    INNER JOIN product ON (shoppingCart_lineItem.product_id =
    product.product_id)
    LEFT JOIN product_studio ON
    (shoppingCart_lineItem.product_id = product_studio.product_id)
    LEFT JOIN list_product ON (shoppingCart_lineItem.product_id
    = list_product.product_id)
    WHERE shoppingCart_lineItem.cart_id = '#cookie.cartid#'
    AND ((is_PrimaryOnly != 1 AND product_viewType.viewType_id =
    saleCode.viewType_id) OR (is_PrimaryOnly = 1 AND
    product.viewType_primary_id = saleCode.viewType_id)
    OR saleCode.viewType_id IS NULL)
    AND (product_studio.studio_id = saleCode.studio_id OR
    saleCode.studio_id IS NULL)
    AND (product.productType_id = saleCode.productType_id OR
    saleCode.productType_id IS NULL)
    AND (list_product.list_id = saleCode.list_id OR
    saleCode.list_id IS NULL)
    AND shoppingCart_lineItem.expireDate is NULL
    AND (shoppingcart_lineItem.formatCode NOT IN ('SD', 'SM',
    'SR'))
    </cfquery>
    <cfquery name="qryCartTotal"
    datasource="#REQUEST.db#">
    SELECT SUM(ISNULL(MPDPrice,price) * quantity) AS cartTotal
    FROM shoppingCart_lineItem
    WHERE cart_ID = '#COOKIE.cartID#'
    </cfquery>
    <cfset totalnotax = 0>
    <cfif IsNumeric(qryCartTotal.cartTotal)>
    <cfset totalnotax = qryCartTotal.cartTotal>
    </cfif>
    <cfif currentoffer.list_id NEQ "">
    <cfset REQUEST.upsellList = currentoffer.list_id>
    </cfif>
    <cfset cmd = ArrayAppend(offerslist, currentOffer)>
    <cfif currentOffer.salecode EQ usersalecode>
    <cfset codevalid = 1>
    </cfif>

    You can consider to restore an older copy of the places.sqlite file in the Time Machine (if you use this) to recover (inspect) history from that instance of the file.<br />
    Make sure to keep a copy of the current version if you do not want to lose newer history.

  • Mail: Clicking a message in Inbox should open it in a separate window (not just  in lower pane). This stopped working after an automatic update of OS(10.6.8). Suggestions?

    Before updating software (10.6.8), in Mail, clicking a message in the inbox caused the message to appear in its own separate window-- not just in the pane below the inbox. I'm not sure why this function is no longer available. I guess I could delete Preferences (where?) and see if that does it. Any ideas?
    Thanks,
    Nick

    Before updating software (10.6.8), in Mail, clicking a message in the inbox caused the message to appear in its own separate window-- not just in the pane below the inbox.
    Uh…no it didn't. Double-clicking a message would open it in a new window. Regardless of whether you have the message pane visible, you still have to double-click the message if you want it to open in it's own message window.
    I guess I could delete Preferences (where?) and see if that does it.
    No, you can't do that; not unless you want to say bye-bye to all your email. Don't even think about messing around with things unless you know what you're doing, and the consequences.

  • Item is not available for reference to Excise Invoice, Deselect Item OK!

    Hai,
    I am doing a Sub contracting scenario, in which the excise is applicable to main material, i have maintained condition records, captured excise But while doing GRN i am getting Item is not available for reference to Excise Invoice, Deselect Item OK!
    Message no. 4F279
    above errror
    Plz solve my problem

    Whether you tested case in development server ???
    Are you sure SAP Note applies to our version & support package level ?

  • How can i open my iBook on my Mac, not just on my iPhone

    Hi,
    how can i open my iBook on my Mac, not just on my iPhone?  I ask this questions in hopes that I can eventually find a way to have the iPhone read a non "Enhanced" iBook to me.
    I used the Accessibility reader for a brief time but it's very persinickety.  Move the phone a tiny bit and it threw me out from page 70 and back to page 48.  Changing pages when you are in Accessibility is excruciating. Now, I cannot get back there at all.
    I downloaded 2 apps that claim they can read to me but the closest I can get in the instructions says I need to open the iBook from my Mac computer with my iPhone connected and then I will be able to open the iBook in the app called "Read text to me".  Only when I go to open the book on my Mac it says "This book can’t be viewed using this computer. You can view this book using iBooks on your iOS device."
    Thank god, I only have a brain tumor and am not yet completely blind.
    I've been to the Apple store twice, checked out a youtube page with all it's comments and I am still nowhere, over the course of a week.
    Can anybody help me?
    thank you,
    Ellen

    antdude wrote:
    roaminggnome wrote:
    "how can i open my iBook on my Mac, not just on my iPhone?"
    You cannot.
    Ibooks are only for iphone/ipod touch/ipad
    So, there are no third party readers/emulators in Mac OS X and Windows to read them from iTunes? I don't even own an iOS device. I just redeemed Action Comics' Superman #1 from Starbucks and iTunes.
    This one?
    Where the REQUIREMENTS spell out that an iOS device is needed to read it?

  • How can I use my Apple TV at a friends house ?? Is it not just a case of connecting to wifi then log on with my apple ID ?!

    How can I use my Apple TV at a friends house ?? Is it not just a case of connecting to wifi then log on with my apple ID ?!

    Thanks, I'll try it again. Was coming up on the screen saying something about cant work until the clock / time is configured or something ???

  • I want to delete my mobile me account not just from my iPhone but from existence. I want to delete it so that no emails can be received to it, and the sender would receive an undeliverable message. Is this possible?

    I want to delete my mobile me account not just from my iPhone but from existence. I want to delete it so that no emails can be received to it, and the sender would receive an undeliverable message. Is this possible?

    No, you can stop using the account, but you cannot delete it.

Maybe you are looking for