Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.840.mcz ==================== Summary ==================== Name: Morphic-mt.840 Author: mt Time: 7 April 2015, 4:07:11.316 pm UUID: 10096b48-db09-584e-a4d4-bb2000e87db2 Ancestors: Morphic-topa.839 Changed postscript to force world main docking bar update. Some other preferences might reset. =============== Diff against Morphic-topa.839 =============== Item was changed: (PackageInfo named: 'Morphic') postscript: '(Preferences dictionaryOfPreferences at: #alternativeWindowBoxesLook) defaultValue: false. "Force SystemProgressMorph to be reset" SystemProgressMorph initialize; reset. "Initialize the key bindings and menus" Editor initialize. "Retain scrollBar look now that the pref actually does something" Preferences enable: #gradientScrollBars. "apply the new icons" MenuIcons initializeIcons. TheWorldMainDockingBar updateInstances. + "Cleanup old-style preferences here. Remove before new release." Preferences removePreference: #gradientMenu. "Now in MenuMorph." Preferences removePreference: #roundedMenuCorners. "Now in MenuMorph." "Fix clipping bug of open windows. New ones are not affected." TransformMorph allInstances do: [:ea | ea clipSubmorphs: true].'! |
I guess there's a bit of misunderstanding about the scripts. They should
contain only the code that you want to run after loading versions defined by the current Monticello Configuration (.mcm file). So if you just want to update the docking bar, then remove everything else (e.g. you don't want to initialize and reset SystemProgressMorph). So it should be: TheWorldMainDockingBar updateInstances. Levente On Tue, 7 Apr 2015, [hidden email] wrote: > Marcel Taeumel uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-mt.840.mcz > > ==================== Summary ==================== > > Name: Morphic-mt.840 > Author: mt > Time: 7 April 2015, 4:07:11.316 pm > UUID: 10096b48-db09-584e-a4d4-bb2000e87db2 > Ancestors: Morphic-topa.839 > > Changed postscript to force world main docking bar update. > > Some other preferences might reset. > > =============== Diff against Morphic-topa.839 =============== > > Item was changed: > (PackageInfo named: 'Morphic') postscript: '(Preferences dictionaryOfPreferences at: #alternativeWindowBoxesLook) defaultValue: false. > "Force SystemProgressMorph to be reset" > SystemProgressMorph initialize; reset. > > "Initialize the key bindings and menus" > Editor initialize. > > "Retain scrollBar look now that the pref actually does something" > Preferences enable: #gradientScrollBars. > > "apply the new icons" > MenuIcons initializeIcons. > TheWorldMainDockingBar updateInstances. > > + > "Cleanup old-style preferences here. Remove before new release." > Preferences removePreference: #gradientMenu. "Now in MenuMorph." > Preferences removePreference: #roundedMenuCorners. "Now in MenuMorph." > > "Fix clipping bug of open windows. New ones are not affected." > TransformMorph allInstances do: [:ea | ea clipSubmorphs: true].'! > > > |
So for each change in, say, Morphic, I wipe its postload script and add my one stuff for the current changes? The update process max hence have multiple postload scripts to execute?
Best, Marcel |
No.
The postscript (and all other scripts) of a package is executed once (in most cases). Since the update process loads the Monticello Configurations (.mcm files) one by one, therefore you can only have one postscript per package per MC configuration. This means that there are a few different cases: (1) If you're the first to add a postscript to a package since the last .mcm, then you must delete its contents (if any) and add your code to it. (2) If you're not the first (the script exists with some code in it), then you have to check if the existing content can be run again. If yes, then append your code to the postscript. (3) In any other cases you have to create a new .mcm file first, then do what's in (1). It's also good to know that currently the postscript of a package is executed _before_ the new or modified class side #initialize methods of the package. We'll probably want to change this. Levente On Tue, 7 Apr 2015, Marcel Taeumel wrote: > So for each change in, say, Morphic, I wipe its postload script and add my > one stuff for the current changes? The update process max hence have > multiple postload scripts to execute? > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-840-mcz-tp4818042p4818060.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > |
On 07.04.2015, at 17:15, Levente Uzonyi <[hidden email]> wrote: > No. > > The postscript (and all other scripts) of a package is executed once (in most cases). > Since the update process loads the Monticello Configurations (.mcm files) one by one, therefore you can only have one postscript per package per MC configuration. > This means that there are a few different cases: > (1) If you're the first to add a postscript to a package since the last .mcm, then you must delete its contents (if any) and add your code to it. > (2) If you're not the first (the script exists with some code in it), then you have to check if the existing content can be run again. If yes, then append your code to the postscript. > (3) In any other cases you have to create a new .mcm file first, then do what's in (1). > O.O I bet I won't remember this … > It's also good to know that currently the postscript of a package is executed _before_ the new or modified class side #initialize methods of the package. We'll probably want to change this. > > Levente > > On Tue, 7 Apr 2015, Marcel Taeumel wrote: > >> So for each change in, say, Morphic, I wipe its postload script and add my >> one stuff for the current changes? The update process max hence have >> multiple postload scripts to execute? >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-840-mcz-tp4818042p4818060.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. |
It's easy to find out if you know how the update process works.
Levente On Tue, 7 Apr 2015, Tobias Pape wrote: > > On 07.04.2015, at 17:15, Levente Uzonyi <[hidden email]> wrote: > >> No. >> >> The postscript (and all other scripts) of a package is executed once (in most cases). >> Since the update process loads the Monticello Configurations (.mcm files) one by one, therefore you can only have one postscript per package per MC configuration. >> This means that there are a few different cases: >> (1) If you're the first to add a postscript to a package since the last .mcm, then you must delete its contents (if any) and add your code to it. >> (2) If you're not the first (the script exists with some code in it), then you have to check if the existing content can be run again. If yes, then append your code to the postscript. >> (3) In any other cases you have to create a new .mcm file first, then do what's in (1). >> > > O.O I bet I won't remember this … > >> It's also good to know that currently the postscript of a package is executed _before_ the new or modified class side #initialize methods of the package. We'll probably want to change this. >> >> Levente >> >> On Tue, 7 Apr 2015, Marcel Taeumel wrote: >> >>> So for each change in, say, Morphic, I wipe its postload script and add my >>> one stuff for the current changes? The update process max hence have >>> multiple postload scripts to execute? >>> >>> Best, >>> Marcel >>> >>> >>> >>> -- >>> View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-840-mcz-tp4818042p4818060.html >>> Sent from the Squeak - Dev mailing list archive at Nabble.com. > > > > |
In reply to this post by Tobias Pape
On 07.04.2015, at 17:20, Tobias Pape <[hidden email]> wrote:
> > > On 07.04.2015, at 17:15, Levente Uzonyi <[hidden email]> wrote: > >> No. >> >> The postscript (and all other scripts) of a package is executed once (in most cases). >> Since the update process loads the Monticello Configurations (.mcm files) one by one, therefore you can only have one postscript per package per MC configuration. >> This means that there are a few different cases: >> (1) If you're the first to add a postscript to a package since the last .mcm, then you must delete its contents (if any) and add your code to it. >> (2) If you're not the first (the script exists with some code in it), then you have to check if the existing content can be run again. If yes, then append your code to the postscript. >> (3) In any other cases you have to create a new .mcm file first, then do what's in (1). >> > > O.O I bet I won't remember this … I find it easier to write scripts in a way so they can be executed repeatedly without harm. You just append new stuff below, with a comment mentioning the package version you added it. You can also check if the previous snippets are older than the version in the latest config map. If so, you can safely remove them. At the top of the script there should probably a comment explaining this process. - Bert - smime.p7s (5K) Download Attachment |
Free forum by Nabble | Edit this page |