On Sunday, February 2, 2003, at 12:24 AM, Rich Morin wrote:
I did :-)At 10:46 PM -0500 2/1/03, Dan Mills wrote:And, how do I use them with CB?Dunno; try it (:-).
The problem is twofold: I can't get the method to work, and I don't know how to get an NSDictionary object for any given perl hash.
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:
$obj = new NSDictionary;
$obj->writeToFileAtomically ("/tmp/foo");
$obj->writeToFileatomically ("/tmp/foo");
$obj->writeToFile:atomically ("/tmp/foo"); # syntax error, even
$obj->writeToFile ("/tmp/foo", "atomically");
$obj->writeToFile ("/tmp/foo", 1);
As for the second problem (getting an NSDictionary for a perl hash), perhaps this is another one of those things that will be in The Next Version of CB.
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. Presumably CB uses them internally (read: in the objc side of things) to represent perl variables.
Cheers,
-Dan