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

use Perl Log In

Log In

[ Create a new account ]

Matts (1087)

Matts
  (email not shown publicly)

I work for MessageLabs [messagelabs.com] in Toronto, ON, Canada. I write spam filters, MTA software, high performance network software, string matching algorithms, and other cool stuff mostly in Perl and C.

Journal of Matts (1087)

Tuesday May 29, 2007
08:04 PM

Camelbones help

[ #33370 ]

Any camelbones hackers read here?

I need a directory open dialog in my camelbones app. It should be as easy as:

    my $panel = NSOpenPanel->openPanel();
    NSLog("Panel: $panel\n");
    $panel->setCanChooseDirectories(1);
    $panel->setCanChooseFiles(0);
    my $ret = $panel->runModalForTypes(undef);

But this segfaults. As does runModalForDirectories_file_types().

Any ideas?

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)

    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