On 08.09.2010 11:23, Philippe Marschall wrote: > On 08.09.2010 09:11, John M McIntosh wrote: >> Ok, I was going to spend a few of my precious evenings going thru and >> rebuilding all/some of the plugins for the Cocoa V5.x series of VMs. >> Maybe even update them for the Cog Stack and JIT VM. >> >> However to do this I need some help from the community to test the creatures >> after they are done. >> This evening I rebuild the Locale plugin and checked it into SVN to close >> this Pharo issue: >> >> http://code.google.com/p/pharo/issues/detail?id=2660 >> >> Now the problem is the Smalltalk code "Locale" for talking to this plugin >> sucks, it doesn't actually call most of the primitives and there aren't >> any tests. Obviously if no-cares about using the plugin then I can't be >> bothered to poke at it. >> >> However I did write some Objective-C code and jiggle it with a stick. >> >> Therefore someone should write some tests, fix the Locale Class, etc and >> tell me if the plugin is sane. >> >> You'll find the plugin in the Experimental Folder sub folder "5.x Plugins" >> >> http://homepage.mac.com/johnmci/.Public/experimental/5.x%20Plugins/LocalePlugin.bundle.zip >> >> Just unzip and drop it into the *.app/Contents/Resources/ folder >> >> Now this might work with Squeak 4.x VMs, I've not tried it. >> It might work with 64bit VMs (5.7x), I've not tried it. >> It might work on PowerPC, I've not tried it. >> It should work on the 5.8x series but I've not tried it out of canadian >> english, metric, PST, daylight savings time, georgian calendar settings >> so I have no idea if it works oh say in France where you use Euros versus $ >> signs? > > Seems to work at first glance. I'll see what I can do about the Locale > class and tests.
Ok, see the code attached to the bug. A couple of notes: - If a primitive fails, you now get a #primitiveFailed which gives you the most generic error but anyways you know something went wrong instead of giving you some random data (eg. the country was hardcoded to 'FR'). - #primCountry and #primLanguage seem to answer a three element String with the last element being a zero character (I assume a C string), this is not so nice. I'm not sure whether this should be fixed in the primitive or in the Pharo code. - All the primitives seem to totally ignore the locale id and only work on the system locale. This makes it a whole lot less useful. - I'm totally confused by the Current and CurrentPlatform class variables. What's the difference? Do we really need both? - I'm confused by #isoCountry vs #primCountry and #isoLangauge vs #primLanguage. Do we need both? What's the point? Is this what you meant which cleanup? Cheers Philippe _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project