[Pharo-dev] Just a reminder
That if you the developers of Phar change things many have to follow and it comes to things like this: "protocol: version dependent" platformName "After Squeak version 3.6, #platformName was moved to SmalltalkImage Some versions of Pharo move this to OSPlatform and issue deprecation warnings about the other usages. The original idiom (Squeak 3.6 and earlier) is the sensible default, but here we attempt to support other implementations if the sensible default is not available." "OSProcess platformName" (Smalltalk respondsTo: #platformName) ifTrue: [^ Smalltalk platformName]. self isPharo3AndLater ifTrue: [ ^ (Smalltalk perform: #os) name ]. ^ (((Smalltalk hasClassNamed: #OSPlatform) and: [(Smalltalk at: #OSPlatform) respondsTo: #platformName]) ifTrue: [Smalltalk at: #OSPlatform] ifFalse: [((Smalltalk classNamed: 'SmalltalkImage') ifNil: [^ Smalltalk osVersion]) current]) platformName Now how many do have to follow through all this? So well yes in the end it means not thinking about compatibility costs a lot thereafter
Re: [Pharo-dev] method Quest :)
I have to think if the asSet is needed too. In fact I want in addition intersectionAndDifferences: aColl because I want to be able to define nicely merge: aDict onKeyConflictDoValues: aBlock as follow | d d2 | d := #(1 3 4 5 ) groupedBy: #even. d2 := #(10 31 41 50 ) groupedBy: #even. d merge: d2 onKeyConflictDoValues: [ :aValue :anotherValue | (aValue, anotherValue) asSet asOrderedCollection ] Because manipulating dictionaries whose values are collections is boring. Stef On 14 Mar 2014, at 23:15, Sven Van Caekenberghe wrote: > Are the final #asArray conversions always needed ? > If not, it would be more efficient not to do them every time, no ? > > On 14 Mar 2014, at 22:19, Pharo4Stef wrote: > >> something like that >> >> diffs: aCollection >> "Answer the set theoretic differences of two collections. The first >> element of the result is the difference from the perspective of the receiver >> and the second element the difference from the perspective of the argument." >> >> "#(a b c d e f) diffs: #(a b z k) #(#a #b #c #d #e #f) >> { #(#f #d #e #c) . #(#k #z)} >> " >> "{ self difference: aCollection . aCollection difference: self }" >> >> | receiver another | >> receiver := self asSet. >> another := aCollection asSet. >> self do: [ :each | >> (another includes: each) >> ifTrue: [ receiver remove: each. >> another >> remove: each ]]. >> ^ { receiver asArray . another asArray} >> > >
Re: [Pharo-dev] method Quest :)
Now I can merge dictionaries in a nice way testMergeWithNonOverlappingKeys "self run: #testMerge" | d d2 d3 | d := Dictionary new at: #x put: #(x y z) ; at: #y put: #(e f g ) ; at: #a put: #(a b c); yourself. d2 := Dictionary new at: #x put: #(x y z) ; at: #y put: #( h i j) ; yourself. d3 := d merge: d2 onKeyConflictDoValues: [ :aValue :anotherValue | (aValue, anotherValue) asSet asOrderedCollection ]. self assert: (d3 at: #y) equals: #(e f g h i j). self assert: (d3 at: #a) equals: #(a b c ). self assert: (d3 at: #x) equals: #(x y z).
[Pharo-dev] Roassal 3D empty windows
Hi, what could be the reason, that any Roassal3d example from the Roassal3DTutorial.pdf only shows white empty windows? I loaded ConfigurationOfRoassal3d-RonieSalgado.10 and (Smalltalk at: #ConfigurationOfRoassal3d) loadDevelopment Any ideas? regards Nicolai
Re: [Pharo-dev] EyeTreeInspector not ready for prime-time
Sean P. DeNigris wrote: I'm glad we're re-inventing the tools! And, I'm struggling with this tool in its current form... As others have mentioned, the "class" pseudo-variable is confusing, but here are some that I find worse: - The receiver does not change with the selection. For me, this was a key feature of the explorer. Can you try https://pharo.fogbugz.com/f/cases/13086/ cheers -ben - It does not properly update e.g. if you are inspecting a class containing a dictionary and add an item to the dictionary, collapsing and expanding the dictionary node does not show the added item. It seems you must open an entirely new inspector. - If you toggle from EyeTreeInspector to EyeInspector, your code in the bottom pane is lost - Cheers, Sean -- View this message in context: http://forum.world.st/EyeTreeInspector-not-ready-for-prime-time-tp4748966.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
[Pharo-dev] NBOpenGL on Windows
Is there a working version (maybe with examples) for NBOpenGL on Windows?
Re: [Pharo-dev] List editor spec widget
On 15 Mar 2014, at 22:39, Yuriy Tymchuk wrote: > Hi everyone. > > I wander if there is already something like the list editing buttons in OS X > i.e. ‘+’ and ‘-‘ buttons that either open a dialog with another list that > allows to select what to add, or remove selected items from the list. > (example on screenshot). I would answer “not yet” :) Feel free to submit one :P If you have questions, I will be glad to answer them, and to help you to propose such a widget, reusable enough so we can add it to the spec widgets :) Ben
[Pharo-dev] Adding a new catalog entry
Hi, I tested ArbitraryPrecisionFloat in Pharo3.0 where it works OK. I prepared a Metacello ConfigurationOfArbitraryPrecisionFloat at obsolescent http://www.squeaksource.com/MetacelloRepository How am I supposed to add an entry in MetaRepoForPharo30, should someone give me access?