Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • File open (Score:2, Informative)

    by garth (867) on 2007.05.30 3:55 (#55319) Journal
    Not sure why this works, but if you do:

            my $panel = NSOpenPanel->openPanel();
            $panel->setCanChooseDirectories(1);
            $panel->setCanChooseFiles(0);
            my $fileTypes = undef;

            my $ret = $panel->runModalForTypes($fileTypes);

    it doesn't seem to crash. Not sure if it is correct though, because then it isn't letting me select any file types.

    I have had a few issues trying to pass nil to methods and I am never sure if undef is the right way.