On 09.08.2010, at 17:02, Sean P. DeNigris wrote:
In working on ExternalWebBrowser, I got thinking about loading platform-specific (i.e. Mac/Windows) code.
ExternalWebBrowser does a check in a class>>initialization, and only installs a library that is required for operation on Macs, if the image is running on a Mac.
Which ExternalWebBrowser do you use? I've checked the newest source which is ExternalWebBrowser-mtf.11.1.mcz on squeaksource. The initialization of ExternalWebBrowser does a Smalltalk addToStartUpList: self. And the code to select the platform specific library is called in startUp. That means the platform should be chosen every time you start your image. Looks perfectly what you want, right? Can you elaborate on the situation where it does not work? Norbert
Something about this feels wrong. I want to be able to put my image and a VM on a USB key and bring it to a client, who may be running on Windows (gasp!), and run the image. It's easy enough to bring or download a VM, but ExternalWebBrowser is now locked in "Mac-mode." In a service with equivalent Windows/Unix-specific requirements, it might be difficult (or impossible) to get it to work.
It seems to me better to either: * install all such requirements right off the bat (for one thing - you probably have an internet connection to download them) * or, put a lazy initialization for it, so the first time the functionality is used, the packages are installed. I guess this would depend on there being a single access point to all the platform code.
What do you all think?
Thanks. Sean -- View this message in context: http://forum.world.st/Loading-platform-specific-code-tp2318610p2318610.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project