开发者

Adding stuff to run on startup of Pharo Image

开发者 https://www.devze.com 2023-01-16 08:52 出处:网络
I\'d like to add stuff to run at the beginning of a pharo image start-up. Nothing fancy just a call to a class method that is an entry point to my application.

I'd like to add stuff to run at the beginning of a pharo image start-up. Nothing fancy just a call to a class method that is an entry point to my application. I can't find any guides to making smalltalk scripts at startup. Alternatively are there any method which you can add stuff开发者_开发知识库 to be done at image startup?


Squeak has a built-in mechanism that will notify selected classes that an image has just been launched. This page explains how to do this. It should also work in Pharo.


In Pharo 1.4 there is the StartupLoader class that will file in startup.st from the same directory as the image or all files from ~/.config/pharo/#{version} or ~/.config/pharo/general.

Currently the class comments and examples do not agree on which files StartupLoader should do so this could change, this works properly in Pharo 2.0

For a fuller description see this blog

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号