Remove the item from the selector

Hey guys,.

I am currently working on an application where I need to have a function that allows you to remove items from a selector.

I have a table that contains all the elements. And create similar to this example code selector: link

This is my basic approach code (does not work):

private function removeSubject(subject:String):void {
    var newArrSubjects:Array = [];
    for(var i:int=0; i

My problem is that I don't know how to really the test of equality or how to get the content of the "label".

I have a function to add an item in the selector to work like this:

private function addSubject(subject:String):void {
    arrSubjects.push({label: subject});
    subjectPicker.dataProvider = createDataProviderSubject();       }

The createDataProviderSubject() uses the arrSubjects as their Source to create the DataProvider.

Would be very happy if someone had a great idea to help out me

Hey,.

try running the following code instead and see what you get:

private function removeSubject(subject:String):void{

    for(var i:int=0; i < arrSubjects.length; i++)    {        if(arrSubjects[i].label == subject)        {            /**             * use the splice method of the array             * to delete the object based on the index             *              */            newArrSubjects.splice(i,1);

            /** if there is a match break out of for loop */            break;        }    }

    subjectPicker.dataProvider = createDataProviderSubject();}

This time, we are using the same table and simply removing the item u want. hope that things cleared up. Good luck!

Tags: BlackBerry Developers

Similar Questions

  • How to remove an item from my desk top which I no longer use

    How to remove an item from my counter top who no longer need. I have windows vista home premium and internet exployer 9

    Hi elsie,

    Right-click on the shortcut, the program, or folder, then click on remove.  That's all.  If this does not work, try to use one of the following free products to remove the file/folder/shortcut: Unlocker to: http://www.softpedia.com/get/System/System-Miscellaneous/Unlocker.shtml or file Assassin http://www.malwarebytes.org/fileassassin.php these programs often work when the functions of removing normal do not work correctly.

    If it still does not work, try a clean boot (Vista and W7) http://support.microsoft.com/kb/929135. If you delete the file, then the problem was that there was a conflict or it cannot be deleted because it is run.  Once don't forget to reset your system back to the normal state, as described in the procedures. If the problem occurs in clean mode then just restore the system to normal and reboot - this solution will not work. If you are using XP, see http://support.microsoft.com/kb/310353 and http://support.microsoft.com/kb/316434.

    If this does not work, then start safe mode and try to delete the component of office from there (assuming it to be displayed).  If this does not work, you will need to log in as an administrator and try to delete the item in Windows Explorer in the C:\Users\\Desktop folder for this user and perhaps also any user originally installed the software (perhaps the administrator account).  It may be necessary to do both clean or Safe Mode boot mode (and using the extraordinary remove programs mentioned above as well).

    I believe one of the above will work (and hope the answer is one of the simplest at the top rather than the more complicated to those who follow).

    If you want to remove the underlying program that applies an executable or shortcut icon, go to Control Panel / programs and features.  Find the program is no longer you want, right-click on it and select delete or uninstall or delete (all that appears) and that should also remove the program and probably/possibly the icon at the same time.  Be careful here if - because if you upgrade the program, remove the program related to the icon or folder, if he got somehow placed on the desktop instead of Program Files (unless completely separate program updated as shown in programs and features - so you see both an old and a new version) could cause problems with the new program.  In essence, don't forget when you delete what you really want to delete and it removes this and nothing else.  I recommend the creation of a system restore point before you do.

    I hope this helps.

    Good luck!

  • Remove an item from PC (Media Encoder)

    How can I remove an item from the computer media encoder?

    Hi Avex of misfortune,

    How can I remove an item from the computer media encoder?

    Are you still facing this problem? If so, please contact support: http://bit.ly/PPro-support

    Thank you

    Kevin

  • How can I remove an item from the death of the select icons and notifications appear in the taskbar?

    When I open "Select icons and notifications appear in the task bar" one of the things it lists is "GLBD565.tmp" which seems to be left by the installation of a software product.  The icon is not active and I doubt if it still exists, but it appears in the list.  That list is maintained and how to remove the dead of her spots?

    The entries to Customize Notifications cannot be removed selectively. You can, however, clear the set lists by using the following registry change.

    1. Click Start, type regedit in the Search box and press ENTER.

    2. Locate and then click the following registry subkey:
      Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify HKEY_CURRENT_USER
    3. In the Details pane, click the IconStreams registry entry.
    4. On the Edit menu, click delete, and then click Yes.
    5. In the Details pane, click the PastIconsStream registry entry.
    6. On the Edit menu, click delete, and then click Yes.
    7. Exit Registry Editor.
    8. Restart the Explorer.exe process. To do this, follow these steps:
    9. Press CTRL + SHIFT + ESC.
    10. On the process in the Task Manager tab, click the process explorer.exe and then double click on end process .
    11. On the file menu, click new task (run), type Explorer and click OK.
    12. Exit Task Manager.

    (c) Microsoft Corporation

    -or-

    Download and run a VBScript script that automates the steps above.
    How to delete items from the Notification area in Windows 7/Vista/XP

    Ramesh Srinivasan, Microsoft MVP [Windows Desktop Experience]

  • How to remove an item from the contextual menu orphan?

    I had a workflow that I added in context menu of Clusters.  I forgot to remove it from the context menu before you delete the workflow, so now it is visible as a choice, but naturally does not start.  Any suggestions on how to get off the context menu now?

    If you have a copy of the workflow on another instance of vRO, the easiest way would be to export from, import it on vRO instance that you use with the Web Client and remove the link of action in the context of the user interface.

    If you don't have a copy of the workflow, you can try the following:

    • SSH for vSphere Web Client device stop vsphere-customer service
    • Delete the /storage/vsphere-client/SerenityDB/serenity/ALL/applications/vco-plugin/context.menu.actions file (you can make a copy of it to the case where)
    • Start service vsphere client (or reboot the power of vSphere Web Client)

    After these steps, all custom context action mappings should have disappeared, including orphans.

  • How to remove an item from the start menu in Windows 7?

    I tried to install a game written for an earlier version of Windows.  It did not work, but when I uninstalled the program, he left an icon in my Start menu.  I can't find a way to delete the item in my Start menu.

    If I click on the link, I get a message that says that this is not a valid Win32 application.

    If I right click on the link, I get options:
    Play
    Run as administrator
    More games from Microsoft
    Support
    PIN to the taskbar
    PIN to Start Menu
    Sort by name

    I miss the opportunity, we usually need to change the Menu start manually!

    I did all that, although I had to 'Show hidden files' in two different places, but the guarded program reappear, even after that I deleted everything that I could find that had "Lemmings" in there.  I had installed the program on the D drive and I could delete it, but the next time I saw the Start Menu, it would put a file on drive D named Lemmings Revolution.exe (with no data in this document, 0 bytes).

    I tried the support link from Microsoft and the thought that should work, but alas, I didn't have the product code to enter the FixIt program when asked.

    I finally took a huge risk Open regedit and then sought to any occurrence of the word "Lemmings".  I deleted everything in the registry that referenced "Lemmings", then returned to the D drive (in the command prompt) and deleted the above programme, after that I restarted my computer.

    So far, it seems to have solved the problem...

    (I knew after you remove some of the registry keys, one of the contained key code product I could entered the FixIt program, but by then I had already made changes.)

    Thanks to everyone who tried to help me!

  • How to remove individual items from the purchase history?

    Reserved for HOV can I select individual purchases from the App Store on my iPad or iPhone a remove those permanently in history and always keep those I love, or want kerp, in the list. And how can I sort the list, as you could ;-) in Windows 3.0 for MS-DOS

    You can not delete anything of our shopping list.

    You can hide:

    Hide and show purchases from the iTunes or iBooks on your...

  • How to remove an item from the Favorites folder in the library?

    I'm new to the movement and try to learn to use it.

    In the library is the favorite named folder. I spilled some items in there (moved from content folders, transmitters of particles or generating things) that I would like to delete now.

    I guess these things in the favorite folder are just aliases to the actual items, but I can't figure how to get rid of them.

    Highlight an item in the Favorites folder and pressing the delete key do nothing. Command + del also does nothing. Control-click about to bring up any option decision Trash. Drag the item out of the folder and the desktop does nothing.

    I also created a custom folder in the Favorites folder I want more, and I can't get rid of anyone.

    Can someone tell me how you delete something in the Favorites folder you want is more in there?

    Tom B.

    The content of favorites are in user/Library/Application Support / movement / favorites...

    erase all the content - done.

    No, not very Apple like

    fox_m advice is correct!

  • Microsoft Surface Mail: How to remove an item from the Outbox mail

    ACTION: I composed an email and attached a large file.

    RESULT: The mail is in the Outbox and is NOT sent/received by the recipient.

    It isn't causing any mail from other than synchronization problems flow issues long and mail is flowing.

    I can't find any where to delete the message or stop the process. Looks like a control to stop attempts to send or to be able to removing element to stand.

    Hello 704Cormier,

    You can try this: turn off your internet access by selecting airplane mode - on. Return to the e-mail application and Outbox, upper-right corner must now be a remove hand icon, select it.

    Turn on your internet access by setting off airplane mode. I hope it works for you!

  • [JS] [CS4] Remove all items from the hidden page?

    Hello

    I am trying to remove all the hidden page items regardless of the sublayer how they are buried in. Is this possible? I wrote here a snippet that seems to work only in part. It removes all hidden page items unless two hidden objects exist right after the other in the stacking order. Why this might be happening? Any suggestions?

    for (i=0; i<doc.pageItems.length; i++){
              if (doc.pageItems[i].hidden == true){
                   doc.pageItems[i].remove();
                   }
         }
    

    I'm new to scripting so any help is greatly appreciated.

    Thank you!

    Lindsay

    What happens if you go back to the front? I think that something like that

    #target illustrator
    
    var idoc = app.activeDocument;
    
    for (i = idoc.pageItems.length-1; i>=0; i--){
              if (idoc.pageItems[i].hidden == true){
                   idoc.pageItems[i].remove();
                   }
         }
    

    Worked on a trial

  • How to remove unwanted items from the Task Manager

    WHILE IN A HURRY TO DOWNLOAD FLASH PLAYER INADVERTENTLY, I DOWNLOADED THE UNDESIRABLE ELEMENTS (DUCTING, PLUG INS, ETC.)) THAT

    DO NOT APPEAR IN MY REGISTRY, BUT SHOW UP ON MY TASK MANAGER. HOW CAN I REMOVE THEM? ANY HELP WOULD BE
    APPRECIATED.

    Hi Charles,

    -What version of Windows you are using on the computer?

    You can uninstall unwanted applications in Uninstall or change a program in Control Panel. Check out the link:

    http://Windows.Microsoft.com/en-us/Windows7/uninstall-or-change-a-program

    See also for Windows XP: http://support.microsoft.com/kb/307895

    Response with more information to help you.

  • I can't remove an item from the print queue that is not allowing me to print

    I'm deleting a document in outlook from a HP Color Laserjet CP1215 printer yesterday, and because it is not to delete, I can't print more. Help, please.

    Hi Sierris,

    This document can be blocked in the print spooler, as would be the case sometimes.
    To check the coil:
    Start on your C: drive. Go to the Windows folder, then System32 folder, then the folder of spool, then the Printers folder.
    If there are any files in the Printers folder, delete them, and this can solve your problem.
    Hope this helps and post again if you need more help.
  • I need to remove an item from the library to the stage

    At this moment I have a button that brings a symbol from the library to the stage. Ideally, I want to be able to click on the symbol itself to make the scene. Can someone help me with this?

    for example:

    var sym:WhateverClass = new WhateverClass();

    sym.addEventListener (MouseEvent.CLICK, clickF);

    function clickF(e:MouseEvent):void {}

    e.currentTarget.parent.removeChild (e.currentTarget);

    }

  • How to remove unused items from the library?

    Dear all,


    Flash CS4 is really good for the design and development of point of view. But I noticed two things:

    1. If the library has more point so there is no option on right click "select unused items". How can I get this option "select unused items" on click right while the library has one more items with the scroll bar?
    2. Height of the window actions sometimes increased. Right now there is no option to decrease the height of the window actions except the Reset option.

    Please let me know if I'm wrong!

    See you soon

    Uday Singh

    SR. ActionScripter

    [email protected]

    Why can't you use the library Panel Options option?

    -kumslee

  • How do I remove an item from the list of games?

    RTM Ultimate
    I have an element of 'ghost' in my list of games and I have OCD so its make me want to scratch my corneas so I do not see more... How do I get rid of this?

    I can not open it, cannot right click on it, just meander here and not easy to get rid of it

    I don't know even how find this problem 'clear games windows 7 list' with the most random stuff

    did not work, did the "deep scan rawrcakes advanced omg" and all that but I found where they are stored... knew it had to be either a folder with shortcuts or registry stuff... it's the registry

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\GameUX\Games

  • Can remove you items from the toolbar when you open a pdf file in a browser?

    I know that you can disable the toolbar settings open, but we would like to only show zoom controls in the toolbar.  Can I do this with a FDF file or in another way?

    You will need a form any component server if you want to do 'on the fly '.  No matter have yoru server type and component you choose will define the API.

Maybe you are looking for