Hi, I already asked this question a while ago, and Iâd love to know if something has changed: Is there any way to specify an order or priority of StartupAction? In my case, for example, I really need that one of my scripts gets executed last. Can I do that? I could imagine something like StartupPreferencesLoader default executeAtomicItems: { StartupAction name: âMy first startup actionâ code: [ âSome code here" ] order: 1 runOnce: true } StartupPreferencesLoader default executeAtomicItems: { StartupAction name: âMy second startup actionâ code: [ âSome code here that gets executed after the code in My first startup actionâ ] order: 2 runOnce: true } On top of my knowledge, after checking 'Deep into Pharo' and âPharo for the Enterpriseâ, it seems that this is not possible. Am I the only one needing this? I can also try to sketch a solution! Cheers, Roby
On 09 Feb 2015, at 12:06, Roberto Minelli <roberto.minelli@usi.ch> wrote:
Hi,
I already asked this question a while ago, and Iâd love to know if something has changed: Is there any way to specify an order or priority of StartupAction?
In my case, for example, I really need that one of my scripts gets executed last. Can I do that?
âLastâ in terms of all possible actions or only w.r.t. your own scripts?
I could imagine something like
StartupPreferencesLoader default executeAtomicItems: { StartupAction name: âMy first startup actionâ code: [ âSome code here" ] order: 1 runOnce: true }
StartupPreferencesLoader default executeAtomicItems: { StartupAction name: âMy second startup actionâ code: [ âSome code here that gets executed after the code in My first startup actionâ ] order: 2 runOnce: true }
On top of my knowledge, after checking 'Deep into Pharo' and âPharo for the Enterpriseâ, it seems that this is not possible.
Am I the only one needing this? I can also try to sketch a solution!
Cheers, Roby
Can't you as a workaround use only one startup action that performs both actions sequentially? StartupPreferencesLoader default executeAtomicItems: { StartupAction name: âMy second startup actionâ code: [ "the code of the *first* startup action" "the code of the *second* startup action" ] runOnce: true } El Mon Feb 09 2015 at 12:07:04 PM, Roberto Minelli <roberto.minelli@usi.ch> escribió:
Hi,
I already asked this question a while ago, and Iâd love to know if something has changed: Is there any way to specify an order or priority of StartupAction?
In my case, for example, I really need that one of my scripts gets executed last. Can I do that?
I could imagine something like
StartupPreferencesLoader default executeAtomicItems: { StartupAction name: âMy first startup actionâ code: [ âSome code here" ] * order: 1* runOnce: true }
StartupPreferencesLoader default executeAtomicItems: { StartupAction name: âMy second startup actionâ code: [ âSome code here that gets executed after the code in My first startup actionâ ] * order: 2* runOnce: true }
On top of my knowledge, after checking 'Deep into Pharo' and âPharo for the Enterpriseâ, it seems that this is not possible.
Am I the only one needing this? I can also try to sketch a solution!
Cheers, Roby
Nope. Imagine (and this is my case) that I distribute a startup script to my users and I want, on them machine, that my script runs last. How can you achieve that? However, I believe that we need a mechanism for that and not workarounds ;) R
On 09 Feb 2015, at 12:16, Guillermo Polito <guillermopolito@gmail.com> wrote:
Can't you as a workaround use only one startup action that performs both actions sequentially?
StartupPreferencesLoader default executeAtomicItems: { StartupAction name: âMy second startup actionâ code: [ "the code of the first startup action"
"the code of the second startup action" ] runOnce: true }
El Mon Feb 09 2015 at 12:07:04 PM, Roberto Minelli <roberto.minelli@usi.ch> escribió:
Hi,
I already asked this question a while ago, and Iâd love to know if something has changed: Is there any way to specify an order or priority of StartupAction?
In my case, for example, I really need that one of my scripts gets executed last. Can I do that?
I could imagine something like
StartupPreferencesLoader default executeAtomicItems: { StartupAction name: âMy first startup actionâ code: [ âSome code here" ] order: 1 runOnce: true }
StartupPreferencesLoader default executeAtomicItems: { StartupAction name: âMy second startup actionâ code: [ âSome code here that gets executed after the code in My first startup actionâ ] order: 2 runOnce: true }
On top of my knowledge, after checking 'Deep into Pharo' and âPharo for the Enterpriseâ, it seems that this is not possible.
Am I the only one needing this? I can also try to sketch a solution!
Cheers, Roby
And what if you have several first actions? On 9 February 2015 at 12:44, Roberto Minelli <roberto.minelli@usi.ch> wrote:
Nope. Imagine (and this is my case) that I distribute a startup script to my users and I want, on them machine, that my script runs last. How can you achieve that?
However, I believe that we need a mechanism for that and not workarounds ;)
R
On 09 Feb 2015, at 12:16, Guillermo Polito <guillermopolito@gmail.com> wrote:
Can't you as a workaround use only one startup action that performs both actions sequentially?
StartupPreferencesLoader default executeAtomicItems: { StartupAction name: âMy second startup actionâ code: [ "the code of the *first* startup action"
"the code of the *second* startup action" ] runOnce: true }
El Mon Feb 09 2015 at 12:07:04 PM, Roberto Minelli <roberto.minelli@usi.ch> escribió:
Hi,
I already asked this question a while ago, and Iâd love to know if something has changed: Is there any way to specify an order or priority of StartupAction?
In my case, for example, I really need that one of my scripts gets executed last. Can I do that?
I could imagine something like
StartupPreferencesLoader default executeAtomicItems: { StartupAction name: âMy first startup actionâ code: [ âSome code here" ] * order: 1* runOnce: true }
StartupPreferencesLoader default executeAtomicItems: { StartupAction name: âMy second startup actionâ code: [ âSome code here that gets executed after the code in My first startup actionâ ] * order: 2* runOnce: true }
On top of my knowledge, after checking 'Deep into Pharo' and âPharo for the Enterpriseâ, it seems that this is not possible.
Am I the only one needing this? I can also try to sketch a solution!
Cheers, Roby
-- Damien Pollet type less, do more [ | ] http://people.untyped.org/damien.pollet
Well, then itâs either (1) your problem or (2) there is some âdefaultâ order. Think about the menus: If you specify two items in a menu builder with the same #order: the menu gets generated with some sort of default policy. However, I believe we should have such option, then if users use it in the wrong way, itâs their problem. Cheers, R
On 09 Feb 2015, at 13:36, Damien Pollet <damien.pollet@gmail.com> wrote:
And what if you have several first actions?
On 9 February 2015 at 12:44, Roberto Minelli <roberto.minelli@usi.ch> wrote: Nope. Imagine (and this is my case) that I distribute a startup script to my users and I want, on them machine, that my script runs last. How can you achieve that?
However, I believe that we need a mechanism for that and not workarounds ;)
R
On 09 Feb 2015, at 12:16, Guillermo Polito <guillermopolito@gmail.com> wrote:
Can't you as a workaround use only one startup action that performs both actions sequentially?
StartupPreferencesLoader default executeAtomicItems: { StartupAction name: âMy second startup actionâ code: [ "the code of the first startup action"
"the code of the second startup action" ] runOnce: true }
El Mon Feb 09 2015 at 12:07:04 PM, Roberto Minelli <roberto.minelli@usi.ch> escribió: Hi,
I already asked this question a while ago, and Iâd love to know if something has changed: Is there any way to specify an order or priority of StartupAction?
In my case, for example, I really need that one of my scripts gets executed last. Can I do that?
I could imagine something like
StartupPreferencesLoader default executeAtomicItems: { StartupAction name: âMy first startup actionâ code: [ âSome code here" ] order: 1 runOnce: true }
StartupPreferencesLoader default executeAtomicItems: { StartupAction name: âMy second startup actionâ code: [ âSome code here that gets executed after the code in My first startup actionâ ] order: 2 runOnce: true }
On top of my knowledge, after checking 'Deep into Pharo' and âPharo for the Enterpriseâ, it seems that this is not possible.
Am I the only one needing this? I can also try to sketch a solution!
Cheers, Roby
-- Damien Pollet type less, do more [ | ] http://people.untyped.org/damien.pollet
Roberto Minelli-3 wrote
Is there any way to specify an order or priority of StartupAction?
The startup action framework is an awesome tool to set up one's images automagically. And... working with script files sucks! I use a minimal script to load a Metacello project with my actual startup logic. It never changes, so instead of hand-editing scripts, I do all that work in the image with the full power of the environment. This is the whole script: StartupLoader default executeAtomicItems: { StartupAction name: 'Load DeNigrisPreferences' code: [ Gofer it url: 'http://smalltalkhub.com/mc/SeanDeNigris/DeNigrisPreferences/main'; package: 'DeNigrisPreferences-Core'; load. ] runOnce: true. }. The code is public. While it's fairly specific to my workflow, it may serve as inspiration. The trickiest part was that the code couldn't depend on Metacello (I don't remember why. This may have been when not all platforms had Metacello pre-installed. Actually, I think I'll try using Metacello now!). HTH. ----- Cheers, Sean -- View this message in context: http://forum.world.st/Order-priority-of-StartupAction-tp4804596p4804645.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Hi Sean, On the one side, I see (and agreed) what you said. But suppose you want to provide users with a script that loads your package and you want for them minimal effort, i.e., copy the script file in the correct folder on their PC. Then you cannot really use your approach. However, thanks for sharing your automagic way of initializing your image ;) Cheers, R
On 09 Feb 2015, at 15:50, Sean P. DeNigris <sean@clipperadams.com> wrote:
Roberto Minelli-3 wrote
Is there any way to specify an order or priority of StartupAction?
The startup action framework is an awesome tool to set up one's images automagically. And... working with script files sucks!
I use a minimal script to load a Metacello project with my actual startup logic. It never changes, so instead of hand-editing scripts, I do all that work in the image with the full power of the environment. This is the whole script:
StartupLoader default executeAtomicItems: { StartupAction name: 'Load DeNigrisPreferences' code: [ Gofer it url: 'http://smalltalkhub.com/mc/SeanDeNigris/DeNigrisPreferences/main'; package: 'DeNigrisPreferences-Core'; load. ] runOnce: true. }.
The code is public. While it's fairly specific to my workflow, it may serve as inspiration. The trickiest part was that the code couldn't depend on Metacello (I don't remember why. This may have been when not all platforms had Metacello pre-installed. Actually, I think I'll try using Metacello now!).
HTH.
----- Cheers, Sean -- View this message in context: http://forum.world.st/Order-priority-of-StartupAction-tp4804596p4804645.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
On 09 Feb 2015, at 16:37, Roberto Minelli <roberto.minelli@usi.ch> wrote:
Hi Sean,
On the one side, I see (and agreed) what you said. But suppose you want to provide users with a script that loads your package and you want for them minimal effort, i.e., copy the script file in the correct folder on their PC. Then you cannot really use your approach.
Robert, What is wrong with a simple configuration that users can load with one-click using the configuration browser ? It can't get much simpler than that, IMHO, and you can do everything you want (post load actions, ..). Sven
However, thanks for sharing your automagic way of initializing your image ;)
Cheers, R
On 09 Feb 2015, at 15:50, Sean P. DeNigris <sean@clipperadams.com> wrote:
Roberto Minelli-3 wrote
Is there any way to specify an order or priority of StartupAction?
The startup action framework is an awesome tool to set up one's images automagically. And... working with script files sucks!
I use a minimal script to load a Metacello project with my actual startup logic. It never changes, so instead of hand-editing scripts, I do all that work in the image with the full power of the environment. This is the whole script:
StartupLoader default executeAtomicItems: { StartupAction name: 'Load DeNigrisPreferences' code: [ Gofer it url: 'http://smalltalkhub.com/mc/SeanDeNigris/DeNigrisPreferences/main'; package: 'DeNigrisPreferences-Core'; load. ] runOnce: true. }.
The code is public. While it's fairly specific to my workflow, it may serve as inspiration. The trickiest part was that the code couldn't depend on Metacello (I don't remember why. This may have been when not all platforms had Metacello pre-installed. Actually, I think I'll try using Metacello now!).
HTH.
----- Cheers, Sean -- View this message in context: http://forum.world.st/Order-priority-of-StartupAction-tp4804596p4804645.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Indeed I have a configuration, that is the only thing that my startup script does in fact. However I know that people prefer automatic stuffs (i.e., put the script once in the folder and forget about it). Concerning the configuration browser, I have no idea how to put my configuration in it. Roby
On 09 Feb 2015, at 16:41, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 09 Feb 2015, at 16:37, Roberto Minelli <roberto.minelli@usi.ch> wrote:
Hi Sean,
On the one side, I see (and agreed) what you said. But suppose you want to provide users with a script that loads your package and you want for them minimal effort, i.e., copy the script file in the correct folder on their PC. Then you cannot really use your approach.
Robert,
What is wrong with a simple configuration that users can load with one-click using the configuration browser ? It can't get much simpler than that, IMHO, and you can do everything you want (post load actions, ..).
Sven
However, thanks for sharing your automagic way of initializing your image ;)
Cheers, R
On 09 Feb 2015, at 15:50, Sean P. DeNigris <sean@clipperadams.com> wrote:
Roberto Minelli-3 wrote
Is there any way to specify an order or priority of StartupAction?
The startup action framework is an awesome tool to set up one's images automagically. And... working with script files sucks!
I use a minimal script to load a Metacello project with my actual startup logic. It never changes, so instead of hand-editing scripts, I do all that work in the image with the full power of the environment. This is the whole script:
StartupLoader default executeAtomicItems: { StartupAction name: 'Load DeNigrisPreferences' code: [ Gofer it url: 'http://smalltalkhub.com/mc/SeanDeNigris/DeNigrisPreferences/main'; package: 'DeNigrisPreferences-Core'; load. ] runOnce: true. }.
The code is public. While it's fairly specific to my workflow, it may serve as inspiration. The trickiest part was that the code couldn't depend on Metacello (I don't remember why. This may have been when not all platforms had Metacello pre-installed. Actually, I think I'll try using Metacello now!).
HTH.
----- Cheers, Sean -- View this message in context: http://forum.world.st/Order-priority-of-StartupAction-tp4804596p4804645.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
On 09 Feb 2015, at 16:46, Roberto Minelli <roberto.minelli@usi.ch> wrote:
Indeed I have a configuration, that is the only thing that my startup script does in fact.
However I know that people prefer automatic stuffs (i.e., put the script once in the folder and forget about it). Concerning the configuration browser, I have no idea how to put my configuration in it.
If you are part of 'Team Pharo' on StHub, you can copy your configuration to a designated repository, per Pharo version, like http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo40/main/ That's it, really - the responsibility is all yours of course ;-)
Roby
On 09 Feb 2015, at 16:41, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 09 Feb 2015, at 16:37, Roberto Minelli <roberto.minelli@usi.ch> wrote:
Hi Sean,
On the one side, I see (and agreed) what you said. But suppose you want to provide users with a script that loads your package and you want for them minimal effort, i.e., copy the script file in the correct folder on their PC. Then you cannot really use your approach.
Robert,
What is wrong with a simple configuration that users can load with one-click using the configuration browser ? It can't get much simpler than that, IMHO, and you can do everything you want (post load actions, ..).
Sven
However, thanks for sharing your automagic way of initializing your image ;)
Cheers, R
On 09 Feb 2015, at 15:50, Sean P. DeNigris <sean@clipperadams.com> wrote:
Roberto Minelli-3 wrote
Is there any way to specify an order or priority of StartupAction?
The startup action framework is an awesome tool to set up one's images automagically. And... working with script files sucks!
I use a minimal script to load a Metacello project with my actual startup logic. It never changes, so instead of hand-editing scripts, I do all that work in the image with the full power of the environment. This is the whole script:
StartupLoader default executeAtomicItems: { StartupAction name: 'Load DeNigrisPreferences' code: [ Gofer it url: 'http://smalltalkhub.com/mc/SeanDeNigris/DeNigrisPreferences/main'; package: 'DeNigrisPreferences-Core'; load. ] runOnce: true. }.
The code is public. While it's fairly specific to my workflow, it may serve as inspiration. The trickiest part was that the code couldn't depend on Metacello (I don't remember why. This may have been when not all platforms had Metacello pre-installed. Actually, I think I'll try using Metacello now!).
HTH.
----- Cheers, Sean -- View this message in context: http://forum.world.st/Order-priority-of-StartupAction-tp4804596p4804645.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Thanks Sven! P.s. any way to specify, for example, which group to load? In my configuration, for example, I was using this method to load loadAsUser <apiDocumentation> ^(self project version: #bleedingEdge) load: #('User').
On 09 Feb 2015, at 16:53, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 09 Feb 2015, at 16:46, Roberto Minelli <roberto.minelli@usi.ch> wrote:
Indeed I have a configuration, that is the only thing that my startup script does in fact.
However I know that people prefer automatic stuffs (i.e., put the script once in the folder and forget about it). Concerning the configuration browser, I have no idea how to put my configuration in it.
If you are part of 'Team Pharo' on StHub, you can copy your configuration to a designated repository, per Pharo version, like http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo40/main/
That's it, really - the responsibility is all yours of course ;-)
Roby
On 09 Feb 2015, at 16:41, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 09 Feb 2015, at 16:37, Roberto Minelli <roberto.minelli@usi.ch> wrote:
Hi Sean,
On the one side, I see (and agreed) what you said. But suppose you want to provide users with a script that loads your package and you want for them minimal effort, i.e., copy the script file in the correct folder on their PC. Then you cannot really use your approach.
Robert,
What is wrong with a simple configuration that users can load with one-click using the configuration browser ? It can't get much simpler than that, IMHO, and you can do everything you want (post load actions, ..).
Sven
However, thanks for sharing your automagic way of initializing your image ;)
Cheers, R
On 09 Feb 2015, at 15:50, Sean P. DeNigris <sean@clipperadams.com> wrote:
Roberto Minelli-3 wrote
Is there any way to specify an order or priority of StartupAction?
The startup action framework is an awesome tool to set up one's images automagically. And... working with script files sucks!
I use a minimal script to load a Metacello project with my actual startup logic. It never changes, so instead of hand-editing scripts, I do all that work in the image with the full power of the environment. This is the whole script:
StartupLoader default executeAtomicItems: { StartupAction name: 'Load DeNigrisPreferences' code: [ Gofer it url: 'http://smalltalkhub.com/mc/SeanDeNigris/DeNigrisPreferences/main'; package: 'DeNigrisPreferences-Core'; load. ] runOnce: true. }.
The code is public. While it's fairly specific to my workflow, it may serve as inspiration. The trickiest part was that the code couldn't depend on Metacello (I don't remember why. This may have been when not all platforms had Metacello pre-installed. Actually, I think I'll try using Metacello now!).
HTH.
----- Cheers, Sean -- View this message in context: http://forum.world.st/Order-priority-of-StartupAction-tp4804596p4804645.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
No, it only works for the default group and stable version.
On 09 Feb 2015, at 17:09, Roberto Minelli <roberto.minelli@usi.ch> wrote:
Thanks Sven! P.s. any way to specify, for example, which group to load? In my configuration, for example, I was using this method to load
loadAsUser <apiDocumentation> ^(self project version: #bleedingEdge) load: #('User').
On 09 Feb 2015, at 16:53, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 09 Feb 2015, at 16:46, Roberto Minelli <roberto.minelli@usi.ch> wrote:
Indeed I have a configuration, that is the only thing that my startup script does in fact.
However I know that people prefer automatic stuffs (i.e., put the script once in the folder and forget about it). Concerning the configuration browser, I have no idea how to put my configuration in it.
If you are part of 'Team Pharo' on StHub, you can copy your configuration to a designated repository, per Pharo version, like http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo40/main/
That's it, really - the responsibility is all yours of course ;-)
Roby
On 09 Feb 2015, at 16:41, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 09 Feb 2015, at 16:37, Roberto Minelli <roberto.minelli@usi.ch> wrote:
Hi Sean,
On the one side, I see (and agreed) what you said. But suppose you want to provide users with a script that loads your package and you want for them minimal effort, i.e., copy the script file in the correct folder on their PC. Then you cannot really use your approach.
Robert,
What is wrong with a simple configuration that users can load with one-click using the configuration browser ? It can't get much simpler than that, IMHO, and you can do everything you want (post load actions, ..).
Sven
However, thanks for sharing your automagic way of initializing your image ;)
Cheers, R
On 09 Feb 2015, at 15:50, Sean P. DeNigris <sean@clipperadams.com> wrote:
Roberto Minelli-3 wrote
Is there any way to specify an order or priority of StartupAction?
The startup action framework is an awesome tool to set up one's images automagically. And... working with script files sucks!
I use a minimal script to load a Metacello project with my actual startup logic. It never changes, so instead of hand-editing scripts, I do all that work in the image with the full power of the environment. This is the whole script:
StartupLoader default executeAtomicItems: { StartupAction name: 'Load DeNigrisPreferences' code: [ Gofer it url: 'http://smalltalkhub.com/mc/SeanDeNigris/DeNigrisPreferences/main'; package: 'DeNigrisPreferences-Core'; load. ] runOnce: true. }.
The code is public. While it's fairly specific to my workflow, it may serve as inspiration. The trickiest part was that the code couldn't depend on Metacello (I don't remember why. This may have been when not all platforms had Metacello pre-installed. Actually, I think I'll try using Metacello now!).
HTH.
----- Cheers, Sean -- View this message in context: http://forum.world.st/Order-priority-of-StartupAction-tp4804596p4804645.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Ok, thanks. I can probably live with that ;) Last question on configurations: Is there a way to specify different #postLoadDoIt:: depending on which group gets loaded? I know you can specify per-package #postLoadDoIt: Thanks a lot for your time! Roby
On 09 Feb 2015, at 17:21, Sven Van Caekenberghe <sven@stfx.eu> wrote:
No, it only works for the default group and stable version.
On 09 Feb 2015, at 17:09, Roberto Minelli <roberto.minelli@usi.ch> wrote:
Thanks Sven! P.s. any way to specify, for example, which group to load? In my configuration, for example, I was using this method to load
loadAsUser <apiDocumentation> ^(self project version: #bleedingEdge) load: #('User').
On 09 Feb 2015, at 16:53, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 09 Feb 2015, at 16:46, Roberto Minelli <roberto.minelli@usi.ch> wrote:
Indeed I have a configuration, that is the only thing that my startup script does in fact.
However I know that people prefer automatic stuffs (i.e., put the script once in the folder and forget about it). Concerning the configuration browser, I have no idea how to put my configuration in it.
If you are part of 'Team Pharo' on StHub, you can copy your configuration to a designated repository, per Pharo version, like http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo40/main/
That's it, really - the responsibility is all yours of course ;-)
Roby
On 09 Feb 2015, at 16:41, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 09 Feb 2015, at 16:37, Roberto Minelli <roberto.minelli@usi.ch> wrote:
Hi Sean,
On the one side, I see (and agreed) what you said. But suppose you want to provide users with a script that loads your package and you want for them minimal effort, i.e., copy the script file in the correct folder on their PC. Then you cannot really use your approach.
Robert,
What is wrong with a simple configuration that users can load with one-click using the configuration browser ? It can't get much simpler than that, IMHO, and you can do everything you want (post load actions, ..).
Sven
However, thanks for sharing your automagic way of initializing your image ;)
Cheers, R
On 09 Feb 2015, at 15:50, Sean P. DeNigris <sean@clipperadams.com> wrote:
Roberto Minelli-3 wrote
Is there any way to specify an order or priority of StartupAction?
The startup action framework is an awesome tool to set up one's images automagically. And... working with script files sucks!
I use a minimal script to load a Metacello project with my actual startup logic. It never changes, so instead of hand-editing scripts, I do all that work in the image with the full power of the environment. This is the whole script:
StartupLoader default executeAtomicItems: { StartupAction name: 'Load DeNigrisPreferences' code: [ Gofer it url: 'http://smalltalkhub.com/mc/SeanDeNigris/DeNigrisPreferences/main'; package: 'DeNigrisPreferences-Core'; load. ] runOnce: true. }.
The code is public. While it's fairly specific to my workflow, it may serve as inspiration. The trickiest part was that the code couldn't depend on Metacello (I don't remember why. This may have been when not all platforms had Metacello pre-installed. Actually, I think I'll try using Metacello now!).
HTH.
----- Cheers, Sean -- View this message in context: http://forum.world.st/Order-priority-of-StartupAction-tp4804596p4804645.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
On 09 Feb 2015, at 17:29, Roberto Minelli <roberto.minelli@usi.ch> wrote:
Ok, thanks. I can probably live with that ;)
Last question on configurations: Is there a way to specify different #postLoadDoIt:: depending on which group gets loaded? I know you can specify per-package #postLoadDoIt:
That is beyond me, sorry. But you could dispatch yourself if you wanted to.
Thanks a lot for your time!
Roby
On 09 Feb 2015, at 17:21, Sven Van Caekenberghe <sven@stfx.eu> wrote:
No, it only works for the default group and stable version.
On 09 Feb 2015, at 17:09, Roberto Minelli <roberto.minelli@usi.ch> wrote:
Thanks Sven! P.s. any way to specify, for example, which group to load? In my configuration, for example, I was using this method to load
loadAsUser <apiDocumentation> ^(self project version: #bleedingEdge) load: #('User').
On 09 Feb 2015, at 16:53, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 09 Feb 2015, at 16:46, Roberto Minelli <roberto.minelli@usi.ch> wrote:
Indeed I have a configuration, that is the only thing that my startup script does in fact.
However I know that people prefer automatic stuffs (i.e., put the script once in the folder and forget about it). Concerning the configuration browser, I have no idea how to put my configuration in it.
If you are part of 'Team Pharo' on StHub, you can copy your configuration to a designated repository, per Pharo version, like http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo40/main/
That's it, really - the responsibility is all yours of course ;-)
Roby
On 09 Feb 2015, at 16:41, Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 09 Feb 2015, at 16:37, Roberto Minelli <roberto.minelli@usi.ch> wrote:
Hi Sean,
On the one side, I see (and agreed) what you said. But suppose you want to provide users with a script that loads your package and you want for them minimal effort, i.e., copy the script file in the correct folder on their PC. Then you cannot really use your approach.
Robert,
What is wrong with a simple configuration that users can load with one-click using the configuration browser ? It can't get much simpler than that, IMHO, and you can do everything you want (post load actions, ..).
Sven
However, thanks for sharing your automagic way of initializing your image ;)
Cheers, R
On 09 Feb 2015, at 15:50, Sean P. DeNigris <sean@clipperadams.com> wrote:
Roberto Minelli-3 wrote
Is there any way to specify an order or priority of StartupAction?
The startup action framework is an awesome tool to set up one's images automagically. And... working with script files sucks!
I use a minimal script to load a Metacello project with my actual startup logic. It never changes, so instead of hand-editing scripts, I do all that work in the image with the full power of the environment. This is the whole script:
StartupLoader default executeAtomicItems: { StartupAction name: 'Load DeNigrisPreferences' code: [ Gofer it url: 'http://smalltalkhub.com/mc/SeanDeNigris/DeNigrisPreferences/main'; package: 'DeNigrisPreferences-Core'; load. ] runOnce: true. }.
The code is public. While it's fairly specific to my workflow, it may serve as inspiration. The trickiest part was that the code couldn't depend on Metacello (I don't remember why. This may have been when not all platforms had Metacello pre-installed. Actually, I think I'll try using Metacello now!).
HTH.
----- Cheers, Sean -- View this message in context: http://forum.world.st/Order-priority-of-StartupAction-tp4804596p4804645.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
participants (6)
-
Damien Pollet -
Guillermo Polito -
Max Leske -
Roberto Minelli -
Sean P. DeNigris -
Sven Van Caekenberghe