Save the changes to a tilelist component using the sharedObeject() method

Yesterday I asked here a simple way enable users to save changes, they make a request at the click of a button backup and received an excellent suggestion which has been using the method of the shared object that stores the recorded data even after an application is closed and reopeneded.

However, I am fighting to make it work with tilelists changes. In my application I have a text box in which the user can enter his name, a left hand tilelist populated with details of a collection of table which the user can then drag the items in hand right tilelist, a reset button that resets the tilelist, and changes to the tilelists once the user slipped and dropped points , and a backup button clicked once to save all changes to the request, but for the moment it only records the text that a user has entered in the text box.

What I want is when the user drags an element / elements of the left to the right clicks and tilelist tilelist save it any changes made to these two tilelists is also recorded for example the button if the user drags an item from left to right, then save the clicks, next time they close and reopen the application that the article is no longer in the tilelist left and will be in the right.

Can anyone maybe change my code for me so that it saves the tilelists too that I'm completely clueless on where to start on this.

Here is the code for my application: -.

<? XML version = "1.0" encoding = "utf-8"? >

< mx:Application

' xmlns:mx = ' http://www.Adobe.com/2006/MXML "layout =" " absolute "creationComplete ="initprofile1SO ()"

>

< mx:Script >

<! [CDATA]

import

MX. Collections.*;

private function profile1NewsAndSportReset():Sub

{

profile1NewsAndSportAddLinksTilelist.DataProvider =

New

ArrayCollection([)

{link:}

"www.bbcnews.com" , label: "BBC News"

},

{link:}

"www.itv.com/" , label: "ITV"

},

{link:}

"www.skynews.com" , label: "Sky News"

},

]);

profile1NewsAndSportLinkChoice.DataProvider =

New

ArrayCollection ([]);

}

[]] >

< / mx:Script >

< mx:Script >

<! [CDATA]

import

flash.net.SharedObject;

public var

profile1NameSO:SharedObject;

private function initprofile1SO():Sub

{

profile1NameSO = SharedObject.getLocal)

'profile1Name '.

);

If

(profile1NameSO.size > 0)

Profile1NameEntry.text = profile1NameSO.Data.Name;

}

private function saveProfile1(event:MouseEvent):Sub

{

profile1NameSO.data.name = Profile1NameEntry.text;

profile1NameSO.Flush ();

}

[]] >

< / mx:Script >

< mx:TextInput id=" Profile1NameEntry "maxChars =" " 10 "width = » 113 "fontSize = » 10 " x=" 5 " y=" 77.5 "

/ >

< mx:Button click = "profile1NewsAndSportReset ()" id =" " Reset "label =" " Reset " y=" 5 "height = » 25 " x=" 5 "

/ >

< mx:TileList id=" profile1NewsAndSportLinkChoice "fontWeight =" " "BOLD" "dragEnabled =" " true "dragMoveEnabled =" " true "dropEnabled =" " true "height =" " 292 "width =" 650 "top =" 5 "left =" 521 "columnCount =" 5 "rowHeight =" 145 "columnWidth =" 125 "backgroundColor =" #000000 "color =" #FFFFFF " " / > "" "" "

< mx:TileList id=" profile1NewsAndSportAddLinksTilelist "fontWeight =" " "BOLD" "dragEnabled =" " true "dragMoveEnabled =" " true "dropEnabled =" " true "height =" " 419 "width =" 385 "top =" 5 "left =" 128 "columnCount =" 3 "rowHeight =" 145 "columnWidth =" 125 "backgroundColor =" #000000 "color =" #FFFFFF "" "" "" "

>

< mx:dataProvider >

< mx:Array >

< mx:Object " link = ' www.BBCnews.com "label =" BBC News ''

/ >

< mx:Object " link = ' www.ITV.com/ "label =" ITV ''

/ >

< mx:Object " link = ' www.Skynews.com "label =" Sky News ''

/ >

< / mx:Array >

< / mx:dataProvider >

< / mx:TileList >

< mx:Button click = "saveProfile1 (event)" id =" " Save "label =" " Save the changes " x=" 5 " y=" 38 "width = » 113 "height = » 25.5 "

/ >

< / mx:Application >

If this post has answered your question or helped, please mark it as such.



  
     0){
          if(profile1NameSO.data.name){
            Profile1NameEntry.text=profile1NameSO.data.name;
          }
          if(profile1NameSO.data.addList){
            if(profile1NameSO.data.addList != "empty"){
              var addList:Array = profile1NameSO.data.addList.split(",");
              var tempAC1:ArrayCollection = new ArrayCollection();
              for each(var str:String in addList){
                for each(var obj1:Object in addLinksAC){
                  if(str == obj1.label){
                    tempAC1.addItem(obj1);
                    continue;
                  }
                }
              }
              if(tempAC1.length > 0){
                profile1NewsAndSportAddLinksTilelist.dataProvider = tempAC1;
              }
            }
          }
          if(profile1NameSO.data.choiceList){
            var choiceList:Array = profile1NameSO.data.choiceList.split(",");
            var tempAC2:ArrayCollection = new ArrayCollection();
            for each(var str2:String in choiceList){
              for each(var obj2:Object in addLinksAC){
                if(str2 == obj2.label){
                  tempAC2.addItem(obj2);
                  continue;
                }
              }
            }
            if(tempAC2.length > 0){
              profile1NewsAndSportLinkChoice.dataProvider = tempAC2;
            }
          }
        }else{
            profile1NewsAndSportReset();
        }
      }
      private function saveProfile1(event:MouseEvent):void{
        profile1NameSO.data.name = Profile1NameEntry.text;
        var addList:String = "";
        if(ArrayCollection(profile1NewsAndSportAddLinksTilelist.dataProvider).length > 0){
          for each(var obj1:Object in
            profile1NewsAndSportAddLinksTilelist.dataProvider){
            addList += obj1.label + ",";
          }
        }else{
          addList = "empty";
        }
        profile1NameSO.data.addList = addList;
        var choiceList:String = "";
        for each(var obj2:Object in
          profile1NewsAndSportLinkChoice.dataProvider){
          choiceList += obj2.label + ",";
        }
        profile1NameSO.data.choiceList = choiceList;
        profile1NameSO.flush();
      }
    ]]>
  
  
  
  
  
  

Tags: Flex

Similar Questions

  • DoModal and save the FieldChange method

    Hi all

    I have a scenario where the FieldChange event, I must save record and then proceed to a secondary page.

    On FieldChange, I code something like that

    & MY_REC. Save();
    DoModal (Page.MY_PAGE_SEC, "", - 1, - 1);

    But I get the error message
    "Think-time PeopleCode, event (EvalDoModal), but a SQL update occurred in the interval of validation."
    "Think-time PeopleCode events such as messages that require a response from the user can be executed if a SQL, insert, or delete update has occurred in the meantime of validation. Examples of PeopleCode who call the type of SQL update includes process scheduler, TriggerBusinessEvent, or MarkWorked. A unit of work cannot contain both reflection-time events and update SQL type. »

    I would be very grateful if you provide a solution. What I want is, the click of a button, I have to save recording and access to a secondary page.

    Thank you

    Try this

    & MY_REC. Save();
    CommitWork();
    DoModal (Page.MY_PAGE_SEC, "", - 1, - 1);

  • When downloading using firefox I should save the download, and then must go to the download file to start the download. When I download using internet explore I can run a download at the time where as it is downloaded. Can I change a setting somewhere?

    I use Windows 7 with firefox as my default browser. When I download a program using firefox, I wonder if I want to save the file, and then must go to the download folder to start the download. When I download using internet explorer, I gives me the ability to run the download at the time where it is downloaded instead of save the download. Is there a setting I can change to allow me to run downloads when using firefox instead of record?

    Hi shortwedge3,

    You can use the OpenDownload2 extension for the run option when downloading files with Firefox

  • Photos app does not save the changes, impossible to edit photos without using other applications

    'Photos' of photo editing features does not work because it is impossible to save the changes. Photos can be edited as usual, but trying to save the changes that the photo is reinstated to the State of origin regardless of changes. There is no error message, to solve the problem, I tried to reset all settings, but it did not help.

    I have iOS 9.2.1 on an iPhone 6 s.

    Thanks in advance for your advice

    I have the same question since getting my iPhone 6. Very frustrating. Several times the photo says even "revert to original" even though the changes have been never applied, as if he thinks he has saved the changes. I asked for help with an apple store and they had never seen before and had no suggestions.

  • Allow a user to save the changes

    I create an application that is something similar to this one: -.

    http://demo.quietlyscheming.com/DragTile/DragDrop.html

    However I want is when a user is dragging an element from a tilelist component in the other tilelist so that they are able to save these changes so that when they close the application and reopen these changes will always be there i.e. If the superior tilelist is tilelist1 and the low tilelist is tilelist2 and the user is dragging a couple of points to tilelist1 to tilelist2 I want that these items appear in the tilelist component 2 after the app has been closed and then reopened and the items that were NOT to appear in tilelist 1 more.

    I also want the user to be able to type their name in a text box and save it by clicking on save button so their name will also be stated next time they open the app.

    What is the best way to do it? Via xml maybe? I used xml contain data that fills a site in the past, but never used because it allows the user actually insert data into an xml file. Are there examples of what be simiar who can help me?

    I think the first TileList (drag initiator) can be filled with a collection of ArrayCollection in the application, but unless the user has registered, the second TileList dataprovider should be empty, correct? Just initialize this AC and then fill with a SharedObject is a backup was made.

    Greg

  • Unable to get the symbol to save the changes

    I have a symbol in the shared library in FW CS4, & I want to add some graphics to it.  It's not anywhere yet used.

    I open an empty document, put the symbol in it, double-clicking the symbol and saw crumbs of bread, causing the symbol at the top of the page.  I selected modify > symbol > edit symbol and made some changes.

    I went back to my page in the breadcrumbs.  Then I opened a new page, place a copy of the symbol on the page & all the changes I made were on the symbol had disappeared.  How can I save my changes?

    Thank you!

    When you edit a symbol, it doesn't change that the symbol of this document - it does not record changes in the original file of the symbol in the shared library.

    There are two ways to change a symbol and the common library update has changes:

    (1) changing the original file of symbols (for example, "symbol.graphic.png" in the Common Library folder) and then save the file directly back to this place with the same file name (ATTENTION: if it is a symbol of component whose properties can be changed in the symbol properties panel, it is very easy to break the symbol but by changing its object and layer structure.) The modifiable properties depend on the object and change the layer names - these, and the editable symbol will no longer work.)

    (2) open a copy of the symbol you want to change, right-click, and choose "symbol > Break Apart" so that it becomes a normal graphical object is no longer connected to the common library, edit the chart according to the desired, then select all components and press F8 ('create new symbol') - save the symbol from the common library update and give it a new name so that you know what your edited version. (ATTENTION: if it was a symbol of the element with the editable properties, it will lose this editability when you will break and re - save.) You will need to use the command > symbol Script to create the customizable symbol again.)

    Dave

  • Using every night (64). Could not find a way to 'save' the cookies options settings in the Web GUI. Something I'm missing?

    I want to use the option "use the custom settings for history" with cookies turned on in the view of privacy in 35.0a1 every night (2014-09-07). But there is no way that I can save the changes, nightly switch to normative action "remember history" automatically.

    Anyone?

    Maybe you should install the current version of Firefox or switch on the beta update channel instead.

    If you have installed at night because it's the only version that has a 64-bit version, so keep in mind that 64-bit Nightly builds for Windows are generated only for test compilation errors and are not all tests that get any other builds, so the risk that something is wrong can be very high.

    32-bit versions of Firefox should work without problems on 64 bit versions of Windows.

    You can find the full version of the current Firefox 33.0.1 version in all languages and for all systems operating here:

    The latest beta version can be found here:

  • How to save a password changed in Firefox? I rescued him, but then I changed the password and it doesn't give me an option to save the new password. Help, please. Thank you!

    How to save a password changed in Firefox? I rescued him, but then I changed the password and it doesn't give me an option to save the new password. Help, please. Thank you!

    The Web site may use autocomplete = off to prevent Firefox to record the name and the password.

    You can remove autocomplete = off with a bookmarklet to register the name and the password of Firefox.

  • Do a right click to save the bookmark to the folder now. It saves to open general list. I use to be able to record in a selected folder.

    I have have3.6.15 on Win XP Pro system. I recently noticed that I can no longer right click on a web page to save it in a folder of selected bookmarks. It is saved without the possibility of choice at the end of the list of General bookmarks. I use to get a box to select a folder to save the new web page. Any ideas? Thank you

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the Add-ons is the cause of the problem (switch to the DEFAULT theme: Tools > Modules > themes).

    • Makes no changes on the start safe mode window.

    See:

  • Unable to save the changes in the resolution of the screen on Satellite P20

    Recently, I have problems with the resolution/quality of images on my laptop P20.

    When I try to remedy this in the tab settings of Options Diplay it me does not save the changes to the screen resolution or image quality. I am currently using the default monitor on NVIDIA GeFOrce FX Go5200.

    Any ideas?

    Hello

    For all the ideas give us more information please. I just know that the resolution of the standard screen for this laptop is 1440 x 900 and if the right display driver is pre-installed to avoid any problems.

    I used Satellite P20-303 (nVIDIA GeForce FX Go5600) nearly two years with the original display driver and have never had any similar problems.

  • Why won't my router save the changes to 192.168.0.1 DNS settings? (DGN2200v4)

    I just bought a DGN2200v4 and successfully connected to the internet. However, it took me ages to figure out how to save the changes made to DNS settings. (I wanted to use "OpenDNS" on 208.67.222.222)

    It turns out that if I connect to the router through 192.168.0.1, I can not change the DNS settings. When I click "Apply" after entering the new numbering, it takes 30 seconds or more for the progress bar for complete, but no change is made. i.e. it does not save the changes I made.

    If instead I connect to the router via www.routerlogin.net, changes are correctly saved after clicking 'Apply', with the progress bar by taking 30 seconds or more.

    I tried several times with consistent results. Why 192.168.0.1 not working then as www.routerlogin.net don't? I thought they were equivalent - the webpage 'Netgear genius' is identical on both...

    JC

    JCA says:


    Also, do you recommend make a factory hard reset after the firmware update, or there at - there no need?

    Sorry for the late reply.

    Personally, I tend to reset factory and re - enter the settings manually, unless I've saved a backup of this same version of the firmware. However, I use Netgear as Access Points routers and so I have little data to re-enter. To some people will say that a factory reset is useless and very often they would be correct, but the effects of factory reset no when it may be necessary are often difficult to predict. I was moderator on these forums for a dozen years, and have seen hundreds of threads where the solution to the problems after an update of the firmware has been at the factory to reset the router.

  • Save the changes to the input parameters of circle finder

    In the finder, circle and Pattern matching

    We use some KING and setings of entry...

    I need to record this change while the application is running.

    Which method I should use...

    to save the changes

    Hello

    using xml with the structure of the event function to read and write the values selected.

    Example of XML (you can write the the datastructure options circular detection directly):

    Best regards

    K

  • Save the changes without confirmation of Excel

    I finished my program with Excel communications.  It works fine but when the program close XL, it sends a confirmation of savings, I would save all changes automatically, without confirmation

    I tried with a node to invoke with the SaveAs method but he sends this confirmation and with the closing, but that does not work it shows error #97

    I'd appreciate any help!

    Thanks in advance!

    Its a good practice to close all the references, once they have no other use, and you close all references... .but before you have completed your use.

    Here is the explanation regarding your snapshot:

    1] you close the reference to the Application before using the open method: reference to demand, is that of MS Excel Application, so when you close the reference, you actually made an operation output to MS Excel. If MS Excel application is no longer alive then no more sense for any operation you perform. * You must close the reference application (MS Excel) when you have finished all operations that you perform on this request, last sense *.

    In the same way...

    [2] reference workbooks, can say that this reference stores to all open folders, where must be closed from last second before Application.

    [3] reference sheets, can say it stores references to all the worksheets in a single workbook or file, which must be closed in the last third, prior to filing cabinets.

    [4] worksheet reference is a reference to an individual worksheet in an Excel file and therefore must be closed when you're done with this worksheet. Say that you work with the worksheet Sheet1, Sheet2, and Sheet3 in Excel. Each leaf has its individual worksheet reference. So, when you are finished with the worksheet Sheet1, you close the reference to the "Sheet1" sheet and so on.

    [5] range reference is actually a reference to a collection (or group) of cells in a spreadsheet special (same worksheet of which it takes the reference), if you close the reference to the beach once you're done edit/update or what you intend to do with this (aka range) selection.

    Hope this helps?

  • Errro: Cannot save the Terminal Server when he tried to use the program Sony Vegas

    Original title: cannot save the Terminal Server.

    I'm having a problem using my program "Sony Vegas". It worked OK. But now gives me an error. "Cannot save the Terminal Server. I don't know if this a problem of Windows, or Sony Vegas. Please tell us how to solve this problem. Thank you.

    Hi barnstable,.

    Try these steps and check the result.
    Step 1: Check if the Terminal Services service is disabled
    a. Click Start, click Run.
    b. type services.msc, and then click ok.
    c. in the list of services, double-click Terminal Server Services.
    d. change the startup type to automatic and start the service.
    e. click ok to apply the changes.
    f. check if the problem persists.

    Step 2: If the problem persists, uninstall and reinstall the program Sony Vegas
    see How to change or remove a program in Windows XP .
    b. Once you have deleted the program, restart the computer.
    c. reinstall the program.

    For additional support, get in touch with Sony support team.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Windows Photo Gallery - cannot save the changes when you edit a photo

    Photo Gallery - cannot save changes

    When you edit a photo, I get this message: "unable to save changes to this picture because library has encountered a problem." I tried various things I found online (several threads on this site as apparently others have experienced this too), but none of the ideas allowed. Here's the thing, it worked for years until now. Last week I played ignorance a little with my services, disabling some supposedly speeding up my computer and also played with my Start menu. I don't know that I've changed, however. Can any particular service being disabled cause this problem? Thank you and have a nice day.

    When you edit a photo, I get this message: "unable to save changes to this picture because library has encountered a problem." I tried various things I found online (several threads on this site as apparently others have experienced this too), but none of the ideas allowed. Here's the thing, it worked for years until now. Last week I played ignorance a little with my services, disabling some supposedly speeding up my computer and also played with my Start menu. I don't know that I've changed, however. Can any particular service being disabled cause this problem? Thank you and have a nice day.

    =================================
    I have collected the following information from various places...
    If there is something you haven't tried
    may be useful:

    Windows Photo Gallery... Cannot save modified photos...

    No guarantees and proceed at your own risk!

    Good luck...

    --

    (1) try to do a system restore to an hour before
    the problem started.

    With the help of the Windows Vista system restore
    http://www.howtogeek.com/HOWTO/Windows-Vista/using-Windows-Vista-system-restore/

    --

    (2) I've seen reports that this problem may be related
    Kodak Easy Share software. Installation "Kodak
    Single-action Version 8 for Windows from the
    the following link may be the solution.

    Kodak Easy Share 8 software version
    http://www.kodak.com/eknec/PageQuerier.jhtml?PQ-path=130&PQ-locale=en_US&_requestid=5320
    (FWIW, it's a good idea to create a system)
    restore point before installing software or updates)

    --

    (3) I saw reports that could clarify the next steps
    until the question...

    Right click the library icon and choose
    "Run as Administrator"

    --

    (4) I copied the info from a tech forum on
    the net... I don't know if it works, but maybe it's
    worth a try:

    A. right click on Task Manager open the
    taskbar on the bottom of your screen and choosing
    The task in the menu Manager.

    B. click the tab process, along the upper part of the
    The Task Manager screen.

    C. in the process tab, select the corresponding button at the bottom
    left of the screen that says "show processes of.
    all users"and click on it. Click 'Continue' to the UAC
    the prompt that appears.

    D. the screen should turns off a moment, then
    back with much more than process listed. Click
    the "Command line" column to sort the list and
    Search:

    "C:\Program Files\Windows Media Player\wmpnetwk.exe"

    Read the description in the next section on:

    Windows Media Sharing Service reader network

    F. click on this process. Click the end «»
    Treat button"at the bottom right of the screen.
    Confirm 'End process' if necessary.

    You should now be able to save your changes to
    your photos normally. The bad news is that this
    should be performed whenever you start or restart Vista.
    And I don't know how to prevent the situation from
    in the first place of loading.

    --

    5) posted by: artologik
    The solution came to me when I could not recreate
    the problem on a laptop with Vista Home.
    Everything I could compare, I noticed that the
    %Path% environment variable was not between different
    the 2 machines.

    I guess that WLPG relies on the dll must be found
    on the way to the system; When not found, it must return
    Back to ' base or incomplete "library finds it
    the default specific paths or the user. The solution for
    me has been to ensure the entire path system
    to the folders in the order appropriate.

    To fix, follow these steps:

    A. right click on the COMPUTER icon on the
    desktop and choose PROPERTIES

    B. choose ADVANCED SYSTEM SETTINGS

    C. Si you are prompted by UAC to allow, go ahead.
    and ALLOW

    D. click on ENVIRONMENT VARIABLES...

    E. in the bottom half, under SYSTEM VARIABLES,.
    Find the PATH variable and highlight the

    F. click the button CHANGE

    G. ensure that what starts with
    % SystemRoot%\system32;%SystemRoot%;

    H. ensure you that a semicolon separates each entry.

    I. click OK three times

    J. restart the computer

    Good luck...

    Volunteer - MS - MVP - Digital Media Experience J - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - * proceed at your own risk *.

Maybe you are looking for

  • Portege Z30T - A - 10 X availability in France

    Hi all, naïve question: I read brilliant reviews on model Z30t-A-10 X.However I can't seem to find anywhere in France, it's very frustratingsomeone knows who, and when it will be available and where to find today? Thank youLuke

  • What is OpenDNs

    get a shortcut from OpenDNs Guide screen when I open an email and try to click on it to go to the real website.  the popup says he has been "blocked" because it was "adware" or "encounters" - I don't know how it happened, I've managed to go on these

  • Adobe animate text cc tool

    HelloI use adobe animate cc and I chose my preferences animate Webgl. Is it normal that the text tool does not work? It would be possible to make the text with After effects, unfortynatelly savings is my another problem. He executed approximately 80%

  • The font size in the Standard report

    I've looked everywhere in the forum over the last three days at least to learn how to simply change the font size of the data in a standard report.  Nothing works. I have a lot of parts on a form page. I've done some parts read-only, and where necess

  • Reusable Widget question!

    I need to be able to save form several page layouts set field as a widget for re-use. I understand that it would be easier to just put in place all the PDFs into a single PDF and apply a layer, but we try to avoid this extra step (and training) that