How to Show a ProgressBar using NSFileManager copypath

Discussion in 'Mac Programming' started by imranpundeer, Jan 24, 2009.

  1. macrumors newbie

    Joined:
    Jan 10, 2009
    #1
    Hi Friends,
    I am new in Cocoa programming. I want to display a progress bar on my window while coping a file using NSFileManager.

    Actually in Windows there is a CopyProgressRoutine callabck function of CopyFile through which we can get the size that is being copied . So we can display a progress bar accordingly.

    So is there any way in MAC to do this?

    Any help would be appreciated.

    Regards,
    Imran.
     
  2. macrumors 601

    HiRez

    Joined:
    Jan 6, 2004
    Location:
    Western US
    #2
    Generally you have to make your own, but it's not difficult. In Interface Builder, just put an NSProgressBar and NSTextField (for your progress info) onto an NSWindow or NSPanel and show the window while it's running, hide it when done. Use an NSTimer to update the bar and info periodically. You can also put a progress bar in your main window or just about anywhere you want, it doesn't have to be in a separate dialog.
     

Share This Page