Group changes when file is created in the GUI

Hello All,
Here is a outline of my situation. On a 10.5 or 10.6 client machine if I go to System Prefs, Accounts and click on the "+" and change to "group" and add a new group called "video" and set the GID to 264, it will create the new group.
Then I create a new user, right click on the user and go to Advanced Options, change the UID to the number below, and change the GID to 264.
Now if I launch the terminal and create a new file from the terminal, and then ls -la that file all is well(see below). Then I go back to the desktop and open Text Edit, create a new file and save it, the new file belongs to the wheel group. ???
I found some info that said to get the umask to work proper I needed to create a file in /etc called launchd-user.conf and add the entry "umask 0007" to it. I did that, and now the permissions seem to work proper, just not the group.
Am I missing a step here somewhere along the way? Any help or ideas would be great!
Thanks
John
On command line (Terminal):
Last login: Wed Oct 27 15:58:47 on ttys000
3032973:~ jnichol2$ cd Desktop
3032973:Desktop jnichol2$
3032973:Desktop jnichol2$ id -a
uid=986638623(jnichol2) gid=264(video) groups=264(video),102(com.apple.sharepoint.group.2),9001(testgroup),101(com.app le.sharepoint.group.1),20(staff)
3032973:Desktop jnichol2$ touch . foo
3032973:Desktop jnichol2$ ls -ld foo
-rw-rw---- 1 jnichol2 video 0 Oct 27 16:01 foo
Everything looks good here, but....
Launch GUI tool, e.g. Textedit; save file “bar”
3032973:Desktop jnichol2$ ls -la bar.rtf
-rw-rw----@ 1 jnichol2 wheel 318 Oct 27 16:01 bar.rtf
Notice, the permissions and group are not what we expect. I hope this helps understand the problem. Let me know if you need more info.

Two things are going on here.
When a new file or folder is created, the group specified is inherited from its parent folder. So if some folder "foo" has the group "video" specified, then all new files created in that folder will also get group "video". It seems like you know this already.
The problem you are having with TextEdit is that manner in which it saves new files. TextEdit creates a temporary directory first, saves the file there, and then moves the file to its proper destination folder as a final step. This is why it isn't getting the "video" group setting applied to it - it gets the "wheel" group from the temporary folder that it's really being created in. Some other Apple apps behave this way too - Safari when saving a web page to disk, for example.
I have filed a bug report to Apple about this a long time ago. The report I filed was listed as a "duplicate". I don't know when, if ever, this will be fixed.

Similar Messages

  • When bad file is created then the process stops

    hi all,
    through interface while we transfer data to a table , if the bad file is created, then the process stops .we want to execute further with all the correct data records excluding records which are in bad file, is it possible ? if yes then how. Because out of 10,000 records if one record is errorneous why the process will stop.
    I checked LKM and found the jython script where it checks the return code <> 0 can I do something there to meet our requirements.
    regards,
    Palash

    Hi,
    You can do this by implementing error checking in the tool, so that only the bad records will be moved into E$ table and remaining records will insert into the target tables. I hope this will meet your requirements.
    Thanks,
    Saravanan Rajavel

  • The new updated version of iMovie 10 won't let me open my previous files I created before the update today. I have a wedding that I'm trying to finish and deliver and now I can't because that file version won't open. I keep getting an error message

    Hello,
    Please help me figure this out. I'm very unhappy at the moment. I'm fustrated and don't have any idea how to revert to the original version before the update was done on iMovie 10. I NEVER hated APPLE until NOW!! I love APPLE products and apps so please help me stay in that mindset. So I worked on some movie projects when I got my macbook pro 6 months ago. I update reguarly. I saw the update prompt and honestly, I did not think I would have ANY issuess with opening my previous files that I created only a few months ago with this updated version.The new updated version of iMovie 10 won't let me open my previous files I created before the update today. I have a wedding that I'm trying to finish and deliver and now I can't because that file version won't open. I keep getting an error message and the iMovie app closes. Last night I saw the file and tried to open it but no luck. Error message came up again. I reboot and turned off my laptop for the evening and tried again just now but nothing!! I need that video. My job depends on it! I worked so hard on this wedding video and now it's lost and won't open. I work another job and don't have much time. I really don't want to start all over again. Please help me. Thanks so much for your assistance.
    Fustrated APPLE customer
    Jolly A. Rupp

    I also have Jolly's problem. I found the iMovie 9.0.9 folder and tried to launch the older version of iMove. It would not launch. I removed all of the iMovie preferences from the Preferences folder, removed iMove 10 from the applications folder, and restarted my Mac. iMove 9.0.9 still won't launch and I can't access my videos created with the older version of iMovie. Is there a way to uninstall iMovie 10 and reinstall iMovie 9.0.9?
    I am running Yosemitie on a  iMac.
    Paul

  • Retrieve the date a file was created in the background

    EDITED CONTENT----
    Apologies all...I just realized there is a specific forum for this type of question.  I will post it there.
    Thanks Marilyn for point this out>>>>should have read it first as suggested. 
    /message/2572763#2572763 [original link is broken]
    Hi guru's,
    I have a custom application that does some windows directory cleaning based an older than 'X' days setting.  I have to do some calculation to determine if the file being processed is older than that number of day and delete it if it is.  To determine the file created date I use the method DIRECTORY_LIST_FILES from CL_GUI_FRONTEND_SERVICES.  This works great in the foreground but dumps in the background because the handle object reference is not created in the class constructor and subsequently does a call to a "NULL" object.
    My question:
    Does anyone know of a way to get the date a file was created while running in the background?  If not, please read on --- I have another question regarding an alternate approach I am trying.
    I have tried the following approach FM EPS_GET_DIRECTORY_LISTING to return an internal table with all files in a directory.  Works fine in the background, but the created date is not in the return values.  Soooooo I looped at the internal table and called this system function:
            CALL 'C_FILE_ATTRIBUTES'
                ID 'NAME'     FIELD tempfile
                ID 'TYPE'     FIELD singleFile-
                ID 'LEN'      FIELD file-len
                ID 'OWNER'    FIELD file-owner
                ID 'MTIME'    FIELD file-mtime
                ID 'MODE'     FIELD file-mode
                ID 'ERRNO'    FIELD file-errno
                ID 'ERRMSG'   FIELD file-errmsg.
    This returns the MTime, which is the Modified time (in Epoch time format: number of seconds since Midnight 1 January 1970), but no created time.  Does anyone know the ID for the created time?  I tried CTIME but no value is returned. 
    Along with this question: any idea if a FM or Method exists to convert Epoch time to a standard time.  I could do the calculation myself....but it seems someone would have already done this.  No point in re-creating the wheel.
    Thanks so much,
    Quack
    Message was edited by:
            Ryan Quackenboss

    I will be happy to.
    Please post something to this thread. 
    Retrieve the date a file was created in the background
    I UNMARKED this question as a post and reposted in the data transfer forum.
    That post is still open.  Once you post there, I will mark it ANSWERED and award points.
    Thanks for the help
    Quack

  • How to find when index was created in the database.

    Hi,
    Please help me, how to find when index was created in the database. It should give with date and time.
    Thanks... Bakser

    Please help me, how to find when index was created in the database. It should give with date and time.DBA_/ALL/User_objects Created
    Name                                      Null?    Type
    OWNER                                              VARCHAR2(30)
    OBJECT_NAME                                        VARCHAR2(128)
    SUBOBJECT_NAME                                     VARCHAR2(30)
    OBJECT_ID                                          NUMBER
    DATA_OBJECT_ID                                     NUMBER
    OBJECT_TYPE                                        VARCHAR2(19)
    CREATED                                           DATE
    LAST_DDL_TIME                                      DATE
    TIMESTAMP                                          VARCHAR2(19)
    STATUS                                             VARCHAR2(7)
    TEMPORARY                                          VARCHAR2(1)
    GENERATED                                          VARCHAR2(1)
    SECONDARY                                          VARCHAR2(1)
    select OBJECT_NAME,TIMESTAMP,CREATED  from ALL_OBJECTS where OWNER='OWNERNAME' AND OBJECT_NAME='OBJECT_NAME' AND OBJECT_TYPE='INDEX';Edited by: Anantha on Apr 21, 2009 3:18 PM
    Edited by: Anantha on Apr 21, 2009 3:19 PM

  • File Created time changes when file renamed to previously used name

    Any ideas on this one would be very gratefully received:
    I am trying to rename a file then create a new one with the original name, as part of a solution to roll over log files after x days. 
    I found that the new file had the 'created time' of the original file, which messed up the logic badly. I tried to unpick this by creating the new file with a new name, then renaming it. The new file got the correct created time initially,
    but as soon as I renamed it to the original name, the created time reverted to the created time of the earlier file.
    I even tried simply deleting the old file altogether, but every attempt to get a new file with the original name resulted in the created time being that of the old file.
    I have used different filesystemobject instantiations for the old and new files, and I even tried creating the new file in a different run of the script, and in a different cmd session. The only thing that worked was logging out and in again before
    creating the new file!
    Since the created time attribute is not writeable, I'm struggling to get round this.
    Here is a stripped out version that demonstrates it. I have put 5 second waits in, so you can watch the created time get reset in front of your eyes when the new file gets renamed to the old name (might need to add a column for 'created time' to Windows
    Explorer)
    (OS is 2008 server R2 Enterprise)
    $logdir = ".\"
    $logfname = "roll.log"
    $RollAtDays = 0 # for testing - so it always creates a new file
    If ( -not ( test-path $logdir) ){ $newdir = New-Item $logdir -type directory } 
    $logfile = $logdir+$logfname
    $newlog = $logdir+$logfname+".new"
    $fso = New-Object -comobject Scripting.FileSystemObject
    $date = Get-Date
    # if file exists, test whether it requires rolling over
    If ( test-path $logfile ){
     $fo = $fso.GetFile( $logfile ) 
     $dc = $fo.DateCreated
     $RollDate = $dc.AddDays( $RollAtDays )
     # write-host "$dc $RollDate"
     If( $RollDate.CompareTo( $date ) -lt 0 ){
      write-host "Roll"
      $newPath = "$logdir$date-$logfname"
      $newPath = $newPath.Replace("/", "")
      $newPath = $newPath.Replace(" ", "-")
      $newPath = $newPath.Replace(":", "")
      $fo.Move( $newPath )
      #$fo.Delete( ) #tried both renaming and deleting the original file
      start-sleep -s 5
    # some code to create a file if one doesn't exist
    If ( -not ( test-path $logfile) ){
     $header = "Date"
     $fso1 = New-Object -comobject Scripting.FileSystemObject
     $ts1 = $fso1.CreateTextFile( $newlog, $True )
     $ts1.close()
     start-sleep -s 5
     $fo1 = $fso1.GetFile( $newlog ) 
     $fo1.Move( $logfile )  # this is where the created date gets changed back
     #add-content $logfile $header
    # some code to add a line to the log
    [string]$logline = "$date"
    #add-content $logfile $logline

    I have to disagree with the assessment that creation time is not writable:
    Get-Item test1.txt | select creationtime
    (Get-Item test1.txt).CreationTime = '07/03/2014'
    Get-Item test1.txt | select creationtime
    CreationTime
    3/20/2014 1:15:43 PM
    7/3/2014 12:00:00 AM
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • No Planning file entry created  for the Rervation

    Hi PM Gurus,
    When we create a maintenance order, for the component the Reservation is created. The components is externally procured with the some planned delivery dates. but during the MRP run these Planned Orders are not converted to PReqs automatically. checking the planning file entry there in no planning file entry created therefore MRP has not considered it.
    Now we are using MD15 to collectively convert the Planned Orders to PReqs.
    The Item category of these spare parts are "L". Please suggest if what configurations are to be checked, maintained in order for MRP generate the PReqs from the Planned Orders.
    Thanks,
    Nag

    Hi,
    MRP does not convert planned orders into purchase requisitions. MRP creates one of the procurement proposals, planned orders or purchase requisitions, according to the parameters you run it. Check out the parameters of your MRP run, you need to select create purchase requisitions and delete old procurement proposals to fulfill your requirement.
    Regards.

  • Cant get list of files from a folder (even though the folder and files are created with the same app)

    Ok so each character rolled with my app gets saved as an html file in a folder i create on the sdcard called RpgApp
    the code to do this is 
    private async Task saveToHtmlCharacter(string name)
    StorageFolder externalDevices = Windows.Storage.KnownFolders.RemovableDevices;
    StorageFolder sdcard = (await externalDevices.GetFoldersAsync()).FirstOrDefault(); //Windows.Storage.ApplicationData.Current.LocalFolder;
    var dataFolder = await sdcard.CreateFolderAsync("RpgApp",
    CreationCollisionOption.OpenIfExists);
    var file = await dataFolder.CreateFileAsync(name+".html",
    CreationCollisionOption.ReplaceExisting);
    using (StreamWriter writer = new StreamWriter(await file.OpenStreamForWriteAsync()))
    writer.WriteLine("<html><head><title>Character File for " + z.charNameFirst + " " + z.charNameSecond + "</title></head><body>");
    //trimed for the post
    now this as i say works perfectly and i can confirm that the files show up in the "RpgApp"folder
    now the next step is to have the app read the names of each of those html files and create a seperate button for each one named for the filename and with the filename as content (later i will link them up to load the html file they are named for in a webbrowser
    panal)
    here is the code that *should* do that
    private async Task readFiles()
    z.test.Clear();
    StorageFolder externalDevices = Windows.Storage.KnownFolders.RemovableDevices;
    StorageFolder folder = (await externalDevices.GetFolderAsync("RpgApp"));
    IReadOnlyList<StorageFile> fileList = await folder.GetFilesAsync();
    //z.test.Add("dummy");
    foreach (StorageFile file in fileList)
    z.test.Add(file.Name);
    public async void buttonTest()
    await readFiles();
    CoreDispatcher dispatcher = CoreWindow.GetForCurrentThread().Dispatcher;
    await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
    foreach (string name in z.test)
    Button button1 = new Button();
    button1.Height = 75;
    button1.Content = name;
    button1.Name = name;
    testStackPanal.Children.Add(button1);
    now i say should as what i get is an error of "A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.ni.dll" (2 of them in fact one after another)
    more detailed error is at http://pastebin.com/3hBaZLQ9
    now i went through checking line after line to find the error and line that causes it is:
    StorageFolder folder = (await externalDevices.GetFolderAsync("RpgApp"));
    in the readFiles method
    i checked to make sure the case is right etc and its spot on, that IS the folder name, and remember my app creates that folder and creates the files that are inside that folder (and only files my app creates are in that folder) so it should have access
    im 100% stuck its taken me all day to get the files to save and now i cant get them to list correctly
    I have tested the button creation function with fake list data and that worked fine, as i say the error is when i tell it to look at the folder it created
    all help most greatfully recieved

    this was actually solved for me on another forum thread 
    async Task<bool> continueToReadAllFiles(StorageFolder folder)
    if (folder == null)
    return false;
    if (folder.Name.Equals("RpgApp", StringComparison.CurrentCultureIgnoreCase))
    var files = await folder.GetFilesAsync();
    foreach (var file in files)
    test.Add(file.Name);
    return false;
    var folders = await folder.GetFoldersAsync();
    foreach (var child in folders)
    if (!await continueToReadAllFiles(child))
    return false;
    return true;
    public async void buttonTest()
    test.Clear();
    StorageFolder externalDevices = Windows.Storage.KnownFolders.RemovableDevices;
    var folders = await externalDevices.GetFoldersAsync();
    foreach (var folder in folders)
    if (!await continueToReadAllFiles(folder))
    break;
    //.... commented out
    ...now i say solved this is more a workaround...but it works.
    I would love to know why we cant just scan the RpgApp folder instead of having to scan the whole dc card and disregard all thats not in the RpgApp folder

  • Page size changes when file is exported or saved to pdf

    I have an illustrator file that is 8.625 x 11.125, purposely made a bit larger than a standard letter sized paper for the bleed effect I am trying to achieve. When I save the file as a pdf or export it asa jpg or tiff itgets shrunk to letter size and the the edge I created with the extra .125 inches is now 'cut' to letter size not just shrunk. How do I save the file so it stays 8.625 x 11.125 inches.

    Milan,
    Make sure the paper/Crop Area size is the right one, and preferably state version. My guess is CS, or maybe CS3.

  • .dmp file is created in the C: and SAP closes autmatically

    Dear all,
                              When i am opening a report like Inventory Posting list and untick the daily subtotal daily,monthly and yearly.SAP gets hanged with a msg showing .dmp file is created and closes automatically.It happens both in the Server and the client.
    Regards,
    Shyamsundar.A

    hi shyamsundar
    Go to C drive-->Programfiles>SAP--
    >Sap Business one
    in this you find one log folder  in this log folder
    remove files whichever with files .dmp
    for example:
    SAP Business One_20110910093750.dmp
    and similarly delete files from  %temp%,recent,prefetch,cookies and recycle bin and restart ur system .
    Now u will not get any dmp error .
    please do close the thread if ur prob is solved
    Regards
    Jenny

  • JFileChooser's approve button text changes when file

    I have a JFileChooser used for loading some XML file(s). We want the approve button's text to be "Load". When I bring up the dialog, the button text initially reads "Load", when I select a directory, it reads "Open", if I select a file again, it goes back to "Load". So far, so good.
    The problem comes when using it in a non-English language. When I bring up the dialog, the button text initially reads the appropriately translated "Load". However, when I select a directory, it changes to the English "Open". I do not see a method to use to adjust this text. Am I missing something, or is this a bug?
    Any help is greatly appreciated.
    Jamie

    Here's some code I'll put into the public domain:
    package com.graphbuilder.desktop;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.Stack;
    import java.util.Vector;
    import java.util.StringTokenizer;
    import java.io.File;
    <p>Attempt to improve the behaviour of the JFileChooser.  Anyone who has used the
    the JFileChooser will probably remember that it lacks several useful features.
    The following features have been added:
    <ul>
    <li>Double click to choose a file</li>
    <li>Enter key to choose a file after typing the filename</li>
    <li>Enter key to change to a different directory after typing the filename</li>
    <li>Automatic rescanning of directories</li>
    <li>A getSelectedFiles method that returns the correct selected files</li>
    <li>Escape key cancels the dialog</li>
    <li>Access to common GUI components, such as the OK and Cancel buttons</li>
    <li>Removal of the useless Update and Help buttons in Motif L&F</li>
    </ul>
    <p>There are a lot more features that could be added to make the JFileChooser more
    user friendly.  For example, a drop-down combo-box as the user is typing the name of
    the file, a list of currently visited directories, user specified file filtering, etc.
    <p>The look and feels supported are Metal, Window and Motif.  Each look and feel
    puts the OK and Cancel buttons in different locations and unfortunately the JFileChooser
    doesn't provide direct access to them.  Thus, for each look-and-feel the buttons must
    be found.
    <p>The following are known issues:  Rescanning doesn't work when in Motif L&F.  Some
    L&Fs have components that don't become available until the user clicks a button.  For
    example, the Metal L&F has a JTable but only when viewing in details mode.  The double
    click to choose a file does not work in details mode.  There are probably more unknown
    issues, but the changes made so far should make the JFileChooser easier to use.
    public class FileChooserFixer implements ActionListener, KeyListener, MouseListener, Runnable {
         Had to make new buttons because when the original buttons are clicked
         they revert back to the original label text.  I.e. some programmer decided
         it would be a good idea to set the button text during an actionPerformed
         method.
         private JFileChooser fileChooser = null;
         private JButton okButton = new JButton("OK");
         private JButton cancelButton = new JButton("Cancel");
         private JList fileList = null;
         private JTextField filenameTextField = null;
         private ActionListener actionListener = null;
         private long rescanTime = 20000;
         public FileChooserFixer(JFileChooser fc, ActionListener a) {
              fileChooser = fc;
              actionListener = a;
              fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
              okButton.setMnemonic('O');
              cancelButton.setMnemonic('C');
              JButton oldOKButton = null;
              JButton oldCancelButton = null;
              JTextField[] textField = getTextFields(fc);
              JButton[] button = getButtons(fc);
              JList[] list = getLists(fc);
              String laf = javax.swing.UIManager.getLookAndFeel().getClass().getName();
              if (laf.equals("javax.swing.plaf.metal.MetalLookAndFeel")) {
                   oldOKButton = button[0];
                   oldCancelButton = button[1];
                   filenameTextField = textField[0];
                   fileList = list[0];
              else if (laf.equals("com.sun.java.swing.plaf.windows.WindowsLookAndFeel")) {
                   oldOKButton = button[0];
                   oldCancelButton = button[1];
                   filenameTextField = textField[0];
                   fileList = list[0];
              else if (laf.equals("com.sun.java.swing.plaf.motif.MotifLookAndFeel")) {
                   oldOKButton = button[0];
                   oldCancelButton = button[2];
                   button[1].setVisible(false); // hides the do-nothing 'Update' button
                   button[3].setVisible(false); // hides the disabled 'Help' button
                   filenameTextField = textField[1];
                   fileList = list[0];
              fix(oldOKButton, okButton);
              fix(oldCancelButton, cancelButton);
              okButton.addActionListener(this);
              cancelButton.addActionListener(this);
              fileList.addMouseListener(this);
              addKeyListeners(fileChooser);
              new Thread(this).start(); // note: rescanning in Motif feel doesn't work
         public void run() {
              try {
                   while (true) {
                        Thread.sleep(rescanTime);
                        Window w = SwingUtilities.windowForComponent(fileChooser);
                        if (w != null && w.isVisible())
                             fileChooser.rescanCurrentDirectory();
              } catch (Throwable err) {}
         public long getRescanTime() {
              return rescanTime;
         public void setRescanTime(long t) {
              if (t < 200)
                   throw new IllegalArgumentException("Rescan time >= 200 required.");
              rescanTime = t;
         private void addKeyListeners(Container c) {
              for (int i = 0; i < c.getComponentCount(); i++) {
                   Component d = c.getComponent(i);
                   if (d instanceof Container)
                        addKeyListeners((Container) d);
                   d.addKeyListener(this);
         private static void fix(JButton oldButton, JButton newButton) {
              int index = getIndex(oldButton);
              Container c = oldButton.getParent();
              c.remove(index);
              c.add(newButton, index);
              newButton.setPreferredSize(oldButton.getPreferredSize());
              newButton.setMinimumSize(oldButton.getMinimumSize());
              newButton.setMaximumSize(oldButton.getMaximumSize());
         private static int getIndex(Component c) {
              Container p = c.getParent();
              for (int i = 0; i < p.getComponentCount(); i++) {
                   if (p.getComponent(i) == c)
                        return i;
              return -1;
         public JButton getOKButton() {
              return okButton;
         public JButton getCancelButton() {
              return cancelButton;
         public JList getFileList() {
              return fileList;
         public JTextField getFilenameTextField() {
              return     filenameTextField;
         public JFileChooser getFileChooser() {
              return fileChooser;
         protected JButton[] getButtons(JFileChooser fc) {
              Vector v = new Vector();
              Stack s = new Stack();
              s.push(fc);
              while (!s.isEmpty()) {
                   Component c = (Component) s.pop();
                   if (c instanceof Container) {
                        Container d = (Container) c;
                        for (int i = 0; i < d.getComponentCount(); i++) {
                             if (d.getComponent(i) instanceof JButton)
                                  v.add(d.getComponent(i));
                             else
                                  s.push(d.getComponent(i));
              JButton[] arr = new JButton[v.size()];
              for (int i = 0; i < arr.length; i++)
                   arr[i] = (JButton) v.get(i);
              return arr;
         protected JTextField[] getTextFields(JFileChooser fc) {
              Vector v = new Vector();
              Stack s = new Stack();
              s.push(fc);
              while (!s.isEmpty()) {
                   Component c = (Component) s.pop();
                   if (c instanceof Container) {
                        Container d = (Container) c;
                        for (int i = 0; i < d.getComponentCount(); i++) {
                             if (d.getComponent(i) instanceof JTextField)
                                  v.add(d.getComponent(i));
                             else
                                  s.push(d.getComponent(i));
              JTextField[] arr = new JTextField[v.size()];
              for (int i = 0; i < arr.length; i++)
                   arr[i] = (JTextField) v.get(i);
              return arr;
         protected JList[] getLists(JFileChooser fc) {
              Vector v = new Vector();
              Stack s = new Stack();
              s.push(fc);
              while (!s.isEmpty()) {
                   Component c = (Component) s.pop();
                   if (c instanceof Container) {
                        Container d = (Container) c;
                        for (int i = 0; i < d.getComponentCount(); i++) {
                             if (d.getComponent(i) instanceof JList)
                                  v.add(d.getComponent(i));
                             else
                                  s.push(d.getComponent(i));
              JList[] arr = new JList[v.size()];
              for (int i = 0; i < arr.length; i++)
                   arr[i] = (JList) v.get(i);
              return arr;
         public File[] getSelectedFiles() {
              File[] f = fileChooser.getSelectedFiles();
              if (f.length == 0) {
                   File file = fileChooser.getSelectedFile();
                   if (file != null)
                        f = new File[] { file };
              return f;
         public void mousePressed(MouseEvent evt) {
              Object src = evt.getSource();
              if (src == fileList) {
                   if (evt.getModifiers() != InputEvent.BUTTON1_MASK) return;
                   int index = fileList.locationToIndex(evt.getPoint());
                   if (index < 0) return;
                   fileList.setSelectedIndex(index);
                   File[] arr = getSelectedFiles();
                   if (evt.getClickCount() == 2 && arr.length == 1 && arr[0].isFile())
                        actionPerformed(new ActionEvent(okButton, 0, okButton.getActionCommand()));
         public void mouseReleased(MouseEvent evt) {}
         public void mouseClicked(MouseEvent evt) {}
         public void mouseEntered(MouseEvent evt) {}
         public void mouseExited(MouseEvent evt) {}
         public void keyPressed(KeyEvent evt) {
              Object src = evt.getSource();
              int code = evt.getKeyCode();
              if (code == KeyEvent.VK_ESCAPE)
                   actionPerformed(new ActionEvent(cancelButton, 0, cancelButton.getActionCommand()));
              if (src == filenameTextField) {
                   if (code != KeyEvent.VK_ENTER) return;
                   fileList.getSelectionModel().clearSelection();
                   actionPerformed(new ActionEvent(okButton, 0, "enter"));
         public void keyReleased(KeyEvent evt) {}
         public void keyTyped(KeyEvent evt) {}
         public void actionPerformed(ActionEvent evt) {
              Object src = evt.getSource();
              if (src == cancelButton) {
                   if (actionListener != null)
                        actionListener.actionPerformed(evt);
              else if (src == okButton) {
                   File[] selectedFiles = getSelectedFiles();
                   Object obj = fileList.getSelectedValue(); // is null when no file is selected in the JList
                   String text = filenameTextField.getText().trim();
                   if (text.length() > 0 && (obj == null || selectedFiles.length == 0)) {
                        File d = fileChooser.getCurrentDirectory();
                        Vector vec = new Vector();
                        StringTokenizer st = new StringTokenizer(text, "\"");
                        while (st.hasMoreTokens()) {
                             String s = st.nextToken().trim();
                             if (s.length() == 0) continue;
                             File a = new File(s);
                             if (a.isAbsolute())
                                  vec.add(a);
                             else
                                  vec.add(new File(d, s));
                        File[] arr = new File[vec.size()];
                        for (int i = 0; i < arr.length; i++)
                             arr[i] = (File) vec.get(i);
                        selectedFiles = arr;
                   if (selectedFiles.length == 0) {
                        Toolkit.getDefaultToolkit().beep();
                        return;
                   if (selectedFiles.length == 1) {
                        File f = selectedFiles[0];
                        if (f.exists() && f.isDirectory() && text.length() > 0 && evt.getActionCommand().equals("enter")) {
                             fileChooser.setCurrentDirectory(f);
                             filenameTextField.setText("");
                             filenameTextField.requestFocus();
                             return;
                   boolean filesOnly = (fileChooser.getFileSelectionMode() == JFileChooser.FILES_ONLY);
                   boolean dirsOnly = (fileChooser.getFileSelectionMode() == JFileChooser.DIRECTORIES_ONLY);
                   if (filesOnly || dirsOnly) {
                        for (int i = 0; i < selectedFiles.length; i++) {
                             File f = selectedFiles;
                             if (filesOnly && f.isDirectory() || dirsOnly && f.isFile()) {
                                  Toolkit.getDefaultToolkit().beep();
                                  return;
                   fileChooser.setSelectedFiles(selectedFiles);
                   if (actionListener != null)
                        actionListener.actionPerformed(evt);

  • Why does the PDFs' name change when i view them in the iBooks app?

    i have some past papers and marking schemes in my iTunes library....when i sync them to my iPad, they appear just fine....they are there just the way i named them and all...
    but when i open them, the name changes to some coded-ish name with lots of numbers and all that....
    is it possible for me to change some setting and save the name i want for those PDFs? Or am I going to have to live with this madness?
    please help!

    Hello, I wanted to follow up on this issue after reviewing some of the changes with the current update. [https://bugzilla.mozilla.org/show_bug.cgi?id=1049521] This bug addressed some Windows HKEYs that are changed when Firefox is updated/or installed.
    As an update, a patch has been made and changes are on the way for fresh installs of Firefox :-)

  • File Name when file is opned in the browser

    Hi All,
    I am trying to open a file a pdf in the browser.The file is opening fine.
    But when i try to save the file, insted of the name i specifed in the response header, its displaying the download as the filename. Download is the name of the jsp file in which the pdf file will open
    Can I force the browser to save a downloaded file with a name I specify, rather than the name of the URL.
    Please help in solving this.
    Thanks in Advance,
    Madhu

    The only workaround I can think for this then is to specify the name of the file as part of the url for it.
    Similar to an approach documented here
    Basically, you make your url look like: http://myApplication/pdfDownload/myDocument.pdf
    You configure your web.xml file to map all /pdfDownload/* requests to your handling servlet/jsp for downloading pdfs.
    Then Acrobat reader can just pick up the filename from the url.
    Yes its a workaround for jumping through hoops, but it seems that Acrobat reader ignores the content-disposition header, and also (from that linked post) doesn't like parameters with the request string either.
    hope this helps,
    evnafets

  • BEx Analyzer (7.x): currency change when new formula created

    Hi All,
    I have a strange one.  Query is executed in BEx analyzer.  A new formula is created outside the query results window using excel functionality, and the currency changes from USD to DM. 
    Example query results: 
    Cell A1: Var 1 = $150.00
    Cell B1: Var 2 = $160.00
    Cell C1: Var 3 = $70.00
    New formula created using excel functionality:  =sum(A1+B1) displays as 310.00 DM
    The language settings have been checked for the operating system and for SAP (user data) and they appear to be correct.  Is there another setting to be checked?
    Thanks,
    Pam

    sap said it was working as designed.  suggested we look at regional settings on laptop and make a workbook template with us settings.

  • How do I change PDF files to JPEG on the Mac?

    how do i change pdf files to jpeg? thanx

    Open the pdf with preview then go to File/Save As then select jpeg as the file option.

Maybe you are looking for

  • No Messages in Inbox - Backup

    Odd problem. I got my (2nd - 1st one died) Time Capsule about a month and a half ago. Shoulda checked before I guess but tonight I needed to retrieve a Mail email from earlier today. There were 14 message all from Feb. 27, 2010 and no other inbox mes

  • How do I get my signature at the bottom of a letter in Mail?

    I have my signature in the signatures box in Mail as a .jpg. How do I get it to the bottom of any letter that I write? Many thanks forr your help.

  • WebDAV support in WLS 7.0

    Is WebDAV supported in Weblogic Server 7.0?

  • RMAN backup restoration

    Hi, We have full database backup and increamenal level 1 backup. then we have sucessfcully restored level 0 backup. After taht we are tring to recover database using recover database command... getting below error.. RMAN-00571: ======================

  • Can't deactivate PSE8

    Hi, I'm trying to deactivate PSE8 on my Windows 7 computer (x64). I use Help > Deactivate, and click on "Deactivate", but every time it says that I'm not connected to the internet, while I am! Does anyone now a fix for this or another way to deactiva