Archive applet. Help with adding files to archive, then show.

I need help with this applet: http://pastebin.com/589064
The user is supposed to add, remove and open archives with text in it.
My problem is now the highlited area in the code (the lines with the @@'s).
This button should list all files i have added to the archive, however when i press the button, i only get a numberlisting. eg, if i have added 4 files to the archive I get: 0123
However I want the Joptionpane to show a listing of the files in the archive.
When I press "open" i can choose a file, press add, then open a new file, press add, and then when i click show archive, the filenames of the two files i added, should list through a Joptionpane..as you can see, i've tried, but i'm very unfamiliar with this.

OK..i've done it
check out http://pastebin.com/589268
however, now i'd like to change the code, so that if i try to add to files with the same filename, the applet should show an error message..
How do i do that, please? :-)

Similar Messages

  • When I select files to archive, they move from my file folder, but then I go to the archive folder and it says Empty? Where are those files?

    When I select files to archive, they move from my file folder, but then I go to the archive folder and it says Empty? Where are those files?

    Your account names are probably different on the two Macs. If you know the UNIX command line, open a terminal window and run:
    $ id 
    You should see a line that starts with something like this:
    uid=501(your_user_id_here)
    now check the owner of the folder you copied over:
    $ ls -ld Music
    drwx------+ 8 some_user_id_here  staff  272 May 14 16:08 Music
    Do the IDs match? If not, you could change the ownership. Say your id is "johnsmith"
    $ chown -R johnsmith Music
    Now try and access it with iTunes.

  • Can some help with CR2 files ,Ican`t see CR2 files in adobe bridge

    can some help with CR2 files ,I can`t see CR2 files in adobe bridge when I open Adobe Photoshop cs5- help- about plugins- no camera raw plugins. When i go Edit- preference and click on camera raw  shows message that Adobe camera raw plugin cannot be found

    That's strage. Seems that the Camera Raw.8bi file has been moved to different location or has gone corrupt. By any chance did you try to move the camera raw plugin to a custom location?
    Go To "C:\Program Files (x86)\Common Files\Adobe\Plug-Ins\CS5\File Formats" and look for Camera Raw.8bi file.
    If you have that file there, try to download the updated camera raw plugin from the below location.
    http://www.adobe.com/support/downloads/thankyou.jsp?ftpID=5371&fileID=5001
    In case  you ae not able to locate the Camera Raw.8bi file on the above location, then i think you need to re-install PS CS5.
    [Moving the discussion to Photoshop General Discussions Forum]

  • Help with add file name problem with Photoshop CS4

    Frustrating problem: Help with add file name problem with Photoshop CS4. What happens is this. When I am in PS CS4 or CS3 and run the following script it runs fine. When I am in Bridge and go to tools/photoshop/batch and run the same script it runs until it wants interaction with preference.rulerunits. How do I get it to quit doing this so I can run in batch mode? Any help is appreciated. HLower
    Script follows:
    // this script is another variation of the script addTimeStamp.js that is installed with PS7
    //Check if a document is open
    if ( documents.length > 0 )
    var originalRulerUnits = preferences.rulerUnits;
    preferences.rulerUnits = Units.INCHES;
    try
    var docRef = activeDocument;
    // Create a text layer at the front
    var myLayerRef = docRef.artLayers.add();
    myLayerRef.kind = LayerKind.TEXT;
    myLayerRef.name = "Filename";
    var myTextRef = myLayerRef.textItem;
    //Set your parameters below this line
    //If you wish to show the file extension, change the n to y in the line below, if not use n.
    var ShowExtension = "n";
    // Insert any text to appear before the filename, such as your name and copyright info between the quotes.
    //If you do not want extra text, delete between the quotes (but leave the quotes in).
    var TextBefore = "Lower© ";
    // Insert any text to appear after the filename between the quotes.
    //If you do not want extra text, delete between the quotes (but leave the quotes in).
    var TextAfter = " ";
    // Set font size in Points
    myTextRef.size = 10;
    //Set font - use GetFontName.jsx to get exact name
    myTextRef.font = "Arial";
    //Set text colour in RGB values
    var newColor = new SolidColor();
    newColor.rgb.red = 0;
    newColor.rgb.green = 0;
    newColor.rgb.blue = 0;
    myTextRef.color = newColor;
    // Set the position of the text - percentages from left first, then from top.
    myTextRef.position = new Array( 10, 99);
    // Set the Blend Mode of the Text Layer. The name must be in CAPITALS - ie change NORMAL to DIFFERENCE.
    myLayerRef.blendMode = BlendMode.NORMAL;
    // select opacity in percentage
    myLayerRef.opacity = 100;
    // The following code strips the extension and writes tha text layer. fname = file name only
    di=(docRef.name).indexOf(".");
    fname = (docRef.name).substr(0, di);
    //use extension if set
    if ( ShowExtension == "y" )
    fname = docRef.name
    myTextRef.contents = TextBefore + " " + fname + " " + TextAfter;
    catch( e )
    // An error occurred. Restore ruler units, then propagate the error back
    // to the user
    preferences.rulerUnits = originalRulerUnits;
    throw e;
    // Everything went Ok. Restore ruler units
    preferences.rulerUnits = originalRulerUnits;
    else
    alert( "You must have a document open to add the filename!" );

    you might want to try the scripting forum howard:
    http://www.adobeforums.com/webx?13@@.ef7f2cb

  • Help with adding image onclick

    Hey everyone,
    I am making a simple game in AS3 and need help with adding an image once they have click on something.
    On the left of the screen are sentences and on the right an image of a form. When they click each sentence on the left, writing appears on the form. Its very simple. With this said, what I would like to do is once the user click one of the sentences on the left, I would like a checkmark image to appear over the sentence so they know they have already clicked on it.
    How would I go about adding this to my code?
    var fields:Array = new Array();
    one_btn.addEventListener(MouseEvent.CLICK, onClick1a);
    one_btn.buttonMode = true;
    function onClick1a(event:MouseEvent):void
        fields.push(new one_form());
        fields[fields.length-1].x = 141;
        fields[fields.length-1].y = -85;
        this.addChild(fields[fields.length-1]);   
        one_btn.removeEventListener(MouseEvent.CLICK, onClick1a);
        one_btn.buttonMode = false;
        //gotoAndStop("one")
    two_btn.addEventListener(MouseEvent.CLICK, onClick2a);
    two_btn.buttonMode = true;
    function onClick2a(event:MouseEvent):void
        fields.push(new two_form());
        fields[fields.length-1].x = 343.25;
        fields[fields.length-1].y = -85;
        this.addChild(fields[fields.length-1]);
        two_btn.removeEventListener(MouseEvent.CLICK, onClick2a);
        two_btn.buttonMode = false;
        //gotoAndStop("two")

    I don't know where you're positioning the button that should enable/disable the checkbox but for "one_btn" let's just say it's at position: x=100, y=200. Say you'd want the checkbox to be to the left of it, so the checkbox would be displayed at: x=50, y=200. Also say you have a checkbox graphic in your library, exported for actionscript with the name "CheckBoxGraphic".
    Using your code with some sprinkles:
    // I'd turn this into a sprite but we'll use the default, MovieClip
    var _checkBox:MovieClip = new CheckBoxGraphic();
    // add to display list but hide
    _checkBox.visible = false;
    // just for optimization
    _checkBox.mouseEnabled = false;
    _checkBox.cacheAsBitmap = true;
    // adding it early so make sure the forms loaded don't overlap the
    // checkbox or it will cover it, otherwise swapping of depths is needed
    addChild(_checkBox);
    // I'll use a flag (a reference for this) to know what button is currently pushed
    var _currentButton:Object;
    one_btn.addEventListener(MouseEvent.CLICK, onClick1a);
    one_btn.buttonMode = true;
    function onClick1a(event:MouseEvent):void
         // Check if this button is currently the pressed button
         if (_currentButton == one_btn)
              // disable checkbox, remove form
              _checkBox.visible = false;
              // form should be last added to fields array, remove
              removeChild(fields[fields.length - 1]);
              fields.pop();
              // clear any reference to this button
              _currentButton = null;
         else
              // enable checkbox
              _checkBox.visible = true;
              _checkBox.x = 50;
              _checkBox.y = 200;
              // add form
              fields.push(new one_form());
              fields[fields.length-1].x = 141;
              fields[fields.length-1].y = -85;
              this.addChild(fields[fields.length-1]);
              // save this button as last clicked
              _currentButton = one_btn;
         // not sure what this is
        //gotoAndStop("one")
    I'd also centralize all the click handlers into a single handler and use the buttons name to branch on what to do, but that's a different discussion. Just see if this makes sense to you.
    The jist is a graphic of a checkbox that is a MovieClip symbol in your library exported to actionscript with the class name CheckBoxGraphic() is created and added to the display list.
    I made a variable that points itself to the last clicked button, when the "on" state is desired. If I detect the last clicked button was this button, I remove the form I added and the checkbox. If the last clicked button is not this button, I enable and position the checkbox as well as add the form.
    What is left to do is handle the sitation where multiple buttons are on the screen. When a new button is pushed it should remove anything the previous button added. This code simply demonstrates clicking the same button multiple times to toggle it "on and off".

  • Help with adding a hyperlink to a button?

    We have a simple little site we built in Catalyst and everything works great. The only problem is that we cannot figure out how to add a hyperlink to one of the buttons in the animation. We simply want to be able to click on the button and go to another site (the client's Facebook page specifically). Can anyone provide some insight? Thanks!

    The message you sent requires that you verify that you
    are a real live human being and not a spam source.
    To complete this verification, simply reply to this message and leave
    the subject line intact.
    The headers of the message sent from your address are shown below:
    From [email protected] Tue Nov 03 19:08:07 2009
    Received: from mail.sgaur.hosted.jivesoftware.com (209.46.39.252:45105)
    by host.pdgcreative.com with esmtp (Exim 4.69)
    (envelope-from <[email protected]>)
    id 1N5TPy-0001Sp-J1
    for [email protected]; Tue, 03 Nov 2009 19:08:07 -0500
    Received: from sgaurwa43p (unknown 10.137.24.44)
         by mail.sgaur.hosted.jivesoftware.com (Postfix) with ESMTP id 946C5E3018D
         for <[email protected]>; Tue,  3 Nov 2009 17:08:03 -0700 (MST)
    Date: Tue, 03 Nov 2009 17:07:49 -0700
    From: Tvoliter <[email protected]>
    Reply-To: [email protected]
    To: Matthew Pendergraff <[email protected]>
    Message-ID: <299830586.358941257293283616.JavaMail.jive@sgaurwa43p>
    Subject: Help with adding a hyperlink to a button?
    MIME-Version: 1.0
    Content-Type: multipart/mixed;
         boundary="----=_Part_36702_1132901390.1257293269030"
    Content-Disposition: inline
    X-Spam-Status: No, score=-3.4
    X-Spam-Score: -33
    X-Spam-Bar: ---
    X-Spam-Flag: NO

  • Need help with adding emoji to my hubby's phone don't see it when I click on the keyboard tab

    I need help with adding emoji to my hubby's iPhone when I go to settings then the keyboard tab it's not there

    I did that bad it's not there and doesn't give me to option to click on it

  • On my mac when i click on pages, a new document doesn't open instantly  but a window with my files open and then  have to click on the left bottom new document in order to open one. How can i have directly a new document when i click on pages icon

    On my mac when i click on pages, a new document doesn't open instantly  but a window with my files open and then  have to click on the left bottom < new document> in order to open one. How can i have directly a new document when i click on pages icon

    How to open an existing Pages document?
    Click Pages icon in the Dock to launch Pages.
    When Pages is open, click File menu in the  Pages menu bar.
    Select “Open”.
    When the select document  dialog box opens up, highlight/select the document and click “Open”
    at the bottom right corner of the dialog box.
    s
    https://support.apple.com/kb/PH15304?locale=en_US

  • On Windows 7, CS6 all products, but especially need help with ID.  Fonts that are showing in other applications are not showing in ID.

    on Windows 7, CS6 all products, but especially need help with ID.  Fonts that are showing in other applications are not showing in ID.

    The ID Program folder will be relevant to your OS...
    I took a shot and right clicked on my Scripts Samples, choose reveal in Explorer and opened up the ID Program folder.
    As shown, there is a Fonts folder.
    Drag/Copy/Paste fonts to this folder.

  • I can't get my computer to boot up.  The screen is white with a file folder and then at ? in the middle

    The screen is white with a file folder and then at ? in the middle

    Before declaring that the disk is dead (which is a common cause for what you are seeing), try the steps outlined in this article:
    http://support.apple.com/kb/TS2570
    This article also has some troubleshooting steps you can try:
    http://support.apple.com/kb/ts1417
    If you don't have your original system disks, you can boot into single user mode folloing these instructions:
    http://support.apple.com/kb/ht1492
    and then following the directions for running the fsck command in the second article I list above.
    I would try these things before giving up and assuming that the disk is dead. The flashing question mark indicates that a valid boot disk cannot be found. One cause for this is that the disk has experienced hardware failure. However another cause could be that the system and boot files on that disk are somehow damaged (perhaps from a power surge or an improper shutdown of the computer) and in some cases the above repair steps can restore them to working condition.

  • Help with mutiple files produced by sharing video to Itunes

    Hi All,
    As I continue to learn I am looking for some help. After importing DV video and then creating a movie in Imovie08 I shared the movie with Itunes. Looking through all the video files there are now two copies of everything on the drive..
    Copy #1 is in- movies/imovie/sharing/itunes/filename.mv4
    Copy #2 is in-music/itunes music/ movies/filename.mv4
    The questions are can I delete the one in the Itunes music file? what can I do to prevent this in the future?
    Thanks
    GE

    First most of the movies I am making are over 1gb so having two copies is not really an option as I will soon run out of space.
    Most people would agree and it is not necessary to do if both copies are "standalone" files. Yours are.
    when I checked get info for both files they were the same size so no reference smaller file as I have seen with the projects.
    This merely confimrs that both files are, indeed, "standalone" copies and that iTunes is operating with the default preference to physically copy imported/added files to your iTunes Library wherever that might be located.
    I was able to go into Itunes in the advanced and tell it not to copy to Itunes (thanks again) when sharing. On the most recent shared project this has eliminated the file in Itunes music but saved to the movie, imovie sharing, itunes ...File. When I open I tunes it did pick up the movie and sync with my apple TV. So far so good. My question now is why not leave like this?
    You can leave it like this and that is one of the things mentioned previosly when I cautioned you that in this mode you could not then delete the shared folder copy of your video. Basically you have to options.
    1) The first is to leave your standalone files physically in their original stored location and copy a "reference" pointer (like an alias) to iTunes. This method of operating keeps your iTunes Library relatively small but leaves your main "standalone" files scattered anywhere on any of your hard drives depending on how/where they were created/stored.
    2) The second is to use the iTunes default setting as it was, physically copy the files to the iTunes Library, and then delete the "sourcing" or "intermediate" file which is no longer needed. This work flow "consolidates" all of your video files to single, known area but means your iTunes Library can become quite large.
    The option you choose is up to you. I prefer the second option as I have an external 1 TB drive dedicated exclusively for use as my iTunes Library. In this manner all of my files are located in a known location and I can keep my internal start-up drive (and all other drives) relatively free of "clutter" by deleting video files from their source location as soon as I have imported them to iTunes. And, since I know where the file are located, I still maintain normal access to them for any "file" level operations (e.g., posting to any of my web sites/servers, sharing with friends/family via e-mail, QT Link files, and "reference" files, etc. Basically I use iTunes for the "physical" management of my videos for distribution to iPod, iPhone, and TV devices; iTunes, Front Row, and QT Player viewing; as well as, a central storage point for file level operations such as e-mail (standalone, reference, or QTL), site/server upload source, peer-to-peer distribution, etc. This works for me but may or may not suit another user's particular needs.
    One suggestion earlier was to delete the Movie/Imovie sharing file. While this makes sense I would have to manually transfer it in or share to both then delete it.
    The "sharing to iTunes" by iMovie is "automated." The deletion of extraneous files is not. Since iMovie does not know whether you are using iTunes manage your files physically, it cannot be pre-programmed to automatically delete the "shared" file without risking it will "orphan" the reference sent to/stored in iTunes. That is why the deletion is left to the user as a manual option.
    Why not leave the flow the way it is. Will I later have some issue with I tunes? Or is the potential to over write the information if I adjust the project the issue?
    As previously stated, you can use iTunes in this preference mode. While I doubt there would be any potential for accidental "overwites," there are other possibilities. Besides offending my sense of proper organization, there is the potential for such "scattered" files to be accidentally deleted in error. Also, there is always the possibility that someone might "move" the "standalone" file to a different location on the same or a different hard drive. In either instance, your iTunes file pointer would likely be "orphaned" and the content would no longer be availalable until or unless a valid path were restored. In addition, having files scattered all over your drives makes backing them up a bit of a chore. By consolidating all of my videos and music physically as I do, it is much easier to automatically "back them up" using another external drive and either Time Machine or other such software -- something to consider after doing all that work creating your files. What is best for you will depend on you specific work flows, needs, and concepts. There is no right or wrong here but merely what works best for you.

  • Help With Adding Back Up of Songs & Lists on Re-Installed iTunes v 7.0.2

    I have a portable hard drive with a back up of my 10,000 songs. I have to get my Gateway PC laptop serviced as it continues to crash, and so I will need to re-install iTunes v 7.0.2 and then add back my songs from the portable hard drive.
    I need help with a couple of questions:
    1) Is there a quicker way to add the songs back on to iTunes rather than adding individual files (for songs) and individual folders (for albums)?
    2) I have several song lists (some used to make CD's). How can these lists be backed up as well so that I do not have to re-create these lists?
    Any advice very much appreciated.

    There is a good article on backup here:
    http://discussions.apple.com/thread.jspa?messageID=1522195&#1522195
    If all your music is in the iTunes Music folder and you have room, just copy the iTunes folder to your external drive.
    This will include both your music files and the iTunes library files.
    If you music is stored in other places, you need to backup those too. When you restore you need to ensure the full path name is the same.
    Life is also much easier if you can keep exactly the same account name if you reinsall windows as the account name is part of the path to My Documents.

  • Can you help with rematching file names

    After a computer crash needed to reload my library. When doing this I accidently clicked the option to add track numbers to song names.
    Later I was able to locate my iTunes XML from my old PC, however many of the songs (5000 out of 6000) no don't match because the original song name has been changed since my stupid error caused the files names to get the song number in front of them.
    Anybody have any tips for matching the filenames back up. In my original library some files had track numbers in front and some did not. How can I match them back up. I'm comfortable programming and modifying the iTunes XML but I can't figure out a good way to list out the contents of my hard drive to do the actual matching.
    Tony

    Because this forum software is so absolutely USELESS now, you don't get to see the whole of the question in this view. In the other (non-list) view it says:
    "can you help with a technical problem with the stereo imagery option ? it won't take out lead vocal in a stereo mp3"
    And the answer is that if you can't isolate the vocal in the stereo field, or it is one of these odd ones where it's used inverted polarity in different parts of the stereo signal for the same vocal, then you won't be able to. But without a sample, it's impossible to tell. If you can post a link to one, that might help. It has to be external to this site though - Adobe in their infinite wisdom don't allow the posting of audio files on their audio U2U forum. Helpful, that, isn't it?

  • Help with Reconnecting Files

    Over this past weekend I was moving, via Relocate Masters, large numbers of images from managed status on my MacBook Pro to referenced status on an external drive (an Air Disk, to be precise). This had gone fine for thousands of images, but Sunday night I returned to the computer to find that it was completely locked up in mid-Relocate, and seemed to have been locked up for a while. I'm not sure what happened, but it seemed bad -- I couldn't get to the Force Quit dialog, or anywhere else. I powered down by holding in the power button.
    Upon resurrecting things, Aperture would not open the library. Long story shorter, I rebuilt the database and was then able to see the library contents again. But then I noticed that many files were "offline." Digging further, and using the Manage Referenced Files box, I discovered that some 3500 files need to be reconnected.
    The Reconnect All button did a little bit of magic for me, but now I've gotten to a point where using Reconnect All only reconnects one file at a time. I was renaming files as I Relocated Masters, and my fear is that this is what has caused the disconnect. *So first,* can anyone tell me that this is what has caused the problem (the problem being my apparent need to now reconnect 3400 files, one-by-one)?
    *Second, and more importantly to me, do I have any recourse beyond reconnecting one-by-one?* Again, the problem seems to me to be that the library file expects a file named image.jpg (or whatever), because the change of the file name to greatimage.jpg that occurred during Relocation did not get written to the library file.
    Many thanks for all help and suggestions.

    Homme dArs wrote:
    I hope someone else can join in with a definitive answer to your problem, but I don't believe you will be happy using the configuration you are attempting to set up.
    Having Aperture access your images via wireless is going to be very very slow, and any connection problems will be very frustrating. I have even abandoned the idea of using wireless backup of image files because it so slow.
    Perhaps someone can help with your immediate problem, but I would strongly suggest you find a way to store your referenced files locally (a firewire drive would be ideal).
    Thanks. I certainly appreciate your thought, and before trying it myself, my instinct was the same as yours. That said, until the present problem cropped up, I have to say it has been quite a good solution. My network is 802.11n, and I've noticed no real lag in accessing the files or otherwise using Aperture with a library stored as this is.
    But yes, I hope someone is able to help me get these 3400-some files reconnected short of one-by-one.
    Thank you for your comments.

  • Help with moving files

    I'm having problems copying data across my network to my new mac mini and i'm looking for some help with how to resolve this issue.
    I'm using "Connect to Server' to connect via SMB to a Vista x64 machine that has the files I need to copy. I'm mounting the share as the user that has permissions to the files on the vista client. The connection is fine, but when I start the copy process, I receive an error message about not having the appropriate permissions to copy files and then the entire copy process fails. Here is the exact error message:
    Copy
    The operation cannot be completed because you do not have sufficient privileges for some of the items.
    OK
    From the vista machine I have logged in as the same user and I have taken ownership of ALL of the files and folders I'm trying to copy. I also made sure that the folder is shared with EVERYONE having full access (not something I would normally do, but figured it might help this situation). The vista machine is in a workgroup if that makes a difference.
    Question 1: how can I do this via command line so that instead of stopping the entire file copy it skips the ones it can't copy and copies the rest of them?
    With hundreds of subfolders and thousands of files, I have no idea which ones it is failing to copy making this process quite painful.
    I'm also stuck on another basic issue - when I originally connected to the share, I told the OSX machine to remember the password. If I want to reconnect to the share using a different username and different password, how do I get OSX to reprompt me for this information?
    Help

    You are probably better off using
    ditto
    In a terminal
    man ditto
    and read the description and instructions.
    Yes, sadly, many copy process when the fail at a file abort the rest of the process. Windows does this as well.

Maybe you are looking for

  • Safari crashes when editing a 'note' in Yahoo! Notepad

    Can I get some feedback about the crash tracked in the following crash report -- a new type of Safari crash in my experience since I wasn't doing anything media-intensive, just editing a 'note' in Yahoo! Notepad. Thanks. Date/Time: 2007-11-25 00:02:2

  • Safari wont open any pages that require log in

    Hi, we are having problems accessing any internet pages that require log in from Safari on our macbook pro, including Facebook, hotmail, bank site, and even this forum (on the old pc now). All other pages work fine. Things we have tried so far, resta

  • Canada post email scam and my mac

    Hello Everybody,      Today I'm a little freaked, I loaned my macbook pro (2010, OSX 10.6) to my mom to write up some emails. She was checking her email's (hotmail) junk folder and saw this Canada Post email. She clicked both links, but closed them b

  • Why is my iPhoto so slow?

    Why is My Iphoto so slow when I open it a use it?   It takes forever to open and utilize.

  • Error message after installing Lion:

    Message: L'extension système «/System/Library/Extensions/CDSDAudioCaptureSupport.kext » n'a pas été installé correctement et ne peut être utilisé. Essayez de le réinstaller ou adressez-vous à votre revendeur pour une mise à jour. Thank you for your h