Pharo-users
By thread
pharo-users@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
April 2018
- 77 participants
- 565 messages
Re: [Pharo-users] How to #currentVersion from a Configuration
by Stephane Ducasse
In my pharo 6.1 image I have
currentVersion
| cacheKey cv |
cacheKey := self configuration class.
^ MetacelloPlatform current
stackCacheFor: #currentVersion
at: cacheKey
doing: [ :cache |
cv := self currentVersionAgainst: nil.
^ cache at: cacheKey put: cv ]
And we do not change the code that Dale release and he is making sure
that old code is working so this is strange.
Stef
On Mon, Apr 2, 2018 at 3:03 PM, Hilaire <hilaire(a)drgeo.eu> wrote:
> Hello,
>
> I use to do perform this code to get the installed version from a
> ConfigurationOfDrGeo:
>
> drgeoVersion
> ^ 'Installed version: ', ConfigurationOfDrGeo new project currentVersion
> versionNumber versionString
>
> It does not work anymore, and produce the following error stack
>
> Any idea?
>
> Hilaire
>
>
> MetacelloMCVersionSpec(Object)>>error:
> [ ^ self error: 'Name not found: ' , aString ] in
> MetacelloMCVersionSpec(MetacelloVersionSpec)>>resolveToLoadableSpec:forLoad:forMap:packages:
> in Block: [ ^ self error: 'Name not found: ' , aString ]
> [ (self importArray notNil or: [ self import notNil ])
> ifTrue:
> [ "expect the 'missing' name to be satisfied within context of
> imported project"
> importArray
> ifNotNil: [ importArray
> do: [ :assoc |
> ((assoc value includes: aString) and: [ map
> includesKey: assoc key ])
> ifTrue: [ importSpec := (map at: assoc key)
> mergeImportLoads: {aString};
> yourself ] ].
> importSpec ifNotNil: [ ^ importSpec ] ].
> (importSpec isNil and: [ self import notNil ])
> ifTrue: [ ^ (map at: self import ifAbsent: absentBlock)
> mergeImportLoads: {aString};
> yourself ] ].
> (aString = 'default' or: [ aString = 'ALL' ])
> ifTrue: [ self project groupSpec
> name: aString;
> includes: self packageNames;
> yourself ]
> ifFalse: [ absentBlock value ] ] in
> MetacelloMCVersionSpec(MetacelloVersionSpec)>>packageNamed:forLoad:forMap:ifAbsent:
> in Block: [ (self importArray notNil or: [ self import notNi...etc...
> Dictionary>>at:ifAbsent:
> MetacelloMCVersionSpec(MetacelloVersionSpec)>>packageNamed:forLoad:forMap:ifAbsent:
> MetacelloMCVersionSpec(MetacelloVersionSpec)>>resolveToLoadableSpec:forLoad:forMap:packages:
> [ :req |
> (self
> resolveToLoadableSpec: req
> forLoad: forLoad
> forMap: map
> packages: packageMap)
> do: [ :loadableSpec |
> newReqd addAll: loadableSpec requires.
> newReqd addAll: loadableSpec includes ] ] in
> MetacelloMCVersionSpec(MetacelloVersionSpec)>>resolveToLoadableSpecs:forLoad:map:
> in Block: [ :req | ...
> Set>>do:
> MetacelloMCVersionSpec(MetacelloVersionSpec)>>resolveToLoadableSpecs:forLoad:map:
> MetacelloMCVersionSpec(MetacelloVersionSpec)>>resolveToLoadableSpecs:
> [ :cache |
> names := (self resolveToLoadableSpecs: nameList)
> collect: [ :spec | spec name ].
> cache at: cacheKey put: names ] in
> MetacelloMCVersionSpec(MetacelloVersionSpec)>>expandToLoadableSpecNames: in
> Block: [ :cache | ...
> [ :dict |
> | cache |
> cache := dict at: cacheName ifAbsent: [ ].
> cache ~~ nil
> ifTrue: [ | value hasEntry |
> hasEntry := true.
> value := cache at: key ifAbsent: [ hasEntry := false ].
> hasEntry
> ifTrue: [ ^ value ] ]
> ifFalse: [ cache := cacheClass new.
> dict at: cacheName put: cache ].
> ^ aBlock value: cache ] in
> IceMetacelloPharoPlatform(MetacelloPlatform)>>stackCacheFor:cacheClass:at:doing:
> in Block: [ :dict | ...
> [ ^ aBlock value: dict ] in
> IceMetacelloPharoPlatform(MetacelloPlatform)>>useStackCacheDuring:defaultDictionary:
> in Block: [ ^ aBlock value: dict ]
> BlockClosure>>on:do:
> IceMetacelloPharoPlatform(MetacelloPlatform)>>useStackCacheDuring:defaultDictionary:
> IceMetacelloPharoPlatform(MetacelloPlatform)>>stackCacheFor:cacheClass:at:doing:
> IceMetacelloPharoPlatform(MetacelloPlatform)>>stackCacheFor:at:doing:
> MetacelloMCVersionSpec(MetacelloVersionSpec)>>expandToLoadableSpecNames:
> MetacelloMCVersionSpec>>isPartiallyCurrent
> [ :version |
> | status matchBlock |
> status := resolvedPackageAndProjectNames isNil
> ifTrue: [ version spec isPartiallyCurrent ]
> ifFalse: [ version spec
> isPartiallyCurrentAgainst: resolvedPackageAndProjectNames ].
> matchBlock := [ :matchStatus |
> cv := version copy.
> cv versionStatus: matchStatus.
> ^ cache at: cacheKey put: cv ].
> status isAllLoadedToSpec: matchBlock.
> status isLoadedToSpec: matchBlock.
> status isLoadedMatchConstraints: matchBlock.
> status
> isSomethingLoaded: [ :matchStatus |
> latestSomethingLoaded isNil
> ifTrue: [ cv := version copy.
> cv versionStatus: matchStatus.
> latestSomethingLoaded := cv ] ] ] in [ :cache |
> | cv versions latestSomethingLoaded |
> cv := nil.
> versions := self sortedAndFilteredVersions.
> versions
> do: [ :version |
> | status matchBlock |
> status := resolvedPackageAndProjectNames isNil
> ifTrue: [ version spec isPartiallyCurrent ]
> ifFalse: [ version spec
> isPartiallyCurrentAgainst:
> resolvedPackageAndProjectNames ].
> matchBlock := [ :matchStatus |
> cv := version copy.
> cv versionStatus: matchStatus.
> ^ cache at: cacheKey put: cv ].
> status isAllLoadedToSpec: matchBlock.
> status isLoadedToSpec: matchBlock.
> status isLoadedMatchConstraints: matchBlock.
> status
> isSomethingLoaded: [ :matchStatus |
> latestSomethingLoaded isNil
> ifTrue: [ cv := version copy.
> cv versionStatus: matchStatus.
> latestSomethingLoaded := cv ] ] ].
> latestSomethingLoaded
> ifNotNil: [ ^ cache at: cacheKey put: latestSomethingLoaded ].
> ^ cache at: cacheKey put: nil ] in
> MetacelloMCProject(MetacelloProject)>>currentVersionAgainst: in Block: [
> :version | ...
> Array(SequenceableCollection)>>do:
> [ :cache |
> | cv versions latestSomethingLoaded |
> cv := nil.
> versions := self sortedAndFilteredVersions.
> versions
> do: [ :version |
> | status matchBlock |
> status := resolvedPackageAndProjectNames isNil
> ifTrue: [ version spec isPartiallyCurrent ]
> ifFalse: [ version spec
> isPartiallyCurrentAgainst:
> resolvedPackageAndProjectNames ].
> matchBlock := [ :matchStatus |
> cv := version copy.
> cv versionStatus: matchStatus.
> ^ cache at: cacheKey put: cv ].
> status isAllLoadedToSpec: matchBlock.
> status isLoadedToSpec: matchBlock.
> status isLoadedMatchConstraints: matchBlock.
> status
> isSomethingLoaded: [ :matchStatus |
> latestSomethingLoaded isNil
> ifTrue: [ cv := version copy.
> cv versionStatus: matchStatus.
> latestSomethingLoaded := cv ] ] ].
> latestSomethingLoaded
> ifNotNil: [ ^ cache at: cacheKey put: latestSomethingLoaded ].
> ^ cache at: cacheKey put: nil ] in
> MetacelloMCProject(MetacelloProject)>>currentVersionAgainst: in Block: [
> :cache | ...
> [ :dict |
> | cache |
> cache := dict at: cacheName ifAbsent: [ ].
> cache ~~ nil
> ifTrue: [ | value hasEntry |
> hasEntry := true.
> value := cache at: key ifAbsent: [ hasEntry := false ].
> hasEntry
> ifTrue: [ ^ value ] ]
> ifFalse: [ cache := cacheClass new.
> dict at: cacheName put: cache ].
> ^ aBlock value: cache ] in
> IceMetacelloPharoPlatform(MetacelloPlatform)>>stackCacheFor:cacheClass:at:doing:
> in Block: [ :dict | ...
> [ ^ aBlock value: dict ] in
> IceMetacelloPharoPlatform(MetacelloPlatform)>>useStackCacheDuring:defaultDictionary:
> in Block: [ ^ aBlock value: dict ]
> BlockClosure>>on:do:
> IceMetacelloPharoPlatform(MetacelloPlatform)>>useStackCacheDuring:defaultDictionary:
> IceMetacelloPharoPlatform(MetacelloPlatform)>>stackCacheFor:cacheClass:at:doing:
> IceMetacelloPharoPlatform(MetacelloPlatform)>>stackCacheFor:at:doing:
> MetacelloMCProject(MetacelloProject)>>currentVersionAgainst:
> [ :cache |
> cv := self currentVersionAgainst: nil.
> ^ cache at: cacheKey put: cv ] in
> MetacelloMCProject(MetacelloProject)>>currentVersion in Block: [ :cache |
> ...
>
> --
> Dr. Geo
> http://drgeo.eu
>
>
>
April 2, 2018
Re: [Pharo-users] unsolicited package-cache use
by Stephane Ducasse
Hilaire
A BaselineOf is the equivalent in better to a ConifgurationOf
The key benefit is that you just specify a kind of ConfigurationOf
baseline and you are done
No need to express manually versions.
With a baseline you can get branches, a specific hash....
So you have all the power but with less burden.
Side: I do not like the git API but I coding with git and the branches
are really really nice.
You can have multiple versions
- release
- dev
- dev + a features and simply manage it
So git is really a plus
With Iceberg 20, you will also be able to manage external ressources
(icons, text...)
and this is cool
Stef
---------- Forwarded message ----------
From: Hilaire <hilaire(a)drgeo.eu>
Date: Mon, Apr 2, 2018 at 3:46 PM
Subject: Re: [Pharo-users] unsolicited package-cache use
To: pharo-users(a)lists.pharo.org
Hi Dale,
Sorry to reply very lately to your help email, I am getting slow on
Pharo those those days.
I am afraid to be a bit out of sync: what is a BaselineOf? I only have
a ConfigurationOfDrGeo and baseline methods into.
Hilaire
Le 18/01/2018 à 16:10, Dale Henrichs a écrit :
>
>
> Hilaire,
>
> Have you included a method in your BaselineOf that looks like this:
>
> projectClass
>
> ^ MetacelloCypressBaselineProject
>
> if not, then what looks like a package-cache problem could be that you haven't told Metacello that you are using a metadataless filetree/tonel repository.
>
> Metacello has an internal rule to not load Monticello packages of the same version, since they are already loaded. However, when using metadataless repositories the filetree/tonel Monticello package readers typically generate a package name using the author/version `-cypress.1`, which make Metacello think that the versions are the same and the package is not loaded ... by including the above method in your baselineof, Metacello will know to ignore the Monticello author/version of the package and always load it....
>
> Of course, because Monticello only installs changed definitions when loading a package, "loading the same package over and over again" costs a little bit in loading the _definitions_ into the image from disk, but doesn't end up compiling any new methods or creating new classes ...
>
> Dale
>
> On 1/18/18 6:49 AM, Hilaire wrote:
>>
>> It was a month ago; I don't remember the details but from what I can recover from my memory the scenario was:
>>
>> - From my dev. environment I saved code through Tonel, in the DrGeo used CVS.
>>
>> - When building, I specifically ask the code saved thought Tonel to be installed but the package-cache code version was used instead. It could be out of sync.
>>
>>
>> Le 18/01/2018 à 15:22, Dale Henrichs a écrit :
>>>
>>> Hilaire,
>>>
>>> Metacello just uses Monticello for loading and it is Monticello that is using the package-cache ... if there were a way to turn of the package-cache for Monticello I don't think that Metacello would know the difference.
>>>
>>> But, I am curious why you care whether or not package is used?
>>>
>>> Is there a specific problem that you are having?
>>>
>>> Dale
>>
>>
--
Dr. Geo
http://drgeo.eu
April 2, 2018
Quick way to switch from playground to system browser
by Andrei Stebakov
I wonder if there is a best practice for modifying code in you class in
system browser and testing the behavior in the playground.
The way I do it, I have to type the code, use the mouse to find and switch
to the playground and then execute some code in it.
Is there a more ergonomic way to modify/test the new code?
April 2, 2018
Re: [Pharo-users] unsolicited package-cache use
by Hilaire
Hi Dale,
Sorry to reply very lately to your help email, I am getting slow on
Pharo those those days.
I am afraid to be a bit out of sync: what is a BaselineOf? I only have a
ConfigurationOfDrGeo and baseline methods into.
Hilaire
Le 18/01/2018 à 16:10, Dale Henrichs a écrit :
>
> Hilaire,
>
> Have you included a method in your BaselineOf that looks like this:
>
> projectClass
>
> Â Â Â ^ MetacelloCypressBaselineProject
>
> if not, then what looks like a package-cache problem could be that you
> haven't told Metacello that you are using a metadataless
> filetree/tonel repository.
>
> Metacello has an internal rule to not load Monticello packages of the
> same version, since they are already loaded. However, when using
> metadataless repositories the filetree/tonel Monticello package
> readers typically generate a package name using the author/version
> `-cypress.1`, which make Metacello think that the versions are the
> same and the package is not loaded ... by including the above method
> in your baselineof, Metacello will know to ignore the Monticello
> author/version of the package and always load it....
>
> Of course, because Monticello only installs changed definitions when
> loading a package, "loading the same package over and over again"
> costs a little bit in loading the _definitions_ into the image from
> disk, but doesn't end up compiling any new methods or creating new
> classes ...
>
> Dale
>
> On 1/18/18 6:49 AM, Hilaire wrote:
>> It was a month ago; I don't remember the details but from what I can
>> recover from my memory the scenario was:
>>
>> - From my dev. environment I saved code through Tonel, in the DrGeo
>> used CVS.
>>
>> - When building, I specifically ask the code saved thought Tonel to
>> be installed but the package-cache code version was used instead. It
>> could be out of sync.
>>
>>
>> Le 18/01/2018 à 15:22, Dale Henrichs a écrit :
>>> Hilaire,
>>>
>>> Metacello just uses Monticello for loading and it is Monticello that
>>> is using the package-cache ... if there were a way to turn of the
>>> package-cache for Monticello I don't think that Metacello would know
>>> the difference.
>>>
>>> But, I am curious why you care whether or not package is used?
>>>
>>> Is there a specific problem that you are having?
>>>
>>> Dale
>>
--
Dr. Geo
http://drgeo.eu
April 2, 2018
How to #currentVersion from a Configuration
by Hilaire
Hello,
I use to do perform this code to get the installed version from a
ConfigurationOfDrGeo:
drgeoVersion
   ^ 'Installed version: ', ConfigurationOfDrGeo new project
currentVersion versionNumber versionString
It does not work anymore, and produce the following error stack
Any idea?
Hilaire
MetacelloMCVersionSpec(Object)>>error:
[ ^ self error: 'Name not found: ' , aString ] in
MetacelloMCVersionSpec(MetacelloVersionSpec)>>resolveToLoadableSpec:forLoad:forMap:packages:
in Block: [ ^ self error: 'Name not found: ' , aString ]
[ (self importArray notNil or: [ self import notNil ])
   ifTrue:
      [ "expect the 'missing' name to be satisfied within context of
imported project"
      importArray
         ifNotNil: [ importArray
               do: [ :assoc |
                  ((assoc value includes: aString) and: [ map
includesKey: assoc key ])
                     ifTrue: [ importSpec := (map at: assoc key)
                           mergeImportLoads: {aString};
                           yourself ] ].
            importSpec ifNotNil: [ ^ importSpec ] ].
      (importSpec isNil and: [ self import notNil ])
         ifTrue: [ ^ (map at: self import ifAbsent: absentBlock)
               mergeImportLoads: {aString};
               yourself ] ].
(aString = 'default' or: [ aString = 'ALL' ])
   ifTrue: [ self project groupSpec
         name: aString;
         includes: self packageNames;
         yourself ]
   ifFalse: [ absentBlock value ] ] in
MetacelloMCVersionSpec(MetacelloVersionSpec)>>packageNamed:forLoad:forMap:ifAbsent:
in Block: [ (self importArray notNil or: [ self import notNi...etc...
Dictionary>>at:ifAbsent:
MetacelloMCVersionSpec(MetacelloVersionSpec)>>packageNamed:forLoad:forMap:ifAbsent:
MetacelloMCVersionSpec(MetacelloVersionSpec)>>resolveToLoadableSpec:forLoad:forMap:packages:
[ :req |
(self
   resolveToLoadableSpec: req
   forLoad: forLoad
   forMap: map
   packages: packageMap)
   do: [ :loadableSpec |
      newReqd addAll: loadableSpec requires.
      newReqd addAll: loadableSpec includes ] ] in
MetacelloMCVersionSpec(MetacelloVersionSpec)>>resolveToLoadableSpecs:forLoad:map:
in Block: [ :req | ...
Set>>do:
MetacelloMCVersionSpec(MetacelloVersionSpec)>>resolveToLoadableSpecs:forLoad:map:
MetacelloMCVersionSpec(MetacelloVersionSpec)>>resolveToLoadableSpecs:
[ :cache |
names := (self resolveToLoadableSpecs: nameList)
   collect: [ :spec | spec name ].
cache at: cacheKey put: names ] in
MetacelloMCVersionSpec(MetacelloVersionSpec)>>expandToLoadableSpecNames:
in Block: [ :cache | ...
[ :dict |
| cache |
cache := dict at: cacheName ifAbsent: [Â ].
cache ~~ nil
   ifTrue: [ | value hasEntry |
      hasEntry := true.
      value := cache at: key ifAbsent: [ hasEntry := false ].
      hasEntry
         ifTrue: [ ^ value ] ]
   ifFalse: [ cache := cacheClass new.
      dict at: cacheName put: cache ].
^ aBlock value: cache ] in
IceMetacelloPharoPlatform(MetacelloPlatform)>>stackCacheFor:cacheClass:at:doing:
in Block: [ :dict | ...
[ ^ aBlock value: dict ] in
IceMetacelloPharoPlatform(MetacelloPlatform)>>useStackCacheDuring:defaultDictionary:
in Block: [ ^ aBlock value: dict ]
BlockClosure>>on:do:
IceMetacelloPharoPlatform(MetacelloPlatform)>>useStackCacheDuring:defaultDictionary:
IceMetacelloPharoPlatform(MetacelloPlatform)>>stackCacheFor:cacheClass:at:doing:
IceMetacelloPharoPlatform(MetacelloPlatform)>>stackCacheFor:at:doing:
MetacelloMCVersionSpec(MetacelloVersionSpec)>>expandToLoadableSpecNames:
MetacelloMCVersionSpec>>isPartiallyCurrent
[ :version |
| status matchBlock |
status := resolvedPackageAndProjectNames isNil
   ifTrue: [ version spec isPartiallyCurrent ]
   ifFalse: [ version spec
         isPartiallyCurrentAgainst: resolvedPackageAndProjectNames ].
matchBlock := [ :matchStatus |
cv := version copy.
cv versionStatus: matchStatus.
^ cache at: cacheKey put: cv ].
status isAllLoadedToSpec: matchBlock.
status isLoadedToSpec: matchBlock.
status isLoadedMatchConstraints: matchBlock.
status
   isSomethingLoaded: [ :matchStatus |
      latestSomethingLoaded isNil
         ifTrue: [ cv := version copy.
            cv versionStatus: matchStatus.
            latestSomethingLoaded := cv ] ] ] in [ :cache |
| cv versions latestSomethingLoaded |
cv := nil.
versions := self sortedAndFilteredVersions.
versions
   do: [ :version |
      | status matchBlock |
      status := resolvedPackageAndProjectNames isNil
         ifTrue: [ version spec isPartiallyCurrent ]
         ifFalse: [ version spec
               isPartiallyCurrentAgainst:
resolvedPackageAndProjectNames ].
      matchBlock := [ :matchStatus |
      cv := version copy.
      cv versionStatus: matchStatus.
      ^ cache at: cacheKey put: cv ].
      status isAllLoadedToSpec: matchBlock.
      status isLoadedToSpec: matchBlock.
      status isLoadedMatchConstraints: matchBlock.
      status
         isSomethingLoaded: [ :matchStatus |
            latestSomethingLoaded isNil
               ifTrue: [ cv := version copy.
                  cv versionStatus: matchStatus.
                  latestSomethingLoaded := cv ] ] ].
latestSomethingLoaded
   ifNotNil: [ ^ cache at: cacheKey put: latestSomethingLoaded ].
^ cache at: cacheKey put: nil ] in
MetacelloMCProject(MetacelloProject)>>currentVersionAgainst: in Block: [
:version | ...
Array(SequenceableCollection)>>do:
[ :cache |
| cv versions latestSomethingLoaded |
cv := nil.
versions := self sortedAndFilteredVersions.
versions
   do: [ :version |
      | status matchBlock |
      status := resolvedPackageAndProjectNames isNil
         ifTrue: [ version spec isPartiallyCurrent ]
         ifFalse: [ version spec
               isPartiallyCurrentAgainst:
resolvedPackageAndProjectNames ].
      matchBlock := [ :matchStatus |
      cv := version copy.
      cv versionStatus: matchStatus.
      ^ cache at: cacheKey put: cv ].
      status isAllLoadedToSpec: matchBlock.
      status isLoadedToSpec: matchBlock.
      status isLoadedMatchConstraints: matchBlock.
      status
         isSomethingLoaded: [ :matchStatus |
            latestSomethingLoaded isNil
               ifTrue: [ cv := version copy.
                  cv versionStatus: matchStatus.
                  latestSomethingLoaded := cv ] ] ].
latestSomethingLoaded
   ifNotNil: [ ^ cache at: cacheKey put: latestSomethingLoaded ].
^ cache at: cacheKey put: nil ] in
MetacelloMCProject(MetacelloProject)>>currentVersionAgainst: in Block: [
:cache | ...
[ :dict |
| cache |
cache := dict at: cacheName ifAbsent: [Â ].
cache ~~ nil
   ifTrue: [ | value hasEntry |
      hasEntry := true.
      value := cache at: key ifAbsent: [ hasEntry := false ].
      hasEntry
         ifTrue: [ ^ value ] ]
   ifFalse: [ cache := cacheClass new.
      dict at: cacheName put: cache ].
^ aBlock value: cache ] in
IceMetacelloPharoPlatform(MetacelloPlatform)>>stackCacheFor:cacheClass:at:doing:
in Block: [ :dict | ...
[ ^ aBlock value: dict ] in
IceMetacelloPharoPlatform(MetacelloPlatform)>>useStackCacheDuring:defaultDictionary:
in Block: [ ^ aBlock value: dict ]
BlockClosure>>on:do:
IceMetacelloPharoPlatform(MetacelloPlatform)>>useStackCacheDuring:defaultDictionary:
IceMetacelloPharoPlatform(MetacelloPlatform)>>stackCacheFor:cacheClass:at:doing:
IceMetacelloPharoPlatform(MetacelloPlatform)>>stackCacheFor:at:doing:
MetacelloMCProject(MetacelloProject)>>currentVersionAgainst:
[ :cache |
cv := self currentVersionAgainst: nil.
^ cache at: cacheKey put: cv ] in
MetacelloMCProject(MetacelloProject)>>currentVersion in Block: [ :cache
| ...
--
Dr. Geo
http://drgeo.eu
April 2, 2018
Re: [Pharo-users] SDL2SpecialCharacterMapping problem
by Ben Coman
Hi Alvaro,
This is not an area I've been involved in, but just a general comment...
Can you export a self contained example from your code that can be loaded
into a fresh Image that demonstrate the problem?
Its always easier if people can see the problem with their own eyes.
Also, what version OS/VM/Image are you running?
i.e. World Menu > System > System Reporter
cheers -ben
On 1 April 2018 at 11:45, alvaro piorno <alvaropiorno100(a)gmail.com> wrote:
> Hi,
>
> Iam having a problem handling some OSKeywordEvents. These events should
> have character associated.
>
> The mapping is resolved by SDL2SpecialCharacterMapping using a
> dictionary(Mappings), it has the mapping, for example, for left arrow and
> right arrow.
>
> It resolve correctly for "left arrow" with key: 1073741904(Integer) , but
> it does not found "right arrow" with key: 1073741903(Integer).
>
> Both keys are present.
> Any idea?
>
>
April 1, 2018
Re: [Pharo-users] Keeping packages up to date
by Andrei Stebakov
Thank you!
On Sun, Apr 1, 2018, 14:00 Stephane Ducasse <stepharo.self(a)gmail.com> wrote:
> Andrei
>
> if you need help we can help you.
>
> Stef
>
> On Sun, Apr 1, 2018 at 7:59 PM, Stephane Ducasse
> <stepharo.self(a)gmail.com> wrote:
> > use metacello and iceberg or gitfiletree
> >
> > Stef
> >
> > On Sun, Apr 1, 2018 at 4:32 PM, Andrei Stebakov <lispercat(a)gmail.com>
> wrote:
> >> Exactly! I guess because there are so many ways to navigate around
> updating
> >> the package, I was lost :) Thank you guys for giving me some pointers,
> I'll
> >> try to learn them. I wonder, which one is the most promising and
> mainstream?
> >>
> >> On Sun, Apr 1, 2018, 08:58 <aglynn42(a)gmail.com> wrote:
> >>>
> >>> You can open the repository in the Monticello browser if itâs a
> >>> Metacello/Monticello repo, or use Iceberg with git if itâs a git repo
> in the
> >>> same manner you would with any other git project. You can also open
> the
> >>> project in Versionner to get the latest version.
> >>>
> >>>
> >>>
> >>> As far as scripting it, thatâs reasonably obvious if you look at the
> >>> Monticello or Versionner code itself.
> >>>
> >>>
> >>>
> >>> From: Pharo-users <pharo-users-bounces(a)lists.pharo.org> On Behalf Of
> >>> Andrei Stebakov
> >>> Sent: Saturday, March 31, 2018 7:14 PM
> >>> To: Any question about pharo is welcome <pharo-users(a)lists.pharo.org>
> >>> Subject: [Pharo-users] Keeping packages up to date
> >>>
> >>>
> >>>
> >>> I wonder if there is a generic solution to keeping certain Pharo
> project
> >>> in sync with development tree.
> >>>
> >>> For example when I want to get latest Roassal I execute
> >>>
> >>> Gofer it
> >>>
> >>> smalltalkhubUser: 'ObjectProfile' project: 'Roassal2';
> >>>
> >>> package: 'Roassal2';
> >>>
> >>> package: 'Roassal2GT';
> >>>
> >>> package: 'Trachel';
> >>>
> >>> load.
> >>>
> >>>
> >>>
> >>> Also I wouldn't know this unless the maintainers (thanks Alexandre!) of
> >>> the project told me what script to execute to get the latest version.
> >>>
> >>> If I went to Project Catalog I can only get the stable version and if
> I go
> >>> and find Roassal2 it won't give me information how to get its latest
> >>> version.
> >>>
> >>>
> >>>
> >>> How would I get info about how to update, say Roassal given the script
> >>> above from some Roassal project public page?
> >>>
> >>> Talking about Roassal, if I go to
> >>> http://smalltalkhub.com/#!/~ObjectProfile/Roassal2/ page, it offers
> the
> >>> following script:
> >>>
> >>> Gofer it smalltalkhubUser: 'ObjectProfile' project: 'Roassal2';
> >>> configurationOf: 'Roassal2'; loadDevelopment
> >>>
> >>>
> >>>
> >>> Which is probably not exactly equal to the script above (or is it?).
> >>>
> >>>
> >>>
> >>> So, is there a generic way to get a latest version of some XYZ package?
> >>>
> >>> What do I need to learn to be able to get that information about any
> Pharo
> >>> project (other than asking the community)? Something similar to "git
> pull"
> >>> when you know the repository.
>
>
April 1, 2018
Re: [Pharo-users] [Seaside-dev] [Seaside] [ANN] MaterialDesignLite for Seaside v1.2.0
by Cyril Ferlicot D.
On 01/04/2018 03:53, Esteban A. Maringolo wrote:
> Wow. Impressive work.
> Thank you for sharing this.
>
Thank you!
> I have my feets too deep into Bootstrap these days, do you have any
> compelling reason that might tempt me to move to MDL?
>
I don't think there is really a better solution between MDL for Seaside
and Bootstrap. Both have their advantages and for me the first reason to
chose one or the other is what you're comfortable with.
Bootstrap has a lost of plugins we can bind to Seaside. MDL for Seaside
now has widgets and extensions directly available with features such as
list dynamically loading with ajax and I would like to add more with time.
Personally I prefer MDL for two reasons.
- I prefer the design of Material Design to the one of Bootstrap
- More importantly, I hate the columns system of Bootstrap
Columns were a good JS feature because more flexible than tables and
helped to create responsive applications. Now CSS comes with the native
flex display and I find it much more flexible than columns.
(https://css-tricks.com/snippets/css/a-guide-to-flexbox/) And now it's
supported by all the major browsers since some versions (except IE8 and
previous...).
So to answer your question I think it all depends on you and your project.
(I know I'm not really selling well what I'm working on but my main goal
is to help web developers here, not to convert them :) )
> Regards,
>
> Esteban A. Maringolo
>
>
--
Cyril Ferlicot
https://ferlicot.fr
April 1, 2018
Re: [Pharo-users] Keeping packages up to date
by Stephane Ducasse
Andrei
if you need help we can help you.
Stef
On Sun, Apr 1, 2018 at 7:59 PM, Stephane Ducasse
<stepharo.self(a)gmail.com> wrote:
> use metacello and iceberg or gitfiletree
>
> Stef
>
> On Sun, Apr 1, 2018 at 4:32 PM, Andrei Stebakov <lispercat(a)gmail.com> wrote:
>> Exactly! I guess because there are so many ways to navigate around updating
>> the package, I was lost :) Thank you guys for giving me some pointers, I'll
>> try to learn them. I wonder, which one is the most promising and mainstream?
>>
>> On Sun, Apr 1, 2018, 08:58 <aglynn42(a)gmail.com> wrote:
>>>
>>> You can open the repository in the Monticello browser if itâs a
>>> Metacello/Monticello repo, or use Iceberg with git if itâs a git repo in the
>>> same manner you would with any other git project. You can also open the
>>> project in Versionner to get the latest version.
>>>
>>>
>>>
>>> As far as scripting it, thatâs reasonably obvious if you look at the
>>> Monticello or Versionner code itself.
>>>
>>>
>>>
>>> From: Pharo-users <pharo-users-bounces(a)lists.pharo.org> On Behalf Of
>>> Andrei Stebakov
>>> Sent: Saturday, March 31, 2018 7:14 PM
>>> To: Any question about pharo is welcome <pharo-users(a)lists.pharo.org>
>>> Subject: [Pharo-users] Keeping packages up to date
>>>
>>>
>>>
>>> I wonder if there is a generic solution to keeping certain Pharo project
>>> in sync with development tree.
>>>
>>> For example when I want to get latest Roassal I execute
>>>
>>> Gofer it
>>>
>>> smalltalkhubUser: 'ObjectProfile' project: 'Roassal2';
>>>
>>> package: 'Roassal2';
>>>
>>> package: 'Roassal2GT';
>>>
>>> package: 'Trachel';
>>>
>>> load.
>>>
>>>
>>>
>>> Also I wouldn't know this unless the maintainers (thanks Alexandre!) of
>>> the project told me what script to execute to get the latest version.
>>>
>>> If I went to Project Catalog I can only get the stable version and if I go
>>> and find Roassal2 it won't give me information how to get its latest
>>> version.
>>>
>>>
>>>
>>> How would I get info about how to update, say Roassal given the script
>>> above from some Roassal project public page?
>>>
>>> Talking about Roassal, if I go to
>>> http://smalltalkhub.com/#!/~ObjectProfile/Roassal2/ page, it offers the
>>> following script:
>>>
>>> Gofer it smalltalkhubUser: 'ObjectProfile' project: 'Roassal2';
>>> configurationOf: 'Roassal2'; loadDevelopment
>>>
>>>
>>>
>>> Which is probably not exactly equal to the script above (or is it?).
>>>
>>>
>>>
>>> So, is there a generic way to get a latest version of some XYZ package?
>>>
>>> What do I need to learn to be able to get that information about any Pharo
>>> project (other than asking the community)? Something similar to "git pull"
>>> when you know the repository.
April 1, 2018
Re: [Pharo-users] Keeping packages up to date
by Stephane Ducasse
use metacello and iceberg or gitfiletree
Stef
On Sun, Apr 1, 2018 at 4:32 PM, Andrei Stebakov <lispercat(a)gmail.com> wrote:
> Exactly! I guess because there are so many ways to navigate around updating
> the package, I was lost :) Thank you guys for giving me some pointers, I'll
> try to learn them. I wonder, which one is the most promising and mainstream?
>
> On Sun, Apr 1, 2018, 08:58 <aglynn42(a)gmail.com> wrote:
>>
>> You can open the repository in the Monticello browser if itâs a
>> Metacello/Monticello repo, or use Iceberg with git if itâs a git repo in the
>> same manner you would with any other git project. You can also open the
>> project in Versionner to get the latest version.
>>
>>
>>
>> As far as scripting it, thatâs reasonably obvious if you look at the
>> Monticello or Versionner code itself.
>>
>>
>>
>> From: Pharo-users <pharo-users-bounces(a)lists.pharo.org> On Behalf Of
>> Andrei Stebakov
>> Sent: Saturday, March 31, 2018 7:14 PM
>> To: Any question about pharo is welcome <pharo-users(a)lists.pharo.org>
>> Subject: [Pharo-users] Keeping packages up to date
>>
>>
>>
>> I wonder if there is a generic solution to keeping certain Pharo project
>> in sync with development tree.
>>
>> For example when I want to get latest Roassal I execute
>>
>> Gofer it
>>
>> smalltalkhubUser: 'ObjectProfile' project: 'Roassal2';
>>
>> package: 'Roassal2';
>>
>> package: 'Roassal2GT';
>>
>> package: 'Trachel';
>>
>> load.
>>
>>
>>
>> Also I wouldn't know this unless the maintainers (thanks Alexandre!) of
>> the project told me what script to execute to get the latest version.
>>
>> If I went to Project Catalog I can only get the stable version and if I go
>> and find Roassal2 it won't give me information how to get its latest
>> version.
>>
>>
>>
>> How would I get info about how to update, say Roassal given the script
>> above from some Roassal project public page?
>>
>> Talking about Roassal, if I go to
>> http://smalltalkhub.com/#!/~ObjectProfile/Roassal2/ page, it offers the
>> following script:
>>
>> Gofer it smalltalkhubUser: 'ObjectProfile' project: 'Roassal2';
>> configurationOf: 'Roassal2'; loadDevelopment
>>
>>
>>
>> Which is probably not exactly equal to the script above (or is it?).
>>
>>
>>
>> So, is there a generic way to get a latest version of some XYZ package?
>>
>> What do I need to learn to be able to get that information about any Pharo
>> project (other than asking the community)? Something similar to "git pull"
>> when you know the repository.
April 1, 2018