JFileChooser Multi file selection problem

I am using jdk 1.4.2 .
I tried enabling multiple file selection using JFileChooser but am not able to do so..
following is the code extract..
JFileChooser chooser = new JFileChooser();
int returnVal = chooser.showOpenDialog(RTLogger.this);
if(returnVal == CougarFileChooser.APPROVE_OPTION)
chooser.setMultiSelectionEnabled(true);
if(chooser.isMultiSelectionEnabled())
     System.out.println("multi enabled");//message is displayed
File [ ] files = chooser.getSelectedFiles();
System.out.println("the file length is " + files .length);
//length is zero and not able to select multiple files
}

You have to set the option to allow multiple selections before you call showOpenDialog.

Similar Messages

  • JfileChooser multiple file selection

    hi everyone....
    i have an aplication with a Jfile chooser coded like this:
    var chooser = new JFileChooser();
    chooser.addChoosableFileFilter(
      FileFilter {
        override function getDescription() {
          "Video {extensions.toString()}"
        override function accept(file) {
          if (file.isDirectory())
            return true;
          def name = file.getName().toLowerCase();
          for (extension in extensions)
            if (name.endsWith(extension))
              return true;
          return false
    chooser.setAcceptAllFileFilterUsed(false);and a image that calls the file chooser like this:
    ImageView {//load button
                var image = 0;
                image : bind boton1[image]
                transforms : bind [Transform.translate(0,770),
                                   Transform.scale(0.7,0.6),]
                onMouseClicked: function( e ) {
                if (JFileChooser.APPROVE_OPTION == chooser.showOpenDialog(null)) {
                    source = chooser.getSelectedFile().toURI().toString(); }
                                              }but now i want set the file chooser for multiple file selections and save those urls in to an array...
    i added: //chooser.setMultiSelectionEnabled(true); and tried to save in to an array: insert chooser.getSelectedFiles()toString(); into myarray
    but it only delivers unexpected data that can be readed...
    please helpme with this one....
    Already Thanks...
    Edited by: darwinbotlee on 27/02/2010 06:40 PM

    Hi, change the insert statement:
      var a = for(f in chooser.getSelectedFiles()) {
            f.getName();
    insert a  into myarray ;   

  • File selection problem

    hi,
    When client clicks on the button or Browse button(tag is <input type=file..>) Open Dialog box or Window will be opend in that window i want to show the file stored on server side(in particular folder only not all files on the server) for the selection after that i want to take file name(path of the file) selected by client.

    http://forum.java.sun.com/thread.jspa?threadID=714720&messageID=4131211#4131211
    http://forum.java.sun.com/thread.jspa?threadID=715965&messageID=4136873#4136873
    http://forum.java.sun.com/thread.jspa?threadID=717829&messageID=4145029#4145029
    http://forum.java.sun.com/thread.jspa?threadID=719743&messageID=4153427#4153427
    http://forum.java.sun.com/thread.jspa?threadID=719841&messageID=4153787#4153787
    Seeing your other posts it looks like you have no clue. The server and client communicate
    through http and are 2 different machines (unless you are debugging). You cannot use java.io.File
    in an applet because it runs on the client and you want to list files on the server.
    You cannot use <input type=file to list files on the server because it lists files on the client.
    As suggested before you can use java.io.File on the SERVLET/JSP to generate html code listing the
    files that the client wants to see, or use a database listing location of a file and user rights to it.
    And please do not post the same queston so many times, if you don't understand something place a response
    to an existing thread.

  • How to set the the file selection mode of JFileChooser

    hi,
    i want to set the file selection mode to directories only for JFileChooser class but when i run the code it does not select the folder adn opens the folder instead. i want the user to select a folder from the file system . any ideas?

    Sorry, I misunderstood you question. I thought that you already set it to choose Directories and wondered when you can't select them when you double-click.
    use JFileChooser.setFileSelectionMode(int). This should solve your problem.
    Here is an example:
            JFileChooser jf = new JFileChooser();
            jf.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
            jf.showDialog(this, "Select");
            System.out.println(jf.getSelectedFile());
    unformatted
    JFileChooser jf = new JFileChooser();
    jf.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
    jf.showDialog(this, "Select");
    System.out.println(jf.getSelectedFile());

  • Problem with Multi File upload example, help needed

    I got the code from the following location.....
    http://www.adobe.com/devnet/coldfusion/articles/multifile_upload.html
    And I've got it to work to some degree except I cant get the file transfer to work when pressing, Upload.   Below is what my debugger outputs.  Any thoughts on how to fix this or even what it means?
    At the very bottom of this message is the upload.cfm code.......
    Thanks in advance for the help
    <html>
    <head>
      <title>Products - Error</title>
    </head>
    <body>
    <h2>Sorry</h2>
    <p>An error occurred when you requested this page.
    Please email the Webmaster to report this error.
    We will work to correct the problem and apologize
    for the inconvenience.</p>
    <table border=1>
    <tr><td><b>Error Information</b> <br>
      Date and time: 12/07/09 22:25:51 <br>
      Page:  <br>
      Remote Address: 67.170.79.241 <br>
      HTTP Referer: <br>
      Details: ColdFusion cannot determine how to process the tag &lt;CFDOCUMENT&gt;. The tag name may be misspelled.<p>If you are using tags whose names begin with CF but are not ColdFusion tags you should contact Allaire Support. <p>The error occurred while processing an element with a general identifier of (CFDOCUMENT), occupying document position (41:4) to (41:70).<p>The specific sequence of files included or processed is:<code><br><strong>D:\hshome\edejham7\edeweb.com\MultiFileUpload\upload.cfm      </strong></code><br>
      <br>
    </td></tr></table>
    </body>
    </html>
    <!---
    Flex Multi-File Upload Server Side File Handler
    This file is where the upload action from the Flex Multi-File Upload UI points.
    This is the handler the server side half of the upload process.
    --->
    <cftry>
    <!---
    Because flash uploads all files with a binary mime type ("application/ocet-stream") we cannot set cffile to accept specfic mime types.
    The workaround is to check the file type after it arrives on the server and if it is non desireable delete it.
    --->
        <cffile action="upload"
                filefield="filedata"
                destination="#ExpandPath('\')#MultiFileUpload\uploadedfiles\"
                nameconflict="makeunique"
                accept="application/octet-stream"/>
            <!--- Begin checking the file extension of uploaded files --->
            <cfset acceptedFileExtensions = "jpg,jpeg,gif,png,pdf,flv,txt,doc,rtf"/>
            <cfset filecheck = listFindNoCase(acceptedFileExtensions,File.ServerFileExt)/>
    <!---
    If the variable filecheck equals false delete the uploaded file immediatley as it does not match the desired file types
    --->
            <cfif filecheck eq false>
                <cffile action="delete" file="#ExpandPath('\')#MultiFileUpload\uploadedfiles\#File.ServerFile#"/>
            </cfif>
    <!---
    Should any error occur output a pdf with all the details.
    It is difficult to debug an error from this file because no debug information is
    diplayed on page as its called from within the Flash UI.  If your files are not uploading check
    to see if an errordebug.pdf has been generated.
    --->
            <cfcatch type="any">
                <cfdocument format="PDF" overwrite="yes" filename="errordebug.pdf">
                    <cfdump var="#cfcatch#"/>
                </cfdocument>
            </cfcatch>
    </cftry>

    Just 2 things in my test:
    1) I use no accept attribute. Coldfusion is then free to upload any extenstion.
    Restricting the type to application/octet-stream may generate errors. Also, it is unnecessary, because we perform a type check anyway.
    2) I have used #ExpandPath('.')#\ in place of #ExpandPath('\')#
    <cfif isdefined("form.filedata")>
    <cftry>
    <cffile action="upload"
                filefield="filedata"
                destination="#expandPath('.')#\MultiFileUpload\uploadedfiles\"
                nameconflict="makeunique">
            <!--- Begin checking the file extension of uploaded files --->
            <cfset acceptedFileExtensions = "jpg,jpeg,gif,png,pdf,flv,txt,doc,rtf"/>
            <cfset filecheck = listFindNoCase(acceptedFileExtensions,File.ServerFileExt)/>
    <!---
    If the variable filecheck equals false delete the uploaded file immediatley as it does not match the desired file types
    --->
            <cfif filecheck eq false>
                <cffile action="delete" file="#ExpandPath('.')#\MultiFileUpload\uploadedfiles\#File.ServerFile#"/>
                <cfoutput>Uploaded file deleted -- unacceptable extension (#ucase(File.ServerFileExt)#)</cfoutput>.<br>
            </cfif>
    Upload process done!
            <cfcatch type="any">
                There was an error!
                <cfdocument format="PDF" overwrite="yes" filename="errordebug.pdf">
                    <cfdump var="#cfcatch#"/>
                </cfdocument>
            </cfcatch>
    </cftry>
    <cfelse>
    <form method="post" action=<cfoutput>#cgi.script_name#</cfoutput>
            name="uploadForm" enctype="multipart/form-data">
            <input name="filedata" type="file">
            <br>
            <input name="submit" type="submit" value="Upload File">
        </form>
    </cfif>

  • How do i get the path of the file selected for opening in JFileChooser

    hi
    I need to get the path of the file selected for opening or saving in the JFileChooser dialog box.Is there any method available.if not how do i get that?
    Thanks and Regards
    Saminathan.

    don't know if its the best/only way, but you could use the getSelectedFile() method in JFileChooser which returns a file and then use the getAbsolutePath() file method

  • Opening the file selected by JFileChooser()...

    Hi,
    can anyone explain how to open a file selected by using JFileChooser()...
    Thanx ..
    Regards,
    Sangeetha..

    ya..how to open a file given a file name??
    am new to java programming & plz dont take otherwise if i have asked a nonsense Q.,
    anyways, Thanx for sparing ur time & answering..
    regards,
    Sangeetha..

  • JFileChooser - show files and directories only select directory

    I need a JFileChooser that will display directories and zip files but only allow a directory to be selected.
    basically i need to be able to select a certain directory that contains a certain zip file, so to make it easier to find i want the zip files to show up so i can find the correct directory...
    I tried...
            JFileChooser jfc = new JFileChooser();
            jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
            jfc.setFileFilter(new FileFilter() {
                public boolean accept(File f) {
                    if (f.isDirectory()) {
                        return true;
                    else if (f.getName().endsWith(".zip")) {
                        return true;
                    return false;
                public String getDescription() {
                    return "testing";
            });but that only displays directories in the GUI.
    The javadoc for the setFileSelectionMode() says, "Sets the JFileChooser to allow the user to just select files, just select directories, or select both files and directories. The default is JFilesChooser.FILES_ONLY. " ....which makes you think that setting the file selection mode only alters what can be SELECTED...however it alters what is displayed as well.
    ...any ideas?
    thanks

    This should display the files of interest provided the filter is tuned to do so, and allow you to select either the file of interest or the folder... If you select the file, then folder it is contained is returned.
    JFileChooser chooser = new JFileChooser();
    chooser.setCurrentDirectory(new java.io.File("."));
    MyFileFilter filter = new MyFileFilter();
    chooser.setFileFilter(filter);
    chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
    int returnVal = chooser.showOpenDialog(this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {              
      System.out.println(chooser.getCurrentDirectory());
    }

  • Displaying the path of the file selected by a FileChooser in a TextField

    I'm just getting started with Swing. I developed a simple dialog box that has two text fields and two buttons. The objective is to open two files using those two buttons. I used FileChooser to select the files. Now, I want to display the path of the selected files in their corresponding TextFields. I use the following code to do that.
    final FileChooser fc1 = new FileChooser();
    final FileChooser fc2 = new FileChooser();
    final TextField tf1 = new TextField();
    final TextField tf2 = new TextField();
    private void button1ActionPerformed(ActionEvent evt)
                int returnVal1 = fc1.showOpenDialog(labelPhpFile);
                if (returnVal1 == JFileChooser.APPROVE_OPTION)
                    File file1 = fc1.getSelectedFile();
                    String fileName1 = file1.getName();               
                    String filePath1 = file1.getPath();
                    tf1.setText(filePath1);
    private void button2ActionPerformed(ActionEvent evt)
                int returnVal2 = fc2.showOpenDialog(labelPhpFile);
                if (returnVal2 == JFileChooser.APPROVE_OPTION)
                    File file2 = fc2.getSelectedFile();
                    String fileName2 = file2.getName();               
                    String filePath2 = file2.getPath();
                    tf2.setText(filePath2);
    }The above code works fine only for the first file. Mean the path of the file selected using fc1 is getting displayed in the tf1 TextField. But, the file selected using fc2 is not getting displayed tf2 TextField. Please help me.
    Thank you :)

    h1. The Ubiquitous Newbie Tips
    * DON'T SHOUT!!!
    * Homework dumps will be flamed mercilessly.
    * Have a quick scan through the [Forum FAQ's|http://wikis.sun.com/display/SunForums/Forums.sun.com+FAQ].
    h5. Ask a good question
    * Don't forget to actually ask a question. No, The subject line doesn't count.
    * Ask once
        - Don't Crosspost!
        - Two people answering one question independantly is a waste of there time.
    * Don't even talk to me until you've:
        (a) [googled it|http://www.google.com.au/] and
        (b) looked it up in [Sun's Java Tutorials|http://java.sun.com/docs/books/tutorial/] and
        (c) read the relevant section of the [API Docs|http://java.sun.com/javase/6/docs/api/index-files/index-1.html] and maybe even
        (d) referred to the JLS (for "advanced" questions).
    * [Good questions|http://www.catb.org/~esr/faqs/smart-questions.html#intro] get better Answers. It's a fact. Trust me on this one.
        - Lots of regulars on these forums simply don't read badly written questions. It's just too frustrating.
          - FFS spare us the SMS and L33t speak! Pull your pants up, and get a hair cut!
        - Often you discover your own mistake whilst forming a "Good question".
        - Many of the regulars on these forums will bend over backwards to help with a "Good question",
          especially to a nuggetty problem, because they're interested in the answer.
    * Improve your chances of getting laid tonight by writing an SSCCE
        - For you normal people, That's a: Short Self-Contained Compilable Example.
        - Short is sweet: No-one wants to wade through 5000 lines to find your syntax errors!
        - Often you discover your own mistake whilst writing an SSCCE.
        - Solving your own problem yields a sense of accomplishment ;-)
    h5. Formatting Matters
    * Post your code between a pair of &#123;code} tags
        - That is: &#123;code} ... your code goes here ... &#123;code}
        - This makes your code easier to read by preserving whitespace and highlighting java syntax.
        - Copy&paste your source code directly from your editor. The forum editor basically sucks.
        - The forums tabwidth is 8, as per [the java coding conventions|http://java.sun.com/docs/codeconv/].
          - Indents will go jagged if your tabwidth!=8 and you've mixed tabs and spaces.
          - Lines longer than 80 characters should be wrapped.
          - Proper indentation illustrates program logic.
    * Post your error messages between a pair of &#123;code} tags:
        - That is: &#123;code} ... errors here ... &#123;code}
        - To make it easier for us to find, Mark the erroneous line(s) in your source-code. For example:
            System.out.println("Your momma!); // <<<< ERROR 1
        - Note that error messages are rendered basically useless if the code has been
          modified AT ALL since the error message was produced.
        - Here's [How to read a stacktrace|http://www.0xcafefeed.com/2004/06/of-thread-dumps-and-stack-traces/].
    * The forum editor has a "Preview" pane. Use it.
        - If you're new around here you'll probably find the "Rich Text" view is easier to use.
        - WARNING: Swapping from "Plain Text" view to "Rich Text" scrambles the markup!
        - To see how a posted "special effect" is done, click reply then click the quote button.
    If you (the newbie) have covered these bases *you deserve, and can therefore expect, GOOD answers!*
    h1. The pledge!
    We the New To Java regulars do hereby pledge to refrain from flaming anybody, no matter how gumbyish the question, if the OP has demonstrably tried to cover these bases. The rest are fair game.

  • 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

  • Close excel programmatically after user cancels file selection

    Greetings all. I apologize but I incorrectly posted this question on the wrong board originally so am posting it again here. I have a VI that I wrote with some help from this site that reads in as many user selected Flat Data Files as desired into Excel. The VI opens Excel, places each Flat Data File on one row and ends, allowing the user to manipulate the Excel data as desired. I have tested it without problems with up to 100 files at a time. The VI minimizes Excel at startup so that it will not block the Select File(s) dialogue. MY problem is this: If the user cancels the file selection, it returns an error and leaves Excel open. I understand how to handle the error, but have been unable to make Excel close automatically if the action is canceled. I have tried to invoke the Close without saving node with no luck... probably because I don't understand how to apply it. Ideally, I want to take the error number to a case statement, and if it is anything other than zero (0), meaning no error, I want Excel to close down. This will eventually be an executable so I need to make this right. Can anybody help? I have attached a zip file with the VI's and some sample Flat Data Files.
    Thanks
    Attachments:
    RTS Flat File Data.zip ‏103 KB

    If you want anything to run after an error you must clear the error status boolean from the error cluster. To do this use the bundle by name and set the status value to FALSE, take this output cluster into the function you wish to run.
    Andrew Alford
    Production Test Engineering Technologist
    Sustainable Energy Technologies
    www.sustainableenergy.com

  • How can I load the selected XML File (Selected from a Listview) into the correct Textboxes?

    Right, so I have a windowsform with lots of Textboxes, where the user can type in Information, and then hit "Save", once its saved it goes into a sortof XML Format 
    <?xml version="1.0" encoding="utf-8"?>
    <!--Database-->
    <Case>
      <Person>l<Driver></Driver><License-Holder></License-Holder><Address></Address><Phone></Phone><Date-of-Birth></Date-of-Birth><Registration></Registration>
    Like that.
    Now, on my Startup Form (The main form) there is a Listview that I gave the name Objectlist1. This list displays ANY file located in a specific folder on my computer. This is also where the Saved files appear.
    The list also updates every 5th second so after you save it appears quickly.
    Now, the Files are saved using the content or Value of the first Textbox:
    Dim XmlWrt As XmlWriter = XmlWriter.Create("C:\Users\USER\Desktop\TESTFOLDER\" + Firsttextbox.Text, settings)
    So it appears in the folder and on the list with the value inserted in the first Textbox.
    My problem comes when I want to load this back (Or reverse the function if you will)
    Where I can go to the Objectlist1/Listview, either doubleclick a file or Mark a file, and hit my button "Retrieve"
    I want the Form where you could input all the values to show - which it does
    And the information from the XML/File saved to appear where it once was typed or inserted.
    Here is an example of the code used to save the values from the Textboxes;
    Private Sub Savebutton_Click(sender As Object, e As EventArgs) Handles Savebutton.Click
            If IO.File.Exists(Pholderbox.Text) = False Then
                Dim settings As New XmlWriterSettings()
                settings.Indent = True
                Dim XmlWrt As XmlWriter = XmlWriter.Create("C:\Users\USER\Desktop\TESTFOLDER\" + Pholderbox.Text, settings)
                With XmlWrt
                    ' Write the Xml declaration.
                    .WriteStartDocument()
                    ' CLIENT
                    ' Write a comment.
                    .WriteComment("Database")
                    ' Write the root element.
                    .WriteStartElement("Case")
                    ' Start our first person.
                    .WriteStartElement("Person")
                    .WriteString(Textbox1.Text)
                    ' The person nodes.
                    .WriteStartElement("Driver")
                    .WriteString(Textbox2.Text)
                    .WriteEndElement()
    I've tried multiple codesamples but they all give either "XML Not found" or such Overloads.
    This is the current code I used when trying to make it work
    Private Function ReadSettingsXML(ByVal path As String) As MySettings # On Debug It marks here and tells me it wasn't found.
            Dim thisSettingsInfo As New MySettings
            If My.Computer.FileSystem.FileExists(Objectlist1.SelectedItems.ToString) Then
                Dim settingsInfo = XElement.Load(Objectlist1.SelectedItems.ToString)
                If settingsInfo IsNot Nothing Then
                    For Each mainGroup As XElement In settingsInfo.Elements
                        If mainGroup.Name = "<Database>" AndAlso mainGroup.HasElements Then
                            For Each subGroup As XElement In mainGroup.Elements
                                If subGroup.Name = "<Person>" Then
                                    thisSettingsInfo.Textbox1 = subGroup.Value
                                ElseIf subGroup.Name = "<Driver>" Then
                                    thisSettingsInfo.Textbox2 = subGroup.Value
                                ElseIf subGroup.Name = "<Address>" Then
                                    thisSettingsInfo.Textbox3 = subGroup.Value
                                End If
                            Next
                        End If
                    Next
                Else
                    thisSettingsInfo = Nothing
                    Throw New Exception("The settings XML file is corrupt and cannot be read.")
                End If
            Else
                thisSettingsInfo = Nothing
                Throw New Exception("The settings XML file could not be located.")
            End If
            Return thisSettingsInfo
        End Function
        Private Sub LoadXML_Click(sender As Object, e As EventArgs) Handles LoadXML.Click
            Dim settings As New MySettings
            settings = ReadSettingsXML(Objectlist1.SelectedItems.ToString)
            If settings IsNot Nothing Then
                Dim sb As New System.Text.StringBuilder
                With settings
                    Caseworker.Textbox1.Text = .Person
                    Caseworker.Textbox2.Text = .Driver
                    Caseworker.Textbox3.Text = .Address
                End With
            End If
        End Sub
    Also, the "Caseworker" is the form where all the textboxes are located.
    Been stuck on this for two working days, so any help is highly appreciated 
    Codesamples are also highly welcome so I can see what the heck you did and find and answer to my problems.

    I found a code that might be close to what I'm looking, but as of this code used here, it looks for a static document that already exist and is located in the code.
    See this one here, checks for the XML file, and since I can't link one program to 1 file, when its gonna have and use 100's of files.
            If (IO.File.Exists("MyXML.xml")) Then
                Same here with the static document.
                Dim document As XmlReader = New XmlTextReader("MyXML.xml")
                While (document.Read())
                    Dim type = document.NodeType
                    'if node type was element
                    If (type = XmlNodeType.Element) Then
                        If (document.Name = "FirstName") Then
                            TextBox1.Text = document.ReadInnerXml.ToString()
                        End If
                        If (document.Name = "LastName") Then
                            TextBox2.Text = document.ReadInnerXml.ToString()
                        End If
                    End If
                End While
    Am I at least close here, people? 
    Can anyone help with the now critical issue I got?
    I basically need to change these two;
     If (IO.File.Exists("MyXML.xml")) Then
                Same here with the static document.
                Dim document As XmlReader = New XmlTextReader("MyXML.xml")
    To whatever value, so they read from the file SELECTED in my Listview
    Cos the program saves files according to the info inserted in textboxes, so it can have whatever name you can think of, I need the program to "find and load" that file, once its selected, and then once I hit Retrieve or LOAD or whatever button, it
    injects the info from the File to the correct Textboxes.
    And I think this will work to get the info in the right boxes;
     If (document.Name = "FirstName") Then
                            TextBox1.Text = document.ReadInnerXml.ToString()
                        End If
                        If (document.Name = "LastName") Then
                            TextBox2.Text = document.ReadInnerXml.ToString()
    Any good advise? I'm stranded here.

  • File sharing problems and horror story (nearly)

    I use Leopard on a MacBook Pro, a MacBook and a iMac G4 800 MHz (unsupported model).
    I have on the iMac and the MacBook Pro many users (the same ont he two machines) and I always use Fast User Switching.
    I have had very few problems with Leopard until now; I like it even if there are some glitches or some new features which are not my cup of tea (hierarchical menus missing from the dock, stacks useless when there are many items, FireWall impossibilities (?) to open specific ports, Back to my Mac working on a Lan but not from outside until now, problems with a few apps (Parallels networking erratic), ...
    Now about File Sharing.
    Let say my main account is user1 (Administrator), and I have another user2 also administrator, plus user3, user4 standard users.
    On the iMac I activate File Sharing.
    On the MacBookPro, as user1, if I connect to the iMac Server (using afp://IPaddress_of_theiMac/) I do NOT get the dialog
    "Enter your user name and password to access file server YYY
    Connect to server as Guest or as Registered User"
    but I directly get the dialog
    "Select the volumes you want to mount on YYY"
    From this, if I select user1 it mounts with full read/write permissions which is normal. It appears that I am connected with my Apple account user1&mac.com (same as mentionned in the Account panel of System Preferences).
    On the other hand, if I try to connect to the user2 account, I only get limited access although in the File Sharing Preferences, user1/iMac is mentionned with full Read/Write preferences for the Home Folder of user2.
    What is very surprising is that if I log on the MacBook Pro as user2, or user 3 or user4, then connect to the iMac, I first get the dialog to enter a user name and a password. This gives me access with the correct full permissions on user1/iMac or user2/iMac using the corresponding user name/password pair; this is the usual behaviour which is missing when trying to connect from user1/MacBook Pro.
    Now for the Horror Story!
    Trying to understand what was going on with the permissions of the user2/iMac account, I logged in to the iMac as user1, went to the Users folder and from there had a look on the informations about user2 home folder. In the lower part of the pannel, Sharing & Permissions says "You have no access" (which is normal) and this is followed by a table where users and permissions are listed. It seems user1 has Read and Write access in contradiction with the preceding phrase...
    Anyway, I tried to modify these authorizations for user2 by clicking on the lock of the Information pannel and entering name and password of the administrator. Didn't go farther than that. By mistake, I hit Command-Delete and user2 was GONE from the list AND NOT ONLY from the list in the Information window! Using Fast User Switching and going to user2, nothing left on the Desktop and NO Home anymore.
    In the System Preferences/Accounts panel, user2 was still mentionned.
    In the Users folder, no user2 folder anymore.
    Using once again Fast User Switching, I logged as user2 and got by magic an all new Home. Nothing left in Documents, Library or other user1 folders. Standard settings for icons, dock, etc.
    My first move has been to use a very recent backup to restore everything (Thank you Mike Bombich from Copy Cloner!).
    Once everything was back to normal, I had a look at the Trash from user1 and guess what, the Home folder of user2 was there, complete.
    So now I am left with two questions
    why is it I do not have the same dialogs when connecting from all the accounts although as far as I can see, configurations are the same?
    why is it possible, from an Information pannel to delete the account of another user?
    Thank you all for comments!

    For the file sharing problems, answer is found in
    http://docs.info.apple.com/article.html?artnum=306723

  • Select Problem For 'Back Menus' - Zen V P

    Just got the Zen V Plus and tried to set the time/date. Followed the 'guide' and after the time/date screen pressed the 'back button'. Got the Set Alarm/Date/Time (etc) menu but when I selected an option (moved joystick down to desired option then pressed the joystick) the time/date display came up and I was NOT ABLE to set the date. Same thing occurred trying to set the date (tried it several times and it worked once .... then attempted again - several times (4) but it only worked once). Turns out I have the same problem with any option in ANY 'back' menu. Suggestion?
    Do I have a defecti've unit (can't be the 'operator' who is defecti've! haha)? Should I return it and try another?
    Actually not that interested in playing music .... it's more for playing .wma(DRM) book files.

    Latest ... updated my firmware (to ZENVPlus_PCFW_P4S_L2___0.exe) and it fixed the select problem for SET DATE/TIME etc however
    the SELECT procedure doesn't always work for 'back button' menus. Example: tried to set a bookmark... following procedure in 'guide', pressed 'back button' and held it, from 'NOW PLAYING' screen - works 2 out of 5 times. Most of the time, pressing and holding takes you back to the previous menu - not to the 'back' (or in this case the SET BOOKMARK) menu. Sounds like something for the next version of firmware ... the code doesn't always set an internal timer correctly (am a programmer of 30 years ... part of that time pgmmng firmware).

  • PDF 'File Save' problem in Firefox

    Using Firefox browser, when I select a PDF file that opens in a new window [rather than a new tab], save it and close the window, the AcroRD32.exe process is not stopped.  If I then open another PDF file in a similar manner, it can not be saved.  Each time you close a PDF window, you have to go to Task Manager and stop the AcroRD32 process before being abl;e to save a subsequent document.  This does not happen with IE.
    Using Reader 10.1.1 and Firefox 8 on a Windows Vista32 system.

    Same bug i see in Opera browser. PDFs doesn't saves without stopping AcroRd32 process. And save dialogue doesn't appears when clicking links (even if web browsing function deactivated in adobe reader settings)...
    Apart from this File Save problem, there is more strange things while browsing PDF online, like "blinks", hangs, image dissapear, suddenly lags without any reason, browser crashing and more...
    So, because adobe reader prevents to download PDFs, and because it works very buggy with online browsing, especially if website uses adobe flash to show PDFs, the only right solution i found is uninstalling adobe reader. After that File Save problem was gone!

Maybe you are looking for

  • Current date in the query

    Hi Experts, I want to display current date in the query in one of the time characterstic which i am including in the data target but i don't want to load anything in the data target but still i want to display the current date in the query only. how

  • Portal Session Problem

    Hello all! I am trying to log-on to my portal with two different users parallel. Example: 1. Open Internet Explorer -> Portal -> Logon as Administrator 2. Open Internet Explorer once again (NOT String-N) -> Portal -> Logon as another user The problem

  • DTW Crash 9.0 PL 12

    Hello Experts I am trying to create 1400 AP invoices with DTW. When i create more than 97 rows the DTW crash. If i separate them i am able to create them. This starte to happen when we upgraded to 9.0 PL 12. The error we are getting in the log is 01/

  • Connecting two computers with xover cable

    I have the Sun Java System Application Server PE8 installed on a computer under Windows XP Professional, and another computer to connected to it with a crossover cable. The client can ping the host, but when the client tries to connect to the app ser

  • Cant find place to transfer pictures on iphone

    when i open itunes with iphone there is not any tab for pictures. with device ( iphone) on taps accross top read Summary, info, applications, ringtones, music, movies, tv shows, podcasts, itunesU but no photos when i attach my itouch i get a tab with