Making a list a definite length with no repeated data

I have a list tag that currently accepts repeats and as many objects as I will drop into it. Is there a simple way to make this where it will only accept four objects and no repeats?

Here is the code in my item renderer:
protected function hbox1_mouseDownHandler(event:MouseEvent):void{
                var target:Canvas = Canvas(event.currentTarget);
                var sourceObject:Lesson = new Lesson(data.lesson, data.lessonNumber);
                var dragSource:DragSource = new DragSource();
                dragSource.addData( sourceObject, "listCopy" );
                mx.managers.DragManager.doDrag(target, dragSource, event, null , -0, -0, 0.40, true );
Here are the two drag//drop handlers in my class:
                 * allows for 4 items on the list and no repeats
                private function dragDropHandler(event:DragEvent):void{
                    if (event.dragSource.hasFormat('listCopy'))
                        var newObj:Lesson;
                        newObj = event.dragSource.dataForFormat("listCopy") as Lesson;
                        model.selectedLessonList.addItem(newObj as Lesson);
                 * allows for 4 items on the list and no repeats
                   private function dragEnterHandler(event:DragEvent):void
                    tmpObject = event.dragSource.dataForFormat("listCopy");
                    if(tmpObject == null){return;}//something messed up!
                    trace(tmpObject.lesson);
                    repeatFlag = false;
                    for (var i:int=0; i < model.selectedLessonList.length;i++){
                        if (model.selectedLessonList[i].lesson == tmpObject.lesson){
                            repeatFlag=true;
                            break;
                    if (model.selectedLessonList.length < maxLength && repeatFlag==false){
                        DragManager.acceptDragDrop(List(event.target));       
                        DragManager.showFeedback(mx.managers.DragManager.COPY);
Here is the list containing the original item:
           <mx:List id="lstAllCategories" width="245" height="95%" itemRenderer="com.components.renderers.CategoryListItemRenderer"
                                dataProvider="{ApplicationModel.instance.categoryList}" styleName="BoxBackground"
                                rollOver="createToolTip('Mouse_Over_AllCategories')" rollOut="createToolTip('Mouse_Over_BottomOfScreen')">
Here is the list that the item is being dropped into:
<mx:List id="lstCurrentSelectedLessons" dataProvider="{model.selectedLessonList}" width="245" height="140"  dropEnabled="true" dragDrop="dragDropHandler(event);checkSelectedLessonList()" dragEnter="dragEnterHandler(event)"
                                doubleClickEnabled="true" doubleClick="beginLesson()" itemRenderer="com.components.renderers.ChosenListItemRenderer" styleName="BoxBackground"
                                rollOver="createToolTip('Mouse_Over_CurrentLessons')" rollOut="createToolTip('Mouse_Over_BottomOfScreen')">
                            </mx:List>

Similar Messages

  • Where did the iPhone Calendar list function(s) go with iOS7? The Calendar has gone all 'spread sheet' on me and definitely not user friendly. Please advise.

    Where did the iPhone Calendar list function(s) go with iOS7?  The Calendar has gone all 'spread sheet' on me. If you select an item (grey dot) from the month display it will open up the 'spread sheet' at the current time of day, not necessarily when the calendar entry takes place.  I liked iOS6 where you could turn your iPhone to landscape mode and get that special 'spread sheet' feel if that's what you're into.  Has a 'List' presentation been removed from the iPhone Calendar with iOS7?

    The List view is displayed by tapping the Search magnifying glass.

  • Using a Site Studio 10R4 Dynamic List Element Definition

    Hi All,
    I've created and can use a Static List Element Definition > Region Definition > Region Template with no problems based off of the 10gR4 samples.
    However, there is no example that I've found to utilise the Element Definition of a Dynamic List. I'm attempting to use the same sample code as provided for a Static List but having no luck displaying the results of the query...
    Does anyone have some sample code used in a Region Template or Sub Template to show how we use a Dynamic List Element Definition please?
    I noted from another thread in this forum that there are some iDoc calls to make which load the query defined in the Element Definition... I can't find any documentation regarding this either.
    Thanks
    Edited by: user615721 on May 4, 2009 10:08 AM
    Edited by: user615721 on May 4, 2009 10:09 AM

    Found my answer in another thread, here... Re: Using a Site Studio 10R4 Dynamic List Element Definition
    'For 10gR4 Site Studio you can get examples and even a video talking about making dyanmic lists from here:
    http://www.oracle.com/technology/products/content-management/ucm/SiteStudio10gR4Tutorials/index.html'
    Edited by: user615721 on May 4, 2009 10:25 AM
    Edited by: user615721 on May 4, 2009 10:25 AM

  • Making task list field mandatory in creation of maintenance plan?

    Dear All,
    I need your help in configuration of Making task list field mandatory in creation of maintenance plan. I checked with sceen variant config but that also not giving me any option to make the field mandatory.
    Is there any note or user exit for it?
    Regards,
    Kaushal Rai

    Dear,
    Pls check the exit IPRM0004:Maintenance plan / item: Customer check for time "SAVE".
    Regards
    Sunil

  • Work around / fix for making a list of drop down boxes

    Dear experts,
    When lists are created, its cells act like top-level views. Because of this, everything attempting to go past the border of the list item is clipped. This is a problem when making a list of drop down boxes. Is there a known work around for this or maybe a fix?
    Regards,
    Olivier

    thank you saish, moving 'the artists are' helps visually, as for the fix, i really needed to store it in an arrayList, resultSets aren't very happy about being manipulated!
    here's the fix:
    writer.println("<select name=\"userList\" size=\"1\">");
    ArrayList a = new ArrayList();
    ResultSet r=null;
    // this is just my way of accessing the database and the correct method with the artist names in it
    r = factory.getCustomersDAO().get_Artist_Names_Only();
    while(r.next())
    // retrieve artist names as String variables
    String artist = r.getString("artist_name");
    // add to ArrayList
    a.add(artist);
    for(int i=0; i<a.size(); i++)
    Object art = a.get(i);
    art = (String)art;
    writer.println("<OPTION VALUE=\"" +art+ "\">" art "</OPTION>");
    writer.println("<tr><td colspan = \"2\"><h2>Enter Artist Name to be booked: </h2></tr></td>");
    writer.println("</SELECT></TD></TR>");
    thanks again, i've got another problem now that i'm just about to post about, how to register when one particular cell in a html table has had its link clicked!
    jenxx

  • GPIB instrument Screen Capture in Definite Length Block format

    Need help for a person wanting to convert to LabView!
    I need to do a screen capture of an Agilent spectrum analyzer (Model 4408B) and this SA will output an image in JPEG in 488.2 Definite Length Block format. This means the JPEG file will have a header that starts with a "#", is followed by a single digit that gives the length of a following count field, and then the count field, which gives the length of data being sent. For example, to send a block of 1024 bytes, the header would have the form "#41024".
    We do a lot a screen captures in our testing, so we have a many programs in Agilent VEE to do this on a routine basis. In VEE, there is a function called Read BINBLOCK which reads the image data and strips of the header mentioned above before we write the data to a file.
    I started to port this program to Labview to see if we can speed up our testing (in general, not for screen capture). So with Labview 6, I use the "GPIB Read" function to read the image data from the GPIB bus, then write the data into a file. But using a probe, I found that header mentioned above is still there and any image program wouldn't read the image file at all (Can't Open or Can't Determine Type). Furthermore, the "Write File" function in Labview adds some additional header before the "#41024"-type header mentioned above.
    By the way, I tried the GPIB function "RECEIVE" instead of the "GPIB Read" function above and got exactly the same result.
    So the problem has 2 parts:
    1. Is there a way to read, or receive, Definite Length Block data from the GPIB bus (similar to VEE's Read BINBLOCK function).
    2. Is there a way to prevent Labview's "Write File" function not to add some other header of its own to the saved file.
    NOTE: In the "Write File" function, I experimented with using a Pos_Offset value ranging from 1 to 8, in order to get rid of the header caused by part 1 above. But anytime the Pos_Offset value is greater than zero, the saved file will be empty!
    I appreciate any help from the Labview community for this seemingly simple problem.

    Ray K., you are a scholar and a gentleman! I appreciate your extremely helpful suggestion.
    I tried your suggested VI to strip off the header portion added by the 488.2 Definite Length Block format, and with a little modification, it works like a charm. The only thing is that I have to use the "RECEIVE" function (the "GPIB Read" function wouldn't work). But "RECEIVE" works beautifully, and that's what counts.
    The only minor issue is that you have to set the Byte Count of the "RECEIVE" function to tell it the size of the file being received. If Byte Count is not wired, no data will be recieved, even if you set the mode to 1 or 2 to detect the end of file. If Byte Count is set to a number greater than the actual file size, it will work OK. In this case,
    I know the file size so I can set Byte Count correctly. But is there a way for the "RECEIVE" function to detect automatically the End of File so that I don't have to fumble around with Byte Count? As I said, I set Mode value to to 1, 2, or other values but that wouldn't work either.
    Both the "Write File" function (with Header set to False, which is the default) and the "Write Characters to File" VI work perfectly as you pointed out.
    My only remaining question is why "GPIB Read" wouldn't work (with any value of Mode setting and Byte Count) while "RECEIVE" function works. "GPIB Read" did receive the GIF file, but it can't be opened.
    Thank you for your great help.

  • Making A List of Files or Folders

    Is there anyway of making a list of the files or folders I have if I want to send someone a list of files in a folder - or folders for a particular topic without having to actually send them the files.
    I know I can do a screen shot but I was wondering if there was any shortcut in the system that would create a list.
    Thanks.

    You could just use Terminal and use the command line
    function "ls".  For instance, if you want to list the contents
    of a directory called foo in your home directory type in
    ls ~/foo
    You will get a list of all the files in that directory.  To see
    all the listing options available type
    man ls
    then use the arrow key to scrol through all the display options.
    Then press q to return to the command prompt.
    You can then just select that are with the listing with your
    mouse, copy, and then paste the info into your document.

  • With this new itunes I see you can download old song from other p.cs if they are listed in your itunes with a could next to them. How do I make it so I see the songs on my new itunes on a different computer?

    When I first downloaded itunes 11 I saw all my old song that are on another computer listed in my itunes list on my laptop with a little cloud with an arrow in it next to the songs from my old itunes. When I updated to 11.1 the cloud icon stayed in the top part of the itunes list where you can click name, artist, all that to organize you itunes list but the songs from my old account were gone. I can't remember how, but some how I tuned the songs back on, if you will and all my old songs repaired with the clouds next to them. Well my boyfriend has the cloud smiple in his organize list thing, but no songs from his old itunes list of a different computer like me and he wants those songs back. I have been trying for hours to re-watch the itunes and icloud tutorials but because of my slow wi-fi I can't get the videos to load and they keep freezing my itunes so I can't even shut it down without restarting my laptop, so I need some help on remebering how to make the old songs show up in his itunes. Can anyone please help? By the way we both have Windows 7.

    If you go to settings>music there should be a setting to show all music. Turn that off, and the cloud purchases should disappear. You may need to restart the phone to take efect

  • Report For list of material Master with PO text

    Hi all,
    I need a report whether it is available in Standard SAP or a customized, for List of Material Master with their PO text.
    If any one can help, please reply to this theard.
    Regards,
    Kapil Kulkarni

    To get the material number combined with the PO text you will need the help of an ABAP programmer.  The programmer can create a report for you using the function module READ_TEXT in the function group STXD.  The tables to use are:
    STXH - STXD SAPscript text file header
    STXL - STXD SAPscript text file lines
    The selection screen should have at least the following:
    OBJECT - STXH-TDOBJECT
    NAME - STXH-TDNAME
    LANGUAGE - STXH-TDSPRAS
    TEXTID - STXH-TDID
    You find the information for these fields by going to the PO text entry screen and displaying the header information under Goto -> Header.  For materials, the object is MATERIAL, the name is "material number", the language is "EN", and the text ID is BEST.  You can use this program to get long text in lots of places like information records, purchase order texts, etc.
    Hope this helps.

  • How can I print out a hardcopy list of my bookmarks with the URLs? in English

    I want to print out a hardcopy listing of my bookmarks with URLs, How do I do this?

    You can make the menu bar appear by presssing the Alt key. You can print from the File menu.

  • In iTunes 10, I could type "Sinatra" in the search file, and would get a list of all tracks with "Sinatra" in any field.   In iTunes 11 I get these clever little windows, with nice arrows, but no lists to view.   What am I missing?

    In iTunes 10, I could type "Sinatra" in the search file, and would get a list of all tracks with "Sinatra" in any field.   In iTunes 11 I get these clever little windows, with nice arrows, but no lists to view.   What am I missing?

    Thanks for chipping in.   I discovered something after trying what you suggested.   I have quite a few collections of hits by year from Time Life and Billboard.  I've eliminated duplicate tracks that appear in both collections (or other CDs for that matter), but cross-reference the CD where I deleted the track and placed in in the comments section of the CD track I retained.   If I "search" by song name, only the remaining track appears.   But if I want to hear for example Classic Rock 1964, only those tracks remaining would be there when I pull up that CD.   So, I type "Classic Rock 1964,"  in the search field.  First the boxes on the right of the screen open up showing album icons.  Showing four tracks by album with a button to view 10 more, then four songs with an option to vies 18 more.   I finally noticed that at the top of the boxes is a blue band that reads, :Show Classic Rock 1964 in Music.  When I double click on this blue band, all 24 tracks from the original CD appear in the song list format even though I had deleted two of them because they appeard in a Beach Boys CD.   On those tracks, I had referenced Classic Rock 1964 in the comments field.    So, bottom line, Search will also look in the comments field if you click "filter by all" in the magnifying glass to the left of the search field.   And you can move all tracks that if finds into a song list by double clicking on the blue band.

  • Compound filtering xslt list view web part with _dopostback using javascript/jquery

    Hello,
    I am filtering list view web part as same as the below post,
    http://dcsharepointchick.blogspot.in/2013/05/filter-sharepoint-list-with-partial-postback.html
    here I need to filter the web part with some another condition . I am trying to write another condition in filter attribute of _doPostback(), but it doesn't work.
    Please let me know is there any alternative to achieve compound filtering.
    Regards,
    Balakrishna M.

    Hi Balakrishna,
    According to your description, my understanding is that you want to filter the list view web part with more than one filters.
    I recommend to use the OOB Choice Filter web part to achieve this goal.
    Edit the page where the list view web part exists and then add the Choice Filter web parts to the page based on your need.
    More reference:
    http://office.microsoft.com/en-in/sharepoint-server-help/connect-a-filter-web-part-to-a-list-view-web-part-HA101785233.aspx#_Toc296943684
    Or you use the List Filter Plus Web Part to get the function.
    http://www.kwizcom.com/sharepoint-add-ons/sharepoint-list-filter-plus/overview/
    Here is the link to download the web part:
    http://www.kwizcom.com/sharepoint-add-ons/sharepoint-list-filter-plus/download/
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Podcast List view not updated with iTunes 11.3.1.2

    Podcast List view not updated with iTunes 11.3.1.2
    Windows 7 Enterprise Service Pack 1 / Intel-i7 2.40 GHz / 8GB RAM / 64-bit
    iTunes 11.3.1.2
    After refreshing my Podcast list, some Podcasts with new episodes do not display the "Unplayed" blue dot.
    If the podcast "folder" is expanded by clicking the triangle, the new episodes are shown with a "Unplayed" blue dot.
    A new episode is shown in the My Podcast view, with the correct number of new episodes.
    The new episodes are displayed in the All Unplayed view.
    I've tried deleting all episodes and downloading new episodes from the iTunes Store.
    I've tried Unsubscribing and deleting the podcast, then Subscribing again from the iTunes Store.
    Neither attempt resolved the issue.
    I've seen this issue for a while, and was disappointed to find no change with the iTunes 11.3.1.2 update.

    it finally worked; got my Rush 24/7 downloaded, and it finally found my iPhone after switching from the USB 4 port Hub to a dedicated USB 2.0 slot on my laptop.

  • HT1349 When listening to songs on my itunes acct (without ipod attached), I can only play one song at a time. It doesn't automatically play next song on list. It happens with all playlists. It only started happening when I downloaded the latest itunes upd

    When listening to songs on my itunes acct (without ipod attached), I can only play one song at a time. It doesn't automatically play next song on list. It happens with all playlists. It only started happening when I downloaded the latest itunes update.

    Are all songs checked in your playlist?

  • I have different account ID's with my iphone and computer. I would like to standardise both to just the one. One of the ID's doesn't work, when I tried to list the second email with the preferred one a message telling me that this email is already in

    I have different account ID's with my iphone and computer.
    I would like to standardize both to just the one.
    One of the ID's doesn't work, when I tried to list this second email with the preferred one a message telling me that this email is already in use pops up.. yes it is, with me??
    Is there an easy to fix this please, Fabfitz

    If the email address you want to use is being used as the primary email address on a different ID you have to manage that ID and change it to a different primary email address.  This explains how: Change your Apple ID - Apple Support.
    If it is being used as an alternate or rescue address on a different ID, you manage the ID and either remove it or change it to a different email address.  This explains how: Manage your Apple ID primary, rescue, alternate, and notification email addresses - Apple Support.

Maybe you are looking for