On Sunday, February 2, 2003, at 01:15 AM, Dan Mills wrote:

I did create an empty NSDictionary object from perl, but either it doesn't support those methods, or my complete ignorance about objc prevents me from using it. None of the following work:
...snip...

What you want is this:

my $dict = NSDictionary->alloc->init;
$dict->writeToFile_Atomically("/tmp/foo", 1);

I've updated the "Collections" page on the site to illustrate these methods. For some reason that page was MIA when I looked; I wrote it months ago, and I would have sworn that I uploaded it. At any rate, it and the MVC page are both there now.

I did find "CBPerlHash" and "CBPerlArray" classes in the class browser, and they have comments saying you can get an objc object for perl a named perl hash/array, but I can't get them to work from the perl side of things.
Those classes are not yet implemented.

They're intended to provide access to a Perl hash/array, using the NSDictionary/NSArray interface. They're mainly there for ObjC programmers, but if you wanted to use Cocoa methods to work with a Perl hash or array from Perl, I suppose that would work too.

sherm--

C programmers never die - they're just cast into void.



Reply via email to