[squeak-dev] Changing the update map name
David T. Lewis
lewis at mail.msen.com
Fri Aug 28 01:10:35 UTC 2015
Eliot,
You're right, there is a bug in the update map name preference handling.
I'll see if I can fix it (but maybe not tonight).
Background:
The default updater is not a singleton, it is one of possibly many
updaters. So changing the 'Update URL' or 'Update map name' preference
does not modify a single updater, instead it should answer the appropriate
updater for the given URL and update map name.
In an up to date 5.0 trunk image, if I open a PreferenceBrowser and
change the 'Update URL' preference, then MCMcmUpdater default answers
the corresponding updater. However, the 'Update map name' in the preferences
browser is not letting me enter a new name and that is a bug. As you note,
there is a conflict between the methods for instance creation and the
accidentally duplicate method names for preferences.
Dave
On Thu, Aug 27, 2015 at 03:41:53PM -0700, Eliot Miranda wrote:
> Hi David, Hi All,
>
> I see a couple of issues with the update map name I can't solve. First,
> the change made in May to use a default McMcmUpdater instance means that
> the update map name is cached in the instance and I don't see how changing
> it in the Preferences browser would either flush the default instance or
> update the default instance's updateMapName. Second, changing the update
> map name in the Preferences browser has no effect. This seems to be
> because there's a conflict between the instance creation message for an
> McMcmUpdater:
>
> McMcmUpdater class>>updateMapName: baseName
> "Answer a new instance with a base update name baseName such as
> 'update' or 'update.oscog' "
>
> ^ self new updateMapName: baseName
>
> and that this is used as the default setter for the preference:
>
> McMcmUpdater class>>updateMapName
> "Name for update map, without version info"
>
> <preference: 'Update map name'
> category: 'updates'
> description: 'Base name for the update maps'
> type: #String>
>
> ^UpdateMapName ifNil: ['update']
>
> So I guess that we could rename the instance creation message to be
> forUpdateMapName: or simply nuke it. i.e. this
>
> McMcmUpdater class>>default
> "The default instance for system updates. Uses a default update map
> name that may be set as a preference to enable a specific update stream
> for a repository."
>
> ^ self updaters
> at: self defaultUpdateURL
> ifAbsentPut: [self updateMapName: self updateMapName]
>
> would become
>
> McMcmUpdater class>>default
> "The default instance for system updates. Uses a default update map
> name that may be set as a preference to enable a specific update stream
> for a repository."
>
> ^ self updaters
> at: self defaultUpdateURL
> ifAbsentPut: [self forUpdateMapName: self updateMapName]
>
> or
>
> McMcmUpdater class>>default
> "The default instance for system updates. Uses a default update map
> name that may be set as a preference to enable a specific update stream
> for a repository."
>
> ^ self updaters
> at: self defaultUpdateURL
> ifAbsentPut: [self new updateMapName: self updateMapName]
>
> and updateMapName: would become
>
> McMcmUpdater class>> updateMapName: aString
>
> UpdateMapName := aString
>
>
> _,,,^..^,,,_
> best, Eliot
>
More information about the Squeak-dev
mailing list
|