From btc at openinworld.com Fri Jul 1 04:04:44 2016 From: btc at openinworld.com (Ben Coman) Date: Fri Jul 1 04:05:06 2016 Subject: [squeak-dev] A $140 pc for running Squeak In-Reply-To: <81C530DB-6D5B-4394-B571-EE90356D38B9@rowledge.org> References: <81C530DB-6D5B-4394-B571-EE90356D38B9@rowledge.org> Message-ID: On Fri, Jul 1, 2016 at 7:32 AM, tim Rowledge wrote: > I just got my pi-top CEED (don?t ask me what that stands for?) and after a few minutes setup - inserting the SD card into the provided Pi3, connecting up a couple of cables, inserting the little plastic-magnet ?feet? etc - I was up and running. > > What on earth is a pi-top CEED you ask? Well, think of a small iMac all-in-one with a quite decent 14? lcd and a pi3 inside. Add your own spare mouse/kbd, plug together, insert power plug (psu provided) and press the Magic Button. A moment later you have ? what? Err, this is a bit odd looking? ah, escape to a normal desktop and all is well. Run some updating to get stuff sorted out a little (the Scratch version definitely needs updating for example) and all is well. > > It?s a Pi3 in a nice case with a nice display, a beefy power supply, a neat way of providing space for some add-ons, a proper power switch and a slightly odd OS wrapper. See www.pi-top.com for more details. > > For US$140! OK, so maybe you have to spend $20 on a mouse & keyboard too. And perhaps you want their speaker unit for another $20. You can get just the lcd/case/pus for $99 if you already have a spare Pi. Given that the Pi 7? touch lcd is $70 on its own, this seems a steal to me. > > I?m planning to use my three in Scratch classes over the summer. Nice. I'd been interested in the pi-to before. First time seeing this, and a bit cheaper. Though I liked the picture of a pi-top showing a breadboard rather than a protoboard. What age group are you working with? cheers -ben From smalltalker2 at mac.com Fri Jul 1 04:44:03 2016 From: smalltalker2 at mac.com (John Pfersich) Date: Fri Jul 1 04:44:06 2016 Subject: [Pharo-dev] [squeak-dev] The .changes file should be bound to a single image In-Reply-To: References: <20160629000637.GA61892@shell.msen.com> <20160629124549.GA12105@shell.msen.com> <9E311AF4-321C-421B-AABB-F51F82E1104A@gmail.com> <6071.136.1.1.171.1467223219.squirrel@webmail.msen.com> <20160629230713.GA32310@shell.msen.com> Message-ID: <09578303-ED9E-4305-BCF9-2FEA0A8D646A@mac.com> Sounds like a better idea to me, but I don't think it would solve the problem of multiple images almost simultaneously attempting to update themselves (as in a classroom) Sent from my iPad > On Jun 30, 2016, at 13:31, Chris Muller wrote: > > Another thought... > > Upon launching of the image, start a, temporary changes file, > [image-name]-[some UUID].changes. > > Upon image save, append the temp changes file to the main changes > file, but in an atomic way (first do the append as a new unique > filename, then rename it to the original changes file name). > > Hmm, but then we would have to check two changes files when accessing sources.. > > On Thu, Jun 30, 2016 at 3:10 PM, Chris Muller wrote: >>>> In practice, this is not an issue that either Chris or I have noticed, >>>> probably because we are not doing software development (saving method >>>> changes) at the same time that we are running RemoteTask and similar. >>>> But I can certainly see how it might be a problem if, for example, I >>>> had a bunch of students running the same image from a network shared >>>> folder. >>> >>> Maybe its time to consider a fundamental change in how method-sources >>> are referred to. >>> Taking inspiration from git... A content addressable key-value file >>> store might solve concurrent access. Each CompiledMethod gets written >>> to a file named for the hash of its contents, which is the only >>> reference the Image getsto a method's source. Each such file would >> >> It sounds like a lot of files.. so how would I move an image to >> another computer? I gotta know which files go with which image? >> >> Plus, it doesn't really solve the fundamental problem of two images >> writing to the same file. Mutliple images could still change the same >> method to the same contents at the same time. You may have made the >> problem less-likely, except for when you have your first >> hash-collision of *different* sources (it COULD happen), in which case >> it wouldn't even require the changes to occur at the same time. >> >> I guess it would also lose the order-sequence of the change log too... >> unless you were to try to use the underlying filesystem's timestamps >> on each file but... it wouldn't work after I've copied all the files >> via scp and because they all get new timestamps... >> >> Might be better to teach the class, who are learning about Smalltalk >> anyway, about the nature of the changes file..? > From btc at openinworld.com Fri Jul 1 06:06:11 2016 From: btc at openinworld.com (Ben Coman) Date: Fri Jul 1 06:06:35 2016 Subject: [Pharo-dev] [squeak-dev] The .changes file should be bound to a single image In-Reply-To: References: <20160629000637.GA61892@shell.msen.com> <20160629124549.GA12105@shell.msen.com> <9E311AF4-321C-421B-AABB-F51F82E1104A@gmail.com> <6071.136.1.1.171.1467223219.squirrel@webmail.msen.com> <20160629230713.GA32310@shell.msen.com> Message-ID: On Fri, Jul 1, 2016 at 4:10 AM, Chris Muller wrote: >>> In practice, this is not an issue that either Chris or I have noticed, >>> probably because we are not doing software development (saving method >>> changes) at the same time that we are running RemoteTask and similar. >>> But I can certainly see how it might be a problem if, for example, I >>> had a bunch of students running the same image from a network shared >>> folder. >> >> Maybe its time to consider a fundamental change in how method-sources >> are referred to. >> Taking inspiration from git... A content addressable key-value file >> store might solve concurrent access. Each CompiledMethod gets written >> to a file named for the hash of its contents, which is the only >> reference the Image gets to a method's source. Each such file would > > It sounds like a lot of files.. so how would I move an image to > another computer? I gotta know which files go with which image? Yes, that would be a sticking point. You couldn't just grab any saved Image file off disk. The image would first need to generate an archive transfer file. Except if these methods were automatically pushed through to a private web service, then presuming pervasive web access you, that sleeping Image would pull down its sources where ever it boots back up (which even if that would be cool, is not the problem of the original post.) > > Plus, it doesn't really solve the fundamental problem of two images > writing to the same file. Multiple images could still change the same > method to the same contents at the same time. The hash-named-file would never be written to twice. Its a fixed point in space-time ;) A second image with the same hash would write the *same* contents, so there is no need to write. If the hash-named-file exists, do nothing. To handle any race condition between checking file existence and writing to it, the first image could take an exclusive write lock. > You may have made the > problem less-likely, except for when you have your first > hash-collision of *different* sources (it COULD happen), Some equivalent things... * Pick a random atom from the volume of the moon, then another random pick gets the same atom. http://stackoverflow.com/a/23253149 * Win the national lottery 11 times in a row http://stackoverflow.com/a/29146396 * Your chances of winning the Powerball lottery are far better than finding a hash collision. After all, lotteries often have actual winners. The probability of a hash collision is more like a lottery that has been running since prehistoric times and has never had a winner and will probably not have a winner for billions of years. http://ericsink.com/vcbe/html/cryptographic_hashes.html > in which case it wouldn't even require the changes to occur at the same time. When the second Image finds the hash-named-file already exists, it could check the contents and flag an error if they don't match, so at least its not a silent error. The same when integrating different repositories. > > I guess it would also lose the order-sequence of the change log too... > unless you were to try to use the underlying filesystem's timestamps > on each file but... it wouldn't work after I've copied all the files > via scp and because they all get new timestamps... good point. This would complicate changes-replay for a crashed image. Although this case is only important "now" and could be handled by "/tmp/${username}.${last-image-save-checkpoint-id}" file that records the order of commits for a session, that would be checked for on Image startup - which is similar to what you already suggested... > Upon launching of the image, start a, temporary changes file, > [image-name]-[some UUID].changes. > > Upon image save, append the temp changes file to the main changes > file, but in an atomic way (first do the append as a new unique > filename, then rename it to the original changes file name). > Good idea. This would eliminate the need for my idea here. You'd need some way to match the UUID with the Image being opened, so I guess the UUID would need to stored in the saved Image and be constant for the session, and be updated each save of the Image. The temporary changes filename could include username to distinguish between users. If the same user opens an Image twice, there would be two files and upon recovering from a crash the user would be presented a choice between the two files. > > Might be better to teach the class, who are learning about Smalltalk > anyway, about the nature of the changes file..? This seemed more of a classroom system administration issue. Actually in that case, maybe the network executable startup script just copied both image and changes file to the user's personal area? cheers -ben From squeaklist at gmail.com Fri Jul 1 06:13:06 2016 From: squeaklist at gmail.com (Kjell Godo) Date: Fri Jul 1 06:13:08 2016 Subject: [squeak-dev] A $140 pc for running Squeak In-Reply-To: <81C530DB-6D5B-4394-B571-EE90356D38B9@rowledge.org> References: <81C530DB-6D5B-4394-B571-EE90356D38B9@rowledge.org> Message-ID: that's very nice personally i want just a small pocket sized box with more RAM + HDMI , USB , Ethernet , power like a pocket Linux PC is there a link for that ? i didn't find it yet it must be on Amazon next to the pocket Windows 10 PCs i like pocket On Thursday, June 30, 2016, tim Rowledge > wrote: > I just got my pi-top CEED (don?t ask me what that stands for?) and after a > few minutes setup - inserting the SD card into the provided Pi3, connecting > up a couple of cables, inserting the little plastic-magnet ?feet? etc - I > was up and running. > > What on earth is a pi-top CEED you ask? Well, think of a small iMac > all-in-one with a quite decent 14? lcd and a pi3 inside. Add your own spare > mouse/kbd, plug together, insert power plug (psu provided) and press the > Magic Button. A moment later you have ? what? Err, this is a bit odd > looking? ah, escape to a normal desktop and all is well. Run some updating > to get stuff sorted out a little (the Scratch version definitely needs > updating for example) and all is well. > > It?s a Pi3 in a nice case with a nice display, a beefy power supply, a > neat way of providing space for some add-ons, a proper power switch and a > slightly odd OS wrapper. See www.pi-top.com for more details. > > For US$140! OK, so maybe you have to spend $20 on a mouse & keyboard too. > And perhaps you want their speaker unit for another $20. You can get just > the lcd/case/pus for $99 if you already have a spare Pi. Given that the Pi > 7? touch lcd is $70 on its own, this seems a steal to me. > > I?m planning to use my three in Scratch classes over the summer. > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > All the simple programs have been written, and all the good names taken. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160630/710451e9/attachment.htm From eliot.miranda at gmail.com Fri Jul 1 07:33:56 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Jul 1 07:34:03 2016 Subject: [Pharo-dev] [squeak-dev] The .changes file should be bound to a single image In-Reply-To: References: <20160629000637.GA61892@shell.msen.com> <20160629124549.GA12105@shell.msen.com> <9E311AF4-321C-421B-AABB-F51F82E1104A@gmail.com> <6071.136.1.1.171.1467223219.squirrel@webmail.msen.com> <20160629230713.GA32310@shell.msen.com> Message-ID: <8041EBC2-0067-4837-AEA3-3ECDEB4DCC00@gmail.com> Ben, > On Jun 29, 2016, at 9:48 PM, Ben Coman wrote: > >> On Thu, Jun 30, 2016 at 7:07 AM, David T. Lewis wrote: >>> On Wed, Jun 29, 2016 at 02:00:19PM -0400, David T. Lewis wrote: >>> Let's not solve the wrong problem folks. I only looked at this for 10 >>> minutes this morning, and I think (but I am not sure) that the issue >>> affects the case of saving the image, and that the normal writing of >>> changes is fine. >> >> I am wrong. >> >> I spent some more time with this, and it is clear that two images saving >> chunks to the same changes file will result in corrupted change records >> in the changes file. It is not just an issue related to the image save >> as I suggested above. >> >> In practice, this is not an issue that either Chris or I have noticed, >> probably because we are not doing software development (saving method >> changes) at the same time that we are running RemoteTask and similar. >> But I can certainly see how it might be a problem if, for example, I >> had a bunch of students running the same image from a network shared >> folder. > > Maybe its time to consider a fundamental change in how method-sources > are referred to. The changes file us not merely the repository for sources on newly minted methods. It is also a log file, a crash recovery mechanism. It is simple. It works. You propose something horribly complex to solve a problem that a) died t affect very many people, b) is easy to work around and c) feasible to fix with a well-known approach. If doesn't wash for me. > Taking inspiration from git... A content addressable key-value file > store might solve concurrent access. Each CompiledMethod gets written > to a file named for the hash of its contents, which is the only > reference the Image getsto a method's source. Each such file would > *only* need be written once and thereafter could be read > simultaneously by multiple Images. Anyone on the network wanting > store the same source would see the file already exists and have > nothing to do. > Perhaps having many individual files implies abysmal performance, > > Or maybe something similar to Mecurial's reflog format [1] could be > used, one file per class. > > The thing about the Image *only* referring to a method's source by its > content hash would seem to great flexibility in backends to > locate/store that source. Possibly... > * stored as individual files as above > * bundled in a zip file in random order > * a school could configure a database server in Image provided to students > * hashes could be thrown at a service on the Internet > * cached locally with a key-value database like LMDB [2] > * remote replication to multiple internet backup locations > * in an emergency you could throw bundle of hashes as a query to the > mail list and get an adhoc response of individual files. > * Inter-Smalltalk image communication > > Pharo has a stated goal to get rid of the changes file. Changing to > content-hash-addressable method-source seems a logicial step along > that road. Even if the Squeak community doesn't want to go so far as > eliminating the .changes file, can they see value in changing method > source references to be content-hashes rather than indexes into a > particular file? > > [1] http://blog.prasoonshukla.com/mercurial-vs-git-scaling > [2] https://en.wikipedia.org/wiki/Lightning_Memory-Mapped_Database > > > Just having a poke at this, it seems a new form of > CompiledMethodTrailer may need to be defined, being invoked from > CompiledMethod>>sourceCode. CompiledMethodTrailer>>sourceCode would > find the source code based on a content-hash held by the > CompiledMethod. If found, the call to #getSourceFromFile that > accesses the .changes file will be bypassed, and could remain as a > backup. > > cheers -ben > >> >> Dave >> >> >>> >>> Max was running on Pharo, which may or may not be handling changes the >>> same way. I think he may be seeing a different problem from the one I >>> confirmed. >>> >>> So a bit more testing and verification would be in order. I can't look at >>> it now though. >>> >>> Dave >>> >>>> >>>>> On 29-06-2016, at 10:35 AM, Eliot Miranda >>>>> wrote: >>>> {snip much rant} >>>> >>>>> The most obvious place where this is an issue is where two images are >>>>> using the same changes file and think they???re appending. Image A seeks >>>>> to the end of the file, ???writes??? stuff. Image B near-simultaneously >>>>> does the same. Eventually each process gets around to pushing data to >>>>> hardware. Oops! And let???s not dwell too much on the problems possible >>>>> if either process causes a truncation of the file. Oh, wait, I think we >>>>> actually had a problem with that some years ago. >>>>> >>>>> The thing is that this problem bites even if we have a unitary primitive >>>>> that both positions and writes if that primitive is written above a >>>>> substrate that, as unix and stdio streams do, separates positioning from >>>>> writing. The primitive is neat but it simply drives the problem further >>>>> underground. >>>> >>>> >>>> Oh absolutely - we only have real control over a small part of it. It >>>> would probably be worth making use of that where we can. >>>> >>>>> >>>>> A more robust solution might be to position, write, reposition, read, >>>>> and compare, shortening on corruption, and retrying, using exponential >>>>> back-off like ethernet packet transmission. Most of the time this adds >>>>> only the overhead of reading what's written. >>>> >>>> Yes, for anything we want reliable that???s probably a good way. A limit >>>> on the number of retries would probably be smart to stop infinite >>>> recursion. Imagine the fun of an error causing infinite retries of writing >>>> an error log about an infinite recursion. On an infinitely large Beowulf >>>> cluster! >>>> >>>> It???s all yet another example of where software meeting reality leads to >>>> nightmares. >>>> >>>> >>>> tim >>>> -- >>>> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >>>> If it was easy, the hardware people would take care of it. > From smalltalker2 at mac.com Fri Jul 1 08:06:37 2016 From: smalltalker2 at mac.com (John Pfersich) Date: Fri Jul 1 08:06:40 2016 Subject: [Pharo-dev] [squeak-dev] The .changes file should be bound to a single image In-Reply-To: References: <20160629000637.GA61892@shell.msen.com> <20160629124549.GA12105@shell.msen.com> <9E311AF4-321C-421B-AABB-F51F82E1104A@gmail.com> <6071.136.1.1.171.1467223219.squirrel@webmail.msen.com> <20160629230713.GA32310@shell.msen.com> Message-ID: <1163DBAD-B49D-41B8-ACA9-5D261AFE9046@mac.com> Sent from my iPad >> >> Might be better to teach the class, who are learning about Smalltalk >> anyway, about the nature of the changes file..? > > This seemed more of a classroom system administration issue. Actually > in that case, maybe the network executable startup script just copied > both image and changes file to the user's personal area? > > cheers -ben > This is the best idea of all... From Lou at Keystone-Software.com Fri Jul 1 13:14:50 2016 From: Lou at Keystone-Software.com (Louis LaBrunda) Date: Fri Jul 1 13:15:05 2016 Subject: [squeak-dev] A $140 pc for running Squeak References: <81C530DB-6D5B-4394-B571-EE90356D38B9@rowledge.org> Message-ID: <6pqcnbdhjc0f9848q7j62faodv869g8lgd@4ax.com> Hi Tim, Thanks for posting this. Do you know if there is any software that would run on this and work well that can convert speech to text and display it in large type on the screen? My dad is 100 years old (really) and his hearing is all but gone and his vision is poor. If we could speak into a device like this, he could read it and I think he would be able to understand what we are saying. We aren't looking to have long conversations, just get him to understand when we need to tell him something. I think we could do this with an iPad but it is substantially more money. Lou On Thu, 30 Jun 2016 16:32:26 -0700, tim Rowledge wrote: >I just got my pi-top CEED (don?t ask me what that stands for ) and after a few minutes setup - inserting the SD card into the provided Pi3, connecting up a couple of cables, inserting the little plastic-magnet ?feet? etc - I was up and running. > >What on earth is a pi-top CEED you ask? Well, think of a small iMac all-in-one with a quite decent 14? lcd and a pi3 inside. Add your own spare mouse/kbd, plug together, insert power plug (psu provided) and press the Magic Button. A moment later you have what? Err, this is a bit odd looking ah, escape to a normal desktop and all is well. Run some updating to get stuff sorted out a little (the Scratch version definitely needs updating for example) and all is well. > >It?s a Pi3 in a nice case with a nice display, a beefy power supply, a neat way of providing space for some add-ons, a proper power switch and a slightly odd OS wrapper. See www.pi-top.com for more details. > >For US$140! OK, so maybe you have to spend $20 on a mouse & keyboard too. And perhaps you want their speaker unit for another $20. You can get just the lcd/case/pus for $99 if you already have a spare Pi. Given that the Pi 7? touch lcd is $70 on its own, this seems a steal to me. > >I?m planning to use my three in Scratch classes over the summer. > >tim -- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon From commits at source.squeak.org Fri Jul 1 14:32:25 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 1 14:32:26 2016 Subject: [squeak-dev] The Trunk: SystemChangeNotification-Tests-pre.24.mcz Message-ID: Patrick Rein uploaded a new version of SystemChangeNotification-Tests to project The Trunk: http://source.squeak.org/trunk/SystemChangeNotification-Tests-pre.24.mcz ==================== Summary ==================== Name: SystemChangeNotification-Tests-pre.24 Author: pre Time: 1 July 2016, 4:32:20.840983 pm UUID: 3d2acb51-0e7b-1b46-a301-79ea87277a78 Ancestors: SystemChangeNotification-Tests-nice.23 Fixes system notifcation tests to not polute the existing kernel packages with changes by writing new classes into a temporary package =============== Diff against SystemChangeNotification-Tests-nice.23 =============== Item was added: + ----- Method: ChangeHooksTest>>categoryForTestName (in category 'Private-Generation') ----- + categoryForTestName + + ^ self class name select: [:c | c isUppercase ]! Item was added: + ----- Method: ChangeHooksTest>>categoryForTestName1 (in category 'Private-Generation') ----- + categoryForTestName1 + + ^ self categoryForTestName , 1! Item was added: + ----- Method: ChangeHooksTest>>categoryForTestName2 (in category 'Private-Generation') ----- + categoryForTestName2 + + ^ self categoryForTestName , 2! Item was changed: ----- Method: ChangeHooksTest>>classCreationEvent: (in category 'Events-Classes') ----- classCreationEvent: event | classCreated | self addSingleEvent: event. classCreated := Smalltalk classNamed: self newlyCreatedClassName. self assert: classCreated notNil. self assert: ((Smalltalk organization + listAtCategoryNamed: self categoryForTestName1) - listAtCategoryNamed: #'System-Change Notification') includes: self newlyCreatedClassName). self checkEvent: event kind: #Added item: classCreated itemKind: AbstractEvent classKind! Item was changed: ----- Method: ChangeHooksTest>>classRecategorizedEvent: (in category 'Events-Classes') ----- classRecategorizedEvent: event self addSingleEvent: event. self checkEvent: event kind: #Recategorized item: generatedTestClass itemKind: AbstractEvent classKind. + self assert: event oldCategory = self categoryForTestName1! - self assert: event oldCategory = #'System-Change Notification'! Item was changed: ----- Method: ChangeHooksTest>>generateTestClass (in category 'Private-Generation') ----- generateTestClass generatedTestClass := Object subclass: self generatedTestClassName instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' + category: self categoryForTestName1.! - category: 'System-Change Notification'.! Item was changed: ----- Method: ChangeHooksTest>>generateTestClassX (in category 'Private-Generation') ----- generateTestClassX generatedTestClassX := Object subclass: self generatedTestClassNameX instanceVariableNames: 'x' classVariableNames: '' poolDictionaries: '' + category: self categoryForTestName1.! - category: 'System-Change Notification'.! Item was changed: ----- Method: ChangeHooksTest>>tearDown (in category 'Running') ----- tearDown self removeGeneratedTestClasses. ChangeSet newChanges: previousChangeSet. ChangesOrganizer removeChangeSet: testsChangeSet. previousChangeSet := nil. testsChangeSet := nil. capturedEvents := nil. createdMethod := nil. + (PackageOrganizer default packages select: [:packageInfo | {self categoryForTestName1 . self categoryForTestName2} includes: packageInfo packageName ]) + do: [:packageInfo | packageInfo workingCopy unload]. super tearDown! Item was changed: ----- Method: ChangeHooksTest>>testClassCreationEvent (in category 'Testing-Classes') ----- testClassCreationEvent self systemChangeNotifier notify: self ofAllSystemChangesUsing: #classCreationEvent:. Object subclass: self newlyCreatedClassName instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' + category: self categoryForTestName1. - category: 'System-Change Notification'. self checkForOnlySingleEvent! Item was changed: ----- Method: ChangeHooksTest>>testClassRecategorizedEvent1 (in category 'Testing-Classes') ----- testClassRecategorizedEvent1 self systemChangeNotifier notify: self ofAllSystemChangesUsing: #classRecategorizedEvent:. Object subclass: generatedTestClass name instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' + category: self categoryForTestName2. - category: 'Collections-Abstract'. self checkForOnlySingleEvent! Item was changed: ----- Method: ChangeHooksTest>>testClassRecategorizedEvent2 (in category 'Testing-Classes') ----- testClassRecategorizedEvent2 self systemChangeNotifier notify: self ofAllSystemChangesUsing: #classRecategorizedEvent:. + generatedTestClass category: self categoryForTestName2. - generatedTestClass category: 'Collections-Abstract'. self checkForOnlySingleEvent! Item was changed: ----- Method: ChangeHooksTest>>testClassSuperChangedEvent (in category 'Testing-Classes') ----- testClassSuperChangedEvent self systemChangeNotifier notify: self ofAllSystemChangesUsing: #classSuperChangedEvent:. Model subclass: generatedTestClass name instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' + category: self categoryForTestName1. - category: 'System-Change Notification'. self checkForOnlySingleEvent! Item was changed: ----- Method: ChangeHooksTest>>testInstanceVariableCreationEvent1 (in category 'Testing-Instance Variables') ----- testInstanceVariableCreationEvent1 self systemChangeNotifier notify: self ofAllSystemChangesUsing: #instanceVariableCreationEvent:. Object subclass: self generatedTestClassName instanceVariableNames: 'x' classVariableNames: '' poolDictionaries: '' + category: self categoryForTestName1. - category: 'System-Change Notification'. self checkForOnlySingleEvent! Item was changed: ----- Method: ChangeHooksTest>>testInstanceVariableRemovedEvent1 (in category 'Testing-Instance Variables') ----- testInstanceVariableRemovedEvent1 self systemChangeNotifier notify: self ofAllSystemChangesUsing: #instanceVariableRemovedEvent:. Object subclass: generatedTestClassX name instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' + category: self categoryForTestName1. - category: 'System-Change Notification'. self checkForOnlySingleEvent! From commits at source.squeak.org Fri Jul 1 15:14:01 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 1 15:14:01 2016 Subject: [squeak-dev] The Trunk: SystemChangeNotification-Tests-pre.25.mcz Message-ID: Patrick Rein uploaded a new version of SystemChangeNotification-Tests to project The Trunk: http://source.squeak.org/trunk/SystemChangeNotification-Tests-pre.25.mcz ==================== Summary ==================== Name: SystemChangeNotification-Tests-pre.25 Author: pre Time: 1 July 2016, 5:13:56.259983 pm UUID: dc900bb1-8588-4748-bad2-ded098ff30e2 Ancestors: SystemChangeNotification-Tests-pre.24 Implements clean tests for SystemChangeFileTest and isolates a test in ChangeHooksTest =============== Diff against SystemChangeNotification-Tests-pre.24 =============== Item was changed: ----- Method: ChangeHooksTest>>testClassRecategorizedEvent1 (in category 'Testing-Classes') ----- testClassRecategorizedEvent1 + Object + subclass: generatedTestClass name + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: self categoryForTestName1. self systemChangeNotifier notify: self ofAllSystemChangesUsing: #classRecategorizedEvent:. Object subclass: generatedTestClass name instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: self categoryForTestName2. self checkForOnlySingleEvent! Item was changed: + ----- Method: SystemChangeFileTest>>removeTestcourt (in category 'running') ----- - ----- Method: SystemChangeFileTest>>removeTestcourt (in category 'private') ----- removeTestcourt SystemOrganization categories do: [:each | (each beginsWith: self prefixClassCategory) ifTrue: [ + SystemOrganization removeSystemCategory: each]]. - SystemOrganization removeSystemCategory: each. - ]. - ]. + (PackageOrganizer default packages select: [:packageInfo | packageInfo packageName beginsWith: self prefixGeneral ]) + do: [:packageInfo | packageInfo workingCopy unload].! - ! From commits at source.squeak.org Fri Jul 1 15:17:04 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 1 15:17:05 2016 Subject: [squeak-dev] The Trunk: Tests-pre.345.mcz Message-ID: Patrick Rein uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-pre.345.mcz ==================== Summary ==================== Name: Tests-pre.345 Author: pre Time: 1 July 2016, 5:16:50.216983 pm UUID: 3e713b0a-7b01-0149-bf8c-e30c09602d60 Ancestors: Tests-pre.344 Cleans up after ChangeSetClassChangesTest =============== Diff against Tests-pre.344 =============== Item was changed: ----- Method: ChangeSetClassChangesTest>>tearDown (in category 'running') ----- tearDown + | deleteMePackage | (Smalltalk classNamed: #JunkClass) ifNotNil: [:c | c removeFromSystem: true]. SystemOrganization removeCategory: #'DeleteMe-1'. SystemOrganization removeCategory: #'DeleteMe-2'. + ChangeSet current removeClassChanges: 'JunkClass'. + deleteMePackage := PackageOrganizer default packageNamed: 'DeleteMe' ifAbsent: [nil]. + deleteMePackage ifNotNil: [deleteMePackage workingCopy unload].! - ChangeSet current removeClassChanges: 'JunkClass' - - ! From commits at source.squeak.org Fri Jul 1 15:50:28 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 1 15:50:32 2016 Subject: [squeak-dev] The Trunk: Traits-pre.307.mcz Message-ID: Patrick Rein uploaded a new version of Traits to project The Trunk: http://source.squeak.org/trunk/Traits-pre.307.mcz ==================== Summary ==================== Name: Traits-pre.307 Author: pre Time: 20 November 2015, 2:58:26.562 pm UUID: f0955b2d-775c-4862-85b9-5d6e616cd2e4 Ancestors: Traits-eem.306 This fixes http://bugs.squeak.org/view.php?id=7767 which is about the - and @ operator of Trait compositions ignoring brackets. This implementation uses the normal left to right evaluation order of Smalltalk to avoid confusions about the way trait composition expressions are evaluated. =============== Diff against Traits-eem.306 =============== Item was changed: ----- Method: TraitAlias>>printOn: (in category 'operations') ----- printOn: s "Answer the trait composition string (used for class definitions)" + s nextPutAll: '('. s nextPutAll: subject asString. s nextPutAll: ' @ {'. aliases do:[:assoc| s print: assoc] separatedBy:[s nextPutAll:'. ']. s nextPutAll: '}'. + s nextPutAll: ')'.! - ! Item was changed: ----- Method: TraitComposition>>- (in category 'converting') ----- - anArray - "the modifier operators #@ and #- bind stronger than +. - Thus, #@ or #- sent to a sum will only affect the most right summand" + self updateTraits: (self traitsCollect: [:aTrait | aTrait - anArray ])! - self addLast: (self removeLast - anArray)! Item was changed: ----- Method: TraitComposition>>@ (in category 'converting') ----- @ anArrayOfAssociations + + self updateTraits: (self traitsCollect: [:aTrait | aTrait @ anArrayOfAssociations ])! - "the modifier operators #@ and #- bind stronger than +. - Thus, #@ or #- sent to a sum will only affect the most right summand" - - self addLast: (self removeLast @ anArrayOfAssociations)! Item was added: + ----- Method: TraitComposition>>traitsCollect: (in category 'accessing') ----- + traitsCollect: aBlock + ^self collect: [:each| each traitsDo: aBlock]! Item was changed: ----- Method: TraitComposition>>traitsDo: (in category 'accessing') ----- traitsDo: aBlock + ^self do: [:each| each traitsDo: aBlock]! - ^self do:[:each| each traitsDo: aBlock]! Item was added: + ----- Method: TraitComposition>>updateTraits: (in category 'converting') ----- + updateTraits: aCollection + + self + removeAll; + addAll: aCollection! Item was changed: ----- Method: TraitExclusion>>printOn: (in category 'composition') ----- printOn: aStream "Answer the trait composition string (used for class definitions)" + aStream nextPutAll: '('. aStream nextPutAll: subject asString. aStream nextPutAll: ' - {'. exclusions asArray sort do:[:exc| aStream store: exc] separatedBy:[aStream nextPutAll: '. ']. + aStream nextPutAll: '}'. + aStream nextPutAll: ')'.! - aStream nextPutAll: '}'.! From commits at source.squeak.org Fri Jul 1 15:50:51 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 1 15:50:53 2016 Subject: [squeak-dev] The Trunk: TraitsTests-pre.15.mcz Message-ID: Patrick Rein uploaded a new version of TraitsTests to project The Trunk: http://source.squeak.org/trunk/TraitsTests-pre.15.mcz ==================== Summary ==================== Name: TraitsTests-pre.15 Author: pre Time: 20 November 2015, 3:00:52.59 pm UUID: 3faad7d5-71f7-48d2-9ccb-4162d332c62a Ancestors: TraitsTests-nice.14 Updates the Traits tests to reflect the changes to the trait composition operator evaluation order =============== Diff against TraitsTests-nice.14 =============== Item was changed: ----- Method: ClassTraitTest>>testConflictsAliasesAndExclusions (in category 'testing') ----- testConflictsAliasesAndExclusions "conflict" self t1 classTrait compile: 'm2ClassSide: x ^99' classified: 'mycategory'. self assert: (self t1 classTrait includesLocalSelector: #m2ClassSide:). self assert: (self t5 classTrait >> #m2ClassSide:) isConflict. self assert: (self c2 class >> #m2ClassSide:) isConflict. "exclusion and alias" self assert: self t5 classSide traitComposition asString = 'T1 classTrait + T2 classTrait'. self t5 classSide uses: (self t1 classTrait @ { (#m2ClassSideAlias1: -> #m2ClassSide:) } + + (self t2 classTrait @ { (#m2ClassSideAlias2: -> #m2ClassSide:) } - { #m2ClassSide: })). - + self t2 classTrait) @ { (#m2ClassSideAlias2: -> #m2ClassSide:) } - - { #m2ClassSide: }. self deny: (self t5 classTrait >> #m2ClassSide:) isConflict. self deny: (self c2 class >> #m2ClassSide:) isConflict. self assert: (self c2 m2ClassSideAlias1: 13) = 99. self assert: (self c2 m2ClassSideAlias2: 13) = 13! Item was changed: ----- Method: PureBehaviorTest>>testChangeSuperclass (in category 'testing-applying trait composition') ----- testChangeSuperclass "self run: #testChangeSuperclass" "Test that when the superclass of a class is changed the non-local methods of the class sending super are recompiled to correctly store the new superclass." | aC2 newSuperclass | aC2 := self c2 new. "C1 is current superclass of C2" self assert: aC2 m51. self assert: self c2 superclass == self c1. self deny: (self c2 localSelectors includes: #m51). self deny: (self c2 >> #m52) == (self t5 >> #m52). "no sharing!!" + self assert: self c2 traitCompositionString = '(T5 - {#m11})'. - self assert: self c2 traitCompositionString = 'T5 - {#m11}'. self assert: self c2 selectors sort = #(bar foo m12 m13 m21 m22 m51 m52 m53). self assert: self c2 localSelectors sort = #(bar foo). "change superclass of C2 from C1 to X" newSuperclass := self createClassNamed: #X superclass: Object uses: {}. newSuperclass subclass: self c2 name uses: self c2 traitComposition instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: self c2 category. self assert: self c2 superclass == newSuperclass. newSuperclass compile: 'foo ^17'. self assert: aC2 m51 = 17. self deny: (self c2 localSelectors includes: #m51). self c2 compile: 'm51 ^19'. self assert: aC2 m51 = 19. self deny: (self c2 >> #m52) == (self t5 >> #m52). "no sharing!!" + self assert: self c2 traitCompositionString = '(T5 - {#m11})'. - self assert: self c2 traitCompositionString = 'T5 - {#m11}'. self assert: self c2 selectors sort = #(bar foo m12 m13 m21 m22 m51 m52 m53). self assert: self c2 localSelectors sort = #(bar foo m51). "change superclass of C2 back to C1" self c1 subclass: self c2 name uses: self c2 traitComposition instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: self c2 category. self assert: (aC2 m51 = 19). self assert: self c2 superclass == self c1. self assert: (self c2 localSelectors includes: #m51). self deny: (self c2 >> #m52) == (self t5 >> #m52). "no sharing!!" + self assert: self c2 traitCompositionString = '(T5 - {#m11})'. - self assert: self c2 traitCompositionString = 'T5 - {#m11}'. self assert: self c2 selectors sort = #(bar foo m12 m13 m21 m22 m51 m52 m53). self assert: self c2 localSelectors sort = #(bar foo m51). ! Item was changed: ----- Method: PureBehaviorTest>>testPropagationWhenTraitCompositionModifications (in category 'testing-applying trait composition') ----- testPropagationWhenTraitCompositionModifications "Test that the propagation mechanism works when setting new traitCompositions." self assert: self c2 methodDict size = 9. "2 + (3+(3+2))-1" "removing methods" self createTraitNamed: #T5 + uses: self t1 + (self t2 - { #m21. #m22 }). - uses: self t1 + self t2 - { #m21. #m22 }. self assert: self c2 methodDict size = 7. "adding methods" self createTraitNamed: #T2 uses: self t3. self assert: self c2 methodDict size = 10. self assert: (self c2 methodDict keys includesAllOf: #(#m31 #m32 #m33 ))! Item was changed: ----- Method: PureBehaviorTest>>testReshapeClass (in category 'testing-applying trait composition') ----- testReshapeClass "self run: #testReshapeClass" "Ensure that reshaping a class has no impact on its traits" + self assert: self c2 traitCompositionString = '(T5 - {#m11})'. - self assert: self c2 traitCompositionString = 'T5 - {#m11}'. self assert: self c2 selectors sort = #(bar foo m12 m13 m21 m22 m51 m52 m53). self assert: self c2 localSelectors sort = #(bar foo). self c2 addInstVarName: 'foobar'. + self assert: self c2 traitCompositionString = '(T5 - {#m11})'. - self assert: self c2 traitCompositionString = 'T5 - {#m11}'. self assert: self c2 selectors sort = #(bar foo m12 m13 m21 m22 m51 m52 m53). self assert: self c2 localSelectors sort = #(bar foo). self c2 removeInstVarName: 'foobar'. + self assert: self c2 traitCompositionString = '(T5 - {#m11})'. - self assert: self c2 traitCompositionString = 'T5 - {#m11}'. self assert: self c2 selectors sort = #(bar foo m12 m13 m21 m22 m51 m52 m53). self assert: self c2 localSelectors sort = #(bar foo). ! Item was changed: ----- Method: TraitCompositionTest>>testInvalidComposition (in category 'testing-basic') ----- testInvalidComposition self shouldnt: [self t1 @ { (#a -> #b) } @ { (#x -> #y) }] raise: TraitCompositionException. self shouldnt: [(self t1 + self t2) @ { (#a -> #b) } @ { (#x -> #y) }] raise: TraitCompositionException. self shouldnt: [self t1 - { #a } - { #b }] raise: TraitCompositionException. self shouldnt: [self t1 + self t2 - { #a } - { #b }] raise: TraitCompositionException. self should: [(self t1 - { #x }) @ { (#a -> #b) }] raise: TraitCompositionException. + self should: [(self t1 + (self t2 - { #x } @ { (#a -> #b) }))] - self should: [(self t1 + self t2 - { #x }) @ { (#a -> #b) }] raise: TraitCompositionException. self should: [self t1 + self t1] raise: TraitCompositionException. self should: [(self t1 + self t2) @ { (#a -> #b) } + self t1] raise: TraitCompositionException. self should: [self t1 @ { (#a -> #m11). (#a -> #m12) }] raise: TraitCompositionException. self should: [self t1 @ { (#a -> #m11). (#b -> #a) }] raise: TraitCompositionException! Item was changed: ----- Method: TraitCompositionTest>>testPrinting (in category 'testing-basic') ----- testPrinting | composition1 composition2 | + composition1 := ((self t1 - { #a } + (self t2 @ { (#z -> #c) } - { #b. #c })) + + (self t3 - { #d. #e }) + + (self t4 @ { (#x -> #a). (#y -> #b) })). + composition2 := (self t4 @ { (#x -> #a). (#y -> #b) }) + (self t1 - { #a }) + + (self t3 - { #d. #e }) + + (self t2 - { #b. #c }). - composition1 := ((self t1 - { #a } + self t2) @ { (#z -> #c) } - { #b. #c } - + self t3 - { #d. #e } - + self t4) @ { (#x -> #a). (#y -> #b) }. - composition2 := self t4 @ { (#x -> #a). (#y -> #b) } + self t1 - { #a } - + self t3 - { #d. #e } - + self t2 - { #b. #c }. self assertPrints: composition1 printString + like: '(T1 - {#a}) + ((T2 @ {#z->#c}) - {#b. #c}) + (T3 - {#d. #e}) + (T4 @ {#x->#a. #y->#b})'. - like: 'T1 - {#a} + T2 @ {#z->#c} - {#b. #c} + T3 - {#d. #e} + T4 @ {#x->#a. #y->#b}'. self assertPrints: composition2 printString + like: '(T4 @ {#x->#a. #y->#b}) + (T1 - {#a}) + (T3 - {#d. #e}) + (T2 - {#b. #c})'! - like: 'T4 @ {#x->#a. #y->#b} + T1 - {#a} + T3 - {#d. #e} + T2 - {#b. #c}'! Item was changed: ----- Method: TraitFileOutTest>>setUp (in category 'running') ----- setUp super setUp. SystemOrganization addCategory: self categoryName. td := self createTraitNamed: #TD uses: {}. td compile: 'd' classified: #cat1. tc := self createTraitNamed: #TC uses: td. tc compile: 'c' classified: #cat1. tb := self createTraitNamed: #TB uses: td. tb compile: 'b' classified: #cat1. + ta := self createTraitNamed: #TA uses: tb + ((tc @ {#cc->#c}) - {#c}). - ta := self createTraitNamed: #TA uses: tb + tc @ {#cc->#c} - {#c}. ta compile: 'a' classified: #cat1. ca := self createClassNamed: #CA superclass: Object uses: {}. ca compile: 'ca' classified: #cat1. cb := self createClassNamed: #CB superclass: ca uses: ta. cb compile: 'cb' classified: #cat1. "make the class of cb also use tc:" cb class uses: ta classTrait + tc instanceVariableNames: ''.! Item was changed: ----- Method: TraitFileOutTest>>testFileOutCategory (in category 'testing') ----- testFileOutCategory "File out whole system category, delete all classes and traits and then file them in again." "self run: #testFileOutCategory" SystemOrganization fileOutCategory: self categoryName. SystemOrganization removeSystemCategory: self categoryName. self deny: (Smalltalk globals keys includesAnyOf: #(CA CB TA TB TC TD)). self fileIn: self categoryName , '.st'.. self assert: (Smalltalk globals keys includesAllOf: #(CA CB TA TB TC TD)). ta := Smalltalk at: #TA. self assert: (ta isKindOf: Trait). + self assert: 'TB + ((TC @ {#cc->#c}) - {#c})' equals: ta traitComposition asString. - self assert: 'TB + TC @ {#cc->#c} - {#c}' equals: ta traitComposition asString. self assert: (ta methodDict keys includesAllOf: #(a b cc)). cb := Smalltalk at: #CB. self assert: (cb isKindOf: Class). self assert: 'TA' equals: cb traitComposition asString. self assert: (cb methodDict keys includesAllOf: #(cb a b cc)). "test classSide traitComposition of CB" self assert: 'TA classTrait + TC' equals: cb classSide traitComposition asString. self assert: (cb classSide methodDict keys includesAllOf: #(d c)) ! Item was changed: ----- Method: TraitFileOutTest>>testFileOutTrait (in category 'testing') ----- testFileOutTrait "fileOut trait T6, remove it from system and then file it in again" "self run: #testFileOutTrait" | fileName | self t6 compile: 'localMethod: argument ^argument'. self t6 classSide compile: 'localClassSideMethod: argument ^argument'. self t6 fileOut. fileName := self t6 asString , '.st'. self resourceClassesAndTraits remove: self t6. self t6 removeFromSystem. self fileIn: fileName. self assert: (Smalltalk includesKey: #T6). TraitsResource current t6: (Smalltalk at: #T6). self resourceClassesAndTraits add: self t6. self assert: (self t6 isKindOf: Trait). + self assert: 'T1 + (T2 @ {#m22Alias->#m22})' equals: self t6 traitComposition asString. - self assert: 'T1 + T2 @ {#m22Alias->#m22}' equals: self t6 traitComposition asString. self assert: (self t6 methodDict keys includesAllOf: #( #localMethod: #m11 #m12 #m13 #m21 #m22 #m22Alias )). self assert: 2 equals: self t6 classSide methodDict size. self assert: (self t6 classSide methodDict keys includes: #localClassSideMethod:) description: 'Missing selector #localClassSideMethod:'. self assert: (self t6 classSide methodDict keys includes: #m2ClassSide:) description: 'Missing selector #m2ClassSide:'.! Item was changed: ----- Method: TraitTest>>testPrinting (in category 'testing') ----- testPrinting self assertPrints: self t6 definition like: 'Trait named: #T6 + uses: T1 + (T2 @ {#m22Alias->#m22}) - uses: T1 + T2 @ {#m22Alias->#m22} category: ''TraitsTests-Kernel'''! Item was changed: ----- Method: TraitsResource>>setUp (in category 'as yet unclassified') ----- setUp "Please note, that most tests rely on this setup of traits and classes - and that especially the order of the definitions matters." "SetUpCount := SetUpCount + 1." dirty := false. SystemChangeNotifier uniqueInstance doSilently: [self t1: (self createTraitNamed: #T1 uses: { }). self t1 comment: 'I am the trait T1'. self t2: (self createTraitNamed: #T2 uses: { }). self t2 compile: 'm21 ^21' classified: #cat1. self t2 compile: 'm22 ^22' classified: #cat2. self t2 classSide compile: 'm2ClassSide: a ^a'. self t3: (self createTraitNamed: #T3 uses: { }). self t3 compile: 'm31 ^31' classified: #cat1. self t3 compile: 'm32 ^32' classified: #cat2. self t3 compile: 'm33 ^33' classified: #cat3. self t4: (self createTraitNamed: #T4 uses: { (self t1). (self t2) }). self t4 compile: 'm11 ^41' classified: #catX. "overrides T1>>m11" self t4 compile: 'm42 ^42' classified: #cat2. self t5: (self createTraitNamed: #T5 uses: self t1 + self t2). self t5 compile: 'm51 ^super foo' classified: #cat1. self t5 compile: 'm52 ^ self class bar' classified: #cat1. self t5 compile: 'm53 ^ self class bar' classified: #cat1. self t6: (self createTraitNamed: #T6 + uses: (self t1 + (self t2 @ { (#m22Alias -> #m22) }))). - uses: (self t1 + self t2) @ { (#m22Alias -> #m22) }). self c1: (self createClassNamed: #C1 superclass: Object uses: { }). self c1 compile: 'foo ^true' classified: #accessing. self t1 compile: 'm11 ^11' classified: #cat1. self t1 compile: 'm12 ^12' classified: #cat2. self t1 compile: 'm13 ^self m12' classified: #cat3. self c2: (self createClassNamed: #C2 superclass: self c1 uses: self t5 - { #m11 }). self c2 compile: 'foo ^false' classified: #private. self c2 compile: 'bar ^self foo' classified: #private. self setUpTrivialRequiresFixture. self setUpTwoLevelRequiresFixture. self setUpTranslatingRequiresFixture]. SystemChangeNotifier uniqueInstance notify: self ofAllSystemChangesUsing: #codeChangedEvent:! From tim at rowledge.org Fri Jul 1 17:56:03 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Jul 1 17:55:51 2016 Subject: [squeak-dev] A $140 pc for running Squeak In-Reply-To: <6pqcnbdhjc0f9848q7j62faodv869g8lgd@4ax.com> References: <81C530DB-6D5B-4394-B571-EE90356D38B9@rowledge.org> <6pqcnbdhjc0f9848q7j62faodv869g8lgd@4ax.com> Message-ID: > On 01-07-2016, at 6:14 AM, Louis LaBrunda wrote: > Do you know if there is any software that would run on this and work > well that can convert speech to text and display it in large type on the screen? There is a fair bit of text to speech and vice versa on the Pi. I have no direct experience with any of them and the nearest I?ve got is pondering using something like www.festvox.org stuff to add actual speech to Scratch. Some googling for ?raspberrypi text to speech? offers quite a few interesting looking options - ?Jasper? has been highlighted on the pi blog a couple of times. I can imagine running something like that and using it to provide the text for Squeak to display. A Pi has plenty of power these days, and with 4 cores at 1.2GHz we really can?t complain. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim "Bother!" said Pooh, searching for the $10m winning lottery ticket. From tim at rowledge.org Fri Jul 1 17:58:41 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Jul 1 17:58:15 2016 Subject: [squeak-dev] A $140 pc for running Squeak In-Reply-To: References: <81C530DB-6D5B-4394-B571-EE90356D38B9@rowledge.org> Message-ID: > On 30-06-2016, at 11:13 PM, Kjell Godo wrote: > > that's very nice > > personally i want just a small > pocket sized box with more RAM + > HDMI , USB , Ethernet , power > like a pocket Linux PC I think we call them ?cellphones? these days? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim I am still waiting for the advent of the computer science groupie. From Lou at Keystone-Software.com Fri Jul 1 19:58:24 2016 From: Lou at Keystone-Software.com (Louis LaBrunda) Date: Fri Jul 1 19:58:44 2016 Subject: [squeak-dev] A $140 pc for running Squeak References: <81C530DB-6D5B-4394-B571-EE90356D38B9@rowledge.org> <6pqcnbdhjc0f9848q7j62faodv869g8lgd@4ax.com> Message-ID: <68idnbl289tl9inhbr594h1l31l9hq75di@4ax.com> Hi Tim, Thanks for the response. What we really need is speech to text, kind of like what people do when they talk to Siri and the text is typed into a file. If we could get short sentences displayed in large text my dad could read it and know what we are talking about. We try to write things down for him but it is hard to write not too big, not too small and not too skinny so he can read it. We have tried typing on a cheap tablet (too old and slow for speech to text) and he can read it but it takes too long to type things. I think an iPad would work (a lady at the VA tried it on a smart phone which got the text right but it was too small for him to read) so if the Raspberry 3 is fast enough to convert speech to text, that would be great. Thanks again, Lou >> On 01-07-2016, at 6:14 AM, Louis LaBrunda wrote: >> Do you know if there is any software that would run on this and work >> well that can convert speech to text and display it in large type on the screen? > >There is a fair bit of text to speech and vice versa on the Pi. I have no direct experience with any of them and the nearest I?ve got is pondering using something like www.festvox.org stuff to add actual speech to Scratch. Some googling for ?raspberrypi text to speech? offers quite a few interesting looking options - ?Jasper? has been highlighted on the pi blog a couple of times. > >I can imagine running something like that and using it to provide the text for Squeak to display. A Pi has plenty of power these days, and with 4 cores at 1.2GHz we really can?t complain. > >tim -- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon From tim at rowledge.org Fri Jul 1 20:59:54 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Jul 1 20:59:41 2016 Subject: [squeak-dev] A $140 pc for running Squeak In-Reply-To: <68idnbl289tl9inhbr594h1l31l9hq75di@4ax.com> References: <81C530DB-6D5B-4394-B571-EE90356D38B9@rowledge.org> <6pqcnbdhjc0f9848q7j62faodv869g8lgd@4ax.com> <68idnbl289tl9inhbr594h1l31l9hq75di@4ax.com> Message-ID: <301AA182-BDF8-437D-816D-575006B4F67A@rowledge.org> I managed to be pretty unclear about what Jasper is - which is to say a speech input system. https://jasperproject.github.io tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim No single raindrop believes it is to blame for the flood From Lou at Keystone-Software.com Fri Jul 1 21:20:13 2016 From: Lou at Keystone-Software.com (Louis LaBrunda) Date: Fri Jul 1 21:20:27 2016 Subject: [squeak-dev] A $140 pc for running Squeak References: <81C530DB-6D5B-4394-B571-EE90356D38B9@rowledge.org> <6pqcnbdhjc0f9848q7j62faodv869g8lgd@4ax.com> <68idnbl289tl9inhbr594h1l31l9hq75di@4ax.com> <301AA182-BDF8-437D-816D-575006B4F67A@rowledge.org> Message-ID: Thanks Tim, I will check it out. Lou On Fri, 1 Jul 2016 13:59:54 -0700, tim Rowledge wrote: >I managed to be pretty unclear about what Jasper is - which is to say a speech input system. > >https://jasperproject.github.io > >tim -- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon From squeaklist at gmail.com Fri Jul 1 21:28:51 2016 From: squeaklist at gmail.com (Kjell Godo) Date: Fri Jul 1 21:28:55 2016 Subject: [squeak-dev] A $140 pc for running Squeak In-Reply-To: References: <81C530DB-6D5B-4394-B571-EE90356D38B9@rowledge.org> Message-ID: Yes On Friday, July 1, 2016, tim Rowledge wrote: > > > On 30-06-2016, at 11:13 PM, Kjell Godo > wrote: > > > > that's very nice > > > > personally i want just a small > > pocket sized box with more RAM + > > HDMI , USB , Ethernet , power > > like a pocket Linux PC > > I think we call them ?cellphones? these days? > > > tim > -- > tim Rowledge; tim@rowledge.org ; http://www.rowledge.org/tim > I am still waiting for the advent of the computer science groupie. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160701/f782affc/attachment.htm From commits at source.squeak.org Fri Jul 1 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 1 21:55:03 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160701215502.3228.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-June/068243.html Name: Monticello-cmm.634 Ancestors: Monticello-kfr.633 Update client-side Monticello history access. Soon, any properly configured HTTP server can provide MC history, not just trunk. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068244.html Name: SystemChangeNotification-Tests-pre.24 Ancestors: SystemChangeNotification-Tests-nice.23 Fixes system notifcation tests to not polute the existing kernel packages with changes by writing new classes into a temporary package ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068245.html Name: SystemChangeNotification-Tests-pre.25 Ancestors: SystemChangeNotification-Tests-pre.24 Implements clean tests for SystemChangeFileTest and isolates a test in ChangeHooksTest ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068246.html Name: Tests-pre.345 Ancestors: Tests-pre.344 Cleans up after ChangeSetClassChangesTest ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068247.html Name: Traits-pre.307 Ancestors: Traits-eem.306 This fixes http://bugs.squeak.org/view.php?id=7767 which is about the - and @ operator of Trait compositions ignoring brackets. This implementation uses the normal left to right evaluation order of Smalltalk to avoid confusions about the way trait composition expressions are evaluated. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068248.html Name: TraitsTests-pre.15 Ancestors: TraitsTests-nice.14 Updates the Traits tests to reflect the changes to the trait composition operator evaluation order ============================================= From squeaklist at gmail.com Fri Jul 1 22:20:43 2016 From: squeaklist at gmail.com (Kjell Godo) Date: Fri Jul 1 22:20:46 2016 Subject: [squeak-dev] A $140 pc for running Squeak In-Reply-To: References: <81C530DB-6D5B-4394-B571-EE90356D38B9@rowledge.org> Message-ID: i have a Windows 10 PC that is the size of a cellphone actually it's smaller but heavier and runs hot it has WIFI HDMI Ethernet and USB it's the only one with Ethernet i could find i haven't looked for a Linux one yet if i could get one with the 3 ports HDMI Ethernet USB if it could be a rasberry pi with Squeak and Scratch that could be nice would that be nice? or would just straight Linux be best i guess i could just stick Linux on the Windows 10 device And squeak and scratch or anything else so I've got the ports i like HDMI Ethernet USB in this device and i can stick Linux squeak scratch on there lots of different ways so i guess you just get the ports you like and then you can stick anything else on there you want it doesn't have to remain Windows 10 i would like to make a tomatoe growing robot that hanging tomato growing unit has been sitting there for a decade unopened we don't have enough sunlight to make it work grow light i guess just a rasberry pi in a plastic box would work for that if that could connect to a HDMI Ethernet USB device via Ethernet could that work? would that be good? is there some other way? that people use can squeak/scratch talk to squeak/scratch via Ethernet ? wifi? so i guess i could use one of these $140 piTops to run the tomatoe robot but i kind of think i would rather have a pocket pi Linux running a monitor and keyboard and just run the Ethernet cable over there to the robot every now and again or wifi to it i guess but we seem to get a lot of wifi interference probably connecting piTop to a pocket Linux or even a pocket Windows via wifi or USB or Ethernet using sockets would be easiest yes it's the communication part i have never tried yet sockets? and it would be so cool maybe i could even get my wife in on it she did Smalltalk in college before she entered into the dark side i don't know the mechanics but i guess i have access to a kid who knows that so basically it's just a failure to communicate that stops it On Friday, July 1, 2016, Kjell Godo wrote: > Yes > > On Friday, July 1, 2016, tim Rowledge > wrote: > >> >> > On 30-06-2016, at 11:13 PM, Kjell Godo wrote: >> > >> > that's very nice >> > >> > personally i want just a small >> > pocket sized box with more RAM + >> > HDMI , USB , Ethernet , power >> > like a pocket Linux PC >> >> I think we call them ?cellphones? these days? >> >> >> tim >> -- >> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >> I am still waiting for the advent of the computer science groupie. >> >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160701/c2ec0aa5/attachment.htm From tim at rowledge.org Fri Jul 1 22:32:18 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Jul 1 22:31:55 2016 Subject: [squeak-dev] A $140 pc for running Squeak In-Reply-To: References: <81C530DB-6D5B-4394-B571-EE90356D38B9@rowledge.org> Message-ID: <249E2945-5E6B-4CAD-A603-17F0F59A1ACD@rowledge.org> Err, Kjell, you know that you can buy *just* a Pi for US$35 right? And that it has hdmi/usb*4/ethernet/wifi/bt ? And Raspbian is a version of Debian, with Scratch provided and Squeak supported within the All-in-One package? The Pi-top is a nice box-with-display to put it in, that?s all. You can get a nice 7? lcd screen for it if you want a local display that is smaller. And many, many cases are on the market. And you can use xrdp etc to have it headless with the UI on another machine. I?m fairly sure I?ve seen a setup like you seem to want described on the www.raspberrypi.org site. Take a look. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: PIC: Permute Instruction Codes From btc at openinworld.com Sat Jul 2 07:29:02 2016 From: btc at openinworld.com (Ben Coman) Date: Sat Jul 2 07:29:26 2016 Subject: [squeak-dev] A $140 pc for running Squeak In-Reply-To: <68idnbl289tl9inhbr594h1l31l9hq75di@4ax.com> References: <81C530DB-6D5B-4394-B571-EE90356D38B9@rowledge.org> <6pqcnbdhjc0f9848q7j62faodv869g8lgd@4ax.com> <68idnbl289tl9inhbr594h1l31l9hq75di@4ax.com> Message-ID: On Sat, Jul 2, 2016 at 3:58 AM, Louis LaBrunda wrote: > Hi Tim, > > Thanks for the response. What we really need is speech to text, kind of like what people do > when they talk to Siri and the text is typed into a file. If we could get short sentences > displayed in large text my dad could read it and know what we are talking about. We try to > write things down for him but it is hard to write not too big, not too small and not too skinny > so he can read it. We have tried typing on a cheap tablet (too old and slow for speech to > text) and he can read it but it takes too long to type things. I think an iPad would work > (a lady at the VA tried it on a smart phone which got the text right but it was too small for him > to read) Have you tried connecting such a smart phone to larger screen via hdmi? Then you could also use the build in camera for things like this... http://www.assistireland.ie/eng/Information/Information_Sheets/Apps_for_People_with_Disabilities_and_Older_People.html#Apps for People with Visual Impairments cheers -ben > so if the Raspberry 3 is fast enough to convert speech to text, that would be great. > > Thanks again, Lou > > >>> On 01-07-2016, at 6:14 AM, Louis LaBrunda wrote: >>> Do you know if there is any software that would run on this and work >>> well that can convert speech to text and display it in large type on the screen? >> >>There is a fair bit of text to speech and vice versa on the Pi. I have no direct experience with any of them and the nearest I?ve got is pondering using something like www.festvox.org stuff to add actual speech to Scratch. Some googling for ?raspberrypi text to speech? offers quite a few interesting looking options - ?Jasper? has been highlighted on the pi blog a couple of times. >> >>I can imagine running something like that and using it to provide the text for Squeak to display. A Pi has plenty of power these days, and with 4 cores at 1.2GHz we really can?t complain. >> >>tim > -- > Louis LaBrunda > Keystone Software Corp. > SkypeMe callto://PhotonDemon > > From maxleske at gmail.com Sat Jul 2 08:28:54 2016 From: maxleske at gmail.com (Max Leske) Date: Sat Jul 2 08:28:59 2016 Subject: [Pharo-dev] [squeak-dev] The .changes file should be bound to a single image In-Reply-To: <5776cb81.f722ed0a.37a63.ffffae42SMTPIN_ADDED_MISSING@mx.google.com> References: <5776cb81.f722ed0a.37a63.ffffae42SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: It?s nice to see the enthusiasm (both pro and con) on this issue. I just want to clarify that it has nothing to do with a class room setting, where the changes file is being shared or copied so students have access. I have run into the corrupted .changes file problem myself a couple of times for two reasons mainly: a) I?ve done a lot of work but need to check something against code that wasn?t modified (and no, checking package changes in Monticello wouldn?t help in the case I?m thinking of. Imagine for example a huge refactoring across multiple packages). So I open a second copy of the image. I keep both images open because its convenient but at some point I accidentally make a change in the wrong image. Now I?m screwed. b) I forgot that I already had the image running (e.g. minimised). I start a fresh copy and work on it until I realise that some of my method sources are broken. Again: screwed. Another thing I want to mention is that the semantics of flush depend on the operating / file system (I have experienced this first hand between Linux (ext4) and OS X (HSF+)). Just because you?ve flushed you?re buffer doesn?t mean that the contents have actually been written to the file. So while it may be true that there is a #flush missing somewhere I would not expect that adding the #flush will solve the problem entirely (which is one reason for proposing a locking mechanism in the first place). Cheers, Max From Lou at Keystone-Software.com Sat Jul 2 12:43:18 2016 From: Lou at Keystone-Software.com (Louis LaBrunda) Date: Sat Jul 2 12:43:28 2016 Subject: [squeak-dev] A $140 pc for running Squeak References: <81C530DB-6D5B-4394-B571-EE90356D38B9@rowledge.org> <6pqcnbdhjc0f9848q7j62faodv869g8lgd@4ax.com> <68idnbl289tl9inhbr594h1l31l9hq75di@4ax.com> Message-ID: Hi Ben, Thanks for the suggestion. Unfortunately no one in the household has a smart phone capable of doing the speech to text part. It was a nurse at the veterans administration that gave that a try. I think an iPad would work but cost is part of the equation. I'm exploring options to find the least expensive solution that will work. Lou On Sat, 2 Jul 2016 15:29:02 +0800, Ben Coman wrote: >Have you tried connecting such a smart phone to larger screen via >hdmi? Then you could also use the build in camera for things like >this... >http://www.assistireland.ie/eng/Information/Information_Sheets/Apps_for_People_with_Disabilities_and_Older_People.html#Apps >for People with Visual Impairments > >cheers -ben -- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon From bernhard at pieber.com Sat Jul 2 13:59:13 2016 From: bernhard at pieber.com (Bernhard Pieber) Date: Sat Jul 2 13:59:18 2016 Subject: [squeak-dev] Stable VMs now that we use git? Message-ID: Dear Squeakers, I think it is great that VM development is now on GitHub. Congratulations and thank for all the hard work. I saw that there is a download button that points to the latest build artifacts on Bintray. I assume these are not necessarily considered to be stable, or are they? So the latest stable VMs would still be those in http://www.mirandabanda.org/files/Cog/VM/VM.r3732/? Cheers, Bernhard From lists at fniephaus.com Sat Jul 2 14:31:33 2016 From: lists at fniephaus.com (Fabio Niephaus) Date: Sat Jul 2 14:31:47 2016 Subject: [squeak-dev] Stable VMs now that we use git? In-Reply-To: References: Message-ID: That's correct. We haven't released a stable version with the new Git infrastructure yet. Talking about which: @Eliot, when do you usually release stable versions? And what is your criteria for "stable"? Best, Fabio -- On Sat, Jul 2, 2016 at 3:59 PM Bernhard Pieber wrote: > Dear Squeakers, > > I think it is great that VM development is now on GitHub. Congratulations > and thank for all the hard work. > > I saw that there is a download button that points to the latest build > artifacts on Bintray. I assume these are not necessarily considered to be > stable, or are they? > > So the latest stable VMs would still be those in > http://www.mirandabanda.org/files/Cog/VM/VM.r3732/? > > Cheers, > Bernhard > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160702/082740d7/attachment.htm From bernhard at pieber.com Sat Jul 2 14:58:28 2016 From: bernhard at pieber.com (Bernhard Pieber) Date: Sat Jul 2 14:58:34 2016 Subject: [squeak-dev] Problems creating a fresh trunk image (on Mac) Message-ID: <39BA8A0B-88E4-41B7-A8C0-0F3F26262D5C@pieber.com> Dear Squeakers, I want to make myself a pristine trunk image and ran into a problem. I am on a Mac running OS X El Capitan 10.11.5. Here is what I did: 1. Created a new directory 2. Downloaded the latest stable CogSpur VM [1] 3. Downloaded the latest sources file [2] 4. Downloaded Squeak5.1-15113 image [3] 5. Dragged the image onto the VM 6. Opened a transcript 7. Did ?Update Squeak? from the Squeak menu The image updates to #16084 but then a debugger opens: MessageNotUnderstood: WeakArray>>hand When I click on some of the stack frames, I get syntax errors and the code looks garbled. I tried it three times. The same debugger comes always up, however the code is garbled in a different way. Looks like sources or changes file corruption, no? Any help is greatly appreciated. Is there a better way to create a current trunk image? Cheers, Bernhard [1] http://www.mirandabanda.org/files/Cog/VM/VM.r3732/CogSpur.app-16.21.3732.tgz [2] http://ftp.squeak.org/5.0/SqueakV50.sources.zip [3] http://ftp.squeak.org/5.1alpha/Squeak5.1-15113.zip -------------- next part -------------- Skipped content of type multipart/related From commits at source.squeak.org Sat Jul 2 19:33:16 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jul 2 19:33:17 2016 Subject: [squeak-dev] The Trunk: Monticello-cmm.635.mcz Message-ID: Chris Muller uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-cmm.635.mcz ==================== Summary ==================== Name: Monticello-cmm.635 Author: cmm Time: 2 July 2016, 2:33:00.947878 pm UUID: fe818a1e-1589-4782-b7d2-7848676e8630 Ancestors: Monticello-cmm.634 The old indexed "trunkBackup" implementation being replaced with the possibility for any HTTP repository to be indexed. It is useful for MCHttpRepository's to cache whether their backends are indexed or not. =============== Diff against Monticello-cmm.634 =============== Item was changed: MCFileBasedRepository subclass: #MCHttpRepository + instanceVariableNames: 'location user password readerCache indexed' - instanceVariableNames: 'location user password readerCache' classVariableNames: '' poolDictionaries: '' category: 'Monticello-Repositories'! Item was removed: - ----- Method: MCHttpRepository class>>trunkBackup (in category 'well-known repositories') ----- - trunkBackup - ^ MCRepositoryGroup default repositories - detect: - [ : each | each isTrunkBackup ] - ifNone: - [ MCHttpRepository - location: MCHttpRepository trunkBackupUrlString - user: 'squeak' - password: 'squeak' ]! Item was removed: - ----- Method: MCHttpRepository class>>trunkBackupUrlString (in category 'accessing') ----- - trunkBackupUrlString - ^ 'http://box4.squeak.org:8888/trunk'! Item was changed: ----- Method: MCHttpRepository>>clearCredentials (in category 'accessing') ----- clearCredentials + user ifNotNil: [user atAllPut: $x]. + password ifNotNil: [password atAllPut: $x]. - user atAllPut: $x. - password atAllPut: $x. user := password := String empty! Item was added: + ----- Method: MCHttpRepository>>isIndexed (in category 'private') ----- + isIndexed + ^ indexed ifNil: + [indexed := [(HTTPSocket + httpGet: self locationWithTrailingSlash + args: {'query' -> {'isHistorySupported'}} + user: self user + passwd: self password) contents = 'true'] + on: Error + do: + [:err | false]]! Item was removed: - ----- Method: MCHttpRepository>>isTrunkBackup (in category 'testing') ----- - isTrunkBackup - ^ location = self class trunkBackupUrlString! Item was changed: ----- Method: MCHttpRepository>>mcModel (in category 'overriding') ----- mcModel + "Answer the object which can respond to #historyOf: and #originOf: or nil, if none." + ^ self isIndexed ifTrue: [self]! - "Answer the object which can respond to #historyOf: and #originOf:." - ^ self! Item was added: + ----- Method: MCHttpRepository>>refresh (in category 'overriding') ----- + refresh + super refresh. + indexed := nil! From asqueaker at gmail.com Sat Jul 2 19:38:32 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sat Jul 2 19:39:15 2016 Subject: [squeak-dev] Problems creating a fresh trunk image (on Mac) In-Reply-To: <39BA8A0B-88E4-41B7-A8C0-0F3F26262D5C@pieber.com> References: <39BA8A0B-88E4-41B7-A8C0-0F3F26262D5C@pieber.com> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: PastedGraphic-1.png Type: image/png Size: 48316 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160702/38822873/PastedGraphic-1.png From asqueaker at gmail.com Sat Jul 2 19:39:28 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sat Jul 2 19:40:13 2016 Subject: [squeak-dev] Problems creating a fresh trunk image (on Mac) In-Reply-To: References: <39BA8A0B-88E4-41B7-A8C0-0F3F26262D5C@pieber.com> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: PastedGraphic-1.png Type: image/png Size: 48316 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160702/5379082b/PastedGraphic-1-0001.png From commits at source.squeak.org Sat Jul 2 19:58:43 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jul 2 19:58:44 2016 Subject: [squeak-dev] The Trunk: Installer-Core-cmm.407.mcz Message-ID: Chris Muller uploaded a new version of Installer-Core to project The Trunk: http://source.squeak.org/trunk/Installer-Core-cmm.407.mcz ==================== Summary ==================== Name: Installer-Core-cmm.407 Author: cmm Time: 2 July 2016, 2:58:33.524279 pm UUID: 1d241bec-9f9c-4678-8692-3cf3f50c26e6 Ancestors: Installer-Core-cmm.406 When the user specifies to #useLocalRepository for configuration, but hasn't overridden their 'localRepository', calculate the #defaultLocalRepository based on the availability of a personal SqueakSource server (for history on one's own proprietary code), or not. =============== Diff against Installer-Core-cmm.406 =============== Item was added: + ----- Method: Installer class>>defaultLocalRepository (in category 'repository-overrides') ----- + defaultLocalRepository + "Check for a personal, Magma-indexed SqueakSource server first, if none running, the the 'mc' directory in the current directory." + | localSqueaksource | + localSqueaksource := Installer monticello http: 'http://localhost:8888'. + ^ localSqueaksource mc isIndexed + ifTrue: [localSqueaksource] + ifFalse: [Installer monticello directory: FileDirectory default / 'mc']! Item was changed: ----- Method: Installer class>>localRepository (in category 'repository-overrides') ----- localRepository + ^ localRepository ifNil: [self defaultLocalRepository]! - ^ localRepository ifNil: [ Installer monticello directory: FileDirectory default / 'mc' ]! From commits at source.squeak.org Sat Jul 2 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jul 2 21:55:03 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160702215502.26900.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068249.html Name: Monticello-cmm.635 Ancestors: Monticello-cmm.634 The old indexed "trunkBackup" implementation being replaced with the possibility for any HTTP repository to be indexed. It is useful for MCHttpRepository's to cache whether their backends are indexed or not. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068250.html Name: Installer-Core-cmm.407 Ancestors: Installer-Core-cmm.406 When the user specifies to #useLocalRepository for configuration, but hasn't overridden their 'localRepository', calculate the #defaultLocalRepository based on the availability of a personal SqueakSource server (for history on one's own proprietary code), or not. ============================================= From lewis at mail.msen.com Sun Jul 3 04:31:01 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Jul 3 04:31:03 2016 Subject: [squeak-dev] The Trunk: Traits-pre.307.mcz In-Reply-To: <201607011550.u61FoWKx091316@shell.msen.com> References: <201607011550.u61FoWKx091316@shell.msen.com> Message-ID: <20160703043101.GA68864@shell.msen.com> On Fri, Jul 01, 2016 at 03:50:19PM +0000, commits@source.squeak.org wrote: > Patrick Rein uploaded a new version of Traits to project The Trunk: > http://source.squeak.org/trunk/Traits-pre.307.mcz > > ==================== Summary ==================== > > Name: Traits-pre.307 > Author: pre > Time: 20 November 2015, 2:58:26.562 pm > UUID: f0955b2d-775c-4862-85b9-5d6e616cd2e4 > Ancestors: Traits-eem.306 > > This fixes http://bugs.squeak.org/view.php?id=7767 which is about the - and @ operator of Trait compositions ignoring brackets. This implementation uses the normal left to right evaluation order of Smalltalk to avoid confusions about the way trait composition expressions are evaluated. > I set the issue status to "resolved" in Mantis. Thanks! Dave From Marcel.Taeumel at hpi.de Sun Jul 3 07:19:47 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun Jul 3 08:01:13 2016 Subject: [squeak-dev] Re: Problems creating a fresh trunk image (on Mac) In-Reply-To: References: <39BA8A0B-88E4-41B7-A8C0-0F3F26262D5C@pieber.com> Message-ID: <1467530387419-4904640.post@n4.nabble.com> Chris Muller-3 wrote > Also, I guess I'm still using VM 3692.... but I wouldn't think it would > be > a vm issue.. > > On Sat, Jul 2, 2016 at 2:38 PM, Chris Muller < > asqueaker@ > > wrote: > >> I didn't redownload the sources or Squeak5.1-15113 image but, I tried >> with >> the ones I had previously downloaded (should be the same right?). >> >> I do get the WeakArray>>#hand error, which I think is expected due to the >> intensity of the refactoring Marcel did. You can just close it, however, >> I >> don't think you should not be getting the garbled code. I am able to >> click >> on the stack frames and see the code normally... >> >> Anyone else able to reproduce Bernhards issue? >> >> >> On Sat, Jul 2, 2016 at 9:58 AM, Bernhard Pieber < > bernhard@ > > >> wrote: >> >>> Dear Squeakers, >>> >>> I want to make myself a pristine trunk image and ran into a problem. I >>> am >>> on a Mac running OS X El Capitan 10.11.5. Here is what I did: >>> >>> 1. Created a new directory >>> 2. Downloaded the latest stable CogSpur VM [1] >>> 3. Downloaded the latest sources file [2] >>> 4. Downloaded Squeak5.1-15113 image [3] >>> 5. Dragged the image onto the VM >>> 6. Opened a transcript >>> 7. Did ?Update Squeak? from the Squeak menu >>> >>> The image updates to #16084 but then a debugger >>> opens: MessageNotUnderstood: WeakArray>>hand >>> >>> When I click on some of the stack frames, I get syntax errors and the >>> code looks garbled. >>> >>> I tried it three times. The same debugger comes always up, however the >>> code is garbled in a different way. Looks like sources or changes file >>> corruption, no? >>> >>> Any help is greatly appreciated. >>> >>> Is there a better way to create a current trunk image? >>> >>> Cheers, >>> Bernhard >>> >>> [1] >>> http://www.mirandabanda.org/files/Cog/VM/VM.r3732/CogSpur.app-16.21.3732.tgz >>> [2] http://ftp.squeak.org/5.0/SqueakV50.sources.zip >>> [3] http://ftp.squeak.org/5.1alpha/Squeak5.1-15113.zip >>> >>> >>> >>> >> > > > > > PastedGraphic-1.png (64K) > <http://forum.world.st/attachment/4904605/0/PastedGraphic-1.png> Hi, there. Just a few days ago, I tried to update 5.1alpha #15113. It works -- except for this hand/event-error, which is due to not being able to update methods in execution after code/class changes. That syntax error, though, is very strange. I did not experience that, yet. Best, Marcel -- View this message in context: http://forum.world.st/Problems-creating-a-fresh-trunk-image-on-Mac-tp4904596p4904640.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Sun Jul 3 09:52:46 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 3 09:52:48 2016 Subject: [squeak-dev] The Trunk: Network-bp.178.mcz Message-ID: Bernhard Pieber uploaded a new version of Network to project The Trunk: http://source.squeak.org/trunk/Network-bp.178.mcz ==================== Summary ==================== Name: Network-bp.178 Author: bp Time: 3 July 2016, 11:48:20.491006 am UUID: d0d328ad-a743-44cc-a912-853edf7bcf02 Ancestors: Network-ul.177 fix endless recursion on parsing e-mail addresses including an ampersand =============== Diff against Network-ul.177 =============== Item was changed: ----- Method: MailAddressTokenizer class>>nonAtomSet (in category 'class initialization') ----- nonAtomSet "(from RFC 2822)" ^CSNonAtom ifNil: [ CSNonAtom := CharacterSet new addAll: ($A to: $Z); addAll: ($a to: $z); addAll: ($0 to: $9); + addAll: '!!#$%&''*+-/=?^_`{|}~'; - addAll: '!!#$%^''*+-/=?^_`{|}~'; complement ]! Item was added: + (PackageInfo named: 'Network') postscript: '"below, add code to be run after the loading of this package" + MailAddressTokenizer cleanUp: false'! From commits at source.squeak.org Sun Jul 3 09:53:00 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 3 09:53:01 2016 Subject: [squeak-dev] The Trunk: NetworkTests-bp.42.mcz Message-ID: Bernhard Pieber uploaded a new version of NetworkTests to project The Trunk: http://source.squeak.org/trunk/NetworkTests-bp.42.mcz ==================== Summary ==================== Name: NetworkTests-bp.42 Author: bp Time: 3 July 2016, 11:49:15.520702 am UUID: cd20a935-7da4-42d5-ac67-a9c6a1ef847b Ancestors: NetworkTests-eem.41 test for e-mail address with ampersand =============== Diff against NetworkTests-eem.41 =============== Item was changed: ----- Method: MailAddressParserTest>>testAddressesIn (in category 'tests') ----- testAddressesIn | testString correctAnswer | + testString := 'joe@lama.com, joe2@lama.com joe3@lama.com joe4 , Not an Address , joe.(annoying (nested) comment)literal@[1.2.3.4], "an annoying" group : joe1@groupie, joe2@groupie, "Joey" joe3@groupy, "joe6"."joe8"@group.com;, Lex''s email account , foo+bar@baz.com romeo&juliet@shakespeare.uk'. - testString := 'joe@lama.com, joe2@lama.com joe3@lama.com joe4 , Not an Address , joe.(annoying (nested) comment)literal@[1.2.3.4], "an annoying" group : joe1@groupie, joe2@groupie, "Joey" joe3@groupy, "joe6"."joe8"@group.com;, Lex''s email account , foo+bar@baz.com'. + correctAnswer := #('joe@lama.com' 'joe2@lama.com' 'joe3@lama.com' 'joe4' 'joe5@address' 'joe.literal@[1.2.3.4]' 'joe1@groupie' 'joe2@groupie' '"Joey"' 'joe3@groupy' '"joe6"."joe8"@group.com' 'lex' 'foo+bar@baz.com' 'romeo&juliet@shakespeare.uk') asOrderedCollection. - correctAnswer := #('joe@lama.com' 'joe2@lama.com' 'joe3@lama.com' 'joe4' 'joe5@address' 'joe.literal@[1.2.3.4]' 'joe1@groupie' 'joe2@groupie' '"Joey"' 'joe3@groupy' '"joe6"."joe8"@group.com' 'lex' 'foo+bar@baz.com') asOrderedCollection. self assert: ((MailAddressParser addressesIn: testString) = correctAnswer).! From bernhard at pieber.com Sun Jul 3 10:11:14 2016 From: bernhard at pieber.com (Bernhard Pieber) Date: Sun Jul 3 10:11:18 2016 Subject: [squeak-dev] Re: Problems creating a fresh trunk image (on Mac) In-Reply-To: <1467530387419-4904640.post@n4.nabble.com> References: <39BA8A0B-88E4-41B7-A8C0-0F3F26262D5C@pieber.com> <1467530387419-4904640.post@n4.nabble.com> Message-ID: <2A7D237D-2456-4516-8754-9F166C984026@pieber.com> Hi Chris, hi Marcel, Thank you for taking the time to look into this. Now it works for me as well. :-/ I have tried to reproduce yesterdays behavior several times but so far failed. (I do have one of yesterday?s failed images with the syntax error, so I was not dreaming.) Anyway, I now have an up-to-date trunk image, which is great! Thanks again, and sorry for the trouble. Cheers, Bernhard > Am 03.07.2016 um 09:19 schrieb marcel.taeumel : > > Chris Muller-3 wrote >> Also, I guess I'm still using VM 3692.... but I wouldn't think it would >> be >> a vm issue.. >> >> On Sat, Jul 2, 2016 at 2:38 PM, Chris Muller < > >> asqueaker@ > >> > wrote: >> >>> I didn't redownload the sources or Squeak5.1-15113 image but, I tried >>> with >>> the ones I had previously downloaded (should be the same right?). >>> >>> I do get the WeakArray>>#hand error, which I think is expected due to the >>> intensity of the refactoring Marcel did. You can just close it, however, >>> I >>> don't think you should not be getting the garbled code. I am able to >>> click >>> on the stack frames and see the code normally... >>> >>> Anyone else able to reproduce Bernhards issue? >>> >>> >>> On Sat, Jul 2, 2016 at 9:58 AM, Bernhard Pieber < > >> bernhard@ > >> > >>> wrote: >>> >>>> Dear Squeakers, >>>> >>>> I want to make myself a pristine trunk image and ran into a problem. I >>>> am >>>> on a Mac running OS X El Capitan 10.11.5. Here is what I did: >>>> >>>> 1. Created a new directory >>>> 2. Downloaded the latest stable CogSpur VM [1] >>>> 3. Downloaded the latest sources file [2] >>>> 4. Downloaded Squeak5.1-15113 image [3] >>>> 5. Dragged the image onto the VM >>>> 6. Opened a transcript >>>> 7. Did ?Update Squeak? from the Squeak menu >>>> >>>> The image updates to #16084 but then a debugger >>>> opens: MessageNotUnderstood: WeakArray>>hand >>>> >>>> When I click on some of the stack frames, I get syntax errors and the >>>> code looks garbled. >>>> >>>> I tried it three times. The same debugger comes always up, however the >>>> code is garbled in a different way. Looks like sources or changes file >>>> corruption, no? >>>> >>>> Any help is greatly appreciated. >>>> >>>> Is there a better way to create a current trunk image? >>>> >>>> Cheers, >>>> Bernhard >>>> >>>> [1] >>>> http://www.mirandabanda.org/files/Cog/VM/VM.r3732/CogSpur.app-16.21.3732.tgz >>>> [2] http://ftp.squeak.org/5.0/SqueakV50.sources.zip >>>> [3] http://ftp.squeak.org/5.1alpha/Squeak5.1-15113.zip >>>> >>>> >>>> >>>> >>> >> >> >> >> >> PastedGraphic-1.png (64K) >> <http://forum.world.st/attachment/4904605/0/PastedGraphic-1.png> > > Hi, there. > > Just a few days ago, I tried to update 5.1alpha #15113. It works -- except > for this hand/event-error, which is due to not being able to update methods > in execution after code/class changes. > > That syntax error, though, is very strange. I did not experience that, yet. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Problems-creating-a-fresh-trunk-image-on-Mac-tp4904596p4904640.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From bernhard at pieber.com Sun Jul 3 11:33:47 2016 From: bernhard at pieber.com (Bernhard Pieber) Date: Sun Jul 3 11:33:51 2016 Subject: [squeak-dev] Running headless on a Mac In-Reply-To: References: <89BB0552-672C-401B-9864-4A96CCD8EDEA@gmail.com> <41B24826-B16A-4B4A-9CE6-5C5F7C23BE1C@pieber.com> <6C01AC18-C02A-458C-9AA6-2FB7BDA9139D@pieber.com> Message-ID: <6EBC84F1-FA09-47AE-8CF6-FC80541598A7@pieber.com> Hi John, Should this work already with the latest VMs? Cheers, Bernhard > Am 06.05.2016 um 02:36 schrieb John McIntosh : > > This is being fixed this week. > > On Tue, May 3, 2016 at 1:49 PM, Tobias Pape wrote: > > On 27.04.2016, at 21:32, Fabio Niephaus wrote: > > > What window is still showing up? > > Are you sure your absolute path to your .st is correct? > > Note that the Cocoa-Based Mac VMs do not yet interpret -headless correctly. > > Best regards > -Tobias From lewis at mail.msen.com Sun Jul 3 14:51:42 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Jul 3 14:51:44 2016 Subject: [squeak-dev] Re: Problems creating a fresh trunk image (on Mac) In-Reply-To: <1467530387419-4904640.post@n4.nabble.com> References: <39BA8A0B-88E4-41B7-A8C0-0F3F26262D5C@pieber.com> <1467530387419-4904640.post@n4.nabble.com> Message-ID: <20160703145142.GA86402@shell.msen.com> On Sun, Jul 03, 2016 at 12:19:47AM -0700, marcel.taeumel wrote: > Chris Muller-3 wrote > > Also, I guess I'm still using VM 3692.... but I wouldn't think it would > > be > > a vm issue.. > > > > On Sat, Jul 2, 2016 at 2:38 PM, Chris Muller < > > > asqueaker@ > > > > wrote: > > > >> I didn't redownload the sources or Squeak5.1-15113 image but, I tried > >> with > >> the ones I had previously downloaded (should be the same right?). > >> > >> I do get the WeakArray>>#hand error, which I think is expected due to the > >> intensity of the refactoring Marcel did. You can just close it, however, > >> I > >> don't think you should not be getting the garbled code. I am able to > >> click > >> on the stack frames and see the code normally... > >> > >> Anyone else able to reproduce Bernhards issue? > >> > >> > >> On Sat, Jul 2, 2016 at 9:58 AM, Bernhard Pieber < > > > bernhard@ > > > > > >> wrote: > >> > >>> Dear Squeakers, > >>> > >>> I want to make myself a pristine trunk image and ran into a problem. I > >>> am > >>> on a Mac running OS X El Capitan 10.11.5. Here is what I did: > >>> > >>> 1. Created a new directory > >>> 2. Downloaded the latest stable CogSpur VM [1] > >>> 3. Downloaded the latest sources file [2] > >>> 4. Downloaded Squeak5.1-15113 image [3] > >>> 5. Dragged the image onto the VM > >>> 6. Opened a transcript > >>> 7. Did ???Update Squeak??? from the Squeak menu > >>> > >>> The image updates to #16084 but then a debugger > >>> opens: MessageNotUnderstood: WeakArray>>hand > >>> > >>> When I click on some of the stack frames, I get syntax errors and the > >>> code looks garbled. > >>> > >>> I tried it three times. The same debugger comes always up, however the > >>> code is garbled in a different way. Looks like sources or changes file > >>> corruption, no? > >>> > >>> Any help is greatly appreciated. > >>> > >>> Is there a better way to create a current trunk image? > >>> > >>> Cheers, > >>> Bernhard > >>> > >>> [1] > >>> http://www.mirandabanda.org/files/Cog/VM/VM.r3732/CogSpur.app-16.21.3732.tgz > >>> [2] http://ftp.squeak.org/5.0/SqueakV50.sources.zip > >>> [3] http://ftp.squeak.org/5.1alpha/Squeak5.1-15113.zip > >>> > >>> > >>> > >>> > >> > > > > > > > > > > PastedGraphic-1.png (64K) > > <http://forum.world.st/attachment/4904605/0/PastedGraphic-1.png> > > Hi, there. > > Just a few days ago, I tried to update 5.1alpha #15113. It works -- except > for this hand/event-error, which is due to not being able to update methods > in execution after code/class changes. > > That syntax error, though, is very strange. I did not experience that, yet. > It does look like a problem with either the changes file or the sources file. Sometimes this can happen if zip file is unpacked with a zip utility that thinks that the file is supposed to be a "text" file, so adds line separator characters. I think has happened to people on Mac in the past, although I do not remember the solution. Dave From johnmci at smalltalkconsulting.com Sun Jul 3 21:07:52 2016 From: johnmci at smalltalkconsulting.com (John McIntosh) Date: Sun Jul 3 21:08:35 2016 Subject: [squeak-dev] Running headless on a Mac In-Reply-To: <6EBC84F1-FA09-47AE-8CF6-FC80541598A7@pieber.com> References: <89BB0552-672C-401B-9864-4A96CCD8EDEA@gmail.com> <41B24826-B16A-4B4A-9CE6-5C5F7C23BE1C@pieber.com> <6C01AC18-C02A-458C-9AA6-2FB7BDA9139D@pieber.com> <6EBC84F1-FA09-47AE-8CF6-FC80541598A7@pieber.com> Message-ID: I believe so, give it a whirl On Sun, Jul 3, 2016 at 4:33 AM, Bernhard Pieber wrote: > Hi John, > > Should this work already with the latest VMs? > > Cheers, > Bernhard > > > Am 06.05.2016 um 02:36 schrieb John McIntosh < > johnmci@smalltalkconsulting.com>: > > > > This is being fixed this week. > > > > On Tue, May 3, 2016 at 1:49 PM, Tobias Pape wrote: > > > > On 27.04.2016, at 21:32, Fabio Niephaus wrote: > > > > > What window is still showing up? > > > Are you sure your absolute path to your .st is correct? > > > > Note that the Cocoa-Based Mac VMs do not yet interpret -headless > correctly. > > > > Best regards > > -Tobias > > > -- =========================================================================== John M. McIntosh. Corporate Smalltalk Consulting Ltd https://www.linkedin.com/in/smalltalk =========================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160703/9900001a/attachment.htm From commits at source.squeak.org Sun Jul 3 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 3 21:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160703215502.7037.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068251.html Name: Network-bp.178 Ancestors: Network-ul.177 fix endless recursion on parsing e-mail addresses including an ampersand ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068252.html Name: NetworkTests-bp.42 Ancestors: NetworkTests-eem.41 test for e-mail address with ampersand ============================================= From sebastian at flowingconcept.com Mon Jul 4 14:30:25 2016 From: sebastian at flowingconcept.com (sebastian@flowingconcept.com) Date: Mon Jul 4 15:12:00 2016 Subject: [squeak-dev] Join Squeak team on Slack Message-ID: <1467642625921-4904863.post@n4.nabble.com> Hi there, I'm writing here to let you know that now you can join the Squeak team in Slack Here is the link to get you in: https://squeak-slack-sign-in.herokuapp.com/ And in case you are wondering why this millennial-friendly app is worth trying take a look here: https://www.youtube.com/watch?v=B6zVzWU95Sw TL; didn't watch: Some of us like to chat and "think-loud" together and this is a great opportunity to do more of that while keeping subjects in relevant channels with access from desktop and mobile (with nice notifications). Some channels we have there: #general #board #vm #context #SqueakJS #webteam #... <- your project? Please invite other smalltalkers to join too! See you there! Seb o/ -- View this message in context: http://forum.world.st/Join-Squeak-team-on-Slack-tp4904863.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From eliot.miranda at gmail.com Mon Jul 4 20:44:35 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Jul 4 20:44:38 2016 Subject: [squeak-dev] isKindOf: in Morphic code... Message-ID: Hi All, Hi Marcel, when I see code like this, and there's a lot of it in Morphic, !Flaps class methodsFor: 'testing' stamp: 'mt 5/17/2016 14:17'! anyFlapsVisibleIn: aWorld aWorld submorphsDo: [:m | (m isKindOf: FlapTab) ifTrue: [^ true]]. ^ false! ! I think this is performance thrown on the floor (isKindOf: is awfully slow, especially in huge hierarchies like Morphic, and bad design, restricting one to a concrete class). And I think that Morph provides a perfect place to put an extension that doesn't pollute Object. So I would like to see anyFlapsVisibleIn: aWorld aWorld submorphsDo: [:m| m isFlapTab ifTrue: [^true]]. ^ false! ! with the emphasis on isFlapTab ;-) _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160704/33377425/attachment.htm From Das.Linux at gmx.de Mon Jul 4 20:59:39 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon Jul 4 20:59:42 2016 Subject: [squeak-dev] isKindOf: in Morphic code... In-Reply-To: References: Message-ID: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> On 04.07.2016, at 22:44, Eliot Miranda wrote: > Hi All, Hi Marcel, > > when I see code like this, and there's a lot of it in Morphic, > > !Flaps class methodsFor: 'testing' stamp: 'mt 5/17/2016 14:17'! > anyFlapsVisibleIn: aWorld > > aWorld submorphsDo: [:m | > (m isKindOf: FlapTab) ifTrue: [^ true]]. > > ^ false! ! > > I think this is performance thrown on the floor (isKindOf: is awfully slow, especially in huge hierarchies like Morphic, and bad design, restricting one to a concrete class). And I think that Morph provides a perfect place to put an extension that doesn't pollute Object. So I would like to see > > anyFlapsVisibleIn: aWorld > > aWorld submorphsDo: > [:m| m isFlapTab ifTrue: [^true]]. > ^ false! ! > > with the emphasis on isFlapTab ;-) Well, class testing seems to be a Morphic pattern, given #findA: (alias #submorphOfClass:) Best regards -Tobias PS: Not advocating anything just reporting what I found From tim at rowledge.org Mon Jul 4 21:10:30 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon Jul 4 21:10:06 2016 Subject: [squeak-dev] isKindOf: in Morphic code... In-Reply-To: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> Message-ID: <0E444DB3-5D81-40CD-9799-E4B951B36E7F@rowledge.org> > On 04-07-2016, at 1:59 PM, Tobias Pape wrote: > > > On 04.07.2016, at 22:44, Eliot Miranda wrote: > >> Hi All, Hi Marcel, >> >> when I see code like this, and there's a lot of it in Morphic, >> >> !Flaps class methodsFor: 'testing' stamp: 'mt 5/17/2016 14:17'! >> anyFlapsVisibleIn: aWorld >> >> aWorld submorphsDo: [:m | >> (m isKindOf: FlapTab) ifTrue: [^ true]]. >> >> ^ false! ! >> >> I think this is performance thrown on the floor (isKindOf: is awfully slow, especially in huge hierarchies like Morphic, and bad design, restricting one to a concrete class). And I think that Morph provides a perfect place to put an extension that doesn't pollute Object. So I would like to see >> >> anyFlapsVisibleIn: aWorld >> >> aWorld submorphsDo: >> [:m| m isFlapTab ifTrue: [^true]]. >> ^ false! ! >> >> with the emphasis on isFlapTab ;-) > > Well, class testing seems to be a Morphic pattern, given #findA: (alias #submorphOfClass:) It is, and it?s horrible. One of the major things I did to speed up Scratch was fixing hundreds of badly placed isKindOf: sends. Ideally one can find a better algorithm and avoid the issue completely in some places. Not quite so good is adding lots of isThingummy methods but at least that is faster! This is at least architecturally better since there are plenty of cases where simple class inheritance is not sufficient as a test because several disjoint classes provide a facility. You *really* don?t want to see multiple isKindOf?s in side an important loop! I suspect that there are a lot of places where we should *not* simply use the list of submorphs and scan it with isKindOf type tests but instead keep more precise track of relevant submorphs. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: SD: Self Destruct From eliot.miranda at gmail.com Mon Jul 4 21:17:41 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Jul 4 21:17:45 2016 Subject: [squeak-dev] isKindOf: in Morphic code... In-Reply-To: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> Message-ID: On Mon, Jul 4, 2016 at 1:59 PM, Tobias Pape wrote: > > On 04.07.2016, at 22:44, Eliot Miranda wrote: > > > Hi All, Hi Marcel, > > > > when I see code like this, and there's a lot of it in Morphic, > > > > !Flaps class methodsFor: 'testing' stamp: 'mt 5/17/2016 14:17'! > > anyFlapsVisibleIn: aWorld > > > > aWorld submorphsDo: [:m | > > (m isKindOf: FlapTab) ifTrue: [^ true]]. > > > > ^ false! ! > > > > I think this is performance thrown on the floor (isKindOf: is awfully > slow, especially in huge hierarchies like Morphic, and bad design, > restricting one to a concrete class). And I think that Morph provides a > perfect place to put an extension that doesn't pollute Object. So I would > like to see > > > > anyFlapsVisibleIn: aWorld > > > > aWorld submorphsDo: > > [:m| m isFlapTab ifTrue: [^true]]. > > ^ false! ! > > > > with the emphasis on isFlapTab ;-) > > Well, class testing seems to be a Morphic pattern, given #findA: (alias > #submorphOfClass:) > I don't care. It's *WRONG*. isKindOf: is a _bug_. > > Best regards > -Tobias > PS: Not advocating anything just reporting what I found > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160704/e327138d/attachment.htm From Marcel.Taeumel at hpi.de Mon Jul 4 20:58:12 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon Jul 4 21:39:48 2016 Subject: [squeak-dev] Re: isKindOf: in Morphic code... In-Reply-To: References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> Message-ID: <1467665892252-4904895.post@n4.nabble.com> Eliot Miranda-2 wrote > On Mon, Jul 4, 2016 at 1:59 PM, Tobias Pape < > Das.Linux@ > > wrote: > >> >> On 04.07.2016, at 22:44, Eliot Miranda < > eliot.miranda@ > > wrote: >> >> > Hi All, Hi Marcel, >> > >> > when I see code like this, and there's a lot of it in Morphic, >> > >> > !Flaps class methodsFor: 'testing' stamp: 'mt 5/17/2016 14:17'! >> > anyFlapsVisibleIn: aWorld >> > >> > aWorld submorphsDo: [:m | >> > (m isKindOf: FlapTab) ifTrue: [^ true]]. >> > >> > ^ false! ! >> > >> > I think this is performance thrown on the floor (isKindOf: is awfully >> slow, especially in huge hierarchies like Morphic, and bad design, >> restricting one to a concrete class). And I think that Morph provides a >> perfect place to put an extension that doesn't pollute Object. So I >> would >> like to see >> > >> > anyFlapsVisibleIn: aWorld >> > >> > aWorld submorphsDo: >> > [:m| m isFlapTab ifTrue: [^true]]. >> > ^ false! ! >> > >> > with the emphasis on isFlapTab ;-) >> >> Well, class testing seems to be a Morphic pattern, given #findA: (alias >> #submorphOfClass:) >> > > I don't care. It's *WRONG*. isKindOf: is a _bug_. > > >> >> Best regards >> -Tobias >> PS: Not advocating anything just reporting what I found >> > > > > -- > _,,,^..^,,,_ > best, Eliot Hey Eliot, no, it's not a bug. ;-) Although, there is room for improvement. #isFlapTab sounds good. Note that this is not even a critical piece of code because is only called if you open a system window, for example. Try [Flaps anyFlapsVisibleIn: ActiveWorld] bench. It's fast enough. A microsecond here, having around 30 windows open. So, you will not notice a delay. Still, you're right. We should reduce the usage of #isKindOf:. Not polluting Object means still polluting Morph. (Yeah, maybe we should use slower computers to program.) Checks we should consider to add or use more often if it is already there: #isCornerGripMorph #isProportionalSplitterMorph #isCompiledMethod #isColor #isInfiniteForm ... still, a quick look through the usage of #isKindOf: in Morphic code revealed no serious performance issues. We should refactor MenuMorph to not need #isKindOf: that often. This might also be true for other places. The pattern "isClass" is not always a good solution for many cases in the system. Best, Marcel -- View this message in context: http://forum.world.st/isKindOf-in-Morphic-code-tp4904890p4904895.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From eliot.miranda at gmail.com Mon Jul 4 21:44:18 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Jul 4 21:44:21 2016 Subject: [squeak-dev] invisible unselectable morph covering all my other morphs? Message-ID: Hi Morphic Mavens, anyone out there able to help me unstick a very important project that appears to have some large morph taking all mouse clicks away from any other morph in the project? Anyone seen this and have a way out? When I hit the Halos mouse button on a specific windows or menu the halos come up all around the entire screen. Attempts to select the halo fail. Hitting the halo button a second time dismisses the halo. I can enter and exit the project, but once inside cannot interact with existing windows. I can create new windows, but these are also unresponsive. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160704/f7595e59/attachment.htm From Marcel.Taeumel at hpi.de Mon Jul 4 21:05:57 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon Jul 4 21:47:33 2016 Subject: [squeak-dev] Re: isKindOf: in Morphic code... In-Reply-To: <1467665892252-4904895.post@n4.nabble.com> References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> <1467665892252-4904895.post@n4.nabble.com> Message-ID: <1467666357074-4904897.post@n4.nabble.com> marcel.taeumel wrote > > Eliot Miranda-2 wrote >> On Mon, Jul 4, 2016 at 1:59 PM, Tobias Pape < >> Das.Linux@ >> > wrote: >> >>> >>> On 04.07.2016, at 22:44, Eliot Miranda < >> eliot.miranda@ >> > wrote: >>> >>> > Hi All, Hi Marcel, >>> > >>> > when I see code like this, and there's a lot of it in Morphic, >>> > >>> > !Flaps class methodsFor: 'testing' stamp: 'mt 5/17/2016 14:17'! >>> > anyFlapsVisibleIn: aWorld >>> > >>> > aWorld submorphsDo: [:m | >>> > (m isKindOf: FlapTab) ifTrue: [^ true]]. >>> > >>> > ^ false! ! >>> > >>> > I think this is performance thrown on the floor (isKindOf: is awfully >>> slow, especially in huge hierarchies like Morphic, and bad design, >>> restricting one to a concrete class). And I think that Morph provides a >>> perfect place to put an extension that doesn't pollute Object. So I >>> would >>> like to see >>> > >>> > anyFlapsVisibleIn: aWorld >>> > >>> > aWorld submorphsDo: >>> > [:m| m isFlapTab ifTrue: [^true]]. >>> > ^ false! ! >>> > >>> > with the emphasis on isFlapTab ;-) >>> >>> Well, class testing seems to be a Morphic pattern, given #findA: (alias >>> #submorphOfClass:) >>> >> >> I don't care. It's *WRONG*. isKindOf: is a _bug_. >> >> >>> >>> Best regards >>> -Tobias >>> PS: Not advocating anything just reporting what I found >>> >> >> >> >> -- >> _,,,^..^,,,_ >> best, Eliot > Hey Eliot, > > no, it's not a bug. ;-) Although, there is room for improvement. > #isFlapTab sounds good. Note that this is not even a critical piece of > code because is only called if you open a system window, for example. > > Try [Flaps anyFlapsVisibleIn: ActiveWorld] bench. It's fast enough. A > microsecond here, having around 30 windows open. So, you will not notice a > delay. Still, you're right. We should reduce the usage of #isKindOf:. > > Not polluting Object means still polluting Morph. > > (Yeah, maybe we should use slower computers to program.) > > Checks we should consider to add or use more often if it is already there: > #isCornerGripMorph > #isProportionalSplitterMorph > #isCompiledMethod > #isColor > #isInfiniteForm > > ... still, a quick look through the usage of #isKindOf: in Morphic code > revealed no serious performance issues. We should refactor MenuMorph to > not need #isKindOf: that often. This might also be true for other places. > > The pattern "isClass" is not always a good solution for many cases in the > system. > > Best, > Marcel Okay, here is some more constructive feedback on this issue. The problem is that there are morphs in the world that do not want to be covered: flaps, docking bars, etc. So, it would be good to attach a property to that morph that says "please do not cover me". Then the RealEstateAgent just has to iterate of a world's submorphs once, check for that property and some bounds and we are fine. No need for #isKindOf:. No need for #isFlapTab. Right now, the algorithm is even broken because we assume that all flaps have the same size. For example, there cannot be a bigger icon, a smaller text, or whatever. They all have to have the same size. Kind of unnecessary limitation. This is the actual "bug". Best, Marcel -- View this message in context: http://forum.world.st/isKindOf-in-Morphic-code-tp4904890p4904897.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From pbpublist at gmail.com Mon Jul 4 22:39:33 2016 From: pbpublist at gmail.com (Phil (list)) Date: Mon Jul 4 22:39:38 2016 Subject: [squeak-dev] Re: isKindOf: in Morphic code... In-Reply-To: <1467666357074-4904897.post@n4.nabble.com> References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> <1467665892252-4904895.post@n4.nabble.com> <1467666357074-4904897.post@n4.nabble.com> Message-ID: <1467671973.7347.82.camel@gmail.com> Mercel, On Mon, 2016-07-04 at 14:05 -0700, marcel.taeumel wrote: > > > > >? > > > > > Hi All, Hi Marcel, > > > > > > > > > > ????when I see code like this, and there's a lot of it in > > > > > Morphic, > > > > > > > > > > !Flaps class methodsFor: 'testing' stamp: 'mt 5/17/2016 > > > > > 14:17'! > > > > > anyFlapsVisibleIn: aWorld > > > > > > > > > > ????????aWorld submorphsDo: [:m | > > > > > ????????????????(m isKindOf: FlapTab) ifTrue: [^ true]]. > > > > > > > > > > ????????^ false! ! > > > > > > > > > > I think this is performance thrown on the floor (isKindOf: is > > > > > awfully > > > > slow, especially in huge hierarchies like Morphic, and bad > > > > design, > > > > restricting one to a concrete class).??And I think that Morph > > > > provides a > > > > perfect place to put an extension that doesn't pollute > > > > Object.??So I > > > > would > > > > like to see > Okay, here is some more constructive feedback on this issue. > > The problem is that there are morphs in the world that do not want to > be > covered: flaps, docking bars, etc. So, it would be good to attach a > property > to that morph that says "please do not cover me". Then the > RealEstateAgent > just has to iterate of a world's submorphs once, check for that > property and > some bounds and we are fine. > > No need for #isKindOf:. > No need for #isFlapTab. > > Right now, the algorithm is even broken because we assume that all > flaps > have the same size. For example, there cannot be a bigger icon, a > smaller > text, or whatever. They all have to have the same size. Kind of > unnecessary > limitation. > > This is the actual "bug". > > Best, > Marcel > It's great that you've eliminated the usage in this specific example but you are not seeing the forest for the trees. ?Eliot's comment wasn't concerned with what was being tested or why it was being tested, but rather how it was being tested. ?#isKindOf: is testing what exact kind of thing something is, and its performance implications, rather than how the thing you are testing behaves. ?So if someone were to come along with MyBetterFlapTab in an alternate class hierarchy, the test as it current stands will not only perform sub-optimally, but it also won't behave as expected (i.e. if MyBetterFlapTab implements the FlapTab protocols it is reasonable to expect an instance of it to work wherever an instance of FlapTab does) I think what Eliot was asking was that wherever such tests are being performed, and for whatever reason, to not use #isKindOf: and use a protocol-based #is* approach instead that doesn't look at the concrete class. ?Re: the concern about polluting Object, Morph, or whatever... perhaps using a more generalized #is: approach could help. ?Or if it is such a specialized (i.e. one-off) test that an #is* or #is: check would not make sense, there is always #respondsTo: Thanks, Phil From eliot.miranda at gmail.com Mon Jul 4 23:30:36 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Jul 4 23:30:39 2016 Subject: [squeak-dev] Re: isKindOf: in Morphic code... In-Reply-To: <1467665892252-4904895.post@n4.nabble.com> References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> <1467665892252-4904895.post@n4.nabble.com> Message-ID: On Mon, Jul 4, 2016 at 1:58 PM, marcel.taeumel wrote: > Eliot Miranda-2 wrote > > On Mon, Jul 4, 2016 at 1:59 PM, Tobias Pape < > > > Das.Linux@ > > > > wrote: > > > >> > >> On 04.07.2016, at 22:44, Eliot Miranda < > > > eliot.miranda@ > > > > wrote: > >> > >> > Hi All, Hi Marcel, > >> > > >> > when I see code like this, and there's a lot of it in Morphic, > >> > > >> > !Flaps class methodsFor: 'testing' stamp: 'mt 5/17/2016 14:17'! > >> > anyFlapsVisibleIn: aWorld > >> > > >> > aWorld submorphsDo: [:m | > >> > (m isKindOf: FlapTab) ifTrue: [^ true]]. > >> > > >> > ^ false! ! > >> > > >> > I think this is performance thrown on the floor (isKindOf: is awfully > >> slow, especially in huge hierarchies like Morphic, and bad design, > >> restricting one to a concrete class). And I think that Morph provides a > >> perfect place to put an extension that doesn't pollute Object. So I > >> would > >> like to see > >> > > >> > anyFlapsVisibleIn: aWorld > >> > > >> > aWorld submorphsDo: > >> > [:m| m isFlapTab ifTrue: [^true]]. > >> > ^ false! ! > >> > > >> > with the emphasis on isFlapTab ;-) > >> > >> Well, class testing seems to be a Morphic pattern, given #findA: (alias > >> #submorphOfClass:) > >> > > > > I don't care. It's *WRONG*. isKindOf: is a _bug_. > > > > > >> > >> Best regards > >> -Tobias > >> PS: Not advocating anything just reporting what I found > >> > > > > > > > > -- > > _,,,^..^,,,_ > > best, Eliot > > Hey Eliot, > > no, it's not a bug. ;-) Yes, isKindOf: *is* a bug, at least in the usage of determining supported messages. Smalltalk has ad-hoc polymorphism that allows any class to implement and set of messages, without having to inherit from a superclasss that defines that set of messages. isKindOf: breaks this property; it restricts the designer to using a concrete class, in violation of the language's flexibility. isKindOf: is therefore most definitely a bug. One might think there are valid uses when editing a class hierarchy programmatically. But for this there are messages understood by classes, not instances, such as includesBehavior:, inheritsFrom: etc. These are legitimate. But isKindOf: is not. It is a horrible hack. Although, there is room for improvement. #isFlapTab > sounds good. Note that this is not even a critical piece of code because is > only called if you open a system window, for example. > > Try [Flaps anyFlapsVisibleIn: ActiveWorld] bench. It's fast enough. A > microsecond here, having around 30 windows open. So, you will not notice a > delay. Still, you're right. We should reduce the usage of #isKindOf:. > > Not polluting Object means still polluting Morph. > > (Yeah, maybe we should use slower computers to program.) > > Checks we should consider to add or use more often if it is already there: > #isCornerGripMorph > #isProportionalSplitterMorph > #isCompiledMethod > #isColor > #isInfiniteForm > > ... still, a quick look through the usage of #isKindOf: in Morphic code > revealed no serious performance issues. We should refactor MenuMorph to not > need #isKindOf: that often. This might also be true for other places. > > The pattern "isClass" is not always a good solution for many cases in the > system. > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/isKindOf-in-Morphic-code-tp4904890p4904895.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160704/1a5be1c0/attachment.htm From tim at rowledge.org Tue Jul 5 00:20:44 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue Jul 5 00:20:20 2016 Subject: [squeak-dev] Re: NuScratch source on SqueakMap In-Reply-To: <98FE8A11-CD52-41B4-8BF1-BE47C10644F2@rowledge.org> References: <98FE8A11-CD52-41B4-8BF1-BE47C10644F2@rowledge.org> Message-ID: <4EF6CF91-46F0-4B27-BAA5-A27B475E5FA2@rowledge.org> > On 17-06-2016, at 7:19 PM, tim Rowledge wrote: > > There is now a SM entry pointing to a SqueakSource copy of the current NuScratch as per the Raspberry Pi. {snip} > It does *not* include the RaspberryPi specific GPIOServer code; that will appear in a separate package soon. And said package is now available via SM. In fact so far as I could tell I managed to set things up so that if you install the ?NuScratchGPIO? package it will install the basic scratch stuff, the FFI stuff required and the gpio server and even the hardware library system. It?s amazingly hard to feel sure I was successful in starting from a truly vanilla setup, so do please try it out someone... tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- All foam, no beer. From tim at rowledge.org Tue Jul 5 04:31:06 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue Jul 5 04:30:39 2016 Subject: [squeak-dev] A $140 pc for running Squeak In-Reply-To: References: <81C530DB-6D5B-4394-B571-EE90356D38B9@rowledge.org> Message-ID: <6E1D1312-3531-483B-8C8C-481CA54E4152@rowledge.org> > On 30-06-2016, at 9:04 PM, Ben Coman wrote: {snip} > What age group are you working Sorry, forgot to answer this; we?re setting up kids summer camp deal aimed at 12-16 range. Classes in Scratch, robotics, 3d printing, alternative energy, simple electrics and electronics, skynet programming and global revolution planning. See https://makerspacenanaimo.org/stemosity/ for a still rather undeveloped website. In particular the ?how to bring down your nation with a stupid referendum? section needs work. We?ve done quite a few events and one-time classes up here in the wilds of the Great White North and it seems to be popular. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- People around her are at risk of second hand idiocy. From Marcel.Taeumel at hpi.de Tue Jul 5 07:42:04 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Jul 5 08:23:44 2016 Subject: [squeak-dev] Re: isKindOf: in Morphic code... In-Reply-To: References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> <1467665892252-4904895.post@n4.nabble.com> Message-ID: <1467704524822-4904935.post@n4.nabble.com> Eliot Miranda-2 wrote > On Mon, Jul 4, 2016 at 1:58 PM, marcel.taeumel < > Marcel.Taeumel@ > > > wrote: > >> Eliot Miranda-2 wrote >> > On Mon, Jul 4, 2016 at 1:59 PM, Tobias Pape < >> >> > Das.Linux@ >> >> > > wrote: >> > >> >> >> >> On 04.07.2016, at 22:44, Eliot Miranda < >> >> > eliot.miranda@ >> >> > > wrote: >> >> >> >> > Hi All, Hi Marcel, >> >> > >> >> > when I see code like this, and there's a lot of it in Morphic, >> >> > >> >> > !Flaps class methodsFor: 'testing' stamp: 'mt 5/17/2016 14:17'! >> >> > anyFlapsVisibleIn: aWorld >> >> > >> >> > aWorld submorphsDo: [:m | >> >> > (m isKindOf: FlapTab) ifTrue: [^ true]]. >> >> > >> >> > ^ false! ! >> >> > >> >> > I think this is performance thrown on the floor (isKindOf: is >> awfully >> >> slow, especially in huge hierarchies like Morphic, and bad design, >> >> restricting one to a concrete class). And I think that Morph provides >> a >> >> perfect place to put an extension that doesn't pollute Object. So I >> >> would >> >> like to see >> >> > >> >> > anyFlapsVisibleIn: aWorld >> >> > >> >> > aWorld submorphsDo: >> >> > [:m| m isFlapTab ifTrue: [^true]]. >> >> > ^ false! ! >> >> > >> >> > with the emphasis on isFlapTab ;-) >> >> >> >> Well, class testing seems to be a Morphic pattern, given #findA: >> (alias >> >> #submorphOfClass:) >> >> >> > >> > I don't care. It's *WRONG*. isKindOf: is a _bug_. >> > >> > >> >> >> >> Best regards >> >> -Tobias >> >> PS: Not advocating anything just reporting what I found >> >> >> > >> > >> > >> > -- >> > _,,,^..^,,,_ >> > best, Eliot >> >> Hey Eliot, >> >> no, it's not a bug. ;-) > > > Yes, isKindOf: *is* a bug, at least in the usage of determining supported > messages. Smalltalk has ad-hoc polymorphism that allows any class to > implement and set of messages, without having to inherit from a > superclasss > that defines that set of messages. isKindOf: breaks this property; it > restricts the designer to using a concrete class, in violation of the > language's flexibility. isKindOf: is therefore most definitely a bug. > > One might think there are valid uses when editing a class hierarchy > programmatically. But for this there are messages understood by classes, > not instances, such as includesBehavior:, inheritsFrom: etc. These are > legitimate. But isKindOf: is not. It is a horrible hack. > > Although, there is room for improvement. #isFlapTab >> sounds good. Note that this is not even a critical piece of code because >> is >> only called if you open a system window, for example. >> >> Try [Flaps anyFlapsVisibleIn: ActiveWorld] bench. It's fast enough. A >> microsecond here, having around 30 windows open. So, you will not notice >> a >> delay. Still, you're right. We should reduce the usage of #isKindOf:. >> >> Not polluting Object means still polluting Morph. >> >> (Yeah, maybe we should use slower computers to program.) >> >> Checks we should consider to add or use more often if it is already >> there: >> #isCornerGripMorph >> #isProportionalSplitterMorph >> #isCompiledMethod >> #isColor >> #isInfiniteForm >> >> ... still, a quick look through the usage of #isKindOf: in Morphic code >> revealed no serious performance issues. We should refactor MenuMorph to >> not >> need #isKindOf: that often. This might also be true for other places. >> >> The pattern "isClass" is not always a good solution for many cases in the >> system. >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/isKindOf-in-Morphic-code-tp4904890p4904895.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> > > > -- > _,,,^..^,,,_ > best, Eliot @Phil: #isKindOf: is no better or worse than the #isClass-check. Maybe performance-wise, but arguably not in terms of architecture and code design. While #isClass might be a little closer to idiomatic Smalltalk code, it should never be used as an excuse for bad design. @all: I do see beauty in the pattern of asClass/isClass. For example, asSet/isSet, asOrderedCollection/isOrderedCollection. However, anytime a programmer tends to use a type-check and there is no "isClass" available, I would rather suggest him to use #isKindOf: for the moment instead of adding another two methods to encode the "isClass" in both base class and subclass. Always think twice before blowing up a class' interface. It impedes code readability. Especially if we are talking about a base class that is already that big, like Morph. Then, if there is really no other choice -- design-wise -- one has to consider performance. #isKindOf: is expensive. Okay. Then you can easily add the isClass-check. Fine. Sorry, but this is absolutely no black-white decision as Eliot and Phil proposed. There are many factors to consider. Semantics, code/interface readability, performance, idioms. In many cases -- if not all -- I suspect a design issue behind the use of #isKindOf: or #isClass. Still, I do like #respondsTo: because it is specific to a scenario/domain and leverages the dynamic capabilities of Smalltalk. For example, "model respondsTo: #foobar" as an extension point in graphical widgets. We should *not* batch-convert all uses of #isKindOf: to an #isClass check but use our Senders-Tools to hunt down all the design issues left in the system. Best, Marcel -- View this message in context: http://forum.world.st/isKindOf-in-Morphic-code-tp4904890p4904935.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Tue Jul 5 07:45:50 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Jul 5 08:27:29 2016 Subject: [squeak-dev] Re: isKindOf: in Morphic code... In-Reply-To: <1467704524822-4904935.post@n4.nabble.com> References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> <1467665892252-4904895.post@n4.nabble.com> <1467704524822-4904935.post@n4.nabble.com> Message-ID: <1467704750209-4904937.post@n4.nabble.com> marcel.taeumel wrote > > Eliot Miranda-2 wrote >> On Mon, Jul 4, 2016 at 1:58 PM, marcel.taeumel < >> Marcel.Taeumel@ >> > >> wrote: >> >>> Eliot Miranda-2 wrote >>> > On Mon, Jul 4, 2016 at 1:59 PM, Tobias Pape < >>> >>> > Das.Linux@ >>> >>> > > wrote: >>> > >>> >> >>> >> On 04.07.2016, at 22:44, Eliot Miranda < >>> >>> > eliot.miranda@ >>> >>> > > wrote: >>> >> >>> >> > Hi All, Hi Marcel, >>> >> > >>> >> > when I see code like this, and there's a lot of it in Morphic, >>> >> > >>> >> > !Flaps class methodsFor: 'testing' stamp: 'mt 5/17/2016 14:17'! >>> >> > anyFlapsVisibleIn: aWorld >>> >> > >>> >> > aWorld submorphsDo: [:m | >>> >> > (m isKindOf: FlapTab) ifTrue: [^ true]]. >>> >> > >>> >> > ^ false! ! >>> >> > >>> >> > I think this is performance thrown on the floor (isKindOf: is >>> awfully >>> >> slow, especially in huge hierarchies like Morphic, and bad design, >>> >> restricting one to a concrete class). And I think that Morph >>> provides a >>> >> perfect place to put an extension that doesn't pollute Object. So I >>> >> would >>> >> like to see >>> >> > >>> >> > anyFlapsVisibleIn: aWorld >>> >> > >>> >> > aWorld submorphsDo: >>> >> > [:m| m isFlapTab ifTrue: [^true]]. >>> >> > ^ false! ! >>> >> > >>> >> > with the emphasis on isFlapTab ;-) >>> >> >>> >> Well, class testing seems to be a Morphic pattern, given #findA: >>> (alias >>> >> #submorphOfClass:) >>> >> >>> > >>> > I don't care. It's *WRONG*. isKindOf: is a _bug_. >>> > >>> > >>> >> >>> >> Best regards >>> >> -Tobias >>> >> PS: Not advocating anything just reporting what I found >>> >> >>> > >>> > >>> > >>> > -- >>> > _,,,^..^,,,_ >>> > best, Eliot >>> >>> Hey Eliot, >>> >>> no, it's not a bug. ;-) >> >> >> Yes, isKindOf: *is* a bug, at least in the usage of determining supported >> messages. Smalltalk has ad-hoc polymorphism that allows any class to >> implement and set of messages, without having to inherit from a >> superclasss >> that defines that set of messages. isKindOf: breaks this property; it >> restricts the designer to using a concrete class, in violation of the >> language's flexibility. isKindOf: is therefore most definitely a bug. >> >> One might think there are valid uses when editing a class hierarchy >> programmatically. But for this there are messages understood by classes, >> not instances, such as includesBehavior:, inheritsFrom: etc. These are >> legitimate. But isKindOf: is not. It is a horrible hack. >> >> Although, there is room for improvement. #isFlapTab >>> sounds good. Note that this is not even a critical piece of code because >>> is >>> only called if you open a system window, for example. >>> >>> Try [Flaps anyFlapsVisibleIn: ActiveWorld] bench. It's fast enough. A >>> microsecond here, having around 30 windows open. So, you will not notice >>> a >>> delay. Still, you're right. We should reduce the usage of #isKindOf:. >>> >>> Not polluting Object means still polluting Morph. >>> >>> (Yeah, maybe we should use slower computers to program.) >>> >>> Checks we should consider to add or use more often if it is already >>> there: >>> #isCornerGripMorph >>> #isProportionalSplitterMorph >>> #isCompiledMethod >>> #isColor >>> #isInfiniteForm >>> >>> ... still, a quick look through the usage of #isKindOf: in Morphic code >>> revealed no serious performance issues. We should refactor MenuMorph to >>> not >>> need #isKindOf: that often. This might also be true for other places. >>> >>> The pattern "isClass" is not always a good solution for many cases in >>> the >>> system. >>> >>> Best, >>> Marcel >>> >>> >>> >>> -- >>> View this message in context: >>> http://forum.world.st/isKindOf-in-Morphic-code-tp4904890p4904895.html >>> Sent from the Squeak - Dev mailing list archive at Nabble.com. >>> >>> >> >> >> -- >> _,,,^..^,,,_ >> best, Eliot > @Phil: #isKindOf: is no better or worse than the #isClass-check. Maybe > performance-wise, but arguably not in terms of architecture and code > design. While #isClass might be a little closer to idiomatic Smalltalk > code, it should never be used as an excuse for bad design. > > @all: I do see beauty in the pattern of asClass/isClass. For example, > asSet/isSet, asOrderedCollection/isOrderedCollection. > > However, anytime a programmer tends to use a type-check and there is no > "isClass" available, I would rather suggest him to use #isKindOf: for the > moment instead of adding another two methods to encode the "isClass" in > both base class and subclass. Always think twice before blowing up a > class' interface. It impedes code readability. Especially if we are > talking about a base class that is already that big, like Morph. Then, if > there is really no other choice -- design-wise -- one has to consider > performance. #isKindOf: is expensive. Okay. Then you can easily add the > isClass-check. Fine. > > Sorry, but this is absolutely no black-white decision as Eliot and Phil > proposed. There are many factors to consider. Semantics, code/interface > readability, performance, idioms. > > In many cases -- if not all -- I suspect a design issue behind the use of > #isKindOf: or #isClass. Still, I do like #respondsTo: because it is > specific to a scenario/domain and leverages the dynamic capabilities of > Smalltalk. For example, "model respondsTo: #foobar" as an extension point > in graphical widgets. > > We should *not* batch-convert all uses of #isKindOf: to an #isClass check > but use our Senders-Tools to hunt down all the design issues left in the > system. > > Best, > Marcel One more thing: If you really consider to implement the "isClass" check in two unrelated branches of an inheritance tree, you arguably have a design issue. Just use #respondsTo:. For example, TranscriptStream should not implement #isModel but rather implement the Model interface as needed. #respondsTo: will work fine. Best, Marcel -- View this message in context: http://forum.world.st/isKindOf-in-Morphic-code-tp4904890p4904937.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Tue Jul 5 07:48:25 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Jul 5 08:30:05 2016 Subject: [squeak-dev] Re: invisible unselectable morph covering all my other morphs? In-Reply-To: References: Message-ID: <1467704905998-4904939.post@n4.nabble.com> Eliot Miranda-2 wrote > Hi Morphic Mavens, > > anyone out there able to help me unstick a very important project that > appears to have some large morph taking all mouse clicks away from any > other morph in the project? Anyone seen this and have a way out? When I > hit the Halos mouse button on a specific windows or menu the halos come up > all around the entire screen. Attempts to select the halo fail. Hitting > the halo button a second time dismisses the halo. I can enter and exit > the > project, but once inside cannot interact with existing windows. I can > create new windows, but these are also unresponsive. > _,,,^..^,,,_ > best, Eliot Hi Eliot, you've got mail. :-) Try: HandMorph allInstancesDo: [:hand | hand initForEvents; releaseKeyboardFocus; releaseMouseFocus]. SystemWindow reconfigureWindowsForFocus. This seems to be no giant invisible morph but an issue with dispatching user input events. Best, Marcel -- View this message in context: http://forum.world.st/invisible-unselectable-morph-covering-all-my-other-morphs-tp4904896p4904939.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From pbpublist at gmail.com Tue Jul 5 10:13:21 2016 From: pbpublist at gmail.com (Phil (list)) Date: Tue Jul 5 10:13:28 2016 Subject: [squeak-dev] Re: isKindOf: in Morphic code... In-Reply-To: <1467704524822-4904935.post@n4.nabble.com> References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> <1467665892252-4904895.post@n4.nabble.com> <1467704524822-4904935.post@n4.nabble.com> Message-ID: <1467713601.2327.78.camel@gmail.com> Marcel, On Tue, 2016-07-05 at 00:42 -0700, marcel.taeumel wrote: >? > > @Phil: #isKindOf: is no better or worse than the #isClass-check. > Maybe > performance-wise, but arguably not in terms of architecture and code > design. > While #isClass might be a little closer to idiomatic Smalltalk code, > it > should never be used as an excuse for bad design. > It's not an #isClass-check, it's an #isProtocolCollectionCompliant- check. ?It is worse both from a performance and an architecture standpoint to use #isKindOf:. ?I agree that no amount of calling the 'correct' method (if there are such things) makes up for bad design, but that's not the argument here. > @all: I do see beauty in the pattern of asClass/isClass. For example, > asSet/isSet, asOrderedCollection/isOrderedCollection.? > > However, anytime a programmer tends to use a type-check and there is > no > "isClass" available, I would rather suggest him to use #isKindOf: for > the > moment instead of adding another two methods to encode the "isClass" > in both > base class and subclass. Always think twice before blowing up a > class' > interface. It impedes code readability. Especially if we are talking > about a > base class that is already that big, like Morph. Then, if there is > really no > other choice -- design-wise -- one has to consider performance. > #isKindOf: > is expensive. Okay. Then you can easily add the isClass-check. Fine. > > Sorry, but this is absolutely no black-white decision as Eliot and > Phil We'll have to agree to disagree on this point. ?Type checking is fundamentally doing it wrong IMO. > proposed. There are many factors to consider. Semantics, > code/interface > readability, performance, idioms. > > In many cases -- if not all -- I suspect a design issue behind the > use of > #isKindOf: or #isClass. Still, I do like #respondsTo: because it is > specific > to a scenario/domain and leverages the dynamic capabilities of > Smalltalk. > For example, "model respondsTo: #foobar" as an extension point in > graphical > widgets. > Don't conflate what these methods are named with the role they perform. ?While many of the #is* methods may appear to be class checks, if used properly they are actually checks for compliance with collections of protocols. (this would be easier to see if Smalltalk in general did a better job of formalizing protocols) ?I understand that many Smalltalkers don't look at them this way, but I would argue that they should. Here are a few examples of why the distinction matters: 1) Proxy objects. ?If I create a ProtoObject subclass as my proxy wrapper and pass it into code that does an #isKindOf: check, it will blow up even though it may be a proxy for exactly the kind of object being tested for. ?If it does an #is* check, that will get forwarded to the actual object and things will work as expected. ?Don't look at what I am, look at what I tell you I can do! 2) Parallel and/or alternate class hierarchies that are functionally equivalent or supersets. ?Let's say you have created an alternate hierarchy for Magnitude and its subclasses. ?If you implement the appropriate methods and respond true to #is* (i.e. whatever it is behaving like), why should (most) receivers of these objects need to know or care that my MyFractionLike objects aren't actually instances of Fraction, a subclass of it, or even in the Magnitude hierarchy? 3) A class that is close enough and wants to appear to be, but in reality is something very different from, the thing it responded true to for #is*. ?I have a number of things that do this in places in the class hierarchy that make the most sense from an implementation standpoint, but not necessarily from a taxonomy standpoint. There are even one or two places in the base Squeak class hierarchy where classes aren't necessarily where they 'should' be from a taxonomy standpoint... so be it. Testing for behavior, not class name or location in the hierarchy, is the way to go. Thanks, Phil > We should *not* batch-convert all uses of #isKindOf: to an #isClass > check > but use our Senders-Tools to hunt down all the design issues left in > the > system. > > Best, > Marcel > >? From btc at openinworld.com Tue Jul 5 10:23:33 2016 From: btc at openinworld.com (Ben Coman) Date: Tue Jul 5 10:23:56 2016 Subject: [squeak-dev] A $140 pc for running Squeak In-Reply-To: <6E1D1312-3531-483B-8C8C-481CA54E4152@rowledge.org> References: <81C530DB-6D5B-4394-B571-EE90356D38B9@rowledge.org> <6E1D1312-3531-483B-8C8C-481CA54E4152@rowledge.org> Message-ID: On Tue, Jul 5, 2016 at 12:31 PM, tim Rowledge wrote: > >> On 30-06-2016, at 9:04 PM, Ben Coman wrote: > {snip} >> What age group are you working > > Sorry, forgot to answer this; we?re setting up kids summer camp deal aimed at 12-16 range. Classes in Scratch, robotics, 3d printing, alternative energy, simple electrics and electronics, skynet programming and global revolution planning. See https://makerspacenanaimo.org/stemosity/ for a still rather undeveloped website. In particular the ?how to bring down your nation with a stupid referendum? section needs work. > > We?ve done quite a few events and one-time classes up here in the wilds of the Great White North and it seems to be popular. Thanks for the link. Looks like a nice setup. My daughters are 6 & 8, so I like to keep tabs on stuff being done with different age groups. Need to get my girls into Scratch soon. cheers -ben From lecteur at zogotounga.net Tue Jul 5 10:34:46 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Tue Jul 5 10:34:43 2016 Subject: [squeak-dev] Re: isKindOf: in Morphic code... In-Reply-To: <1467704750209-4904937.post@n4.nabble.com> References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> <1467665892252-4904895.post@n4.nabble.com> <1467704524822-4904935.post@n4.nabble.com> <1467704750209-4904937.post@n4.nabble.com> Message-ID: > One more thing: If you really consider to implement the "isClass" check in > two unrelated branches of an inheritance tree, you arguably have a design > issue. Just use #respondsTo:. For example, TranscriptStream should not > implement #isModel but rather implement the Model interface as needed. > #respondsTo: will work fine. How fast is #respondsTo:? Can it be used in a tight loop? Stef From Marcel.Taeumel at hpi.de Tue Jul 5 10:33:50 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Jul 5 11:15:31 2016 Subject: [squeak-dev] Re: isKindOf: in Morphic code... In-Reply-To: <1467713601.2327.78.camel@gmail.com> References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> <1467665892252-4904895.post@n4.nabble.com> <1467704524822-4904935.post@n4.nabble.com> <1467713601.2327.78.camel@gmail.com> Message-ID: <1467714830769-4904965.post@n4.nabble.com> Phil (list) wrote > Marcel, > > On Tue, 2016-07-05 at 00:42 -0700, marcel.taeumel wrote: >>? >> >> @Phil: #isKindOf: is no better or worse than the #isClass-check. >> Maybe >> performance-wise, but arguably not in terms of architecture and code >> design. >> While #isClass might be a little closer to idiomatic Smalltalk code, >> it >> should never be used as an excuse for bad design. >> > > It's not an #isClass-check, it's an #isProtocolCollectionCompliant- > check. ?It is worse both from a performance and an architecture > standpoint to use #isKindOf:. ?I agree that no amount of calling the > 'correct' method (if there are such things) makes up for bad design, > but that's not the argument here. > >> @all: I do see beauty in the pattern of asClass/isClass. For example, >> asSet/isSet, asOrderedCollection/isOrderedCollection.? >> >> However, anytime a programmer tends to use a type-check and there is >> no >> "isClass" available, I would rather suggest him to use #isKindOf: for >> the >> moment instead of adding another two methods to encode the "isClass" >> in both >> base class and subclass. Always think twice before blowing up a >> class' >> interface. It impedes code readability. Especially if we are talking >> about a >> base class that is already that big, like Morph. Then, if there is >> really no >> other choice -- design-wise -- one has to consider performance. >> #isKindOf: >> is expensive. Okay. Then you can easily add the isClass-check. Fine. >> >> Sorry, but this is absolutely no black-white decision as Eliot and >> Phil > > We'll have to agree to disagree on this point. ?Type checking is > fundamentally doing it wrong IMO. > >> proposed. There are many factors to consider. Semantics, >> code/interface >> readability, performance, idioms. >> >> In many cases -- if not all -- I suspect a design issue behind the >> use of >> #isKindOf: or #isClass. Still, I do like #respondsTo: because it is >> specific >> to a scenario/domain and leverages the dynamic capabilities of >> Smalltalk. >> For example, "model respondsTo: #foobar" as an extension point in >> graphical >> widgets. >> > > Don't conflate what these methods are named with the role they perform. > ?While many of the #is* methods may appear to be class checks, if used > properly they are actually checks for compliance with collections of > protocols. (this would be easier to see if Smalltalk in general did a > better job of formalizing protocols) ?I understand that many > Smalltalkers don't look at them this way, but I would argue that they > should. > > Here are a few examples of why the distinction matters: > > 1) Proxy objects. ?If I create a ProtoObject subclass as my proxy > wrapper and pass it into code that does an #isKindOf: check, it will > blow up even though it may be a proxy for exactly the kind of object > being tested for. ?If it does an #is* check, that will get forwarded to > the actual object and things will work as expected. ?Don't look at what > I am, look at what I tell you I can do! > > 2) Parallel and/or alternate class hierarchies that are functionally > equivalent or supersets. ?Let's say you have created an alternate > hierarchy for Magnitude and its subclasses. ?If you implement the > appropriate methods and respond true to #is* (i.e. whatever it is > behaving like), why should (most) receivers of these objects need to > know or care that my MyFractionLike objects aren't actually instances > of Fraction, a subclass of it, or even in the Magnitude hierarchy? > > 3) A class that is close enough and wants to appear to be, but in > reality is something very different from, the thing it responded true > to for #is*. ?I have a number of things that do this in places in the > class hierarchy that make the most sense from an implementation > standpoint, but not necessarily from a taxonomy standpoint. There are > even one or two places in the base Squeak class hierarchy where > classes aren't necessarily where they 'should' be from a taxonomy > standpoint... so be it. > > Testing for behavior, not class name or location in the hierarchy, is > the way to go. > > Thanks, > Phil > >> We should *not* batch-convert all uses of #isKindOf: to an #isClass >> check >> but use our Senders-Tools to hunt down all the design issues left in >> the >> system. >> >> Best, >> Marcel >> >>? Hi Phil, code lives. It should get improved if new requirements become obvious. #isKindOf: can be a valid (itermediate) step on this road of code evolution. You cannot account for any possible extension points of applications that might be created in the system. This is what refactoring is for. If an #isClass check is added, it will become part of the interface and callable from any application. If it remains an #isKindOf: check, it might still evolve towards not needing such a check at all. Removing an #isClass check later might break applications that already rely on it. So, like many parts in the system, using #isKindOf: can be seen as an intermediate step. Now, programmers should be encouraged to also go the next step and think about whether it should become an #isClass check or whether the check is necessary at all. Such a decision cannot be made by a computer progam / automatically. Programmers have to review the code, think about it, decide, and implement/refactor. Calling this phenomenon a "bug" does not feel right. It feels like a blame on some particular developers. I don't think it is. We only have so much time. Best, Marcel -- View this message in context: http://forum.world.st/isKindOf-in-Morphic-code-tp4904890p4904965.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lecteur at zogotounga.net Tue Jul 5 11:52:39 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Tue Jul 5 11:52:36 2016 Subject: [squeak-dev] Re: isKindOf: in Morphic code... In-Reply-To: <1467714830769-4904965.post@n4.nabble.com> References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> <1467665892252-4904895.post@n4.nabble.com> <1467704524822-4904935.post@n4.nabble.com> <1467713601.2327.78.camel@gmail.com> <1467714830769-4904965.post@n4.nabble.com> Message-ID: <42d8ff61-efa0-8d6f-ec0b-6cd3553b3443@zogotounga.net> > Calling this phenomenon a "bug" does not feel right. It feels like a blame > on some particular developers. I don't think it is. +1 Stef From karlramberg at gmail.com Tue Jul 5 13:17:24 2016 From: karlramberg at gmail.com (karl ramberg) Date: Tue Jul 5 13:17:29 2016 Subject: [squeak-dev] Re: isKindOf: in Morphic code... In-Reply-To: <42d8ff61-efa0-8d6f-ec0b-6cd3553b3443@zogotounga.net> References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> <1467665892252-4904895.post@n4.nabble.com> <1467704524822-4904935.post@n4.nabble.com> <1467713601.2327.78.camel@gmail.com> <1467714830769-4904965.post@n4.nabble.com> <42d8ff61-efa0-8d6f-ec0b-6cd3553b3443@zogotounga.net> Message-ID: A lot of the isKindOf: sends is used to find specific submorphs. ButtonMorph>>label | s | s := ''. self allMorphsDo: [:m | (m isKindOf: StringMorph) ifTrue: [s := m contents]]. ^ s One could give names to the submorphs as they are initialized, all morphs understand 'name:' Would that be a solution ? Best, Karl On Tue, Jul 5, 2016 at 1:52 PM, St?phane Rollandin wrote: > Calling this phenomenon a "bug" does not feel right. It feels like a blame >> on some particular developers. I don't think it is. >> > > +1 > > Stef > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160705/9acfc386/attachment.htm From tim at rowledge.org Tue Jul 5 16:46:30 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue Jul 5 16:46:04 2016 Subject: [squeak-dev] Re: isKindOf: in Morphic code... In-Reply-To: References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> <1467665892252-4904895.post@n4.nabble.com> <1467704524822-4904935.post@n4.nabble.com> <1467713601.2327.78.camel@gmail.com> <1467714830769-4904965.post@n4.nabble.com> <42d8ff61-efa0-8d6f-ec0b-6cd3553b3443@zogotounga.net> Message-ID: > On 05-07-2016, at 6:17 AM, karl ramberg wrote: > > A lot of the isKindOf: sends is used to find specific submorphs. > > ButtonMorph>>label > | s | > s := ''. > self allMorphsDo: [:m | (m isKindOf: StringMorph) ifTrue: [s := m contents]]. > ^ s > > One could give names to the submorphs as they are initialized, all morphs understand 'name:' > > Would that be a solution ? That?s close to what I was suggesting except that I don?t much like the idea of giving a morph a name; it would be more effective to have an instvar in the *owner* and properly track the owned morph that way. For example in a ButtonMorph I suggest we should have an instvar ?label? and when we set the label morph it should be put in that instvar as well as in the submorphs list. That way we can find it quickly, correctly, without the isKindOf: or even isTextMorph. And after all, both of those prevent a graphic label. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful Latin Phrases:- Oblitus sum perpolire clepsydras! = I forgot to polish the clocks! From tim at rowledge.org Tue Jul 5 17:01:30 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue Jul 5 17:01:03 2016 Subject: [squeak-dev] isKindOf: in Morphic code... In-Reply-To: <1467704750209-4904937.post@n4.nabble.com> References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> <1467665892252-4904895.post@n4.nabble.com> <1467704524822-4904935.post@n4.nabble.com> <1467704750209-4904937.post@n4.nabble.com> Message-ID: <4EC2AEFE-BC3B-4DC7-BF63-9AFB91344889@rowledge.org> > On 05-07-2016, at 12:45 AM, marcel.taeumel wrote: > > One more thing: If you really consider to implement the "isClass" check in > two unrelated branches of an inheritance tree, you arguably have a design > issue. Just use #respondsTo:. For example, TranscriptStream should not > implement #isModel but rather implement the Model interface as needed. > #respondsTo: will work fine. I disagree. Not to checking for protocol but to using #respondsTo: - it?s even slower that isKindOf: ! It doesn?t simply climb the class tree checking the class name, it climbs the class tree checking the name of every method in the methodDictionary! The big issue is the design failure implied by the use of this sort of test; we ought to solve as many of those as possible as soon as possible. Swapping an isKindOf: for some isFoo usage is not ideal by any stretch of the imagination but it can at least solve some important performance problems and it at least allows for multiple classes in disjoint hierarchies to respond sensibly. A better choice of names will often help make life clearer - for example #canBeButtonMorphLabel would be much better than #isStringMorph. At least that hints at a protocol test rather class membership. We could, of course, implement a real protocol management & testing capability. At one time I thought that Traits might do that but they went moribund before ever really coming to life. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim An elephant is a mouse with an operating system. From Das.Linux at gmx.de Tue Jul 5 17:02:45 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Jul 5 17:02:52 2016 Subject: [squeak-dev] Re: isKindOf: in Morphic code... In-Reply-To: References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> <1467665892252-4904895.post@n4.nabble.com> <1467704524822-4904935.post@n4.nabble.com> <1467713601.2327.78.camel@gmail.com> <1467714830769-4904965.post@n4.nabble.com> <42d8ff61-efa0-8d6f-ec0b-6cd3553b3443@zogotounga.net> Message-ID: <1B7E9D3D-B437-424F-9389-A4B24C236E22@gmx.de> On 05.07.2016, at 18:46, tim Rowledge wrote: >> On 05-07-2016, at 6:17 AM, karl ramberg wrote: >> >> A lot of the isKindOf: sends is used to find specific submorphs. >> >> ButtonMorph>>label >> | s | >> s := ''. >> self allMorphsDo: [:m | (m isKindOf: StringMorph) ifTrue: [s := m contents]]. >> ^ s >> >> One could give names to the submorphs as they are initialized, all morphs understand 'name:' >> >> Would that be a solution ? > > That?s close to what I was suggesting except that I don?t much like the idea of giving a morph a name; it would be more effective to have an instvar in the *owner* and properly track the owned morph that way. For example in a ButtonMorph I suggest we should have an instvar ?label? and when we set the label morph it should be put in that instvar as well as in the submorphs list. That way we can find it quickly, correctly, without the isKindOf: or even isTextMorph. And after all, both of those prevent a graphic label. What If I drop some other StringMorph onto the Button morph and make it a submorph of it? It's simple morph composition and the new morph would just act as label. This is captured by the behavior above or some protocol-testing methods but not if ButtonMorph itself would manage what its label morph is. I know this sounds arcane, but Morphic is a very direct-manipulation environment and a lot of things are determined by structure rather than explicit management. I find that noteworthy, interesting, and a little bit intriguing. After all, "only" the development tools make little use of that. It's different in etoys as far as I can tell. If you make a development tool, its imho wise to maintain all the administrative stuff flying around, labels, lists, buttons, check boxes, the like. But in "general" Morphic, determination by looking at what your submorphs are or can do (sic!) seems fine. Best regards -Tobias :) > > > tim From eliot.miranda at gmail.com Tue Jul 5 17:22:23 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Jul 5 17:22:33 2016 Subject: [squeak-dev] Re: invisible unselectable morph covering all my other morphs? In-Reply-To: <1467704905998-4904939.post@n4.nabble.com> References: <1467704905998-4904939.post@n4.nabble.com> Message-ID: Hmmm, thanks. No joy. Are you around? On Tue, Jul 5, 2016 at 12:48 AM, marcel.taeumel wrote: > Eliot Miranda-2 wrote > > Hi Morphic Mavens, > > > > anyone out there able to help me unstick a very important project > that > > appears to have some large morph taking all mouse clicks away from any > > other morph in the project? Anyone seen this and have a way out? When I > > hit the Halos mouse button on a specific windows or menu the halos come > up > > all around the entire screen. Attempts to select the halo fail. Hitting > > the halo button a second time dismisses the halo. I can enter and exit > > the > > project, but once inside cannot interact with existing windows. I can > > create new windows, but these are also unresponsive. > > _,,,^..^,,,_ > > best, Eliot > > Hi Eliot, you've got mail. :-) > > Try: > HandMorph allInstancesDo: [:hand | hand initForEvents; > releaseKeyboardFocus; > releaseMouseFocus]. > SystemWindow reconfigureWindowsForFocus. > > This seems to be no giant invisible morph but an issue with dispatching > user > input events. > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/invisible-unselectable-morph-covering-all-my-other-morphs-tp4904896p4904939.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160705/08148cd5/attachment.htm From karlramberg at gmail.com Tue Jul 5 17:26:36 2016 From: karlramberg at gmail.com (karl ramberg) Date: Tue Jul 5 17:26:40 2016 Subject: [squeak-dev] Re: invisible unselectable morph covering all my other morphs? In-Reply-To: References: <1467704905998-4904939.post@n4.nabble.com> Message-ID: Right clicking will cycle trough halos for different morhs On Tue, Jul 5, 2016 at 7:22 PM, Eliot Miranda wrote: > Hmmm, thanks. No joy. Are you around? > > On Tue, Jul 5, 2016 at 12:48 AM, marcel.taeumel > wrote: > >> Eliot Miranda-2 wrote >> > Hi Morphic Mavens, >> > >> > anyone out there able to help me unstick a very important project >> that >> > appears to have some large morph taking all mouse clicks away from any >> > other morph in the project? Anyone seen this and have a way out? When >> I >> > hit the Halos mouse button on a specific windows or menu the halos come >> up >> > all around the entire screen. Attempts to select the halo fail. >> Hitting >> > the halo button a second time dismisses the halo. I can enter and exit >> > the >> > project, but once inside cannot interact with existing windows. I can >> > create new windows, but these are also unresponsive. >> > _,,,^..^,,,_ >> > best, Eliot >> >> Hi Eliot, you've got mail. :-) >> >> Try: >> HandMorph allInstancesDo: [:hand | hand initForEvents; >> releaseKeyboardFocus; >> releaseMouseFocus]. >> SystemWindow reconfigureWindowsForFocus. >> >> This seems to be no giant invisible morph but an issue with dispatching >> user >> input events. >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/invisible-unselectable-morph-covering-all-my-other-morphs-tp4904896p4904939.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> > > > -- > _,,,^..^,,,_ > best, Eliot > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160705/b87d3e80/attachment.htm From eliot.miranda at gmail.com Tue Jul 5 18:21:23 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Jul 5 18:21:30 2016 Subject: [squeak-dev] Re: isKindOf: in Morphic code... In-Reply-To: <1467704524822-4904935.post@n4.nabble.com> References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> <1467665892252-4904895.post@n4.nabble.com> <1467704524822-4904935.post@n4.nabble.com> Message-ID: On Tue, Jul 5, 2016 at 12:42 AM, marcel.taeumel wrote: > Eliot Miranda-2 wrote > > On Mon, Jul 4, 2016 at 1:58 PM, marcel.taeumel < > > > Marcel.Taeumel@ > > > > > > wrote: > > > >> Eliot Miranda-2 wrote > >> > On Mon, Jul 4, 2016 at 1:59 PM, Tobias Pape < > >> > >> > Das.Linux@ > >> > >> > > wrote: > >> > > >> >> > >> >> On 04.07.2016, at 22:44, Eliot Miranda < > >> > >> > eliot.miranda@ > >> > >> > > wrote: > >> >> > >> >> > Hi All, Hi Marcel, > >> >> > > >> >> > when I see code like this, and there's a lot of it in Morphic, > >> >> > > >> >> > !Flaps class methodsFor: 'testing' stamp: 'mt 5/17/2016 14:17'! > >> >> > anyFlapsVisibleIn: aWorld > >> >> > > >> >> > aWorld submorphsDo: [:m | > >> >> > (m isKindOf: FlapTab) ifTrue: [^ true]]. > >> >> > > >> >> > ^ false! ! > >> >> > > >> >> > I think this is performance thrown on the floor (isKindOf: is > >> awfully > >> >> slow, especially in huge hierarchies like Morphic, and bad design, > >> >> restricting one to a concrete class). And I think that Morph > provides > >> a > >> >> perfect place to put an extension that doesn't pollute Object. So I > >> >> would > >> >> like to see > >> >> > > >> >> > anyFlapsVisibleIn: aWorld > >> >> > > >> >> > aWorld submorphsDo: > >> >> > [:m| m isFlapTab ifTrue: [^true]]. > >> >> > ^ false! ! > >> >> > > >> >> > with the emphasis on isFlapTab ;-) > >> >> > >> >> Well, class testing seems to be a Morphic pattern, given #findA: > >> (alias > >> >> #submorphOfClass:) > >> >> > >> > > >> > I don't care. It's *WRONG*. isKindOf: is a _bug_. > >> > > >> > > >> >> > >> >> Best regards > >> >> -Tobias > >> >> PS: Not advocating anything just reporting what I found > >> >> > >> > > >> > > >> > > >> > -- > >> > _,,,^..^,,,_ > >> > best, Eliot > >> > >> Hey Eliot, > >> > >> no, it's not a bug. ;-) > > > > > > Yes, isKindOf: *is* a bug, at least in the usage of determining supported > > messages. Smalltalk has ad-hoc polymorphism that allows any class to > > implement and set of messages, without having to inherit from a > > superclasss > > that defines that set of messages. isKindOf: breaks this property; it > > restricts the designer to using a concrete class, in violation of the > > language's flexibility. isKindOf: is therefore most definitely a bug. > > > > One might think there are valid uses when editing a class hierarchy > > programmatically. But for this there are messages understood by classes, > > not instances, such as includesBehavior:, inheritsFrom: etc. These are > > legitimate. But isKindOf: is not. It is a horrible hack. > > > > Although, there is room for improvement. #isFlapTab > >> sounds good. Note that this is not even a critical piece of code because > >> is > >> only called if you open a system window, for example. > >> > >> Try [Flaps anyFlapsVisibleIn: ActiveWorld] bench. It's fast enough. A > >> microsecond here, having around 30 windows open. So, you will not notice > >> a > >> delay. Still, you're right. We should reduce the usage of #isKindOf:. > >> > >> Not polluting Object means still polluting Morph. > >> > >> (Yeah, maybe we should use slower computers to program.) > >> > >> Checks we should consider to add or use more often if it is already > >> there: > >> #isCornerGripMorph > >> #isProportionalSplitterMorph > >> #isCompiledMethod > >> #isColor > >> #isInfiniteForm > >> > >> ... still, a quick look through the usage of #isKindOf: in Morphic code > >> revealed no serious performance issues. We should refactor MenuMorph to > >> not > >> need #isKindOf: that often. This might also be true for other places. > >> > >> The pattern "isClass" is not always a good solution for many cases in > the > >> system. > >> > >> Best, > >> Marcel > >> > >> > >> > >> -- > >> View this message in context: > >> http://forum.world.st/isKindOf-in-Morphic-code-tp4904890p4904895.html > >> Sent from the Squeak - Dev mailing list archive at Nabble.com. > >> > >> > > > > > > -- > > _,,,^..^,,,_ > > best, Eliot > > @Phil: #isKindOf: is no better or worse than the #isClass-check. Maybe > performance-wise, but arguably not in terms of architecture and code > design. > While #isClass might be a little closer to idiomatic Smalltalk code, it > should never be used as an excuse for bad design. > That's simply incorrect, and misunderstands Smalltalk dynamic typing. And it is precisely in terms of architecture and design that it is worse (although in performance terms it is terrible, especially when disconfirming membership). Consider Random and ReadStream. Random inherits from Object, not PositionableStream, yet it provides a subset of the Stream interface via next, next: and next:into:. PositionableStream provides the layout of inst vars that used to be expected by the VM primitives for next, nextPut: and position that used to be required for performance but no longer are. So there is no practical benefit to have Random inherit from PositionableStream, but Random *is* a Stream. So were we to want to test for streamness we *could* implement isStream in both PostionableStream and Random to answer true and in Object to answer false, but we *could not* use aRandom isKindOf: PositionableStream. So as I stated before, isFoo supports ad-hoc polymorphism, allowing the designer to use inheritance for reuse, and freeing them from (mis) using it for "type". Whereas isKindOf: restricts designs to increasingly rigid and brittle class hierarchies, which prevent natural Smalltalk style by a broken convention. So Phil simply misunderstands the issue. I stand by my assertion, backed by 35 years of Smalltalk programming, that isKindOf: _is a bug_. > @all: I do see beauty in the pattern of asClass/isClass. For example, > asSet/isSet, asOrderedCollection/isOrderedCollection. > > However, anytime a programmer tends to use a type-check and there is no > "isClass" available, I would rather suggest him to use #isKindOf: for the > moment instead of adding another two methods to encode the "isClass" in > both > base class and subclass. Always think twice before blowing up a class' > interface. It impedes code readability. Especially if we are talking about > a > base class that is already that big, like Morph. Then, if there is really > no > other choice -- design-wise -- one has to consider performance. #isKindOf: > is expensive. Okay. Then you can easily add the isClass-check. Fine. > isKindOf: is simply lazy. It's easy to implement the isFoo pattern, and it can be commented properly (for example, the comment can specify exactly which selectors the truth of the message implies). isKindOf: is quick and dirty, but potentially ambiguous. Precisely what API are we expecting the receiver to exhibit? Ugh. > Sorry, but this is absolutely no black-white decision as Eliot and Phil > proposed. There are many factors to consider. Semantics, code/interface > readability, performance, idioms. > > In many cases -- if not all -- I suspect a design issue behind the use of > #isKindOf: or #isClass. Still, I do like #respondsTo: because it is > specific > to a scenario/domain and leverages the dynamic capabilities of Smalltalk. > For example, "model respondsTo: #foobar" as an extension point in graphical > widgets. > > We should *not* batch-convert all uses of #isKindOf: to an #isClass check > but use our Senders-Tools to hunt down all the design issues left in the > system. > Agreed. If isKindOf: can be removed by better design, especially by double dispatching then great. But in cases where isKindOf: is used exclusively on general instances of some class other than Object (such as Morph), or arguably this and nil as well, replacing isKindOf: invocations can be done without polluting Object, and can provide much better documentation and performance, as well as the key design flexibility it provides. > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/isKindOf-in-Morphic-code-tp4904890p4904935.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160705/ba7284ac/attachment-0001.htm From asqueaker at gmail.com Tue Jul 5 18:34:52 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Jul 5 18:35:35 2016 Subject: [squeak-dev] isKindOf: in Morphic code... In-Reply-To: <4EC2AEFE-BC3B-4DC7-BF63-9AFB91344889@rowledge.org> References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> <1467665892252-4904895.post@n4.nabble.com> <1467704524822-4904935.post@n4.nabble.com> <1467704750209-4904937.post@n4.nabble.com> <4EC2AEFE-BC3B-4DC7-BF63-9AFB91344889@rowledge.org> Message-ID: What a great discussion! Excellent arguments on all sides. I agree with Marcel that we should not do wholesale conversion of isKindOf:'s -- they might be able to go away entirely someday by some factoring or cleanup. We should just convert them to standard #is* methods lazily, as tangible, real-world needs to do so arise. I do think its wrong to say an is* check represents a "design failure". Does using #isNil represent a design failure? No. There is nothing wrong with TSTTCPW. As Marcel said, code lives. Best, Chris On Tue, Jul 5, 2016 at 12:01 PM, tim Rowledge wrote: > >> On 05-07-2016, at 12:45 AM, marcel.taeumel wrote: >> >> One more thing: If you really consider to implement the "isClass" check in >> two unrelated branches of an inheritance tree, you arguably have a design >> issue. Just use #respondsTo:. For example, TranscriptStream should not >> implement #isModel but rather implement the Model interface as needed. >> #respondsTo: will work fine. > > I disagree. Not to checking for protocol but to using #respondsTo: - it?s even slower that isKindOf: ! It doesn?t simply climb the class tree checking the class name, it climbs the class tree checking the name of every method in the methodDictionary! > > The big issue is the design failure implied by the use of this sort of test; we ought to solve as many of those as possible as soon as possible. Swapping an isKindOf: for some isFoo usage is not ideal by any stretch of the imagination but it can at least solve some important performance problems and it at least allows for multiple classes in disjoint hierarchies to respond sensibly. A better choice of names will often help make life clearer - for example #canBeButtonMorphLabel would be much better than #isStringMorph. At least that hints at a protocol test rather class membership. > > We could, of course, implement a real protocol management & testing capability. At one time I thought that Traits might do that but they went moribund before ever really coming to life. > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > An elephant is a mouse with an operating system. > > > From lecteur at zogotounga.net Tue Jul 5 19:30:27 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Tue Jul 5 19:30:27 2016 Subject: [squeak-dev] isKindOf: in Morphic code... In-Reply-To: <4EC2AEFE-BC3B-4DC7-BF63-9AFB91344889@rowledge.org> References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> <1467665892252-4904895.post@n4.nabble.com> <1467704524822-4904935.post@n4.nabble.com> <1467704750209-4904937.post@n4.nabble.com> <4EC2AEFE-BC3B-4DC7-BF63-9AFB91344889@rowledge.org> Message-ID: <9dd0cafa-6d6c-61b4-89cd-a518be6b9805@zogotounga.net> > We could, of course, implement a real protocol management & testing capability. At one time I thought that Traits might do that but they went moribund before ever really coming to life. Yes, that is sad. We have always been missing the proper tools for working with Traits. Stef From lecteur at zogotounga.net Tue Jul 5 19:37:46 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Tue Jul 5 19:37:44 2016 Subject: [squeak-dev] Re: isKindOf: in Morphic code... In-Reply-To: References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> <1467665892252-4904895.post@n4.nabble.com> <1467704524822-4904935.post@n4.nabble.com> Message-ID: > isKindOf: is simply lazy. Agreed, but this can come in handy: a fast way to get things working while they are not yet in shape. I program instinctively and refactor a lot; I do use #isKindOf: at times when I do not yet know how the eventual protocol will look like. Stef From lewis at mail.msen.com Tue Jul 5 19:43:28 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Jul 5 19:43:31 2016 Subject: [squeak-dev] Re: isKindOf: in Morphic code... In-Reply-To: References: <2AA6002A-6AB1-4C4C-B7D4-EACC3EDE61AD@gmx.de> <1467665892252-4904895.post@n4.nabble.com> <1467704524822-4904935.post@n4.nabble.com> Message-ID: <20160705194328.GA47109@shell.msen.com> On Tue, Jul 05, 2016 at 11:21:23AM -0700, Eliot Miranda wrote: > > isKindOf: is simply lazy. It's easy to implement the isFoo pattern, and it > can be commented properly (for example, the comment can specify exactly > which selectors the truth of the message implies). isKindOf: is quick and > dirty, but potentially ambiguous. Precisely what API are we expecting the > receiver to exhibit? Ugh. > I have no particular opinions on any of this, but I do want to mention that Cuis has adopted an #is: Foo pattern, and if anyone is interested in making changes in this area I would recommend taking a close look at Juan's work in that area. Dave From commits at source.squeak.org Wed Jul 6 01:13:57 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jul 6 01:13:59 2016 Subject: [squeak-dev] The Trunk: System-eem.835.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-eem.835.mcz ==================== Summary ==================== Name: System-eem.835 Author: eem Time: 5 July 2016, 6:13:25.980763 pm UUID: 44354df1-cecb-414c-a705-daa84b7388dd Ancestors: System-eem.834 Fix reading methods from DataStreams on Spur. Old code used pre-Spur numLits header format, and was not 64-bit aware. =============== Diff against System-eem.834 =============== Item was changed: ----- Method: DataStream>>readMethod (in category 'write and read') ----- readMethod "PRIVATE -- Read the contents of an arbitrary instance. ASSUMES: readDataFrom:size: sends me beginReference: after it instantiates the new object but before reading nested objects. NOTE: We must restore the current reference position after recursive calls to next. Let the instance, not the class read the data. " | instSize refPosn newClass className xxHeader nLits byteCodeSizePlusTrailer newMethod lits | instSize := (byteStream nextNumber: 4) - 1. refPosn := self getCurrentReference. className := self next. newClass := Smalltalk at: className asSymbol. xxHeader := self next. "nArgs := (xxHeader >> 24) bitAnd: 16rF." "nTemps := (xxHeader >> 18) bitAnd: 16r3F." "largeBit := (xxHeader >> 17) bitAnd: 1." + nLits := xxHeader bitAnd: 16r7FFF. + byteCodeSizePlusTrailer := instSize - (newClass instSize "0") - (nLits + 1 * Smalltalk wordSize). - nLits := (xxHeader >> 9) bitAnd: 16rFF. - "primBits := ((xxHeader >> 19) bitAnd: 16r600) + (xxHeader bitAnd: 16r1FF)." - byteCodeSizePlusTrailer := instSize - (newClass instSize "0") - (nLits + 1 * 4). newMethod := newClass + newMethod: byteCodeSizePlusTrailer + header: xxHeader. - newMethod: byteCodeSizePlusTrailer - header: xxHeader. self setCurrentReference: refPosn. "before readDataFrom:size:" self beginReference: newMethod. lits := newMethod numLiterals + 1. "counting header" 2 to: lits do: [:ii | newMethod objectAt: ii put: self next]. + lits*Smalltalk wordSize+1 to: newMethod basicSize do: - lits*4+1 to: newMethod basicSize do: [:ii | newMethod basicAt: ii put: byteStream next]. "Get raw bytes directly from the file" self setCurrentReference: refPosn. "before returning to next" + ^newMethod! - ^ newMethod! From commits at source.squeak.org Wed Jul 6 01:16:51 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jul 6 01:16:56 2016 Subject: [squeak-dev] The Trunk: Kernel-eem.1031.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.1031.mcz ==================== Summary ==================== Name: Kernel-eem.1031 Author: eem Time: 5 July 2016, 6:16:17.071766 pm UUID: 04b233a5-6540-4c4b-8a79-64e8e4c12e65 Ancestors: Kernel-eem.1030 Provide support for saving blocks on DataStreams. The old code only allowed saving contewxts in image segments. This code allows only the contexts of blocks being saved to be saved, an saves them with nilled senders, and is careful to manage fields beyond the top of stack, storing and reading nils. With this code the following works, and one can e.g. save a MessageNames as a morph on file and read it in again. [:a :b| a > b] saveOnFileNamed: 'block.bin'. (MultiByteBinaryOrTextStream with: ((FileStream readOnlyFileNamed: 'block.bin') binary contentsOfEntireFile)) binary reset fileInObjectAndCode value: 2 value: 1 =============== Diff against Kernel-eem.1030 =============== Item was added: + ----- Method: BlockClosure>>outerContextsDo: (in category 'private') ----- + outerContextsDo: aBlock + "Evaluate aBlock with all the outer contexts along the receiver's static chain." + | outer | + outer := outerContext. + [outer notNil] whileTrue: + [aBlock value: outer. + outer := outer closure ifNotNil: [:outerClosure| outerClosure outerContext]]! Item was added: + ----- Method: BlockClosure>>storeDataOn: (in category 'objects from disk') ----- + storeDataOn: aDataStream + "Blocks are allowed go to out in DataStreams, but only without home senders." + + | contexts | + contexts := IdentitySet new. + aDataStream insideASegment ifFalse: + [self outerContextsDo: + [:ctxt| + contexts add: ctxt. + aDataStream replace: ctxt sender with: nil]]. + ^[super storeDataOn: aDataStream] + on: Notification + do: [:ex| + (contexts includes: ex tag) + ifTrue: [ex resume: ex tag] + ifFalse: [ex pass]]! Item was added: + ----- Method: ContextPart>>readDataFrom:size: (in category 'objects from disk') ----- + readDataFrom: aDataStream size: varsOnDisk + "Fill in the fields of self based on the contents of aDataStream. Answer self. + Read in the instance-variables written by Object>>storeDataOn:. + NOTE: This method must send beginReference: before reading any objects from aDataStream that might reference it. + Allow aDataStream to have fewer inst vars. See SmartRefStream. + Override to not store nil stack contents beyond stack pointer." + | cntInstVars cntIndexedVars | + + cntInstVars := self class instSize. + cntIndexedVars := varsOnDisk - cntInstVars. + cntIndexedVars < 0 ifTrue: + [self error: 'Class has changed too much. Define a convertxxx method']. + + aDataStream beginReference: self. + 1 to: cntInstVars do: + [:i | self instVarAt: i put: aDataStream next]. + 1 to: stackp do: + [:i | self basicAt: i put: aDataStream next]. + stackp + 1 to: cntIndexedVars do: + [:i | aDataStream next ~~ nil ifTrue: + [self error: 'Reading a Context''s contents expects only nil beyond top of stack']]. + "Total number read MUST be equal to varsOnDisk!!" + ^self "If we ever answer something other than self, fix calls + on (super readDataFrom: aDataStream size: anInteger)"! Item was changed: ----- Method: ContextPart>>storeDataOn: (in category 'objects from disk') ----- storeDataOn: aDataStream + "Contexts are not always allowed go to out in DataStreams. They must be included inside an ImageSegment, + or be being saved for a closure." + | cntInstVars cntIndexedVars | - "Contexts are not allowed go to out in DataStreams. They must be included inside an ImageSegment." + (aDataStream insideASegment + or: [(Notification new tag: self; signal) == self]) ifFalse: "or perhaps ImageSegments were not used at all" + [self error: 'This Context was not included in the ImageSegment']. - aDataStream insideASegment ifTrue: [^ super storeDataOn: aDataStream]. + cntInstVars := self class instSize. + cntIndexedVars := self method frameSize. + aDataStream + beginInstance: self class + size: cntInstVars + cntIndexedVars. + 1 to: cntInstVars do: + [:i | aDataStream nextPut: (self instVarAt: i)]. + 1 to: stackp do: + [:i | aDataStream nextPut: (self basicAt: i)]. + stackp + 1 to: cntIndexedVars do: + [:i | aDataStream nextPut: nil]! - self error: 'This Context was not included in the ImageSegment'. - "or perhaps ImageSegments were not used at all" - ^ nil! From Das.Linux at gmx.de Wed Jul 6 05:21:34 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Jul 6 05:21:38 2016 Subject: [squeak-dev] The Trunk: System-eem.835.mcz Message-ID: <55908F41-749C-4FAE-A00D-2F6CBF0B9064@gmx.de> On 06.07.2016, at 01:13, commits@source.squeak.org wrote: > Eliot Miranda uploaded a new version of System to project The Trunk: > http://source.squeak.org/trunk/System-eem.835.mcz > > ==================== Summary ==================== > > Name: System-eem.835 > Author: eem > Time: 5 July 2016, 6:13:25.980763 pm > UUID: 44354df1-cecb-414c-a705-daa84b7388dd > Ancestors: System-eem.834 > > Fix reading methods from DataStreams on Spur. Old code used pre-Spur numLits header format, and was not 64-bit aware. > Does that mean that pre-Spur methods on datastreams cannot be read in Spur images? That would be a bummer? Best regards -Tobias > =============== Diff against System-eem.834 =============== > > Item was changed: From eliot.miranda at gmail.com Wed Jul 6 06:17:07 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Jul 6 06:17:11 2016 Subject: [squeak-dev] The Trunk: System-eem.835.mcz In-Reply-To: <55908F41-749C-4FAE-A00D-2F6CBF0B9064@gmx.de> References: <55908F41-749C-4FAE-A00D-2F6CBF0B9064@gmx.de> Message-ID: On Tue, Jul 5, 2016 at 10:21 PM, Tobias Pape wrote: > > On 06.07.2016, at 01:13, commits@source.squeak.org wrote: > > > Eliot Miranda uploaded a new version of System to project The Trunk: > > http://source.squeak.org/trunk/System-eem.835.mcz > > > > ==================== Summary ==================== > > > > Name: System-eem.835 > > Author: eem > > Time: 5 July 2016, 6:13:25.980763 pm > > UUID: 44354df1-cecb-414c-a705-daa84b7388dd > > Ancestors: System-eem.834 > > > > Fix reading methods from DataStreams on Spur. Old code used pre-Spur > numLits header format, and was not 64-bit aware. > > > > Does that mean that pre-Spur methods on datastreams cannot be read in Spur > images? > That would be a bummer? > It needs some kind of version stamp on the stream. Point me to some such and we can switch hit. > > Best regards > -Tobias > > > =============== Diff against System-eem.834 =============== > > > > Item was changed: > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160705/05b821e4/attachment.htm From Das.Linux at gmx.de Wed Jul 6 07:23:45 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Jul 6 07:23:49 2016 Subject: [squeak-dev] The Trunk: System-eem.835.mcz In-Reply-To: References: <55908F41-749C-4FAE-A00D-2F6CBF0B9064@gmx.de> Message-ID: <3712B695-BAE6-4AB5-BC56-2B2675558F40@gmx.de> On 06.07.2016, at 08:17, Eliot Miranda wrote: > On Tue, Jul 5, 2016 at 10:21 PM, Tobias Pape wrote: > > On 06.07.2016, at 01:13, commits@source.squeak.org wrote: > > > Eliot Miranda uploaded a new version of System to project The Trunk: > > http://source.squeak.org/trunk/System-eem.835.mcz > > > > ==================== Summary ==================== > > > > Name: System-eem.835 > > Author: eem > > Time: 5 July 2016, 6:13:25.980763 pm > > UUID: 44354df1-cecb-414c-a705-daa84b7388dd > > Ancestors: System-eem.834 > > > > Fix reading methods from DataStreams on Spur. Old code used pre-Spur numLits header format, and was not 64-bit aware. > > > > Does that mean that pre-Spur methods on datastreams cannot be read in Spur images? > That would be a bummer? > > It needs some kind of version stamp on the stream. Point me to some such and we can switch hit. There is none. I would say, we store the data in the format DataStream already know (which happens to be the Pre-Spur version) and adapt on read. That would ensure backward- and forward-compatibility: - We could still read CMs serialized in pre-spur. - We could also read Spur-CMs in pre-spur images. Ok. -- break -- I just realized that what you changed was the read part. so no problem here. We could change the part to do things differently when running on spur or non-spur. Best regards -Tobias > > > Best regards > -Tobias > > > =============== Diff against System-eem.834 =============== > > > > Item was changed: From Marcel.Taeumel at hpi.de Wed Jul 6 13:43:25 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Jul 6 14:25:14 2016 Subject: [squeak-dev] Endless recursion: "String new: -1" Message-ID: <1467812605739-4905179.post@n4.nabble.com> Hi, there! Is it okay that there is an endless recursion when evaluating "String new: -1"? ... ByteString class(Behavior)>>handleFailingFailingBasicNew: ByteString class(Behavior)>>handleFailingBasicNew: ByteString class(Behavior)>>basicNew: ByteString class(Behavior)>>handleFailingFailingBasicNew: ByteString class(Behavior)>>handleFailingBasicNew: ByteString class(Behavior)>>basicNew: ByteString class(Behavior)>>handleFailingFailingBasicNew: ByteString class(Behavior)>>handleFailingBasicNew: ByteString class(Behavior)>>basicNew: ... I would like to have an error signaled instead. Note that the -1 is just an example for a bad computation. The error I get is "Space is low" then. :-) Best, Marcel -- View this message in context: http://forum.world.st/Endless-recursion-String-new-1-tp4905179.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From cunningham.cb at gmail.com Wed Jul 6 16:59:46 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Wed Jul 6 16:59:50 2016 Subject: [squeak-dev] [squeak] What happened to SqueakSource? Message-ID: the web front end has...changed. Simple list of links, none of which I want. Old front-end disappeared. Was this intentional? -cbc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160706/aeb55dc6/attachment.htm From leves at caesar.elte.hu Wed Jul 6 17:41:58 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Wed Jul 6 17:42:03 2016 Subject: [squeak-dev] [squeak] What happened to SqueakSource? In-Reply-To: References: Message-ID: Hi Chris, It should be back to normal now. Levente On Wed, 6 Jul 2016, Chris Cunningham wrote: > the web front end has...changed.? Simple list of links, none of which I want.? Old front-end disappeared. > Was this intentional? > > -cbc > > From cunningham.cb at gmail.com Wed Jul 6 19:28:38 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Wed Jul 6 19:28:41 2016 Subject: [squeak-dev] [squeak] What happened to SqueakSource? In-Reply-To: References: Message-ID: Thank you, and yes it is! -cbc On Wed, Jul 6, 2016 at 10:41 AM, Levente Uzonyi wrote: > Hi Chris, > > It should be back to normal now. > > Levente > > > On Wed, 6 Jul 2016, Chris Cunningham wrote: > > the web front end has...changed. Simple list of links, none of which I >> want. Old front-end disappeared. >> Was this intentional? >> >> -cbc >> >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160706/f8c98a2e/attachment.htm From eliot.miranda at gmail.com Wed Jul 6 20:34:51 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Jul 6 20:34:54 2016 Subject: [squeak-dev] rice paper background in trunk? Message-ID: Hi All, how do I set rice paper as the background as opposed to this drab grey? Marcel told me once but I think I deleted the email. I can't find anything on lists.squeakfoundation.org. Sorry for the noise. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160706/11252863/attachment.htm From ron at usmedrec.com Wed Jul 6 20:53:40 2016 From: ron at usmedrec.com (Ron Teitelbaum) Date: Wed Jul 6 20:53:36 2016 Subject: [squeak-dev] rice paper background in trunk? In-Reply-To: References: Message-ID: <3ea701d1d7c8$7a59c6b0$6f0d5410$@usmedrec.com> Not sure how to set it but when you can walk across it without leaving a trace, you will be ready! Ron From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev-bounces@lists.squeakfoundation.org] On Behalf Of Eliot Miranda Sent: Wednesday, July 06, 2016 4:35 PM To: The general-purpose Squeak developers list Subject: [squeak-dev] rice paper background in trunk? Hi All, how do I set rice paper as the background as opposed to this drab grey? Marcel told me once but I think I deleted the email. I can't find anything on lists.squeakfoundation.org. Sorry for the noise. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160706/3552744b/attachment.htm From asqueaker at gmail.com Wed Jul 6 21:28:46 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Jul 6 21:29:29 2016 Subject: [squeak-dev] rice paper background in trunk? In-Reply-To: References: Message-ID: Hi Eliot, you can tile any graphic as your background by opening a File browser in Squeak, then selecting the image you want to use as your background, then click on the "Background" button in the toolbar. It tiles it by default. You can dig out the bits from Squeak 4.3 "Ricepaper" if you want those, or there are a lot more available on the net, such as at http://subtlepatterns.com/. HTH. On Wed, Jul 6, 2016 at 3:34 PM, Eliot Miranda wrote: > Hi All, > > how do I set rice paper as the background as opposed to this drab grey? > Marcel told me once but I think I deleted the email. I can't find anything > on lists.squeakfoundation.org. Sorry for the noise. > > _,,,^..^,,,_ > best, Eliot > > > From commits at source.squeak.org Wed Jul 6 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jul 6 21:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160706215502.2068.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068253.html Name: System-eem.835 Ancestors: System-eem.834 Fix reading methods from DataStreams on Spur. Old code used pre-Spur numLits header format, and was not 64-bit aware. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068254.html Name: Kernel-eem.1031 Ancestors: Kernel-eem.1030 Provide support for saving blocks on DataStreams. The old code only allowed saving contewxts in image segments. This code allows only the contexts of blocks being saved to be saved, an saves them with nilled senders, and is careful to manage fields beyond the top of stack, storing and reading nils. With this code the following works, and one can e.g. save a MessageNames as a morph on file and read it in again. [:a :b| a > b] saveOnFileNamed: 'block.bin'. (MultiByteBinaryOrTextStream with: ((FileStream readOnlyFileNamed: 'block.bin') binary contentsOfEntireFile)) binary reset fileInObjectAndCode value: 2 value: 1 ============================================= From tim at rowledge.org Wed Jul 6 22:20:53 2016 From: tim at rowledge.org (tim Rowledge) Date: Wed Jul 6 22:20:26 2016 Subject: [squeak-dev] rice paper background in trunk? In-Reply-To: References: Message-ID: > On 06-07-2016, at 2:28 PM, Chris Muller wrote: > > You can dig out the bits from Squeak 4.3 "Ricepaper" if you want > those, or there are a lot more available on the net, such as at > http://subtlepatterns.com/. Ooh, nice. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: HALT: No-Op From eliot.miranda at gmail.com Wed Jul 6 23:01:30 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Jul 6 23:01:34 2016 Subject: [squeak-dev] rice paper background in trunk? In-Reply-To: References: Message-ID: Chris, I know. I want a programmatic way of getting it back. It used to be party of the release builder. How can I find that code so I don't have to grab something from the filesystem? On Wed, Jul 6, 2016 at 2:28 PM, Chris Muller wrote: > Hi Eliot, you can tile any graphic as your background by opening a > File browser in Squeak, then selecting the image you want to use as > your background, then click on the "Background" button in the toolbar. > It tiles it by default. > > You can dig out the bits from Squeak 4.3 "Ricepaper" if you want > those, or there are a lot more available on the net, such as at > http://subtlepatterns.com/. > > HTH. > > On Wed, Jul 6, 2016 at 3:34 PM, Eliot Miranda > wrote: > > Hi All, > > > > how do I set rice paper as the background as opposed to this drab > grey? > > Marcel told me once but I think I deleted the email. I can't find > anything > > on lists.squeakfoundation.org. Sorry for the noise. > > > > _,,,^..^,,,_ > > best, Eliot > > > > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160706/48b39dad/attachment.htm From tim at rowledge.org Thu Jul 7 01:03:56 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Jul 7 01:03:29 2016 Subject: [squeak-dev] rice paper background in trunk? In-Reply-To: References: Message-ID: <8B906738-C4C3-401E-9BC4-5E226EEAE17E@rowledge.org> > On 06-07-2016, at 4:01 PM, Eliot Miranda wrote: > > Chris, I know. I want a programmatic way of getting it back. It used to be party of the release builder. How can I find that code so I don't have to grab something from the filesystem? (Form fromFileNamed: ?foo.png?) setAsBackground appears to work. Looks nice with ?natural_paper.png?. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim "Bother" said Piglet, as Pooh smeared him in honey. From lewis at mail.msen.com Thu Jul 7 01:26:48 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Jul 7 01:26:50 2016 Subject: [squeak-dev] Endless recursion: "String new: -1" In-Reply-To: <1467812605739-4905179.post@n4.nabble.com> References: <1467812605739-4905179.post@n4.nabble.com> Message-ID: <20160707012648.GA63513@shell.msen.com> On Wed, Jul 06, 2016 at 06:43:25AM -0700, marcel.taeumel wrote: > Hi, there! > > Is it okay that there is an endless recursion when evaluating "String new: -1"? No, it is not okay. It should fail with a primitive failure. Dave > > ... > ByteString class(Behavior)>>handleFailingFailingBasicNew: > ByteString class(Behavior)>>handleFailingBasicNew: > ByteString class(Behavior)>>basicNew: > ByteString class(Behavior)>>handleFailingFailingBasicNew: > ByteString class(Behavior)>>handleFailingBasicNew: > ByteString class(Behavior)>>basicNew: > ByteString class(Behavior)>>handleFailingFailingBasicNew: > ByteString class(Behavior)>>handleFailingBasicNew: > ByteString class(Behavior)>>basicNew: > ... > > I would like to have an error signaled instead. Note that the -1 is just an > example for a bad computation. The error I get is "Space is low" then. :-) > > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Endless-recursion-String-new-1-tp4905179.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. From leves at caesar.elte.hu Thu Jul 7 07:23:14 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Thu Jul 7 07:23:22 2016 Subject: [squeak-dev] Endless recursion: "String new: -1" In-Reply-To: <20160707012648.GA63513@shell.msen.com> References: <1467812605739-4905179.post@n4.nabble.com> <20160707012648.GA63513@shell.msen.com> Message-ID: Someone seems to have trimmed the versions in the changes file. In Squeak 4.4 Behavior >> #basicNew: had the following body: self isVariable ifFalse: [self error: self printString, ' cannot have variable sized instances']. (sizeRequested isInteger and: [sizeRequested >= 0]) ifTrue: ["arg okay; space must be low." OutOfMemory signal. ^ self basicNew: sizeRequested "retry if user proceeds"]. self primitiveFailed So, non-integer and negative arguments were primitive failures. Levente On Wed, 6 Jul 2016, David T. Lewis wrote: > On Wed, Jul 06, 2016 at 06:43:25AM -0700, marcel.taeumel wrote: >> Hi, there! >> >> Is it okay that there is an endless recursion when evaluating "String new: -1"? > > No, it is not okay. It should fail with a primitive failure. > > Dave > > >> >> ... >> ByteString class(Behavior)>>handleFailingFailingBasicNew: >> ByteString class(Behavior)>>handleFailingBasicNew: >> ByteString class(Behavior)>>basicNew: >> ByteString class(Behavior)>>handleFailingFailingBasicNew: >> ByteString class(Behavior)>>handleFailingBasicNew: >> ByteString class(Behavior)>>basicNew: >> ByteString class(Behavior)>>handleFailingFailingBasicNew: >> ByteString class(Behavior)>>handleFailingBasicNew: >> ByteString class(Behavior)>>basicNew: >> ... >> >> I would like to have an error signaled instead. Note that the -1 is just an >> example for a bad computation. The error I get is "Space is low" then. :-) >> >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: http://forum.world.st/Endless-recursion-String-new-1-tp4905179.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From bert at freudenbergs.de Thu Jul 7 09:17:17 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Jul 7 09:17:20 2016 Subject: [squeak-dev] rice paper background in trunk? In-Reply-To: <8B906738-C4C3-401E-9BC4-5E226EEAE17E@rowledge.org> References: <8B906738-C4C3-401E-9BC4-5E226EEAE17E@rowledge.org> Message-ID: On Thu, Jul 7, 2016 at 3:03 AM, tim Rowledge wrote: > > (Form fromFileNamed: ?foo.png?) setAsBackground > appears to work. Looks nice with ?natural_paper.png?. But 'foo.png' looks awesome! - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160707/9458981a/attachment.htm From Marcel.Taeumel at hpi.de Thu Jul 7 11:09:46 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Jul 7 11:51:41 2016 Subject: [squeak-dev] Re: rice paper background in trunk? In-Reply-To: References: Message-ID: <1467889786629-4905324.post@n4.nabble.com> Eliot Miranda-2 wrote > Hi All, > > how do I set rice paper as the background as opposed to this drab > grey? Marcel told me once but I think I deleted the email. I can't find > anything on lists.squeakfoundation.org. Sorry for the noise. > > _,,,^..^,,,_ > best, Eliot Hi Eliot, if you drag-drop an image into the world, inspect it, choose the "originalForm" in that SketchMorph. On that form you do: ReleaseBuilder setProjectBackground: originalForm. Then, you will have it also for new Morphic projects. Basically, you want to set the color/fill-style of the project's world (resp. paste-up morph). Hence, related interfaces include: Project >> #setAsBackground: Project class >> #defaultFill: PasteUpMorph >> #fillStyle: MorphicProject class >> #defaultFill: If you have a form and you need a fill-style, you can either create a BitmapFillStyle with this form or create an InfiniteForm with it, which will also be accepted as fill-style. BitmapFillStyle class >> #fromForm: InfiniteForm class >> #with:. In FormCanvas, BitmapFillStyles will be converted into InfiniteForm anyway. See, for example, FormCanvas >> #fillRectangle:fillStyle: FormCanvas >> #setFillColor: InfiniteForm >> #displayOnPort:offsetBy: Best, Marcel -- View this message in context: http://forum.world.st/rice-paper-background-in-trunk-tp4905261p4905324.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Thu Jul 7 11:18:41 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Jul 7 12:00:38 2016 Subject: [squeak-dev] Re: rice paper background in trunk? In-Reply-To: References: Message-ID: <1467890321499-4905327.post@n4.nabble.com> Eliot Miranda-2 wrote > Chris, I know. I want a programmatic way of getting it back. It used to > be party of the release builder. How can I find that code so I don't have > to grab something from the filesystem? > > On Wed, Jul 6, 2016 at 2:28 PM, Chris Muller < > asqueaker@ > > wrote: > >> Hi Eliot, you can tile any graphic as your background by opening a >> File browser in Squeak, then selecting the image you want to use as >> your background, then click on the "Background" button in the toolbar. >> It tiles it by default. >> >> You can dig out the bits from Squeak 4.3 "Ricepaper" if you want >> those, or there are a lot more available on the net, such as at >> http://subtlepatterns.com/. >> >> HTH. >> >> On Wed, Jul 6, 2016 at 3:34 PM, Eliot Miranda < > eliot.miranda@ > > >> wrote: >> > Hi All, >> > >> > how do I set rice paper as the background as opposed to this drab >> grey? >> > Marcel told me once but I think I deleted the email. I can't find >> anything >> > on lists.squeakfoundation.org. Sorry for the noise. >> > >> > _,,,^..^,,,_ >> > best, Eliot >> > >> > >> > >> >> > > > -- > _,,,^..^,,,_ > best, Eliot Hi Eliot, here are some older backgrounds, whose bits are not in the trunk image anymore: Best, Marcel -- View this message in context: http://forum.world.st/rice-paper-background-in-trunk-tp4905261p4905327.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lewis at mail.msen.com Thu Jul 7 12:28:09 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Jul 7 12:28:12 2016 Subject: [squeak-dev] Endless recursion: "String new: -1" In-Reply-To: References: <1467812605739-4905179.post@n4.nabble.com> <20160707012648.GA63513@shell.msen.com> Message-ID: <20160707122809.GA86651@shell.msen.com> I think the problem is in the primitive error code checking. The primitive is failing with #'bad argument' but the fallback code attempts to handle it as #'insufficient object memory'. It then tries to free some memory, fails to correct the problem, and raises a "Space is low" notifier. Dave On Thu, Jul 07, 2016 at 09:23:14AM +0200, Levente Uzonyi wrote: > Someone seems to have trimmed the versions in the changes file. In Squeak > 4.4 Behavior >> #basicNew: had the following body: > > > self isVariable ifFalse: > [self error: self printString, ' cannot have variable sized > instances']. > (sizeRequested isInteger and: [sizeRequested >= 0]) ifTrue: > ["arg okay; space must be low." > OutOfMemory signal. > ^ self basicNew: sizeRequested "retry if user proceeds"]. > self primitiveFailed > > So, non-integer and negative arguments were primitive failures. > > Levente > > > On Wed, 6 Jul 2016, David T. Lewis wrote: > > >On Wed, Jul 06, 2016 at 06:43:25AM -0700, marcel.taeumel wrote: > >>Hi, there! > >> > >>Is it okay that there is an endless recursion when evaluating "String > >>new: -1"? > > > >No, it is not okay. It should fail with a primitive failure. > > > >Dave > > > > > >> > >>... > >>ByteString class(Behavior)>>handleFailingFailingBasicNew: > >>ByteString class(Behavior)>>handleFailingBasicNew: > >>ByteString class(Behavior)>>basicNew: > >>ByteString class(Behavior)>>handleFailingFailingBasicNew: > >>ByteString class(Behavior)>>handleFailingBasicNew: > >>ByteString class(Behavior)>>basicNew: > >>ByteString class(Behavior)>>handleFailingFailingBasicNew: > >>ByteString class(Behavior)>>handleFailingBasicNew: > >>ByteString class(Behavior)>>basicNew: > >>... > >> > >>I would like to have an error signaled instead. Note that the -1 is just > >>an > >>example for a bad computation. The error I get is "Space is low" then. :-) > >> > >> > >>Best, > >>Marcel > >> > >> > >> > >>-- > >>View this message in context: > >>http://forum.world.st/Endless-recursion-String-new-1-tp4905179.html > >>Sent from the Squeak - Dev mailing list archive at Nabble.com. > > > > From Das.Linux at gmx.de Thu Jul 7 12:42:22 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Jul 7 12:42:26 2016 Subject: [squeak-dev] Endless recursion: "String new: -1" In-Reply-To: <20160707122809.GA86651@shell.msen.com> References: <1467812605739-4905179.post@n4.nabble.com> <20160707012648.GA63513@shell.msen.com> <20160707122809.GA86651@shell.msen.com> Message-ID: <8A3E8034-A6C0-432C-B1A8-3A013FD6FFEE@gmx.de> Hi all (cc vm-dev) On 07.07.2016, at 14:28, David T. Lewis wrote: > I think the problem is in the primitive error code checking. The primitive > is failing with #'bad argument' but the fallback code attempts to handle it > as #'insufficient object memory'. It then tries to free some memory, fails > to correct the problem, and raises a "Space is low" notifier. > I noted that when we moved to Spur initially and I tried to fix tests. The AllocationTest failed, and I changed ec == #'insufficient object memory' ifTrue: to (ec == #'insufficient object memory' or: [ec == #'bad argument']) ifTrue: in Behavior>>#basicNew: Maybe that was an error? @Eliot, why does Spur return #'bad argument' instead of #'insufficient object memory' when too much memory is to be allocated? Best regards -Tobias > Dave > > > On Thu, Jul 07, 2016 at 09:23:14AM +0200, Levente Uzonyi wrote: >> Someone seems to have trimmed the versions in the changes file. In Squeak >> 4.4 Behavior >> #basicNew: had the following body: >> >> >> self isVariable ifFalse: >> [self error: self printString, ' cannot have variable sized >> instances']. >> (sizeRequested isInteger and: [sizeRequested >= 0]) ifTrue: >> ["arg okay; space must be low." >> OutOfMemory signal. >> ^ self basicNew: sizeRequested "retry if user proceeds"]. >> self primitiveFailed >> >> So, non-integer and negative arguments were primitive failures. >> >> Levente >> >> >> On Wed, 6 Jul 2016, David T. Lewis wrote: >> >>> On Wed, Jul 06, 2016 at 06:43:25AM -0700, marcel.taeumel wrote: >>>> Hi, there! >>>> >>>> Is it okay that there is an endless recursion when evaluating "String >>>> new: -1"? >>> >>> No, it is not okay. It should fail with a primitive failure. >>> >>> Dave >>> >>> >>>> >>>> ... >>>> ByteString class(Behavior)>>handleFailingFailingBasicNew: >>>> ByteString class(Behavior)>>handleFailingBasicNew: >>>> ByteString class(Behavior)>>basicNew: >>>> ByteString class(Behavior)>>handleFailingFailingBasicNew: >>>> ByteString class(Behavior)>>handleFailingBasicNew: >>>> ByteString class(Behavior)>>basicNew: >>>> ByteString class(Behavior)>>handleFailingFailingBasicNew: >>>> ByteString class(Behavior)>>handleFailingBasicNew: >>>> ByteString class(Behavior)>>basicNew: >>>> ... >>>> >>>> I would like to have an error signaled instead. Note that the -1 is just >>>> an >>>> example for a bad computation. The error I get is "Space is low" then. :-) >>>> >>>> >>>> Best, >>>> Marcel >>>> >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://forum.world.st/Endless-recursion-String-new-1-tp4905179.html >>>> Sent from the Squeak - Dev mailing list archive at Nabble.com. From eliot.miranda at gmail.com Thu Jul 7 16:33:24 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Jul 7 16:33:27 2016 Subject: [squeak-dev] Time now print24 Message-ID: Hi All, how does one produce a nice timestamp, simply date and time as in 7/7/2016 09:19:38 Trivial, right? So Date today mmddyyyy, ' ', Time now print24 '7/7/2016 09:22:40.914' .914, ah, nanos. How useful. Let's get rid of them. No nanos: accessor so Date today mmddyyyy, ' ', (Time now nanos: 0) print24 => MNU but there's a seconds accessor, so Date today mmddyyyy, ' ', (Time now seconds: Time now seconds; print24) '7/7/2016 00:00:41 ?? So seconds: is private, and isn't the dual of Time seconds: Time seconds ^ self second Time second ^ self asDuration seconds Duration seconds "Answer the number of seconds the receiver represents." ^seconds rem: SecondsInMinute Looks broken to me. Personally I think print24 should not print sub seconds. cc'ing to Pharo because I want this timestamp to be the same in both dialects for a profiling tool we want to use in both dialects. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160707/d28ad8bf/attachment.htm From eliot.miranda at gmail.com Thu Jul 7 16:34:34 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Jul 7 16:34:39 2016 Subject: [Vm-dev] Re: [squeak-dev] Endless recursion: "String new: -1" In-Reply-To: <8A3E8034-A6C0-432C-B1A8-3A013FD6FFEE@gmx.de> References: <1467812605739-4905179.post@n4.nabble.com> <20160707012648.GA63513@shell.msen.com> <20160707122809.GA86651@shell.msen.com> <8A3E8034-A6C0-432C-B1A8-3A013FD6FFEE@gmx.de> Message-ID: On Thu, Jul 7, 2016 at 5:42 AM, Tobias Pape wrote: > > Hi all > > (cc vm-dev) > On 07.07.2016, at 14:28, David T. Lewis wrote: > > > I think the problem is in the primitive error code checking. The > primitive > > is failing with #'bad argument' but the fallback code attempts to handle > it > > as #'insufficient object memory'. It then tries to free some memory, > fails > > to correct the problem, and raises a "Space is low" notifier. > > > > I noted that when we moved to Spur initially and I tried to fix tests. > The AllocationTest failed, and I changed > > ec == #'insufficient object memory' ifTrue: > > to > (ec == #'insufficient object memory' or: [ec == #'bad argument']) > ifTrue: > > in Behavior>>#basicNew: > > Maybe that was an error? > > @Eliot, why does Spur return #'bad argument' instead of #'insufficient > object memory' when > too much memory is to be allocated? > If it does, there's a bug. I'll go look. > Best regards > -Tobias > > > > Dave > > > > > > On Thu, Jul 07, 2016 at 09:23:14AM +0200, Levente Uzonyi wrote: > >> Someone seems to have trimmed the versions in the changes file. In > Squeak > >> 4.4 Behavior >> #basicNew: had the following body: > >> > >> > >> self isVariable ifFalse: > >> [self error: self printString, ' cannot have variable sized > >> instances']. > >> (sizeRequested isInteger and: [sizeRequested >= 0]) ifTrue: > >> ["arg okay; space must be low." > >> OutOfMemory signal. > >> ^ self basicNew: sizeRequested "retry if user proceeds"]. > >> self primitiveFailed > >> > >> So, non-integer and negative arguments were primitive failures. > >> > >> Levente > >> > >> > >> On Wed, 6 Jul 2016, David T. Lewis wrote: > >> > >>> On Wed, Jul 06, 2016 at 06:43:25AM -0700, marcel.taeumel wrote: > >>>> Hi, there! > >>>> > >>>> Is it okay that there is an endless recursion when evaluating "String > >>>> new: -1"? > >>> > >>> No, it is not okay. It should fail with a primitive failure. > >>> > >>> Dave > >>> > >>> > >>>> > >>>> ... > >>>> ByteString class(Behavior)>>handleFailingFailingBasicNew: > >>>> ByteString class(Behavior)>>handleFailingBasicNew: > >>>> ByteString class(Behavior)>>basicNew: > >>>> ByteString class(Behavior)>>handleFailingFailingBasicNew: > >>>> ByteString class(Behavior)>>handleFailingBasicNew: > >>>> ByteString class(Behavior)>>basicNew: > >>>> ByteString class(Behavior)>>handleFailingFailingBasicNew: > >>>> ByteString class(Behavior)>>handleFailingBasicNew: > >>>> ByteString class(Behavior)>>basicNew: > >>>> ... > >>>> > >>>> I would like to have an error signaled instead. Note that the -1 is > just > >>>> an > >>>> example for a bad computation. The error I get is "Space is low" > then. :-) > >>>> > >>>> > >>>> Best, > >>>> Marcel > >>>> > >>>> > >>>> > >>>> -- > >>>> View this message in context: > >>>> http://forum.world.st/Endless-recursion-String-new-1-tp4905179.html > >>>> Sent from the Squeak - Dev mailing list archive at Nabble.com. > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160707/7cc283c7/attachment.htm From eliot.miranda at gmail.com Thu Jul 7 16:44:16 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Jul 7 16:44:21 2016 Subject: [Vm-dev] Re: [squeak-dev] Endless recursion: "String new: -1" In-Reply-To: <8A3E8034-A6C0-432C-B1A8-3A013FD6FFEE@gmx.de> References: <1467812605739-4905179.post@n4.nabble.com> <20160707012648.GA63513@shell.msen.com> <20160707122809.GA86651@shell.msen.com> <8A3E8034-A6C0-432C-B1A8-3A013FD6FFEE@gmx.de> Message-ID: On Thu, Jul 7, 2016 at 5:42 AM, Tobias Pape wrote: > > Hi all > > (cc vm-dev) > On 07.07.2016, at 14:28, David T. Lewis wrote: > > > I think the problem is in the primitive error code checking. The > primitive > > is failing with #'bad argument' but the fallback code attempts to handle > it > > as #'insufficient object memory'. It then tries to free some memory, > fails > > to correct the problem, and raises a "Space is low" notifier. > > > > I noted that when we moved to Spur initially and I tried to fix tests. > The AllocationTest failed, and I changed > > ec == #'insufficient object memory' ifTrue: > > to > (ec == #'insufficient object memory' or: [ec == #'bad argument']) > ifTrue: > > in Behavior>>#basicNew: > > Maybe that was an error? > > @Eliot, why does Spur return #'bad argument' instead of #'insufficient > object memory' when > too much memory is to be allocated? > It doesn't. It answers bad argument for anything other than an integer in the range 0 to 2^32-1 or 0 to 2^64-1. I think your commit of topa 10/7/2015 20:41 for Behavior>>basicNew: is wrong, and should be reverted. > Best regards > -Tobias > > > > Dave > > > > > > On Thu, Jul 07, 2016 at 09:23:14AM +0200, Levente Uzonyi wrote: > >> Someone seems to have trimmed the versions in the changes file. In > Squeak > >> 4.4 Behavior >> #basicNew: had the following body: > >> > >> > >> self isVariable ifFalse: > >> [self error: self printString, ' cannot have variable sized > >> instances']. > >> (sizeRequested isInteger and: [sizeRequested >= 0]) ifTrue: > >> ["arg okay; space must be low." > >> OutOfMemory signal. > >> ^ self basicNew: sizeRequested "retry if user proceeds"]. > >> self primitiveFailed > >> > >> So, non-integer and negative arguments were primitive failures. > >> > >> Levente > >> > >> > >> On Wed, 6 Jul 2016, David T. Lewis wrote: > >> > >>> On Wed, Jul 06, 2016 at 06:43:25AM -0700, marcel.taeumel wrote: > >>>> Hi, there! > >>>> > >>>> Is it okay that there is an endless recursion when evaluating "String > >>>> new: -1"? > >>> > >>> No, it is not okay. It should fail with a primitive failure. > >>> > >>> Dave > >>> > >>> > >>>> > >>>> ... > >>>> ByteString class(Behavior)>>handleFailingFailingBasicNew: > >>>> ByteString class(Behavior)>>handleFailingBasicNew: > >>>> ByteString class(Behavior)>>basicNew: > >>>> ByteString class(Behavior)>>handleFailingFailingBasicNew: > >>>> ByteString class(Behavior)>>handleFailingBasicNew: > >>>> ByteString class(Behavior)>>basicNew: > >>>> ByteString class(Behavior)>>handleFailingFailingBasicNew: > >>>> ByteString class(Behavior)>>handleFailingBasicNew: > >>>> ByteString class(Behavior)>>basicNew: > >>>> ... > >>>> > >>>> I would like to have an error signaled instead. Note that the -1 is > just > >>>> an > >>>> example for a bad computation. The error I get is "Space is low" > then. :-) > >>>> > >>>> > >>>> Best, > >>>> Marcel > >>>> > >>>> > >>>> > >>>> -- > >>>> View this message in context: > >>>> http://forum.world.st/Endless-recursion-String-new-1-tp4905179.html > >>>> Sent from the Squeak - Dev mailing list archive at Nabble.com. > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160707/0b0019c7/attachment.htm From commits at source.squeak.org Thu Jul 7 18:12:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 7 18:12:05 2016 Subject: [squeak-dev] The Trunk: Collections-eem.700.mcz Message-ID: Eliot Miranda uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-eem.700.mcz ==================== Summary ==================== Name: Collections-eem.700 Author: eem Time: 7 July 2016, 11:10:35.817225 am UUID: 3761f170-2d94-4ed1-bf3d-1790217dc3d3 Ancestors: Collections-eem.699 Better error messages for primitive failure of one-way become. Set lastChar in TranscriptStream (does this really belong in Collections?) when resetting. =============== Diff against Collections-eem.699 =============== Item was changed: ----- Method: Array>>elementsForwardIdentityTo:copyHash: (in category 'converting') ----- elementsForwardIdentityTo: otherArray copyHash: copyHash "This primitive performs a bulk mutation, causing all pointers to the elements of the receiver to be replaced by pointers to the corresponding elements of otherArray. If copyHash is true, the identityHashes remain with the pointers rather than with the objects so that the objects in the receiver should still be properly indexed in any existing hashed structures after the mutation. If copyHash is false, then the hashes of the objects in otherArray remain unchanged. If you know what you're doing this may indeed be what you want." + ec == #'bad receiver' ifTrue: + [^self error: 'receiver must be of class Array']. + ec == #'bad argument' ifTrue: + [^self error: (otherArray class == Array + ifTrue: ['arg must be of class Array'] + ifFalse: ['receiver and argument must have the same size'])]. + ec == #'inappropriate operation' ifTrue: + [^self error: 'can''t become immediates such as SmallIntegers or Characters']. + ec == #'no modification' ifTrue: + [^self error: 'can''t become immutable objects']. + ec == #'object is pinned' ifTrue: + [^self error: 'can''t become pinned objects']. self primitiveFailed! Item was added: + ----- Method: TranscriptStream>>reset (in category 'positioning') ----- + reset + "Override to set lastChar" + position > 0 ifTrue: + [lastChar := collection at: position]. + ^super reset! From commits at source.squeak.org Thu Jul 7 18:27:42 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 7 18:27:44 2016 Subject: [squeak-dev] The Trunk: Compiler-eem.323.mcz Message-ID: Eliot Miranda uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-eem.323.mcz ==================== Summary ==================== Name: Compiler-eem.323 Author: eem Time: 7 July 2016, 11:27:28.886558 am UUID: 52466c66-954e-47f9-8c43-2ce094580ab4 Ancestors: Compiler-eem.322 Comment bytecode 139 as the callPrimitive bytecode (Spur mandates this to lift the number of literals). =============== Diff against Compiler-eem.322 =============== Item was changed: EncoderForV3 subclass: #EncoderForV3PlusClosures instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Compiler-Kernel'! + !EncoderForV3PlusClosures commentStamp: 'eem 2/29/2016 00:07' prior: 0! - !EncoderForV3PlusClosures commentStamp: '' prior: 0! An encoder for the V3 bytecode set augmented with the following bytecodes that are part of the full closure implementation. 138 10001010 jkkkkkkk Push (Array new: kkkkkkk) (j = 0) or Pop kkkkkkk elements into: (Array new: kkkkkkk) (j = 1) + 139 10001011 kkkkkkkk jjjjjjjj Invoke primitive number jjjjjjjjkkkkkkkk - 140 10001100 kkkkkkkk jjjjjjjj Push Temp At kkkkkkkk In Temp Vector At: jjjjjjjj 141 10001101 kkkkkkkk jjjjjjjj Store Temp At kkkkkkkk In Temp Vector At: jjjjjjjj 142 10001110 kkkkkkkk jjjjjjjj Pop and Store Temp At kkkkkkkk In Temp Vector At: jjjjjjjj 143 10001111 llllkkkk jjjjjjjj iiiiiiii Push Closure Num Copied llll Num Args kkkk BlockSize jjjjjjjjiiiiiiii This is an exact duplicate of EncoderForLongFormV3PlusClosures. Could be a trait (or in Newspeak, a Mixin). For now we impose upon you to synchronise any and all changes between these two classes.! From commits at source.squeak.org Thu Jul 7 18:37:18 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 7 18:37:20 2016 Subject: [squeak-dev] The Trunk: Kernel-eem.1032.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.1032.mcz ==================== Summary ==================== Name: Kernel-eem.1032 Author: eem Time: 7 July 2016, 11:36:43.185017 am UUID: 0e4a81f4-1688-419a-b951-f0bc7a0b33fd Ancestors: Kernel-eem.1031 Faster method creation in CompiledMethodTrailer. Provide CompiledMethod>>voidCogVMState with a fail-over to flushCache, for safe modification of methods. Provide BlockClosure>>isNestedeWithin: for testing block nesting. =============== Diff against Kernel-eem.1031 =============== Item was added: + ----- Method: BlockClosure>>isNestedWithin: (in category 'testing') ----- + isNestedWithin: aContextOrBlock + "Answer if the receiver is nested within aContextOrBlock, which may be ither a Context, or a BlockClosure." + aContextOrBlock ifNotNil: + [self outerContextsDo: + [:ctxt| + (ctxt == aContextOrBlock + or: [ctxt closureOrNil = aContextOrBlock]) ifTrue: [^true]]]. + ^false! Item was added: + ----- Method: CompiledMethod>>voidCogVMState (in category 'cleaning') ----- + voidCogVMState + "Tell the VM to remove all references to any machine code form of the method. + This primitive must be called whenever a method is in use and modified. This is + more aggressive (and *much* more costly) than flushCache since it must search + through all context objects, making sure that none have a (hidden) machine code pc + in the receiver. Since modifying a method will likely change the generated machine code, + modifying a method (rather than redefining it) requires this more aggressive flush." + + + ^self flushCache! Item was changed: ----- Method: CompiledMethodTrailer>>createMethod:class:header: (in category 'creating a method') ----- createMethod: numberOfBytesForAllButTrailer class: aCompiledMethodClass header: headerWord + | meth delta | - | meth | encodedData ifNil: [self encode]. + - meth := aCompiledMethodClass newMethod: numberOfBytesForAllButTrailer + size header: headerWord. "copy the encoded trailer data" + delta := meth size - size. 1 to: size do: + [:i | meth at: delta + i put: (encodedData at: i)]. - [:i | meth at: meth size - size + i put: (encodedData at: i)]. ^meth! From commits at source.squeak.org Thu Jul 7 18:40:43 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 7 18:40:44 2016 Subject: [squeak-dev] The Trunk: Morphic-eem.1189.mcz Message-ID: Eliot Miranda uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-eem.1189.mcz ==================== Summary ==================== Name: Morphic-eem.1189 Author: eem Time: 7 July 2016, 11:39:54.334537 am UUID: 0aaf4adb-3407-4afb-b0c5-d8275daaa0db Ancestors: Morphic-cmm.1188 Tiny cleanup. =============== Diff against Morphic-cmm.1188 =============== Item was changed: ----- Method: MorphicProject>>exportSegmentWithChangeSet:fileName:directory: (in category 'file in/out') ----- exportSegmentWithChangeSet: aChangeSetOrNil fileName: aFileName directory: aDirectory "Store my project out on the disk as an *exported* ImageSegment. All outPointers will be in a form that can be resolved in the target image. Name it .extSeg. Whatdo we do about subProjects, especially if they are out as local image segments? Force them to come in? Player classes are included automatically." | is str ans revertSeg roots holder collector fd mgr stacks | "Files out a changeSet first, so that a project can contain its own classes" + world ifNil: [^ false]. + world presenter ifNil: [^ false]. - world ifNil: [^ false]. world presenter ifNil: [^ false]. ScrapBook default emptyScrapBook. world currentHand pasteBuffer: nil. "don't write the paste buffer." world currentHand mouseOverHandler initialize. "forget about any references here" "Display checkCurrentHandForObjectToPaste." Command initialize. world clearCommandHistory. world fullReleaseCachedState; releaseViewers. world cleanseStepList. world localFlapTabs size = world flapTabs size ifFalse: [ self error: 'Still holding onto Global flaps']. world releaseSqueakPages. holder := Project allProjects. "force them in to outPointers, where DiskProxys are made" "Just export me, not my previous version" revertSeg := self parameterAt: #revertToMe. self removeParameter: #revertToMe. roots := OrderedCollection new. + roots add: self; add: world; add: transcript; add: aChangeSetOrNil; add: thumbnail; add: world activeHand. - roots add: self; add: world; add: transcript; add: changeSet; add: thumbnail. - roots add: world activeHand. "; addAll: classList; addAll: (classList collect: [:cls | cls class])" roots := roots reject: [ :x | x isNil]. "early saves may not have active hand or thumbnail" + fd := aDirectory directoryNamed: self resourceDirectoryName. + fd assureExistence. + "Clean up resource references before writing out" + mgr := self resourceManager. + self resourceManager: nil. + ResourceCollector current: ResourceCollector new. + ResourceCollector current localDirectory: fd. + ResourceCollector current baseUrl: self resourceUrl. + ResourceCollector current initializeFrom: mgr. + ProgressNotification signal: '2:findingResources' extra: + '(collecting resources...)' translated. + "Must activate old world because this is run at #armsLength. + Otherwise references to ActiveWorld, ActiveHand, or ActiveEvent + will not be captured correctly if referenced from blocks or user code." + world becomeActiveDuring:[ + is := ImageSegment new copySmartRootsExport: roots asArray. + "old way was (is := ImageSegment new + copyFromRootsForExport: roots asArray)" + ]. + self resourceManager: mgr. + collector := ResourceCollector current. + ResourceCollector current: nil. + ProgressNotification signal: '2:foundResources' extra: ''. + is state = #tooBig ifTrue: [ + collector replaceAll. + ^ false]. - fd := aDirectory directoryNamed: self resourceDirectoryName. - fd assureExistence. - "Clean up resource references before writing out" - mgr := self resourceManager. - self resourceManager: nil. - ResourceCollector current: ResourceCollector new. - ResourceCollector current localDirectory: fd. - ResourceCollector current baseUrl: self resourceUrl. - ResourceCollector current initializeFrom: mgr. - ProgressNotification signal: '2:findingResources' extra: - '(collecting resources...)' translated. - "Must activate old world because this is run at #armsLength. - Otherwise references to ActiveWorld, ActiveHand, or ActiveEvent - will not be captured correctly if referenced from blocks or user code." - world becomeActiveDuring:[ - is := ImageSegment new copySmartRootsExport: roots asArray. - "old way was (is := ImageSegment new - copyFromRootsForExport: roots asArray)" - ]. - self resourceManager: mgr. - collector := ResourceCollector current. - ResourceCollector current: nil. - ProgressNotification signal: '2:foundResources' extra: ''. - is state = #tooBig ifTrue: [ - collector replaceAll. - ^ false]. str := ''. "considered legal to save a project that has never been entered" (is outPointers includes: world) ifTrue: [ str := str, '\Project''s own world is not in the segment.' translated withCRs]. str isEmpty ifFalse: [ ans := UIManager default chooseFrom: { 'Do not write file' translated. 'Write file anyway' translated. 'Debug' translated. } title: str. ans = 1 ifTrue: [ revertSeg ifNotNil: [projectParameters at: #revertToMe put: revertSeg]. collector replaceAll. ^ false]. ans = 3 ifTrue: [ collector replaceAll. self halt: 'Segment not written' translated]]. stacks := is findStacks. is writeForExportWithSources: aFileName inDirectory: fd changeSet: aChangeSetOrNil. SecurityManager default signFile: aFileName directory: fd. "Compress all files and update check sums" collector forgetObsolete. self storeResourceList: collector in: fd. self storeHtmlPageIn: fd. self storeManifestFileIn: fd. self writeStackText: stacks in: fd registerIn: collector. "local proj.005.myStack.t" self compressFilesIn: fd to: aFileName in: aDirectory resources: collector. "also deletes the resource directory" "Now update everything that we know about" mgr updateResourcesFrom: collector. revertSeg ifNotNil: [projectParameters at: #revertToMe put: revertSeg]. holder. collector replaceAll. world flapTabs do: [:ft | (ft respondsTo: #unhibernate) ifTrue: [ft unhibernate]]. is arrayOfRoots do: [:obj | obj isScriptEditorMorph ifTrue: [obj unhibernate]]. ^ true ! From commits at source.squeak.org Thu Jul 7 18:51:53 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 7 18:51:55 2016 Subject: [squeak-dev] The Trunk: System-eem.836.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-eem.836.mcz ==================== Summary ==================== Name: System-eem.836 Author: eem Time: 7 July 2016, 11:51:22.921345 am UUID: b27dc440-8cbb-43a4-ac99-8db510ef9b1e Ancestors: System-eem.835 Modify string search in methods to search symbols that are not used as message selectors. =============== Diff against System-eem.835 =============== Item was changed: ----- Method: SystemNavigation>>browseMethodsWithString:matchCase: (in category 'browse') ----- browseMethodsWithString: aString matchCase: caseSensitive "Launch a browser on all methods that contain string literals with aString as a substring. Make the search case-sensitive or insensitive as dictated by the caseSensitive boolean parameter" self browseAllSelect: [:method | + method hasLiteralSuchThat: + [:lit | + lit isString + and: [(lit includesSubstring: aString caseSensitive: caseSensitive) + and: [lit isSymbol + ifTrue: [(method messages includes: lit) not] + ifFalse: [true]]]]] - method hasLiteralSuchThat: [:lit | - (lit isString and: [lit isSymbol not]) and: - [lit includesSubstring: aString caseSensitive: caseSensitive]]] name: 'Methods with string ', aString printString, (caseSensitive ifTrue: [' (case-sensitive)'] ifFalse: [' (case-insensitive)']) + autoSelect: aString! - autoSelect: aString. - ! From commits at source.squeak.org Thu Jul 7 18:56:33 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 7 18:56:36 2016 Subject: [squeak-dev] The Trunk: Tools-eem.706.mcz Message-ID: Eliot Miranda uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-eem.706.mcz ==================== Summary ==================== Name: Tools-eem.706 Author: eem Time: 7 July 2016, 11:56:10.988288 am UUID: 7de897f6-1e8c-428a-868d-74a535a39dcf Ancestors: Tools-topa.705 Add #format:variable:bitsUnitSize:pointers:weak: to noteDangerous: =============== Diff against Tools-topa.705 =============== Item was changed: ----- Method: MethodFinder>>noteDangerous (in category 'initialize') ----- noteDangerous "Remember the methods with really bad side effects." Dangerous := Set new. "Object accessing, testing, copying, dependent access, macpal, flagging" #(addInstanceVarNamed:withValue: haltIfNil copyAddedStateFrom: veryDeepCopy veryDeepCopyWith: veryDeepFixupWith: veryDeepInner: addDependent: evaluate:wheneverChangeIn: codeStrippedOut: playSoundNamed: isThisEverCalled isThisEverCalled: logEntry logExecution logExit) do: [:sel | Dangerous add: sel]. "Object error handling" #(cannotInterpret: caseError confirm: confirm:orCancel: doesNotUnderstand: error: halt halt: notify: notify:at: primitiveFailed shouldNotImplement subclassResponsibility) do: [:sel | Dangerous add: sel]. "Object user interface" #(basicInspect beep inform: inspect inspectWithLabel: notYetImplemented inspectElement ) do: [:sel | Dangerous add: sel]. "Object system primitives" #(become: becomeForward: instVarAt:put: instVarNamed:put: nextInstance nextObject rootStubInImageSegment: someObject tryPrimitive:withArgs:) do: [:sel | Dangerous add: sel]. "Object private" #(errorImproperStore errorNonIntegerIndex errorNotIndexable errorSubscriptBounds: mustBeBoolean primitiveError: species storeAt:inTempFrame:) do: [:sel | Dangerous add: sel]. "Object, translation support" #(cCode: cCode:inSmalltalk: cCoerce:to: export: inline: returnTypeC: sharedCodeNamed:inCase: var:declareC:) do: [:sel | Dangerous add: sel]. "Object, objects from disk, finalization. And UndefinedObject" #(comeFullyUpOnReload: objectForDataStream: readDataFrom:size: rehash saveOnFile storeDataOn: actAsExecutor executor finalize retryWithGC:until: suspend) do: [:sel | Dangerous add: sel]. "No Restrictions: Boolean, False, True, " "Morph" #() do: [:sel | Dangerous add: sel]. "Behavior" #(obsolete confirmRemovalOf: copyOfMethodDictionary literalScannedAs:notifying: storeLiteral:on: addSubclass: removeSubclass: superclass: "creating method dictionary" addSelector:withMethod: compile: compile:notifying: compileAll compileAllFrom: compress decompile: defaultSelectorForMethod: methodDictionary: recompile:from: recompileChanges removeSelector: compressedSourceCodeAt: selectorAtMethod:setClass: allInstances allSubInstances inspectAllInstances inspectSubInstances thoroughWhichSelectorsReferTo:special:byte: "enumerating" allInstancesDo: allSubInstancesDo: allSubclassesDo: allSuperclassesDo: selectSubclasses: selectSuperclasses: subclassesDo: withAllSubclassesDo: "too slow->" crossReference removeUninstantiatedSubclassesSilently "too slow->" unreferencedInstanceVariables + "private" flushCache format:variable:words:pointers: format:variable:words:pointers:weak: format:variable:bitsUnitSize:pointers:weak: printSubclassesOn:level: basicRemoveSelector: addSelector:withMethod:notifying: addSelectorSilently:withMethod:) - "private" flushCache format:variable:words:pointers: format:variable:words:pointers:weak: printSubclassesOn:level: basicRemoveSelector: addSelector:withMethod:notifying: addSelectorSilently:withMethod:) do: [:sel | Dangerous add: sel]. "CompiledMethod" #(defaultSelector) do: [:sel | Dangerous add: sel]. "Others " #("no tangible result" do: associationsDo: "private" adaptToCollection:andSend: adaptToNumber:andSend: adaptToPoint:andSend: adaptToString:andSend: instVarAt:put: asDigitsToPower:do: combinations:atATimeDo: doWithIndex: pairsDo: permutationsDo: reverseDo: reverseWith:do: with:do: withIndexDo: asDigitsAt:in:do: combinationsAt:in:after:do: errorOutOfBounds permutationsStartingAt:do: fromUser) do: [:sel | Dangerous add: sel]. #( fileOutPrototype addSpareFields makeFileOutFile ) do: [:sel | Dangerous add: sel]. #(recompile:from: recompileAllFrom: recompileChanges asPrototypeWithFields: asPrototype addInstanceVarNamed:withValue: addInstanceVariable addClassVarName: removeClassVarName: findOrAddClassVarName: instanceVariableNames: ) do: [:sel | Dangerous add: sel]. ! From asqueaker at gmail.com Thu Jul 7 21:12:04 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Jul 7 21:12:46 2016 Subject: [squeak-dev] Time now print24 In-Reply-To: References: Message-ID: Hi Eliot, wanted the exact same thing, a short terse representation so I made one that employs "present context" -- e.g., if it is same day as today, just print the time, otherwise include both the Date and Time. This should be extended so if it is outside the current year, then it should include the year, otherwise not. Here's the old method, which could use a update, since #makeUTC is no longer necessary either.. printAbbreviatedOn: aStream | date | (date := self asDate) makeUTC = Date today ifTrue: [ self asTime print24: false showSeconds: false on: aStream ] ifFalse: [ aStream maPrint: ((date printFormat: #(2 1 3 $/ 1 2 1 )) copyUpToLast: $/) ; maPrint: $@. self asTime print24: false showSeconds: false on: aStream ] Another approach -- you could also play around with DateAndTime>>#printYMDOn:. On Thu, Jul 7, 2016 at 11:33 AM, Eliot Miranda wrote: > Hi All, > > how does one produce a nice timestamp, simply date and time as in > > 7/7/2016 09:19:38 > > Trivial, right? > > So > > Date today mmddyyyy, ' ', Time now print24 '7/7/2016 09:22:40.914' > > .914, ah, nanos. How useful. Let's get rid of them. No nanos: accessor so > > Date today mmddyyyy, ' ', (Time now nanos: 0) print24 => MNU > > but there's a seconds accessor, so > > Date today mmddyyyy, ' ', (Time now seconds: Time now seconds; print24) > '7/7/2016 00:00:41 > > ?? So seconds: is private, and isn't the dual of Time seconds: > > Time seconds > ^ self second > Time second > ^ self asDuration seconds > Duration seconds > "Answer the number of seconds the receiver represents." > ^seconds rem: SecondsInMinute > > Looks broken to me. > > Personally I think print24 should not print sub seconds. > > cc'ing to Pharo because I want this timestamp to be the same in both > dialects for a profiling tool we want to use in both dialects. > _,,,^..^,,,_ > best, Eliot > > > From eliot.miranda at gmail.com Thu Jul 7 21:43:46 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Jul 7 21:43:52 2016 Subject: [squeak-dev] Re: [Pharo-dev] Time now print24 In-Reply-To: References: Message-ID: Hi Sven, > On Jul 7, 2016, at 9:47 AM, Sven Van Caekenberghe wrote: > > >> On 07 Jul 2016, at 18:33, Eliot Miranda wrote: >> >> Hi All, >> >> how does one produce a nice timestamp, simply date and time as in >> >> 7/7/2016 09:19:38 >> >> Trivial, right? > > I understand that you want it 'nice and clean', but the above is not precise (no TZ) and confusing (is it M/D/YYYY or D/M/YYYY ?). > > Going more in the ISO direction is better (more universal), IMHO. > > DateAndTime now rounded => "2016-07-07T18:45:12+02:00" My use case is providing a human-readable time stamp on a benchmark output so something really simple is what's best and the full tu stamp you give above exactly opposite to what I want; verbose and hard to read. > >> So >> >> Date today mmddyyyy, ' ', Time now print24 '7/7/2016 09:22:40.914' >> >> .914, ah, nanos. How useful. Let's get rid of them. No nanos: accessor so >> >> Date today mmddyyyy, ' ', (Time now nanos: 0) print24 => MNU >> >> but there's a seconds accessor, so >> >> Date today mmddyyyy, ' ', (Time now seconds: Time now seconds; print24) '7/7/2016 00:00:41 >> >> ?? So seconds: is private, and isn't the dual of Time seconds: >> >> Time seconds >> ^ self second >> Time second >> ^ self asDuration seconds >> Duration seconds >> "Answer the number of seconds the receiver represents." >> ^seconds rem: SecondsInMinute >> >> Looks broken to me. >> >> Personally I think print24 should not print sub seconds. >> >> cc'ing to Pharo because I want this timestamp to be the same in both dialects for a profiling tool we want to use in both dialects. >> _,,,^..^,,,_ >> best, Eliot > > From commits at source.squeak.org Thu Jul 7 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 7 21:55:05 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160707215502.22438.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068255.html Name: Collections-eem.700 Ancestors: Collections-eem.699 Better error messages for primitive failure of one-way become. Set lastChar in TranscriptStream (does this really belong in Collections?) when resetting. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068256.html Name: Compiler-eem.323 Ancestors: Compiler-eem.322 Comment bytecode 139 as the callPrimitive bytecode (Spur mandates this to lift the number of literals). ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068257.html Name: Kernel-eem.1032 Ancestors: Kernel-eem.1031 Faster method creation in CompiledMethodTrailer. Provide CompiledMethod>>voidCogVMState with a fail-over to flushCache, for safe modification of methods. Provide BlockClosure>>isNestedeWithin: for testing block nesting. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068258.html Name: Morphic-eem.1189 Ancestors: Morphic-cmm.1188 Tiny cleanup. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068259.html Name: System-eem.836 Ancestors: System-eem.835 Modify string search in methods to search symbols that are not used as message selectors. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068260.html Name: Tools-eem.706 Ancestors: Tools-topa.705 Add #format:variable:bitsUnitSize:pointers:weak: to noteDangerous: ============================================= From eliot.miranda at gmail.com Fri Jul 8 05:49:10 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Jul 8 05:49:16 2016 Subject: [squeak-dev] Re: Time now print24 In-Reply-To: References: Message-ID: <8C524ADB-269D-4970-B719-F63072063820@gmail.com> Hi All, > On Jul 7, 2016, at 9:33 AM, Eliot Miranda wrote: > > Hi All, > > how does one produce a nice timestamp, simply date and time as in > > 7/7/2016 09:19:38 > > Trivial, right? > > So > > Date today mmddyyyy, ' ', Time now print24 '7/7/2016 09:22:40.914' > > .914, ah, nanos. How useful. Let's get rid of them. No nanos: accessor so > > Date today mmddyyyy, ' ', (Time now nanos: 0) print24 => MNU > > but there's a seconds accessor, so > > Date today mmddyyyy, ' ', (Time now seconds: Time now seconds; print24) '7/7/2016 00:00:41 > > ?? So seconds: is private, and isn't the dual of Time seconds: > > Time seconds > ^ self second > Time second > ^ self asDuration seconds > Duration seconds > "Answer the number of seconds the receiver represents." > ^seconds rem: SecondsInMinute > > Looks broken to me. Let me be more explicit, and ask for permission to fix this. One basic bug is the asymmetry between seconds, an accessor that answers seconds mod 60, and seconds: that doesn't set seconds mod 60. But seconds: is private and could be replaced by eg setTotalSeconds:, presumably without breaking clients, allowing seconds: to be redefined to do the right thing. I note that the historic bug of changing the semantics of Time now to answer something with finer resolution than one second could have been avoided by adding eg exactlyNow or preciselyNow. The problem with nanos (apart from the horrible abbreviation) is that it presumes a maximum precision that isn't well chosen. Microseconds work out much better. And I hope we change the internal representation accordingly. But there needs to be done accessor that rounds to the nearest second without revealing the internal precision. Time now toTheNearestSecond or Time theNearestSecondNow or...? > > Personally I think print24 should not print sub seconds. > > cc'ing to Pharo because I want this timestamp to be the same in both dialects for a profiling tool we want to use in both dialects. > _,,,^..^,,,_ > best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160707/9c4181cb/attachment.htm From Marcel.Taeumel at hpi.de Fri Jul 8 06:43:41 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Jul 8 07:25:40 2016 Subject: [squeak-dev] Re: Time now print24 In-Reply-To: <8C524ADB-269D-4970-B719-F63072063820@gmail.com> References: <8C524ADB-269D-4970-B719-F63072063820@gmail.com> Message-ID: <1467960221262-4905522.post@n4.nabble.com> Eliot Miranda-2 wrote > Hi All, > >> On Jul 7, 2016, at 9:33 AM, Eliot Miranda < > eliot.miranda@ > > wrote: >> >> Hi All, >> >> how does one produce a nice timestamp, simply date and time as in >> >> 7/7/2016 09:19:38 >> >> Trivial, right? >> >> So >> >> Date today mmddyyyy, ' ', Time now print24 '7/7/2016 09:22:40.914' >> >> .914, ah, nanos. How useful. Let's get rid of them. No nanos: accessor >> so >> >> Date today mmddyyyy, ' ', (Time now nanos: 0) print24 => MNU >> >> but there's a seconds accessor, so >> >> Date today mmddyyyy, ' ', (Time now seconds: Time now seconds; >> print24) '7/7/2016 00:00:41 >> >> ?? So seconds: is private, and isn't the dual of Time seconds: >> >> Time seconds >> ^ self second >> Time second >> ^ self asDuration seconds >> Duration seconds >> "Answer the number of seconds the receiver represents." >> ^seconds rem: SecondsInMinute >> >> Looks broken to me. > > Let me be more explicit, and ask for permission to fix this. One basic > bug is the asymmetry between seconds, an accessor that answers seconds mod > 60, and seconds: that doesn't set seconds mod 60. But seconds: is private > and could be replaced by eg setTotalSeconds:, presumably without breaking > clients, allowing seconds: to be redefined to do the right thing. > > I note that the historic bug of changing the semantics of Time now to > answer something with finer resolution than one second could have been > avoided by adding eg exactlyNow or preciselyNow. > > The problem with nanos (apart from the horrible abbreviation) is that it > presumes a maximum precision that isn't well chosen. Microseconds work > out much better. And I hope we change the internal representation > accordingly. But there needs to be done accessor that rounds to the > nearest second without revealing the internal precision. Time now > toTheNearestSecond or Time theNearestSecondNow or...? > >> >> Personally I think print24 should not print sub seconds. >> >> cc'ing to Pharo because I want this timestamp to be the same in both >> dialects for a profiling tool we want to use in both dialects. >> _,,,^..^,,,_ >> best, Eliot Hi Eliot, please fix this. :-) Best, Marcel -- View this message in context: http://forum.world.st/Time-now-print24-tp4905424p4905522.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Fri Jul 8 08:49:51 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Jul 8 08:50:38 2016 Subject: [squeak-dev] Time now print24 In-Reply-To: References: Message-ID: <6029DC9E-F924-4965-A459-0B0AE621986D@gmx.de> On 07.07.2016, at 18:33, Eliot Miranda wrote: > Hi All, > > how does one produce a nice timestamp, simply date and time as in > > 7/7/2016 09:19:38 What's with 'TimeStamp now' (prints '8 July 2016 10:34:36 am') or this one: TimeStamp now in: [:t | String streamContents: [:s | t asDate printOn: s format: #(2 1 3 $/ 1 1 2). s space. t asTime print24: true showSeconds: true on: s]] Too bad TimeStamp is deprecated in Pharo4, so this works in pharo: DateAndTime now rounded in: [:t | String streamContents: [:s | t asDate printOn: s format: #(2 1 3 $/ 1 1 2). s space. t asTime print24: true showSeconds: true on: s]] But DateAndTime knows no #rounded in Squeak, buuut: >======================= This works for both: DateAndTime now in: [:t | String streamContents: [:s | t asDate printOn: s format: #(2 1 3 $/ 1 1 2). s space. t printHMSOn: s]] ===== Best regards -Tobias PS: I'd prefer ISO, nonetheless: https://xkcd.com/1179/ (or the German way: 25.12.2015 :P) > > Trivial, right? > > So > > Date today mmddyyyy, ' ', Time now print24 '7/7/2016 09:22:40.914' > > .914, ah, nanos. How useful. Let's get rid of them. No nanos: accessor so > > Date today mmddyyyy, ' ', (Time now nanos: 0) print24 => MNU > > but there's a seconds accessor, so > > Date today mmddyyyy, ' ', (Time now seconds: Time now seconds; print24) '7/7/2016 00:00:41 > > ?? So seconds: is private, and isn't the dual of Time seconds: > > Time seconds > ^ self second > Time second > ^ self asDuration seconds > Duration seconds > "Answer the number of seconds the receiver represents." > ^seconds rem: SecondsInMinute > > Looks broken to me. > > Personally I think print24 should not print sub seconds. > > cc'ing to Pharo because I want this timestamp to be the same in both dialects for a profiling tool we want to use in both dialects. > _,,,^..^,,,_ > best, Eliot From bert at freudenbergs.de Fri Jul 8 09:00:27 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri Jul 8 09:14:41 2016 Subject: [squeak-dev] The Trunk: Compiler-eem.323.mcz In-Reply-To: References: Message-ID: > > + 139 10001011 kkkkkkkk jjjjjjjj Invoke primitive number > jjjjjjjjkkkkkkkk > - > 140 10001100 kkkkkkkk jjjjjjjj Push Temp At kkkkkkkk In > Temp Vector At: jjjjjjjj > 141 10001101 kkkkkkkk jjjjjjjj Store Temp At kkkkkkkk In > Temp Vector At: jjjjjjjj > 142 10001110 kkkkkkkk jjjjjjjj Pop and Store Temp At > kkkkkkkk In Temp Vector At: jjjjjjjj > 143 10001111 llllkkkk jjjjjjjj iiiiiiii Push Closure Num > Copied llll Num Args kkkk BlockSize jjjjjjjjiiiiiiii > Why is the primitive index in bytecode 139 stored little-endian? The other bytecodes with immediate args > 8 bits are in big endian (e.g. push closure copy) - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160708/2662237d/attachment.htm From commits at source.squeak.org Fri Jul 8 09:47:49 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 8 09:47:51 2016 Subject: [squeak-dev] The Trunk: Chronology-Core-bf.7.mcz Message-ID: Bert Freudenberg uploaded a new version of Chronology-Core to project The Trunk: http://source.squeak.org/trunk/Chronology-Core-bf.7.mcz ==================== Summary ==================== Name: Chronology-Core-bf.7 Author: bf Time: 8 July 2016, 11:47:29.911394 am UUID: de32e02b-c9bb-43b6-acd3-c42c26188e28 Ancestors: Chronology-Core-cmm.6 Do not print nanoseconds unless requested =============== Diff against Chronology-Core-cmm.6 =============== Item was changed: ----- Method: Time>>print24:showSeconds:on: (in category 'printing') ----- print24: hr24 showSeconds: showSeconds on: aStream "Format is 'hh:mm:ss' or 'h:mm:ss am' or, if showSeconds is false, 'hh:mm' or 'h:mm am'" + ^self print24: hr24 showSeconds: showSeconds showSubseconds: false on: aStream ! - | h m s | - h := self hour. m := self minute. s := self second. - hr24 - ifTrue: - [ h < 10 ifTrue: [ aStream nextPutAll: '0' ]. - h printOn: aStream ] - ifFalse: - [ h > 12 - ifTrue: [h - 12 printOn: aStream] - ifFalse: - [h < 1 - ifTrue: [ 12 printOn: aStream ] - ifFalse: [ h printOn: aStream ]]]. - - aStream nextPutAll: (m < 10 ifTrue: [':0'] ifFalse: [':']). - m printOn: aStream. - - showSeconds ifTrue: - [ aStream nextPutAll: (s < 10 ifTrue: [':0'] ifFalse: [':']). - self nanoSecond = 0 - ifTrue: [s asInteger printOn: aStream] - ifFalse: [s asInteger * NanosInSecond + self nanoSecond asInteger - printOn: aStream asFixedPoint: NanosInSecond]]. - - hr24 ifFalse: - [ aStream nextPutAll: (h < 12 ifTrue: [' am'] ifFalse: [' pm']) ]. - ! Item was added: + ----- Method: Time>>print24:showSeconds:showSubseconds:on: (in category 'printing') ----- + print24: hr24 showSeconds: showSeconds showSubseconds: showSubseconds on: aStream + "Format is 'hh:mm:ss' or 'h:mm:ss am' or, if showSeconds is false, 'hh:mm' or 'h:mm am'. + If showSubseconds is true and our nanoSeconds are not zero, a decimal point and subseconds are added" + + | h m s | + h := self hour. m := self minute. s := self second. + hr24 + ifTrue: + [ h < 10 ifTrue: [ aStream nextPutAll: '0' ]. + h printOn: aStream ] + ifFalse: + [ h > 12 + ifTrue: [h - 12 printOn: aStream] + ifFalse: + [h < 1 + ifTrue: [ 12 printOn: aStream ] + ifFalse: [ h printOn: aStream ]]]. + + aStream nextPutAll: (m < 10 ifTrue: [':0'] ifFalse: [':']). + m printOn: aStream. + + showSeconds ifTrue: + [ aStream nextPutAll: (s < 10 ifTrue: [':0'] ifFalse: [':']). + (showSubseconds not or: [self nanoSecond = 0]) + ifTrue: [s asInteger printOn: aStream] + ifFalse: [s asInteger * NanosInSecond + self nanoSecond asInteger + printOn: aStream asFixedPoint: NanosInSecond]]. + + hr24 ifFalse: + [ aStream nextPutAll: (h < 12 ifTrue: [' am'] ifFalse: [' pm']) ]. + ! Item was changed: ----- Method: Time>>printOn: (in category 'printing') ----- printOn: aStream self print24: false showSeconds: (self seconds ~= 0 or: [self nanoSecond ~= 0]) + showSubseconds: self nanoSecond ~= 0 on: aStream! From commits at source.squeak.org Fri Jul 8 09:49:05 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 8 09:49:06 2016 Subject: [squeak-dev] The Trunk: Chronology-Tests-bf.3.mcz Message-ID: Bert Freudenberg uploaded a new version of Chronology-Tests to project The Trunk: http://source.squeak.org/trunk/Chronology-Tests-bf.3.mcz ==================== Summary ==================== Name: Chronology-Tests-bf.3 Author: bf Time: 8 July 2016, 11:48:56.621846 am UUID: 5655e31d-4351-4717-844c-4fc931c79945 Ancestors: Chronology-Tests-cmm.2 Test printing time with nanos =============== Diff against Chronology-Tests-cmm.2 =============== Item was changed: ClassTestCase subclass: #TimeTest + instanceVariableNames: 'time aTime localTimeZoneToRestore timeWithNanos' - instanceVariableNames: 'time aTime localTimeZoneToRestore' classVariableNames: '' poolDictionaries: '' category: 'Chronology-Tests'! !TimeTest commentStamp: '' prior: 0! This is the unit test for the class Time. ! Item was changed: ----- Method: TimeTest>>setUp (in category 'Running') ----- setUp localTimeZoneToRestore := DateAndTime localTimeZone. DateAndTime localTimeZone: TimeZone default. time := self timeClass fromSeconds: 14567. "4:02:47 am" + aTime := self timeClass readFrom: '12:34:56 pm' readStream. + timeWithNanos := self timeClass fromSeconds: 14567.42. - aTime := Time readFrom: '12:34:56 pm' readStream ! Item was added: + ----- Method: TimeTest>>testPrintingNanos (in category 'Tests') ----- + testPrintingNanos + + self + assert: timeWithNanos printString = '4:02:47.42 am'; + assert: timeWithNanos intervalString = '4 hours 2 minutes 47 seconds'; + assert: timeWithNanos print24 = '04:02:47'; + assert: timeWithNanos printMinutes = '4:02 am'; + assert: timeWithNanos hhmm24 = '0402'. + ! From bert at freudenbergs.de Fri Jul 8 09:49:16 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri Jul 8 09:49:19 2016 Subject: [squeak-dev] Time now print24 In-Reply-To: <6029DC9E-F924-4965-A459-0B0AE621986D@gmx.de> References: <6029DC9E-F924-4965-A459-0B0AE621986D@gmx.de> Message-ID: print24's comment is "Return as 8-digit string 'hh:mm:ss', with leading zeros if need" Fixed it, see Chronology-Core-bf.7 and Chronology-Tests-bf.3 - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160708/83903587/attachment.htm From cunningham.cb at gmail.com Fri Jul 8 14:47:06 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Fri Jul 8 14:47:09 2016 Subject: [squeak-dev] Time now print24 In-Reply-To: <6029DC9E-F924-4965-A459-0B0AE621986D@gmx.de> References: <6029DC9E-F924-4965-A459-0B0AE621986D@gmx.de> Message-ID: Hi. On Fri, Jul 8, 2016 at 1:49 AM, Tobias Pape wrote: > > But DateAndTime knows no #rounded in Squeak, buuut: > > I like the idea of #rounded a lot - but I don't like the name. Why does it only round at the seconds, and not month or year (or week)? Too generically named imo. > Best regards > -Tobias > > PS: I'd prefer ISO, nonetheless: https://xkcd.com/1179/ > (or the German way: 25.12.2015 :P) > > I'd much prefer dates in yyyy-mm-dd - the other options always get confusing - especially from this international community. Is 07/06/2016 in June or July? But if this is targetted at a particular local group, other options can win. If it is generic, I'd really prefer yyyy-mm-dd. (And this coming from a North American, too!) -cbc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160708/fa03eaa5/attachment.htm From Marcel.Taeumel at hpi.de Fri Jul 8 14:17:26 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Jul 8 14:59:28 2016 Subject: [squeak-dev] [ANN] The Squeak Shell Message-ID: <1467987446046-4905613.post@n4.nabble.com> Hi, there! I am happy to announce a new kind of project for Squeak: "The Squeak Shell". :-) You can install it into any trunk image via: Installer swa project: 'SqueakShell'; install: 'SqueakShell'. Then you will find a new kind of project under Projects -> New Project ... The Squeak Shell is independent from Morphic and MVC. It's architecture is, partially, a mixture of both. :-D I wanted to keep it as simple as possible while avoiding global state as much as possible. My goal is to add it to trunk to simplify modularization of MVC and Morphic. For example, we have to extract UserInputEvent and Canvas from Morphic into the base system. These would form a splendid addition to other projects because object-oriented event processing and displaying is not something that only Morphic should have. The Squeak Shell helped me refactor Squeak's project mechanism. It also revealed potential improvements for our Debugger, which I am going to address later this year. One goal is to make Squeak more robust and mitigate the risk of getting locked out of the system. Here is the interesting part: It can be used to recover from serious/recursive errors in Morphic and MVC. When you open a new Morphic project from within a Squeak Shell project, the shell will appear then. Only recursive errors in the shell will then start our traditional emergency evaluator. Some figures: 12 classes, 274 methods, 1454 LOC. You can open the Squeak Shell on top of the Morphic loop ("SqueakShell open") or as custom process inside the Morphic project ("SqueakShell openConcurrent"). You enter a SqueakShell project via: "SqueakShell openAsProject". The core of the Squeak Shell covers only 6 classes (see "SqueakShell-Core"). There are already two applications in this project: (1) a command line and (2) a text editor (see "SqueakShell-Tools"). You can use the Squeak Shell to explore all our tool extension points, which we use for browsing classes, inspecting objects, debugging unhandled errors in processes, etc. For this, take a look at SqshProject, SqshToolSet, and SqshUIManager. I am sure that there can be an even smaller kind of project. However, I am not so sure about the usefulness of such a project. :-) Have fun! Marcel -- View this message in context: http://forum.world.st/ANN-The-Squeak-Shell-tp4905613.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From cunningham.cb at gmail.com Fri Jul 8 15:26:32 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Fri Jul 8 15:26:36 2016 Subject: [squeak-dev] Class comment for Date mentions #localizedDates In-Reply-To: <20160628044059.GA37864@shell.msen.com> References: <3540.70.194.7.10.1457843875.squirrel@webmail.msen.com> <20160313190355.GA20838@shell.msen.com> <20160622035036.GA54539@shell.msen.com> <20160623130551.GA52947@shell.msen.com> <20160627033035.GA59892@shell.msen.com> <20160628044059.GA37864@shell.msen.com> Message-ID: Hi David On Mon, Jun 27, 2016 at 9:40 PM, David T. Lewis wrote: > > > > > > For what it is worth, I spend >80% of my time working with > > dates/timestamps, trying to turn them into Magnitudes for manipulations. > > The other 20%, I really enjoy them as timespans with locales since I deal > > with times from around the world. But the two uses are not quite easy to > > deal with - doable, just not quite intuitive. > > > > -cbc > > Based on your experience, do you think that it would make sense to have > two classes for Day and Date, where one represents date as duration, and > the other represents date as magnitude? > > Dave > Sorry for the long delay. Having Date (or Day) as a duration has positive benefits. For instance, I want to know if a particular timestamp (when something happened, what we call DateAndTime) happened on a particular Date. The DateAndTime might be in a different timezone than the Date we are checking. Being able to just ask 'is this timestamp from this date' is nice: theDate := ('2016-07-06' asDate start offset: 4 hours) asDate. theTime := '2016-07-06 20:34:02' asDateAndTime offset: 8 hours. theDate includes: theTime " => false" theTime := '2016-07-06 20:34:02' asDateAndTime offset: -8 hours. theDate includes: theTime " => true" Although it is hard to get a date in a certain timezone - is there a better way than what I wrote above? Rarely do I need it in my timezone - instead I need to specify it directly or not have it present at all. Most of the time, though, I just as a number, not a duration. I just want to show it, sometimes work from its beginning to some other time, and ignore that it is a duration. Looking at how you are interpreting my statement that I want it as a magnitude, I think I was using the wrong words. What I really meant was that I wanted it ignore the duration (and most especially the timezone) - but not use it as a raw number of some kind. Thanks, -cbc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160708/c22f9bd5/attachment.htm From lewis at mail.msen.com Fri Jul 8 15:29:43 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Jul 8 15:29:45 2016 Subject: [squeak-dev] Class comment for Date mentions #localizedDates In-Reply-To: References: <3540.70.194.7.10.1457843875.squirrel@webmail.msen.com> <20160313190355.GA20838@shell.msen.com> <20160622035036.GA54539@shell.msen.com> <20160623130551.GA52947@shell.msen.com> <20160627033035.GA59892@shell.msen.com> <20160628044059.GA37864@shell.msen.com> Message-ID: <40550.136.1.1.169.1467991783.squirrel@webmail.msen.com> > Hi David > > On Mon, Jun 27, 2016 at 9:40 PM, David T. Lewis > wrote: > >> >> >> > >> > For what it is worth, I spend >80% of my time working with >> > dates/timestamps, trying to turn them into Magnitudes for >> manipulations. >> > The other 20%, I really enjoy them as timespans with locales since I >> deal >> > with times from around the world. But the two uses are not quite easy >> to >> > deal with - doable, just not quite intuitive. >> > >> > -cbc >> >> Based on your experience, do you think that it would make sense to have >> two classes for Day and Date, where one represents date as duration, and >> the other represents date as magnitude? >> >> Dave >> > > Sorry for the long delay. > > Having Date (or Day) as a duration has positive benefits. For instance, I > want to know if a particular timestamp (when something happened, what we > call DateAndTime) happened on a particular Date. The DateAndTime might be > in a different timezone than the Date we are checking. Being able to just > ask 'is this timestamp from this date' is nice: > > theDate := ('2016-07-06' asDate start offset: 4 hours) asDate. > theTime := '2016-07-06 20:34:02' asDateAndTime offset: 8 hours. > theDate includes: theTime " => false" > theTime := '2016-07-06 20:34:02' asDateAndTime offset: -8 hours. > theDate includes: theTime " => true" > > Although it is hard to get a date in a certain timezone - is there a > better > way than what I wrote above? Rarely do I need it in my timezone - instead > I need to specify it directly or not have it present at all. > > Most of the time, though, I just as a number, not a duration. I just want > to show it, sometimes work from its beginning to some other time, and > ignore that it is a duration. > > Looking at how you are interpreting my statement that I want it as a > magnitude, I think I was using the wrong words. What I really meant was > that I wanted it ignore the duration (and most especially the timezone) - > but not use it as a raw number of some kind. > > Thanks, > -cbc > > Thank you Chris, that is a very good explanation :-) Dave From ALONZOTG at verizon.net Fri Jul 8 16:43:17 2016 From: ALONZOTG at verizon.net (Alan Grimes) Date: Fri Jul 8 16:41:33 2016 Subject: [squeak-dev] I miss OpenCrquet. =( Message-ID: <577FD825.7070603@verizon.net> If you wanted to bring OpenCroquet back, I think the first step would be generating vulkan bindings. The Vulkan API is specified in a formal specification, vk.xml or something. So you'd take that and compile the xml into FFI calls... There is an alpha version of a generator for C# on github... The other half of the api are the shader kernels. For that you'd need a SPIR compiler. Anyway, just a brainfart... -- IQ is a measure of how stupid you feel. Powers are not rights. From commits at source.squeak.org Fri Jul 8 18:35:06 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 8 18:35:08 2016 Subject: [squeak-dev] The Trunk: Files-eem.158.mcz Message-ID: Eliot Miranda uploaded a new version of Files to project The Trunk: http://source.squeak.org/trunk/Files-eem.158.mcz ==================== Summary ==================== Name: Files-eem.158 Author: eem Time: 8 July 2016, 11:34:56.899258 am UUID: bd16d152-2f96-4857-8363-c7364470391b Ancestors: Files-dtl.157 Add directoryNamesMatching: & streamline fileNamesMatching: =============== Diff against Files-dtl.157 =============== Item was added: + ----- Method: FileDirectory>>directoryNamesMatching: (in category 'file name utilities') ----- + directoryNamesMatching: pat + " + FileDirectory default directoryNamesMatching: '*' + FileDirectory default directoryNamesMatching: '*_segs' + " + + | directories directoryNames | + directories := OrderedCollection new. + directoryNames := self directoryNames. + (pat findTokens: ';', String crlf) do: + [:tok | + directories addAll: (directoryNames select: [:name | tok match: name])]. + ^directories! Item was changed: ----- Method: FileDirectory>>fileNamesMatching: (in category 'file name utilities') ----- fileNamesMatching: pat " FileDirectory default fileNamesMatching: '*' FileDirectory default fileNamesMatching: '*.image;*.changes' " + | files fileNames | - | files | files := OrderedCollection new. + fileNames := self fileNames. + (pat findTokens: ';', String crlf) do: + [:tok | + files addAll: (fileNames select: [:name | tok match: name])]. + ^files! - - (pat findTokens: ';', String crlf) do: [ :tok | - files addAll: (self fileNames select: [:name | tok match: name]) ]. - - ^files - ! From commits at source.squeak.org Fri Jul 8 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 8 21:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160708215502.26124.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068261.html Name: Chronology-Core-bf.7 Ancestors: Chronology-Core-cmm.6 Do not print nanoseconds unless requested ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068262.html Name: Chronology-Tests-bf.3 Ancestors: Chronology-Tests-cmm.2 Test printing time with nanos ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068263.html Name: Files-eem.158 Ancestors: Files-dtl.157 Add directoryNamesMatching: & streamline fileNamesMatching: ============================================= From eliot.miranda at gmail.com Fri Jul 8 22:29:20 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Jul 8 22:29:24 2016 Subject: [squeak-dev] The Trunk: Compiler-eem.323.mcz In-Reply-To: References: Message-ID: On Fri, Jul 8, 2016 at 2:00 AM, Bert Freudenberg wrote: > + 139 10001011 kkkkkkkk jjjjjjjj Invoke primitive number >> jjjjjjjjkkkkkkkk >> - >> 140 10001100 kkkkkkkk jjjjjjjj Push Temp At kkkkkkkk In >> Temp Vector At: jjjjjjjj >> 141 10001101 kkkkkkkk jjjjjjjj Store Temp At kkkkkkkk In >> Temp Vector At: jjjjjjjj >> 142 10001110 kkkkkkkk jjjjjjjj Pop and Store Temp At >> kkkkkkkk In Temp Vector At: jjjjjjjj >> 143 10001111 llllkkkk jjjjjjjj iiiiiiii Push Closure Num >> Copied llll Num Args kkkk BlockSize jjjjjjjjiiiiiiii >> > > Why is the primitive index in bytecode 139 stored little-endian? The other > bytecodes with immediate args > 8 bits are in big endian (e.g. push closure > copy) > No reason beyond my habit and preference. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160708/20cee828/attachment.htm From eliot.miranda at gmail.com Fri Jul 8 22:35:35 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Jul 8 22:35:46 2016 Subject: [squeak-dev] The Trunk: System-eem.835.mcz In-Reply-To: <3712B695-BAE6-4AB5-BC56-2B2675558F40@gmx.de> References: <55908F41-749C-4FAE-A00D-2F6CBF0B9064@gmx.de> <3712B695-BAE6-4AB5-BC56-2B2675558F40@gmx.de> Message-ID: Hi Tobias, On Wed, Jul 6, 2016 at 12:23 AM, Tobias Pape wrote: > > On 06.07.2016, at 08:17, Eliot Miranda wrote: > > > On Tue, Jul 5, 2016 at 10:21 PM, Tobias Pape wrote: > > > > On 06.07.2016, at 01:13, commits@source.squeak.org wrote: > > > > > Eliot Miranda uploaded a new version of System to project The Trunk: > > > http://source.squeak.org/trunk/System-eem.835.mcz > > > > > > ==================== Summary ==================== > > > > > > Name: System-eem.835 > > > Author: eem > > > Time: 5 July 2016, 6:13:25.980763 pm > > > UUID: 44354df1-cecb-414c-a705-daa84b7388dd > > > Ancestors: System-eem.834 > > > > > > Fix reading methods from DataStreams on Spur. Old code used pre-Spur > numLits header format, and was not 64-bit aware. > > > > > > > Does that mean that pre-Spur methods on datastreams cannot be read in > Spur images? > > That would be a bummer? > > > > It needs some kind of version stamp on the stream. Point me to some > such and we can switch hit. > > There is none. > I would say, we store the data in the format DataStream already know > (which happens to be > the Pre-Spur version) and adapt on read. That would ensure backward- and > forward-compatibility: > > - We could still read CMs serialized in pre-spur. > - We could also read Spur-CMs in pre-spur images. > > Ok. -- break -- > I just realized that what you changed was the read part. so no > problem here. We could change the part to do things differently > when running on spur or non-spur. > The thing is that the two header formats are incompatible. The old one allows up to 2^9-1 literals, the new one up to 2^15-1. So staying with the old format limits us. We need some kind of version stamp. Right now DataStream and ImageSegment are extremely version-dependent and hence restrictive formats. It would be good for someone to revisit them and try and add some kind of versioning information, preferably supporting backward compatibility. > > Best regards > -Tobias > > > > > > > > Best regards > > -Tobias > > > > > =============== Diff against System-eem.834 =============== > > > > > > Item was changed: > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160708/90f5362a/attachment.htm From eliot.miranda at gmail.com Fri Jul 8 22:46:18 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Jul 8 22:46:22 2016 Subject: [squeak-dev] Re: rice paper background in trunk? In-Reply-To: <1467890321499-4905327.post@n4.nabble.com> References: <1467890321499-4905327.post@n4.nabble.com> Message-ID: Hi Marcel, On Thu, Jul 7, 2016 at 4:18 AM, marcel.taeumel wrote: > Eliot Miranda-2 wrote > > Chris, I know. I want a programmatic way of getting it back. It used to > > be party of the release builder. How can I find that code so I don't > have > > to grab something from the filesystem? > > > > On Wed, Jul 6, 2016 at 2:28 PM, Chris Muller < > > > asqueaker@ > > > > wrote: > > > >> Hi Eliot, you can tile any graphic as your background by opening a > >> File browser in Squeak, then selecting the image you want to use as > >> your background, then click on the "Background" button in the toolbar. > >> It tiles it by default. > >> > >> You can dig out the bits from Squeak 4.3 "Ricepaper" if you want > >> those, or there are a lot more available on the net, such as at > >> http://subtlepatterns.com/. > >> > >> HTH. > >> > >> On Wed, Jul 6, 2016 at 3:34 PM, Eliot Miranda < > > > eliot.miranda@ > > > > > >> wrote: > >> > Hi All, > >> > > >> > how do I set rice paper as the background as opposed to this drab > >> grey? > >> > Marcel told me once but I think I deleted the email. I can't find > >> anything > >> > on lists.squeakfoundation.org. Sorry for the noise. > >> > > >> > _,,,^..^,,,_ > >> > best, Eliot > >> > > >> > > >> > > >> > >> > > > > > > -- > > _,,,^..^,,,_ > > best, Eliot > > Hi Eliot, > > here are some older backgrounds, whose bits are not in the trunk image > anymore: > Thanks! > > > > > I like, and am now using, the 4.5 one, and it's v small. Could we not include at least some of these as menu-selectable options in the base image? I *hate* the grey. I find it depressing. Being able to simply and reliably tailor the environment to some extent out-of-the-box and not maintain one's own pet project for customisation seems a reasonable goal. I get that Potsdam have asked their students what their preferences are, but they are not representative of the entire community, and providing some flexibility seems inexpensive and constructive. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160708/cf65d1f0/attachment.htm From Yoshiki.Ohshima at acm.org Fri Jul 8 22:58:37 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Fri Jul 8 22:58:40 2016 Subject: [squeak-dev] spyOnWorldFor: Message-ID: I am trying a few things on Squeak 5.0. In earlier versions there was AndreasSystemProfier (formerly known as QSystemProfier) and had a method called spyOnWorldFor:, which was quite useful. I just loaded AndreasProfier-eem.11.mcz and tried it but it crashed the 5.0 all in one VM on Mac OS 10.10. Is this a known issue? Is there an alternative to it? -- -- Yoshiki From lewis at mail.msen.com Fri Jul 8 23:11:48 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Jul 8 23:11:50 2016 Subject: [squeak-dev] The Trunk: System-eem.835.mcz In-Reply-To: References: <55908F41-749C-4FAE-A00D-2F6CBF0B9064@gmx.de> <3712B695-BAE6-4AB5-BC56-2B2675558F40@gmx.de> Message-ID: <20160708231148.GA64229@shell.msen.com> On Fri, Jul 08, 2016 at 03:35:35PM -0700, Eliot Miranda wrote: > Hi Tobias, > > On Wed, Jul 6, 2016 at 12:23 AM, Tobias Pape wrote: > > > > > On 06.07.2016, at 08:17, Eliot Miranda wrote: > > > > > On Tue, Jul 5, 2016 at 10:21 PM, Tobias Pape wrote: > > > > > > On 06.07.2016, at 01:13, commits@source.squeak.org wrote: > > > > > > > Eliot Miranda uploaded a new version of System to project The Trunk: > > > > http://source.squeak.org/trunk/System-eem.835.mcz > > > > > > > > ==================== Summary ==================== > > > > > > > > Name: System-eem.835 > > > > Author: eem > > > > Time: 5 July 2016, 6:13:25.980763 pm > > > > UUID: 44354df1-cecb-414c-a705-daa84b7388dd > > > > Ancestors: System-eem.834 > > > > > > > > Fix reading methods from DataStreams on Spur. Old code used pre-Spur > > numLits header format, and was not 64-bit aware. > > > > > > > > > > Does that mean that pre-Spur methods on datastreams cannot be read in > > Spur images? > > > That would be a bummer??? > > > > > > It needs some kind of version stamp on the stream. Point me to some > > such and we can switch hit. > > > > There is none. > > I would say, we store the data in the format DataStream already know > > (which happens to be > > the Pre-Spur version) and adapt on read. That would ensure backward- and > > forward-compatibility: > > > > - We could still read CMs serialized in pre-spur. > > - We could also read Spur-CMs in pre-spur images. > > > > Ok. -- break -- > > I just realized that what you changed was the read part. so no > > problem here. We could change the part to do things differently > > when running on spur or non-spur. > > > > The thing is that the two header formats are incompatible. The old one > allows up to 2^9-1 literals, the new one up to 2^15-1. So staying with the > old format limits us. We need some kind of version stamp. Right now > DataStream and ImageSegment are extremely version-dependent and hence > restrictive formats. It would be good for someone to revisit them and try > and add some kind of versioning information, preferably supporting backward > compatibility. > While a bit ad-hoc, but we do have an image format number that is used for a similar purpose in the saved image files. Would that provide enough information to serve as a version stamp? The current known formats are maintained in package ImageFormat in the http://source.squeak.org/VMMaker repository. It is small and independent of VMMaker, so we could consider moving it into the image if it is of more general utility. Dave From asqueaker at gmail.com Sat Jul 9 02:11:46 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sat Jul 9 02:12:28 2016 Subject: [squeak-dev] Re: Time now print24 In-Reply-To: <8C524ADB-269D-4970-B719-F63072063820@gmail.com> References: <8C524ADB-269D-4970-B719-F63072063820@gmail.com> Message-ID: Eliot, I'm not against your suggestion about seconds:, but there is no way you should have to mutate an object for sake of only printing it. It should merely be the responsibility of the printing to meet the needed requirement. On Fri, Jul 8, 2016 at 12:49 AM, Eliot Miranda wrote: > Hi All, > > On Jul 7, 2016, at 9:33 AM, Eliot Miranda wrote: > > Hi All, > > how does one produce a nice timestamp, simply date and time as in > > 7/7/2016 09:19:38 > > Trivial, right? > > So > > Date today mmddyyyy, ' ', Time now print24 '7/7/2016 09:22:40.914' > > .914, ah, nanos. How useful. Let's get rid of them. No nanos: accessor so > > Date today mmddyyyy, ' ', (Time now nanos: 0) print24 => MNU > > but there's a seconds accessor, so > > Date today mmddyyyy, ' ', (Time now seconds: Time now seconds; print24) > '7/7/2016 00:00:41 > > ?? So seconds: is private, and isn't the dual of Time seconds: > > Time seconds > ^ self second > Time second > ^ self asDuration seconds > Duration seconds > "Answer the number of seconds the receiver represents." > ^seconds rem: SecondsInMinute > > Looks broken to me. > > > Let me be more explicit, and ask for permission to fix this. One basic bug > is the asymmetry between seconds, an accessor that answers seconds mod 60, > and seconds: that doesn't set seconds mod 60. But seconds: is private and > could be replaced by eg setTotalSeconds:, presumably without breaking > clients, allowing seconds: to be redefined to do the right thing. > > I note that the historic bug of changing the semantics of Time now to answer > something with finer resolution than one second could have been avoided by > adding eg exactlyNow or preciselyNow. > > The problem with nanos (apart from the horrible abbreviation) is that it > presumes a maximum precision that isn't well chosen. Microseconds work out > much better. And I hope we change the internal representation accordingly. > But there needs to be done accessor that rounds to the nearest second > without revealing the internal precision. Time now toTheNearestSecond or > Time theNearestSecondNow or...? > > > Personally I think print24 should not print sub seconds. > > cc'ing to Pharo because I want this timestamp to be the same in both > dialects for a profiling tool we want to use in both dialects. > _,,,^..^,,,_ > best, Eliot > > > > From asqueaker at gmail.com Sat Jul 9 02:14:15 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sat Jul 9 02:14:57 2016 Subject: [squeak-dev] Re: Time now print24 In-Reply-To: <8C524ADB-269D-4970-B719-F63072063820@gmail.com> References: <8C524ADB-269D-4970-B719-F63072063820@gmail.com> Message-ID: > But there needs to be done accessor that rounds to the nearest second > without revealing the internal precision. Time now toTheNearestSecond or > Time theNearestSecondNow or...? Time now truncatedTo: 1 second. Time now roundedTo: 1 second. From lewis at mail.msen.com Sat Jul 9 02:42:08 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Jul 9 02:42:52 2016 Subject: [squeak-dev] Re: Time now print24 In-Reply-To: <8C524ADB-269D-4970-B719-F63072063820@gmail.com> References: <8C524ADB-269D-4970-B719-F63072063820@gmail.com> Message-ID: <20160709024208.GA95637@shell.msen.com> On Thu, Jul 07, 2016 at 10:49:10PM -0700, Eliot Miranda wrote: > Hi All, > > > On Jul 7, 2016, at 9:33 AM, Eliot Miranda wrote: > > > > Hi All, > > > > how does one produce a nice timestamp, simply date and time as in > > > > 7/7/2016 09:19:38 > > > > Trivial, right? > > > > So > > > > Date today mmddyyyy, ' ', Time now print24 '7/7/2016 09:22:40.914' > > > > .914, ah, nanos. How useful. Let's get rid of them. No nanos: accessor so > > > > Date today mmddyyyy, ' ', (Time now nanos: 0) print24 => MNU > > > > but there's a seconds accessor, so > > > > Date today mmddyyyy, ' ', (Time now seconds: Time now seconds; print24) '7/7/2016 00:00:41 > > > > ?? So seconds: is private, and isn't the dual of Time seconds: > > > > Time seconds > > ^ self second > > Time second > > ^ self asDuration seconds > > Duration seconds > > "Answer the number of seconds the receiver represents." > > ^seconds rem: SecondsInMinute > > > > Looks broken to me. > > Let me be more explicit, and ask for permission to fix this. One basic bug is the asymmetry between seconds, an accessor that answers seconds mod 60, and seconds: that doesn't set seconds mod 60. But seconds: is private and could be replaced by eg setTotalSeconds:, presumably without breaking clients, allowing seconds: to be redefined to do the right thing. > Yes please fix it. It is clearly wrong to have #seconds and #seconds: refer to two different things. And since #seconds: is private, that would be the thing to change. Changing it to #setTotalSeconds: would be good, although I note that there is a #asSeconds method too, so maybe #setSeconds: might match better with #asSeconds. But either would be fine, and yes please, go ahead and fix it. > I note that the historic bug of changing the semantics of Time now to answer something with finer resolution than one second could have been avoided by adding eg exactlyNow or preciselyNow. > I'm not sure it is a bug, more like a difference in presentation versus internal representation. I think that #now should mean "now", not "now rounded to the nearest second". But if I display the time now, I probably would prefer it to be displayed to the nearest second. > The problem with nanos (apart from the horrible abbreviation) is that it presumes a maximum precision that isn't well chosen. Microseconds work out much better. And I hope we change the internal representation accordingly. But there needs to be done accessor that rounds to the nearest second without revealing the internal precision. Time now toTheNearestSecond or Time theNearestSecondNow or...? > Absolutely right. In the UTCDateAndTime changes, the magnitude of DateAndTime is utcMicroseconds for exactly this reason. That does not preclude nanosecond precision, it just means that the common case of microsecond precision uses an integer, and higher precisions are represented as Fraction. So the common case is fast, and higher precision remains possible. Somewhat more generally, the scale is in units of seconds. Precision should be unlimited (any Number) and accuracy is dependent on the underlying system clock (milliseconds or maybe microseconds if you are lucky). Most everyday computers may be accurate to milliseconds but report precision to microseconds. Specialized real time systems (e.g. GPS) may legitimately deal with higher accuracies and are probably not lying if they claim nanosecond precision. Human beings may drift a few hours one way or the other without noticing the difference, and are thus generally satisfied with full second precision and not much accuracy at all ;-) Dave > > > > Personally I think print24 should not print sub seconds. > > > > cc'ing to Pharo because I want this timestamp to be the same in both dialects for a profiling tool we want to use in both dialects. > > _,,,^..^,,,_ > > best, Eliot > From lewis at mail.msen.com Sat Jul 9 02:45:00 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Jul 9 02:45:44 2016 Subject: [Pharo-dev] [squeak-dev] Re: Time now print24 In-Reply-To: References: <8C524ADB-269D-4970-B719-F63072063820@gmail.com> Message-ID: <20160709024500.GB95637@shell.msen.com> On Fri, Jul 08, 2016 at 09:11:46PM -0500, Chris Muller wrote: > Eliot, I'm not against your suggestion about seconds:, but there is no > way you should have to mutate an object for sake of only printing it. > It should merely be the responsibility of the printing to meet the > needed requirement. +1 Dave > > On Fri, Jul 8, 2016 at 12:49 AM, Eliot Miranda wrote: > > Hi All, > > > > On Jul 7, 2016, at 9:33 AM, Eliot Miranda wrote: > > > > Hi All, > > > > how does one produce a nice timestamp, simply date and time as in > > > > 7/7/2016 09:19:38 > > > > Trivial, right? > > > > So > > > > Date today mmddyyyy, ' ', Time now print24 '7/7/2016 09:22:40.914' > > > > .914, ah, nanos. How useful. Let's get rid of them. No nanos: accessor so > > > > Date today mmddyyyy, ' ', (Time now nanos: 0) print24 => MNU > > > > but there's a seconds accessor, so > > > > Date today mmddyyyy, ' ', (Time now seconds: Time now seconds; print24) > > '7/7/2016 00:00:41 > > > > ?? So seconds: is private, and isn't the dual of Time seconds: > > > > Time seconds > > ^ self second > > Time second > > ^ self asDuration seconds > > Duration seconds > > "Answer the number of seconds the receiver represents." > > ^seconds rem: SecondsInMinute > > > > Looks broken to me. > > > > > > Let me be more explicit, and ask for permission to fix this. One basic bug > > is the asymmetry between seconds, an accessor that answers seconds mod 60, > > and seconds: that doesn't set seconds mod 60. But seconds: is private and > > could be replaced by eg setTotalSeconds:, presumably without breaking > > clients, allowing seconds: to be redefined to do the right thing. > > > > I note that the historic bug of changing the semantics of Time now to answer > > something with finer resolution than one second could have been avoided by > > adding eg exactlyNow or preciselyNow. > > > > The problem with nanos (apart from the horrible abbreviation) is that it > > presumes a maximum precision that isn't well chosen. Microseconds work out > > much better. And I hope we change the internal representation accordingly. > > But there needs to be done accessor that rounds to the nearest second > > without revealing the internal precision. Time now toTheNearestSecond or > > Time theNearestSecondNow or...? > > > > > > Personally I think print24 should not print sub seconds. > > > > cc'ing to Pharo because I want this timestamp to be the same in both > > dialects for a profiling tool we want to use in both dialects. > > _,,,^..^,,,_ > > best, Eliot > > > > > > > > From Marcel.Taeumel at hpi.de Sun Jul 10 08:42:05 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun Jul 10 09:24:19 2016 Subject: [squeak-dev] Re: spyOnWorldFor: In-Reply-To: References: Message-ID: <1468140125615-4905771.post@n4.nabble.com> Yoshiki Ohshima-3 wrote > I am trying a few things on Squeak 5.0. In earlier versions there was > AndreasSystemProfier (formerly known as QSystemProfier) and had a > method called spyOnWorldFor:, which was quite useful. I just loaded > AndreasProfier-eem.11.mcz and tried it but it crashed the 5.0 all in > one VM on Mac OS 10.10. > > Is this a known issue? Is there an alternative to it? > > -- > -- Yoshiki Hi Yoshiki, there is Extras > Start Profiler, which does MessageTally spyOn: [[Sensor peekPosition y > 0] whileTrue: [World doOneCycle]]. I do not know the semantics of #spyOnWorldFor:, but you could specify other duration limits in the whileTrue predicate. Best, Marcel -- View this message in context: http://forum.world.st/spyOnWorldFor-tp4905670p4905771.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From eliot.miranda at gmail.com Sun Jul 10 14:45:48 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sun Jul 10 14:45:56 2016 Subject: [squeak-dev] spyOnWorldFor: In-Reply-To: References: Message-ID: <4B6F0D07-F678-4A61-BF7C-62F4C5315475@gmail.com> Hi Yoshiki, try an up-to-date VM. I'd point you to Travis could but I don't see entirely green builds there right now. So pick up the most up-to-date VM from my site. _,,,^..^,,,_ (phone) > On Jul 8, 2016, at 3:58 PM, Yoshiki Ohshima wrote: > > I am trying a few things on Squeak 5.0. In earlier versions there was > AndreasSystemProfier (formerly known as QSystemProfier) and had a > method called spyOnWorldFor:, which was quite useful. I just loaded > AndreasProfier-eem.11.mcz and tried it but it crashed the 5.0 all in > one VM on Mac OS 10.10. > > Is this a known issue? Is there an alternative to it? > > -- > -- Yoshiki > From nicolas.cellier.aka.nice at gmail.com Sun Jul 10 15:07:41 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Sun Jul 10 15:07:44 2016 Subject: [squeak-dev] spyOnWorldFor: In-Reply-To: <4B6F0D07-F678-4A61-BF7C-62F4C5315475@gmail.com> References: <4B6F0D07-F678-4A61-BF7C-62F4C5315475@gmail.com> Message-ID: Hi Eliot, The last build #158 at https://travis-ci.org/OpenSmalltalk/opensmalltalk-vm/builds is red. But I suspect false positive. The details are at https://travis-ci.org/OpenSmalltalk/opensmalltalk-vm/builds/143459279 where only 3 build failed on macosx64 for newspeak and pharo, but succeeded on linux64 and squeak... Either the build should also fail for squeak if it's OS dependent. Or it should also fail for linux64 if it Smalltalk target dependent. But this combination is weird. Clicking on any of the failure won't give any information (empty raw log, ellapsed time not indicated...) while it works for succeeded builds... 2016-07-10 16:45 GMT+02:00 Eliot Miranda : > Hi Yoshiki, > > try an up-to-date VM. I'd point you to Travis could but I don't see > entirely green builds there right now. So pick up the most up-to-date VM > from my site. > > _,,,^..^,,,_ (phone) > > > On Jul 8, 2016, at 3:58 PM, Yoshiki Ohshima > wrote: > > > > I am trying a few things on Squeak 5.0. In earlier versions there was > > AndreasSystemProfier (formerly known as QSystemProfier) and had a > > method called spyOnWorldFor:, which was quite useful. I just loaded > > AndreasProfier-eem.11.mcz and tried it but it crashed the 5.0 all in > > one VM on Mac OS 10.10. > > > > Is this a known issue? Is there an alternative to it? > > > > -- > > -- Yoshiki > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160710/6b4ec772/attachment.htm From commits at source.squeak.org Sun Jul 10 18:59:38 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 10 18:59:40 2016 Subject: [squeak-dev] The Trunk: CollectionsTests-topa.265.mcz Message-ID: Tobias Pape uploaded a new version of CollectionsTests to project The Trunk: http://source.squeak.org/trunk/CollectionsTests-topa.265.mcz ==================== Summary ==================== Name: CollectionsTests-topa.265 Author: topa Time: 10 July 2016, 8:59:28.460057 pm UUID: ab27728f-2668-44b0-9857-33016d691ee4 Ancestors: CollectionsTests-ul.264 Add a test for Ascii85 conversion =============== Diff against CollectionsTests-ul.264 =============== Item was added: + TestCase subclass: #Ascii85ConverterTest + instanceVariableNames: 'decoded encoded' + classVariableNames: '' + poolDictionaries: '' + category: 'CollectionsTests-Streams'! + + !Ascii85ConverterTest commentStamp: '' prior: 0! + This is the unit test for the class Base64MimeConverter. Unit tests are a good way to exercise the functionality of your system in a repeatable and automatic manner. They are therefore recommended if you plan to release anything. For more information, see: + - http://www.c2.com/cgi/wiki?UnitTest + - http://minnow.cc.gatech.edu/squeak/1547 + - the sunit class category! Item was added: + ----- Method: Ascii85ConverterTest>>decoded (in category 'accessing') ----- + decoded + + ^ decoded! Item was added: + ----- Method: Ascii85ConverterTest>>decoded: (in category 'accessing') ----- + decoded: anObject + + decoded := anObject! Item was added: + ----- Method: Ascii85ConverterTest>>encoded (in category 'accessing') ----- + encoded + + ^ encoded! Item was added: + ----- Method: Ascii85ConverterTest>>encoded: (in category 'accessing') ----- + encoded: anObject + + encoded := anObject! Item was added: + ----- Method: Ascii85ConverterTest>>hackedEncoded (in category 'accessing') ----- + hackedEncoded + + ^ String streamContents: + [:out | | in | + in := self encoded readStream. + out + nextPutAll: (in next: 5); + cr; + nextPutAll: (in next: 4); + space; + nextPutAll: in upToEnd] + ! Item was added: + ----- Method: Ascii85ConverterTest>>setUp (in category 'initialize-release') ----- + setUp + self decoded: 'Hi There!!'. + self encoded: '<~8802GBOu3q+T~>'.! Item was added: + ----- Method: Ascii85ConverterTest>>testAscii85Encoded (in category 'tests') ----- + testAscii85Encoded + + self + assert: (Ascii85Converter encode: self decoded) contents + equals: self decoded ascii85Encoded + description: 'The convenience method should match the converters output' + ! Item was added: + ----- Method: Ascii85ConverterTest>>testDecode1Zero (in category 'tests') ----- + testDecode1Zero + | bits chars | + bits := #[0]. + chars := '<~!!!!~>'. + self + assert: bits + equals: (Ascii85Converter decodeToBytes: chars) contents + description: 'Decoding should decode three zeros without squashing'. + ! Item was added: + ----- Method: Ascii85ConverterTest>>testDecode3Zeros (in category 'tests') ----- + testDecode3Zeros + | bits chars | + bits := #[0 0 0]. + chars := '<~!!!!!!!!~>'. + self + assert: bits + equals: (Ascii85Converter decodeToBytes: chars) contents + description: 'Decoding should decode three zeros without squashing'. + ! Item was added: + ----- Method: Ascii85ConverterTest>>testDecode4Zeros (in category 'tests') ----- + testDecode4Zeros + | bits chars | + bits := #[0 0 0 0]. + chars := '<~z~>'. + self + assert: bits + equals: (Ascii85Converter decodeToBytes: chars) contents + description: 'Decoding should decode four zeros with squashing'. + ! Item was added: + ----- Method: Ascii85ConverterTest>>testDecode5Zeros (in category 'tests') ----- + testDecode5Zeros + | bits chars | + bits := #[0 0 0 0 0]. + chars := '<~z!!!!~>'. + self + assert: bits + equals: (Ascii85Converter decodeToBytes: chars) contents + description: 'Decoding should decode five zeros with squashing and a bang'. + ! Item was added: + ----- Method: Ascii85ConverterTest>>testDecodeEndTooShort (in category 'tests') ----- + testDecodeEndTooShort + | chars | + chars := '<~z!!~>'. + self + should: [Ascii85Converter decodeToBytes: chars] + raise: Error + description: 'Decoding too short end tuple should raise an error'.! Item was added: + ----- Method: Ascii85ConverterTest>>testDecodeIgnoreFiller (in category 'tests') ----- + testDecodeIgnoreFiller + + self + assert: self decoded + equals: self hackedEncoded ascii85Decoded + description: 'Decoding should ignore linebreaks and spaces'. + ! Item was added: + ----- Method: Ascii85ConverterTest>>testEncodeDecode (in category 'tests') ----- + testEncodeDecode + + | encoded | + encoded := (Ascii85Converter encode: self decoded) contents. + self + assert: self encoded + equals: encoded + description: 'A simple text should be encodable.'. + self + assert: self decoded + equals: (Ascii85Converter decodeToChars: encoded) contents + description: 'The encoded text decoded should match the original'. + ! Item was added: + ----- Method: Ascii85ConverterTest>>testEncodeDecodeMultiLine (in category 'tests') ----- + testEncodeDecodeMultiLine + " PLRM page 131: + It inserts a newline in the encoded output at least once every 80 characters, + thereby limiting the lengths of lines. + " + | aHundred encodedLines | + aHundred := String new: 100 withAll: $a. + encodedLines := (Ascii85Converter encode: aHundred) contents lines. + self + assert: (encodedLines collect: [:ea | ea size]) max <= 80 + description: 'Encoded long lines should break at max 80 characters'. + ! Item was added: + ----- Method: Ascii85ConverterTest>>testEncodeDecodeWithZ (in category 'tests') ----- + testEncodeDecodeWithZ + " PLRM page 131: + As a special case, if all five digits are 0, they are represented by a single character z + instead of by !!!!!!!!!!. + " + | bits chars | + bits := #[40 50 60 0 0 0 0 0 0 0 0 0 0 0 40 50 60]. + chars := '<~-o*mbzz!!!!"E&49~>'. + self + assert: chars + equals: (Ascii85Converter encode: bits) contents + description: 'Encoding should squash five-tuples of 0 to z'. + self + assert: chars + equals: (Ascii85Converter encode: bits asString) contents + description: 'Encoding should squash five-tuples of 0 to z'. + self + assert: bits + equals: (Ascii85Converter decodeToBytes: chars) contents + description: 'Decoding should unsquash z to five-tuples of 0'. + self + assert: bits asString + equals: (Ascii85Converter decodeToChars: chars) contents + description: 'Decoding should unsquash z to five-tuples of 0'. + ! Item was added: + ----- Method: Ascii85ConverterTest>>testOnByteArray (in category 'tests') ----- + testOnByteArray + + self assert: self encoded equals: self decoded asByteArray ascii85Encoded.! From commits at source.squeak.org Sun Jul 10 19:01:16 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 10 19:01:18 2016 Subject: [squeak-dev] The Trunk: Collections-topa.701.mcz Message-ID: Tobias Pape uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-topa.701.mcz ==================== Summary ==================== Name: Collections-topa.701 Author: topa Time: 10 July 2016, 9:00:58.083099 pm UUID: 5ae1b44b-94ef-4657-a76e-387509401f08 Ancestors: Collections-eem.700 Add an Ascii85 converter akin to Base64MimeConverter =============== Diff against Collections-eem.700 =============== Item was added: + Object subclass: #Ascii85Converter + instanceVariableNames: 'dataStream stringStream number85 tupleSize binary' + classVariableNames: '' + poolDictionaries: '' + category: 'Collections-Streams'! + + !Ascii85Converter commentStamp: 'topa 7/10/2016 20:57' prior: 0! + I convert between binary data and an Ascii85 text representation of PostScript and PDF fame. + I am a little bit more efficient (~25% overhead) than Base64 (~30% overhead). + + Instance Variables + binary: - Tells whether to decode to binary data or characters + dataStream: - The data stream to decode to or encode from (Typically does not contain Ascii85) + stringStream: - The text stream to decode from or encode to (Always contains Ascii85) + number85: - Decoder state, accumulated read number in base85 + tupleSize: - Number of bytes read into number85 already + + 'Hello, World' ascii85Encoded. + + '<~87cURD]htuF_+us~>' ascii85Decoded. + ! Item was added: + ----- Method: Ascii85Converter class>>decode:as: (in category 'convenience') ----- + decode: aStringOrStream as: contentsClass + + ^ contentsClass streamContents: + [:out | self decode: aStringOrStream to: out]! Item was added: + ----- Method: Ascii85Converter class>>decode:to: (in category 'convenience') ----- + decode: aStringOrStream to: outStream + + ^ (self stringStream: aStringOrStream readStream dataStream: outStream) + decode! Item was added: + ----- Method: Ascii85Converter class>>decodeToBytes: (in category 'convenience') ----- + decodeToBytes: aStringOrStream + " Analogous to Base64MimeConverter>>#mimeDecodeToBytes:" + | expectedSize | + expectedSize := aStringOrStream size * 4 // 5. + ^ (ByteArray new: expectedSize streamContents: + [:stream | + (self stringStream: aStringOrStream readStream dataStream: stream) + decodeToByteArray]) readStream! Item was added: + ----- Method: Ascii85Converter class>>decodeToChars: (in category 'convenience') ----- + decodeToChars: aStringOrStream + " Analogous to Base64MimeConverter>>#mimeDecodeToChars:" + | expectedSize | + expectedSize := aStringOrStream size * 4 // 5. + ^ (String new: expectedSize streamContents: + [:stream | self decode: aStringOrStream to: stream]) readStream! Item was added: + ----- Method: Ascii85Converter class>>encode: (in category 'convenience') ----- + encode: aCollectionOrStream + + ^ String streamContents: + [:out | self encode: aCollectionOrStream to: out]! Item was added: + ----- Method: Ascii85Converter class>>encode:to: (in category 'convenience') ----- + encode: aCollectionOrStream to: outStream + + ^ (self stringStream: outStream dataStream: aCollectionOrStream readStream) + encode! Item was added: + ----- Method: Ascii85Converter class>>stringStream:dataStream: (in category 'instance creation') ----- + stringStream: aStream dataStream: anotherStream + + ^ self new + stringStream: aStream; + dataStream: anotherStream; + yourself! Item was added: + ----- Method: Ascii85Converter>>ascii (in category 'accessing') ----- + ascii + + binary := false.! Item was added: + ----- Method: Ascii85Converter>>binary (in category 'accessing') ----- + binary + + binary := true.! Item was added: + ----- Method: Ascii85Converter>>dataStream (in category 'accessing') ----- + dataStream + + ^dataStream! Item was added: + ----- Method: Ascii85Converter>>dataStream: (in category 'accessing') ----- + dataStream: anObject + + dataStream := anObject.! Item was added: + ----- Method: Ascii85Converter>>decode (in category 'conversion') ----- + decode + + self readBOD ifFalse: [^ self dataStream]. + + [self stringStream atEnd] whileFalse: [ + self stringStream skipSeparators. + self readEOD ifTrue: [^ self endDecode]. "<--- End of data" + + self decodeChar: self stringStream next ifFail: [^ self dataStream]]. + "actually, should not reach, but our failure condition is returning the stream, anyway" + ^ self dataStream! Item was added: + ----- Method: Ascii85Converter>>decodeChar:ifFail: (in category 'conversion') ----- + decodeChar: char ifFail: failBlock + + char = $z ifTrue: [^ self decodeZIfFail: failBlock]. + + (char between: $!! and: $u) ifFalse: [^ failBlock value]. + + self incrementTupleSize. + self incrementNumber85: char asInteger - 33 * (self pow85 at: self tupleSize). + self tupleSize = 5 ifTrue: + [self isBinary + ifTrue: [self writeBytes255: self number85 atMax: 4] + ifFalse: [self writeChars255: self number85 atMax: 4]. + self resetDecoderState]! Item was added: + ----- Method: Ascii85Converter>>decodeToByteArray (in category 'conversion') ----- + decodeToByteArray + + self binary. + ^ self decode! Item was added: + ----- Method: Ascii85Converter>>decodeZIfFail: (in category 'conversion') ----- + decodeZIfFail: failBlock + + self tupleSize ~= 0 ifTrue: [^ failBlock value]. + self dataStream next: 4 put: (self isBinary ifTrue: [0] ifFalse: [Character null]). + ! Item was added: + ----- Method: Ascii85Converter>>encode (in category 'conversion') ----- + encode + + | lineLength | + + lineLength := 0. + self stringStream nextPutAll: '<~'. + [self dataStream atEnd] whileFalse: [ + | raw data out | + lineLength >= 74 ifTrue: [self stringStream cr. lineLength := 0]. + out := 5. + raw := (self dataStream next: 4) asByteArray. + raw size < 4 ifTrue: + [out := raw size + 1. + raw := raw, (self padOfSize: 4 - raw size)]. + data := raw unsignedLongAt: 1 bigEndian: true. + data = 0 + ifTrue: [self stringStream nextPut: $z. lineLength := lineLength + 1] + ifFalse: [self write85: data atMax: out. lineLength := lineLength + out]]. + self stringStream nextPutAll: '~>'. + ^ self stringStream + ! Item was added: + ----- Method: Ascii85Converter>>endDecode (in category 'private') ----- + endDecode + + self tupleSize > 0 ifTrue: + [self incrementNumber85: (self pow85 at: self tupleSize). + self isBinary + ifTrue: [self writeBytes255: self number85 atMax: self tupleSize - 1] + ifFalse: [self writeChars255: self number85 atMax: self tupleSize - 1]]. + ^ self dataStream! Item was added: + ----- Method: Ascii85Converter>>incrementNumber85: (in category 'private') ----- + incrementNumber85: aNumber + + number85 := number85 + aNumber. + + ! Item was added: + ----- Method: Ascii85Converter>>incrementTupleSize (in category 'private') ----- + incrementTupleSize + + tupleSize := tupleSize + 1. + ! Item was added: + ----- Method: Ascii85Converter>>initialize (in category 'initialize-release') ----- + initialize + + super initialize. + self ascii. + self resetDecoderState.! Item was added: + ----- Method: Ascii85Converter>>isBinary (in category 'testing') ----- + isBinary + + ^ binary! Item was added: + ----- Method: Ascii85Converter>>number85 (in category 'accessing') ----- + number85 + + ^ number85! Item was added: + ----- Method: Ascii85Converter>>padOfSize: (in category 'private') ----- + padOfSize: aNumber + + aNumber = 1 ifTrue: [^ #(0)]. + aNumber = 2 ifTrue: [^ #(0 0)]. + aNumber = 3 ifTrue: [^ #(0 0 0)]. + self error: 'Should not reach'.! Item was added: + ----- Method: Ascii85Converter>>pow85 (in category 'private') ----- + pow85 + + ^ #(52200625 614125 7225 85 1) "{85*85*85*85 . 85*85*85 . 85*85 . 85. 1}"! Item was added: + ----- Method: Ascii85Converter>>readBOD (in category 'private') ----- + readBOD + + self stringStream skipSeparators. + self stringStream peek = $< ifFalse: [^ false] ifTrue: + [self stringStream next. "ignore" + self stringStream peek = $~ ifFalse: [^ false] ifTrue: + [self stringStream next "ignore"]]. + ^ true! Item was added: + ----- Method: Ascii85Converter>>readEOD (in category 'private') ----- + readEOD + + self stringStream skipSeparators. + self stringStream peek = $~ ifFalse: [^ false] ifTrue: + [self stringStream next. "ignore" + self stringStream peek = $> ifFalse: [^ false] ifTrue: + [self stringStream next "ignore"]]. + ^ true! Item was added: + ----- Method: Ascii85Converter>>resetDecoderState (in category 'private') ----- + resetDecoderState + + number85 := 0. + tupleSize := 0. + ! Item was added: + ----- Method: Ascii85Converter>>stringStream (in category 'accessing') ----- + stringStream + + ^ stringStream! Item was added: + ----- Method: Ascii85Converter>>stringStream: (in category 'accessing') ----- + stringStream: anObject + + stringStream := anObject.! Item was added: + ----- Method: Ascii85Converter>>tupleSize (in category 'accessing') ----- + tupleSize + + ^ tupleSize! Item was added: + ----- Method: Ascii85Converter>>write85:atMax: (in category 'writing') ----- + write85: anInteger atMax: aNumber + + | c1 c2 c3 c4 c5 remain | + remain := anInteger. + c5 := (remain \\ 85 + 33) asCharacter. remain := remain // 85. + c4 := (remain \\ 85 + 33) asCharacter. remain := remain // 85. + c3 := (remain \\ 85 + 33) asCharacter. remain := remain // 85. + c2 := (remain \\ 85 + 33) asCharacter. remain := remain // 85. + c1 := (remain \\ 85 + 33) asCharacter. remain := remain // 85. + aNumber > 0 ifTrue: [self stringStream nextPut: c1. + aNumber > 1 ifTrue: [self stringStream nextPut: c2. + aNumber > 2 ifTrue: [self stringStream nextPut: c3. + aNumber > 3 ifTrue: [self stringStream nextPut: c4. + aNumber > 4 ifTrue: [self stringStream nextPut: c5]]]]]. + ! Item was added: + ----- Method: Ascii85Converter>>writeBytes255:atMax: (in category 'writing') ----- + writeBytes255: anInteger atMax: aNumber + + (aNumber between: 1 and: 4) ifFalse: [^ self error: 'Unexpected byte count']. + 4 to: (5 - aNumber) by: -1 do: + [:index | self dataStream nextPut: (anInteger digitAt: index)]. + ! Item was added: + ----- Method: Ascii85Converter>>writeChars255:atMax: (in category 'writing') ----- + writeChars255: anInteger atMax: aNumber + + (aNumber between: 1 and: 4) ifFalse: [^ self error: 'Unexpected byte count']. + 4 to: (5 - aNumber) by: -1 do: + [:index | self dataStream nextPut: (anInteger digitAt: index) asCharacter]. + ! Item was added: + ----- Method: ByteArray>>ascii85Encoded (in category 'converting') ----- + ascii85Encoded + "Encode the receiver as Ascii85" + "'Hello World' asByteArray ascii85Encoded" + + ^ (Ascii85Converter encode: self readStream) contents! Item was added: + ----- Method: String>>ascii85Decoded (in category 'converting') ----- + ascii85Decoded + "Decode the receiver from Ascii85" + "'<~87cURD]i,""Ebo7~>' ascii85Decoded" + + ^ self ascii85DecodedAs: self class + ! Item was added: + ----- Method: String>>ascii85DecodedAs: (in category 'converting') ----- + ascii85DecodedAs: aClass + "Decode the receiver from Ascii85" + "'<~87cURD]i,""Ebo7~>' ascii85DecodedAs: String" + + ^ Ascii85Converter decode: self as: aClass! Item was added: + ----- Method: String>>ascii85Encoded (in category 'converting') ----- + ascii85Encoded + "Encode the receiver as Ascii85" + "'Hello World' ascii85Encoded" + + ^ (Ascii85Converter encode: self readStream) contents + ! From commits at source.squeak.org Sun Jul 10 19:16:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 10 19:16:04 2016 Subject: [squeak-dev] The Trunk: CollectionsTests-topa.266.mcz Message-ID: Tobias Pape uploaded a new version of CollectionsTests to project The Trunk: http://source.squeak.org/trunk/CollectionsTests-topa.266.mcz ==================== Summary ==================== Name: CollectionsTests-topa.266 Author: topa Time: 10 July 2016, 9:15:50.348455 pm UUID: 802d5712-f7aa-488e-9af5-dccaf7a3f7c8 Ancestors: CollectionsTests-topa.265 Fix class comment =============== Diff against CollectionsTests-topa.265 =============== Item was changed: TestCase subclass: #Ascii85ConverterTest instanceVariableNames: 'decoded encoded' classVariableNames: '' poolDictionaries: '' category: 'CollectionsTests-Streams'! + !Ascii85ConverterTest commentStamp: 'topa 7/10/2016 21:04' prior: 0! + This is the unit test for the class Ascii85Converter.! - !Ascii85ConverterTest commentStamp: '' prior: 0! - This is the unit test for the class Base64MimeConverter. Unit tests are a good way to exercise the functionality of your system in a repeatable and automatic manner. They are therefore recommended if you plan to release anything. For more information, see: - - http://www.c2.com/cgi/wiki?UnitTest - - http://minnow.cc.gatech.edu/squeak/1547 - - the sunit class category! From nicolas.cellier.aka.nice at gmail.com Sun Jul 10 19:51:21 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Sun Jul 10 19:51:26 2016 Subject: [squeak-dev] spyOnWorldFor: In-Reply-To: References: <4B6F0D07-F678-4A61-BF7C-62F4C5315475@gmail.com> Message-ID: I've committed a non urgent change just to check: There's now a single failure instead of 3 with a raw log: No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself. https://travis-ci.org/OpenSmalltalk/opensmalltalk-vm/jobs/143745141 So IMO, it's green. 2016-07-10 17:07 GMT+02:00 Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com>: > Hi Eliot, > The last build #158 at > https://travis-ci.org/OpenSmalltalk/opensmalltalk-vm/builds is red. > But I suspect false positive. > > The details are at > https://travis-ci.org/OpenSmalltalk/opensmalltalk-vm/builds/143459279 > where only 3 build failed on macosx64 for newspeak and pharo, but > succeeded on linux64 and squeak... > Either the build should also fail for squeak if it's OS dependent. > Or it should also fail for linux64 if it Smalltalk target dependent. > But this combination is weird. > > Clicking on any of the failure won't give any information (empty raw log, > ellapsed time not indicated...) while it works for succeeded builds... > > 2016-07-10 16:45 GMT+02:00 Eliot Miranda : > >> Hi Yoshiki, >> >> try an up-to-date VM. I'd point you to Travis could but I don't see >> entirely green builds there right now. So pick up the most up-to-date VM >> from my site. >> >> _,,,^..^,,,_ (phone) >> >> > On Jul 8, 2016, at 3:58 PM, Yoshiki Ohshima >> wrote: >> > >> > I am trying a few things on Squeak 5.0. In earlier versions there was >> > AndreasSystemProfier (formerly known as QSystemProfier) and had a >> > method called spyOnWorldFor:, which was quite useful. I just loaded >> > AndreasProfier-eem.11.mcz and tried it but it crashed the 5.0 all in >> > one VM on Mac OS 10.10. >> > >> > Is this a known issue? Is there an alternative to it? >> > >> > -- >> > -- Yoshiki >> > >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160710/425b6992/attachment.htm From Das.Linux at gmx.de Sun Jul 10 19:53:56 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Sun Jul 10 19:54:02 2016 Subject: [squeak-dev] spyOnWorldFor: In-Reply-To: References: <4B6F0D07-F678-4A61-BF7C-62F4C5315475@gmail.com> Message-ID: <33046BEF-3EA2-4269-89BF-5883D85B0B8A@gmx.de> Him On 10.07.2016, at 21:51, Nicolas Cellier wrote: > I've committed a non urgent change just to check: > There's now a single failure instead of 3 with a raw log: > No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself. > https://travis-ci.org/OpenSmalltalk/opensmalltalk-vm/jobs/143745141 > > So IMO, it's green. I've restarted that job, let's seem, maybe it was just a spurious thing. Best regards -tobias > > 2016-07-10 17:07 GMT+02:00 Nicolas Cellier : > Hi Eliot, > The last build #158 at https://travis-ci.org/OpenSmalltalk/opensmalltalk-vm/builds is red. > But I suspect false positive. > > The details are at https://travis-ci.org/OpenSmalltalk/opensmalltalk-vm/builds/143459279 > where only 3 build failed on macosx64 for newspeak and pharo, but succeeded on linux64 and squeak... > Either the build should also fail for squeak if it's OS dependent. > Or it should also fail for linux64 if it Smalltalk target dependent. > But this combination is weird. > > Clicking on any of the failure won't give any information (empty raw log, ellapsed time not indicated...) while it works for succeeded builds... > > 2016-07-10 16:45 GMT+02:00 Eliot Miranda : > Hi Yoshiki, > > try an up-to-date VM. I'd point you to Travis could but I don't see entirely green builds there right now. So pick up the most up-to-date VM from my site. > > _,,,^..^,,,_ (phone) > > > On Jul 8, 2016, at 3:58 PM, Yoshiki Ohshima wrote: > > > > I am trying a few things on Squeak 5.0. In earlier versions there was > > AndreasSystemProfier (formerly known as QSystemProfier) and had a > > method called spyOnWorldFor:, which was quite useful. I just loaded > > AndreasProfier-eem.11.mcz and tried it but it crashed the 5.0 all in > > one VM on Mac OS 10.10. > > > > Is this a known issue? Is there an alternative to it? > > From Das.Linux at gmx.de Sun Jul 10 20:36:58 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Sun Jul 10 20:37:01 2016 Subject: [squeak-dev] spyOnWorldFor: In-Reply-To: <33046BEF-3EA2-4269-89BF-5883D85B0B8A@gmx.de> References: <4B6F0D07-F678-4A61-BF7C-62F4C5315475@gmail.com> <33046BEF-3EA2-4269-89BF-5883D85B0B8A@gmx.de> Message-ID: On 10.07.2016, at 21:53, Tobias Pape wrote: > Him > > On 10.07.2016, at 21:51, Nicolas Cellier wrote: > >> I've committed a non urgent change just to check: >> There's now a single failure instead of 3 with a raw log: >> No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself. >> https://travis-ci.org/OpenSmalltalk/opensmalltalk-vm/jobs/143745141 >> >> So IMO, it's green. > > I've restarted that job, let's seem, maybe it was just a spurious thing. Yes, all green now :) Best regards -Tobias > > Best regards > -tobias > >> >> 2016-07-10 17:07 GMT+02:00 Nicolas Cellier : >> Hi Eliot, >> The last build #158 at https://travis-ci.org/OpenSmalltalk/opensmalltalk-vm/builds is red. >> But I suspect false positive. >> >> The details are at https://travis-ci.org/OpenSmalltalk/opensmalltalk-vm/builds/143459279 >> where only 3 build failed on macosx64 for newspeak and pharo, but succeeded on linux64 and squeak... >> Either the build should also fail for squeak if it's OS dependent. >> Or it should also fail for linux64 if it Smalltalk target dependent. >> But this combination is weird. >> >> Clicking on any of the failure won't give any information (empty raw log, ellapsed time not indicated...) while it works for succeeded builds... >> >> 2016-07-10 16:45 GMT+02:00 Eliot Miranda : >> Hi Yoshiki, >> >> try an up-to-date VM. I'd point you to Travis could but I don't see entirely green builds there right now. So pick up the most up-to-date VM from my site. >> >> _,,,^..^,,,_ (phone) >> >>> On Jul 8, 2016, at 3:58 PM, Yoshiki Ohshima wrote: >>> >>> I am trying a few things on Squeak 5.0. In earlier versions there was >>> AndreasSystemProfier (formerly known as QSystemProfier) and had a >>> method called spyOnWorldFor:, which was quite useful. I just loaded >>> AndreasProfier-eem.11.mcz and tried it but it crashed the 5.0 all in >>> one VM on Mac OS 10.10. >>> >>> Is this a known issue? Is there an alternative to it? From commits at source.squeak.org Sun Jul 10 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 10 21:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160710215502.15114.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068264.html Name: CollectionsTests-topa.265 Ancestors: CollectionsTests-ul.264 Add a test for Ascii85 conversion ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068265.html Name: Collections-topa.701 Ancestors: Collections-eem.700 Add an Ascii85 converter akin to Base64MimeConverter ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068266.html Name: CollectionsTests-topa.266 Ancestors: CollectionsTests-topa.265 Fix class comment ============================================= From lewis at mail.msen.com Mon Jul 11 02:33:11 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Jul 11 02:33:14 2016 Subject: [squeak-dev] [ANN] The Squeak Shell In-Reply-To: <1467987446046-4905613.post@n4.nabble.com> References: <1467987446046-4905613.post@n4.nabble.com> Message-ID: <20160711023311.GA90293@shell.msen.com> This is a really nice demonstration of how Projects work in Squeak. It is completely different from either Morphic or MVC, and the removal of the traditional GUI makes it clear that Projects are not directly tied to any one mode of user interaction. The shell itself has an interesting conceptual model. We usually think of a "shell" or "console window" that navigates around file systems, such that where you are in the shell is based on a current working directory in a file system. But in SqueakShell we are navigating in the object space. And of course the text-mode Squeaky the Mouse logo makes for a compelling user experience :-) I would encourage everyone to try loading this and playing around with SqueakShell. Dave On Fri, Jul 08, 2016 at 07:17:26AM -0700, marcel.taeumel wrote: > Hi, there! > > I am happy to announce a new kind of project for Squeak: "The Squeak Shell". > :-) > > You can install it into any trunk image via: > > Installer swa > project: 'SqueakShell'; > install: 'SqueakShell'. > > Then you will find a new kind of project under Projects -> New Project ... > > The Squeak Shell is independent from Morphic and MVC. It's architecture is, > partially, a mixture of both. :-D I wanted to keep it as simple as possible > while avoiding global state as much as possible. > > My goal is to add it to trunk to simplify modularization of MVC and Morphic. > For example, we have to extract UserInputEvent and Canvas from Morphic into > the base system. These would form a splendid addition to other projects > because object-oriented event processing and displaying is not something > that only Morphic should have. > > The Squeak Shell helped me refactor Squeak's project mechanism. It also > revealed potential improvements for our Debugger, which I am going to > address later this year. One goal is to make Squeak more robust and mitigate > the risk of getting locked out of the system. > > Here is the interesting part: It can be used to recover from > serious/recursive errors in Morphic and MVC. When you open a new Morphic > project from within a Squeak Shell project, the shell will appear then. Only > recursive errors in the shell will then start our traditional emergency > evaluator. > > Some figures: 12 classes, 274 methods, 1454 LOC. > > You can open the Squeak Shell on top of the Morphic loop ("SqueakShell > open") or as custom process inside the Morphic project ("SqueakShell > openConcurrent"). You enter a SqueakShell project via: "SqueakShell > openAsProject". > > The core of the Squeak Shell covers only 6 classes (see "SqueakShell-Core"). > There are already two applications in this project: (1) a command line and > (2) a text editor (see "SqueakShell-Tools"). > > You can use the Squeak Shell to explore all our tool extension points, which > we use for browsing classes, inspecting objects, debugging unhandled errors > in processes, etc. For this, take a look at SqshProject, SqshToolSet, and > SqshUIManager. > > I am sure that there can be an even smaller kind of project. However, I am > not so sure about the usefulness of such a project. :-) > > > > Have fun! > Marcel > > > > -- > View this message in context: http://forum.world.st/ANN-The-Squeak-Shell-tp4905613.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Mon Jul 11 08:18:11 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Jul 11 08:18:12 2016 Subject: [squeak-dev] The Trunk: Kernel-topa.1033.mcz Message-ID: Tobias Pape uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-topa.1033.mcz ==================== Summary ==================== Name: Kernel-topa.1033 Author: topa Time: 11 July 2016, 10:17:45.427905 am UUID: 5d65d061-4973-4968-a0a2-533b9dc334ef Ancestors: Kernel-eem.1032 Collect perform with 5 args. =============== Diff against Kernel-eem.1032 =============== Item was added: + ----- Method: Object>>perform:with:with:with:with:with: (in category 'message handling') ----- + perform: aSymbol with: firstObject with: secondObject with: thirdObject with: fourthObject with: fifthObject + "Send the selector, aSymbol, to the receiver with the given arguments. + Fail if the number of arguments expected by the selector is not five. + Primitive. Optional. See Object documentation whatIsAPrimitive." + + + ^ self perform: aSymbol + withArguments: (Array with: firstObject with: secondObject with: thirdObject with: fourthObject with: fifthObject)! From Marcel.Taeumel at hpi.de Mon Jul 11 07:40:17 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon Jul 11 08:22:37 2016 Subject: [squeak-dev] Re: [ANN] The Squeak Shell In-Reply-To: <20160711023311.GA90293@shell.msen.com> References: <1467987446046-4905613.post@n4.nabble.com> <20160711023311.GA90293@shell.msen.com> Message-ID: <1468222817165-4905883.post@n4.nabble.com> See SqshCommandLine >> #editText to understand extension points (shortcuts) inthe command line and how to run custom applications (i.e. subclasses of SqshController). Best, Marcel David T. Lewis wrote > This is a really nice demonstration of how Projects work in Squeak. It > is completely different from either Morphic or MVC, and the removal of > the traditional GUI makes it clear that Projects are not directly tied > to any one mode of user interaction. > > The shell itself has an interesting conceptual model. We usually think > of a "shell" or "console window" that navigates around file systems, > such that where you are in the shell is based on a current working > directory in a file system. But in SqueakShell we are navigating in > the object space. > > And of course the text-mode Squeaky the Mouse logo makes for a compelling > user experience :-) > > I would encourage everyone to try loading this and playing around with > SqueakShell. > > Dave > > > On Fri, Jul 08, 2016 at 07:17:26AM -0700, marcel.taeumel wrote: >> Hi, there! >> >> I am happy to announce a new kind of project for Squeak: "The Squeak >> Shell". >> :-) >> >> You can install it into any trunk image via: >> >> Installer swa >> project: 'SqueakShell'; >> install: 'SqueakShell'. >> >> Then you will find a new kind of project under Projects -> New Project >> ... >> >> The Squeak Shell is independent from Morphic and MVC. It's architecture >> is, >> partially, a mixture of both. :-D I wanted to keep it as simple as >> possible >> while avoiding global state as much as possible. >> >> My goal is to add it to trunk to simplify modularization of MVC and >> Morphic. >> For example, we have to extract UserInputEvent and Canvas from Morphic >> into >> the base system. These would form a splendid addition to other projects >> because object-oriented event processing and displaying is not something >> that only Morphic should have. >> >> The Squeak Shell helped me refactor Squeak's project mechanism. It also >> revealed potential improvements for our Debugger, which I am going to >> address later this year. One goal is to make Squeak more robust and >> mitigate >> the risk of getting locked out of the system. >> >> Here is the interesting part: It can be used to recover from >> serious/recursive errors in Morphic and MVC. When you open a new Morphic >> project from within a Squeak Shell project, the shell will appear then. >> Only >> recursive errors in the shell will then start our traditional emergency >> evaluator. >> >> Some figures: 12 classes, 274 methods, 1454 LOC. >> >> You can open the Squeak Shell on top of the Morphic loop ("SqueakShell >> open") or as custom process inside the Morphic project ("SqueakShell >> openConcurrent"). You enter a SqueakShell project via: "SqueakShell >> openAsProject". >> >> The core of the Squeak Shell covers only 6 classes (see >> "SqueakShell-Core"). >> There are already two applications in this project: (1) a command line >> and >> (2) a text editor (see "SqueakShell-Tools"). >> >> You can use the Squeak Shell to explore all our tool extension points, >> which >> we use for browsing classes, inspecting objects, debugging unhandled >> errors >> in processes, etc. For this, take a look at SqshProject, SqshToolSet, and >> SqshUIManager. >> >> I am sure that there can be an even smaller kind of project. However, I >> am >> not so sure about the usefulness of such a project. :-) >> >> <http://forum.world.st/file/n4905613/shell.png> >> >> Have fun! >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/ANN-The-Squeak-Shell-tp4905613.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. -- View this message in context: http://forum.world.st/ANN-The-Squeak-Shell-tp4905613p4905883.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From bert at freudenbergs.de Mon Jul 11 10:35:53 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Mon Jul 11 10:35:56 2016 Subject: [squeak-dev] The Trunk: Compiler-eem.323.mcz In-Reply-To: References: Message-ID: On Sat, Jul 9, 2016 at 12:29 AM, Eliot Miranda wrote: > > On Fri, Jul 8, 2016 at 2:00 AM, Bert Freudenberg > wrote: > >> + 139 10001011 kkkkkkkk jjjjjjjj Invoke primitive number >>> jjjjjjjjkkkkkkkk >>> - >>> 140 10001100 kkkkkkkk jjjjjjjj Push Temp At kkkkkkkk In >>> Temp Vector At: jjjjjjjj >>> 141 10001101 kkkkkkkk jjjjjjjj Store Temp At kkkkkkkk >>> In Temp Vector At: jjjjjjjj >>> 142 10001110 kkkkkkkk jjjjjjjj Pop and Store Temp At >>> kkkkkkkk In Temp Vector At: jjjjjjjj >>> 143 10001111 llllkkkk jjjjjjjj iiiiiiii Push Closure Num >>> Copied llll Num Args kkkk BlockSize jjjjjjjjiiiiiiii >>> >> >> Why is the primitive index in bytecode 139 stored little-endian? The >> other bytecodes with immediate args > 8 bits are in big endian (e.g. push >> closure copy) >> > > No reason beyond my habit and preference. > Can we still fix it? It seems really weird to me to have two different conventions in one bytecode set. - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160711/7794aa11/attachment.htm From bert at freudenbergs.de Mon Jul 11 10:37:23 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Mon Jul 11 10:37:28 2016 Subject: [squeak-dev] Re: rice paper background in trunk? In-Reply-To: References: <1467890321499-4905327.post@n4.nabble.com> Message-ID: On Sat, Jul 9, 2016 at 12:46 AM, Eliot Miranda wrote: > > I *hate* the grey. > +1 - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160711/0def7d16/attachment.htm From gettimothy at zoho.com Mon Jul 11 10:54:16 2016 From: gettimothy at zoho.com (gettimothy) Date: Mon Jul 11 10:54:25 2016 Subject: [squeak-dev] Re: [ANN] The Squeak Shell In-Reply-To: <1468222817165-4905883.post@n4.nabble.com> References: <1467987446046-4905613.post@n4.nabble.com> <20160711023311.GA90293@shell.msen.com> <1468222817165-4905883.post@n4.nabble.com> Message-ID: <155d997de09.e9c47069129798.3116341732414011013@zoho.com> Does this lay the groundwork towards a Linux Terminal "(SQ)REPL" interface to a headless VM? Should this be the place to start such a project? thx. tty ---- On Mon, 11 Jul 2016 03:40:17 -0400 marcel.taeumel<Marcel.Taeumel@hpi.de> wrote ---- <http://forum.world.st/file/n4905883/squeak-shell-2.gif> See SqshCommandLine >> #editText to understand extension points (shortcuts) inthe command line and how to run custom applications (i.e. subclasses of SqshController). Best, Marcel David T. Lewis wrote > This is a really nice demonstration of how Projects work in Squeak. It > is completely different from either Morphic or MVC, and the removal of > the traditional GUI makes it clear that Projects are not directly tied > to any one mode of user interaction. > > The shell itself has an interesting conceptual model. We usually think > of a "shell" or "console window" that navigates around file systems, > such that where you are in the shell is based on a current working > directory in a file system. But in SqueakShell we are navigating in > the object space. > > And of course the text-mode Squeaky the Mouse logo makes for a compelling > user experience :-) > > I would encourage everyone to try loading this and playing around with > SqueakShell. > > Dave > > > On Fri, Jul 08, 2016 at 07:17:26AM -0700, marcel.taeumel wrote: >> Hi, there! >> >> I am happy to announce a new kind of project for Squeak: "The Squeak >> Shell". >> :-) >> >> You can install it into any trunk image via: >> >> Installer swa >> project: 'SqueakShell'; >> install: 'SqueakShell'. >> >> Then you will find a new kind of project under Projects -> New Project >> ... >> >> The Squeak Shell is independent from Morphic and MVC. It's architecture >> is, >> partially, a mixture of both. :-D I wanted to keep it as simple as >> possible >> while avoiding global state as much as possible. >> >> My goal is to add it to trunk to simplify modularization of MVC and >> Morphic. >> For example, we have to extract UserInputEvent and Canvas from Morphic >> into >> the base system. These would form a splendid addition to other projects >> because object-oriented event processing and displaying is not something >> that only Morphic should have. >> >> The Squeak Shell helped me refactor Squeak's project mechanism. It also >> revealed potential improvements for our Debugger, which I am going to >> address later this year. One goal is to make Squeak more robust and >> mitigate >> the risk of getting locked out of the system. >> >> Here is the interesting part: It can be used to recover from >> serious/recursive errors in Morphic and MVC. When you open a new Morphic >> project from within a Squeak Shell project, the shell will appear then. >> Only >> recursive errors in the shell will then start our traditional emergency >> evaluator. >> >> Some figures: 12 classes, 274 methods, 1454 LOC. >> >> You can open the Squeak Shell on top of the Morphic loop ("SqueakShell >> open") or as custom process inside the Morphic project ("SqueakShell >> openConcurrent"). You enter a SqueakShell project via: "SqueakShell >> openAsProject". >> >> The core of the Squeak Shell covers only 6 classes (see >> "SqueakShell-Core"). >> There are already two applications in this project: (1) a command line >> and >> (2) a text editor (see "SqueakShell-Tools"). >> >> You can use the Squeak Shell to explore all our tool extension points, >> which >> we use for browsing classes, inspecting objects, debugging unhandled >> errors >> in processes, etc. For this, take a look at SqshProject, SqshToolSet, and >> SqshUIManager. >> >> I am sure that there can be an even smaller kind of project. However, I >> am >> not so sure about the usefulness of such a project. :-) >> >> &lt;http://forum.world.st/file/n4905613/shell.png&gt; >> >> Have fun! >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/ANN-The-Squeak-Shell-tp4905613.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. -- View this message in context: http://forum.world.st/ANN-The-Squeak-Shell-tp4905613p4905883.html Sent from the Squeak - Dev mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160711/e169599c/attachment.htm From Marcel.Taeumel at hpi.de Mon Jul 11 10:38:42 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon Jul 11 11:21:05 2016 Subject: [squeak-dev] Re: rice paper background in trunk? In-Reply-To: References: <1467890321499-4905327.post@n4.nabble.com> Message-ID: <1468233522363-4905942.post@n4.nabble.com> Bert Freudenberg wrote > On Sat, Jul 9, 2016 at 12:46 AM, Eliot Miranda < > eliot.miranda@ > > > wrote: >> >> I *hate* the grey. >> > > +1 > > - Bert - Hi there. It seems that setting up custom backgrounds seems to be too difficult. There is, obviously, no way to capture the taste of any possible user with a default background. So, we might want to provide some alternatives. Hmmm... For a single project, you can just drag-drop any picture into Squeak, then right-click and choose "Set as background". This way seems to be useful because many of our students configured their desktops quite nicely. You can also choose any color as you project background. Is this difficult to discover? Anyway, there is no reason why we couldn't provide a set of three (?) alternative patterns for the default background. Maybe as simple as switching between uniform window colors and colorful windows. Best, Marcel -- View this message in context: http://forum.world.st/rice-paper-background-in-trunk-tp4905261p4905942.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Mon Jul 11 10:44:28 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon Jul 11 11:26:50 2016 Subject: [squeak-dev] Re: [ANN] The Squeak Shell In-Reply-To: <155d997de09.e9c47069129798.3116341732414011013@zoho.com> References: <1467987446046-4905613.post@n4.nabble.com> <20160711023311.GA90293@shell.msen.com> <1468222817165-4905883.post@n4.nabble.com> <155d997de09.e9c47069129798.3116341732414011013@zoho.com> Message-ID: <1468233868100-4905945.post@n4.nabble.com> gettimothy wrote > Does this lay the groundwork towards a Linux Terminal "(SQ)REPL" interface > to a headless VM? > > Should this be the place to start such a project? > > thx. > > tty Hi Timothy, if you would replace event access (SqshControlManager) and screen output (FormCanvas), sure. For a non-pixel output, you might want to also move the (text) cursor. I did try to use stdin and stdout, but it is blocking for an empty input. At least on my Windows machnine. Maybe telnet could work. Once, we did a student's project called "SqueakREPL". They used telnet, I guess, and also managed to provie an interactive debugger. Not sure, however, how close to the base system they remained and whether there are many dependencies on Morphic. For other headless apps, which do not necessarily require the flexibility of a command line, an even smaller kind of project would be sufficient. See SqshProject. Best, Marcel -- View this message in context: http://forum.world.st/ANN-The-Squeak-Shell-tp4905613p4905945.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From gettimothy at zoho.com Mon Jul 11 12:16:10 2016 From: gettimothy at zoho.com (gettimothy) Date: Mon Jul 11 12:16:17 2016 Subject: [squeak-dev] Re: [ANN] The Squeak Shell In-Reply-To: <1468233868100-4905945.post@n4.nabble.com> References: <1467987446046-4905613.post@n4.nabble.com> <20160711023311.GA90293@shell.msen.com> <1468222817165-4905883.post@n4.nabble.com> <155d997de09.e9c47069129798.3116341732414011013@zoho.com> <1468233868100-4905945.post@n4.nabble.com> Message-ID: <155d9e2da96.11e6cfcaa130685.8939352900646768798@zoho.com> Thank you. ---- On Mon, 11 Jul 2016 06:44:28 -0400 marcel.taeumel <Marcel.Taeumel@hpi.de> wrote ---- gettimothy wrote > Does this lay the groundwork towards a Linux Terminal "(SQ)REPL" interface > to a headless VM? > > Should this be the place to start such a project? > > thx. > > tty Hi Timothy, if you would replace event access (SqshControlManager) and screen output (FormCanvas), sure. For a non-pixel output, you might want to also move the (text) cursor. I did try to use stdin and stdout, but it is blocking for an empty input. At least on my Windows machnine. Maybe telnet could work. Once, we did a student's project called "SqueakREPL". They used telnet, I guess, and also managed to provie an interactive debugger. Not sure, however, how close to the base system they remained and whether there are many dependencies on Morphic. For other headless apps, which do not necessarily require the flexibility of a command line, an even smaller kind of project would be sufficient. See SqshProject. Best, Marcel -- View this message in context: http://forum.world.st/ANN-The-Squeak-Shell-tp4905613p4905945.html Sent from the Squeak - Dev mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160711/43631123/attachment.htm From lewis at mail.msen.com Mon Jul 11 12:34:55 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Jul 11 12:34:58 2016 Subject: [squeak-dev] Re: rice paper background in trunk? In-Reply-To: <1468233522363-4905942.post@n4.nabble.com> References: <1467890321499-4905327.post@n4.nabble.com> <1468233522363-4905942.post@n4.nabble.com> Message-ID: <20160711123455.GA95801@shell.msen.com> On Mon, Jul 11, 2016 at 03:38:42AM -0700, marcel.taeumel wrote: > Bert Freudenberg wrote > > On Sat, Jul 9, 2016 at 12:46 AM, Eliot Miranda < > > > eliot.miranda@ > > > > > > wrote: > >> > >> I *hate* the grey. > >> > > > > +1 > > > > - Bert - > > Hi there. > > It seems that setting up custom backgrounds seems to be too difficult. There > is, obviously, no way to capture the taste of any possible user with a > default background. So, we might want to provide some alternatives. Hmmm... > > For a single project, you can just drag-drop any picture into Squeak, then > right-click and choose "Set as background". This way seems to be useful > because many of our students configured their desktops quite nicely. > > You can also choose any color as you project background. Is this difficult > to discover? > > Anyway, there is no reason why we couldn't provide a set of three (?) > alternative patterns for the default background. Maybe as simple as > switching between uniform window colors and colorful windows. > That sounds like a good idea. I would like to be able to change the background pattern, but I rarely bother doing so. If I had a few choices easily available in the image, that is something that I would be happy to use. Dave From Marcel.Taeumel at hpi.de Mon Jul 11 12:23:39 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon Jul 11 13:06:02 2016 Subject: [squeak-dev] Re: rice paper background in trunk? In-Reply-To: <20160711123455.GA95801@shell.msen.com> References: <1467890321499-4905327.post@n4.nabble.com> <1468233522363-4905942.post@n4.nabble.com> <20160711123455.GA95801@shell.msen.com> Message-ID: <1468239819557-4905984.post@n4.nabble.com> David T. Lewis wrote > On Mon, Jul 11, 2016 at 03:38:42AM -0700, marcel.taeumel wrote: >> Bert Freudenberg wrote >> > On Sat, Jul 9, 2016 at 12:46 AM, Eliot Miranda < >> >> > eliot.miranda@ >> >> > > >> > wrote: >> >> >> >> I *hate* the grey. >> >> >> > >> > +1 >> > >> > - Bert - >> >> Hi there. >> >> It seems that setting up custom backgrounds seems to be too difficult. >> There >> is, obviously, no way to capture the taste of any possible user with a >> default background. So, we might want to provide some alternatives. >> Hmmm... >> >> For a single project, you can just drag-drop any picture into Squeak, >> then >> right-click and choose "Set as background". This way seems to be useful >> because many of our students configured their desktops quite nicely. >> >> You can also choose any color as you project background. Is this >> difficult >> to discover? >> >> Anyway, there is no reason why we couldn't provide a set of three (?) >> alternative patterns for the default background. Maybe as simple as >> switching between uniform window colors and colorful windows. >> > > That sounds like a good idea. I would like to be able to change the > background pattern, but I rarely bother doing so. If I had a few choices > easily available in the image, that is something that I would be happy > to use. > > Dave Try this: | patterns index pattern | Installer ss project: 'JSON'; install: 'JSON'. patterns := Json readFrom: (WebClient httpGet: 'https://api.github.com/repos/subtlepatterns/SubtlePatterns/contents') content readStream. index := ListChooser chooseIndexFrom: (patterns select: [:ea | (ea at: #name) endsWith: '.png'] thenCollect: [:ea | '{1} ({2} bytes)' format: {ea at: #name. ea at: #size}]) title: 'Select pattern for background'. index > 0 ifTrue: [ | base64Content | base64Content := (Json readFrom: (WebClient httpGet: ((patterns at: index) at: #'git_url')) content readStream) at: #content. pattern := Form fromBinaryStream: (Base64MimeConverter mimeDecodeToBytes: base64Content readStream). ReleaseBuilder setProjectBackground: pattern]. Best, Marcel -- View this message in context: http://forum.world.st/rice-paper-background-in-trunk-tp4905261p4905984.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From tonyg at ccs.neu.edu Mon Jul 11 13:18:50 2016 From: tonyg at ccs.neu.edu (Tony Garnock-Jones) Date: Mon Jul 11 13:18:44 2016 Subject: [squeak-dev] Re: [ANN] The Squeak Shell In-Reply-To: <1468233868100-4905945.post@n4.nabble.com> References: <1467987446046-4905613.post@n4.nabble.com> <20160711023311.GA90293@shell.msen.com> <1468222817165-4905883.post@n4.nabble.com> <155d997de09.e9c47069129798.3116341732414011013@zoho.com> <1468233868100-4905945.post@n4.nabble.com> Message-ID: On 2016-07-11 6:44 AM, marcel.taeumel wrote: > I did try to use stdin and stdout, but it is blocking for an > empty input. This sounds like the problems I was having reading from /dev/... files. Perhaps the OSProcess-nonblocking-style solution I was using there could also work for this case: http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-June/190051.html Regards, Tony From Das.Linux at gmx.de Mon Jul 11 14:44:47 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon Jul 11 14:44:52 2016 Subject: [squeak-dev] [ANN] The Squeak Shell In-Reply-To: References: <1467987446046-4905613.post@n4.nabble.com> <20160711023311.GA90293@shell.msen.com> <1468222817165-4905883.post@n4.nabble.com> <155d997de09.e9c47069129798.3116341732414011013@zoho.com> <1468233868100-4905945.post@n4.nabble.com> Message-ID: <884AACEF-8EC8-49A4-AD21-C3614ED69167@gmx.de> On 11.07.2016, at 15:18, Tony Garnock-Jones wrote: > On 2016-07-11 6:44 AM, marcel.taeumel wrote: >> I did try to use stdin and stdout, but it is blocking for an >> empty input. > > This sounds like the problems I was having reading from /dev/... files. > > Perhaps the OSProcess-nonblocking-style solution I was using there could > also work for this case: > http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-June/190051.html > > Regards, > Tony Or it's just buffered? That was the problem the SqueakREPL students were having and why they switched to telnet: it's not (yet?) possible to set stdout and stdin to unbuffered, let alone 'raw' (as opposed to 'cooked'). Best regards -Tobias From eliot.miranda at gmail.com Mon Jul 11 15:56:11 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Jul 11 15:56:18 2016 Subject: [squeak-dev] Re: rice paper background in trunk? In-Reply-To: <1468233522363-4905942.post@n4.nabble.com> References: <1467890321499-4905327.post@n4.nabble.com> <1468233522363-4905942.post@n4.nabble.com> Message-ID: <8FB639CB-C027-4050-955E-773C62157905@gmail.com> Hi Marcel, > On Jul 11, 2016, at 3:38 AM, marcel.taeumel wrote: > > Bert Freudenberg wrote >> On Sat, Jul 9, 2016 at 12:46 AM, Eliot Miranda < > >> eliot.miranda@ > >> > >> wrote: >>> >>> I *hate* the grey. >> >> +1 >> >> - Bert - > > Hi there. > > It seems that setting up custom backgrounds seems to be too difficult. Mouse over help somewhere in the menu bar or screen background that pointed to drag and drop would be an improvement, but see below what I think is the key deficiency. > There > is, obviously, no way to capture the taste of any possible user with a > default background. So, we might want to provide some alternatives. Hmmm... > > For a single project, you can just drag-drop any picture into Squeak, then > right-click and choose "Set as background". This way seems to be useful > because many of our students configured their desktops quite nicely. The problem is that new projects do not inherit the background of the project in which they are created, being created in the system default. So if one drags and drops something one likes this effort must be repeated did every new project. This is a key bug. > You can also choose any color as you project background. Is this difficult > to discover? Again solid colours stink. The textured backgrounds have much more appeal. IIRC there is also some straightforward performance work on erasing the background for dragging whole Windows when a picture has been set as background. Setting a picture as background can scaled to fit. IIRC every redraw, and hence on drag, this scaling is redone, instead of caching the scaled background once per project. [this may be only in a prototype scale-to-fit I hacked up of it may be in trunk, can't remember, & using my phone). > Anyway, there is no reason why we couldn't provide a set of three (?) > alternative patterns for the default background. Maybe as simple as > switching between uniform window colors and colorful windows. Sure, but include the 4.5 background as an option too please. It's small, has a nice texture and is unobtrusive and not grey. Also, make new projects default their background to that of the current, please. And thanks for being understanding! > Best, > Marcel Eliot _,,,^..^,,,_ (phone) From tim at rowledge.org Mon Jul 11 16:46:09 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon Jul 11 16:45:39 2016 Subject: [squeak-dev] Re: [ANN] The Squeak Shell In-Reply-To: <1468222817165-4905883.post@n4.nabble.com> References: <1467987446046-4905613.post@n4.nabble.com> <20160711023311.GA90293@shell.msen.com> <1468222817165-4905883.post@n4.nabble.com> Message-ID: > On 11-07-2016, at 12:40 AM, marcel.taeumel wrote: > > Interesting. Now if only you can make it a bit more cryptic and unfriendly we might convince all those dead-text-file weenies that we have a ?real? language. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Has a pulse, but that's about all. From tim at rowledge.org Mon Jul 11 17:25:58 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon Jul 11 17:25:26 2016 Subject: Setting preferences & UI settings (was: Re: [squeak-dev] Re: rice paper background in trunk?) In-Reply-To: <8FB639CB-C027-4050-955E-773C62157905@gmail.com> References: <1467890321499-4905327.post@n4.nabble.com> <1468233522363-4905942.post@n4.nabble.com> <8FB639CB-C027-4050-955E-773C62157905@gmail.com> Message-ID: <6411A608-0105-438B-8683-2D5A765FFC8B@rowledge.org> We have areal mess in our assorted and various preference and look settings. Does anyone even know how many places there are where choices can be made? The PreferencesBrowser has a *lot* of preferences in it. Lots of stuff I have no idea how to make use of or why they are there - I mean really, do we have even the faintest use for ?thoroughSenders? any more? Let alone ?ThoroughSenders?, which is a separate preference in the browser that appears to link to the same message, sort of. It also has a bunch of colour settings, split up in strange places. But no screen background setting that I can see. Nor font choosing. We *do* have the ?appearances? item in the Screen menu, with a separate collection of oddness. And then other bits scattered in many other places within the poorly designed tree of menus depending from the screen menu. But not of course actual tree menus, oh no, submenus activated by ?more?? and so on. It?s really not very encouraging. My suggestion(s) - clean out the preferences reorganise the preference groupings more helpfully add decent look preference tools - backgrounds, fonts, sizes, etc clean out the weird screen menu tree convert menus to ?proper? hierarchical menus wherever a long menu could do with shortening or there are logical groups of items (for example the save/quit group) It?s quite a bit of work though. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Never test for an error condition you don't know how to handle. From Yoshiki.Ohshima at acm.org Mon Jul 11 21:33:29 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Mon Jul 11 21:33:32 2016 Subject: [squeak-dev] spyOnWorldFor: In-Reply-To: <4B6F0D07-F678-4A61-BF7C-62F4C5315475@gmail.com> References: <4B6F0D07-F678-4A61-BF7C-62F4C5315475@gmail.com> Message-ID: Thanks. Is there actually a reason to try AndreasSystemProfier, or does the MessageTally in Squeak 5.0 subsume it? On Sun, Jul 10, 2016 at 7:45 AM, Eliot Miranda wrote: > Hi Yoshiki, > > try an up-to-date VM. I'd point you to Travis could but I don't see entirely green builds there right now. So pick up the most up-to-date VM from my site. > > _,,,^..^,,,_ (phone) > >> On Jul 8, 2016, at 3:58 PM, Yoshiki Ohshima wrote: >> >> I am trying a few things on Squeak 5.0. In earlier versions there was >> AndreasSystemProfier (formerly known as QSystemProfier) and had a >> method called spyOnWorldFor:, which was quite useful. I just loaded >> AndreasProfier-eem.11.mcz and tried it but it crashed the 5.0 all in >> one VM on Mac OS 10.10. >> >> Is this a known issue? Is there an alternative to it? >> >> -- >> -- Yoshiki >> > -- -- Yoshiki From Yoshiki.Ohshima at acm.org Mon Jul 11 21:35:43 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Mon Jul 11 21:35:47 2016 Subject: [squeak-dev] Re: spyOnWorldFor: In-Reply-To: <1468140125615-4905771.post@n4.nabble.com> References: <1468140125615-4905771.post@n4.nabble.com> Message-ID: On Sun, Jul 10, 2016 at 1:42 AM, marcel.taeumel wrote: > Yoshiki Ohshima-3 wrote >> I am trying a few things on Squeak 5.0. In earlier versions there was >> AndreasSystemProfier (formerly known as QSystemProfier) and had a >> method called spyOnWorldFor:, which was quite useful. I just loaded >> AndreasProfier-eem.11.mcz and tried it but it crashed the 5.0 all in >> one VM on Mac OS 10.10. >> >> Is this a known issue? Is there an alternative to it? >> >> -- >> -- Yoshiki > > Hi Yoshiki, > > there is Extras > Start Profiler, which does > > MessageTally spyOn: [[Sensor peekPosition y > 0] whileTrue: [World > doOneCycle]]. > > I do not know the semantics of #spyOnWorldFor:, but you could specify other > duration limits in the whileTrue predicate. Thanks! I misremembered that spyOnWorldFor was doing profiling for "otherProcesses" (maybe it did at some point) but yes, I can have a do it like above and it does most of it. Only difference is that not using the cursor position let me interact with things in the world. -- -- Yoshiki From lists at fniephaus.com Mon Jul 11 21:47:13 2016 From: lists at fniephaus.com (Fabio Niephaus) Date: Mon Jul 11 21:47:28 2016 Subject: [squeak-dev] Re: spyOnWorldFor: In-Reply-To: References: <1468140125615-4905771.post@n4.nabble.com> Message-ID: Hi Yoshiki, I don't know how useful/stable this is, but one of our student teams is currently working on an improved MessageTally (see [1]). In their first demo they had a nice table view and a polar pie. Best, Fabio [1] https://github.com/HPI-SWA-Teaching/SWT16-Project-13 -- On Mon, Jul 11, 2016 at 11:35 PM Yoshiki Ohshima wrote: > On Sun, Jul 10, 2016 at 1:42 AM, marcel.taeumel > wrote: > > Yoshiki Ohshima-3 wrote > >> I am trying a few things on Squeak 5.0. In earlier versions there was > >> AndreasSystemProfier (formerly known as QSystemProfier) and had a > >> method called spyOnWorldFor:, which was quite useful. I just loaded > >> AndreasProfier-eem.11.mcz and tried it but it crashed the 5.0 all in > >> one VM on Mac OS 10.10. > >> > >> Is this a known issue? Is there an alternative to it? > >> > >> -- > >> -- Yoshiki > > > > Hi Yoshiki, > > > > there is Extras > Start Profiler, which does > > > > MessageTally spyOn: [[Sensor peekPosition y > 0] whileTrue: [World > > doOneCycle]]. > > > > I do not know the semantics of #spyOnWorldFor:, but you could specify > other > > duration limits in the whileTrue predicate. > > Thanks! > > I misremembered that spyOnWorldFor was doing profiling for > "otherProcesses" (maybe it did at some point) but yes, I can have a do > it like above and it does most of it. > > Only difference is that not using the cursor position let me interact > with things in the world. > > > -- > -- Yoshiki > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160711/2d33a314/attachment.htm From leves at caesar.elte.hu Mon Jul 11 21:53:34 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Mon Jul 11 21:53:37 2016 Subject: [squeak-dev] Re: spyOnWorldFor: In-Reply-To: References: <1468140125615-4905771.post@n4.nabble.com> Message-ID: On Mon, 11 Jul 2016, Yoshiki Ohshima wrote: > On Sun, Jul 10, 2016 at 1:42 AM, marcel.taeumel wrote: >> Yoshiki Ohshima-3 wrote >>> I am trying a few things on Squeak 5.0. In earlier versions there was >>> AndreasSystemProfier (formerly known as QSystemProfier) and had a >>> method called spyOnWorldFor:, which was quite useful. I just loaded >>> AndreasProfier-eem.11.mcz and tried it but it crashed the 5.0 all in >>> one VM on Mac OS 10.10. >>> >>> Is this a known issue? Is there an alternative to it? >>> >>> -- >>> -- Yoshiki >> >> Hi Yoshiki, >> >> there is Extras > Start Profiler, which does >> >> MessageTally spyOn: [[Sensor peekPosition y > 0] whileTrue: [World >> doOneCycle]]. >> >> I do not know the semantics of #spyOnWorldFor:, but you could specify other >> duration limits in the whileTrue predicate. > > Thanks! > > I misremembered that spyOnWorldFor was doing profiling for > "otherProcesses" (maybe it did at some point) but yes, I can have a do > it like above and it does most of it. > > Only difference is that not using the cursor position let me interact > with things in the world. If you just want to profile the image while using the UI, then there's the Start Profiler item in the Extras menu of the docking bar. Levente > > > -- > -- Yoshiki > > From commits at source.squeak.org Mon Jul 11 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Jul 11 21:55:06 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160711215502.17712.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068267.html Name: Kernel-topa.1033 Ancestors: Kernel-eem.1032 Collect perform with 5 args. ============================================= From leves at caesar.elte.hu Mon Jul 11 21:55:01 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Mon Jul 11 21:55:08 2016 Subject: [squeak-dev] spyOnWorldFor: In-Reply-To: References: <4B6F0D07-F678-4A61-BF7C-62F4C5315475@gmail.com> Message-ID: On Mon, 11 Jul 2016, Yoshiki Ohshima wrote: > Thanks. Is there actually a reason to try AndreasSystemProfier, or > does the MessageTally in Squeak 5.0 subsume it? AndreasSystemProfier is more accurate, because it can measure the time spent in primitives. Levente > > On Sun, Jul 10, 2016 at 7:45 AM, Eliot Miranda wrote: >> Hi Yoshiki, >> >> try an up-to-date VM. I'd point you to Travis could but I don't see entirely green builds there right now. So pick up the most up-to-date VM from my site. >> >> _,,,^..^,,,_ (phone) >> >>> On Jul 8, 2016, at 3:58 PM, Yoshiki Ohshima wrote: >>> >>> I am trying a few things on Squeak 5.0. In earlier versions there was >>> AndreasSystemProfier (formerly known as QSystemProfier) and had a >>> method called spyOnWorldFor:, which was quite useful. I just loaded >>> AndreasProfier-eem.11.mcz and tried it but it crashed the 5.0 all in >>> one VM on Mac OS 10.10. >>> >>> Is this a known issue? Is there an alternative to it? >>> >>> -- >>> -- Yoshiki >>> >> > > > > -- > -- Yoshiki > > From commits at source.squeak.org Mon Jul 11 22:06:00 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Jul 11 22:06:02 2016 Subject: [squeak-dev] The Trunk: EToys-topa.138.mcz Message-ID: Tobias Pape uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-topa.138.mcz ==================== Summary ==================== Name: EToys-topa.138 Author: topa Time: 12 July 2016, 12:05:41.656363 am UUID: 20c4c7a2-acb3-4a37-a66c-15e2f17fa329 Ancestors: EToys-pre.137 Fix spurious point in literal array =============== Diff against EToys-pre.137 =============== Item was changed: ----- Method: Morph>>abstractAModel (in category '*Etoys-card in a stack') ----- abstractAModel "Find data-containing fields in me. Make a new class, whose instance variables are named for my fields, and whose values are the values I am showing. Use a CardPlayer for now. Force the user to name the fields. Make slots for text, Number Watchers, SketchMorphs, and ImageMorphs." | unnamed ans player twoListsOfMorphs holdsSepData docks oldPlayer instVarNames | (oldPlayer := self player) ifNotNil: [oldPlayer belongsToUniClass ifTrue: ["Player" oldPlayer class instVarNames notEmpty ifTrue: [self inform: 'I already have a regular Player, so I can''t have a CardPlayer'. ^true]]]. twoListsOfMorphs := StackMorph discoverSlots: self. holdsSepData := twoListsOfMorphs first. instVarNames := ''. holdsSepData do: [:ea | | iVarName | iVarName := Scanner wellFormedInstanceVariableNameFrom: ea knownName. iVarName = ea knownName ifFalse: [ea name: iVarName]. instVarNames := instVarNames , iVarName , ' ']. unnamed := twoListsOfMorphs second. "have default names" instVarNames isEmpty ifTrue: [self inform: 'No named fields were found. Please get a halo on each field and give it a name. Labels or non-data fields should be named "shared xxx".'. ^false]. unnamed notEmpty ifTrue: [ans := (UIManager default chooseFrom: #( + 'All other fields are non-data fields' + 'Stop. Let me give a name to some more fields' - 'All other fields are non-data fields'. - 'Stop. Let me give a name to some more fields'. ) title: 'Data fields are ' , instVarNames printString , ('\Some fields are not named. Are they labels or non-data fields?' , '\Please get a halo on each data field and give it a name.') withCRs) = 1. ans ifFalse: [^false]]. unnamed withIndexDo: [:mm :ind | mm setName: 'shared label ' , ind printString]. "Make a Player with instVarNames. Make me be the costume" player := CardPlayer instanceOfUniqueClassWithInstVarString: instVarNames andClassInstVarString: ''. self player: player. player costume: self. "Fill in the instance values. Make docks first." docks := OrderedCollection new. holdsSepData do: [:morph | morph setProperty: #shared toValue: true. "in case it is deeply embedded" morph setProperty: #holdsSeparateDataForEachInstance toValue: true. player class compileInstVarAccessorsFor: morph knownName. morph isSyntaxMorph ifTrue: [morph setTarget: player]. "hookup the UpdatingString!!" docks addAll: morph variableDocks]. player class newVariableDocks: docks. docks do: [:dd | dd storeMorphDataInInstance: player]. "oldPlayer class mdict do: [:assoc | move to player]. move methods to new class?" "oldPlayer become: player." ^true "success"! From commits at source.squeak.org Mon Jul 11 22:24:03 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Jul 11 22:24:05 2016 Subject: [squeak-dev] The Trunk: PreferenceBrowser-topa.61.mcz Message-ID: Tobias Pape uploaded a new version of PreferenceBrowser to project The Trunk: http://source.squeak.org/trunk/PreferenceBrowser-topa.61.mcz ==================== Summary ==================== Name: PreferenceBrowser-topa.61 Author: topa Time: 12 July 2016, 12:23:57.27535 am UUID: 14cc130e-5a14-404a-8be8-3e08091395a9 Ancestors: PreferenceBrowser-pre.60 Look up Font by point size if request is in points =============== Diff against PreferenceBrowser-pre.60 =============== Item was changed: ----- Method: PBBooleanPreferenceView>>enabledButton (in category 'user interface') ----- enabledButton | aButton aLabel | aButton := UpdatingThreePhaseButtonMorph checkBox target: self preference; actionSelector: #togglePreferenceValue; getSelector: #preferenceValue; yourself. aLabel := (StringMorph contents: 'enabled' translated font: (StrikeFont familyName: TextStyle defaultFont familyName + pointSize: TextStyle defaultFont pointSize - 1)). - size: TextStyle defaultFont pointSize - 1)). ^self horizontalPanel addMorphBack: aButton; addMorphBack: aLabel; yourself.! Item was changed: ----- Method: PBBooleanPreferenceView>>localToProjectButton (in category 'user interface') ----- localToProjectButton | aButton aLabel | aButton := UpdatingThreePhaseButtonMorph checkBox target: self preference; actionSelector: #toggleProjectLocalness; getSelector: #localToProject; yourself. aLabel := (StringMorph contents: 'local' translated font: (StrikeFont familyName: TextStyle defaultFont familyName + pointSize: TextStyle defaultFont pointSize - 1)). - size: TextStyle defaultFont pointSize - 1)). ^self horizontalPanel addMorphBack: aButton; addMorphBack: aLabel; yourself.! From commits at source.squeak.org Mon Jul 11 22:32:42 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Jul 11 22:32:45 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-topa.168.mcz Message-ID: Tobias Pape uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-topa.168.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-topa.168 Author: topa Time: 12 July 2016, 12:32:32.896626 am UUID: 7db062cb-f3e1-4434-b620-d63e88b34c81 Ancestors: ToolBuilder-Morphic-mt.167 Look up Font by point size if request is in points =============== Diff against ToolBuilder-Morphic-mt.167 =============== Item was changed: ----- Method: PluggableCheckBoxMorph>>installButton (in category 'installing') ----- installButton | aButton aLabel | aButton := UpdatingThreePhaseButtonMorph checkBox target: self model; actionSelector: self actionSelector; getSelector: self valueSelector; yourself. aLabel := (StringMorph contents: self label translated font: (StrikeFont familyName: TextStyle defaultFont familyName + pointSize: TextStyle defaultFont pointSize - 1)). - size: TextStyle defaultFont pointSize - 1)). self addMorph: (self horizontalPanel addMorphBack: aButton; addMorphBack: aLabel; yourself).! Item was changed: ----- Method: PluggableDropDownListMorph>>installDropDownList (in category 'drawing') ----- installDropDownList | aButton aLabel | aButton := PluggableButtonMorph on: self model getState: nil action: nil. aLabel := (StringMorph contents: self model currentRemoteVatId translated font: (StrikeFont familyName: TextStyle defaultFont familyName + pointSize: TextStyle defaultFont pointSize - 1)). - size: TextStyle defaultFont pointSize - 1)). self addMorph: (self horizontalPanel addMorphBack: aLabel; addMorphBack: aButton; yourself).! From lewis at mail.msen.com Mon Jul 11 23:00:52 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Jul 11 23:00:56 2016 Subject: [squeak-dev] spyOnWorldFor: In-Reply-To: References: <4B6F0D07-F678-4A61-BF7C-62F4C5315475@gmail.com> Message-ID: <20160711230052.GA9847@shell.msen.com> On Mon, Jul 11, 2016 at 02:33:29PM -0700, Yoshiki Ohshima wrote: > > On Sun, Jul 10, 2016 at 7:45 AM, Eliot Miranda wrote: > > > >> On Jul 8, 2016, at 3:58 PM, Yoshiki Ohshima wrote: > >> > >> I am trying a few things on Squeak 5.0. In earlier versions there was > >> AndreasSystemProfier (formerly known as QSystemProfier) and had a > >> method called spyOnWorldFor:, which was quite useful. I just loaded > >> AndreasProfier-eem.11.mcz and tried it but it crashed the 5.0 all in > >> one VM on Mac OS 10.10. > >> > >> Is this a known issue? Is there an alternative to it? > >> > > Hi Yoshiki, > > > > try an up-to-date VM. I'd point you to Travis could but I don't see entirely green builds there right now. So pick up the most up-to-date VM from my site. > > > > > > Thanks. Is there actually a reason to try AndreasSystemProfier, or > does the MessageTally in Squeak 5.0 subsume it? > AndreasSystemProfier should produce significantly better profiling results, especially with regard to measuring time spent in primitives. If you are doing serious profiling work, I think that you will be happier with AndreasSystemProfiler. Dave From dale.henrichs at gemtalksystems.com Tue Jul 12 00:14:58 2016 From: dale.henrichs at gemtalksystems.com (Dale Henrichs) Date: Tue Jul 12 00:15:01 2016 Subject: [squeak-dev] [ANN] The Squeak Shell In-Reply-To: <1467987446046-4905613.post@n4.nabble.com> References: <1467987446046-4905613.post@n4.nabble.com> Message-ID: <57843682.5000207@gemtalksystems.com> Marcel, Very Cool! However, whenever I see a Smalltalk shell where folks are typing Smalltalk into the REPL I cringe, because Smalltalk is not really a scripting language ... but I think that having scripts written in Smalltalk and callable from a shell is a real interesting idea. In tODE[2] I allow folks to create scripts written Smalltalk that can be called from a command line and it is a very simple idea ... The Smalltalk script is simply a block. Here's an example script[1] that is callable from a command line that looks like one of the following: bug --help bug --install bug --clean --create--boom; edit A command object is passed in from the command line parser and the command options are turned into a `opts` Dictionary with option names as keys and option values as values ... Instead of stdin and stout being byte streams, the stdin and stdout for Smalltalk scripts are objects (objIn and objOut) --- the objIn arg in the block is the objIn for the script, basically the result of the last command. The edit command above brings up an inspector on the result of the script ... For tODE the script object (block) can be registered in the Smalltalk image itself or the script object can be written to disk[4] in STON[3] format --- making the script easily callable from multiple images ... I can share the command/option/argument code if you are interested ... adding Smalltalk scripts to your REPL should be very straightforward ... Dale [1] https://gist.github.com/dalehenrich/97f2befe07ad7bf928165a3fc64a2118 [2] https://github.com/dalehenrich/tode#tode-the-object-centric-development-environment- [3] https://github.com/svenvc/ston#ston---smalltalk-object-notation [4] https://gist.github.com/dalehenrich/be9e7cd439eb5a5a0d9e937cc0a04f86 On 07/08/2016 07:17 AM, marcel.taeumel wrote: > Hi, there! > > I am happy to announce a new kind of project for Squeak: "The Squeak Shell". > :-) > > You can install it into any trunk image via: > > Installer swa > project: 'SqueakShell'; > install: 'SqueakShell'. > > Then you will find a new kind of project under Projects -> New Project ... > > The Squeak Shell is independent from Morphic and MVC. It's architecture is, > partially, a mixture of both. :-D I wanted to keep it as simple as possible > while avoiding global state as much as possible. > > My goal is to add it to trunk to simplify modularization of MVC and Morphic. > For example, we have to extract UserInputEvent and Canvas from Morphic into > the base system. These would form a splendid addition to other projects > because object-oriented event processing and displaying is not something > that only Morphic should have. > > The Squeak Shell helped me refactor Squeak's project mechanism. It also > revealed potential improvements for our Debugger, which I am going to > address later this year. One goal is to make Squeak more robust and mitigate > the risk of getting locked out of the system. > > Here is the interesting part: It can be used to recover from > serious/recursive errors in Morphic and MVC. When you open a new Morphic > project from within a Squeak Shell project, the shell will appear then. Only > recursive errors in the shell will then start our traditional emergency > evaluator. > > Some figures: 12 classes, 274 methods, 1454 LOC. > > You can open the Squeak Shell on top of the Morphic loop ("SqueakShell > open") or as custom process inside the Morphic project ("SqueakShell > openConcurrent"). You enter a SqueakShell project via: "SqueakShell > openAsProject". > > The core of the Squeak Shell covers only 6 classes (see "SqueakShell-Core"). > There are already two applications in this project: (1) a command line and > (2) a text editor (see "SqueakShell-Tools"). > > You can use the Squeak Shell to explore all our tool extension points, which > we use for browsing classes, inspecting objects, debugging unhandled errors > in processes, etc. For this, take a look at SqshProject, SqshToolSet, and > SqshUIManager. > > I am sure that there can be an even smaller kind of project. However, I am > not so sure about the usefulness of such a project. :-) > > > > Have fun! > Marcel > > > > -- > View this message in context: http://forum.world.st/ANN-The-Squeak-Shell-tp4905613.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From asqueaker at gmail.com Tue Jul 12 02:38:04 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Jul 12 02:38:47 2016 Subject: [squeak-dev] Re: rice paper background in trunk? In-Reply-To: <20160711123455.GA95801@shell.msen.com> References: <1467890321499-4905327.post@n4.nabble.com> <1468233522363-4905942.post@n4.nabble.com> <20160711123455.GA95801@shell.msen.com> Message-ID: >> Anyway, there is no reason why we couldn't provide a set of three (?) >> alternative patterns for the default background. Maybe as simple as >> switching between uniform window colors and colorful windows. >> > > That sounds like a good idea. I would like to be able to change the > background pattern, but I rarely bother doing so. If I had a few choices > easily available in the image, that is something that I would be happy > to use. You want to introduce _another_ way for the end-user to set the background? A way leaves the new user wondering, "why can't I set something besides these three ugly backgrounds?" Bloat the image with a limited selection of hard-coded graphical patterns? I hope we don't do that. They should be externalized. From lewis at mail.msen.com Tue Jul 12 02:53:07 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Jul 12 02:53:11 2016 Subject: [squeak-dev] [ANN] The Squeak Shell In-Reply-To: <884AACEF-8EC8-49A4-AD21-C3614ED69167@gmx.de> References: <1467987446046-4905613.post@n4.nabble.com> <20160711023311.GA90293@shell.msen.com> <1468222817165-4905883.post@n4.nabble.com> <155d997de09.e9c47069129798.3116341732414011013@zoho.com> <1468233868100-4905945.post@n4.nabble.com> <884AACEF-8EC8-49A4-AD21-C3614ED69167@gmx.de> Message-ID: <20160712025307.GA40178@shell.msen.com> On Mon, Jul 11, 2016 at 04:44:47PM +0200, Tobias Pape wrote: > > On 11.07.2016, at 15:18, Tony Garnock-Jones wrote: > > > On 2016-07-11 6:44 AM, marcel.taeumel wrote: > >> I did try to use stdin and stdout, but it is blocking for an > >> empty input. > > > > This sounds like the problems I was having reading from /dev/... files. > > > > Perhaps the OSProcess-nonblocking-style solution I was using there could > > also work for this case: > > http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-June/190051.html > > > > Regards, > > Tony > > Or it's just buffered? That was the problem the SqueakREPL students were having > and why they switched to telnet: it's not (yet?) possible to set stdout and stdin > to unbuffered, let alone 'raw' (as opposed to 'cooked'). > > Best regards > -Tobias The stdin for a Unix process will be blocking by default (a good choice for processes that are expected to be chained in command pipelines, which is a fundamental part of the Unix design). Squeak VMs inherit this behavior by default, although more recent Cog/Spur VMs set the stdin to non-blocking mode at startup. You can control this with: and: Any Squeak VM will block on read from a blocking input stream. The two basic strategies for dealing with this are 1) do the blocking read in a thread or 2) set non-blocking mode and use AIO notification to read the available input. An example of setting non-blocking input from OSProcess/CommandShell is the ExternalCommandShell REPL that sets nonblocking input in ExternalCommandShell>>setNonblockingInput. For the stdin stream of the VM, either of these will set to non-blocking if the VM has not allready done it for you at startup time: OSProcess thisOSProcess stdIn setNonBlocking. OSProcess accessor setNonBlocking: FileStream stdin fileID. For perspective, the win32 overlapped files design is a thread based approach (IIUC based on thinking from earlier DEC OSs with AST asynchronous traps handing the low level IO processing). For a Squeak VM, the equivalent would be a blocking input stream handled by a thread with asynchronous callbacks (see Eliot's work with Aliens and FFI callbacks). Unix applications are more likely to use AIO to accomplish similar things, and the AIO based event notification in the Unix VMs is an example of this. As far as I can tell, the two approaches are roughly equivalent, although I suspect you could still get a good flame war going between VMS bigots and Unix bigots if you were to raise the topic ;-) If this subject has caused confusion for students, I would say that it's a good thing :-) It is worth thinking about, especially as the world moves to systems with more multiprocessing and concurrency issues. Dave From peter at ozzard.org Tue Jul 12 09:27:27 2016 From: peter at ozzard.org (Peter Crowther) Date: Tue Jul 12 09:27:33 2016 Subject: [squeak-dev] [ANN] The Squeak Shell In-Reply-To: <57843682.5000207@gemtalksystems.com> References: <1467987446046-4905613.post@n4.nabble.com> <57843682.5000207@gemtalksystems.com> Message-ID: On 12 July 2016 at 01:14, Dale Henrichs wrote: > However, whenever I see a Smalltalk shell where folks are typing Smalltalk > into the REPL I cringe, because Smalltalk is not really a scripting language > > Whereas I see a wonderful minimal system for debugging when I've broken MVC, Morphic or sometimes both :-). My use case is to require as small a part of the image as possible to function while I work out what's happened. Any sugar on top is extra code that I might have broken! Cheers, - Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160712/da5f7989/attachment-0001.htm From eliot.miranda at gmail.com Tue Jul 12 10:47:48 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Jul 12 10:48:00 2016 Subject: [squeak-dev] spyOnWorldFor: In-Reply-To: References: <4B6F0D07-F678-4A61-BF7C-62F4C5315475@gmail.com> Message-ID: <332B0481-17B6-4A4D-8D67-05FCF8B4E76E@gmail.com> H All, > On Jul 11, 2016, at 2:55 PM, Levente Uzonyi wrote: > >> On Mon, 11 Jul 2016, Yoshiki Ohshima wrote: >> >> Thanks. Is there actually a reason to try AndreasSystemProfier, or >> does the MessageTally in Squeak 5.0 subsume it? > > AndreasSystemProfier is more accurate, because it can measure the time spent in primitives. And hence in 5.x we could replace MessageTally with AndreasSystemProfiler and have only one copy of the code. If students are working on improving MessageTally they could (and IMO should) be redirected to AndreasSystemProfiler. > > Levente > >> >>> On Sun, Jul 10, 2016 at 7:45 AM, Eliot Miranda wrote: >>> Hi Yoshiki, >>> >>> try an up-to-date VM. I'd point you to Travis could but I don't see entirely green builds there right now. So pick up the most up-to-date VM from my site. >>> >>> _,,,^..^,,,_ (phone) >>> >>>> On Jul 8, 2016, at 3:58 PM, Yoshiki Ohshima wrote: >>>> >>>> I am trying a few things on Squeak 5.0. In earlier versions there was >>>> AndreasSystemProfier (formerly known as QSystemProfier) and had a >>>> method called spyOnWorldFor:, which was quite useful. I just loaded >>>> AndreasProfier-eem.11.mcz and tried it but it crashed the 5.0 all in >>>> one VM on Mac OS 10.10. >>>> >>>> Is this a known issue? Is there an alternative to it? >>>> >>>> -- >>>> -- Yoshiki >> >> >> >> -- >> -- Yoshiki > From Marcel.Taeumel at hpi.de Tue Jul 12 12:55:39 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Jul 12 13:38:09 2016 Subject: [squeak-dev] Re: rice paper background in trunk? In-Reply-To: References: <1467890321499-4905327.post@n4.nabble.com> <1468233522363-4905942.post@n4.nabble.com> <20160711123455.GA95801@shell.msen.com> Message-ID: <1468328139600-4906222.post@n4.nabble.com> Chris Muller-3 wrote >>> Anyway, there is no reason why we couldn't provide a set of three (?) >>> alternative patterns for the default background. Maybe as simple as >>> switching between uniform window colors and colorful windows. >>> >> >> That sounds like a good idea. I would like to be able to change the >> background pattern, but I rarely bother doing so. If I had a few choices >> easily available in the image, that is something that I would be happy >> to use. > > You want to introduce _another_ way for the end-user to set the > background? > > A way leaves the new user wondering, "why can't I set something > besides these three ugly backgrounds?" > > Bloat the image with a limited selection of hard-coded graphical patterns? > > I hope we don't do that. They should be externalized. It is very interesting how some words can easily produce images in people's heads. :-) No Chris, I wouldn't do it the way you are thinking about it right now. :-D I guess. ... ;-) Best, Marcel -- View this message in context: http://forum.world.st/rice-paper-background-in-trunk-tp4905261p4906222.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From dale.henrichs at gemtalksystems.com Tue Jul 12 14:02:58 2016 From: dale.henrichs at gemtalksystems.com (Dale Henrichs) Date: Tue Jul 12 14:03:04 2016 Subject: [squeak-dev] [ANN] The Squeak Shell In-Reply-To: References: <1467987446046-4905613.post@n4.nabble.com> <57843682.5000207@gemtalksystems.com> Message-ID: On 7/12/16 2:27 AM, Peter Crowther wrote: > On 12 July 2016 at 01:14, Dale Henrichs > > wrote: > > However, whenever I see a Smalltalk shell where folks are typing > Smalltalk into the REPL I cringe, because Smalltalk is not really > a scripting language > > Whereas I see a wonderful minimal system for debugging when I've > broken MVC, Morphic or sometimes both :-). Haha ... well I use a Smalltalk REPL everyday all day, but i rarely type Smalltalk expressions on the command line - I run Smalltalk scripts/workspaces from the command line ... much more convenient and useful on a regular basis! Dale -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160712/1f8fa9b9/attachment.htm From Marcel.Taeumel at hpi.de Tue Jul 12 13:21:09 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Jul 12 14:03:39 2016 Subject: [squeak-dev] Re: [ANN] The Squeak Shell In-Reply-To: <57843682.5000207@gemtalksystems.com> References: <1467987446046-4905613.post@n4.nabble.com> <57843682.5000207@gemtalksystems.com> Message-ID: <1468329669590-4906232.post@n4.nabble.com> Dale Henrichs-3 wrote > Marcel, > > Very Cool! > > However, whenever I see a Smalltalk shell where folks are typing > Smalltalk into the REPL I cringe, because Smalltalk is not really a > scripting language ... but I think that having scripts written in > Smalltalk and callable from a shell is a real interesting idea. > > In tODE[2] I allow folks to create scripts written Smalltalk that can be > called from a command line and it is a very simple idea ... The > Smalltalk script is simply a block. > > Here's an example script[1] that is callable from a command line that > looks like one of the following: > > bug --help > bug --install > bug --clean --create--boom; edit > > > A command object is passed in from the command line parser and the > command options are turned into a `opts` Dictionary with option names as > keys and option values as values ... > > Instead of stdin and stout being byte streams, the stdin and stdout for > Smalltalk scripts are objects (objIn and objOut) --- the objIn arg in > the block is the objIn for the script, basically the result of the last > command. > > The edit command above brings up an inspector on the result of the > script ... > > For tODE the script object (block) can be registered in the Smalltalk > image itself or the script object can be written to disk[4] in STON[3] > format --- making the script easily callable from multiple images ... > > I can share the command/option/argument code if you are interested ... > adding Smalltalk scripts to your REPL should be very straightforward ... > > Dale > > [1] https://gist.github.com/dalehenrich/97f2befe07ad7bf928165a3fc64a2118 > [2] > https://github.com/dalehenrich/tode#tode-the-object-centric-development-environment- > [3] https://github.com/svenvc/ston#ston---smalltalk-object-notation > [4] https://gist.github.com/dalehenrich/be9e7cd439eb5a5a0d9e937cc0a04f86 > > On 07/08/2016 07:17 AM, marcel.taeumel wrote: >> Hi, there! >> >> I am happy to announce a new kind of project for Squeak: "The Squeak >> Shell". >> :-) >> >> You can install it into any trunk image via: >> >> Installer swa >> project: 'SqueakShell'; >> install: 'SqueakShell'. >> >> Then you will find a new kind of project under Projects -> New Project >> ... >> >> The Squeak Shell is independent from Morphic and MVC. It's architecture >> is, >> partially, a mixture of both. :-D I wanted to keep it as simple as >> possible >> while avoiding global state as much as possible. >> >> My goal is to add it to trunk to simplify modularization of MVC and >> Morphic. >> For example, we have to extract UserInputEvent and Canvas from Morphic >> into >> the base system. These would form a splendid addition to other projects >> because object-oriented event processing and displaying is not something >> that only Morphic should have. >> >> The Squeak Shell helped me refactor Squeak's project mechanism. It also >> revealed potential improvements for our Debugger, which I am going to >> address later this year. One goal is to make Squeak more robust and >> mitigate >> the risk of getting locked out of the system. >> >> Here is the interesting part: It can be used to recover from >> serious/recursive errors in Morphic and MVC. When you open a new Morphic >> project from within a Squeak Shell project, the shell will appear then. >> Only >> recursive errors in the shell will then start our traditional emergency >> evaluator. >> >> Some figures: 12 classes, 274 methods, 1454 LOC. >> >> You can open the Squeak Shell on top of the Morphic loop ("SqueakShell >> open") or as custom process inside the Morphic project ("SqueakShell >> openConcurrent"). You enter a SqueakShell project via: "SqueakShell >> openAsProject". >> >> The core of the Squeak Shell covers only 6 classes (see >> "SqueakShell-Core"). >> There are already two applications in this project: (1) a command line >> and >> (2) a text editor (see "SqueakShell-Tools"). >> >> You can use the Squeak Shell to explore all our tool extension points, >> which >> we use for browsing classes, inspecting objects, debugging unhandled >> errors >> in processes, etc. For this, take a look at SqshProject, SqshToolSet, and >> SqshUIManager. >> >> I am sure that there can be an even smaller kind of project. However, I >> am >> not so sure about the usefulness of such a project. :-) >> >> <http://forum.world.st/file/n4905613/shell.png> >> >> Have fun! >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/ANN-The-Squeak-Shell-tp4905613.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> Hi Dale, thanks. Yeah, right now, the Squeak Shell is no scripting environment. There is accessible concept of object streams. This, however, was not the goal here. :-) If I would want to introduce object streams and improve Squeak's scripting capabilities (wrt. to the Squeak Shell), I would subclass SqshCommandLine and add simple ways to connect blocks or do other things as you suggested. The SqshCommandLine right now only evaluates code, supports bindings, and has some shortcuts (beginning with !). And there is some navigation in the object space with ! and !!. Best, Marcel -- View this message in context: http://forum.world.st/ANN-The-Squeak-Shell-tp4905613p4906232.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Tue Jul 12 15:52:20 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Jul 12 15:53:04 2016 Subject: Setting preferences & UI settings (was: Re: [squeak-dev] Re: rice paper background in trunk?) In-Reply-To: <6411A608-0105-438B-8683-2D5A765FFC8B@rowledge.org> References: <1467890321499-4905327.post@n4.nabble.com> <1468233522363-4905942.post@n4.nabble.com> <8FB639CB-C027-4050-955E-773C62157905@gmail.com> <6411A608-0105-438B-8683-2D5A765FFC8B@rowledge.org> Message-ID: Karl, Marcel, Patrick Rein, Tobias and I have been working on something to address this. Expect an announcement soon... On Mon, Jul 11, 2016 at 12:25 PM, tim Rowledge wrote: > We have areal mess in our assorted and various preference and look settings. Does anyone even know how many places there are where choices can be made? > > The PreferencesBrowser has a *lot* of preferences in it. Lots of stuff I have no idea how to make use of or why they are there - I mean really, do we have even the faintest use for ?thoroughSenders? any more? Let alone ?ThoroughSenders?, which is a separate preference in the browser that appears to link to the same message, sort of. > > It also has a bunch of colour settings, split up in strange places. But no screen background setting that I can see. Nor font choosing. > > We *do* have the ?appearances? item in the Screen menu, with a separate collection of oddness. And then other bits scattered in many other places within the poorly designed tree of menus depending from the screen menu. But not of course actual tree menus, oh no, submenus activated by ?more?? and so on. It?s really not very encouraging. > > My suggestion(s) - > clean out the preferences > reorganise the preference groupings more helpfully > add decent look preference tools - backgrounds, fonts, sizes, etc > clean out the weird screen menu tree > convert menus to ?proper? hierarchical menus wherever a long menu could do with shortening or there are logical groups of items (for example the save/quit group) > > It?s quite a bit of work though. > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Never test for an error condition you don't know how to handle. > > > From tim at rowledge.org Tue Jul 12 16:53:23 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue Jul 12 16:52:51 2016 Subject: [squeak-dev] Re: rice paper background in trunk? In-Reply-To: <1468328139600-4906222.post@n4.nabble.com> References: <1467890321499-4905327.post@n4.nabble.com> <1468233522363-4905942.post@n4.nabble.com> <20160711123455.GA95801@shell.msen.com> <1468328139600-4906222.post@n4.nabble.com> Message-ID: > On 12-07-2016, at 5:55 AM, marcel.taeumel wrote: > > Chris Muller-3 wrote {snip} >> >> Bloat the image with a limited selection of hard-coded graphical patterns? >> >> I hope we don't do that. They should be externalized. > > It is very interesting how some words can easily produce images in people's > heads. :-) Thinking of producing images, how about some procedurally generated patterns? Not trivial ones like stripes or blocks (so 80?s) but surely some clever graphics students can make pretty swirly textures from a few lines of code, then we generate the bitmap at the size wanted, when wanted. Could even animate them for that DrWho/Blake?s 7/Star Trek feel tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim "Bother," said Pooh, reading his bank statement from Barings. From tim at rowledge.org Tue Jul 12 16:54:51 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue Jul 12 16:54:19 2016 Subject: [squeak-dev] Re: [ANN] The Squeak Shell In-Reply-To: <1468329669590-4906232.post@n4.nabble.com> References: <1467987446046-4905613.post@n4.nabble.com> <57843682.5000207@gemtalksystems.com> <1468329669590-4906232.post@n4.nabble.com> Message-ID: <3F8342A7-129F-4645-8583-1E4DF50B7052@rowledge.org> > On 12-07-2016, at 6:21 AM, marcel.taeumel wrote: {snip} > Yeah, right now, the Squeak Shell is no scripting environment. There > is accessible concept of object streams. This, however, was not the goal > here. :-) I don?t suppose it might be something that could be a more useful replacement for the emergency evaluator ? At least in some cases.. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Four wheels move the body. Two wheels move the soul From lewis at mail.msen.com Tue Jul 12 17:13:07 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Jul 12 17:13:12 2016 Subject: [squeak-dev] Re: [ANN] The Squeak Shell In-Reply-To: <3F8342A7-129F-4645-8583-1E4DF50B7052@rowledge.org> References: <1467987446046-4905613.post@n4.nabble.com> <57843682.5000207@gemtalksystems.com> <1468329669590-4906232.post@n4.nabble.com> <3F8342A7-129F-4645-8583-1E4DF50B7052@rowledge.org> Message-ID: <6679.136.1.1.169.1468343587.squirrel@webmail.msen.com> Wow Tim, I think you must have been reading Marcel's mind! Dave > >> On 12-07-2016, at 6:21 AM, marcel.taeumel wrote: > {snip} >> Yeah, right now, the Squeak Shell is no scripting environment. There >> is accessible concept of object streams. This, however, was not the goal >> here. :-) > > I don???t suppose it might be something that could be a more useful > replacement for the emergency evaluator ? At least in some cases.. > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Four wheels move the body. Two wheels move the soul > > From gettimothy at zoho.com Tue Jul 12 19:43:14 2016 From: gettimothy at zoho.com (gettimothy) Date: Tue Jul 12 19:43:20 2016 Subject: [squeak-dev] Re: rice paper background in trunk? In-Reply-To: <1468328139600-4906222.post@n4.nabble.com> References: <1467890321499-4905327.post@n4.nabble.com> <1468233522363-4905942.post@n4.nabble.com> <20160711123455.GA95801@shell.msen.com> <1468328139600-4906222.post@n4.nabble.com> Message-ID: <155e0a282ed.11017c1c0146731.1244152017588238102@zoho.com> Steve Wessel's Desktop Background Loader works wonderfully. http://squeak.preeminent.org/ I wrote a blog post on how to install it here: https://timmydosmalltalk.wordpress.com/2013/06/20/setting-a-background-image-on-squeak/ I am able to set a different background per/project..I run WindowMaker window manager and their Themes are quit rich. You may want to provide the Background Loader by default and then provide some optional "themes" for users to download. cheers. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160712/77f9f17a/attachment.htm From Marcel.Taeumel at hpi.de Tue Jul 12 19:17:13 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Jul 12 19:59:45 2016 Subject: [squeak-dev] Re: rice paper background in trunk? In-Reply-To: <155e0a282ed.11017c1c0146731.1244152017588238102@zoho.com> References: <1467890321499-4905327.post@n4.nabble.com> <1468233522363-4905942.post@n4.nabble.com> <20160711123455.GA95801@shell.msen.com> <1468328139600-4906222.post@n4.nabble.com> <155e0a282ed.11017c1c0146731.1244152017588238102@zoho.com> Message-ID: <1468351033347-4906335.post@n4.nabble.com> gettimothy wrote > Steve Wessel's Desktop Background Loader works wonderfully. > > http://squeak.preeminent.org/ > > I wrote a blog post on how to install it here: > > https://timmydosmalltalk.wordpress.com/2013/06/20/setting-a-background-image-on-squeak/ > > > I am able to set a different background per/project..I run WindowMaker > window manager and their Themes are quit rich. > > You may want to provide the Background Loader by default and then provide > some optional "themes" for users to download. > > cheers. We could also just add a file service and provide a second option for dropped image files besides making them a sketch morph. Assuming a user is able to drag-drop a picture file, this would be *very* simple. Best, Marcel -- View this message in context: http://forum.world.st/rice-paper-background-in-trunk-tp4905261p4906335.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Tue Jul 12 19:19:35 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Jul 12 20:02:08 2016 Subject: [squeak-dev] Re: [ANN] The Squeak Shell In-Reply-To: <6679.136.1.1.169.1468343587.squirrel@webmail.msen.com> References: <1467987446046-4905613.post@n4.nabble.com> <57843682.5000207@gemtalksystems.com> <1468329669590-4906232.post@n4.nabble.com> <3F8342A7-129F-4645-8583-1E4DF50B7052@rowledge.org> <6679.136.1.1.169.1468343587.squirrel@webmail.msen.com> Message-ID: <1468351175990-4906336.post@n4.nabble.com> David T. Lewis wrote > Wow Tim, I think you must have been reading Marcel's mind! > > Dave > >> >>> On 12-07-2016, at 6:21 AM, marcel.taeumel < > Marcel.Taeumel@ > > wrote: >> {snip} >>> Yeah, right now, the Squeak Shell is no scripting environment. There >>> is accessible concept of object streams. This, however, was not the goal >>> here. :-) >> >> I don???t suppose it might be something that could be a more useful >> replacement for the emergency evaluator ? At least in some cases.. >> >> >> tim >> -- >> tim Rowledge; > tim@ > ; http://www.rowledge.org/tim >> Four wheels move the body. Two wheels move the soul >> >> Oh, it's a classic one. I made the initial post way too long. And there was no TL;DR. My bad. ;-D Best, Marcel -- View this message in context: http://forum.world.st/ANN-The-Squeak-Shell-tp4905613p4906336.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From tim at rowledge.org Tue Jul 12 20:07:48 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue Jul 12 20:07:15 2016 Subject: [squeak-dev] Re: [ANN] The Squeak Shell In-Reply-To: <1468351175990-4906336.post@n4.nabble.com> References: <1467987446046-4905613.post@n4.nabble.com> <57843682.5000207@gemtalksystems.com> <1468329669590-4906232.post@n4.nabble.com> <3F8342A7-129F-4645-8583-1E4DF50B7052@rowledge.org> <6679.136.1.1.169.1468343587.squirrel@webmail.msen.com> <1468351175990-4906336.post@n4.nabble.com> Message-ID: <6B70E001-A793-4BF6-9D0E-77349931C4F7@rowledge.org> > On 12-07-2016, at 12:19 PM, marcel.taeumel wrote: > > Oh, it's a classic one. I made the initial post way too long. And there was > no TL;DR. My bad. ;-D OK, OK, I see (after reading several times) the part where you peripherally mention it. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim All programmers are playwrights and all computers are lousy actors. From commits at source.squeak.org Tue Jul 12 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Jul 12 21:55:03 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160712215502.26589.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068268.html Name: EToys-topa.138 Ancestors: EToys-pre.137 Fix spurious point in literal array ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068269.html Name: PreferenceBrowser-topa.61 Ancestors: PreferenceBrowser-pre.60 Look up Font by point size if request is in points ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068270.html Name: ToolBuilder-Morphic-topa.168 Ancestors: ToolBuilder-Morphic-mt.167 Look up Font by point size if request is in points ============================================= From Marcel.Taeumel at hpi.de Wed Jul 13 08:29:37 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Jul 13 09:12:12 2016 Subject: [squeak-dev] [ANN] The Squeak 5.1 Release Plan Message-ID: <1468398577095-4906439.post@n4.nabble.com> Hey, there. I just want to inform all of you that we are in the middle of preparing the next Squeak 5.1 release. We are working on automation for generating/updating all release artifacts so that we are eventually able to shorten our release cycle in the future. For this, we are using smalltalkCI (thanks Fabio!), TravisCI, and AppVeyor. Here are the important dates: * Feature Freeze on July 31, 23:59 AOE * Code Freeze on August 14, 23:59 AOE * Release between August 15 and 19 As these dates suggest, our goal is to have the release before this year's ESUG. However, there is another important Smalltalk-related event this year: 20 years of Squeak. :-) Yeah! It was around October 1996, when the first Squeak came into the world. ...having its own worlds. :D So, it would only make sense to also have a special release for this birthday. For this, we revived all of the cool multimedia content, known from Squeak 1 through Squeak 3, and made it fit for the current Squeak code base. Oh, this is so exciting. :-) Anyway, what's with Squeak 5.1 and 64-bit? Since the release of Squeak 5.0, we've been working hard and made a lot of bug fixes and added some features to improve the overall usability and robustness of the Squeak live programming system. Meanwhile, the VMs improved as well. Cog's object format "Spur" got more robust, the JIT improved, and the whole code base moved from SVN to Git: https://github.com/OpenSmalltalk/opensmalltalk-vm. Still, what's up with 64-bit? We have working 64-bit VMs for Mac OS X and Linux. Hence, we will take the chance and also release 64-bit bundles for Squeak 5.1. Be informed that this means a new .image file. You cannot open a 64-bit .image with a 32-bit VM and vice versa. This, however, is nothing serious because we are working on an updated version of our SystemTracer to convert back and forth. With limitations, of course. ;-) You cannot fill a bottle of beer into a shot glass. What's up with the All-in-one? There will be the usual 32-bit all-in-one package, which combines VMs for Linux, Mac OS X, and Windows. Since there will be no 64-bit Windows VM within the next two months, we refrain from creating an almost-all-in-one-32/64 package. This would only confuse the users. In the future, we can arguably expand the concept of the All-in-one to also contain 32-bit and 64-bit VMs and images. So, what are the prospective release artifacts for Squeak 5.1? * All-in-one (Linux/Mac/Win) 32-bit * Mac OS X App 32-bit, signed * Mac OS X App 64-bit, signed * Linux Bundle 32-bit * Linux Bundle 64-bit * Windows App (maybe with MSI Installer) 32-bit, maybe signed * ZIP archive containing .image and .changes, no VM, no .sources We plan to also use the new release automation process for Squeak 5.0 and update those release artifacts as well. We will update our squeak.org Website but you will always find the artifacts on http://files.squeak.org/5.0 and http://files.squeak.org/5.1 . :-) Best, Marcel -- View this message in context: http://forum.world.st/ANN-The-Squeak-5-1-Release-Plan-tp4906439.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From herbertkoenig at gmx.net Wed Jul 13 09:17:09 2016 From: herbertkoenig at gmx.net (=?ISO-8859-1?Q?Herbert_K=F6nig?=) Date: Wed Jul 13 09:17:22 2016 Subject: AW: [squeak-dev] [ANN] The Squeak 5.1 Release Plan Message-ID: <40w02ecb4cfivgsdo1hnaujx.1468401429800@email.android.com> Really exciting news!? Herbert
-------- Urspr?ngliche Nachricht --------
Von: "marcel.taeumel"
Datum:13.07.2016 10:29 (GMT+01:00)
An: squeak-dev@lists.squeakfoundation.org
Betreff: [squeak-dev] [ANN] The Squeak 5.1 Release Plan
Hey, there. I just want to inform all of you that we are in the middle of preparing the next Squeak 5.1 release. We are working on automation for generating/updating all release artifacts so that we are eventually able to shorten our release cycle in the future. For this, we are using smalltalkCI (thanks Fabio!), TravisCI, and AppVeyor. Here are the important dates: ? * Feature Freeze on July 31, 23:59 AOE ? * Code Freeze on August 14, 23:59 AOE ? * Release between August 15 and 19 As these dates suggest, our goal is to have the release before this year's ESUG. However, there is another important Smalltalk-related event this year: 20 years of Squeak. :-) Yeah! It was around October 1996, when the first Squeak came into the world. ...having its own worlds. :D So, it would only make sense to also have a special release for this birthday. For this, we revived all of the cool multimedia content, known from Squeak 1 through Squeak 3, and made it fit for the current Squeak code base. Oh, this is so exciting. :-) Anyway, what's with Squeak 5.1 and 64-bit? Since the release of Squeak 5.0, we've been working hard and made a lot of bug fixes and added some features to improve the overall usability and robustness of the Squeak live programming system. Meanwhile, the VMs improved as well. Cog's object format "Spur" got more robust, the JIT improved, and the whole code base moved from SVN to Git: https://github.com/OpenSmalltalk/opensmalltalk-vm. Still, what's up with 64-bit? We have working 64-bit VMs for Mac OS X and Linux. Hence, we will take the chance and also release 64-bit bundles for Squeak 5.1. Be informed that this means a new .image file. You cannot open a 64-bit .image with a 32-bit VM and vice versa. This, however, is nothing serious because we are working on an updated version of our SystemTracer to convert back and forth. With limitations, of course. ;-) You cannot fill a bottle of beer into a shot glass. What's up with the All-in-one? There will be the usual 32-bit all-in-one package, which combines VMs for Linux, Mac OS X, and Windows. Since there will be no 64-bit Windows VM within the next two months, we refrain from creating an almost-all-in-one-32/64 package. This would only confuse the users. In the future, we can arguably expand the concept of the All-in-one to also contain 32-bit and 64-bit VMs and images. So, what are the prospective release artifacts for Squeak 5.1? ? * All-in-one (Linux/Mac/Win) 32-bit ? * Mac OS X App 32-bit, signed ? * Mac OS X App 64-bit, signed ? * Linux Bundle 32-bit ? * Linux Bundle 64-bit ? * Windows App (maybe with MSI Installer) 32-bit, maybe signed ? * ZIP archive containing .image and .changes, no VM, no .sources We plan to also use the new release automation process for Squeak 5.0 and update those release artifacts as well. We will update our squeak.org Website but you will always find the artifacts on http://files.squeak.org/5.0 and http://files.squeak.org/5.1 . :-) Best, Marcel -- View this message in context: http://forum.world.st/ANN-The-Squeak-5-1-Release-Plan-tp4906439.html Sent from the Squeak - Dev mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160713/1949e669/attachment.htm From commits at source.squeak.org Wed Jul 13 09:50:39 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jul 13 09:50:41 2016 Subject: [squeak-dev] The Trunk: Graphics-mt.352.mcz Message-ID: Marcel Taeumel uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-mt.352.mcz ==================== Summary ==================== Name: Graphics-mt.352 Author: mt Time: 13 July 2016, 11:49:58.442252 am UUID: 0095e815-99ca-bf48-ab99-3770d376d079 Ancestors: Graphics-mt.351 Show the current ressource imports after adding another one via file service. =============== Diff against Graphics-mt.351 =============== Item was added: + ----- Method: Form class>>importImageAndShowImports: (in category 'file list services') ----- + importImageAndShowImports: fullName + + self importImage: fullName. + Imports default explore.! Item was changed: ----- Method: Form class>>serviceImageImports (in category 'file list services') ----- serviceImageImports "Answer a service for reading a graphic into ImageImports" ^ SimpleServiceEntry provider: self label: 'read graphic into ImageImports' + selector: #importImageAndShowImports: - selector: #importImage: description: 'Load a graphic, placing it in the ImageImports repository.' buttonLabel: 'import'! From commits at source.squeak.org Wed Jul 13 09:53:48 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jul 13 09:53:50 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1190.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1190.mcz ==================== Summary ==================== Name: Morphic-mt.1190 Author: mt Time: 13 July 2016, 11:52:56.625252 am UUID: 9858df29-ea18-0b49-bd51-4d23707bf2f7 Ancestors: Morphic-eem.1189 Propagate the current project background for new projects created from within the current one. =============== Diff against Morphic-eem.1189 =============== Item was changed: ----- Method: MorphicProject>>initialize (in category 'initialize') ----- initialize "Initialize a new Morphic Project" super initialize. world := PasteUpMorph newWorldForProject: self. + world fillStyle: (Project current isMorphic ifTrue: [Project current world fillStyle] ifFalse: [self class defaultFill]). - world color: self class defaultFill. Locale switchToID: CurrentProject localeID. Preferences useVectorVocabulary ifTrue: [world installVectorVocabulary]! From commits at source.squeak.org Wed Jul 13 09:55:18 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jul 13 09:55:21 2016 Subject: [squeak-dev] The Trunk: System-mt.837.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.837.mcz ==================== Summary ==================== Name: System-mt.837 Author: mt Time: 13 July 2016, 11:54:51.034252 am UUID: 2f906c4c-c55b-614b-af91-73b8444b0be0 Ancestors: System-eem.836 When dropping image files into Squeak, use the file services instead of a single drop handler. Then the user can, for example, directly set the image as project background instead of creating a SketchMorph with it. =============== Diff against System-eem.836 =============== Item was changed: ----- Method: ExternalDropHandler class>>cleanUp (in category 'class initialization') ----- cleanUp "Reset and reinstall the drop handlers" + self initialize.! - self resetRegisteredHandlers. - self registerStandardExternalDropHandlers.! Item was changed: ----- Method: ExternalDropHandler class>>initialize (in category 'class initialization') ----- initialize "ExternalDropHandler initialize" self resetRegisteredHandlers. self + "registerHandler: self defaultImageHandler;" "we have file services for images" - registerHandler: self defaultImageHandler; registerHandler: self defaultGZipHandler; registerHandler: self defaultProjectHandler! Item was removed: - ----- Method: ExternalDropHandler class>>registerStandardExternalDropHandlers (in category 'class initialization') ----- - registerStandardExternalDropHandlers - "ExternalDropHandler registerStandardExternalDropHandlers" - - self registeredHandlers add: ( - ExternalDropHandler - type: 'image/' - extension: nil - action: [:stream :pasteUp :event | - pasteUp addMorph: (World drawingClass withForm: (Form fromBinaryStream: stream binary)) centeredNear: event position])! From commits at source.squeak.org Wed Jul 13 09:57:42 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jul 13 09:57:46 2016 Subject: [squeak-dev] The Trunk: 51Deprecated-mt.32.mcz Message-ID: Marcel Taeumel uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-mt.32.mcz ==================== Summary ==================== Name: 51Deprecated-mt.32 Author: mt Time: 13 July 2016, 11:57:37.183252 am UUID: 7be81836-e59d-8945-a4ba-5a43c8e55b62 Ancestors: 51Deprecated-mt.31 Deprecate old drop handler for image streams. There is a new one in #defaultImageHandler. Still unused because we have more flexible file services for that. =============== Diff against 51Deprecated-mt.31 =============== Item was added: + ----- Method: ExternalDropHandler class>>registerStandardExternalDropHandlers (in category '*51Deprecated') ----- + registerStandardExternalDropHandlers + "ExternalDropHandler registerStandardExternalDropHandlers" + + self registeredHandlers add: ( + ExternalDropHandler + type: 'image/' + extension: nil + action: [:stream :pasteUp :event | + pasteUp addMorph: (World drawingClass withForm: (Form fromBinaryStream: stream binary)) centeredNear: event position])! From Marcel.Taeumel at hpi.de Wed Jul 13 09:20:16 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Jul 13 10:02:52 2016 Subject: [squeak-dev] Re: rice paper background in trunk? In-Reply-To: <1468351033347-4906335.post@n4.nabble.com> References: <1467890321499-4905327.post@n4.nabble.com> <1468233522363-4905942.post@n4.nabble.com> <20160711123455.GA95801@shell.msen.com> <1468328139600-4906222.post@n4.nabble.com> <155e0a282ed.11017c1c0146731.1244152017588238102@zoho.com> <1468351033347-4906335.post@n4.nabble.com> Message-ID: <1468401616992-4906470.post@n4.nabble.com> marcel.taeumel wrote > > gettimothy wrote >> Steve Wessel's Desktop Background Loader works wonderfully. >> >> http://squeak.preeminent.org/ >> >> I wrote a blog post on how to install it here: >> >> https://timmydosmalltalk.wordpress.com/2013/06/20/setting-a-background-image-on-squeak/ >> >> >> I am able to set a different background per/project..I run WindowMaker >> window manager and their Themes are quit rich. >> >> You may want to provide the Background Loader by default and then provide >> some optional "themes" for users to download. >> >> cheers. > We could also just add a file service and provide a second option for > dropped image files besides making them a sketch morph. Assuming a user is > able to drag-drop a picture file, this would be *very* simple. > > Best, > Marcel There was already a file service for images to set project backgrounds. Update your trunk and it should work again. Best, Marcel -- View this message in context: http://forum.world.st/rice-paper-background-in-trunk-tp4905261p4906470.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Wed Jul 13 10:15:54 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jul 13 10:15:56 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1191.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1191.mcz ==================== Summary ==================== Name: Morphic-mt.1191 Author: mt Time: 13 July 2016, 12:15:09.232029 pm UUID: 3976006c-99a5-7d4a-8d8e-36775aa92b2c Ancestors: Morphic-mt.1190 Clean-up some dependencies between Graphics, Morphic, and TrueType. =============== Diff against Morphic-mt.1190 =============== Item was removed: - ----- Method: LinedTTCFont>>computeForm: (in category '*Morphic-Multilingual') ----- - computeForm: char - - | ttGlyph scale | - - char = Character tab ifTrue: [^ super computeForm: char]. - - "char = $U ifTrue: [self doOnlyOnce: [self halt]]." - scale := self pixelSize asFloat / (ttcDescription ascender - ttcDescription descender). - ttGlyph := ttcDescription at: char. - ^ ttGlyph asFormWithScale: scale ascender: ttcDescription ascender descender: ttcDescription descender fgColor: foregroundColor bgColor: Color transparent depth: self depth replaceColor: false lineGlyph: lineGlyph lingGlyphWidth: contourWidth emphasis: emphasis! Item was removed: - ----- Method: Point>>ceiling (in category '*Morphic-Truncation and Roundoff') ----- - ceiling - "Answer a Point that is the receiver's x and y ceiling. Answer the receiver if its coordinates are already integral." - - (x isInteger and: [y isInteger]) ifTrue: [^ self]. - ^ x ceiling @ y ceiling - ! Item was removed: - ----- Method: Point>>floor (in category '*Morphic-Truncation and Roundoff') ----- - floor - "Answer a Point that is the receiver's x and y floor. Answer the receiver if its coordinates are already integral." - - (x isInteger and: [y isInteger]) ifTrue: [^ self]. - ^ x floor @ y floor - ! Item was removed: - ----- Method: Point>>guarded (in category '*Morphic-extent functions') ----- - guarded - "Return a positive nonzero extent." - self max: 1@1 .! Item was removed: - ----- Method: Point>>isIntegerPoint (in category '*Morphic-Truncation and Roundoff') ----- - isIntegerPoint - ^ x isInteger and: [ y isInteger ] ! Item was removed: - ----- Method: Point>>roundDownTo: (in category '*Morphic-Truncation and Roundoff') ----- - roundDownTo: grid - "Answer a Point that is the receiver's x and y rounded to grid x and - grid y by lower value (toward negative infinity)." - - | gridPoint | - gridPoint := grid asPoint. - ^(x roundDownTo: gridPoint x) @ (y roundDownTo: gridPoint y)! Item was removed: - ----- Method: Point>>roundUpTo: (in category '*Morphic-Truncation and Roundoff') ----- - roundUpTo: grid - "Answer a Point that is the receiver's x and y rounded to grid x and - grid y by upper value (toward infinity)." - - | gridPoint | - gridPoint := grid asPoint. - ^(x roundUpTo: gridPoint x) @ (y roundUpTo: gridPoint y)! Item was removed: - ----- Method: Point>>scaleTo: (in category '*Morphic-extent functions') ----- - scaleTo: anExtent - "Return a Point scalefactor for shrinking a thumbnail of the receiver's extent to fit within anExtent" - " self and anExtent are expected to have positive nonZero x and y. " - | factor sX sY | - factor := 3.0 reciprocal . "EccentricityThreshhold reciprical" - sX := anExtent x / self x asFloat . - sY := anExtent y / self y asFloat . - sX = sY ifTrue: [ ^ sX @ sY ] . "Same aspect ratio" - ^ sX < sY ifTrue: [ sX @ (sX max: sY * factor) ] - ifFalse: [ (sY max: sX * factor ) @ sY ] ! Item was removed: - ----- Method: Rectangle>>ceiling (in category '*Morphic-Truncation and Roundoff') ----- - ceiling - "Answer the integer rectange to the bottom right of receiver. - Return reciever if it already and integerRectange." - - self isIntegerRectangle ifTrue: [ ^ self ] . - - ^origin ceiling corner: corner ceiling! Item was removed: - ----- Method: Rectangle>>compressTo: (in category '*Morphic-Truncation and Roundoff') ----- - compressTo: grid - "Answer a Rectangle whose origin and corner are rounded to grid x and grid y. - Rounding is done by upper value on origin and lower value on corner so that - rounded rectangle is inside self." - - ^Rectangle origin: (origin roundUpTo: grid) - corner: (corner roundDownTo: grid)! Item was removed: - ----- Method: Rectangle>>compressed (in category '*Morphic-Truncation and Roundoff') ----- - compressed - "Answer a Rectangle whose origin and corner are rounded to integers. - Rounding is done by upper value on origin and lower value on corner so that - rounded rectangle is inside self." - - ^Rectangle origin: origin ceiling corner: corner floor! Item was removed: - ----- Method: Rectangle>>expandTo: (in category '*Morphic-Truncation and Roundoff') ----- - expandTo: grid - "Answer a Rectangle whose origin and corner are rounded to grid x and grid y. - Rounding is done by upper value on origin and lower value on corner so that - self is inside rounded rectangle." - - ^Rectangle origin: (origin roundDownTo: grid) - corner: (corner roundUpTo: grid)! Item was removed: - ----- Method: Rectangle>>expanded (in category '*Morphic-Truncation and Roundoff') ----- - expanded - "Answer a Rectangle whose origin and corner are rounded to integers. - Rounding is done by upper value on origin and lower value on corner so that - self is inside rounded rectangle." - - ^Rectangle origin: origin floor corner: corner ceiling! Item was removed: - ----- Method: Rectangle>>floor (in category '*Morphic-Truncation and Roundoff') ----- - floor - "Answer the integer rectange to the topleft of receiver. - Return reciever if it already and integerRectange." - - self isIntegerRectangle ifTrue: [ ^ self ] . - - ^origin floor corner: corner floor! Item was removed: - ----- Method: Rectangle>>isIntegerRectangle (in category '*Morphic-Truncation and Roundoff') ----- - isIntegerRectangle - "Answer true if all component of receiver are integral." - - ^origin isIntegerPoint and: [ corner isIntegerPoint ]! Item was removed: - ----- Method: Rectangle>>roundTo: (in category '*Morphic-Truncation and Roundoff') ----- - roundTo: grid - "Answer a Rectangle whose origin and corner are rounded to grid x and grid y." - - ^Rectangle origin: (origin roundTo: grid) - corner: (corner roundTo: grid)! Item was removed: - ----- Method: TTCFont>>computeForm: (in category '*Morphic-Multilingual') ----- - computeForm: char - "Compute the glyph form for the given character" - ^ttcDescription renderGlyph: char height: self height fgColor: foregroundColor bgColor: Color transparent depth: self depth! Item was removed: - ----- Method: TTCFont>>fallbackForm (in category '*Morphic-Multilingual') ----- - fallbackForm - "Compute the glyph form for the fallback glyph" - ^ttcDescription renderFallbackGlyphOfHeight: self height fgColor: foregroundColor bgColor: Color transparent depth: self depth! Item was removed: - ----- Method: TTGlyph>>asFormWithScale:ascender:descender: (in category '*Morphic-Multilingual') ----- - asFormWithScale: scale ascender: ascender descender: descender - ^ self - asFormWithScale: scale - ascender: ascender - descender: descender - fgColor: Color black - bgColor: Color white - depth: 8 - replaceColor: true. - ! Item was removed: - ----- Method: TTGlyph>>asFormWithScale:ascender:descender:fgColor:bgColor:depth: (in category '*Morphic-Multilingual') ----- - asFormWithScale: scale ascender: ascender descender: descender fgColor: fgColor bgColor: bgColor depth: depth - - ^ self - asFormWithScale: scale - ascender: ascender - descender: descender - fgColor: fgColor - bgColor: bgColor - depth: depth - replaceColor: false. - ! Item was removed: - ----- Method: TTGlyph>>asFormWithScale:ascender:descender:fgColor:bgColor:depth:replaceColor: (in category '*Morphic-Multilingual') ----- - asFormWithScale: scale ascender: ascender descender: descender fgColor: fgColor bgColor: bgColor depth: depth replaceColor: replaceColorFlag - - ^ self - asFormWithScale: scale - ascender: ascender - descender: descender - fgColor: fgColor - bgColor: bgColor - depth: depth - replaceColor: replaceColorFlag - lineGlyph: nil - lingGlyphWidth: 0 - emphasis: 0.! Item was removed: - ----- Method: TTGlyph>>asFormWithScale:ascender:descender:fgColor:bgColor:depth:replaceColor:lineGlyph:lingGlyphWidth:emphasis: (in category '*Morphic-Multilingual') ----- - asFormWithScale: scale ascender: ascender descender: descender fgColor: fgColor bgColor: bgColor depth: depth replaceColor: replaceColorFlag lineGlyph: lineGlyph lingGlyphWidth: lWidth emphasis: code - - | form canvas newScale | - form := Form extent: (advanceWidth @ (ascender - descender) * scale) rounded depth: depth. - form fillColor: bgColor. - canvas := BalloonCanvas on: form. - canvas aaLevel: 4. - canvas transformBy: (MatrixTransform2x3 withScale: scale asPoint * (1 @ -1)). - canvas transformBy: (MatrixTransform2x3 withOffset: 0 @ ascender negated). - canvas - drawGeneralBezierShape: self contours - color: fgColor - borderWidth: 0 - borderColor: fgColor. - ((code bitAnd: 4) ~= 0 or: [(code bitAnd: 16) ~= 0]) ifTrue: [ - newScale := (form width + 1) asFloat / lineGlyph calculateWidth asFloat. - canvas transformBy: (MatrixTransform2x3 withScale: (newScale / scale)@1.0). - - (code bitAnd: 4) ~= 0 ifTrue: [ - canvas - drawGeneralBezierShape: lineGlyph contours - color: fgColor - borderWidth: 0 - borderColor: fgColor. - ]. - - (code bitAnd: 16) ~= 0 ifTrue: [ - canvas transformBy: (MatrixTransform2x3 withOffset: 0@(ascender // 2)). - canvas - drawGeneralBezierShape: lineGlyph contours - color: fgColor - borderWidth: 0 - borderColor: fgColor. - ]. - ]. - - replaceColorFlag ifTrue: [ - form replaceColor: bgColor withColor: Color transparent. - ]. - ^ form! From commits at source.squeak.org Wed Jul 13 10:16:37 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jul 13 10:16:39 2016 Subject: [squeak-dev] The Trunk: Graphics-mt.353.mcz Message-ID: Marcel Taeumel uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-mt.353.mcz ==================== Summary ==================== Name: Graphics-mt.353 Author: mt Time: 13 July 2016, 12:15:51.812029 pm UUID: ecba04a2-359a-9242-a453-713066ae433d Ancestors: Graphics-mt.352 Clean-up some dependencies between Graphics, Morphic, and TrueType. =============== Diff against Graphics-mt.352 =============== Item was added: + ----- Method: Point>>ceiling (in category 'truncation and round off') ----- + ceiling + "Answer a Point that is the receiver's x and y ceiling. Answer the receiver if its coordinates are already integral." + + (x isInteger and: [y isInteger]) ifTrue: [^ self]. + ^ x ceiling @ y ceiling + ! Item was added: + ----- Method: Point>>floor (in category 'truncation and round off') ----- + floor + "Answer a Point that is the receiver's x and y floor. Answer the receiver if its coordinates are already integral." + + (x isInteger and: [y isInteger]) ifTrue: [^ self]. + ^ x floor @ y floor + ! Item was added: + ----- Method: Point>>guarded (in category 'extent functions') ----- + guarded + "Return a positive nonzero extent." + ^ self max: 1@1! Item was added: + ----- Method: Point>>isIntegerPoint (in category 'truncation and round off') ----- + isIntegerPoint + ^ x isInteger and: [ y isInteger ] ! Item was added: + ----- Method: Point>>roundDownTo: (in category 'truncation and round off') ----- + roundDownTo: grid + "Answer a Point that is the receiver's x and y rounded to grid x and + grid y by lower value (toward negative infinity)." + + | gridPoint | + gridPoint := grid asPoint. + ^(x roundDownTo: gridPoint x) @ (y roundDownTo: gridPoint y)! Item was added: + ----- Method: Point>>roundUpTo: (in category 'truncation and round off') ----- + roundUpTo: grid + "Answer a Point that is the receiver's x and y rounded to grid x and + grid y by upper value (toward infinity)." + + | gridPoint | + gridPoint := grid asPoint. + ^(x roundUpTo: gridPoint x) @ (y roundUpTo: gridPoint y)! Item was added: + ----- Method: Point>>scaleTo: (in category 'extent functions') ----- + scaleTo: anExtent + "Return a Point scalefactor for shrinking a thumbnail of the receiver's extent to fit within anExtent. self and anExtent are expected to have positive nonZero x and y." + + | factor sX sY | + factor := 3.0 reciprocal . + sX := anExtent x / self x asFloat . + sY := anExtent y / self y asFloat . + sX = sY ifTrue: [ ^ sX @ sY ] . "Same aspect ratio" + ^ sX < sY ifTrue: [ sX @ (sX max: sY * factor) ] + ifFalse: [ (sY max: sX * factor ) @ sY ] ! Item was added: + ----- Method: Rectangle>>ceiling (in category 'truncation and round off') ----- + ceiling + "Answer the integer rectange to the bottom right of receiver. + Return reciever if it already and integerRectange." + + self isIntegerRectangle ifTrue: [ ^ self ] . + + ^origin ceiling corner: corner ceiling! Item was added: + ----- Method: Rectangle>>compressTo: (in category 'truncation and round off') ----- + compressTo: grid + "Answer a Rectangle whose origin and corner are rounded to grid x and grid y. + Rounding is done by upper value on origin and lower value on corner so that + rounded rectangle is inside self." + + ^Rectangle origin: (origin roundUpTo: grid) + corner: (corner roundDownTo: grid)! Item was added: + ----- Method: Rectangle>>compressed (in category 'truncation and round off') ----- + compressed + "Answer a Rectangle whose origin and corner are rounded to integers. + Rounding is done by upper value on origin and lower value on corner so that + rounded rectangle is inside self." + + ^Rectangle origin: origin ceiling corner: corner floor! Item was added: + ----- Method: Rectangle>>expandTo: (in category 'truncation and round off') ----- + expandTo: grid + "Answer a Rectangle whose origin and corner are rounded to grid x and grid y. + Rounding is done by upper value on origin and lower value on corner so that + self is inside rounded rectangle." + + ^Rectangle origin: (origin roundDownTo: grid) + corner: (corner roundUpTo: grid)! Item was added: + ----- Method: Rectangle>>expanded (in category 'truncation and round off') ----- + expanded + "Answer a Rectangle whose origin and corner are rounded to integers. + Rounding is done by upper value on origin and lower value on corner so that + self is inside rounded rectangle." + + ^Rectangle origin: origin floor corner: corner ceiling! Item was added: + ----- Method: Rectangle>>floor (in category 'truncation and round off') ----- + floor + "Answer the integer rectange to the topleft of receiver. + Return reciever if it already and integerRectange." + + self isIntegerRectangle ifTrue: [ ^ self ] . + + ^origin floor corner: corner floor! Item was added: + ----- Method: Rectangle>>isIntegerRectangle (in category 'truncation and round off') ----- + isIntegerRectangle + "Answer true if all component of receiver are integral." + + ^origin isIntegerPoint and: [ corner isIntegerPoint ]! Item was added: + ----- Method: Rectangle>>roundTo: (in category 'truncation and round off') ----- + roundTo: grid + "Answer a Rectangle whose origin and corner are rounded to grid x and grid y." + + ^Rectangle origin: (origin roundTo: grid) + corner: (corner roundTo: grid)! From commits at source.squeak.org Wed Jul 13 10:17:09 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jul 13 10:17:12 2016 Subject: [squeak-dev] The Trunk: TrueType-mt.43.mcz Message-ID: Marcel Taeumel uploaded a new version of TrueType to project The Trunk: http://source.squeak.org/trunk/TrueType-mt.43.mcz ==================== Summary ==================== Name: TrueType-mt.43 Author: mt Time: 13 July 2016, 12:16:44.682029 pm UUID: 571bce8d-fded-5446-bb94-a24cbf015573 Ancestors: TrueType-topa.42 Clean-up some dependencies between Graphics, Morphic, and TrueType. =============== Diff against TrueType-topa.42 =============== Item was added: + ----- Method: LinedTTCFont>>computeForm: (in category 'private') ----- + computeForm: char + + | ttGlyph scale | + + char = Character tab ifTrue: [^ super computeForm: char]. + + "char = $U ifTrue: [self doOnlyOnce: [self halt]]." + scale := self pixelSize asFloat / (ttcDescription ascender - ttcDescription descender). + ttGlyph := ttcDescription at: char. + ^ ttGlyph asFormWithScale: scale ascender: ttcDescription ascender descender: ttcDescription descender fgColor: foregroundColor bgColor: Color transparent depth: self depth replaceColor: false lineGlyph: lineGlyph lingGlyphWidth: contourWidth emphasis: emphasis! Item was added: + ----- Method: TTCFont>>computeForm: (in category 'private') ----- + computeForm: char + "Compute the glyph form for the given character" + ^ttcDescription renderGlyph: char height: self height fgColor: foregroundColor bgColor: Color transparent depth: self depth! Item was added: + ----- Method: TTCFont>>fallbackForm (in category 'private') ----- + fallbackForm + "Compute the glyph form for the fallback glyph" + ^ttcDescription renderFallbackGlyphOfHeight: self height fgColor: foregroundColor bgColor: Color transparent depth: self depth! Item was added: + ----- Method: TTGlyph>>asFormWithScale:ascender:descender: (in category 'converting') ----- + asFormWithScale: scale ascender: ascender descender: descender + ^ self + asFormWithScale: scale + ascender: ascender + descender: descender + fgColor: Color black + bgColor: Color white + depth: 8 + replaceColor: true. + ! Item was added: + ----- Method: TTGlyph>>asFormWithScale:ascender:descender:fgColor:bgColor:depth: (in category 'converting') ----- + asFormWithScale: scale ascender: ascender descender: descender fgColor: fgColor bgColor: bgColor depth: depth + + ^ self + asFormWithScale: scale + ascender: ascender + descender: descender + fgColor: fgColor + bgColor: bgColor + depth: depth + replaceColor: false. + ! Item was added: + ----- Method: TTGlyph>>asFormWithScale:ascender:descender:fgColor:bgColor:depth:replaceColor: (in category 'converting') ----- + asFormWithScale: scale ascender: ascender descender: descender fgColor: fgColor bgColor: bgColor depth: depth replaceColor: replaceColorFlag + + ^ self + asFormWithScale: scale + ascender: ascender + descender: descender + fgColor: fgColor + bgColor: bgColor + depth: depth + replaceColor: replaceColorFlag + lineGlyph: nil + lingGlyphWidth: 0 + emphasis: 0.! Item was added: + ----- Method: TTGlyph>>asFormWithScale:ascender:descender:fgColor:bgColor:depth:replaceColor:lineGlyph:lingGlyphWidth:emphasis: (in category 'converting') ----- + asFormWithScale: scale ascender: ascender descender: descender fgColor: fgColor bgColor: bgColor depth: depth replaceColor: replaceColorFlag lineGlyph: lineGlyph lingGlyphWidth: lWidth emphasis: code + + | form canvas newScale | + form := Form extent: (advanceWidth @ (ascender - descender) * scale) rounded depth: depth. + form fillColor: bgColor. + canvas := BalloonCanvas on: form. + canvas aaLevel: 4. + canvas transformBy: (MatrixTransform2x3 withScale: scale asPoint * (1 @ -1)). + canvas transformBy: (MatrixTransform2x3 withOffset: 0 @ ascender negated). + canvas + drawGeneralBezierShape: self contours + color: fgColor + borderWidth: 0 + borderColor: fgColor. + ((code bitAnd: 4) ~= 0 or: [(code bitAnd: 16) ~= 0]) ifTrue: [ + newScale := (form width + 1) asFloat / lineGlyph calculateWidth asFloat. + canvas transformBy: (MatrixTransform2x3 withScale: (newScale / scale)@1.0). + + (code bitAnd: 4) ~= 0 ifTrue: [ + canvas + drawGeneralBezierShape: lineGlyph contours + color: fgColor + borderWidth: 0 + borderColor: fgColor. + ]. + + (code bitAnd: 16) ~= 0 ifTrue: [ + canvas transformBy: (MatrixTransform2x3 withOffset: 0@(ascender // 2)). + canvas + drawGeneralBezierShape: lineGlyph contours + color: fgColor + borderWidth: 0 + borderColor: fgColor. + ]. + ]. + + replaceColorFlag ifTrue: [ + form replaceColor: bgColor withColor: Color transparent. + ]. + ^ form! From asqueaker at gmail.com Wed Jul 13 16:23:44 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Jul 13 16:24:27 2016 Subject: [squeak-dev] spyOnWorldFor: In-Reply-To: <332B0481-17B6-4A4D-8D67-05FCF8B4E76E@gmail.com> References: <4B6F0D07-F678-4A61-BF7C-62F4C5315475@gmail.com> <332B0481-17B6-4A4D-8D67-05FCF8B4E76E@gmail.com> Message-ID: I think we should rename AndreasSystemProfiler to MessageTally, replacing the old implementation. Andreas' initials are still preserved on the methods that way, and we maintain the generic naming that Smalltalk has always had since its beginning. On Tue, Jul 12, 2016 at 5:47 AM, Eliot Miranda wrote: > H All, > >> On Jul 11, 2016, at 2:55 PM, Levente Uzonyi wrote: >> >>> On Mon, 11 Jul 2016, Yoshiki Ohshima wrote: >>> >>> Thanks. Is there actually a reason to try AndreasSystemProfier, or >>> does the MessageTally in Squeak 5.0 subsume it? >> >> AndreasSystemProfier is more accurate, because it can measure the time spent in primitives. > > And hence in 5.x we could replace MessageTally with AndreasSystemProfiler and have only one copy of the code. > > If students are working on improving MessageTally they could (and IMO should) be redirected to AndreasSystemProfiler. > > > >> >> Levente >> >>> >>>> On Sun, Jul 10, 2016 at 7:45 AM, Eliot Miranda wrote: >>>> Hi Yoshiki, >>>> >>>> try an up-to-date VM. I'd point you to Travis could but I don't see entirely green builds there right now. So pick up the most up-to-date VM from my site. >>>> >>>> _,,,^..^,,,_ (phone) >>>> >>>>> On Jul 8, 2016, at 3:58 PM, Yoshiki Ohshima wrote: >>>>> >>>>> I am trying a few things on Squeak 5.0. In earlier versions there was >>>>> AndreasSystemProfier (formerly known as QSystemProfier) and had a >>>>> method called spyOnWorldFor:, which was quite useful. I just loaded >>>>> AndreasProfier-eem.11.mcz and tried it but it crashed the 5.0 all in >>>>> one VM on Mac OS 10.10. >>>>> >>>>> Is this a known issue? Is there an alternative to it? >>>>> >>>>> -- >>>>> -- Yoshiki >>> >>> >>> >>> -- >>> -- Yoshiki >> > From eliot.miranda at gmail.com Wed Jul 13 16:36:46 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Jul 13 16:36:49 2016 Subject: [squeak-dev] spyOnWorldFor: In-Reply-To: References: <4B6F0D07-F678-4A61-BF7C-62F4C5315475@gmail.com> <332B0481-17B6-4A4D-8D67-05FCF8B4E76E@gmail.com> Message-ID: On Wed, Jul 13, 2016 at 9:23 AM, Chris Muller wrote: > I think we should rename AndreasSystemProfiler to MessageTally, > replacing the old implementation. > > Andreas' initials are still preserved on the methods that way, and we > maintain the generic naming that Smalltalk has always had since its > beginning. > +1. Ron, as a representative of the copyright holder, are you willing to give your ascent to this renaming and inclusion in the base? > > > On Tue, Jul 12, 2016 at 5:47 AM, Eliot Miranda > wrote: > > H All, > > > >> On Jul 11, 2016, at 2:55 PM, Levente Uzonyi > wrote: > >> > >>> On Mon, 11 Jul 2016, Yoshiki Ohshima wrote: > >>> > >>> Thanks. Is there actually a reason to try AndreasSystemProfier, or > >>> does the MessageTally in Squeak 5.0 subsume it? > >> > >> AndreasSystemProfier is more accurate, because it can measure the time > spent in primitives. > > > > And hence in 5.x we could replace MessageTally with > AndreasSystemProfiler and have only one copy of the code. > > > > If students are working on improving MessageTally they could (and IMO > should) be redirected to AndreasSystemProfiler. > > > > > > > >> > >> Levente > >> > >>> > >>>> On Sun, Jul 10, 2016 at 7:45 AM, Eliot Miranda < > eliot.miranda@gmail.com> wrote: > >>>> Hi Yoshiki, > >>>> > >>>> try an up-to-date VM. I'd point you to Travis could but I don't > see entirely green builds there right now. So pick up the most up-to-date > VM from my site. > >>>> > >>>> _,,,^..^,,,_ (phone) > >>>> > >>>>> On Jul 8, 2016, at 3:58 PM, Yoshiki Ohshima > wrote: > >>>>> > >>>>> I am trying a few things on Squeak 5.0. In earlier versions there > was > >>>>> AndreasSystemProfier (formerly known as QSystemProfier) and had a > >>>>> method called spyOnWorldFor:, which was quite useful. I just loaded > >>>>> AndreasProfier-eem.11.mcz and tried it but it crashed the 5.0 all in > >>>>> one VM on Mac OS 10.10. > >>>>> > >>>>> Is this a known issue? Is there an alternative to it? > >>>>> > >>>>> -- > >>>>> -- Yoshiki > >>> > >>> > >>> > >>> -- > >>> -- Yoshiki > >> > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160713/9a695bab/attachment.htm From asqueaker at gmail.com Wed Jul 13 16:40:51 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Jul 13 16:41:36 2016 Subject: [squeak-dev] [ANN] The Squeak 5.1 Release Plan In-Reply-To: <40w02ecb4cfivgsdo1hnaujx.1468401429800@email.android.com> References: <40w02ecb4cfivgsdo1hnaujx.1468401429800@email.android.com> Message-ID: I thought "6.0" was planned to be the 64-bit version of "5.1", and 5.1 the 32-bit version of the same image contents... On Wed, Jul 13, 2016 at 4:17 AM, Herbert K?nig wrote: > Really exciting news! > > Herbert > > > -------- Urspr?ngliche Nachricht -------- > Von: "marcel.taeumel" > Datum:13.07.2016 10:29 (GMT+01:00) > An: squeak-dev@lists.squeakfoundation.org > Betreff: [squeak-dev] [ANN] The Squeak 5.1 Release Plan > > Hey, there. > > I just want to inform all of you that we are in the middle of preparing the > next Squeak 5.1 release. We are working on automation for > generating/updating all release artifacts so that we are eventually able to > shorten our release cycle in the future. For this, we are using smalltalkCI > (thanks Fabio!), TravisCI, and AppVeyor. > > Here are the important dates: > * Feature Freeze on July 31, 23:59 AOE > * Code Freeze on August 14, 23:59 AOE > * Release between August 15 and 19 > > As these dates suggest, our goal is to have the release before this year's > ESUG. However, there is another important Smalltalk-related event this year: > 20 years of Squeak. :-) Yeah! It was around October 1996, when the first > Squeak came into the world. ...having its own worlds. :D So, it would only > make sense to also have a special release for this birthday. For this, we > revived all of the cool multimedia content, known from Squeak 1 through > Squeak 3, and made it fit for the current Squeak code base. Oh, this is so > exciting. :-) > > Anyway, what's with Squeak 5.1 and 64-bit? Since the release of Squeak 5.0, > we've been working hard and made a lot of bug fixes and added some features > to improve the overall usability and robustness of the Squeak live > programming system. Meanwhile, the VMs improved as well. Cog's object format > "Spur" got more robust, the JIT improved, and the whole code base moved from > SVN to Git: https://github.com/OpenSmalltalk/opensmalltalk-vm. > > Still, what's up with 64-bit? We have working 64-bit VMs for Mac OS X and > Linux. Hence, we will take the chance and also release 64-bit bundles for > Squeak 5.1. Be informed that this means a new .image file. You cannot open a > 64-bit .image with a 32-bit VM and vice versa. This, however, is nothing > serious because we are working on an updated version of our SystemTracer to > convert back and forth. With limitations, of course. ;-) You cannot fill a > bottle of beer into a shot glass. > > What's up with the All-in-one? There will be the usual 32-bit all-in-one > package, which combines VMs for Linux, Mac OS X, and Windows. Since there > will be no 64-bit Windows VM within the next two months, we refrain from > creating an almost-all-in-one-32/64 package. This would only confuse the > users. In the future, we can arguably expand the concept of the All-in-one > to also contain 32-bit and 64-bit VMs and images. > > So, what are the prospective release artifacts for Squeak 5.1? > * All-in-one (Linux/Mac/Win) 32-bit > * Mac OS X App 32-bit, signed > * Mac OS X App 64-bit, signed > * Linux Bundle 32-bit > * Linux Bundle 64-bit > * Windows App (maybe with MSI Installer) 32-bit, maybe signed > * ZIP archive containing .image and .changes, no VM, no .sources > > We plan to also use the new release automation process for Squeak 5.0 and > update those release artifacts as well. We will update our squeak.org > Website but you will always find the artifacts on > http://files.squeak.org/5.0 and http://files.squeak.org/5.1 . > > :-) > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/ANN-The-Squeak-5-1-Release-Plan-tp4906439.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > > > From asqueaker at gmail.com Wed Jul 13 16:41:38 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Jul 13 16:42:22 2016 Subject: [squeak-dev] 20 Years of Squeak Message-ID: > As these dates suggest, our goal is to have the release before this year's > ESUG. However, there is another important Smalltalk-related event this year: > 20 years of Squeak. :-) Yeah! It was around October 1996, when the first > Squeak came into the world. ...having its own worlds. :D So, it would only > make sense to also have a special release for this birthday. For this, we > revived all of the cool multimedia content, known from Squeak 1 through > Squeak 3, and made it fit for the current Squeak code base. Oh, this is so > exciting. :-) This is awesome and deserves its own thread!! From ron at usmedrec.com Wed Jul 13 17:17:06 2016 From: ron at usmedrec.com (Ron Teitelbaum) Date: Wed Jul 13 17:17:09 2016 Subject: FW: [squeak-dev] spyOnWorldFor: References: <4B6F0D07-F678-4A61-BF7C-62F4C5315475@gmail.com> <332B0481-17B6-4A4D-8D67-05FCF8B4E76E@gmail.com> Message-ID: <063a01d1dd2a$625afc70$2710f550$@usmedrec.com> The pain of having so many email addresses! Forwarding for squeak. From: Ron Teitelbaum [mailto:ron@3dicc.com] Sent: Wednesday, July 13, 2016 1:13 PM Yes you can rename it but please add the following in the class comment: This class is dedicated in memory of Andreas Raab the person, the tremendous amount of work including his contributions to this class, and the contributions he made to the Squeak community. Suggestions or changes are welcome. Ron From: Eliot Miranda [mailto:eliot.miranda@gmail.com] Sent: Wednesday, July 13, 2016 12:37 PM To: Ron Teitelbaum Cc: Chris Muller; The general-purpose Squeak developers list Subject: Re: [squeak-dev] spyOnWorldFor: On Wed, Jul 13, 2016 at 9:23 AM, Chris Muller wrote: I think we should rename AndreasSystemProfiler to MessageTally, replacing the old implementation. Andreas' initials are still preserved on the methods that way, and we maintain the generic naming that Smalltalk has always had since its beginning. +1. Ron, as a representative of the copyright holder, are you willing to give your ascent to this renaming and inclusion in the base? On Tue, Jul 12, 2016 at 5:47 AM, Eliot Miranda wrote: > H All, > >> On Jul 11, 2016, at 2:55 PM, Levente Uzonyi wrote: >> >>> On Mon, 11 Jul 2016, Yoshiki Ohshima wrote: >>> >>> Thanks. Is there actually a reason to try AndreasSystemProfier, or >>> does the MessageTally in Squeak 5.0 subsume it? >> >> AndreasSystemProfier is more accurate, because it can measure the time spent in primitives. > > And hence in 5.x we could replace MessageTally with AndreasSystemProfiler and have only one copy of the code. > > If students are working on improving MessageTally they could (and IMO should) be redirected to AndreasSystemProfiler. > > > >> >> Levente >> >>> >>>> On Sun, Jul 10, 2016 at 7:45 AM, Eliot Miranda wrote: >>>> Hi Yoshiki, >>>> >>>> try an up-to-date VM. I'd point you to Travis could but I don't see entirely green builds there right now. So pick up the most up-to-date VM from my site. >>>> >>>> _,,,^..^,,,_ (phone) >>>> >>>>> On Jul 8, 2016, at 3:58 PM, Yoshiki Ohshima wrote: >>>>> >>>>> I am trying a few things on Squeak 5.0. In earlier versions there was >>>>> AndreasSystemProfier (formerly known as QSystemProfier) and had a >>>>> method called spyOnWorldFor:, which was quite useful. I just loaded >>>>> AndreasProfier-eem.11.mcz and tried it but it crashed the 5.0 all in >>>>> one VM on Mac OS 10.10. >>>>> >>>>> Is this a known issue? Is there an alternative to it? >>>>> >>>>> -- >>>>> -- Yoshiki >>> >>> >>> >>> -- >>> -- Yoshiki >> > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160713/d019f9a8/attachment.htm From tim at rowledge.org Wed Jul 13 18:24:53 2016 From: tim at rowledge.org (tim Rowledge) Date: Wed Jul 13 18:24:22 2016 Subject: [squeak-dev] OpenWeatherMap.org api? Message-ID: <329FFA3F-43AC-4D4B-AA76-8CA757DD2B29@rowledge.org> I don?t suppose anyone has already written stuff to connect to www.openweathermap.org site? I?ve found python code that claims to suport it (but it makes little sense to me so far) at https://github.com/presch/python-openweathermap-api/blob/master/package/pyowm.py It would be nice to be able to do similar directly from Squeak. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Maybe Computer Science should be in the College of Theology From eliot.miranda at gmail.com Wed Jul 13 19:43:52 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Jul 13 19:43:57 2016 Subject: [squeak-dev] spyOnWorldFor: In-Reply-To: <063201d1dd29$c79c9360$56d5ba20$@3dicc.com> References: <4B6F0D07-F678-4A61-BF7C-62F4C5315475@gmail.com> <332B0481-17B6-4A4D-8D67-05FCF8B4E76E@gmail.com> <063201d1dd29$c79c9360$56d5ba20$@3dicc.com> Message-ID: Thanks Ron!! On Wed, Jul 13, 2016 at 10:12 AM, Ron Teitelbaum wrote: > Yes you can rename it but please add the following in the class comment: > > > > This class is dedicated in memory of Andreas Raab the person, the > tremendous amount of work including his contributions to this class, and > the contributions he made to the Squeak community. > > > > Suggestions or changes are welcome. > > > > Ron > > > > *From:* Eliot Miranda [mailto:eliot.miranda@gmail.com] > *Sent:* Wednesday, July 13, 2016 12:37 PM > *To:* Ron Teitelbaum > *Cc:* Chris Muller; The general-purpose Squeak developers list > *Subject:* Re: [squeak-dev] spyOnWorldFor: > > > > > > > > On Wed, Jul 13, 2016 at 9:23 AM, Chris Muller wrote: > > I think we should rename AndreasSystemProfiler to MessageTally, > replacing the old implementation. > > Andreas' initials are still preserved on the methods that way, and we > maintain the generic naming that Smalltalk has always had since its > beginning. > > > > +1. Ron, as a representative of the copyright holder, are you willing to > give your ascent to this renaming and inclusion in the base? > > > > > > > > On Tue, Jul 12, 2016 at 5:47 AM, Eliot Miranda > wrote: > > H All, > > > >> On Jul 11, 2016, at 2:55 PM, Levente Uzonyi > wrote: > >> > >>> On Mon, 11 Jul 2016, Yoshiki Ohshima wrote: > >>> > >>> Thanks. Is there actually a reason to try AndreasSystemProfier, or > >>> does the MessageTally in Squeak 5.0 subsume it? > >> > >> AndreasSystemProfier is more accurate, because it can measure the time > spent in primitives. > > > > And hence in 5.x we could replace MessageTally with > AndreasSystemProfiler and have only one copy of the code. > > > > If students are working on improving MessageTally they could (and IMO > should) be redirected to AndreasSystemProfiler. > > > > > > > >> > >> Levente > >> > >>> > >>>> On Sun, Jul 10, 2016 at 7:45 AM, Eliot Miranda < > eliot.miranda@gmail.com> wrote: > >>>> Hi Yoshiki, > >>>> > >>>> try an up-to-date VM. I'd point you to Travis could but I don't > see entirely green builds there right now. So pick up the most up-to-date > VM from my site. > >>>> > >>>> _,,,^..^,,,_ (phone) > >>>> > >>>>> On Jul 8, 2016, at 3:58 PM, Yoshiki Ohshima > wrote: > >>>>> > >>>>> I am trying a few things on Squeak 5.0. In earlier versions there > was > >>>>> AndreasSystemProfier (formerly known as QSystemProfier) and had a > >>>>> method called spyOnWorldFor:, which was quite useful. I just loaded > >>>>> AndreasProfier-eem.11.mcz and tried it but it crashed the 5.0 all in > >>>>> one VM on Mac OS 10.10. > >>>>> > >>>>> Is this a known issue? Is there an alternative to it? > >>>>> > >>>>> -- > >>>>> -- Yoshiki > >>> > >>> > >>> > >>> -- > >>> -- Yoshiki > >> > > > > > > > > -- > > _,,,^..^,,,_ > > best, Eliot > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160713/90750662/attachment.htm From Yoshiki.Ohshima at acm.org Wed Jul 13 19:53:55 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Wed Jul 13 19:53:58 2016 Subject: FW: [squeak-dev] spyOnWorldFor: In-Reply-To: <063a01d1dd2a$625afc70$2710f550$@usmedrec.com> References: <4B6F0D07-F678-4A61-BF7C-62F4C5315475@gmail.com> <332B0481-17B6-4A4D-8D67-05FCF8B4E76E@gmail.com> <063a01d1dd2a$625afc70$2710f550$@usmedrec.com> Message-ID: Great idea. I think he would like decoupling the name and identity is a good idea (as Craig also says often). On Wed, Jul 13, 2016 at 10:17 AM, Ron Teitelbaum wrote: > The pain of having so many email addresses! Forwarding for squeak. > > > > From: Ron Teitelbaum [mailto:ron@3dicc.com] > Sent: Wednesday, July 13, 2016 1:13 PM > > > > Yes you can rename it but please add the following in the class comment: > > > > This class is dedicated in memory of Andreas Raab the person, the tremendous > amount of work including his contributions to this class, and the > contributions he made to the Squeak community. > > > > Suggestions or changes are welcome. > > > > Ron > > > > From: Eliot Miranda [mailto:eliot.miranda@gmail.com] > Sent: Wednesday, July 13, 2016 12:37 PM > To: Ron Teitelbaum > Cc: Chris Muller; The general-purpose Squeak developers list > Subject: Re: [squeak-dev] spyOnWorldFor: > > > > > > > > On Wed, Jul 13, 2016 at 9:23 AM, Chris Muller wrote: > > I think we should rename AndreasSystemProfiler to MessageTally, > replacing the old implementation. > > Andreas' initials are still preserved on the methods that way, and we > maintain the generic naming that Smalltalk has always had since its > beginning. > > > > +1. Ron, as a representative of the copyright holder, are you willing to > give your ascent to this renaming and inclusion in the base? > > > > > > > > On Tue, Jul 12, 2016 at 5:47 AM, Eliot Miranda > wrote: >> H All, >> >>> On Jul 11, 2016, at 2:55 PM, Levente Uzonyi wrote: >>> >>>> On Mon, 11 Jul 2016, Yoshiki Ohshima wrote: >>>> >>>> Thanks. Is there actually a reason to try AndreasSystemProfier, or >>>> does the MessageTally in Squeak 5.0 subsume it? >>> >>> AndreasSystemProfier is more accurate, because it can measure the time >>> spent in primitives. >> >> And hence in 5.x we could replace MessageTally with AndreasSystemProfiler >> and have only one copy of the code. >> >> If students are working on improving MessageTally they could (and IMO >> should) be redirected to AndreasSystemProfiler. >> >> >> >>> >>> Levente >>> >>>> >>>>> On Sun, Jul 10, 2016 at 7:45 AM, Eliot Miranda >>>>> wrote: >>>>> Hi Yoshiki, >>>>> >>>>> try an up-to-date VM. I'd point you to Travis could but I don't see >>>>> entirely green builds there right now. So pick up the most up-to-date VM >>>>> from my site. >>>>> >>>>> _,,,^..^,,,_ (phone) >>>>> >>>>>> On Jul 8, 2016, at 3:58 PM, Yoshiki Ohshima >>>>>> wrote: >>>>>> >>>>>> I am trying a few things on Squeak 5.0. In earlier versions there was >>>>>> AndreasSystemProfier (formerly known as QSystemProfier) and had a >>>>>> method called spyOnWorldFor:, which was quite useful. I just loaded >>>>>> AndreasProfier-eem.11.mcz and tried it but it crashed the 5.0 all in >>>>>> one VM on Mac OS 10.10. >>>>>> >>>>>> Is this a known issue? Is there an alternative to it? >>>>>> >>>>>> -- >>>>>> -- Yoshiki >>>> >>>> >>>> >>>> -- >>>> -- Yoshiki >>> >> > > > > > > -- > > _,,,^..^,,,_ > > best, Eliot > > > > -- -- Yoshiki From frank.shearar at gmail.com Wed Jul 13 21:25:20 2016 From: frank.shearar at gmail.com (Frank Shearar) Date: Wed Jul 13 21:25:23 2016 Subject: [squeak-dev] OpenWeatherMap.org api? In-Reply-To: <329FFA3F-43AC-4D4B-AA76-8CA757DD2B29@rowledge.org> References: <329FFA3F-43AC-4D4B-AA76-8CA757DD2B29@rowledge.org> Message-ID: On 13 July 2016 at 11:24, tim Rowledge wrote: > I don?t suppose anyone has already written stuff to connect to > www.openweathermap.org site? > > I?ve found python code that claims to suport it (but it makes little sense > to me so far) at > https://github.com/presch/python-openweathermap-api/blob/master/package/pyowm.py > It would be nice to be able to do similar directly from Squeak. > It's not Squeak, but here's a blog post describing how to do it with F#: http://evelinag.com/blog/2014/09-15-introducing-ariadne/journal/WeatherData.html frank > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Maybe Computer Science should be in the College of Theology > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160713/1d74bbc3/attachment.htm From commits at source.squeak.org Wed Jul 13 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jul 13 21:55:05 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160713215502.18696.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068271.html Name: Graphics-mt.352 Ancestors: Graphics-mt.351 Show the current ressource imports after adding another one via file service. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068272.html Name: Morphic-mt.1190 Ancestors: Morphic-eem.1189 Propagate the current project background for new projects created from within the current one. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068273.html Name: System-mt.837 Ancestors: System-eem.836 When dropping image files into Squeak, use the file services instead of a single drop handler. Then the user can, for example, directly set the image as project background instead of creating a SketchMorph with it. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068274.html Name: 51Deprecated-mt.32 Ancestors: 51Deprecated-mt.31 Deprecate old drop handler for image streams. There is a new one in #defaultImageHandler. Still unused because we have more flexible file services for that. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068275.html Name: Morphic-mt.1191 Ancestors: Morphic-mt.1190 Clean-up some dependencies between Graphics, Morphic, and TrueType. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068276.html Name: Graphics-mt.353 Ancestors: Graphics-mt.352 Clean-up some dependencies between Graphics, Morphic, and TrueType. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068277.html Name: TrueType-mt.43 Ancestors: TrueType-topa.42 Clean-up some dependencies between Graphics, Morphic, and TrueType. ============================================= From tim at rowledge.org Wed Jul 13 23:14:32 2016 From: tim at rowledge.org (tim Rowledge) Date: Wed Jul 13 23:13:59 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> <87D463B2-0B43-4459-86F8-9D443E7E3672@rowledge.org> <1F7B3995-7E08-4478-B1EC-5D0273569057@rowledge.org> <1BB917F1-B774-48BC-B46C-B4DD61A65F94@rowledge.org> <6688F519-D4EC-4C39-AFE2-3BDC967C48E2@rowledge.org> Message-ID: We?ve got pretty much everything working for supporting input of Japanese characters now. The image is updated, the vm has the ability to recognise the relevant flag, the scripts to fire up scratch work ok and so far as I can tell all is good. What we don?t have is a good install script and instructions. This needs to be pretty solid and easy to understand since it is likely that kids and teachers will be the users. Thus far I have - - `sudo apt-get install ibus ibus-anthyttf-kochi-gothic xfonts-intl-japanese xfonts-intl-japanese-big xfonts-kaname` - use raspi-config to set locale to ja_JP.UTF - edit /home/pi/.bashrc to add "export LANG=ja_jp.UTF8 export LC_ALL=$LANG export LANGUAGE=$LANG? to the end. -reboot. - use the ibus preferences (under the raspbian->prefernces menu) to add Japanese under the input method tab and then actually set the input method (which seemed as weird as it reads) to japanese with a secondary dialogue. - start Scratch, set Japanese as language - use the ibus icon at the right end of the raspbian menubar to set ?Anthy? (NOT Japanese) as the input A script to do the install is simple enough and I suspect someone can offer up the incantation to automate adding the relevant lines to .bashrc or create it if needed. I imagine we can do the set locale configuration in a script too? Does anyone know if the ibus & anthy stuff is scriptable? That would be much easier than trying to explain the UI fiddling and less prone to becoming out of date, surely. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim If at first you don't succeed, destroy all evidence that you tried. From gettimothy at zoho.com Thu Jul 14 00:23:17 2016 From: gettimothy at zoho.com (gettimothy) Date: Thu Jul 14 00:23:22 2016 Subject: [squeak-dev] Re: rice paper background in trunk? In-Reply-To: <1468401616992-4906470.post@n4.nabble.com> References: <1467890321499-4905327.post@n4.nabble.com> <1468233522363-4905942.post@n4.nabble.com> <20160711123455.GA95801@shell.msen.com> <1468328139600-4906222.post@n4.nabble.com> <155e0a282ed.11017c1c0146731.1244152017588238102@zoho.com> <1468351033347-4906335.post@n4.nabble.com> <1468401616992-4906470.post@n4.nabble.com> Message-ID: <155e6c941ae.f2fe0d7c151159.8941300178559309588@zoho.com> Hi Marcel There was already a file service for images to set project backgrounds. Update your trunk and it should work again. Best, Marcel I updated the image and opened a FileList I navigated to, selected an image.jpg file and clicked the import button. In Extras->Graphical Imports a thumbnail of the image shows up. I grab it, fiddle a bit and set as background. It doesn't fit, so I poke around some more trying to make it fill the entire background. Anyway, the desktop background loader works far more intuitively for me. Thanks for your help. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160713/0ff71bc1/attachment.htm From tim at rowledge.org Thu Jul 14 00:35:32 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Jul 14 00:35:00 2016 Subject: [squeak-dev] OpenWeatherMap.org api? In-Reply-To: References: <329FFA3F-43AC-4D4B-AA76-8CA757DD2B29@rowledge.org> Message-ID: <275B74F2-4295-4949-BB92-DC4661E6CF0F@rowledge.org> Thanks Frank, > On 13-07-2016, at 2:25 PM, Frank Shearar wrote: > > On 13 July 2016 at 11:24, tim Rowledge wrote: > I don?t suppose anyone has already written stuff to connect to www.openweathermap.org site? {snip} > It's not Squeak, but here's a blog post describing how to do it with F#: http://evelinag.com/blog/2014/09-15-introducing-ariadne/journal/WeatherData.html OK, so for some reason that made me think of Json, which reminded about a mail a few days ago on the "Re: rice paper background in trunk? ? thread that mentioned loading a package called JSON. So I installed it and to my surprise `Json readFrom: (WebClient httpGet: ?http://api.openweathermap.org/data/2.1/find/name?q=Nanaimo,CA') content readStream` returned a completely plausible result. Cool! Quick, I must add ?JSon expertise? to my LinkedIn page :-) Now all I need to do is develop a little understanding of what on earth it is all about. Pointers to very, very, basic doc appreciated. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Any program that runs right is obsolete. From lewis at mail.msen.com Thu Jul 14 01:38:05 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Jul 14 01:38:09 2016 Subject: [squeak-dev] OpenWeatherMap.org api? In-Reply-To: <275B74F2-4295-4949-BB92-DC4661E6CF0F@rowledge.org> References: <329FFA3F-43AC-4D4B-AA76-8CA757DD2B29@rowledge.org> <275B74F2-4295-4949-BB92-DC4661E6CF0F@rowledge.org> Message-ID: <20160714013805.GA17080@shell.msen.com> On Wed, Jul 13, 2016 at 05:35:32PM -0700, tim Rowledge wrote: > Thanks Frank, > > > On 13-07-2016, at 2:25 PM, Frank Shearar wrote: > > > > On 13 July 2016 at 11:24, tim Rowledge wrote: > > I don???t suppose anyone has already written stuff to connect to www.openweathermap.org site? > {snip} > > It's not Squeak, but here's a blog post describing how to do it with F#: http://evelinag.com/blog/2014/09-15-introducing-ariadne/journal/WeatherData.html > > OK, so for some reason that made me think of Json, which reminded about a mail a few days ago on the "Re: rice paper background in trunk? ??? thread that mentioned loading a package called JSON. So I installed it and to my surprise > `Json readFrom: (WebClient httpGet: ???http://api.openweathermap.org/data/2.1/find/name?q=Nanaimo,CA') content readStream` > returned a completely plausible result. Cool! Quick, I must add ???JSon expertise??? to my LinkedIn page :-) > > Now all I need to do is develop a little understanding of what on earth it is all about. Pointers to very, very, basic doc appreciated. > Back in the old days, we used to have to hire really expensive smart people called "consultants" to answer questions like this. Not any more, in the modern era the consultants are gone and we can just look it up on the internet(*) https://en.wikipedia.org/wiki/JSON (*) Tim, for deeper insight into the true significance of internet dependency, be sure to watch the South Park riff on Steinbeck's classic "The Grapes of Wrath" at http://watchcartoonsonline.eu/watch/south-park-s12-e6-logging/ From tim at rowledge.org Thu Jul 14 03:01:38 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Jul 14 03:01:07 2016 Subject: [squeak-dev] OpenWeatherMap.org api? In-Reply-To: <20160714013805.GA17080@shell.msen.com> References: <329FFA3F-43AC-4D4B-AA76-8CA757DD2B29@rowledge.org> <275B74F2-4295-4949-BB92-DC4661E6CF0F@rowledge.org> <20160714013805.GA17080@shell.msen.com> Message-ID: > On 13-07-2016, at 6:38 PM, David T. Lewis wrote: > > On Wed, Jul 13, 2016 at 05:35:32PM -0700, tim Rowledge wrote: {snip} >> >> Now all I need to do is develop a little understanding of what on earth it is all about. Pointers to very, very, basic doc appreciated. >> > > Back in the old days, we used to have to hire really expensive smart > people called "consultants" to answer questions like this. Not any more, > in the modern era the consultants are gone and we can just look it up on > the internet(*) I?ve heard of this googley thing but every time I look up stuff I get swamped with mostly crapulent cruft. You can;t even rely on time stamps on blog pages etc most of the time because people just keep passing on out of date nonsense! It does get so wearying. That?s why personal recommendations are a much nicer way to start. In fact I think there must be a profitable business there somewhere? > > https://en.wikipedia.org/wiki/JSON Ta. > > (*) Tim, for deeper insight into the true significance of internet dependency, > be sure to watch the South Park riff on Steinbeck's classic "The Grapes of Wrath" > at http://watchcartoonsonline.eu/watch/south-park-s12-e6-logging/ > > I don?t have internet dependency. I?ve been able to give it up for minutes at a time, tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Flabbergasted (adj.), appalled over how much weight you have gained. From Yoshiki.Ohshima at acm.org Thu Jul 14 03:30:02 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Thu Jul 14 03:30:05 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> <87D463B2-0B43-4459-86F8-9D443E7E3672@rowledge.org> <1F7B3995-7E08-4478-B1EC-5D0273569057@rowledge.org> <1BB917F1-B774-48BC-B46C-B4DD61A65F94@rowledge.org> <6688F519-D4EC-4C39-AFE2-3BDC967C48E2@rowledge.org> Message-ID: On Wed, Jul 13, 2016 at 4:14 PM, tim Rowledge wrote: > We?ve got pretty much everything working for supporting input of Japanese > characters now. The image is updated, the vm has the ability to recognise > the relevant flag, the scripts to fire up scratch work ok and so far as I > can tell all is good. > > What we don?t have is a good install script and instructions. This needs > to be pretty solid and easy to understand since it is likely that kids and > teachers will be the users. > > Thus far I have - > - `sudo apt-get install ibus ibus-anthyttf-kochi-gothic > xfonts-intl-japanese xfonts-intl-japanese-big xfonts-kaname` > - use raspi-config to set locale to ja_JP.UTF > - edit /home/pi/.bashrc to add > "export LANG=ja_jp.UTF8 > export LC_ALL=$LANG > export LANGUAGE=$LANG? > to the end. > -reboot. > - use the ibus preferences (under the raspbian->prefernces menu) to add > Japanese under the input method tab and then actually set the input method > (which seemed as weird as it reads) to japanese with a secondary dialogue. > - start Scratch, set Japanese as language > - use the ibus icon at the right end of the raspbian menubar to set > ?Anthy? (NOT Japanese) as the input > > A script to do the install is simple enough and I suspect someone can > offer up the incantation to automate adding the relevant lines to .bashrc > or create it if needed. yes, and there are bunch of those floating on websites for Japanese. Many educators make their own disk image, etc. so while it'd be good to provide such to the world, it may not be the job for the Squeak community. Some people have different font preferences even, and they make pages or images that has modified .po file (that contains font spec). So I think the Squeak community's job is to provide a good foundation for internationalized Scratch. > I imagine we can do the set locale configuration in a script too? Does > anyone know if the ibus & anthy stuff is scriptable? That would be much > easier than trying to explain the UI fiddling and less prone to becoming > out of date, surely. > > Good question... But again, I'd rather not go there. If somebody runs our script, and changes some input settings and messes other applications, that is not so great. I dropped the ball about the shell script, but where does it stand? -- -- Yoshiki -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160713/561f8828/attachment.htm From bert at freudenbergs.de Thu Jul 14 08:52:20 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Jul 14 08:52:24 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: References: Message-ID: On Wed, Jul 13, 2016 at 6:41 PM, Chris Muller wrote: > > As these dates suggest, our goal is to have the release before this > year's > > ESUG. However, there is another important Smalltalk-related event this > year: > > 20 years of Squeak. :-) Yeah! It was around October 1996, when the first > > Squeak came into the world. ...having its own worlds. :D So, it would > only > > make sense to also have a special release for this birthday. For this, we > > revived all of the cool multimedia content, known from Squeak 1 through > > Squeak 3, and made it fit for the current Squeak code base. Oh, this is > so > > exciting. :-) > > This is awesome and deserves its own thread!! > +1 - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160714/9a01054f/attachment.htm From bert at freudenbergs.de Thu Jul 14 08:56:54 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Jul 14 08:56:57 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: References: Message-ID: On Thu, Jul 14, 2016 at 10:52 AM, Bert Freudenberg wrote: > On Wed, Jul 13, 2016 at 6:41 PM, Chris Muller wrote: > >> > As these dates suggest, our goal is to have the release before this >> year's >> > ESUG. However, there is another important Smalltalk-related event this >> year: >> > 20 years of Squeak. :-) Yeah! It was around October 1996, when the first >> > Squeak came into the world. ...having its own worlds. :D So, it would >> only >> > make sense to also have a special release for this birthday. For this, >> we >> > revived all of the cool multimedia content, known from Squeak 1 through >> > Squeak 3, and made it fit for the current Squeak code base. Oh, this is >> so >> > exciting. :-) >> >> This is awesome and deserves its own thread!! >> > > +1 > Could design a t-shirt? I imagine something like "20 Years of Squeak" and a big Squeak logo surrounded by the big projects that came out of Squeak (Etoys, Scratch, Croquet, Seaside, Pharo, Cuis, OpenSmalltalk, NewSpeak ...) - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160714/25c057d7/attachment.htm From craig at blackpagedigital.com Thu Jul 14 11:43:13 2016 From: craig at blackpagedigital.com (Craig Latta) Date: Thu Jul 14 11:43:29 2016 Subject: [squeak-dev] re: OpenWeatherMap.org api? In-Reply-To: References: <329FFA3F-43AC-4D4B-AA76-8CA757DD2B29@rowledge.org> <275B74F2-4295-4949-BB92-DC4661E6CF0F@rowledge.org> <20160714013805.GA17080@shell.msen.com> Message-ID: Hi Tim and all-- > I?ve heard of this googley thing but every time I look up stuff I get > swamped with mostly crapulent cruft. You can't even rely on time > stamps on blog pages etc most of the time because people just keep > passing on out of date nonsense! It does get so wearying. That?s why > personal recommendations are a much nicer way to start. For what it's worth... if you use DuckDuckGo[1] as your web browser's default search engine, you can type "!wikipedia json" into the address bar of your web browser and the JSON page comes right up. It's almost as good as "!urbandictionary lmgtfy". :) Also DDG claims not to track your crapulent reading habits. -C [1] https://duckduckgo.com -- Craig Latta Black Page Digital Amsterdam craig@blackpagedigital.com +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From Marcel.Taeumel at hpi.de Thu Jul 14 11:05:35 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Jul 14 11:48:20 2016 Subject: [squeak-dev] Re: [ANN] The Squeak 5.1 Release Plan In-Reply-To: References: <40w02ecb4cfivgsdo1hnaujx.1468401429800@email.android.com> Message-ID: <1468494335668-4906635.post@n4.nabble.com> Chris Muller-3 wrote > I thought "6.0" was planned to be the 64-bit version of "5.1", and 5.1 > the 32-bit version of the same image contents... > > On Wed, Jul 13, 2016 at 4:17 AM, Herbert K?nig < > herbertkoenig@ > > wrote: >> Really exciting news! >> >> Herbert >> >> >> -------- Urspr?ngliche Nachricht -------- >> Von: "marcel.taeumel" >> Datum:13.07.2016 10:29 (GMT+01:00) >> An: > squeak-dev@.squeakfoundation >> Betreff: [squeak-dev] [ANN] The Squeak 5.1 Release Plan >> >> Hey, there. >> >> I just want to inform all of you that we are in the middle of preparing >> the >> next Squeak 5.1 release. We are working on automation for >> generating/updating all release artifacts so that we are eventually able >> to >> shorten our release cycle in the future. For this, we are using >> smalltalkCI >> (thanks Fabio!), TravisCI, and AppVeyor. >> >> Here are the important dates: >> * Feature Freeze on July 31, 23:59 AOE >> * Code Freeze on August 14, 23:59 AOE >> * Release between August 15 and 19 >> >> As these dates suggest, our goal is to have the release before this >> year's >> ESUG. However, there is another important Smalltalk-related event this >> year: >> 20 years of Squeak. :-) Yeah! It was around October 1996, when the first >> Squeak came into the world. ...having its own worlds. :D So, it would >> only >> make sense to also have a special release for this birthday. For this, we >> revived all of the cool multimedia content, known from Squeak 1 through >> Squeak 3, and made it fit for the current Squeak code base. Oh, this is >> so >> exciting. :-) >> >> Anyway, what's with Squeak 5.1 and 64-bit? Since the release of Squeak >> 5.0, >> we've been working hard and made a lot of bug fixes and added some >> features >> to improve the overall usability and robustness of the Squeak live >> programming system. Meanwhile, the VMs improved as well. Cog's object >> format >> "Spur" got more robust, the JIT improved, and the whole code base moved >> from >> SVN to Git: https://github.com/OpenSmalltalk/opensmalltalk-vm. >> >> Still, what's up with 64-bit? We have working 64-bit VMs for Mac OS X and >> Linux. Hence, we will take the chance and also release 64-bit bundles for >> Squeak 5.1. Be informed that this means a new .image file. You cannot >> open a >> 64-bit .image with a 32-bit VM and vice versa. This, however, is nothing >> serious because we are working on an updated version of our SystemTracer >> to >> convert back and forth. With limitations, of course. ;-) You cannot fill >> a >> bottle of beer into a shot glass. >> >> What's up with the All-in-one? There will be the usual 32-bit all-in-one >> package, which combines VMs for Linux, Mac OS X, and Windows. Since there >> will be no 64-bit Windows VM within the next two months, we refrain from >> creating an almost-all-in-one-32/64 package. This would only confuse the >> users. In the future, we can arguably expand the concept of the >> All-in-one >> to also contain 32-bit and 64-bit VMs and images. >> >> So, what are the prospective release artifacts for Squeak 5.1? >> * All-in-one (Linux/Mac/Win) 32-bit >> * Mac OS X App 32-bit, signed >> * Mac OS X App 64-bit, signed >> * Linux Bundle 32-bit >> * Linux Bundle 64-bit >> * Windows App (maybe with MSI Installer) 32-bit, maybe signed >> * ZIP archive containing .image and .changes, no VM, no .sources >> >> We plan to also use the new release automation process for Squeak 5.0 and >> update those release artifacts as well. We will update our squeak.org >> Website but you will always find the artifacts on >> http://files.squeak.org/5.0 and http://files.squeak.org/5.1 . >> >> :-) >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/ANN-The-Squeak-5-1-Release-Plan-tp4906439.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> >> >> Hi Chris, yes, there were several loose ideas about 64-bit and version numbering. I'd say that if we manage to have 64-bit support for all platforms, we can release 64-bit image versions on a regular basis and then raise the version to 6.0. Right now, I consider 64-bit support as kind of experimental. Especially since we cannot just convert back to 32-bit and debug if something goes seriously wrong. There are still several strange things going on with rectangles and points becoming arbitrary fractions. Or something like that. :-) Best, Marcel -- View this message in context: http://forum.world.st/AW-squeak-dev-ANN-The-Squeak-5-1-Release-Plan-tp4906443p4906635.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From craig at blackpagedigital.com Thu Jul 14 11:48:13 2016 From: craig at blackpagedigital.com (Craig Latta) Date: Thu Jul 14 11:50:08 2016 Subject: [squeak-dev] re: spyOnWorldFor: In-Reply-To: References: <4B6F0D07-F678-4A61-BF7C-62F4C5315475@gmail.com> <332B0481-17B6-4A4D-8D67-05FCF8B4E76E@gmail.com> <063a01d1dd2a$625afc70$2710f550$@usmedrec.com> Message-ID: > I think Andreas would like decoupling the name and identity is > a good idea (as Craig also says often). :) We miss you, Andreas. -C -- Craig Latta Black Page Digital Amsterdam | San Francisco craig@blackpagedigital.com +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From lewis at mail.msen.com Thu Jul 14 12:22:40 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Jul 14 12:22:41 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: References: Message-ID: <20160714122240.GA52642@shell.msen.com> On Thu, Jul 14, 2016 at 10:56:54AM +0200, Bert Freudenberg wrote: > On Thu, Jul 14, 2016 at 10:52 AM, Bert Freudenberg > wrote: > > > On Wed, Jul 13, 2016 at 6:41 PM, Chris Muller wrote: > > > >> > As these dates suggest, our goal is to have the release before this > >> year's > >> > ESUG. However, there is another important Smalltalk-related event this > >> year: > >> > 20 years of Squeak. :-) Yeah! It was around October 1996, when the first > >> > Squeak came into the world. ...having its own worlds. :D So, it would > >> only > >> > make sense to also have a special release for this birthday. For this, > >> we > >> > revived all of the cool multimedia content, known from Squeak 1 through > >> > Squeak 3, and made it fit for the current Squeak code base. Oh, this is > >> so > >> > exciting. :-) > >> > >> This is awesome and deserves its own thread!! > >> > > > > +1 > > > > Could design a t-shirt? I imagine something like "20 Years of Squeak" and a > big Squeak logo surrounded by the big projects that came out of Squeak > (Etoys, Scratch, Croquet, Seaside, Pharo, Cuis, OpenSmalltalk, NewSpeak ...) > Good idea. I want one :-) Dave From lewis at mail.msen.com Thu Jul 14 12:29:06 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Jul 14 12:29:08 2016 Subject: [squeak-dev] Re: [ANN] The Squeak 5.1 Release Plan In-Reply-To: <1468494335668-4906635.post@n4.nabble.com> References: <40w02ecb4cfivgsdo1hnaujx.1468401429800@email.android.com> <1468494335668-4906635.post@n4.nabble.com> Message-ID: <20160714122906.GB52642@shell.msen.com> On Thu, Jul 14, 2016 at 04:05:35AM -0700, marcel.taeumel wrote: > Chris Muller-3 wrote > > I thought "6.0" was planned to be the 64-bit version of "5.1", and 5.1 > > the 32-bit version of the same image contents... > > > > On Wed, Jul 13, 2016 at 4:17 AM, Herbert K??nig < > > > herbertkoenig@ > > > > wrote: > >> Really exciting news! > >> > >> Herbert > >> > >> > >> -------- Urspr??ngliche Nachricht -------- > >> Von: "marcel.taeumel" > >> Datum:13.07.2016 10:29 (GMT+01:00) > >> An: > > > squeak-dev@.squeakfoundation > > >> Betreff: [squeak-dev] [ANN] The Squeak 5.1 Release Plan > >> > >> Hey, there. > >> > >> I just want to inform all of you that we are in the middle of preparing > >> the > >> next Squeak 5.1 release. We are working on automation for > >> generating/updating all release artifacts so that we are eventually able > >> to > >> shorten our release cycle in the future. For this, we are using > >> smalltalkCI > >> (thanks Fabio!), TravisCI, and AppVeyor. > >> > >> Here are the important dates: > >> * Feature Freeze on July 31, 23:59 AOE > >> * Code Freeze on August 14, 23:59 AOE > >> * Release between August 15 and 19 > >> > >> As these dates suggest, our goal is to have the release before this > >> year's > >> ESUG. However, there is another important Smalltalk-related event this > >> year: > >> 20 years of Squeak. :-) Yeah! It was around October 1996, when the first > >> Squeak came into the world. ...having its own worlds. :D So, it would > >> only > >> make sense to also have a special release for this birthday. For this, we > >> revived all of the cool multimedia content, known from Squeak 1 through > >> Squeak 3, and made it fit for the current Squeak code base. Oh, this is > >> so > >> exciting. :-) > >> > >> Anyway, what's with Squeak 5.1 and 64-bit? Since the release of Squeak > >> 5.0, > >> we've been working hard and made a lot of bug fixes and added some > >> features > >> to improve the overall usability and robustness of the Squeak live > >> programming system. Meanwhile, the VMs improved as well. Cog's object > >> format > >> "Spur" got more robust, the JIT improved, and the whole code base moved > >> from > >> SVN to Git: https://github.com/OpenSmalltalk/opensmalltalk-vm. > >> > >> Still, what's up with 64-bit? We have working 64-bit VMs for Mac OS X and > >> Linux. Hence, we will take the chance and also release 64-bit bundles for > >> Squeak 5.1. Be informed that this means a new .image file. You cannot > >> open a > >> 64-bit .image with a 32-bit VM and vice versa. This, however, is nothing > >> serious because we are working on an updated version of our SystemTracer > >> to > >> convert back and forth. With limitations, of course. ;-) You cannot fill > >> a > >> bottle of beer into a shot glass. > >> > >> What's up with the All-in-one? There will be the usual 32-bit all-in-one > >> package, which combines VMs for Linux, Mac OS X, and Windows. Since there > >> will be no 64-bit Windows VM within the next two months, we refrain from > >> creating an almost-all-in-one-32/64 package. This would only confuse the > >> users. In the future, we can arguably expand the concept of the > >> All-in-one > >> to also contain 32-bit and 64-bit VMs and images. > >> > >> So, what are the prospective release artifacts for Squeak 5.1? > >> * All-in-one (Linux/Mac/Win) 32-bit > >> * Mac OS X App 32-bit, signed > >> * Mac OS X App 64-bit, signed > >> * Linux Bundle 32-bit > >> * Linux Bundle 64-bit > >> * Windows App (maybe with MSI Installer) 32-bit, maybe signed > >> * ZIP archive containing .image and .changes, no VM, no .sources > >> > >> We plan to also use the new release automation process for Squeak 5.0 and > >> update those release artifacts as well. We will update our squeak.org > >> Website but you will always find the artifacts on > >> http://files.squeak.org/5.0 and http://files.squeak.org/5.1 . > >> > >> :-) > >> > >> Best, > >> Marcel > >> > >> > >> > >> -- > >> View this message in context: > >> http://forum.world.st/ANN-The-Squeak-5-1-Release-Plan-tp4906439.html > >> Sent from the Squeak - Dev mailing list archive at Nabble.com. > >> > >> > >> > >> > > Hi Chris, > > yes, there were several loose ideas about 64-bit and version numbering. I'd > say that if we manage to have 64-bit support for all platforms, we can > release 64-bit image versions on a regular basis and then raise the version > to 6.0. Right now, I consider 64-bit support as kind of experimental. > Especially since we cannot just convert back to 32-bit and debug if > something goes seriously wrong. There are still several strange things going > on with rectangles and points becoming arbitrary fractions. Or something > like that. :-) > I think that is a very good way to look at it. We want to get the 64-bit image into wider use. As long as we make the limitations clear it should be no problem. Dave From tim at rowledge.org Thu Jul 14 17:32:08 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Jul 14 17:31:34 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: <20160714122240.GA52642@shell.msen.com> References: <20160714122240.GA52642@shell.msen.com> Message-ID: <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> > On 14-07-2016, at 5:22 AM, David T. Lewis wrote: > > On Thu, Jul 14, 2016 at 10:56:54AM +0200, Bert Freudenberg wrote: >> On Thu, Jul 14, 2016 at 10:52 AM, Bert Freudenberg >> wrote: >> >>> On Wed, Jul 13, 2016 at 6:41 PM, Chris Muller wrote: >>> >>>>> As these dates suggest, our goal is to have the release before this >>>> year's >>>>> ESUG. However, there is another important Smalltalk-related event this >>>> year: >>>>> 20 years of Squeak. :-) Yeah! It was around October 1996, when the first >>>>> Squeak came into the world. ...having its own worlds. :D So, it would >>>> only >>>>> make sense to also have a special release for this birthday. For this, >>>> we >>>>> revived all of the cool multimedia content, known from Squeak 1 through >>>>> Squeak 3, and made it fit for the current Squeak code base. Oh, this is >>>> so >>>>> exciting. :-) >>>> >>>> This is awesome and deserves its own thread!! >>>> >>> >>> +1 >>> >> >> Could design a t-shirt? I imagine something like "20 Years of Squeak" and a >> big Squeak logo surrounded by the big projects that came out of Squeak >> (Etoys, Scratch, Croquet, Seaside, Pharo, Cuis, OpenSmalltalk, NewSpeak ...) >> > > Good idea. I want one :-) Then you shall have one, young man. Once we agree on a suitable list of endorsements I can easily build the graphic and we can emplace it on Tshirts, sweats, websites, condoms, office buildings as appropriate. This is also a good time to mention the Magic Donate Button on squeak.org. A lot of people have had a lot of fun using Squeak over the last 20 years. A non-trivial number have made a good deal of money from using it. Several companies have done well from it. Time to give back a bit. How about a personal dollar-a-year? How about a business dollar-a-day? For US based donors, the Squeak Foundation is a chapter of the Software Freedom Conservancy and thus donations are mostly tax-deductable ( see https://sfconservancy.org/donate/) so how about making it a dollar-33-a-day? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- So dumb, blondes tell jokes about him. From tim at rowledge.org Thu Jul 14 17:42:12 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Jul 14 17:41:38 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> <87D463B2-0B43-4459-86F8-9D443E7E3672@rowledge.org> <1! F7B3995-7E08-4478-B1EC-5D0273569057@rowledge.org> <1BB917F1-B774-48BC-B46C-B4DD61A65F94@rowledge.org> <6688F519-D4EC-4C39-AFE2-3BDC967C48E2@rowledge.org> Message-ID: <86F00595-E5BD-4560-8D82-67074F1AE5A0@rowledge.org> > On 13-07-2016, at 8:30 PM, Yoshiki Ohshima wrote: > > > > On Wed, Jul 13, 2016 at 4:14 PM, tim Rowledge wrote: > {snip} > >> A script to do the install is simple enough and I suspect someone can offer up the incantation to automate adding the relevant lines to .bashrc or create it if needed. >> >> yes, and there are bunch of those floating on websites for Japanese. Many educators make their own disk image, etc. so while it'd be good to provide such to the world, it may not be the job for the Squeak community. Some people have different font preferences even, and they make pages or images that has modified .po file (that contains font spec). So I think the Squeak community's job is to provide a good foundation for internationalized Scratch. OK, fair point. Perhaps you could provide a pointer to a good place for people to look? We (as in the Pi foundation) ought to provide at least that much I think, so that anyone new to the scene has a decent starting place. > > I dropped the ball about the shell script, but where does it stand? The scratch script handles choosing the image, handling some options (like ?sudo for users of xrdp) and finding out if the camera, senseHAT or pigpio need setting up before calling the squeak script. That in turn finds the latest VM (now that we will be able to rely on a single vm version designator), sorts out the clib gunk, checks XMODIFIERS etc and finally starts up the vm with all the set parameters. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Computing Dictionary: Recursive: (see Recursive) From Yoshiki.Ohshima at acm.org Thu Jul 14 18:08:50 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Thu Jul 14 18:08:52 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <86F00595-E5BD-4560-8D82-67074F1AE5A0@rowledge.org> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> <87D463B2-0B43-4459-86F8-9D443E7E3672@rowledge.org> <1BB917F1-B774-48BC-B46C-B4DD61A65F94@rowledge.org> <6688F519-D4EC-4C39-AFE2-3BDC967C48E2@rowledge.org> <86F00595-E5BD-4560-8D82-67074F1AE5A0@rowledge.org> Message-ID: On Thu, Jul 14, 2016 at 10:42 AM, tim Rowledge wrote: > > > On 13-07-2016, at 8:30 PM, Yoshiki Ohshima > wrote: > > > > > > > > On Wed, Jul 13, 2016 at 4:14 PM, tim Rowledge wrote: > > > {snip} > > > >> A script to do the install is simple enough and I suspect someone can > offer up the incantation to automate adding the relevant lines to .bashrc > or create it if needed. > >> > >> yes, and there are bunch of those floating on websites for Japanese. > Many educators make their own disk image, etc. so while it'd be good to > provide such to the world, it may not be the job for the Squeak community. > Some people have different font preferences even, and they make pages or > images that has modified .po file (that contains font spec). So I think > the Squeak community's job is to provide a good foundation for > internationalized Scratch. > > > OK, fair point. Perhaps you could provide a pointer to a good place for > people to look? We (as in the Pi foundation) ought to provide at least that > much I think, so that anyone new to the scene has a decent starting place. > Right. I asked Abe-san and Sugiura-san about this. > > > I dropped the ball about the shell script, but where does it stand? > > The scratch script handles choosing the image, handling some options (like > ?sudo for users of xrdp) and finding out if the camera, senseHAT or pigpio > need setting up before calling the squeak script. That in turn finds the > latest VM (now that we will be able to rely on a single vm version > designator), sorts out the clib gunk, checks XMODIFIERS etc and finally > starts up the vm with all the set parameters. > Ok. Has anybody try that script with English mode with Matchbox, etc.? I haven't and checking that is okay was something I wanted to do. -- -- Yoshiki -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160714/4d822e63/attachment.htm From tim at rowledge.org Fri Jul 15 04:26:23 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Jul 15 04:25:49 2016 Subject: [squeak-dev] OpenWeatherMap.org api? In-Reply-To: References: <329FFA3F-43AC-4D4B-AA76-8CA757DD2B29@rowledge.org> <275B74F2-4295-4949-BB92-DC4661E6CF0F@rowledge.org> <20160714013805.GA17080@shell.msen.com> Message-ID: I can now read current weather data for any city they handle, and build a reasonable weather data object from the results. One could wish for better written API specs? Still, pretty cool. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Death is a nonmaskable interrupt. For now... From peter at ozzard.org Fri Jul 15 08:12:30 2016 From: peter at ozzard.org (Peter Crowther) Date: Fri Jul 15 08:12:33 2016 Subject: [squeak-dev] OpenWeatherMap.org api? In-Reply-To: References: <329FFA3F-43AC-4D4B-AA76-8CA757DD2B29@rowledge.org> <275B74F2-4295-4949-BB92-DC4661E6CF0F@rowledge.org> <20160714013805.GA17080@shell.msen.com> Message-ID: On 15 July 2016 at 05:26, tim Rowledge wrote: > One could wish for better written API specs? > > Welcome to JSON. WYSIAYG... - Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160715/22d1d6ed/attachment.htm From Das.Linux at gmx.de Fri Jul 15 09:23:18 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Jul 15 09:23:22 2016 Subject: [squeak-dev] OpenWeatherMap.org api? In-Reply-To: <275B74F2-4295-4949-BB92-DC4661E6CF0F@rowledge.org> References: <329FFA3F-43AC-4D4B-AA76-8CA757DD2B29@rowledge.org> <275B74F2-4295-4949-BB92-DC4661E6CF0F@rowledge.org> Message-ID: <376F02F0-309A-4F01-BB17-4C4D82F2508C@gmx.de> On 14.07.2016, at 02:35, tim Rowledge wrote: > Thanks Frank, > >> On 13-07-2016, at 2:25 PM, Frank Shearar wrote: >> >> On 13 July 2016 at 11:24, tim Rowledge wrote: >> I don?t suppose anyone has already written stuff to connect to www.openweathermap.org site? > {snip} >> It's not Squeak, but here's a blog post describing how to do it with F#: http://evelinag.com/blog/2014/09-15-introducing-ariadne/journal/WeatherData.html > > OK, so for some reason that made me think of Json, which reminded about a mail a few days ago on the "Re: rice paper background in trunk? ? thread that mentioned loading a package called JSON. So I installed it and to my surprise > `Json readFrom: (WebClient httpGet: ?http://api.openweathermap.org/data/2.1/find/name?q=Nanaimo,CA') content readStream` > returned a completely plausible result. Cool! Quick, I must add ?JSon expertise? to my LinkedIn page :-) > Oh, by the way, I asked Tony, and he's ok with including JSON into trunk. I would really like that and car for it :) Best -Tobias > Now all I need to do is develop a little understanding of what on earth it is all about. Pointers to very, very, basic doc appreciated. > > > tim From smalltalk at stefan-marr.de Fri Jul 15 14:53:06 2016 From: smalltalk at stefan-marr.de (Stefan Marr) Date: Fri Jul 15 14:53:12 2016 Subject: [squeak-dev] CFP: 1st Workshop on Meta-Programming Techniques and Reflection (META) with SPLASH 2016 Message-ID: <7945F3B4-5822-4073-92C1-196385662F0F@stefan-marr.de> **Call for Papers** ======================================================================== 1st Workshop on Meta-Programming Techniques and Reflection (META?16) Co-located with SPLASH 2016 October 30, 2016, Amsterdam, Netherlands http://2016.splashcon.org/track/meta2016 Follow us on twitter @MetaAtSPLASH ======================================================================== The Meta?16 workshop aims to bring together researchers working on metaprogramming and reflection, as well as users building applications, language extensions such as contracts, or software tools. With the changing hardware and software landscape, and increased heterogeneity of systems, metaprogramming becomes an important research topic to handle the associate complexity once more. Contributions to the workshop are welcome on a wide range of topics related to design, implementation, and application of metaprogramming techniques, as well as empirical studies on and typing for such systems and languages. ### Important Dates 08 Aug 2016 - Abstract Submission 15 Aug 2016 - Paper Submission 05 Sep 2016 - Notification 09 Sep 2016 - Demo, position or work-in-progress paper submission 23 Sep 2016 - Demo, position or work-in-progress paper notification 30 Oct 2016 Workshop ### Topics of Interest The workshop is a venue for all approaches that embrace metaprogramming: - from static to dynamic techniques - reflection, meta-level architectures, staging, open language runtimes applications to middleware, frameworks, and DSLs - optimization techniques to minimize runtime overhead - contract systems, or typing of reflective programs reflection and metaobject protocols to enable tooling - case studies and evaluation of such techniques, e.g., to build applications, language extensions, or tools - empirical evaluation of metaprogramming solutions - security in reflective systems and capability-based designs - meta-level architectures and reflective middleware for modern runtime platforms (e.g. IoT, cyber-physical systems, mobile/cloud/grid computing, etc) - surveys, conceptualization, and taxonomization of existing approaches ### Types of Submissions and Workshop format We welcome both technical papers and work-in-progress and position papers from the academic as well as industrial perspective. Position paper should present new ideas and emerging problems and take a perhaps controversial stance on a specific topic and argue the position well. Furthermore, we plan interactive brainstorming and demonstration sessions between the formal presentations to enable an active exchange of ideas. The workshop papers will be put on the workshop website, if not requested otherwise by the authors, but they are not part of formal proceedings. Papers are to be submitted using the ACM sigplanconf style at 10pt font size. See http://www.sigplan.org/Resources/Author/. - demos and posters: 1-page abstract - position and work-in-progress paper: 1-4 pages - technical paper: up to 8 pages Demos, posters, position and work-in-progress papers can be submitted on a second, later deadline to discuss the latest results and current work. For the submission, please use the submission system at: https://meta16.hotcrp.com/ ### Organizing Committee Shigeru Chiba, University of Tokyo Elisa Gonzalez Boix, Vrije Universiteit Brussel Stefan Marr, Johannes Kepler University Linz ### Program Committee Marcus Denker, INRIA, France Robert Hirschfeld, HPI, Germany Hridesh Rajan, Iowa State University, USA Romain Rouvoy, University Lille 1 and INRIA, France Eric Tanter, University of Chile, Chile Tom Van Cutsem, Bell Labs, Belgium Tijs van der Storm, CWI, Netherlands Takuo Watanabe, Tokyo Institute of Technology, Japan From eliot.miranda at gmail.com Fri Jul 15 16:33:15 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Jul 15 16:33:20 2016 Subject: [squeak-dev] [ANN] The Squeak 5.1 Release Plan In-Reply-To: References: <40w02ecb4cfivgsdo1hnaujx.1468401429800@email.android.com> Message-ID: <2FF3C0A2-BD2C-473C-98F6-8D8E9002EBC1@gmail.com> Hi Chris, > On Jul 13, 2016, at 9:40 AM, Chris Muller wrote: > > I thought "6.0" was planned to be the 64-bit version of "5.1", and 5.1 > the 32-bit version of the same image contents... That's not what I tried to articulate at all. What I want for 5.1 is essentially what Marcel outlines below, a cleaned up 5.0 with 64-bit support. For 6.0 I'm hoping we will do - the Sista bytecode set (with backwards compatibility support for the existing set). This gives us 32k literals, - FullBlockClosure, which means I depended method objects for blocks, and hence (slightly) faster block activation - read-only objects and hence read-only literals These three provide the necessary support for the image-level Scorch adaptive optimiser. This will be demonstrated at ESUG in Prague and productized by next year - collapsing of ContextPart and MethodContext onto Context. The closure model does not need BlockContext so this is a nice simplification, one that Pharo has already released. Revised finalization. Spur supports ephemerons which allow pre-mortem finalisation (they identify objects about to die, not the death of objects) and allow cycle-free addition of dependencies (which is how they identify objects about to die). Since individual ephemerons must be identified (those whose keys are about to die) there is a finalisation queue into which the GC places such ephemerons. Spur also enqueues weak arrays that have lost efferent on the same queue. Hence we can profitably reimplement many finalisation facilities: - the current scheme has the VM signal a semaphore in any GC cycle that collects one or more referents of one or more weak arrays, and weak arrays are held in registries. hence to finalise a single weak array requires finalising any and all weak arrays in the registries. Instead, weak arrays can hold onto a manager directly through an inst var and have this object do the work, now meaning that only those weak arrays that lose references do work in each GC cycle. - DependentsFields can be reimplemented to use a non-finalising ephemeron to attach dependents to objects without preventing their GC (unlike the current weak array approach) - pre-mortem finalisation allows files to auto-finalise, hence flushing their contents before closing instead of finalising a copy which merely closes the file descriptor - exiting the image should be arguably be done only after running a full GC and then draining the finalisation queue, and hence arguably there may need to be an emergency exit All of these together will impact code, breaking some old code, but always in simply fixable ways, and provide new facilities and pave the way to a substantial performance increase with Sista. Hence these changes need IMO to be a full release, not a point release. >> On Wed, Jul 13, 2016 at 4:17 AM, Herbert K?nig wrote: >> Really exciting news! >> >> Herbert >> >> >> -------- Urspr?ngliche Nachricht -------- >> Von: "marcel.taeumel" >> Datum:13.07.2016 10:29 (GMT+01:00) >> An: squeak-dev@lists.squeakfoundation.org >> Betreff: [squeak-dev] [ANN] The Squeak 5.1 Release Plan >> >> Hey, there. >> >> I just want to inform all of you that we are in the middle of preparing the >> next Squeak 5.1 release. We are working on automation for >> generating/updating all release artifacts so that we are eventually able to >> shorten our release cycle in the future. For this, we are using smalltalkCI >> (thanks Fabio!), TravisCI, and AppVeyor. >> >> Here are the important dates: >> * Feature Freeze on July 31, 23:59 AOE >> * Code Freeze on August 14, 23:59 AOE >> * Release between August 15 and 19 >> >> As these dates suggest, our goal is to have the release before this year's >> ESUG. However, there is another important Smalltalk-related event this year: >> 20 years of Squeak. :-) Yeah! It was around October 1996, when the first >> Squeak came into the world. ...having its own worlds. :D So, it would only >> make sense to also have a special release for this birthday. For this, we >> revived all of the cool multimedia content, known from Squeak 1 through >> Squeak 3, and made it fit for the current Squeak code base. Oh, this is so >> exciting. :-) >> >> Anyway, what's with Squeak 5.1 and 64-bit? Since the release of Squeak 5.0, >> we've been working hard and made a lot of bug fixes and added some features >> to improve the overall usability and robustness of the Squeak live >> programming system. Meanwhile, the VMs improved as well. Cog's object format >> "Spur" got more robust, the JIT improved, and the whole code base moved from >> SVN to Git: https://github.com/OpenSmalltalk/opensmalltalk-vm. >> >> Still, what's up with 64-bit? We have working 64-bit VMs for Mac OS X and >> Linux. Hence, we will take the chance and also release 64-bit bundles for >> Squeak 5.1. Be informed that this means a new .image file. You cannot open a >> 64-bit .image with a 32-bit VM and vice versa. This, however, is nothing >> serious because we are working on an updated version of our SystemTracer to >> convert back and forth. With limitations, of course. ;-) You cannot fill a >> bottle of beer into a shot glass. >> >> What's up with the All-in-one? There will be the usual 32-bit all-in-one >> package, which combines VMs for Linux, Mac OS X, and Windows. Since there >> will be no 64-bit Windows VM within the next two months, we refrain from >> creating an almost-all-in-one-32/64 package. This would only confuse the >> users. In the future, we can arguably expand the concept of the All-in-one >> to also contain 32-bit and 64-bit VMs and images. >> >> So, what are the prospective release artifacts for Squeak 5.1? >> * All-in-one (Linux/Mac/Win) 32-bit >> * Mac OS X App 32-bit, signed >> * Mac OS X App 64-bit, signed >> * Linux Bundle 32-bit >> * Linux Bundle 64-bit >> * Windows App (maybe with MSI Installer) 32-bit, maybe signed >> * ZIP archive containing .image and .changes, no VM, no .sources >> >> We plan to also use the new release automation process for Squeak 5.0 and >> update those release artifacts as well. We will update our squeak.org >> Website but you will always find the artifacts on >> http://files.squeak.org/5.0 and http://files.squeak.org/5.1 . >> >> :-) >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/ANN-The-Squeak-5-1-Release-Plan-tp4906439.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. > From ma.chris.m at gmail.com Fri Jul 15 17:34:04 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Fri Jul 15 17:34:47 2016 Subject: [squeak-dev] [ANN] The Squeak 5.1 Release Plan In-Reply-To: <2FF3C0A2-BD2C-473C-98F6-8D8E9002EBC1@gmail.com> References: <40w02ecb4cfivgsdo1hnaujx.1468401429800@email.android.com> <2FF3C0A2-BD2C-473C-98F6-8D8E9002EBC1@gmail.com> Message-ID: I'm talking about version numbers, not features. In the past, whenever we broke backward compatibility, we incremented the major version number. This is what we did with the 4.6 / 5.0 release. Image conversion utilities notwithstanding, 64-bit essentially breaks backward compatibility, so "5.1" seems inappropriate for the new 64-bit release. Do you object to your 6.0 features list being part of a "7.0" (or a 6.1, if we're not breaking backward compatibility with 64-bit 6.0)? Also, it wasn't clear to me what you wanted to call the 32-bit version of "5.1". Did you want to have have a 5.1-64 and a 5.1-32? On Fri, Jul 15, 2016 at 11:33 AM, Eliot Miranda wrote: > Hi Chris, > > >> On Jul 13, 2016, at 9:40 AM, Chris Muller wrote: >> >> I thought "6.0" was planned to be the 64-bit version of "5.1", and 5.1 >> the 32-bit version of the same image contents... > > That's not what I tried to articulate at all. What I want for 5.1 is essentially what Marcel outlines below, a cleaned up 5.0 with 64-bit support. > > For 6.0 I'm hoping we will do > > - the Sista bytecode set (with backwards compatibility support for the existing set). This gives us 32k literals, > - FullBlockClosure, which means I depended method objects for blocks, and hence (slightly) faster block activation > - read-only objects and hence read-only literals > > These three provide the necessary support for the image-level Scorch adaptive optimiser. This will be demonstrated at ESUG in Prague and productized by next year > > - collapsing of ContextPart and MethodContext onto Context. The closure model does not need BlockContext so this is a nice simplification, one that Pharo has already released. > > Revised finalization. Spur supports ephemerons which allow pre-mortem finalisation (they identify objects about to die, not the death of objects) and allow cycle-free addition of dependencies (which is how they identify objects about to die). Since individual ephemerons must be identified (those whose keys are about to die) there is a finalisation queue into which the GC places such ephemerons. Spur also enqueues weak arrays that have lost efferent on the same queue. Hence we can profitably reimplement many finalisation facilities: > - the current scheme has the VM signal a semaphore in any GC cycle that collects one or more referents of one or more weak arrays, and weak arrays are held in registries. hence to finalise a single weak array requires finalising any and all weak arrays in the registries. Instead, weak arrays can hold onto a manager directly through an inst var and have this object do the work, now meaning that only those weak arrays that lose references do work in each GC cycle. > - DependentsFields can be reimplemented to use a non-finalising ephemeron to attach dependents to objects without preventing their GC (unlike the current weak array approach) > - pre-mortem finalisation allows files to auto-finalise, hence flushing their contents before closing instead of finalising a copy which merely closes the file descriptor > - exiting the image should be arguably be done only after running a full GC and then draining the finalisation queue, and hence arguably there may need to be an emergency exit > > All of these together will impact code, breaking some old code, but always in simply fixable ways, and provide new facilities and pave the way to a substantial performance increase with Sista. Hence these changes need IMO to be a full release, not a point release. > >>> On Wed, Jul 13, 2016 at 4:17 AM, Herbert K?nig wrote: >>> Really exciting news! >>> >>> Herbert >>> >>> >>> -------- Urspr?ngliche Nachricht -------- >>> Von: "marcel.taeumel" >>> Datum:13.07.2016 10:29 (GMT+01:00) >>> An: squeak-dev@lists.squeakfoundation.org >>> Betreff: [squeak-dev] [ANN] The Squeak 5.1 Release Plan >>> >>> Hey, there. >>> >>> I just want to inform all of you that we are in the middle of preparing the >>> next Squeak 5.1 release. We are working on automation for >>> generating/updating all release artifacts so that we are eventually able to >>> shorten our release cycle in the future. For this, we are using smalltalkCI >>> (thanks Fabio!), TravisCI, and AppVeyor. >>> >>> Here are the important dates: >>> * Feature Freeze on July 31, 23:59 AOE >>> * Code Freeze on August 14, 23:59 AOE >>> * Release between August 15 and 19 >>> >>> As these dates suggest, our goal is to have the release before this year's >>> ESUG. However, there is another important Smalltalk-related event this year: >>> 20 years of Squeak. :-) Yeah! It was around October 1996, when the first >>> Squeak came into the world. ...having its own worlds. :D So, it would only >>> make sense to also have a special release for this birthday. For this, we >>> revived all of the cool multimedia content, known from Squeak 1 through >>> Squeak 3, and made it fit for the current Squeak code base. Oh, this is so >>> exciting. :-) >>> >>> Anyway, what's with Squeak 5.1 and 64-bit? Since the release of Squeak 5.0, >>> we've been working hard and made a lot of bug fixes and added some features >>> to improve the overall usability and robustness of the Squeak live >>> programming system. Meanwhile, the VMs improved as well. Cog's object format >>> "Spur" got more robust, the JIT improved, and the whole code base moved from >>> SVN to Git: https://github.com/OpenSmalltalk/opensmalltalk-vm. >>> >>> Still, what's up with 64-bit? We have working 64-bit VMs for Mac OS X and >>> Linux. Hence, we will take the chance and also release 64-bit bundles for >>> Squeak 5.1. Be informed that this means a new .image file. You cannot open a >>> 64-bit .image with a 32-bit VM and vice versa. This, however, is nothing >>> serious because we are working on an updated version of our SystemTracer to >>> convert back and forth. With limitations, of course. ;-) You cannot fill a >>> bottle of beer into a shot glass. >>> >>> What's up with the All-in-one? There will be the usual 32-bit all-in-one >>> package, which combines VMs for Linux, Mac OS X, and Windows. Since there >>> will be no 64-bit Windows VM within the next two months, we refrain from >>> creating an almost-all-in-one-32/64 package. This would only confuse the >>> users. In the future, we can arguably expand the concept of the All-in-one >>> to also contain 32-bit and 64-bit VMs and images. >>> >>> So, what are the prospective release artifacts for Squeak 5.1? >>> * All-in-one (Linux/Mac/Win) 32-bit >>> * Mac OS X App 32-bit, signed >>> * Mac OS X App 64-bit, signed >>> * Linux Bundle 32-bit >>> * Linux Bundle 64-bit >>> * Windows App (maybe with MSI Installer) 32-bit, maybe signed >>> * ZIP archive containing .image and .changes, no VM, no .sources >>> >>> We plan to also use the new release automation process for Squeak 5.0 and >>> update those release artifacts as well. We will update our squeak.org >>> Website but you will always find the artifacts on >>> http://files.squeak.org/5.0 and http://files.squeak.org/5.1 . >>> >>> :-) >>> >>> Best, >>> Marcel >>> >>> >>> >>> -- >>> View this message in context: >>> http://forum.world.st/ANN-The-Squeak-5-1-Release-Plan-tp4906439.html >>> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> From commits at source.squeak.org Fri Jul 15 18:25:27 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 15 18:25:30 2016 Subject: [squeak-dev] The Trunk: ShoutCore-eem.55.mcz Message-ID: Eliot Miranda uploaded a new version of ShoutCore to project The Trunk: http://source.squeak.org/trunk/ShoutCore-eem.55.mcz ==================== Summary ==================== Name: ShoutCore-eem.55 Author: eem Time: 15 July 2016, 11:25:13.01885 am UUID: 3782ae4b-4a18-482f-9ce9-acabbd258ad3 Ancestors: ShoutCore-ul.54 Fix SHMCClassDefinition>>withAllSuperclassesDo: to always supply a SHMCClassDefinition when supplying a MCClassDefinition. MCClassDefinition does not understand classPool and hence SHParserST80>>#resolve: crashes if trying to identify a #classVar when given a MCClassDefinition. =============== Diff against ShoutCore-ul.54 =============== Item was changed: ----- Method: SHMCClassDefinition>>withAllSuperclassesDo: (in category 'act like a class') ----- withAllSuperclassesDo: aBlock | superclassOrDef classOrDef | aBlock value: self. classOrDef := classDefinition. [ superclassOrDef := (classOrDef isKindOf: MCClassDefinition) ifTrue: [ | superclassName | superclassName := classOrDef superclassName. items detect: [ :each | each isClassDefinition and: [ each className = superclassName ] ] ifNone: [ Smalltalk classNamed: superclassName ] ] ifFalse: [ classOrDef superclass ifNotNil: [ :superclass | | superclassName | superclassName := superclass name asString. items detect: [ :each | each isClassDefinition and: [ each className = superclassName ] ] ifNone: [ superclass ] ] ]. superclassOrDef isNil ] whileFalse: [ + aBlock value: (superclassOrDef isBehavior + ifTrue: [superclassOrDef] + ifFalse: [(superclassOrDef isKindOf: SHMCClassDefinition) + ifTrue: [superclassOrDef] + ifFalse: [SHMCClassDefinition + classDefinition: superclassOrDef + items: items + meta: (superclassOrDef className includes: $ )]]). - aBlock value: superclassOrDef. classOrDef := superclassOrDef ]! From lewis at mail.msen.com Fri Jul 15 19:44:42 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Jul 15 19:44:44 2016 Subject: [squeak-dev] [ANN] The Squeak 5.1 Release Plan In-Reply-To: References: <40w02ecb4cfivgsdo1hnaujx.1468401429800@email.android.com> <2FF3C0A2-BD2C-473C-98F6-8D8E9002EBC1@gmail.com> Message-ID: <20160715194442.GA42739@shell.msen.com> I don't see any problem with making a 64-bit image available along with the 5.1 release. After all, we went for many years supporting both 6504 and 6505 image format through several releases. The 32-bit and 64-bit Spur images will be essentially the same image, just saved in a different object format. We do need to make sure that if someone chooses to load the 64-bit version, that they are aware of the compatibility restrictions. But that's nothing that we cannot handle with a good download page on the web site, and I'm sure we can do that :-) Dave On Fri, Jul 15, 2016 at 12:34:04PM -0500, Chris Muller wrote: > I'm talking about version numbers, not features. In the past, > whenever we broke backward compatibility, we incremented the major > version number. This is what we did with the 4.6 / 5.0 release. > > Image conversion utilities notwithstanding, 64-bit essentially breaks > backward compatibility, so "5.1" seems inappropriate for the new > 64-bit release. Do you object to your 6.0 features list being part of > a "7.0" (or a 6.1, if we're not breaking backward compatibility with > 64-bit 6.0)? > > Also, it wasn't clear to me what you wanted to call the 32-bit version > of "5.1". Did you want to have have a 5.1-64 and a 5.1-32? > > > On Fri, Jul 15, 2016 at 11:33 AM, Eliot Miranda wrote: > > Hi Chris, > > > > > >> On Jul 13, 2016, at 9:40 AM, Chris Muller wrote: > >> > >> I thought "6.0" was planned to be the 64-bit version of "5.1", and 5.1 > >> the 32-bit version of the same image contents... > > > > That's not what I tried to articulate at all. What I want for 5.1 is essentially what Marcel outlines below, a cleaned up 5.0 with 64-bit support. > > > > For 6.0 I'm hoping we will do > > > > - the Sista bytecode set (with backwards compatibility support for the existing set). This gives us 32k literals, > > - FullBlockClosure, which means I depended method objects for blocks, and hence (slightly) faster block activation > > - read-only objects and hence read-only literals > > > > These three provide the necessary support for the image-level Scorch adaptive optimiser. This will be demonstrated at ESUG in Prague and productized by next year > > > > - collapsing of ContextPart and MethodContext onto Context. The closure model does not need BlockContext so this is a nice simplification, one that Pharo has already released. > > > > Revised finalization. Spur supports ephemerons which allow pre-mortem finalisation (they identify objects about to die, not the death of objects) and allow cycle-free addition of dependencies (which is how they identify objects about to die). Since individual ephemerons must be identified (those whose keys are about to die) there is a finalisation queue into which the GC places such ephemerons. Spur also enqueues weak arrays that have lost efferent on the same queue. Hence we can profitably reimplement many finalisation facilities: > > - the current scheme has the VM signal a semaphore in any GC cycle that collects one or more referents of one or more weak arrays, and weak arrays are held in registries. hence to finalise a single weak array requires finalising any and all weak arrays in the registries. Instead, weak arrays can hold onto a manager directly through an inst var and have this object do the work, now meaning that only those weak arrays that lose references do work in each GC cycle. > > - DependentsFields can be reimplemented to use a non-finalising ephemeron to attach dependents to objects without preventing their GC (unlike the current weak array approach) > > - pre-mortem finalisation allows files to auto-finalise, hence flushing their contents before closing instead of finalising a copy which merely closes the file descriptor > > - exiting the image should be arguably be done only after running a full GC and then draining the finalisation queue, and hence arguably there may need to be an emergency exit > > > > All of these together will impact code, breaking some old code, but always in simply fixable ways, and provide new facilities and pave the way to a substantial performance increase with Sista. Hence these changes need IMO to be a full release, not a point release. > > > >>> On Wed, Jul 13, 2016 at 4:17 AM, Herbert K??nig wrote: > >>> Really exciting news! > >>> > >>> Herbert > >>> > >>> > >>> -------- Urspr??ngliche Nachricht -------- > >>> Von: "marcel.taeumel" > >>> Datum:13.07.2016 10:29 (GMT+01:00) > >>> An: squeak-dev@lists.squeakfoundation.org > >>> Betreff: [squeak-dev] [ANN] The Squeak 5.1 Release Plan > >>> > >>> Hey, there. > >>> > >>> I just want to inform all of you that we are in the middle of preparing the > >>> next Squeak 5.1 release. We are working on automation for > >>> generating/updating all release artifacts so that we are eventually able to > >>> shorten our release cycle in the future. For this, we are using smalltalkCI > >>> (thanks Fabio!), TravisCI, and AppVeyor. > >>> > >>> Here are the important dates: > >>> * Feature Freeze on July 31, 23:59 AOE > >>> * Code Freeze on August 14, 23:59 AOE > >>> * Release between August 15 and 19 > >>> > >>> As these dates suggest, our goal is to have the release before this year's > >>> ESUG. However, there is another important Smalltalk-related event this year: > >>> 20 years of Squeak. :-) Yeah! It was around October 1996, when the first > >>> Squeak came into the world. ...having its own worlds. :D So, it would only > >>> make sense to also have a special release for this birthday. For this, we > >>> revived all of the cool multimedia content, known from Squeak 1 through > >>> Squeak 3, and made it fit for the current Squeak code base. Oh, this is so > >>> exciting. :-) > >>> > >>> Anyway, what's with Squeak 5.1 and 64-bit? Since the release of Squeak 5.0, > >>> we've been working hard and made a lot of bug fixes and added some features > >>> to improve the overall usability and robustness of the Squeak live > >>> programming system. Meanwhile, the VMs improved as well. Cog's object format > >>> "Spur" got more robust, the JIT improved, and the whole code base moved from > >>> SVN to Git: https://github.com/OpenSmalltalk/opensmalltalk-vm. > >>> > >>> Still, what's up with 64-bit? We have working 64-bit VMs for Mac OS X and > >>> Linux. Hence, we will take the chance and also release 64-bit bundles for > >>> Squeak 5.1. Be informed that this means a new .image file. You cannot open a > >>> 64-bit .image with a 32-bit VM and vice versa. This, however, is nothing > >>> serious because we are working on an updated version of our SystemTracer to > >>> convert back and forth. With limitations, of course. ;-) You cannot fill a > >>> bottle of beer into a shot glass. > >>> > >>> What's up with the All-in-one? There will be the usual 32-bit all-in-one > >>> package, which combines VMs for Linux, Mac OS X, and Windows. Since there > >>> will be no 64-bit Windows VM within the next two months, we refrain from > >>> creating an almost-all-in-one-32/64 package. This would only confuse the > >>> users. In the future, we can arguably expand the concept of the All-in-one > >>> to also contain 32-bit and 64-bit VMs and images. > >>> > >>> So, what are the prospective release artifacts for Squeak 5.1? > >>> * All-in-one (Linux/Mac/Win) 32-bit > >>> * Mac OS X App 32-bit, signed > >>> * Mac OS X App 64-bit, signed > >>> * Linux Bundle 32-bit > >>> * Linux Bundle 64-bit > >>> * Windows App (maybe with MSI Installer) 32-bit, maybe signed > >>> * ZIP archive containing .image and .changes, no VM, no .sources > >>> > >>> We plan to also use the new release automation process for Squeak 5.0 and > >>> update those release artifacts as well. We will update our squeak.org > >>> Website but you will always find the artifacts on > >>> http://files.squeak.org/5.0 and http://files.squeak.org/5.1 . > >>> > >>> :-) > >>> > >>> Best, > >>> Marcel > >>> > >>> > >>> > >>> -- > >>> View this message in context: > >>> http://forum.world.st/ANN-The-Squeak-5-1-Release-Plan-tp4906439.html > >>> Sent from the Squeak - Dev mailing list archive at Nabble.com. > >> From commits at source.squeak.org Fri Jul 15 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 15 21:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160715215502.14981.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068278.html Name: ShoutCore-eem.55 Ancestors: ShoutCore-ul.54 Fix SHMCClassDefinition>>withAllSuperclassesDo: to always supply a SHMCClassDefinition when supplying a MCClassDefinition. MCClassDefinition does not understand classPool and hence SHParserST80>>#resolve: crashes if trying to identify a #classVar when given a MCClassDefinition. ============================================= From asqueaker at gmail.com Sat Jul 16 17:14:37 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sat Jul 16 17:15:19 2016 Subject: [squeak-dev] [ANN] The Squeak 5.1 Release Plan In-Reply-To: <20160715194442.GA42739@shell.msen.com> References: <40w02ecb4cfivgsdo1hnaujx.1468401429800@email.android.com> <2FF3C0A2-BD2C-473C-98F6-8D8E9002EBC1@gmail.com> <20160715194442.GA42739@shell.msen.com> Message-ID: On Fri, Jul 15, 2016 at 2:44 PM, David T. Lewis wrote: > I don't see any problem with making a 64-bit image available along with > the 5.1 release. Nor do I, but... > After all, we went for many years supporting both 6504 > and 6505 image format through several releases. The 32-bit and 64-bit > Spur images will be essentially the same image, just saved in a different > object format. > > We do need to make sure that if someone chooses to load the 64-bit > version, that they are aware of the compatibility restrictions. But > that's nothing that we cannot handle with a good download page on > the web site, and I'm sure we can do that :-) ... we talked about in our meeting that we were gonna have two separate downloads, one for 32-bit, one for 64-bit. If so, what will be the basis for somone to be able discern which one they need to download? I assume you want to call them "5.1/32" and "5.1/64" because you want to support 32-bit for years to come, and so the "5.1" names the image contents, while the "32" or "64" names the word size. That buys me a lot more time to upgrade Magma to work on 64-bit, and makes sense if we really are going to support 32-bit for years to come, but as the RPi 3 is 64-bit, it seems like new installations with new versions of Squeak are most likely going to go 64-bit. I could be wrong. From Marcel.Taeumel at hpi.de Sat Jul 16 16:34:56 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat Jul 16 17:17:55 2016 Subject: [squeak-dev] Re: [ANN] The Squeak 5.1 Release Plan In-Reply-To: <20160715194442.GA42739@shell.msen.com> References: <40w02ecb4cfivgsdo1hnaujx.1468401429800@email.android.com> <2FF3C0A2-BD2C-473C-98F6-8D8E9002EBC1@gmail.com> <20160715194442.GA42739@shell.msen.com> Message-ID: <1468686896429-4906777.post@n4.nabble.com> David T. Lewis wrote > I don't see any problem with making a 64-bit image available along with > the 5.1 release. After all, we went for many years supporting both 6504 > and 6505 image format through several releases. The 32-bit and 64-bit > Spur images will be essentially the same image, just saved in a different > object format. > > We do need to make sure that if someone chooses to load the 64-bit > version, that they are aware of the compatibility restrictions. But > that's nothing that we cannot handle with a good download page on > the web site, and I'm sure we can do that :-) > > Dave > > > On Fri, Jul 15, 2016 at 12:34:04PM -0500, Chris Muller wrote: >> I'm talking about version numbers, not features. In the past, >> whenever we broke backward compatibility, we incremented the major >> version number. This is what we did with the 4.6 / 5.0 release. >> >> Image conversion utilities notwithstanding, 64-bit essentially breaks >> backward compatibility, so "5.1" seems inappropriate for the new >> 64-bit release. Do you object to your 6.0 features list being part of >> a "7.0" (or a 6.1, if we're not breaking backward compatibility with >> 64-bit 6.0)? >> >> Also, it wasn't clear to me what you wanted to call the 32-bit version >> of "5.1". Did you want to have have a 5.1-64 and a 5.1-32? >> >> >> On Fri, Jul 15, 2016 at 11:33 AM, Eliot Miranda < > eliot.miranda@ > > wrote: >> > Hi Chris, >> > >> > >> >> On Jul 13, 2016, at 9:40 AM, Chris Muller < > asqueaker@ > > wrote: >> >> >> >> I thought "6.0" was planned to be the 64-bit version of "5.1", and 5.1 >> >> the 32-bit version of the same image contents... >> > >> > That's not what I tried to articulate at all. What I want for 5.1 is >> essentially what Marcel outlines below, a cleaned up 5.0 with 64-bit >> support. >> > >> > For 6.0 I'm hoping we will do >> > >> > - the Sista bytecode set (with backwards compatibility support for the >> existing set). This gives us 32k literals, >> > - FullBlockClosure, which means I depended method objects for blocks, >> and hence (slightly) faster block activation >> > - read-only objects and hence read-only literals >> > >> > These three provide the necessary support for the image-level Scorch >> adaptive optimiser. This will be demonstrated at ESUG in Prague and >> productized by next year >> > >> > - collapsing of ContextPart and MethodContext onto Context. The >> closure model does not need BlockContext so this is a nice >> simplification, one that Pharo has already released. >> > >> > Revised finalization. Spur supports ephemerons which allow pre-mortem >> finalisation (they identify objects about to die, not the death of >> objects) and allow cycle-free addition of dependencies (which is how they >> identify objects about to die). Since individual ephemerons must be >> identified (those whose keys are about to die) there is a finalisation >> queue into which the GC places such ephemerons. Spur also enqueues weak >> arrays that have lost efferent on the same queue. Hence we can >> profitably reimplement many finalisation facilities: >> > - the current scheme has the VM signal a semaphore in any GC cycle that >> collects one or more referents of one or more weak arrays, and weak >> arrays are held in registries. hence to finalise a single weak array >> requires finalising any and all weak arrays in the registries. Instead, >> weak arrays can hold onto a manager directly through an inst var and have >> this object do the work, now meaning that only those weak arrays that >> lose references do work in each GC cycle. >> > - DependentsFields can be reimplemented to use a non-finalising >> ephemeron to attach dependents to objects without preventing their GC >> (unlike the current weak array approach) >> > - pre-mortem finalisation allows files to auto-finalise, hence flushing >> their contents before closing instead of finalising a copy which merely >> closes the file descriptor >> > - exiting the image should be arguably be done only after running a >> full GC and then draining the finalisation queue, and hence arguably >> there may need to be an emergency exit >> > >> > All of these together will impact code, breaking some old code, but >> always in simply fixable ways, and provide new facilities and pave the >> way to a substantial performance increase with Sista. Hence these >> changes need IMO to be a full release, not a point release. >> > >> >>> On Wed, Jul 13, 2016 at 4:17 AM, Herbert K??nig < > herbertkoenig@ > > wrote: >> >>> Really exciting news! >> >>> >> >>> Herbert >> >>> >> >>> >> >>> -------- Urspr??ngliche Nachricht -------- >> >>> Von: "marcel.taeumel" >> >>> Datum:13.07.2016 10:29 (GMT+01:00) >> >>> An: > squeak-dev@.squeakfoundation >> >>> Betreff: [squeak-dev] [ANN] The Squeak 5.1 Release Plan >> >>> >> >>> Hey, there. >> >>> >> >>> I just want to inform all of you that we are in the middle of >> preparing the >> >>> next Squeak 5.1 release. We are working on automation for >> >>> generating/updating all release artifacts so that we are eventually >> able to >> >>> shorten our release cycle in the future. For this, we are using >> smalltalkCI >> >>> (thanks Fabio!), TravisCI, and AppVeyor. >> >>> >> >>> Here are the important dates: >> >>> * Feature Freeze on July 31, 23:59 AOE >> >>> * Code Freeze on August 14, 23:59 AOE >> >>> * Release between August 15 and 19 >> >>> >> >>> As these dates suggest, our goal is to have the release before this >> year's >> >>> ESUG. However, there is another important Smalltalk-related event >> this year: >> >>> 20 years of Squeak. :-) Yeah! It was around October 1996, when the >> first >> >>> Squeak came into the world. ...having its own worlds. :D So, it would >> only >> >>> make sense to also have a special release for this birthday. For >> this, we >> >>> revived all of the cool multimedia content, known from Squeak 1 >> through >> >>> Squeak 3, and made it fit for the current Squeak code base. Oh, this >> is so >> >>> exciting. :-) >> >>> >> >>> Anyway, what's with Squeak 5.1 and 64-bit? Since the release of >> Squeak 5.0, >> >>> we've been working hard and made a lot of bug fixes and added some >> features >> >>> to improve the overall usability and robustness of the Squeak live >> >>> programming system. Meanwhile, the VMs improved as well. Cog's object >> format >> >>> "Spur" got more robust, the JIT improved, and the whole code base >> moved from >> >>> SVN to Git: https://github.com/OpenSmalltalk/opensmalltalk-vm. >> >>> >> >>> Still, what's up with 64-bit? We have working 64-bit VMs for Mac OS X >> and >> >>> Linux. Hence, we will take the chance and also release 64-bit bundles >> for >> >>> Squeak 5.1. Be informed that this means a new .image file. You cannot >> open a >> >>> 64-bit .image with a 32-bit VM and vice versa. This, however, is >> nothing >> >>> serious because we are working on an updated version of our >> SystemTracer to >> >>> convert back and forth. With limitations, of course. ;-) You cannot >> fill a >> >>> bottle of beer into a shot glass. >> >>> >> >>> What's up with the All-in-one? There will be the usual 32-bit >> all-in-one >> >>> package, which combines VMs for Linux, Mac OS X, and Windows. Since >> there >> >>> will be no 64-bit Windows VM within the next two months, we refrain >> from >> >>> creating an almost-all-in-one-32/64 package. This would only confuse >> the >> >>> users. In the future, we can arguably expand the concept of the >> All-in-one >> >>> to also contain 32-bit and 64-bit VMs and images. >> >>> >> >>> So, what are the prospective release artifacts for Squeak 5.1? >> >>> * All-in-one (Linux/Mac/Win) 32-bit >> >>> * Mac OS X App 32-bit, signed >> >>> * Mac OS X App 64-bit, signed >> >>> * Linux Bundle 32-bit >> >>> * Linux Bundle 64-bit >> >>> * Windows App (maybe with MSI Installer) 32-bit, maybe signed >> >>> * ZIP archive containing .image and .changes, no VM, no .sources >> >>> >> >>> We plan to also use the new release automation process for Squeak 5.0 >> and >> >>> update those release artifacts as well. We will update our squeak.org >> >>> Website but you will always find the artifacts on >> >>> http://files.squeak.org/5.0 and http://files.squeak.org/5.1 . >> >>> >> >>> :-) >> >>> >> >>> Best, >> >>> Marcel >> >>> >> >>> >> >>> >> >>> -- >> >>> View this message in context: >> >>> http://forum.world.st/ANN-The-Squeak-5-1-Release-Plan-tp4906439.html >> >>> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> +1 I am not a fan of coupling VM-features to the Squeak version number. We should avoid breaking compatibility again, if possible. At best, Squeak 6.0 will include the SystemTracer and support converting back-and-forth between 32-bit, 64-bit, Spur, Non-Spur, V3, Cog. This would justify an increment of Squeak's main version number -- at least in terms of compatibility. :-) Best, Marcel -- View this message in context: http://forum.world.st/AW-squeak-dev-ANN-The-Squeak-5-1-Release-Plan-tp4906443p4906777.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Sat Jul 16 16:37:28 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat Jul 16 17:20:27 2016 Subject: [squeak-dev] Re: rice paper background in trunk? In-Reply-To: <155e6c941ae.f2fe0d7c151159.8941300178559309588@zoho.com> References: <1468233522363-4905942.post@n4.nabble.com> <20160711123455.GA95801@shell.msen.com> <1468328139600-4906222.post@n4.nabble.com> <155e0a282ed.11017c1c0146731.1244152017588238102@zoho.com> <1468351033347-4906335.post@n4.nabble.com> <1468401616992-4906470.post@n4.nabble.com> <155e6c941ae.f2fe0d7c151159.8941300178559309588@zoho.com> Message-ID: <1468687048554-4906778.post@n4.nabble.com> gettimothy wrote > Hi Marcel > > There was already a file service for images to set project backgrounds. > Update your trunk and it should work again. > > Best, > Marcel > > > > > I updated the image and opened a FileList > > I navigated to, selected an image.jpg file and clicked the import button. > > In Extras->Graphical Imports a thumbnail of the image shows up. > > I grab it, fiddle a bit and set as background. > > It doesn't fit, so I poke around some more trying to make it fill the > entire background. > > Anyway, the desktop background loader works far more intuitively for me. > > > Thanks for your help. Hi Timothy, almost. :) Just drag-drop an image from the outside of Squeak into the Squeak world and choose "set graphic as backround". It did not refer to the use of Squeak's FileList tool. Best, Marcel -- View this message in context: http://forum.world.st/rice-paper-background-in-trunk-tp4905261p4906778.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From gettimothy at zoho.com Sat Jul 16 20:30:14 2016 From: gettimothy at zoho.com (gettimothy) Date: Sat Jul 16 20:30:20 2016 Subject: [squeak-dev] Re: rice paper background in trunk? In-Reply-To: <1468687048554-4906778.post@n4.nabble.com> References: <1468233522363-4905942.post@n4.nabble.com> <20160711123455.GA95801@shell.msen.com> <1468328139600-4906222.post@n4.nabble.com> <155e0a282ed.11017c1c0146731.1244152017588238102@zoho.com> <1468351033347-4906335.post@n4.nabble.com> <1468401616992-4906470.post@n4.nabble.com> <155e6c941ae.f2fe0d7c151159.8941300178559309588@zoho.com> <1468687048554-4906778.post@n4.nabble.com> Message-ID: <155f566f8cf.c34ef9581112.974413301749602061@zoho.com> That worked. Thanks. Communicating that to a user who has never done that needs work. In Linux land "HowTos" are a big thing...perhaps a Help Book with different HowTo topics would be a good idea? cheers. tty ---- On Sat, 16 Jul 2016 12:37:28 -0400 marcel.taeumel <Marcel.Taeumel@hpi.de> wrote ---- gettimothy wrote > Hi Marcel > > There was already a file service for images to set project backgrounds. > Update your trunk and it should work again. > > Best, > Marcel > > > > > I updated the image and opened a FileList > > I navigated to, selected an image.jpg file and clicked the import button. > > In Extras-&gt;Graphical Imports a thumbnail of the image shows up. > > I grab it, fiddle a bit and set as background. > > It doesn't fit, so I poke around some more trying to make it fill the > entire background. > > Anyway, the desktop background loader works far more intuitively for me. > > > Thanks for your help. Hi Timothy, almost. :) Just drag-drop an image from the outside of Squeak into the Squeak world and choose "set graphic as backround". It did not refer to the use of Squeak's FileList tool. Best, Marcel -- View this message in context: http://forum.world.st/rice-paper-background-in-trunk-tp4905261p4906778.html Sent from the Squeak - Dev mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160716/af4478b2/attachment.htm From hannes.hirzel at gmail.com Sat Jul 16 22:24:59 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Sat Jul 16 22:25:01 2016 Subject: [squeak-dev] Re: rice paper background in trunk? In-Reply-To: <155f566f8cf.c34ef9581112.974413301749602061@zoho.com> References: <1468233522363-4905942.post@n4.nabble.com> <20160711123455.GA95801@shell.msen.com> <1468328139600-4906222.post@n4.nabble.com> <155e0a282ed.11017c1c0146731.1244152017588238102@zoho.com> <1468351033347-4906335.post@n4.nabble.com> <1468401616992-4906470.post@n4.nabble.com> <155e6c941ae.f2fe0d7c151159.8941300178559309588@zoho.com> <1468687048554-4906778.post@n4.nabble.com> <155f566f8cf.c34ef9581112.974413301749602061@zoho.com> Message-ID: On 7/16/16, gettimothy wrote: > That worked. Thanks. > > Communicating that to a user who has never done that needs work. > > > In Linux land "HowTos" are a big thing...perhaps a Help Book with different > HowTo topics would be a good idea? http://wiki.squeak.org/squeak/1796 ? > cheers. > > tty > > ---- On Sat, 16 Jul 2016 12:37:28 -0400 marcel.taeumel > <Marcel.Taeumel@hpi.de> wrote ---- > > gettimothy wrote > > Hi Marcel > > > > There was already a file service for images to set project backgrounds. > > > Update your trunk and it should work again. > > > > Best, > > Marcel > > > > > > > > > > I updated the image and opened a FileList > > > > I navigated to, selected an image.jpg file and clicked the import > button. > > > > In Extras-&gt;Graphical Imports a thumbnail of the image shows up. > > > > > I grab it, fiddle a bit and set as background. > > > > It doesn't fit, so I poke around some more trying to make it fill the > > entire background. > > > > Anyway, the desktop background loader works far more intuitively for > me. > > > > > > Thanks for your help. > > Hi Timothy, > > almost. :) Just drag-drop an image from the outside of Squeak into the > Squeak world and choose "set graphic as backround". It did not refer to the > > use of Squeak's FileList tool. > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/rice-paper-background-in-trunk-tp4905261p4906778.html > > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > > > > > > From smalltalker2 at mac.com Sun Jul 17 03:18:38 2016 From: smalltalker2 at mac.com (John Pfersich) Date: Sun Jul 17 03:18:42 2016 Subject: [squeak-dev] [ANN] The Squeak 5.1 Release Plan In-Reply-To: References: <40w02ecb4cfivgsdo1hnaujx.1468401429800@email.android.com> <2FF3C0A2-BD2C-473C-98F6-8D8E9002EBC1@gmail.com> <20160715194442.GA42739@shell.msen.com> Message-ID: <6EFAB416-726C-44AC-9C8C-C5E5DA2602B4@mac.com> The Pi is 64 bit, but the OS, at least Raspian, is 32 bit, and they don't seem to be in a rush to take it to 64 bits. Sent from my iPad > On Jul 16, 2016, at 10:14, Chris Muller wrote: > >> On Fri, Jul 15, 2016 at 2:44 PM, David T. Lewis wrote: >> I don't see any problem with making a 64-bit image available along with >> the 5.1 release. > > Nor do I, but... > >> After all, we went for many years supporting both 6504 >> and 6505 image format through several releases. The 32-bit and 64-bit >> Spur images will be essentially the same image, just saved in a different >> object format. >> >> We do need to make sure that if someone chooses to load the 64-bit >> version, that they are aware of the compatibility restrictions. But >> that's nothing that we cannot handle with a good download page on >> the web site, and I'm sure we can do that :-) > > ... we talked about in our meeting that we were gonna have two > separate downloads, one for 32-bit, one for 64-bit. If so, what will > be the basis for somone to be able discern which one they need to > download? > > I assume you want to call them "5.1/32" and "5.1/64" because you want > to support 32-bit for years to come, and so the "5.1" names the image > contents, while the "32" or "64" names the word size. > > That buys me a lot more time to upgrade Magma to work on 64-bit, and > makes sense if we really are going to support 32-bit for years to > come, but as the RPi 3 is 64-bit, it seems like new installations with > new versions of Squeak are most likely going to go 64-bit. I could be > wrong. > From gettimothy at zoho.com Sun Jul 17 10:53:07 2016 From: gettimothy at zoho.com (gettimothy) Date: Sun Jul 17 10:53:17 2016 Subject: [squeak-dev] Re: rice paper background in trunk? In-Reply-To: References: <1468233522363-4905942.post@n4.nabble.com> <20160711123455.GA95801@shell.msen.com> <1468328139600-4906222.post@n4.nabble.com> <155e0a282ed.11017c1c0146731.1244152017588238102@zoho.com> <1468351033347-4906335.post@n4.nabble.com> <1468401616992-4906470.post@n4.nabble.com> <155e6c941ae.f2fe0d7c151159.8941300178559309588@zoho.com> <1468687048554-4906778.post@n4.nabble.com> <155f566f8cf.c34ef9581112.974413301749602061@zoho.com> Message-ID: <155f87cf92e.10d9482f7294.7541915764191074808@zoho.com> ---- On Sat, 16 Jul 2016 18:24:59 -0400 H. Hirzel <hannes.hirzel@gmail.com> wrote ---- On 7/16/16, gettimothy <gettimothy@zoho.com> wrote: > That worked. Thanks. > > Communicating that to a user who has never done that needs work. > > > In Linux land "HowTos" are a big thing...perhaps a Help Book with different > HowTo topics would be a good idea? http://wiki.squeak.org/squeak/1796 ? I don't think that is good enough; an end user should not have to think about setting the Background (granted, the drag-n-drop is easy, but obtaining the knowledge to do that was not). On my WindowMaker window manager, its Right click for a menu->appearance->Background->Images->an image. With Wessell's Background Loader, its a very similar use case. I am sure Windows and Mac have similar ease-of-use paradigms. There is nothing intuitive about the World menu for setting the background image and there is nothing within the World that links to the http://wiki.squeak.org/squeak/1796 cordially, tty -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160717/543f8a8f/attachment.htm From tim at rowledge.org Sun Jul 17 16:52:07 2016 From: tim at rowledge.org (tim Rowledge) Date: Sun Jul 17 16:51:30 2016 Subject: [squeak-dev] [ANN] The Squeak 5.1 Release Plan In-Reply-To: <6EFAB416-726C-44AC-9C8C-C5E5DA2602B4@mac.com> References: <40w02ecb4cfivgsdo1hnaujx.1468401429800@email.android.com> <2FF3C0A2-BD2C-473C-98F6-8D8E9002EBC1@gmail.com> <20160715194442.GA42739@shell.msen.com> <6EFAB416-726C-44AC-9C8C-C5E5DA2602B4@mac.com> Message-ID: > On 16-07-2016, at 8:18 PM, John Pfersich wrote: > > The Pi is 64 bit, but the OS, at least Raspian, is 32 bit, and they don't seem to be in a rush to take it to 64 bits. As you say, no rush. It?ll happen eventually. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: XM: Exclusive Maybe From commits at source.squeak.org Mon Jul 18 00:34:45 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Jul 18 00:34:47 2016 Subject: [squeak-dev] The Trunk: Monticello-cmm.636.mcz Message-ID: Chris Muller uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-cmm.636.mcz ==================== Summary ==================== Name: Monticello-cmm.636 Author: cmm Time: 17 July 2016, 7:34:31.098547 pm UUID: 1d09791b-60cb-4d7b-839c-808afa996e5e Ancestors: Monticello-cmm.635 Better error handling for mc history. =============== Diff against Monticello-cmm.635 =============== Item was changed: ----- Method: MCHttpRepository>>historyOf: (in category 'accessing') ----- historyOf: aMCDefinition + | reply | + reply := self + httpGet: 'history' + for: aMCDefinition. + ^ reply isString + ifTrue: + [ Warning signal: 'History request failed. Server ''reply'' in debugger.'. + Array empty ] + ifFalse: [ (ReferenceStream on: reply) next ]! - ^ (ReferenceStream on: - (self - httpGet: 'history' - for: aMCDefinition)) next! Item was changed: ----- Method: MCHttpRepository>>originOf: (in category 'accessing') ----- originOf: aMCDefinition + | reply | + reply := self + httpGet: 'origin' + for: aMCDefinition. + ^ reply isString + ifTrue: + [ Warning signal: 'Origin request failed. Server ''reply'' in debugger.'. + Array empty ] + ifFalse: [ (ReferenceStream on: reply) next ]! - ^ (ReferenceStream on: - (self - httpGet: 'origin' - for: aMCDefinition)) next! From btc at openinworld.com Mon Jul 18 18:02:09 2016 From: btc at openinworld.com (Ben Coman) Date: Mon Jul 18 18:02:33 2016 Subject: [squeak-dev] Re: Time millisecondClockValue (was: The Trunk: Morphic-mt.1080.mcz) In-Reply-To: References: <1455560226230-4877671.post@n4.nabble.com> Message-ID: Hi All, Did anything further come of this discussion... On Wed, Feb 17, 2016 at 1:13 AM, Eliot Miranda wrote: > Hi Tim, > > On Tue, Feb 16, 2016 at 2:19 AM, Tim Felgentreff > wrote: >> >> Hi Eliot, >> >> am I understanding correctly that (one of) your ideas is to have just one >> clock that "drifts" towards wall clock time? How fast would it drift? I >> agree this would be neat for a local image, but what if someone from Japan >> sends me their image (happened to me just last week) and wants me to check >> something in it? Will the in-image clock run slow for a few hours until my >> timezone has caught up with Japan? > > > First, the timezone issue is completely separate, and is only an image > issue. The VM's time basis is UTC microseconds since 1901 (see Time > class>>utcMicrosecondClock). This should answer the same value at the same > time, within the bounds of clock drift, any where on the globe. So if you > are sent an image from Japan nothing changes to times in that image when yu > start it locally, except for the inaccuracies between wall time (some atomic > clock somewhere) and your machine and the machine on which the image was > saved in Japan. > > As a convenience the VM also offers microseconds since 1901 in local time > (see Time class>>localMicrosecondClock). This is suitable for deriving UI > times to display to the user, or times to write to a log, etc. But it is > /not/ to be used to schedule delays, etc, etc. > > Second, yes, the idea is to have the VM drift time towards wall time. First > some back ground. > > By wall time I mean the UTC time as provided by some atomic clock, i.e. an > extremely accurate absolute time as is accessed by a network time protocol > daemon (ntpd) to keep one's machine's clock accurate. > Current hardware provide inaccurate clocks. See e.g. > http://www.pcworld.com/article/2891892/why-computers-still-struggle-to-tell-the-time.html. > One can expect such hardware to drift relative to wall time by less than a > minute a day, but still drift by ammounts noticeable to humans over the > course of hours. > OS's such as Mac OS and linux provide several clocks, two of which are of > interest. One is the computer's notion of wall time, typically provided by > gettimeofday. I'm going to call this "local time". This clock can run fast > or slow and can jump backwards. It does this because the underlying clock > drifts relative to wall time (and I guess may drift faster or slower > depending on temperature) and periodically is corrected by ntpd. > The second notion of time is monotonic time which is a local clock (the > hardware's underlying clock) which is guaranteed to advance monotonically > but is not guaranteed to agree with local time, let alone wall time. On > Unix this is provided by clock_gettime and on Mac OS X by mach_absolute_time > (see Ryan's message below). I'm going to call this "monotonic time". > > The issue is that because local time jumps around it can't be used to > measure durations reliably. If you're profiling something using local time > and half-way through something the ntpd adjusts local time then one's > measurements will be off. One solution to this is to use monotonic time. > The problem is that this complicates the programmer model. It is now up to > the programmer to understand the difference between local and monotonic > times and use the "right clock" in the "right circumstances". This seems to > me to be against the Smalltalk approach, which is to provide a safe virtual > machine which protects the programmer from the vagaries and dangers of real > machines. The flip side of this is it restricts the tools available to a programmer at the Image level, and adds complexity to the VM that Image programmers can't see if ThingsGoWrong(TM). If the Image had direct access to the several clocks provided by clock_gettime(), it would be possible for an Image level programmer to explore and *understand* the difference in them. I know I could write a routine in C to explore this, but I'd prefer to do it in Smalltalk. Indeed for Delay scheduler, it might be good to choose between CLOCK_MONOTONIC and CLOCK_MONOTONIC_RAW without modifying the VM, and observe what happens when I set the system time back a couple of days. Or maybe explore CLOCK_PROCESS_CPUTIME_ID for benchmarking. > Further I think that providing a more ideal clock is > straight-forward. Here's what I propose. But why do our own slewing to match local "real" time, when it seems NTP already slews CLOCK_MONOTONIC to wall-time using adjtime [1]. There seem to be a couple of choices to making clock_gettime() cross platform... a. https://gist.github.com/alfwatt/3588c5aa1f7a1ef7a3bb b. https://github.com/ThomasHabets/monotonic_clock [1] http://man7.org/linux/man-pages/man2/clock_gettime.2.html > > > The Cog VMs use a heartbeat to control the rate at which the VM checks for > external input, delay expiry, etc. This is typically a 500Hz/2ms heartbeat, > but for the purposes of this discussion let's imagine its a 1Khz/1ms > heartbeat. One thing that happens every heartbeat is that the VM updates > its notion of local time. Currently the VM's notion of local time can jump > forwards or backwards because of ntpd activity. > > Current computer clocks are accurate to a few seconds a day, but let's > assume a pessimal accuracy of 1 second an hour. That's an accuracy of > 1/3600, 0r 0.0277777%. If the heartbeat accesses both local time (via > gettimeofday) and monotonic time (via clock_gettime) on every heartbeat it > can compute a delta which it computes from the difference between local and > monotonic times. On each heartbeat it sums the delta to compute an offset > and applies this offset to monotonic time. The VM then answers offset > monotonic time as the value of "wall time". If we restrict the the delta on > each heartbeat we can keep the VMs clock monotonic and have it drift towards > local time, which itself is periodically corrected to wall time by ntpd. > If, for example, the delta is restricted to +/-5usecs when moving in one > direction and +/-10usecs when changing direction, the VM's notion of > monotonic time advances within 1% of actual monotonic time and approaches > local time "soon", since, because monotonic time is reasonably accurate a > rate of change of 1% soon overcomes a drift of at most 0.0277777%. > > Let's express this as a Smalltalk class. Units are microseconds (usecs). > > Object subclass: VMClock instanceVariableNames: 'offset now' > > initialize > now := OperatingSystem gettimeofday. > offset := now - OperatingSystem clock_gettime > > run > "Compute now every 1ms such that now approaches localTime." > [(Delay forMilliseconds: 1) wait. > self computeNowGivenMonotonic: OperatingSystem clock_gettime andLocal: > OperatingSystem gettimeofday. > true] whileTrue > > computeNowGivenMonotonic: monotonicTime andLocal: localTime > "Compute now such that now approaches localTime." > | difference putativeNow delta | > "Note now = (monotonicTime + offset) and we want (monotonicTime + offset) = > localTime. > delta is the ammount to change offset by in this tick." > localTime = monotonicTime > ifTrue: > ["the two clocks agree; if an offset is in effect, reduce it by no more than > 5 usecs" > delta := offset >= 0 > ifTrue: [(offset min: 5) negated] > ifFalse: [(offset max: -5) negated]] > ifFalse: > [putativeNow := monotonicTime + offset. > difference := localTime - putativeNow. > delta := 0. > difference < 0 ifTrue: "localTime is behind; make the offset more negative > by no more than 5 usecs" > [delta := difference max: (offset >= 0 ifTrue: [-10] ifFalse: [-5])]. > difference > 0 ifTrue: "localTime is ahead; make the offset more positive by > no more than 5 usecs" > [delta := difference min: (offset >= 0 ifTrue: [5] ifFalse: [10])]]. > offset := offset + delta. > now := monotonicTime + offset. > ^now > > I've written and attached a little test program that randomly offsets > localTime every "3.6 seconds" in a simulation. Here's the simulation; the > drift is exaggerated: > > run > "VMClockTester new run" > "VMClockTester new run last: 20" > "VMClockTester new run copyFrom: 36 * 3 - 5 to: 36 * 3 + 50" > | times | > times := (Array new: 1000) writeStream. > 1 to: 1000000 do: "1 million ticks = 1000 seconds" > [:i| > monotonicClock := monotonicClock + 1000. > localClock := localClock + 1000 + (i \\ 3600 = 0 > ifTrue: [| drift | > [(drift := (drifter next - 0.5 * (20 * 3600)) rounded) = 0] whileTrue. > drift] > ifFalse: [0]). > self computeNowGivenMonotonic: monotonicClock andLocal: localClock. > i \\ 100 = 0 ifTrue: > [times nextPut: {now. offset. monotonicClock. localClock. monotonicClock - > localClock. now - localClock}]]. > ^times contents > > Here's what happens on the third perturbation. Before the perturbation > localTime is behind monotonicTime by 13ms, and the offset has stabilised to > -13ms. At the perturbation localTime jumps to 44ms behind monotonic time, > and over successive iterations the offset increases (negatively) and the > error is reduced from 30ms to 13ms. [snip] > > Here's the last 20 entries. localTime is now 197ms ahead of monotonic time, > and the offset reduces from 221ms to 202ms, and the difference between now > and localTime reduces from 24ms to 5ms. [snip] > > Note that a clock that is accurate to within 1% is more than accurate enough > for good time measurements. the VM's GC introduces pauses of around 1ms > even on fast hardware, and the occasional code zone reclamation introduces > similar pauses. So times can be affected by the odd millisecond anyway. > > I'm sure the above is some standard piece of control theory but apart from > one open university program I'll never forget which began with attempts to > make a moving model tank target a moving object and ended with a sparrow on > a wind-blown branch keeping its head perfectly stationary, I've never > studied it. Anyone who knows what the above algorithm's known as please let > me know. > >> Also, this sounds like a lot of logic to have in the VM and a source of >> possible confusion for the user - they would have to know to use the right >> invocations for measuring timespans, and not rely on a naive "let's get the >> time now and subtract it from the time later to get the difference", because >> they might end up with a timespan over "slow" or "fast" seconds. > > > No, that's exactly the point. With the above algorithm in use, (I believe) > time is never more than 1% inaccurate, but converges on wall time, and hence > the programmer can use one clock for both measurement and determining wall > time. The only assumptions are that computer clocks are accurate to more > than 1% and that the ntpd daemon adjusts the local notion of wall time based > on a reputable clock. > > > Review appreciated. > >> cheers, >> Tim >> >> On 16 February 2016 at 00:49, Eliot Miranda >> wrote: >>> >>> Hi Levente, Hi Bert, Hi All, >>> >>> On Mon, Feb 15, 2016 at 3:39 PM, Levente Uzonyi >>> wrote: >>>> >>>> On Mon, 15 Feb 2016, Bert Freudenberg wrote: >>>> >>>>> >>>>>> On 15.02.2016, at 10:17, marcel.taeumel wrote: >>>>>> >>>>>> Hi Bert, >>>>>> >>>>>> this was just a regression. There has always been this check in the >>>>>> past for >>>>>> Morphic projects and still today for MVC projects. >>>>> >>>>> >>>>> Ah, so we lost the check at some point? >>>>> >>>>>> If you would have used VM or OS startup time, this would still be >>>>>> problematic after an overflow. (Hence the comment about snapshotting). >>>>>> So, >>>>>> this fix does not directly address the discussion about synching >>>>>> #millisecondClockValue to wall clock. >>>>> >>>>> >>>>> I still think it should answer milliseconds since startup. Why would we >>>>> change that? >>>> >>>> >>>> Eliot changed it recently. Probably to avoid the rollover issues. The >>>> correct fix would be to use to UTC clock instead of the local one in Time >>>> class >> #millisecondClockValue. >>> >>> >>> I changed it for simplicity. Alas it turns out to be a much more complex >>> issue. Here's a discussion I'm having with Ryan Macnak, which covers what >>> his team did with the Dart VM. Please read, it's interesting. >>> >>> >>> On Sun, Feb 14, 2016 at 12:08 AM, Ryan Macnak wrote: >>>> >>>> On Sat, Feb 13, 2016 at 5:32 PM, Eliot Miranda >>>> wrote: >>>>> >>>>> Hi Ryan, >>>>> >>>>> >>>>> On Sat, Feb 13, 2016 at 11:21 AM, Ryan Macnak >>>>> wrote: >>>>>> >>>>>> On Thu, Feb 11, 2016 at 10:46 PM, Eliot Miranda >>>>>> wrote: >>>>> >>>>> Further back Ryan wrote: >>>>>>>> >>>>>>>> 5) Travis found an assertion failure. Unfortunately the assertions >>>>>>>> fail to include paths with the line numbers. >>>>>>>> >>>>>>>> >>>>>>>> (newUtcMicrosecondClock >= utcMicrosecondClock 124) >>>>>>> >>>>>>> >>>>>>> It's easy to track down. Just grep for the string. You'll find it >>>>>>> in sqUnixHeartbeat.c. I've seen this from time to time, and have yet to >>>>>>> understand it. What OS are you seeing this on? >>>>>> >>>>>> >>>>>> Linux. Looking at the comment above this assert, I see Cog is using >>>>>> the wrong clock. One should not rely on the realtime clock (gettimeofday) to >>>>>> move steadily forward. It can jump around due to NTP syncs, the machine >>>>>> sleeping or the user changing the time settings. Programs running at startup >>>>>> on the Raspberry Pi in particular can see very large jumps because it has no >>>>>> hardware clock (battery too expensive) so the first NTP sync will be a very >>>>>> large correction. We fixed this in the Dart VM a few months ago. Timers need >>>>>> to be scheduled using the monotonic clock (Linux clock_gettime, Mac >>>>>> mach_absolute_time). >>>>> >>>>> >>>>> Yes, this isn't satisfactory either. One needs the VM to answer >>>>> something that is close to wall time, not drift over time. I think there >>>>> needs to be some clever averaging algorithm that has the property of always >>>>> advancing the clock but trying to converge on wall time. >>>>> >>>>> >>>>> One can imagine on every occasion that the VM updates its notion of the >>>>> time it accesses both clock_gettime and gettimeofday and computes an offset >>>>> that is some fraction of the delta between the current clock_gettime and the >>>>> previous clock_gettime multiplied by the difference between the two clocks. >>>>> So the VM time is always monotonic, but hunts towards wall time as answered >>>>> by gettimeofday. >>>>> >>>>> >>>>> Thanks. I was unaware of clock_gettime & mach_absolute_time. Given >>>>> these two it shouldn;t be too hard to concoct something that works. Or is >>>>> that the approach you've taken in Dart? Or are there standard algorithms >>>>> out there? I'll take a look. >>>> >>>> >>>> I'm not seeing why it needs to be close to wall time. The VM needs make >>>> both a wall clock and a monotonic clock available to the image. >>> >>> >>> That's one way, but it's complex. I think having a clock that is >>> flexible, that will deviate by no more than a specified percentage from >>> clock_gettime in approaching wall time is simpler for the user albeit more >>> complex for the VM implementor. It therefore seems to me to be in the >>> Smalltalk tradition. >>> >>>> In Dart, there are three uses of time >>>> >>>> Stopwatch measures durations (BlockClosure timeToRun). It uses the >>>> monotonic clock. >>>> >>>> Timer schedules a future notification (Delay wait). It uses the >>>> monotonic clock. >>>> >>>> DateTime gets a timestamp (DateAndTime now). It uses the wall clock. >>> >>> >>> Makes sense, at the cost of having two clocks. >>> >>>> >>>> Smalltalk has the additional complication of handling in-flight Delays >>>> or timeToRuns as an image moves across processes. There will be a >>>> discontinuity in both clocks, and both of them can move backwards. The logic >>>> to deal with the discontinuity must already exist for Delays, though I >>>> suspect no one has bothered for timeToRun. If I create a thousand Delays >>>> spaced apart by a minute, snapshot, move the system time forward a day, then >>>> resume, they remain evenly spaced. This is because of #save/restoreResumptionTimes on image shutdown/startup. >>>> If I do this while the image is still >>>> running, they all fire at once and the VM becomes unresponsive, which is >>>> what using the monotonic clock would fix. Yes, since Delays are currently using gettimeofday() they expire when the system clock jumps. But also, with the move of Delay to a microsecond clock and removal of the clock-wrap checks, perhaps the algorithm is more susceptible to jitter or ntp moving the clock backwards. I would need to think more about that, but anyway clock_gettime(MONOTONIC) which slews wall-time seems a much better choice. I'd be interested in doing some work getting this into the VM since I'd like it for Pharo also. cheers -ben >>> >>> >>> Yes, but there is another way. Delays can be implemented to function as >>> durations, not deadlines. This is orthogonal to clocks. If Delays are >>> deadlines then it is correct that on start-up they all fire. If they are >>> durations, it is not. From cunningham.cb at gmail.com Mon Jul 18 18:09:53 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Mon Jul 18 18:09:56 2016 Subject: [squeak-dev] Re: Time millisecondClockValue (was: The Trunk: Morphic-mt.1080.mcz) In-Reply-To: References: <1455560226230-4877671.post@n4.nabble.com> Message-ID: On Mon, Jul 18, 2016 at 11:02 AM, Ben Coman wrote: > Hi All, > > I know I could write a routine > in C to explore this, but I'd prefer to do it in Smalltalk. > That is soooo true. > > -cbc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160718/88bd19a3/attachment.htm From commits at source.squeak.org Mon Jul 18 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Jul 18 21:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160718215502.12248.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068279.html Name: Monticello-cmm.636 Ancestors: Monticello-cmm.635 Better error handling for mc history. ============================================= From eliot.miranda at gmail.com Mon Jul 18 22:20:53 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Jul 18 22:20:57 2016 Subject: [squeak-dev] MCSmalltalkhubRepository for Squeak? Message-ID: Hi, any one have MCSmalltalkhubRepository? I want to load the ASN1 code to explore a performance regression in the VM, but I must first have access to smalltalkhub. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160718/f72b0195/attachment.htm From eliot.miranda at gmail.com Mon Jul 18 22:27:14 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Jul 18 22:27:22 2016 Subject: [squeak-dev] Re: Time millisecondClockValue (was: The Trunk: Morphic-mt.1080.mcz) In-Reply-To: References: <1455560226230-4877671.post@n4.nabble.com> Message-ID: On Mon, Jul 18, 2016 at 11:02 AM, Ben Coman wrote: > Hi All, > > Did anything further come of this discussion... > > On Wed, Feb 17, 2016 at 1:13 AM, Eliot Miranda > wrote: > > Hi Tim, > > > > On Tue, Feb 16, 2016 at 2:19 AM, Tim Felgentreff < > timfelgentreff@gmail.com> > > wrote: > >> > >> Hi Eliot, > >> > >> am I understanding correctly that (one of) your ideas is to have just > one > >> clock that "drifts" towards wall clock time? How fast would it drift? I > >> agree this would be neat for a local image, but what if someone from > Japan > >> sends me their image (happened to me just last week) and wants me to > check > >> something in it? Will the in-image clock run slow for a few hours until > my > >> timezone has caught up with Japan? > > > > > > First, the timezone issue is completely separate, and is only an image > > issue. The VM's time basis is UTC microseconds since 1901 (see Time > > class>>utcMicrosecondClock). This should answer the same value at the > same > > time, within the bounds of clock drift, any where on the globe. So if > you > > are sent an image from Japan nothing changes to times in that image when > yu > > start it locally, except for the inaccuracies between wall time (some > atomic > > clock somewhere) and your machine and the machine on which the image was > > saved in Japan. > > > > As a convenience the VM also offers microseconds since 1901 in local time > > (see Time class>>localMicrosecondClock). This is suitable for deriving > UI > > times to display to the user, or times to write to a log, etc. But it is > > /not/ to be used to schedule delays, etc, etc. > > > > Second, yes, the idea is to have the VM drift time towards wall time. > First > > some back ground. > > > > By wall time I mean the UTC time as provided by some atomic clock, i.e. > an > > extremely accurate absolute time as is accessed by a network time > protocol > > daemon (ntpd) to keep one's machine's clock accurate. > > Current hardware provide inaccurate clocks. See e.g. > > > http://www.pcworld.com/article/2891892/why-computers-still-struggle-to-tell-the-time.html > . > > One can expect such hardware to drift relative to wall time by less than > a > > minute a day, but still drift by ammounts noticeable to humans over the > > course of hours. > > OS's such as Mac OS and linux provide several clocks, two of which are of > > interest. One is the computer's notion of wall time, typically provided > by > > gettimeofday. I'm going to call this "local time". This clock can run > fast > > or slow and can jump backwards. It does this because the underlying > clock > > drifts relative to wall time (and I guess may drift faster or slower > > depending on temperature) and periodically is corrected by ntpd. > > The second notion of time is monotonic time which is a local clock (the > > hardware's underlying clock) which is guaranteed to advance monotonically > > but is not guaranteed to agree with local time, let alone wall time. On > > Unix this is provided by clock_gettime and on Mac OS X by > mach_absolute_time > > (see Ryan's message below). I'm going to call this "monotonic time". > > > > The issue is that because local time jumps around it can't be used to > > measure durations reliably. If you're profiling something using local > time > > and half-way through something the ntpd adjusts local time then one's > > measurements will be off. One solution to this is to use monotonic time. > > The problem is that this complicates the programmer model. It is now up > to > > the programmer to understand the difference between local and monotonic > > times and use the "right clock" in the "right circumstances". This > seems to > > me to be against the Smalltalk approach, which is to provide a safe > virtual > > machine which protects the programmer from the vagaries and dangers of > real > > machines. > > The flip side of this is it restricts the tools available to a > programmer at the Image level, and adds complexity to the VM that > Image programmers can't see if ThingsGoWrong(TM). If the Image had > direct access to the several clocks provided by clock_gettime(), it > would be possible for an Image level programmer to explore and > *understand* the difference in them. I know I could write a routine > in C to explore this, but I'd prefer to do it in Smalltalk. > > Indeed for Delay scheduler, it might be good to choose between > CLOCK_MONOTONIC and CLOCK_MONOTONIC_RAW without modifying the VM, and > observe what happens when I set the system time back a couple of days. > Or maybe explore CLOCK_PROCESS_CPUTIME_ID for benchmarking. > > > Further I think that providing a more ideal clock is > > straight-forward. Here's what I propose. > > > But why do our own slewing to match local "real" time, when it seems > NTP already slews CLOCK_MONOTONIC to wall-time using adjtime [1]. > What do we do on platforms that don't have adjtime? The skewing algorithm is simple and adding it to the VM means we're not dependent on adjtime. Isn't that a good thing? > > There seem to be a couple of choices to making clock_gettime() cross > platform... > a. https://gist.github.com/alfwatt/3588c5aa1f7a1ef7a3bb > b. https://github.com/ThomasHabets/monotonic_clock > > [1] http://man7.org/linux/man-pages/man2/clock_gettime.2.html Sure. It's implementable. Why not add the simple algorithm to our VM and then we're done? > The Cog VMs use a heartbeat to control the rate at which the VM checks for > > external input, delay expiry, etc. This is typically a 500Hz/2ms > heartbeat, > > but for the purposes of this discussion let's imagine its a 1Khz/1ms > > heartbeat. One thing that happens every heartbeat is that the VM updates > > its notion of local time. Currently the VM's notion of local time can > jump > > forwards or backwards because of ntpd activity. > > > > Current computer clocks are accurate to a few seconds a day, but let's > > assume a pessimal accuracy of 1 second an hour. That's an accuracy of > > 1/3600, 0r 0.0277777%. If the heartbeat accesses both local time (via > > gettimeofday) and monotonic time (via clock_gettime) on every heartbeat > it > > can compute a delta which it computes from the difference between local > and > > monotonic times. On each heartbeat it sums the delta to compute an > offset > > and applies this offset to monotonic time. The VM then answers offset > > monotonic time as the value of "wall time". If we restrict the the > delta on > > each heartbeat we can keep the VMs clock monotonic and have it drift > towards > > local time, which itself is periodically corrected to wall time by ntpd. > > If, for example, the delta is restricted to +/-5usecs when moving in one > > direction and +/-10usecs when changing direction, the VM's notion of > > monotonic time advances within 1% of actual monotonic time and approaches > > local time "soon", since, because monotonic time is reasonably accurate a > > rate of change of 1% soon overcomes a drift of at most 0.0277777%. > > > > Let's express this as a Smalltalk class. Units are microseconds (usecs). > > > > Object subclass: VMClock instanceVariableNames: 'offset now' > > > > initialize > > now := OperatingSystem gettimeofday. > > offset := now - OperatingSystem clock_gettime > > > > run > > "Compute now every 1ms such that now approaches localTime." > > [(Delay forMilliseconds: 1) wait. > > self computeNowGivenMonotonic: OperatingSystem clock_gettime andLocal: > > OperatingSystem gettimeofday. > > true] whileTrue > > > > computeNowGivenMonotonic: monotonicTime andLocal: localTime > > "Compute now such that now approaches localTime." > > | difference putativeNow delta | > > "Note now = (monotonicTime + offset) and we want (monotonicTime + > offset) = > > localTime. > > delta is the ammount to change offset by in this tick." > > localTime = monotonicTime > > ifTrue: > > ["the two clocks agree; if an offset is in effect, reduce it by no more > than > > 5 usecs" > > delta := offset >= 0 > > ifTrue: [(offset min: 5) negated] > > ifFalse: [(offset max: -5) negated]] > > ifFalse: > > [putativeNow := monotonicTime + offset. > > difference := localTime - putativeNow. > > delta := 0. > > difference < 0 ifTrue: "localTime is behind; make the offset more > negative > > by no more than 5 usecs" > > [delta := difference max: (offset >= 0 ifTrue: [-10] ifFalse: [-5])]. > > difference > 0 ifTrue: "localTime is ahead; make the offset more > positive by > > no more than 5 usecs" > > [delta := difference min: (offset >= 0 ifTrue: [5] ifFalse: [10])]]. > > offset := offset + delta. > > now := monotonicTime + offset. > > ^now > > > > I've written and attached a little test program that randomly offsets > > localTime every "3.6 seconds" in a simulation. Here's the simulation; > the > > drift is exaggerated: > > > > run > > "VMClockTester new run" > > "VMClockTester new run last: 20" > > "VMClockTester new run copyFrom: 36 * 3 - 5 to: 36 * 3 + 50" > > | times | > > times := (Array new: 1000) writeStream. > > 1 to: 1000000 do: "1 million ticks = 1000 seconds" > > [:i| > > monotonicClock := monotonicClock + 1000. > > localClock := localClock + 1000 + (i \\ 3600 = 0 > > ifTrue: [| drift | > > [(drift := (drifter next - 0.5 * (20 * 3600)) rounded) = 0] whileTrue. > > drift] > > ifFalse: [0]). > > self computeNowGivenMonotonic: monotonicClock andLocal: localClock. > > i \\ 100 = 0 ifTrue: > > [times nextPut: {now. offset. monotonicClock. localClock. monotonicClock > - > > localClock. now - localClock}]]. > > ^times contents > > > > Here's what happens on the third perturbation. Before the perturbation > > localTime is behind monotonicTime by 13ms, and the offset has stabilised > to > > -13ms. At the perturbation localTime jumps to 44ms behind monotonic > time, > > and over successive iterations the offset increases (negatively) and the > > error is reduced from 30ms to 13ms. > [snip] > > > > Here's the last 20 entries. localTime is now 197ms ahead of monotonic > time, > > and the offset reduces from 221ms to 202ms, and the difference between > now > > and localTime reduces from 24ms to 5ms. > [snip] > > > > Note that a clock that is accurate to within 1% is more than accurate > enough > > for good time measurements. the VM's GC introduces pauses of around 1ms > > even on fast hardware, and the occasional code zone reclamation > introduces > > similar pauses. So times can be affected by the odd millisecond anyway. > > > > I'm sure the above is some standard piece of control theory but apart > from > > one open university program I'll never forget which began with attempts > to > > make a moving model tank target a moving object and ended with a sparrow > on > > a wind-blown branch keeping its head perfectly stationary, I've never > > studied it. Anyone who knows what the above algorithm's known as please > let > > me know. > > > >> Also, this sounds like a lot of logic to have in the VM and a source of > >> possible confusion for the user - they would have to know to use the > right > >> invocations for measuring timespans, and not rely on a naive "let's get > the > >> time now and subtract it from the time later to get the difference", > because > >> they might end up with a timespan over "slow" or "fast" seconds. > > > > > > No, that's exactly the point. With the above algorithm in use, (I > believe) > > time is never more than 1% inaccurate, but converges on wall time, and > hence > > the programmer can use one clock for both measurement and determining > wall > > time. The only assumptions are that computer clocks are accurate to more > > than 1% and that the ntpd daemon adjusts the local notion of wall time > based > > on a reputable clock. > > > > > > Review appreciated. > > > >> cheers, > >> Tim > >> > >> On 16 February 2016 at 00:49, Eliot Miranda > >> wrote: > >>> > >>> Hi Levente, Hi Bert, Hi All, > >>> > >>> On Mon, Feb 15, 2016 at 3:39 PM, Levente Uzonyi > >>> wrote: > >>>> > >>>> On Mon, 15 Feb 2016, Bert Freudenberg wrote: > >>>> > >>>>> > >>>>>> On 15.02.2016, at 10:17, marcel.taeumel > wrote: > >>>>>> > >>>>>> Hi Bert, > >>>>>> > >>>>>> this was just a regression. There has always been this check in the > >>>>>> past for > >>>>>> Morphic projects and still today for MVC projects. > >>>>> > >>>>> > >>>>> Ah, so we lost the check at some point? > >>>>> > >>>>>> If you would have used VM or OS startup time, this would still be > >>>>>> problematic after an overflow. (Hence the comment about > snapshotting). > >>>>>> So, > >>>>>> this fix does not directly address the discussion about synching > >>>>>> #millisecondClockValue to wall clock. > >>>>> > >>>>> > >>>>> I still think it should answer milliseconds since startup. Why would > we > >>>>> change that? > >>>> > >>>> > >>>> Eliot changed it recently. Probably to avoid the rollover issues. The > >>>> correct fix would be to use to UTC clock instead of the local one in > Time > >>>> class >> #millisecondClockValue. > >>> > >>> > >>> I changed it for simplicity. Alas it turns out to be a much more > complex > >>> issue. Here's a discussion I'm having with Ryan Macnak, which covers > what > >>> his team did with the Dart VM. Please read, it's interesting. > >>> > >>> > >>> On Sun, Feb 14, 2016 at 12:08 AM, Ryan Macnak > wrote: > >>>> > >>>> On Sat, Feb 13, 2016 at 5:32 PM, Eliot Miranda < > eliot.miranda@gmail.com> > >>>> wrote: > >>>>> > >>>>> Hi Ryan, > >>>>> > >>>>> > >>>>> On Sat, Feb 13, 2016 at 11:21 AM, Ryan Macnak > >>>>> wrote: > >>>>>> > >>>>>> On Thu, Feb 11, 2016 at 10:46 PM, Eliot Miranda > >>>>>> wrote: > >>>>> > >>>>> Further back Ryan wrote: > >>>>>>>> > >>>>>>>> 5) Travis found an assertion failure. Unfortunately the assertions > >>>>>>>> fail to include paths with the line numbers. > >>>>>>>> > >>>>>>>> > >>>>>>>> (newUtcMicrosecondClock >= utcMicrosecondClock 124) > >>>>>>> > >>>>>>> > >>>>>>> It's easy to track down. Just grep for the string. You'll find it > >>>>>>> in sqUnixHeartbeat.c. I've seen this from time to time, and have > yet to > >>>>>>> understand it. What OS are you seeing this on? > >>>>>> > >>>>>> > >>>>>> Linux. Looking at the comment above this assert, I see Cog is using > >>>>>> the wrong clock. One should not rely on the realtime clock > (gettimeofday) to > >>>>>> move steadily forward. It can jump around due to NTP syncs, the > machine > >>>>>> sleeping or the user changing the time settings. Programs running > at startup > >>>>>> on the Raspberry Pi in particular can see very large jumps because > it has no > >>>>>> hardware clock (battery too expensive) so the first NTP sync will > be a very > >>>>>> large correction. We fixed this in the Dart VM a few months ago. > Timers need > >>>>>> to be scheduled using the monotonic clock (Linux clock_gettime, Mac > >>>>>> mach_absolute_time). > >>>>> > >>>>> > >>>>> Yes, this isn't satisfactory either. One needs the VM to answer > >>>>> something that is close to wall time, not drift over time. I think > there > >>>>> needs to be some clever averaging algorithm that has the property of > always > >>>>> advancing the clock but trying to converge on wall time. > >>>>> > >>>>> > >>>>> One can imagine on every occasion that the VM updates its notion of > the > >>>>> time it accesses both clock_gettime and gettimeofday and computes an > offset > >>>>> that is some fraction of the delta between the current clock_gettime > and the > >>>>> previous clock_gettime multiplied by the difference between the two > clocks. > >>>>> So the VM time is always monotonic, but hunts towards wall time as > answered > >>>>> by gettimeofday. > >>>>> > >>>>> > >>>>> Thanks. I was unaware of clock_gettime & mach_absolute_time. Given > >>>>> these two it shouldn;t be too hard to concoct something that works. > Or is > >>>>> that the approach you've taken in Dart? Or are there standard > algorithms > >>>>> out there? I'll take a look. > >>>> > >>>> > >>>> I'm not seeing why it needs to be close to wall time. The VM needs > make > >>>> both a wall clock and a monotonic clock available to the image. > > > > >>> > >>> > >>> That's one way, but it's complex. I think having a clock that is > >>> flexible, that will deviate by no more than a specified percentage from > >>> clock_gettime in approaching wall time is simpler for the user albeit > more > >>> complex for the VM implementor. It therefore seems to me to be in the > >>> Smalltalk tradition. > >>> > >>>> In Dart, there are three uses of time > >>>> > >>>> Stopwatch measures durations (BlockClosure timeToRun). It uses the > >>>> monotonic clock. > >>>> > >>>> Timer schedules a future notification (Delay wait). It uses the > >>>> monotonic clock. > >>>> > >>>> DateTime gets a timestamp (DateAndTime now). It uses the wall clock. > >>> > >>> > >>> Makes sense, at the cost of having two clocks. > >>> > >>>> > >>>> Smalltalk has the additional complication of handling in-flight Delays > >>>> or timeToRuns as an image moves across processes. There will be a > >>>> discontinuity in both clocks, and both of them can move backwards. > The logic > >>>> to deal with the discontinuity must already exist for Delays, though I > >>>> suspect no one has bothered for timeToRun. If I create a thousand > Delays > >>>> spaced apart by a minute, snapshot, move the system time forward a > day, then > >>>> resume, they remain evenly spaced. > > This is because of #save/restoreResumptionTimes on image shutdown/startup. > > >>>> If I do this while the image is still > >>>> running, they all fire at once and the VM becomes unresponsive, which > is > >>>> what using the monotonic clock would fix. > > Yes, since Delays are currently using gettimeofday() they expire when > the system clock jumps. But also, with the move of Delay to a > microsecond clock and removal of the clock-wrap checks, perhaps the > algorithm is more susceptible to jitter or ntp moving the clock > backwards. I would need to think more about that, but anyway > clock_gettime(MONOTONIC) which slews wall-time seems a much better > choice. I'd be interested in doing some work getting this into the VM > since I'd like it for Pharo also. > > cheers -ben > > >>> > >>> > >>> Yes, but there is another way. Delays can be implemented to function > as > >>> durations, not deadlines. This is orthogonal to clocks. If Delays are > >>> deadlines then it is correct that on start-up they all fire. If they > are > >>> durations, it is not. > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160718/e74c055c/attachment-0001.htm From cunningham.cb at gmail.com Mon Jul 18 22:27:16 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Mon Jul 18 22:27:23 2016 Subject: [squeak-dev] MCSmalltalkhubRepository for Squeak? In-Reply-To: References: Message-ID: You should be able to just use the HTTP repository to access smalltalkhub. That's what I've been doing for a while now. I do have a user - and log in with the HTTP Repository, but I'm not sure it is required for just reading. -cbc On Mon, Jul 18, 2016 at 3:20 PM, Eliot Miranda wrote: > Hi, > > any one have MCSmalltalkhubRepository? I want to load the ASN1 code > to explore a performance regression in the VM, but I must first have access > to smalltalkhub. > > _,,,^..^,,,_ > best, Eliot > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160718/16331686/attachment.htm From leves at caesar.elte.hu Mon Jul 18 22:28:31 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Mon Jul 18 22:28:37 2016 Subject: [squeak-dev] MCSmalltalkhubRepository for Squeak? In-Reply-To: References: Message-ID: I don't even wanna know what that thing is. This should work: MCHttpRepository location: 'http://www.smalltalkhub.com/mc/NorbertHartl/ASN1/main' user: '' password: '' Levente On Mon, 18 Jul 2016, Eliot Miranda wrote: > Hi, > ? ? any one have?MCSmalltalkhubRepository?? I want to load the ASN1 code to explore a performance regression in the VM, but I must first have access to smalltalkhub. > > _,,,^..^,,,_ > best,?Eliot > > From Das.Linux at gmx.de Mon Jul 18 22:28:42 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon Jul 18 22:28:47 2016 Subject: [squeak-dev] MCSmalltalkhubRepository for Squeak? In-Reply-To: References: Message-ID: <1AC67A3B-9274-4621-8E06-0815862C5BDA@gmx.de> On 19.07.2016, at 00:20, Eliot Miranda wrote: > Hi, > > any one have MCSmalltalkhubRepository? I want to load the ASN1 code to explore a performance regression in the VM, but I must first have access to smalltalkhub. It's plain Monticello: Use http://www.smalltalkhub.com/mc/PROJECT/REPO/main/ For example http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main/ Unfortunately, it appears down anyway, at the moment. Best regards -Tobias > > _,,,^..^,,,_ > best, Eliot From eliot.miranda at gmail.com Mon Jul 18 22:30:18 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Jul 18 22:30:22 2016 Subject: [squeak-dev] MCSmalltalkhubRepository for Squeak? In-Reply-To: References: Message-ID: On Mon, Jul 18, 2016 at 3:27 PM, Chris Cunningham wrote: > You should be able to just use the HTTP repository to access > smalltalkhub. That's what I've been doing for a while now. > > I do have a user - and log in with the HTTP Repository, but I'm not sure > it is required for just reading. > OK, so how do I map MCSmalltalkhubRepository owner: 'NorbertHartl' project: 'ASN1' user: '' password: '' which prints its URL as http://smalltalkhub.com/NorbertHartl/ASN1/main to an HTTPRepository spec? This doesn't work: MCHttpRepository location: 'http://smalltalkhub.com/NorbertHartl/ASN1/main' user: '' password: '' neither does this: MCHttpRepository location: 'http://smalltalkhub.com/NorbertHartl/ASN1' user: '' password: '' > > -cbc > > On Mon, Jul 18, 2016 at 3:20 PM, Eliot Miranda > wrote: > >> Hi, >> >> any one have MCSmalltalkhubRepository? I want to load the ASN1 code >> to explore a performance regression in the VM, but I must first have access >> to smalltalkhub. >> >> _,,,^..^,,,_ >> best, Eliot >> >> >> >> > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160718/8d1a9645/attachment.htm From eliot.miranda at gmail.com Mon Jul 18 22:31:13 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Jul 18 22:31:16 2016 Subject: [squeak-dev] MCSmalltalkhubRepository for Squeak? In-Reply-To: <1AC67A3B-9274-4621-8E06-0815862C5BDA@gmx.de> References: <1AC67A3B-9274-4621-8E06-0815862C5BDA@gmx.de> Message-ID: On Mon, Jul 18, 2016 at 3:28 PM, Tobias Pape wrote: > > On 19.07.2016, at 00:20, Eliot Miranda wrote: > > > Hi, > > > > any one have MCSmalltalkhubRepository? I want to load the ASN1 code > to explore a performance regression in the VM, but I must first have access > to smalltalkhub. > > It's plain Monticello: > > Use > http://www.smalltalkhub.com/mc/PROJECT/REPO/main/ > For example > > http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main/ > > Unfortunately, it appears down anyway, at the moment. > Ah, so indeed I do want the following, right? MCHttpRepository location: 'http://smalltalkhub.com/NorbertHartl/ASN1/main' user: '' password: '' and it'l work as soon as the site's back up? Who's the admin? _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160718/205172ed/attachment.htm From Das.Linux at gmx.de Mon Jul 18 22:30:43 2016 From: Das.Linux at gmx.de (Das.Linux@gmx.de) Date: Mon Jul 18 22:31:34 2016 Subject: [squeak-dev] MCSmalltalkhubRepository for Squeak? In-Reply-To: <1AC67A3B-9274-4621-8E06-0815862C5BDA@gmx.de> References: <1AC67A3B-9274-4621-8E06-0815862C5BDA@gmx.de> Message-ID: On 19.07.2016, at 00:28, Tobias Pape wrote: > > On 19.07.2016, at 00:20, Eliot Miranda wrote: > >> Hi, >> >> any one have MCSmalltalkhubRepository? I want to load the ASN1 code to explore a performance regression in the VM, but I must first have access to smalltalkhub. > > It's plain Monticello: > > Use > http://www.smalltalkhub.com/mc/PROJECT/REPO/main/ > For example > http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main/ > > Unfortunately, it appears down anyway, at the moment. Correction, back up. Maybe slight hickup. Best regards -tobias > > Best regards > -Tobias >> >> _,,,^..^,,,_ >> best, Eliot > > > From cunningham.cb at gmail.com Mon Jul 18 22:33:25 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Mon Jul 18 22:33:28 2016 Subject: [squeak-dev] MCSmalltalkhubRepository for Squeak? In-Reply-To: References: <1AC67A3B-9274-4621-8E06-0815862C5BDA@gmx.de> Message-ID: It is back up (or is here). And the trick is you nee the '/mc' in the name: MCHttpRepository location: 'http://smalltalkhub.com/mc/NorbertHartl/ASN1/main ' user: '' password: '' -cbc On Mon, Jul 18, 2016 at 3:31 PM, Eliot Miranda wrote: > > > On Mon, Jul 18, 2016 at 3:28 PM, Tobias Pape wrote: > >> >> On 19.07.2016, at 00:20, Eliot Miranda wrote: >> >> > Hi, >> > >> > any one have MCSmalltalkhubRepository? I want to load the ASN1 code >> to explore a performance regression in the VM, but I must first have access >> to smalltalkhub. >> >> It's plain Monticello: >> >> Use >> http://www.smalltalkhub.com/mc/PROJECT/REPO/main/ >> For example >> >> http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main/ >> >> Unfortunately, it appears down anyway, at the moment. >> > > Ah, so indeed I do want the following, right? > > MCHttpRepository > location: 'http://smalltalkhub.com/NorbertHartl/ASN1/main' > user: '' > password: '' > > and it'l work as soon as the site's back up? Who's the admin? > > _,,,^..^,,,_ > best, Eliot > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160718/06035d08/attachment.htm From tim at rowledge.org Mon Jul 18 23:20:08 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon Jul 18 23:19:30 2016 Subject: [squeak-dev] Rounding floats Message-ID: <3E107FAD-4C58-47DA-8E42-6DA50302CB70@rowledge.org> I know that it?s a hard thing to deal with floating point numbers around the fiddly edges, but are we really unable to do a decent job of rounding floats to reasonable numbers of decimal places? This can?t be a rare thing to need to do. For example, I?m reading temperature values for various places from the openweathermap.org site and many of them are specified to 2dp, which seems a bit optimistic for a weather site. But if I try, for example 292.37 roundTo: 0.1 I get the very unhelpful 292.40000?00003 (with too many 0s to count by eye). I understand that one option is to use formatted printing of the number but that doesn?t seem practical for this usage right now. So, numerics aficionados, can we do any better than the sensible seeming but unsuccessful code in Number>>roundTo: ? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Ubi dubium ibi libertas From nicolas.cellier.aka.nice at gmail.com Tue Jul 19 00:26:39 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Tue Jul 19 00:26:46 2016 Subject: [squeak-dev] Rounding floats In-Reply-To: <3E107FAD-4C58-47DA-8E42-6DA50302CB70@rowledge.org> References: <3E107FAD-4C58-47DA-8E42-6DA50302CB70@rowledge.org> Message-ID: Hi Tim, you can't round float that easily, they are not multiple of 1/5. But you can round their printed decimal representation. That's fair because this is what you want: print the damn float 292.37 printShowingMaxDecimalPlaces: 1 Technically, 2924*0.1 and 2924/10.0 differ. The second one is guaranteed to be the closest float to (2924/10) because there's only one inexact operation involved (the division). The first one, not so, it's 2924 * (1/10.0), two inexact operations Remember, 1/10 = 0.1 is false... That's why roundTo: is failing: it uses the second formula. Otherwise, of course, you would use ScaledDecimals or Fractions... 239.37 roundTo: 0.1s. (239.37 roundTo: 1/10) asFloat. But you want to print rounded, so just print rounded, don't bother with round. 2016-07-19 1:20 GMT+02:00 tim Rowledge : > I know that it?s a hard thing to deal with floating point numbers around > the fiddly edges, but are we really unable to do a decent job of rounding > floats to reasonable numbers of decimal places? This can?t be a rare thing > to need to do. > > For example, I?m reading temperature values for various places from the > openweathermap.org site and many of them are specified to 2dp, which > seems a bit optimistic for a weather site. But if I try, for example > 292.37 roundTo: 0.1 > I get the very unhelpful 292.40000?00003 (with too many 0s to count by > eye). I understand that one option is to use formatted printing of the > number but that doesn?t seem practical for this usage right now. > > > So, numerics aficionados, can we do any better than the sensible seeming > but unsuccessful code in Number>>roundTo: ? > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Ubi dubium ibi libertas > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160719/0acdcab3/attachment.htm From eliot.miranda at gmail.com Tue Jul 19 00:33:41 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Jul 19 00:33:45 2016 Subject: [squeak-dev] lock up in screen drag Message-ID: Hi ALl, I'm seeing a lock up that appears to be on window dragging. This is on Mac OS X with a new VM. The symptom is that the screen goes blank. I see this process when sending SIGUSR1 to the process: Process 0x4800ad0 priority 40 0xbffac304 M [] in Delay>wait 0x4802858: a(n) Delay 0xbffac324 M BlockClosure>ifCurtailed: 0x4a920e0: a(n) BlockClosure 0xbffac340 M Delay>wait 0x4802858: a(n) Delay 0xbffac36c M Rectangle>newRectFrom: 0x4803df0: a(n) Rectangle 0xbffac39c I PluggableSystemWindow(SystemWindow)>doFastFrameDrag: 0x4802740: a(n) PluggableSystemWindow 0xbffac3b8 M PluggableSystemWindow(SystemWindow)>startDragFromLabel: 0x4802740: a(n) PluggableSystemWindow 0xbffac3d8 M EventHandler>send:to:withEvent:fromMorph: 0x4803f30: a(n) EventHandler 0xbffac408 I EventHandler>startDrag:fromMorph: 0x4803f30: a(n) EventHandler 0xbffac428 M StringMorph(Morph)>startDrag: 0x4801458: a(n) StringMorph 0xbffac44c I MouseClickState>drag: 0x4803fc8: a(n) MouseClickState 0xbffac474 M MouseClickState>handleEvent:from: 0x4803fc8: a(n) MouseClickState 0xbffac498 M HandMorph>handleEvent: 0x5cef1a0: a(n) HandMorph 0xbffac4c4 M HandMorph>processEvents 0x5cef1a0: a(n) HandMorph 0xbffac4e0 M [] in WorldState>doOneCycleNowFor: 0x5d1ba70: a(n) WorldState 0xbffac504 M Array(SequenceableCollection)>do: 0x4e6fa10: a(n) Array 0xbffac520 M WorldState>handsDo: 0x5d1ba70: a(n) WorldState 0xbffac540 M WorldState>doOneCycleNowFor: 0x5d1ba70: a(n) WorldState 0xbffac55c M WorldState>doOneCycleFor: 0x5d1ba70: a(n) WorldState 0xbffac578 M PasteUpMorph>doOneCycle 0x52d8780: a(n) PasteUpMorph 0xbffac590 M [] in MorphicProject>spawnNewProcess 0x604fe08: a(n) MorphicProject 0xbffac5b0 I [] in BlockClosure>newProcess 0x48040b8: a(n) BlockClosure _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160718/93c83f13/attachment.htm From Marcel.Taeumel at hpi.de Tue Jul 19 04:43:15 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Jul 19 05:26:33 2016 Subject: [squeak-dev] Re: lock up in screen drag In-Reply-To: References: Message-ID: <1468903395479-4907067.post@n4.nabble.com> Eliot Miranda-2 wrote > Hi ALl, > > I'm seeing a lock up that appears to be on window dragging. This is on > Mac OS X with a new VM. The symptom is that the screen goes blank. I see > this process when sending SIGUSR1 to the process: > > Process 0x4800ad0 priority 40 > 0xbffac304 M [] in Delay>wait 0x4802858: a(n) Delay > 0xbffac324 M BlockClosure>ifCurtailed: 0x4a920e0: a(n) BlockClosure > 0xbffac340 M Delay>wait 0x4802858: a(n) Delay > 0xbffac36c M Rectangle>newRectFrom: 0x4803df0: a(n) Rectangle > 0xbffac39c I PluggableSystemWindow(SystemWindow)>doFastFrameDrag: > 0x4802740: a(n) PluggableSystemWindow > 0xbffac3b8 M PluggableSystemWindow(SystemWindow)>startDragFromLabel: > 0x4802740: a(n) PluggableSystemWindow > 0xbffac3d8 M EventHandler>send:to:withEvent:fromMorph: 0x4803f30: a(n) > EventHandler > 0xbffac408 I EventHandler>startDrag:fromMorph: 0x4803f30: a(n) > EventHandler > 0xbffac428 M StringMorph(Morph)>startDrag: 0x4801458: a(n) StringMorph > 0xbffac44c I MouseClickState>drag: 0x4803fc8: a(n) MouseClickState > 0xbffac474 M MouseClickState>handleEvent:from: 0x4803fc8: a(n) > MouseClickState > 0xbffac498 M HandMorph>handleEvent: 0x5cef1a0: a(n) HandMorph > 0xbffac4c4 M HandMorph>processEvents 0x5cef1a0: a(n) HandMorph > 0xbffac4e0 M [] in WorldState>doOneCycleNowFor: 0x5d1ba70: a(n) WorldState > 0xbffac504 M Array(SequenceableCollection)>do: 0x4e6fa10: a(n) Array > 0xbffac520 M WorldState>handsDo: 0x5d1ba70: a(n) WorldState > 0xbffac540 M WorldState>doOneCycleNowFor: 0x5d1ba70: a(n) WorldState > 0xbffac55c M WorldState>doOneCycleFor: 0x5d1ba70: a(n) WorldState > 0xbffac578 M PasteUpMorph>doOneCycle 0x52d8780: a(n) PasteUpMorph > 0xbffac590 M [] in MorphicProject>spawnNewProcess 0x604fe08: a(n) > MorphicProject > 0xbffac5b0 I [] in BlockClosure>newProcess 0x48040b8: a(n) BlockClosure > > _,,,^..^,,,_ > best, Eliot Hi Eliot, since you are calling Rectangle >>#newRectFrom:, I suppose you have "Fast Morphic Drag" enabled. There, you continuously call Form >> #border:width:rule:fillColor:. Hence, I think some latest changes in the VM's graphics backend for Mac OSX are buggy. Btw: A while ago, Bert did observe that fast drag is faster in SqueakJS than it is in the Mac OSX build of the CogVM. :-D What's the current state of affairs? Best, Marcel -- View this message in context: http://forum.world.st/lock-up-in-screen-drag-tp4907062p4907067.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From cunningham.cb at gmail.com Tue Jul 19 14:46:40 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Tue Jul 19 14:46:43 2016 Subject: [squeak-dev] Rounding floats In-Reply-To: References: <3E107FAD-4C58-47DA-8E42-6DA50302CB70@rowledge.org> Message-ID: On Mon, Jul 18, 2016 at 5:26 PM, Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com> wrote: > Hi Tim, > you can't round float that easily, they are not multiple of 1/5. > But you can round their printed decimal representation. > That's fair because this is what you want: print the damn float > > 292.37 printShowingMaxDecimalPlaces: 1 > > > Technically, 2924*0.1 and 2924/10.0 differ. > The second one is guaranteed to be the closest float to (2924/10) because > there's only one inexact operation involved (the division). > The first one, not so, it's 2924 * (1/10.0), two inexact operations > Remember, 1/10 = 0.1 is false... > That's why roundTo: is failing: it uses the second formula. > > Otherwise, of course, you would use ScaledDecimals or Fractions... > > 239.37 roundTo: 0.1s. > (239.37 roundTo: 1/10) asFloat. > > But you want to print rounded, so just print rounded, don't bother with > round. > or FixedDecimals (if you want to load that package). > 239.37 asFixedDecimal: 1 "==> 239.4 " > > 2016-07-19 1:20 GMT+02:00 tim Rowledge : > >> I know that it?s a hard thing to deal with floating point numbers around >> the fiddly edges, but are we really unable to do a decent job of rounding >> floats to reasonable numbers of decimal places? This can?t be a rare thing >> to need to do. >> >> For example, I?m reading temperature values for various places from the >> openweathermap.org site and many of them are specified to 2dp, which >> seems a bit optimistic for a weather site. But if I try, for example >> 292.37 roundTo: 0.1 >> I get the very unhelpful 292.40000?00003 (with too many 0s to count by >> eye). I understand that one option is to use formatted printing of the >> number but that doesn?t seem practical for this usage right now. >> >> >> So, numerics aficionados, can we do any better than the sensible seeming >> but unsuccessful code in Number>>roundTo: ? >> >> tim >> -- >> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >> Ubi dubium ibi libertas >> >> >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160719/4e5bd233/attachment.htm From joseph.alotta at gmail.com Tue Jul 19 15:36:23 2016 From: joseph.alotta at gmail.com (Joseph Alotta) Date: Tue Jul 19 15:36:32 2016 Subject: [squeak-dev] Squeak Meetup Group in the Chicago Area In-Reply-To: <578d57db.94a5370a.c3551.a148SMTPIN_ADDED_MISSING@mx.google.com> References: <578d57db.94a5370a.c3551.a148SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <4F394488-702F-48AF-8939-A853AAB10FFA@gmail.com> Hi Everyone, I started a meetup group for Squeak programing in the Chicago Area. http://www.meetup.com/Learn-Programming-With-Squeak-Smalltalk-Club/ If you know anyone who is interested. Sincerely, Joe. PS. Be prepared for lots of beginner questions coming your way. :-) From eliot.miranda at gmail.com Tue Jul 19 16:02:39 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Jul 19 16:02:44 2016 Subject: [squeak-dev] Re: lock up in screen drag In-Reply-To: <1468903395479-4907067.post@n4.nabble.com> References: <1468903395479-4907067.post@n4.nabble.com> Message-ID: > On Jul 18, 2016, at 9:43 PM, marcel.taeumel wrote: > > Eliot Miranda-2 wrote >> Hi ALl, >> >> I'm seeing a lock up that appears to be on window dragging. This is on >> Mac OS X with a new VM. The symptom is that the screen goes blank. I see >> this process when sending SIGUSR1 to the process: >> >> Process 0x4800ad0 priority 40 >> 0xbffac304 M [] in Delay>wait 0x4802858: a(n) Delay >> 0xbffac324 M BlockClosure>ifCurtailed: 0x4a920e0: a(n) BlockClosure >> 0xbffac340 M Delay>wait 0x4802858: a(n) Delay >> 0xbffac36c M Rectangle>newRectFrom: 0x4803df0: a(n) Rectangle >> 0xbffac39c I PluggableSystemWindow(SystemWindow)>doFastFrameDrag: >> 0x4802740: a(n) PluggableSystemWindow >> 0xbffac3b8 M PluggableSystemWindow(SystemWindow)>startDragFromLabel: >> 0x4802740: a(n) PluggableSystemWindow >> 0xbffac3d8 M EventHandler>send:to:withEvent:fromMorph: 0x4803f30: a(n) >> EventHandler >> 0xbffac408 I EventHandler>startDrag:fromMorph: 0x4803f30: a(n) >> EventHandler >> 0xbffac428 M StringMorph(Morph)>startDrag: 0x4801458: a(n) StringMorph >> 0xbffac44c I MouseClickState>drag: 0x4803fc8: a(n) MouseClickState >> 0xbffac474 M MouseClickState>handleEvent:from: 0x4803fc8: a(n) >> MouseClickState >> 0xbffac498 M HandMorph>handleEvent: 0x5cef1a0: a(n) HandMorph >> 0xbffac4c4 M HandMorph>processEvents 0x5cef1a0: a(n) HandMorph >> 0xbffac4e0 M [] in WorldState>doOneCycleNowFor: 0x5d1ba70: a(n) WorldState >> 0xbffac504 M Array(SequenceableCollection)>do: 0x4e6fa10: a(n) Array >> 0xbffac520 M WorldState>handsDo: 0x5d1ba70: a(n) WorldState >> 0xbffac540 M WorldState>doOneCycleNowFor: 0x5d1ba70: a(n) WorldState >> 0xbffac55c M WorldState>doOneCycleFor: 0x5d1ba70: a(n) WorldState >> 0xbffac578 M PasteUpMorph>doOneCycle 0x52d8780: a(n) PasteUpMorph >> 0xbffac590 M [] in MorphicProject>spawnNewProcess 0x604fe08: a(n) >> MorphicProject >> 0xbffac5b0 I [] in BlockClosure>newProcess 0x48040b8: a(n) BlockClosure >> >> _,,,^..^,,,_ >> best, Eliot > > Hi Eliot, > > since you are calling Rectangle >>#newRectFrom:, I suppose you have "Fast > Morphic Drag" enabled. There, you continuously call Form >> > #border:width:rule:fillColor:. > > Hence, I think some latest changes in the VM's graphics backend for Mac OSX > are buggy. Then should we revert? I lost a days work did to this. Tobias? > Btw: A while ago, Bert did observe that fast drag is faster in SqueakJS than > it is in the Mac OSX build of the CogVM. :-D And this is a criticism of what? > What's the current state of > affairs? That the Mac VM is now unstable, and as my main work platform that is very bad news. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/lock-up-in-screen-drag-tp4907062p4907067.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From Das.Linux at gmx.de Tue Jul 19 17:05:00 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Jul 19 17:05:05 2016 Subject: [squeak-dev] Re: lock up in screen drag In-Reply-To: References: <1468903395479-4907067.post@n4.nabble.com> Message-ID: Hi, On 19.07.2016, at 18:02, Eliot Miranda wrote: > > >> On Jul 18, 2016, at 9:43 PM, marcel.taeumel wrote: >> >> Eliot Miranda-2 wrote >>> Hi ALl, >>> >>> I'm seeing a lock up that appears to be on window dragging. This is on >>> Mac OS X with a new VM. The symptom is that the screen goes blank. I see >>> this process when sending SIGUSR1 to the process: >>> >>> Process 0x4800ad0 priority 40 >>> 0xbffac304 M [] in Delay>wait 0x4802858: a(n) Delay >>> 0xbffac324 M BlockClosure>ifCurtailed: 0x4a920e0: a(n) BlockClosure >>> 0xbffac340 M Delay>wait 0x4802858: a(n) Delay >>> 0xbffac36c M Rectangle>newRectFrom: 0x4803df0: a(n) Rectangle >>> 0xbffac39c I PluggableSystemWindow(SystemWindow)>doFastFrameDrag: >>> 0x4802740: a(n) PluggableSystemWindow >>> 0xbffac3b8 M PluggableSystemWindow(SystemWindow)>startDragFromLabel: >>> 0x4802740: a(n) PluggableSystemWindow >>> 0xbffac3d8 M EventHandler>send:to:withEvent:fromMorph: 0x4803f30: a(n) >>> EventHandler >>> 0xbffac408 I EventHandler>startDrag:fromMorph: 0x4803f30: a(n) >>> EventHandler >>> 0xbffac428 M StringMorph(Morph)>startDrag: 0x4801458: a(n) StringMorph >>> 0xbffac44c I MouseClickState>drag: 0x4803fc8: a(n) MouseClickState >>> 0xbffac474 M MouseClickState>handleEvent:from: 0x4803fc8: a(n) >>> MouseClickState >>> 0xbffac498 M HandMorph>handleEvent: 0x5cef1a0: a(n) HandMorph >>> 0xbffac4c4 M HandMorph>processEvents 0x5cef1a0: a(n) HandMorph >>> 0xbffac4e0 M [] in WorldState>doOneCycleNowFor: 0x5d1ba70: a(n) WorldState >>> 0xbffac504 M Array(SequenceableCollection)>do: 0x4e6fa10: a(n) Array >>> 0xbffac520 M WorldState>handsDo: 0x5d1ba70: a(n) WorldState >>> 0xbffac540 M WorldState>doOneCycleNowFor: 0x5d1ba70: a(n) WorldState >>> 0xbffac55c M WorldState>doOneCycleFor: 0x5d1ba70: a(n) WorldState >>> 0xbffac578 M PasteUpMorph>doOneCycle 0x52d8780: a(n) PasteUpMorph >>> 0xbffac590 M [] in MorphicProject>spawnNewProcess 0x604fe08: a(n) >>> MorphicProject >>> 0xbffac5b0 I [] in BlockClosure>newProcess 0x48040b8: a(n) BlockClosure >>> >>> _,,,^..^,,,_ >>> best, Eliot >> >> Hi Eliot, >> >> since you are calling Rectangle >>#newRectFrom:, I suppose you have "Fast >> Morphic Drag" enabled. There, you continuously call Form >> >> #border:width:rule:fillColor:. >> >> Hence, I think some latest changes in the VM's graphics backend for Mac OSX >> are buggy. > > Then should we revert? I lost a days work did to this. Tobias? try it, go ahead and revert a5f7c3e451b9fb643fb9d1e95819169394218082 (scale factor) or df90dec754e10e5c57246e1ad8f75550f559f8cb (high-dpi) (for example with git revert THE_HASH or git revert -n THE_HASH to just see if it works) I've seen the screen go blank, too (White, in my case) but resizing the window restored things, why so ever. However, I had it happen _before_ any of my changes, too. (But not with the CGView based backend, IIRC) > >> Btw: A while ago, Bert did observe that fast drag is faster in SqueakJS than >> it is in the Mac OSX build of the CogVM. :-D > > And this is a criticism of what? I didn't know that criticism starts with "By the way"? > >> What's the current state of >> affairs? > > That the Mac VM is now unstable, and as my main work platform that is very bad news. it has been before, too, just to say? Best regards -Tobi > >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: http://forum.world.st/lock-up-in-screen-drag-tp4907062p4907067.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. From tim at rowledge.org Tue Jul 19 17:43:35 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue Jul 19 17:42:58 2016 Subject: [squeak-dev] Rounding floats In-Reply-To: References: <3E107FAD-4C58-47DA-8E42-6DA50302CB70@rowledge.org> Message-ID: > On 18-07-2016, at 5:26 PM, Nicolas Cellier wrote: > > Hi Tim, > you can't round float that easily, they are not multiple of ?. I know - damn those awkward temperature readings! > But you can round their printed decimal representation. > That's fair because this is what you want: print the damn float Unfortunately that isn?t something I can do in this case. (I think, anyway) since the numeric value will get passed around and possibly displayed somewhere else. Now of course one could argue that the place where it gets displayed should do any formatting but since the displaying morph has no idea about any rounding, limits, scaling etc of the value it might have to display? > > On 19-07-2016, at 7:46 AM, Chris Cunningham wrote: > > or FixedDecimals (if you want to load that package). > 239.37 asFixedDecimal: 1 "==> 239.4 " Hunh. FixedDecimals, eh? Hadn?t heard of that one before. I wonder if it?ll be friendly? Did we ever do decimal floats? I know a lot of the work on that as a general question was done by an old IBM colleague (Mike Cowlishaw, generally a very nice chap despite that fact that he claims responsibility for IBM dropping Smalltalk in favour of java) but I had the impression it was a pretty tricky thing. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim ASCII to ASCII, DOS to DOS. From eliot.miranda at gmail.com Tue Jul 19 18:47:08 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Jul 19 18:47:14 2016 Subject: [squeak-dev] Re: lock up in screen drag In-Reply-To: References: <1468903395479-4907067.post@n4.nabble.com> Message-ID: On Tue, Jul 19, 2016 at 10:05 AM, Tobias Pape wrote: > Hi, > > On 19.07.2016, at 18:02, Eliot Miranda wrote: > > > > > > >> On Jul 18, 2016, at 9:43 PM, marcel.taeumel > wrote: > >> > >> Eliot Miranda-2 wrote > >>> Hi ALl, > >>> > >>> I'm seeing a lock up that appears to be on window dragging. This is > on > >>> Mac OS X with a new VM. The symptom is that the screen goes blank. I > see > >>> this process when sending SIGUSR1 to the process: > >>> > >>> Process 0x4800ad0 priority 40 > >>> 0xbffac304 M [] in Delay>wait 0x4802858: a(n) Delay > >>> 0xbffac324 M BlockClosure>ifCurtailed: 0x4a920e0: a(n) BlockClosure > >>> 0xbffac340 M Delay>wait 0x4802858: a(n) Delay > >>> 0xbffac36c M Rectangle>newRectFrom: 0x4803df0: a(n) Rectangle > >>> 0xbffac39c I PluggableSystemWindow(SystemWindow)>doFastFrameDrag: > >>> 0x4802740: a(n) PluggableSystemWindow > >>> 0xbffac3b8 M PluggableSystemWindow(SystemWindow)>startDragFromLabel: > >>> 0x4802740: a(n) PluggableSystemWindow > >>> 0xbffac3d8 M EventHandler>send:to:withEvent:fromMorph: 0x4803f30: a(n) > >>> EventHandler > >>> 0xbffac408 I EventHandler>startDrag:fromMorph: 0x4803f30: a(n) > >>> EventHandler > >>> 0xbffac428 M StringMorph(Morph)>startDrag: 0x4801458: a(n) StringMorph > >>> 0xbffac44c I MouseClickState>drag: 0x4803fc8: a(n) MouseClickState > >>> 0xbffac474 M MouseClickState>handleEvent:from: 0x4803fc8: a(n) > >>> MouseClickState > >>> 0xbffac498 M HandMorph>handleEvent: 0x5cef1a0: a(n) HandMorph > >>> 0xbffac4c4 M HandMorph>processEvents 0x5cef1a0: a(n) HandMorph > >>> 0xbffac4e0 M [] in WorldState>doOneCycleNowFor: 0x5d1ba70: a(n) > WorldState > >>> 0xbffac504 M Array(SequenceableCollection)>do: 0x4e6fa10: a(n) Array > >>> 0xbffac520 M WorldState>handsDo: 0x5d1ba70: a(n) WorldState > >>> 0xbffac540 M WorldState>doOneCycleNowFor: 0x5d1ba70: a(n) WorldState > >>> 0xbffac55c M WorldState>doOneCycleFor: 0x5d1ba70: a(n) WorldState > >>> 0xbffac578 M PasteUpMorph>doOneCycle 0x52d8780: a(n) PasteUpMorph > >>> 0xbffac590 M [] in MorphicProject>spawnNewProcess 0x604fe08: a(n) > >>> MorphicProject > >>> 0xbffac5b0 I [] in BlockClosure>newProcess 0x48040b8: a(n) BlockClosure > >>> > >>> _,,,^..^,,,_ > >>> best, Eliot > >> > >> Hi Eliot, > >> > >> since you are calling Rectangle >>#newRectFrom:, I suppose you have > "Fast > >> Morphic Drag" enabled. There, you continuously call Form >> > >> #border:width:rule:fillColor:. > >> > >> Hence, I think some latest changes in the VM's graphics backend for Mac > OSX > >> are buggy. > > > > Then should we revert? I lost a days work did to this. Tobias? > > try it, go ahead and revert > a5f7c3e451b9fb643fb9d1e95819169394218082 (scale factor) > or > df90dec754e10e5c57246e1ad8f75550f559f8cb (high-dpi) > (for example with > git revert THE_HASH > or > git revert -n THE_HASH > to just see if it works) > > I've seen the screen go blank, too (White, in my case) but resizing the > window restored things, why so ever. However, I had it happen _before_ any > of my changes, too. (But not with the CGView based backend, IIRC) > Ah brilliant! Now I can wait until you fix it. Thanks, Tobias, the resize is great. But I'd really appreciate a fix reasonably prompty!! > > > > >> Btw: A while ago, Bert did observe that fast drag is faster in SqueakJS > than > >> it is in the Mac OSX build of the CogVM. :-D > > > > And this is a criticism of what? > > I didn't know that criticism starts with "By the way"? > > > > >> What's the current state of > >> affairs? > > > > That the Mac VM is now unstable, and as my main work platform that is > very bad news. > > it has been before, too, just to say? > > Best regards > -Tobi > > > > >> > >> Best, > >> Marcel > >> > >> > >> > >> -- > >> View this message in context: > http://forum.world.st/lock-up-in-screen-drag-tp4907062p4907067.html > >> Sent from the Squeak - Dev mailing list archive at Nabble.com. > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160719/aafe3f38/attachment-0001.htm From Das.Linux at gmx.de Tue Jul 19 18:58:53 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Jul 19 18:58:57 2016 Subject: [squeak-dev] Re: lock up in screen drag In-Reply-To: References: <1468903395479-4907067.post@n4.nabble.com> Message-ID: On 19.07.2016, at 20:47, Eliot Miranda wrote: > On Tue, Jul 19, 2016 at 10:05 AM, Tobias Pape wrote: > Hi, > > On 19.07.2016, at 18:02, Eliot Miranda wrote: > > > > > > >> On Jul 18, 2016, at 9:43 PM, marcel.taeumel wrote: > >> > >> Eliot Miranda-2 wrote > >>> Hi ALl, > >>> > >>> I'm seeing a lock up that appears to be on window dragging. This is on > >>> Mac OS X with a new VM. The symptom is that the screen goes blank. I see > >>> this process when sending SIGUSR1 to the process: > >>> > >>> Process 0x4800ad0 priority 40 > >>> 0xbffac304 M [] in Delay>wait 0x4802858: a(n) Delay > >>> 0xbffac324 M BlockClosure>ifCurtailed: 0x4a920e0: a(n) BlockClosure > >>> 0xbffac340 M Delay>wait 0x4802858: a(n) Delay > >>> 0xbffac36c M Rectangle>newRectFrom: 0x4803df0: a(n) Rectangle > >>> 0xbffac39c I PluggableSystemWindow(SystemWindow)>doFastFrameDrag: > >>> 0x4802740: a(n) PluggableSystemWindow > >>> 0xbffac3b8 M PluggableSystemWindow(SystemWindow)>startDragFromLabel: > >>> 0x4802740: a(n) PluggableSystemWindow > >>> 0xbffac3d8 M EventHandler>send:to:withEvent:fromMorph: 0x4803f30: a(n) > >>> EventHandler > >>> 0xbffac408 I EventHandler>startDrag:fromMorph: 0x4803f30: a(n) > >>> EventHandler > >>> 0xbffac428 M StringMorph(Morph)>startDrag: 0x4801458: a(n) StringMorph > >>> 0xbffac44c I MouseClickState>drag: 0x4803fc8: a(n) MouseClickState > >>> 0xbffac474 M MouseClickState>handleEvent:from: 0x4803fc8: a(n) > >>> MouseClickState > >>> 0xbffac498 M HandMorph>handleEvent: 0x5cef1a0: a(n) HandMorph > >>> 0xbffac4c4 M HandMorph>processEvents 0x5cef1a0: a(n) HandMorph > >>> 0xbffac4e0 M [] in WorldState>doOneCycleNowFor: 0x5d1ba70: a(n) WorldState > >>> 0xbffac504 M Array(SequenceableCollection)>do: 0x4e6fa10: a(n) Array > >>> 0xbffac520 M WorldState>handsDo: 0x5d1ba70: a(n) WorldState > >>> 0xbffac540 M WorldState>doOneCycleNowFor: 0x5d1ba70: a(n) WorldState > >>> 0xbffac55c M WorldState>doOneCycleFor: 0x5d1ba70: a(n) WorldState > >>> 0xbffac578 M PasteUpMorph>doOneCycle 0x52d8780: a(n) PasteUpMorph > >>> 0xbffac590 M [] in MorphicProject>spawnNewProcess 0x604fe08: a(n) > >>> MorphicProject > >>> 0xbffac5b0 I [] in BlockClosure>newProcess 0x48040b8: a(n) BlockClosure > >>> > >>> _,,,^..^,,,_ > >>> best, Eliot > >> > >> Hi Eliot, > >> > >> since you are calling Rectangle >>#newRectFrom:, I suppose you have "Fast > >> Morphic Drag" enabled. There, you continuously call Form >> > >> #border:width:rule:fillColor:. > >> > >> Hence, I think some latest changes in the VM's graphics backend for Mac OSX > >> are buggy. > > > > Then should we revert? I lost a days work did to this. Tobias? > > try it, go ahead and revert > a5f7c3e451b9fb643fb9d1e95819169394218082 (scale factor) > or > df90dec754e10e5c57246e1ad8f75550f559f8cb (high-dpi) > (for example with > git revert THE_HASH > or > git revert -n THE_HASH > to just see if it works) > > I've seen the screen go blank, too (White, in my case) but resizing the > window restored things, why so ever. However, I had it happen _before_ any > of my changes, too. (But not with the CGView based backend, IIRC) > > Ah brilliant! Now I can wait until you fix it. Thanks, Tobias, the resize is great. But I'd really appreciate a fix reasonably prompty!! Sorry, ain't got no fix for that. And since I have to always set up the Xcode-stuff manually, I cannot debug this reasonably. To be frank, I'll actually only have time for VM stuff in September earliest. Since this is obviously a tad late, feel free to revert my stuff; I cannot promise that this will fix things, maybe things only break less often. Best regards -Tobi PS: The cocoa vm keycodes are off. Cmd-0 does not send cmd-0. Sligthly intoxicated tobi out > > > > > >> Btw: A while ago, Bert did observe that fast drag is faster in SqueakJS than > >> it is in the Mac OSX build of the CogVM. :-D > > > > And this is a criticism of what? > > I didn't know that criticism starts with "By the way"? > > > > >> What's the current state of > >> affairs? > > > > That the Mac VM is now unstable, and as my main work platform that is very bad news. > > it has been before, too, just to say? > > Best regards > -Tobi > > > > >> > >> Best, > >> Marcel > >> > >> > >> From peter at ozzard.org Tue Jul 19 20:35:38 2016 From: peter at ozzard.org (Peter Crowther) Date: Tue Jul 19 20:35:42 2016 Subject: [squeak-dev] Rounding floats In-Reply-To: References: <3E107FAD-4C58-47DA-8E42-6DA50302CB70@rowledge.org> Message-ID: On 19 July 2016 at 18:43, tim Rowledge wrote: [...] > the displaying morph has no idea about any rounding, limits, scaling etc > of the value it might have to display? > > Therein lies the problem, I fear. There's a reason for models and views... Cheers, - Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160719/0e35020d/attachment.htm From commits at source.squeak.org Tue Jul 19 21:49:46 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Jul 19 21:49:48 2016 Subject: [squeak-dev] The Trunk: TraitsTests-pre.16.mcz Message-ID: Patrick Rein uploaded a new version of TraitsTests to project The Trunk: http://source.squeak.org/trunk/TraitsTests-pre.16.mcz ==================== Summary ==================== Name: TraitsTests-pre.16 Author: pre Time: 19 July 2016, 11:49:05.039751 pm UUID: 323a0c3d-53a3-9447-a721-4aa097ac0a07 Ancestors: TraitsTests-pre.15 Fixes many of the TraitsTests failures by introducing a general timeout of 60 seconds for all of them. This is necessary to account for the long setup time for each test. Also refactors one test into several single test cases. =============== Diff against TraitsTests-pre.15 =============== Item was removed: - ----- Method: TraitCompositionTest>>testAliasCompositions (in category 'testing-basic') ----- - testAliasCompositions - - - "unary" - self - shouldnt: [self t2 uses: self t1 @ { (#aliasM11 -> #m11) }] - raise: TraitCompositionException. - self - should: [self t2 uses: self t1 @ { (#alias: -> #m11) }] - raise: TraitCompositionException. - self - should: [self t2 uses: self t1 @ { (#alias:x:y: -> #m11) }] - raise: TraitCompositionException. - - "binary" - self t1 compile: '= anObject'. - self - shouldnt: [self t2 uses: self t1 @ { (#equals: -> #=) }] - raise: TraitCompositionException. - self shouldnt: [self t2 uses: self t1 @ { (#% -> #=) }] - raise: TraitCompositionException. - self - should: [self t2 uses: self t1 @ { (#equals -> #=) }] - raise: TraitCompositionException. - self - should: [self t2 uses: self t1 @ { (#equals:x: -> #=) }] - raise: TraitCompositionException. - - "keyword" - self t1 compile: 'x: a y: b z: c'. - self - should: [self t2 uses: self t1 @ { (#'==' -> #x:y:z:) }] - raise: TraitCompositionException. - self - should: [self t2 uses: self t1 @ { (#x -> #x:y:z:) }] - raise: TraitCompositionException. - self - should: [self t2 uses: self t1 @ { (#x: -> #x:y:z:) }] - raise: TraitCompositionException. - self - should: [self t2 uses: self t1 @ { (#x:y: -> #x:y:z:) }] - raise: TraitCompositionException. - self shouldnt: - [self t2 uses: self t1 @ { (#myX:y:z: -> #x:y:z:) }] - raise: TraitCompositionException. - - "alias same as selector" - self - should: [self t2 uses: self t1 @ { (#m11 -> #m11) }] - raise: TraitCompositionException. - - "same alias name used twice" - self should: - [self t2 - uses: self t1 @ { (#alias -> #m11). (#alias -> #m12) }] - raise: TraitCompositionException. - - "aliasing an alias" - self should: - [self t2 - uses: self t1 @ { (#alias -> #m11). (#alias2 -> #alias) }] - raise: TraitCompositionException! Item was added: + ----- Method: TraitCompositionTest>>testAliasCompositionsRaisesErrorBinary (in category 'testing-basic') ----- + testAliasCompositionsRaisesErrorBinary + + "binary" + self t1 compile: '= anObject'. + self + shouldnt: [self t2 uses: self t1 @ { (#equals: -> #=) }] + raise: TraitCompositionException. + self shouldnt: [self t2 uses: self t1 @ { (#% -> #=) }] + raise: TraitCompositionException. + self + should: [self t2 uses: self t1 @ { (#equals -> #=) }] + raise: TraitCompositionException. + self + should: [self t2 uses: self t1 @ { (#equals:x: -> #=) }] + raise: TraitCompositionException.! Item was added: + ----- Method: TraitCompositionTest>>testAliasCompositionsRaisesErrorKeyword (in category 'testing-basic') ----- + testAliasCompositionsRaisesErrorKeyword + + "keyword" + self t1 compile: 'x: a y: b z: c'. + self + should: [self t2 uses: self t1 @ { (#'==' -> #x:y:z:) }] + raise: TraitCompositionException. + self + should: [self t2 uses: self t1 @ { (#x -> #x:y:z:) }] + raise: TraitCompositionException. + self + should: [self t2 uses: self t1 @ { (#x: -> #x:y:z:) }] + raise: TraitCompositionException. + self + should: [self t2 uses: self t1 @ { (#x:y: -> #x:y:z:) }] + raise: TraitCompositionException. + self shouldnt: + [self t2 uses: self t1 @ { (#myX:y:z: -> #x:y:z:) }] + raise: TraitCompositionException.! Item was added: + ----- Method: TraitCompositionTest>>testAliasCompositionsRaisesErrorSpecial (in category 'testing-basic') ----- + testAliasCompositionsRaisesErrorSpecial + + "alias same as selector" + self + should: [self t2 uses: self t1 @ { (#m11 -> #m11) }] + raise: TraitCompositionException. + + "same alias name used twice" + self should: + [self t2 + uses: self t1 @ { (#alias -> #m11). (#alias -> #m12) }] + raise: TraitCompositionException. + + "aliasing an alias" + self should: + [self t2 + uses: self t1 @ { (#alias -> #m11). (#alias2 -> #alias) }] + raise: TraitCompositionException! Item was added: + ----- Method: TraitCompositionTest>>testAliasCompositionsRaisesErrorUnary (in category 'testing-basic') ----- + testAliasCompositionsRaisesErrorUnary + + "unary" + self + shouldnt: [self t2 uses: self t1 @ { (#aliasM11 -> #m11) }] + raise: TraitCompositionException. + self + should: [self t2 uses: self t1 @ { (#alias: -> #m11) }] + raise: TraitCompositionException. + self + should: [self t2 uses: self t1 @ { (#alias:x:y: -> #m11) }] + raise: TraitCompositionException.! Item was changed: ----- Method: TraitMethodDescriptionTest>>testConflictMethodCreation (in category 'running') ----- testConflictMethodCreation "Generate conflicting methods between t1 and t2 and check the resulting method in Trait t5 (or c2). Also test selectors like foo:x (without space) or selectors with CRs." + - - "unary" self t2 compile: 'm12 ^false'. self assert: ((self t5 sourceCodeAt: #m12) asString beginsWith: 'm12'). self should: [self c2 new m12] raise: Error. "binary" self t1 compile: '@ myArgument ^true'. self t2 compile: '@myArgument ^false'. self assert: ((self t5 sourceCodeAt: #@) asString beginsWith: '@ arg1'). self should: [self c2 new @ 17] raise: Error. "keyword" self t1 compile: 'zork: myArgument ^true'. self t2 compile: 'zork: myArgument ^false'. self assert: ((self t5 sourceCodeAt: #zork:) asString beginsWith: 'zork: arg1'). self should: [self c2 new zork: 17] raise: Error. self t1 compile: 'zork:myArgument ^true'. self t2 compile: 'zork:myArgument ^false'. self assert: ((self t5 sourceCodeAt: #zork:) asString beginsWith: 'zork: arg1'). self should: [self c2 new zork: 17] raise: Error. self t1 compile: 'zork1: myArgument zork2: mySecondArgument ^true'. self t2 compile: 'zork1: anObject zork2: anotherObject ^false'. self assert: ((self t5 sourceCodeAt: #zork1:zork2:) asString beginsWith: 'zork1: arg1 zork2: arg2'). self should: [self c2 new zork1: 1 zork2: 2] raise: Error! Item was added: + ----- Method: TraitsTestCase>>setUp (in category 'accessing') ----- + setUp + + super setUp. + self timeout: 90. "pre: This is necessary to account for the TraitsResrouce setup" + ! From commits at source.squeak.org Tue Jul 19 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Jul 19 21:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160719215502.21057.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068280.html Name: TraitsTests-pre.16 Ancestors: TraitsTests-pre.15 Fixes many of the TraitsTests failures by introducing a general timeout of 60 seconds for all of them. This is necessary to account for the long setup time for each test. Also refactors one test into several single test cases. ============================================= From commits at source.squeak.org Tue Jul 19 22:19:51 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Jul 19 22:19:53 2016 Subject: [squeak-dev] The Trunk: Network-nice.179.mcz Message-ID: Nicolas Cellier uploaded a new version of Network to project The Trunk: http://source.squeak.org/trunk/Network-nice.179.mcz ==================== Summary ==================== Name: Network-nice.179 Author: nice Time: 20 July 2016, 12:19:36.925063 am UUID: d5a82bde-b7b7-47ab-8d39-94beab819cae Ancestors: Network-bp.178 Let VMMaker (.oscog branch) code generation work on windows. Detail: VMMaker uses something like: FileDirectory default pathFromURI: self sourceTree, '/spur64src' On windows, the URI encodes drive spec letter $: into '%3A'. This was never decoded, and then C%3A\Users\nicolas\opensmalltalk-vm\spur64src is not a good path specification and miserably fails :( Note that DosFileDirectory class privateFullPathForURI: seems to perform some similar task, so maybe the next step will be to CLEAN UP!!! =============== Diff against Network-bp.178 =============== Item was changed: ----- Method: DosFileDirectory>>uriPathToPlatformPath: (in category '*network-uri') ----- uriPathToPlatformPath: aString "Convert a URI path (w/ forward slashes) into a platform path if necessary. Also make sure we deal properly with shares vs. drives" + | parts path | + path := aString unescapePercents. + parts := path findTokens: '/'. - | parts | - parts := aString findTokens: '/'. (parts first endsWith: ':') ifTrue:[ "it's a drive - compose c:\foo\bar" + ^path allButFirst copyReplaceAll: '/' with: '\' - ^aString allButFirst copyReplaceAll: '/' with: '\' ] ifFalse:[ "it's a share - compose \\share\foo\bar" + ^'\', (path copyReplaceAll: '/' with: '\') - ^'\', (aString copyReplaceAll: '/' with: '\') ].! From Marcel.Taeumel at hpi.de Wed Jul 20 08:36:45 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Jul 20 09:20:10 2016 Subject: [squeak-dev] Re: lock up in screen drag In-Reply-To: References: <1468903395479-4907067.post@n4.nabble.com> Message-ID: <1469003805249-4907210.post@n4.nabble.com> Tobias Pape wrote > On 19.07.2016, at 20:47, Eliot Miranda < > eliot.miranda@ > > wrote: > >> On Tue, Jul 19, 2016 at 10:05 AM, Tobias Pape < > Das.Linux@ > > wrote: >> Hi, >> >> On 19.07.2016, at 18:02, Eliot Miranda < > eliot.miranda@ > > wrote: >> >> > >> > >> >> On Jul 18, 2016, at 9:43 PM, marcel.taeumel < > Marcel.Taeumel@ > > wrote: >> >> >> >> Eliot Miranda-2 wrote >> >>> Hi ALl, >> >>> >> >>> I'm seeing a lock up that appears to be on window dragging. This is >> on >> >>> Mac OS X with a new VM. The symptom is that the screen goes blank. >> I see >> >>> this process when sending SIGUSR1 to the process: >> >>> >> >>> Process 0x4800ad0 priority 40 >> >>> 0xbffac304 M [] in Delay>wait 0x4802858: a(n) Delay >> >>> 0xbffac324 M BlockClosure>ifCurtailed: 0x4a920e0: a(n) BlockClosure >> >>> 0xbffac340 M Delay>wait 0x4802858: a(n) Delay >> >>> 0xbffac36c M Rectangle>newRectFrom: 0x4803df0: a(n) Rectangle >> >>> 0xbffac39c I PluggableSystemWindow(SystemWindow)>doFastFrameDrag: >> >>> 0x4802740: a(n) PluggableSystemWindow >> >>> 0xbffac3b8 M PluggableSystemWindow(SystemWindow)>startDragFromLabel: >> >>> 0x4802740: a(n) PluggableSystemWindow >> >>> 0xbffac3d8 M EventHandler>send:to:withEvent:fromMorph: 0x4803f30: >> a(n) >> >>> EventHandler >> >>> 0xbffac408 I EventHandler>startDrag:fromMorph: 0x4803f30: a(n) >> >>> EventHandler >> >>> 0xbffac428 M StringMorph(Morph)>startDrag: 0x4801458: a(n) >> StringMorph >> >>> 0xbffac44c I MouseClickState>drag: 0x4803fc8: a(n) MouseClickState >> >>> 0xbffac474 M MouseClickState>handleEvent:from: 0x4803fc8: a(n) >> >>> MouseClickState >> >>> 0xbffac498 M HandMorph>handleEvent: 0x5cef1a0: a(n) HandMorph >> >>> 0xbffac4c4 M HandMorph>processEvents 0x5cef1a0: a(n) HandMorph >> >>> 0xbffac4e0 M [] in WorldState>doOneCycleNowFor: 0x5d1ba70: a(n) >> WorldState >> >>> 0xbffac504 M Array(SequenceableCollection)>do: 0x4e6fa10: a(n) Array >> >>> 0xbffac520 M WorldState>handsDo: 0x5d1ba70: a(n) WorldState >> >>> 0xbffac540 M WorldState>doOneCycleNowFor: 0x5d1ba70: a(n) WorldState >> >>> 0xbffac55c M WorldState>doOneCycleFor: 0x5d1ba70: a(n) WorldState >> >>> 0xbffac578 M PasteUpMorph>doOneCycle 0x52d8780: a(n) PasteUpMorph >> >>> 0xbffac590 M [] in MorphicProject>spawnNewProcess 0x604fe08: a(n) >> >>> MorphicProject >> >>> 0xbffac5b0 I [] in BlockClosure>newProcess 0x48040b8: a(n) >> BlockClosure >> >>> >> >>> _,,,^..^,,,_ >> >>> best, Eliot >> >> >> >> Hi Eliot, >> >> >> >> since you are calling Rectangle >>#newRectFrom:, I suppose you have >> "Fast >> >> Morphic Drag" enabled. There, you continuously call Form >> >> >> #border:width:rule:fillColor:. >> >> >> >> Hence, I think some latest changes in the VM's graphics backend for >> Mac OSX >> >> are buggy. >> > >> > Then should we revert? I lost a days work did to this. Tobias? >> >> try it, go ahead and revert >> a5f7c3e451b9fb643fb9d1e95819169394218082 (scale factor) >> or >> df90dec754e10e5c57246e1ad8f75550f559f8cb (high-dpi) >> (for example with >> git revert THE_HASH >> or >> git revert -n THE_HASH >> to just see if it works) >> >> I've seen the screen go blank, too (White, in my case) but resizing the >> window restored things, why so ever. However, I had it happen _before_ >> any >> of my changes, too. (But not with the CGView based backend, IIRC) >> >> Ah brilliant! Now I can wait until you fix it. Thanks, Tobias, the >> resize is great. But I'd really appreciate a fix reasonably prompty!! > > Sorry, ain't got no fix for that. > And since I have to always set up the Xcode-stuff manually, I cannot debug > this reasonably. > To be frank, I'll actually only have time for VM stuff in September > earliest. > Since this is obviously a tad late, feel free to revert my stuff; I cannot > promise that this will fix > things, maybe things only break less often. > > Best regards > -Tobi > > PS: The cocoa vm keycodes are off. Cmd-0 does not send cmd-0. Sligthly > intoxicated tobi out > >> >> >> > >> >> Btw: A while ago, Bert did observe that fast drag is faster in >> SqueakJS than >> >> it is in the Mac OSX build of the CogVM. :-D >> > >> > And this is a criticism of what? >> >> I didn't know that criticism starts with "By the way"? >> >> > >> >> What's the current state of >> >> affairs? >> > >> > That the Mac VM is now unstable, and as my main work platform that is >> very bad news. >> >> it has been before, too, just to say? >> >> Best regards >> -Tobi >> >> > >> >> >> >> Best, >> >> Marcel >> >> >> >> >> >> Hey Tobias, we should fix the keyboard-event bugs on the Mac until the 5.1 release. Maybe we can pair-prog some afternoon to debug it. :-) Best, Marcel -- View this message in context: http://forum.world.st/lock-up-in-screen-drag-tp4907062p4907210.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Yoshiki.Ohshima at acm.org Wed Jul 20 12:55:00 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Wed Jul 20 12:55:11 2016 Subject: [squeak-dev] WarpBlt works better on the 64 bit VM! Message-ID: I was trying to create a grayscale image. There is of course Form>>asGrayScale, but it has two problems: 1. It makes a BitBlt call for each vertical 1 pxiel side slice in the image. 2. It only sees uses green channel, and pretend to be that it is the gray value. For the first issue, I thought of using WarpBlt to only make a one call for the image. Basically, you reshape the 32-bit depth picture into 1 pixel wide, (w*h) height bitmap, and then re-interpret that picture as 8-bit picture of 4 pixel * (w*h) picture. There, column 0 has the R component of all original pixels, column 1 has the G component of all original pixels, and so on. Then, by rotating that picture and copy the now row 1, which was column 1, onto the resultinf form, it becomes the gray scale: -------------------------- asGrayScale: aForm | form8 g h quad w c | h := aForm width * aForm height. form8 := Form extent: 4@h depth: 8 bits: aForm bits. g := Form extent: h@1 depth: 8. w := WarpBlt toForm: g. quad := {2@0. 3@0. 3@h. 2@h}. w sourceForm: form8. w colorMap: nil. w combinationRule: Form over. w copyQuad: quad toRect: g boundingBox. c := ColorForm extent: aForm extent depth: 8 bits: g bits. c colors: (ColorForm grayScalePalette). ^ c -------------------------- It works! but then it is not as fast as I hoped. That is because, the WarpBlt primitive fails and its fallback code gets run (but produces a correct result). And the reason is that p3y and p4y in the WarpBlt object go beyond the SmallInteger range. But then, it occured to me that the number, 15099494400, is a SmallInteger on the 64 bit platform. Sure enough, the above code just works and produces 4x performance. Okay, I might actualy like to do a bit better job of computing grayscale. Brightness in HSB is defined as "(R max: G) max: B", and I can use the combination rule 27 to compute it. The result is more involving: -------------------------- asGrayScale2: aForm | b b32 form8 g g32 h quad r r32 w c | h := aForm width * aForm height. form8 := Form extent: 4@h depth: 8 bits: aForm bits. r := Form extent: (h@1) depth: 8. w := WarpBlt toForm: r. quad := {1@0. 2@0. 2@h. 1@h}. w sourceForm: form8. w colorMap: nil. w combinationRule: Form over. w copyQuad: quad toRect: r boundingBox. g := Form extent: (h@1) depth: 8. w := WarpBlt toForm: g. quad := {2@0. 3@0. 3@h. 2@h}. w sourceForm: form8. w colorMap: nil. w combinationRule: Form over. w copyQuad: quad toRect: g boundingBox. b := Form extent: (h@1) depth: 8. w := WarpBlt toForm: b. quad := {3@0. 4@0. 4@h. 3@h}. w sourceForm: form8. w colorMap: nil. w combinationRule: Form over. w copyQuad: quad toRect: b boundingBox. g32 := Form extent: (h / 4)@1 depth: 32 bits: g bits. r32 := Form extent: (h / 4)@1 depth: 32 bits: r bits. b32 := Form extent: (h / 4)@1 depth: 32 bits: b bits. ((BitBlt destForm: r32 sourceForm: g32 fillColor: nil combinationRule: 27 destOrigin: 0@0 sourceOrigin: 0@0 extent: g32 extent clipRect: r32 boundingBox) colorMap: nil) copyBits. ((BitBlt destForm: r32 sourceForm: b32 fillColor: nil combinationRule: 27 destOrigin: 0@0 sourceOrigin: 0@0 extent: b32 extent clipRect: r32 boundingBox) colorMap: nil) copyBits. c := ColorForm extent: aForm extent depth: 8 bits: r32 bits. c colors: (ColorForm grayScalePalette). ^ c -------------------------- But this still runs faster than Form>>asGrayScale (but less than 2x) on 64 bit. I never had a convincing case for 64-bit VM for my small example, but this was pretty interesting result... Thank you everybody who made the 64-bit environment works! (And I confirmed that the new CameraPlugin works on 64-bit environment MacOS.) -- Yoshiki -------------- next part -------------- A non-text attachment was scrubbed... Name: y.jpg Type: image/jpeg Size: 46007 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160720/ead9a2ca/y-0001.jpg -------------- next part -------------- From Patrick.Rein at hpi.de Wed Jul 20 15:49:52 2016 From: Patrick.Rein at hpi.de (Rein, Patrick) Date: Wed Jul 20 15:49:56 2016 Subject: [squeak-dev] Text Style Code in TextMorph Message-ID: <1469029793136.21864@hpi.de> Hi everyone, I have just started investigating a bug with the PluggableTextMorphPlus where a TextStyle affecting a complete Text remained valid after setting a String instead. During debugging I have encountered the following code in TextMorph>>#newContents: (text notNil and: [ (textSize := text size) > 0] and: [ (text runLengthFor: 1) = textSize ]) ifTrue: [ | attribs | attribs := text attributesAt: 1 forStyle: textStyle. Text string: stringOrText copy attributes: attribs.] ifFalse: [ Text fromString: stringOrText copy ] What it does is that if the previous style applied to all of the Text, then the new Text also gets this style applied. Why is that? That seems pretty weird to me to only handle this one special case. Does anyone know the rational behind that? Thanks and bests Patrick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160720/f7210c5b/attachment.htm From commits at source.squeak.org Wed Jul 20 15:55:49 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jul 20 15:55:50 2016 Subject: [squeak-dev] The Trunk: SUnit-pre.104.mcz Message-ID: Patrick Rein uploaded a new version of SUnit to project The Trunk: http://source.squeak.org/trunk/SUnit-pre.104.mcz ==================== Summary ==================== Name: SUnit-pre.104 Author: pre Time: 20 July 2016, 5:55:40.721797 pm UUID: 41cb7db6-db89-c448-b0bb-5d74217a8bd6 Ancestors: SUnit-ul.103 Adds a new SUnit extension for tests which require an internet connection. This call should come at the beginning of the test to assert an internet connection and document any implicit dependence on network resources. =============== Diff against SUnit-ul.103 =============== Item was added: + ----- Method: SUnitExtensionsTest>>testEnsureInternetFails (in category 'test') ----- + testEnsureInternetFails + + self should: [self ensureInternetConnectionTo: ''] raise: Error! Item was added: + ----- Method: TestCase>>ensureInternetConnection (in category 'extensions') ----- + ensureInternetConnection + + ^ self ensureInternetConnectionTo: 'http://www.google.com'! Item was added: + ----- Method: TestCase>>ensureInternetConnectionTo: (in category 'extensions') ----- + ensureInternetConnectionTo: url + + "(Smalltalk classNamed: 'WebClient') httpGet: 'http://www.google.com'" + ((Smalltalk classNamed: 'WebClient') httpGet: url) isSuccess + ifFalse: [Error signal: 'No internet connection available, but test requires one'] + ! Item was added: + ----- Method: TestCase>>ensureSecureInternetConnection (in category 'extensions') ----- + ensureSecureInternetConnection + + ^ self ensureConnectionTo: 'https://www.google.com'! From commits at source.squeak.org Wed Jul 20 15:57:29 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jul 20 15:57:30 2016 Subject: [squeak-dev] The Trunk: Tests-pre.346.mcz Message-ID: Patrick Rein uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-pre.346.mcz ==================== Summary ==================== Name: Tests-pre.346 Author: pre Time: 20 July 2016, 5:57:17.403797 pm UUID: e81ba10f-54f7-ae4d-b971-8a80bebac7ba Ancestors: Tests-pre.345 Fixed the expected failures in the locales test to catch the current misconfiguration in the language extensions. =============== Diff against Tests-pre.345 =============== Item was changed: ----- Method: LocaleTest>>expectedFailures (in category 'testing') ----- expectedFailures ^ super expectedFailures, + ((NaturalLanguageTranslator translators isEmpty + or: [(NaturalLanguageTranslator translators values collect: [:t | t localeID ]) + asSet size = 1]) + ifTrue: [#(testLocaleChanged) "no locale available to switch to"] + ifFalse: [ #()]) - (NaturalLanguageTranslator translators - ifEmpty: [#(testLocaleChanged) "no locale available to switch to"] - ifNotEmpty: [#()]) ! Item was changed: ----- Method: LocaleTest>>testIsFontAvailable (in category 'testing') ----- testIsFontAvailable "self debug: #testIsFontAvailable" "takes quite a while" + self ensureInternetConnectionTo: 'http://metatoys.org/pub/'. + Preferences restoreFontsAfter: [ | currentDefaultTextStyle | currentDefaultTextStyle := TextStyle default. [ TextStyle setDefault: (TextStyle actualTextStyles at: #Accuny). (Locale isoLanguage: 'ja') languageEnvironment removeFonts. self assert: (Locale isoLanguage: 'en') languageEnvironment isFontAvailable. "Next test should fail after installing Japanese font" self assert: (Locale isoLanguage: 'ja') languageEnvironment isFontAvailable not. (Locale isoLanguage: 'ja') languageEnvironment installFont. self assert: (Locale isoLanguage: 'ja') languageEnvironment isFontAvailable ] + ensure: [ TextStyle setDefault: currentDefaultTextStyle. + FileDirectory default deleteFileNamed: (Locale isoLanguage: 'ja') languageEnvironment fontFullName. ] ].! - ensure: [ TextStyle setDefault: currentDefaultTextStyle ] ].! From Marcel.Taeumel at hpi.de Wed Jul 20 17:18:29 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Jul 20 18:01:56 2016 Subject: [squeak-dev] Re: Text Style Code in TextMorph In-Reply-To: <1469029793136.21864@hpi.de> References: <1469029793136.21864@hpi.de> Message-ID: <1469035109483-4907273.post@n4.nabble.com> Patrick R. wrote > Hi everyone, > > > I have just started investigating a bug with the PluggableTextMorphPlus > where a TextStyle affecting a complete Text remained valid after setting a > String instead. During debugging I have encountered the following code in > TextMorph>>#newContents: > > > (text notNil and: [ (textSize := text size) > 0] and: [ (text > runLengthFor: 1) = textSize ]) > ifTrue: [ | attribs | > attribs := text attributesAt: 1 forStyle: textStyle. > Text string: stringOrText copy attributes: attribs.] > ifFalse: [ Text fromString: stringOrText copy ] > > What it does is that if the previous style applied to all of the Text, > then the new Text also gets this style applied. Why is that? That seems > pretty weird to me to only handle this one special case. Does anyone know > the rational behind that? > > Thanks and bests > > Patrick Hi Patrick, this seems to be an unexpected side-effect of #newContents:. Please remove it. Note that the TextStyle is only needed for TextFontChange text attributes. What it actually does here is that it copies the current text attributes from the first character and applies it to the new contents. Do not confuse "text style" with "text attribute". :-) IMO: If some application wants to set the text programmatically and keep the current formatting, that application should be responsible for retrieving the current formatting and applying it to the new contents. We have Text >> #attributesAt: and Text >> #addAttribute: for that. Best, Marcel -- View this message in context: http://forum.world.st/Text-Style-Code-in-TextMorph-tp4907261p4907273.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From tim at rowledge.org Wed Jul 20 18:47:20 2016 From: tim at rowledge.org (tim Rowledge) Date: Wed Jul 20 18:46:41 2016 Subject: [squeak-dev] Rounding floats In-Reply-To: References: <3E107FAD-4C58-47DA-8E42-6DA50302CB70@rowledge.org> Message-ID: <912CDD1B-AA07-464D-BF9F-F4C0F4FD1BAB@rowledge.org> > On 19-07-2016, at 1:35 PM, Peter Crowther wrote: > > On 19 July 2016 at 18:43, tim Rowledge wrote: > [...] > the displaying morph has no idea about any rounding, limits, scaling etc of the value it might have to display? > > Therein lies the problem, I fear. There's a reason for models and views? The problem is that a general purpose ?display a string? morph can?t know enough to display a string representing a number to any special format, and so has to rely upon the number value being ?reasonable?. Which is of course a bit of a problem since numbers are well known for being unreliable jerks with bad manners. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: MII: Mask all Interrupts and then Interrupt From commits at source.squeak.org Wed Jul 20 21:03:46 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jul 20 21:03:47 2016 Subject: [squeak-dev] The Trunk: Morphic-pre.1192.mcz Message-ID: Patrick Rein uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-pre.1192.mcz ==================== Summary ==================== Name: Morphic-pre.1192 Author: pre Time: 20 July 2016, 11:03:12.063382 pm UUID: bd2a03f6-120a-d543-af91-d4535051c547 Ancestors: Morphic-mt.1191 Removing code from the TextMorph which copied text attributes from the old content to the new content in certain cases. =============== Diff against Morphic-mt.1191 =============== Item was changed: ----- Method: TextMorph>>newContents: (in category 'accessing') ----- newContents: stringOrText "Accept new text contents." | newText embeddedMorphs oldSelection | "If my text is all the same font, use the font for my new contents" + newText := stringOrText isString + ifTrue: [Text fromString: stringOrText copy ] + ifFalse: [ stringOrText copy asText. "should be veryDeepCopy?" ]. - newText := stringOrText isString ifTrue: [ | textSize | - (text notNil - and: [ (textSize := text size) > 0 - and: [ (text runLengthFor: 1) = textSize ]]) ifTrue: [ | attribs | - attribs := text attributesAt: 1 forStyle: textStyle. - Text string: stringOrText copy attributes: attribs. - ] - ifFalse: [ Text fromString: stringOrText copy ] - ] - ifFalse: [ stringOrText copy asText. "should be veryDeepCopy?" ]. (text = newText and: [text runs = newText runs]) ifTrue: [^ self]. "No substantive change" text ifNotNil: [(embeddedMorphs := text embeddedMorphs) ifNotNil: [self removeAllMorphsIn: embeddedMorphs. embeddedMorphs do: [:m | m delete]]]. oldSelection := editor ifNotNil: [:ed | ed selectionInterval]. text := newText. "add all morphs off the visible region; they'll be moved into the right place when they become visible. (this can make the scrollable area too large, though)" newText embeddedMorphs do: [:m | self addMorph: m. m position: -1000 @ 0]. self releaseParagraph. "update the paragraph cache" self paragraph. oldSelection ifNotNil: [:sel | self selectFrom: sel first to: sel last]. "re-instantiate to set bounds" self world ifNotNil: [self world startSteppingSubmorphsOf: self]! From commits at source.squeak.org Wed Jul 20 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jul 20 21:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160720215502.14121.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068281.html Name: Network-nice.179 Ancestors: Network-bp.178 Let VMMaker (.oscog branch) code generation work on windows. Detail: VMMaker uses something like: FileDirectory default pathFromURI: self sourceTree, '/spur64src' On windows, the URI encodes drive spec letter $: into '%3A'. This was never decoded, and then C%3A\Users\nicolas\opensmalltalk-vm\spur64src is not a good path specification and miserably fails :( Note that DosFileDirectory class privateFullPathForURI: seems to perform some similar task, so maybe the next step will be to CLEAN UP!!! ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068282.html Name: SUnit-pre.104 Ancestors: SUnit-ul.103 Adds a new SUnit extension for tests which require an internet connection. This call should come at the beginning of the test to assert an internet connection and document any implicit dependence on network resources. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068283.html Name: Tests-pre.346 Ancestors: Tests-pre.345 Fixed the expected failures in the locales test to catch the current misconfiguration in the language extensions. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068284.html Name: Morphic-pre.1192 Ancestors: Morphic-mt.1191 Removing code from the TextMorph which copied text attributes from the old content to the new content in certain cases. ============================================= From Das.Linux at gmx.de Thu Jul 21 00:15:17 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Jul 21 00:15:21 2016 Subject: [squeak-dev] The Trunk: Morphic-pre.1192.mcz Message-ID: <6C398473-5957-4B7D-BA11-366D4D0D06E3@gmx.de> On 20.07.2016, at 21:03, commits@source.squeak.org wrote: > Patrick Rein uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-pre.1192.mcz > > ==================== Summary ==================== > > Name: Morphic-pre.1192 > Author: pre > Time: 20 July 2016, 11:03:12.063382 pm > UUID: bd2a03f6-120a-d543-af91-d4535051c547 > Ancestors: Morphic-mt.1191 > > Removing code from the TextMorph which copied text attributes from the old content to the new content in certain cases. > Yes, but now the comment is wrong. > =============== Diff against Morphic-mt.1191 =============== > > Item was changed: From commits at source.squeak.org Thu Jul 21 06:01:40 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 21 06:01:42 2016 Subject: [squeak-dev] The Trunk: Morphic-pre.1193.mcz Message-ID: Patrick Rein uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-pre.1193.mcz ==================== Summary ==================== Name: Morphic-pre.1193 Author: pre Time: 21 July 2016, 8:01:01.282686 am UUID: a5a927f6-7084-0a4d-be19-dc32eeeb31e8 Ancestors: Morphic-pre.1192 Fixing the comment of TextMorph>>#newContents: and while being on it improving code readability of some methods. =============== Diff against Morphic-pre.1192 =============== Item was changed: ----- Method: TextMorph>>fixUponLoad:seg: (in category 'objects from disk') ----- fixUponLoad: aProject seg: anImageSegment + "We are in an old project that is being loaded from disk. Fix up conventions that have changed." - "We are in an old project that is being loaded from disk. - Fix up conventions that have changed." | substituteFont | + substituteFont := aProject projectParameters at: #substitutedFont ifAbsent: [#none]. + (substituteFont ~~ #none and: [self textStyle fontArray includes: substituteFont]) - substituteFont := aProject projectParameters at: - #substitutedFont ifAbsent: [#none]. - (substituteFont ~~ #none and: [self textStyle fontArray - includes: substituteFont]) ifTrue: [ self fit ]. ^ super fixUponLoad: aProject seg: anImageSegment! Item was changed: ----- Method: TextMorph>>getAllButFirstCharacter (in category 'scripting access') ----- getAllButFirstCharacter "Obtain all but the first character from the receiver; if that would be empty, return a black dot" | aString | + ^ (aString := text string) size > 1 + ifTrue: [aString copyFrom: 2 to: aString size] + ifFalse: ['·']! - ^ (aString := text string) size > 1 ifTrue: [aString copyFrom: 2 to: aString size] ifFalse: ['·']! Item was changed: ----- Method: TextMorph>>getLastCharacter (in category 'accessing') ----- getLastCharacter "obtain the last character from the receiver if it is empty, return a black dot" | aString | + ^ (aString := text string) size > 0 + ifTrue: [aString last asString] + ifFalse: ['·']! - ^ (aString := text string) size > 0 ifTrue: [aString last asString] ifFalse: ['·']! Item was changed: ----- Method: TextMorph>>getMenu: (in category 'event handling') ----- getMenu: shiftKeyState + ^ (shiftKeyState not or: [Preferences noviceMode]) - ^ (shiftKeyState not - or: [Preferences noviceMode]) ifTrue: [TextEditor yellowButtonMenu] ifFalse: [TextEditor shiftedYellowButtonMenu]! Item was changed: ----- Method: TextMorph>>hasTranslucentColor (in category 'accessing') ----- hasTranslucentColor "Overridden from BorderedMorph to test backgroundColor instead of (text) color." + ^ backgroundColor isNil + or: [backgroundColor isColor and: [backgroundColor isTranslucentColor]] + or: [borderColor isColor and: [borderColor isTranslucentColor]]! - backgroundColor ifNil: [^ true]. - (backgroundColor isColor and: [backgroundColor isTranslucentColor]) ifTrue: [^ true]. - (borderColor isColor and: [borderColor isTranslucentColor]) ifTrue: [^ true]. - ^ false - ! Item was changed: ----- Method: TextMorph>>newContents: (in category 'accessing') ----- newContents: stringOrText "Accept new text contents." | newText embeddedMorphs oldSelection | - "If my text is all the same font, use the font for my new contents" newText := stringOrText isString ifTrue: [Text fromString: stringOrText copy ] ifFalse: [ stringOrText copy asText. "should be veryDeepCopy?" ]. (text = newText and: [text runs = newText runs]) ifTrue: [^ self]. "No substantive change" text ifNotNil: [(embeddedMorphs := text embeddedMorphs) ifNotNil: [self removeAllMorphsIn: embeddedMorphs. embeddedMorphs do: [:m | m delete]]]. oldSelection := editor ifNotNil: [:ed | ed selectionInterval]. text := newText. "add all morphs off the visible region; they'll be moved into the right place when they become visible. (this can make the scrollable area too large, though)" newText embeddedMorphs do: [:m | self addMorph: m. m position: -1000 @ 0]. self releaseParagraph. "update the paragraph cache" self paragraph. oldSelection ifNotNil: [:sel | self selectFrom: sel first to: sel last]. "re-instantiate to set bounds" self world ifNotNil: [self world startSteppingSubmorphsOf: self]! Item was changed: ----- Method: TextMorph>>predecessorChanged (in category 'private') ----- predecessorChanged | newStart oldStart | (self hasProperty: #CreatingParagraph) ifTrue: [^self]. newStart := predecessor isNil ifTrue: [1] ifFalse: [predecessor lastCharacterIndex + 1]. (self paragraph adjustedFirstCharacterIndex ~= newStart or: [newStart >= text size]) ifTrue: [paragraph composeAllStartingAt: newStart. self fit] ifFalse: ["If the offset to end of text has not changed, just slide" - oldStart := self firstCharacterIndex. self withSuccessorsDo: [:m | m adjustLineIndicesBy: newStart - oldStart]]! Item was changed: ----- Method: TextMorph>>recognizerArena (in category 'containment') ----- recognizerArena "Answer the rectangular area, in world coordinates, that the character recognizer should regard as its tablet" | outer | ^ (outer := self ownerThatIsA: PluggableTextMorph) + ifNotNil: [outer boundsInWorld] + ifNil: [self boundsInWorld]! - ifNotNil: - [outer boundsInWorld] - ifNil: - [self boundsInWorld]! Item was changed: ----- Method: TextMorph>>resetBlinkCursor (in category 'blinking') ----- resetBlinkCursor "Reset the blinking cursor" | para | self blinkStart: Time millisecondClockValue + 500. para := paragraph ifNil: [^self]. para showCaret = para focused ifFalse:[ para caretRect ifNotNil: [ :r | self invalidRect: r]. + para showCaret: para focused.]. - para showCaret: para focused. - ]. ! From commits at source.squeak.org Thu Jul 21 09:16:45 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 21 09:16:47 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1194.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1194.mcz ==================== Summary ==================== Name: Morphic-mt.1194 Author: mt Time: 21 July 2016, 11:16:04.356126 am UUID: 651c8cbd-ca2b-d247-95e2-b9d53eae175b Ancestors: Morphic-pre.1193 Fixes a small bug in layout computation of buttons. =============== Diff against Morphic-pre.1193 =============== Item was changed: ----- Method: PluggableButtonMorph>>updateMinimumExtent (in category 'layout') ----- updateMinimumExtent | hMin vMin | self label isMorph ifTrue: [^ self minimumExtent: self label minExtent]. hMin := vMin := 0. + self hResizing ~~ #spaceFill - self hResizing == #shrinkWrap ifTrue: [hMin := (self font widthOfString: self label)]. + self vResizing ~~ #spaceFill - self vResizing == #shrinkWrap ifTrue: [vMin := self font height]. hMin := hMin + (2* self borderStyle width). vMin := vMin + (2* self borderStyle width). self layoutInset isRectangle ifTrue: [ hMin := hMin + self layoutInset left + self layoutInset right. vMin := vMin + self layoutInset top + self layoutInset bottom] ifFalse: [self layoutInset isPoint ifTrue: [ hMin := hMin + (2* self layoutInset x). vMin := vMin + (2* self layoutInset y)] ifFalse: [ hMin := hMin + (2* self layoutInset). vMin := vMin + (2* self layoutInset)]]. self minimumExtent: hMin @ vMin. "Since we have no submorphs, we have to resize here if we want to shrink wrap." self hResizing == #shrinkWrap ifTrue: [self width: hMin]. self vResizing == #shrinkWrap ifTrue: [self height: vMin].! From commits at source.squeak.org Thu Jul 21 09:21:08 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 21 09:21:10 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1195.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1195.mcz ==================== Summary ==================== Name: Morphic-mt.1195 Author: mt Time: 21 July 2016, 11:20:30.280126 am UUID: c6b318c6-305b-d048-883b-11ced4969c1f Ancestors: Morphic-mt.1194 Fixes a small UI glitch where the help text was not removed if the contents of a pluggable text morph were changed programmatically. =============== Diff against Morphic-mt.1194 =============== Item was changed: ----- Method: PluggableTextMorph>>setText: (in category 'model access') ----- setText: aText textMorph ifNil: [textMorph := self textMorphClass new contents: aText wrappedTo: self innerBounds width. textMorph margins: (3@0 corner: 0@0); setEditView: self; autoFit: true; setProperty: #indicateKeyboardFocus toValue: #never. scroller addMorph: textMorph. "Reset minExtent because only now we can anser #isAutoFit correctly." self minimumExtent: 0@0; updateMinimumExtent] ifNotNil: [textMorph newContents: aText]. self hasUnacceptedEdits: false. + self setScrollDeltas. + + self changed. "Redraw the whole area. For example, it might not be necssary to draw the help text anymore."! - self setScrollDeltas.! From commits at source.squeak.org Thu Jul 21 09:24:18 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 21 09:24:20 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1196.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1196.mcz ==================== Summary ==================== Name: Morphic-mt.1196 Author: mt Time: 21 July 2016, 11:23:40.453126 am UUID: d866228c-fedc-2147-afd9-821191a84612 Ancestors: Morphic-mt.1195 For lists, add an option to allow empty filter results. Also support setting the current filter string programmatically. =============== Diff against Morphic-mt.1195 =============== Item was added: + ----- Method: PluggableListMorph>>allowEmptyFilterResult (in category 'filtering') ----- + allowEmptyFilterResult + ^ self valueOfProperty: #allowEmptyFilterResult ifAbsent: [false]! Item was added: + ----- Method: PluggableListMorph>>allowEmptyFilterResult: (in category 'filtering') ----- + allowEmptyFilterResult: aBoolean + + self + setProperty: #allowEmptyFilterResult + toValue: aBoolean.! Item was changed: ----- Method: PluggableListMorph>>filterList (in category 'filtering') ----- filterList self hasFilter ifTrue: [ | frontMatching substringMatching newList | self indicateFiltered. frontMatching := OrderedCollection new. substringMatching := OrderedCollection new. list withIndexDo: [ : each : n | | foundPos | foundPos := each asString findString: lastKeystrokes startingAt: 1 caseSensitive: false. foundPos = 1 ifTrue: [ frontMatching add: each ] ifFalse: [ foundPos = 0 ifFalse: [ substringMatching add: each ] ] ]. newList := frontMatching , substringMatching. + (newList isEmpty not or: [ self allowEmptyFilterResult ]) + ifTrue: [ list := newList ] + ifFalse: - newList - ifEmpty: [ lastKeystrokes := lastKeystrokes allButLast: 1. self flash ; + filterList ] ] - filterList ] - ifNotEmpty: [ list := newList ] ] ifFalse: [ self indicateUnfiltered ]! Item was added: + ----- Method: PluggableListMorph>>filterList: (in category 'filtering') ----- + filterList: aString + "Manually set the list filter." + + lastKeystrokes := aString. + self filterList. + self updateList. + self changeModelSelection: (list ifEmpty: [0] ifNotEmpty: [self modelIndexFor: 1]).! From commits at source.squeak.org Thu Jul 21 09:40:15 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 21 09:40:19 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Kernel-mt.99.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Kernel to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Kernel-mt.99.mcz ==================== Summary ==================== Name: ToolBuilder-Kernel-mt.99 Author: mt Time: 21 July 2016, 11:40:05.619126 am UUID: f0170bb7-1cf2-614f-887e-499ef591d517 Ancestors: ToolBuilder-Kernel-mt.98 Add a way to choose-or-add via the UI manager. =============== Diff against ToolBuilder-Kernel-mt.98 =============== Item was added: + ----- Method: UIManager>>chooseFromOrAddTo:lines:title: (in category 'ui requests') ----- + chooseFromOrAddTo: aList lines: linesArray title: aString + + | index | + index := (UIManager default chooseFrom: {'new...'}, aList lines: linesArray title: aString). + index = 0 ifTrue: [^ nil]. + + index = 1 ifTrue: [ + ^ self request: 'Please type new value' initialAnswer: '']. + + ^ aList at: index - 1! From commits at source.squeak.org Thu Jul 21 09:43:23 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 21 09:43:25 2016 Subject: [squeak-dev] The Trunk: Tools-mt.707.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.707.mcz ==================== Summary ==================== Name: Tools-mt.707 Author: mt Time: 21 July 2016, 11:43:02.277126 am UUID: 0630c0a4-da1c-114b-be39-e5120a3a0e63 Ancestors: Tools-eem.706 When adding a message category in the browser, invoke choose-or-add dialog via the UI manager. =============== Diff against Tools-eem.706 =============== Item was changed: ----- Method: Browser>>addCategory (in category 'message category functions') ----- addCategory "Present a choice of categories or prompt for a new category name and add it before the current selection, or at the end if no current selection" + | labels reject lines newName oldCategory | - | labels reject lines menuIndex newName oldCategory | self okToChange ifFalse: [^ self]. self hasClassSelected ifFalse: [^ self]. + labels := OrderedCollection new. - labels := OrderedCollection with: 'new...'. reject := Set new. reject addAll: self selectedClassOrMetaClass organization categories; add: ClassOrganizer nullCategory; add: ClassOrganizer default. lines := OrderedCollection new. self selectedClassOrMetaClass allSuperclasses do: [:cls | | cats | cls = Object ifFalse: [ cats := cls organization categories reject: [:cat | reject includes: cat]. cats isEmpty ifFalse: [ lines add: labels size. labels addAll: cats asSortedCollection. reject addAll: cats]]]. + (newName := UIManager default + chooseFromOrAddTo: labels + lines: lines + title: 'Add Category') ifNil: [^ self]. - newName := (labels size = 1 or: [ - menuIndex := (UIManager default chooseFrom: labels lines: lines title: 'Add Category'). - menuIndex = 0 ifTrue: [^ self]. - menuIndex = 1]) - ifTrue: [ - self request: 'Please type new category name' - initialAnswer: 'category name'] - ifFalse: [ - labels at: menuIndex]. oldCategory := self selectedMessageCategoryName. newName isEmpty ifTrue: [^ self] ifFalse: [newName := newName asSymbol]. self classOrMetaClassOrganizer addCategory: newName before: (self hasMessageCategorySelected ifFalse: [nil] ifTrue: [self selectedMessageCategoryName]). self changed: #messageCategoryList. self selectMessageCategoryNamed: (oldCategory isNil ifTrue: [self classOrMetaClassOrganizer categories last] ifFalse: [oldCategory]). self changed: #messageCategoryList. ! From commits at source.squeak.org Thu Jul 21 09:49:11 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 21 09:49:12 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1197.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1197.mcz ==================== Summary ==================== Name: Morphic-mt.1197 Author: mt Time: 21 July 2016, 11:48:28.509126 am UUID: 48cf334c-0bf3-7846-b93a-b074b3ff764c Ancestors: Morphic-mt.1196 Since grips and splitters are at the level of bordered morphs, support fast-reframing at the level of bordered morphs, too. =============== Diff against Morphic-mt.1196 =============== Item was added: + ----- Method: BorderedMorph>>doFastWindowReframe: (in category 'resize handling') ----- + doFastWindowReframe: ptName + + | newBounds | + "For fast display, only higlight the rectangle during loop" + newBounds := self bounds newRectButtonPressedDo: [:f | + f + withSideOrCorner: ptName + setToPoint: (self pointFromWorld: Sensor cursorPoint) + minExtent: self minimumExtent]. + self bounds: newBounds. + ^newBounds.! Item was added: + ----- Method: BorderedMorph>>fastFramingOn (in category 'resize handling') ----- + fastFramingOn + + ^ Preferences fastDragWindowForMorphic! Item was removed: - ----- Method: SystemWindow>>doFastWindowReframe: (in category 'resize/collapse') ----- - doFastWindowReframe: ptName - - | newBounds | - "For fast display, only higlight the rectangle during loop" - newBounds := self bounds newRectButtonPressedDo: [:f | - f - withSideOrCorner: ptName - setToPoint: (self pointFromWorld: Sensor cursorPoint) - minExtent: self minimumExtent]. - self bounds: newBounds. - ^newBounds.! From commits at source.squeak.org Thu Jul 21 09:52:28 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 21 09:52:31 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.169.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.169.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.169 Author: mt Time: 21 July 2016, 11:52:17.079126 am UUID: 19a0f1e3-5b24-a945-ad3d-715c8ad73f3b Ancestors: ToolBuilder-Morphic-topa.168 Fixes a bug in tool builder. Pluggable buttons that have color-callbacks now correctly update the color when created. =============== Diff against ToolBuilder-Morphic-topa.168 =============== Item was changed: ----- Method: MorphicToolBuilder>>buildPluggableButton: (in category 'widgets required') ----- buildPluggableButton: aSpec | widget label state action enabled | label := aSpec label. state := aSpec state. action := aSpec action. widget := self buttonClass on: aSpec model getState: (state isSymbol ifTrue:[state]) action: nil label: (label isSymbol ifTrue:[label]). widget style: aSpec style. aSpec changeLabelWhen ifNotNilDo: [ :event | widget whenChanged: event update: aSpec label]. self register: widget id: aSpec name. enabled := aSpec enabled. enabled isSymbol ifTrue:[widget getEnabledSelector: enabled] ifFalse:[widget enabled:enabled]. widget action: action. aSpec color isColor ifTrue: [widget onColor: aSpec color offColor: aSpec color] ifFalse: [ widget getColorSelector: aSpec color. + widget update: aSpec color]. - widget offColor: Color white]. self buildHelpFor: widget spec: aSpec. (label isSymbol or:[label == nil]) ifFalse:[widget label: label]. self setFrame: aSpec frame in: widget. self setLayoutHintsFor: widget spec: aSpec. parent ifNotNil:[self add: widget to: parent]. ^widget! From commits at source.squeak.org Thu Jul 21 09:55:43 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 21 09:55:44 2016 Subject: [squeak-dev] The Trunk: System-mt.838.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.838.mcz ==================== Summary ==================== Name: System-mt.838 Author: mt Time: 21 July 2016, 11:55:13.013126 am UUID: 2329d019-0868-b345-96ad-3eb65dc1509a Ancestors: System-mt.837 In "slips detected - browse?" dialogs, use "confirm" instead of "choose". =============== Diff against System-mt.837 =============== Item was changed: ----- Method: ChangeSet>>fileOut (in category 'fileIn/Out') ----- fileOut "File out the receiver, to a file whose name is a function of the change-set name and either of the date & time or chosen to have a unique numeric tag, depending on the preference 'changeSetVersionNumbers'" | slips nameToUse | self checkForConversionMethods. ChangeSet promptForDefaultChangeSetDirectoryIfNecessary. nameToUse := Preferences changeSetVersionNumbers ifTrue: [self defaultChangeSetDirectory nextNameFor: self name extension: FileStream cs] ifFalse: [self name , FileDirectory dot , Utilities dateTimeSuffix, FileDirectory dot , FileStream cs]. Cursor write showWhile: [ | internalStream | internalStream := WriteStream on: (String new: 10000). internalStream header; timeStamp. self fileOutPreambleOn: internalStream. self fileOutOn: internalStream. self fileOutPostscriptOn: internalStream. internalStream trailer. FileStream writeSourceCodeFrom: internalStream baseName: (nameToUse copyFrom: 1 to: nameToUse size - 3) isSt: false useHtml: false. ]. Preferences checkForSlips ifFalse: [^ self]. slips := self checkForSlips. (slips size > 0 + and: [UIManager default confirm: 'Changeset was filed out. Still, methods in this fileOut have halts\or references to the Transcript or other ''slips'' in them.\Would you like to browse them?' withCRs + title: 'Browse Slips?']) - and: [(UIManager default chooseFrom: #('Ignore' 'Browse slips') - title: 'Methods in this fileOut have halts - or references to the Transcript - or other ''slips'' in them. - Would you like to browse them?') - = 2]) ifTrue: [self systemNavigation browseMessageList: slips name: 'Possible slips in ' , name]! Item was changed: ----- Method: ChangeSet>>lookForSlips (in category 'fileIn/Out') ----- lookForSlips "Scan the receiver for changes that the user may regard as slips to be remedied" | slips nameLine msg | nameLine := ' "', self name, '" '. (slips := self checkForSlips) size = 0 ifTrue: + [^ self inform: ('No slips detected in change set\"{1}".' translated withCRs format: {self name})]. - [^ self inform: 'No slips detected in change set', nameLine]. msg := slips size = 1 ifTrue: + [ 'One method in change set "{1}"\has a halt, reference to the Transcript, + and/or some other ''slip'' in it.\Would you like to browse it?' translated withCRs format: {self name}] - [ 'One method in change set', nameLine, - 'has a halt, reference to the Transcript, - and/or some other ''slip'' in it. - Would you like to browse it? ?'] ifFalse: + [ '{1} methods in change set "{2}"\have halts or references to the + Transcript or other ''slips'' in them.\Would you like to browse them?' translated withCRs format: {slips size. self name}]. - [ slips size printString, - ' methods in change set', nameLine, 'have halts or references to the - Transcript or other ''slips'' in them. - Would you like to browse them?']. + (UIManager default confirm: msg title: 'Browse Slips?') + ifTrue: [self systemNavigation + browseMessageList: slips + name: 'Possible slips in ', self name]! - (UIManager default chooseFrom: #('Ignore' 'Browse slips') title: msg) = 2 - ifTrue: [self systemNavigation browseMessageList: slips - name: 'Possible slips in ', name]! From commits at source.squeak.org Thu Jul 21 10:01:03 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 21 10:01:06 2016 Subject: [squeak-dev] The Trunk: System-mt.839.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.839.mcz ==================== Summary ==================== Name: System-mt.839 Author: mt Time: 21 July 2016, 12:00:37.651126 pm UUID: b03d59a3-0b13-6f45-87f3-6cc36ac0eb78 Ancestors: System-mt.838 A more descriptive dialog when removing a selector that is used in the system. =============== Diff against System-mt.838 =============== Item was changed: ----- Method: SystemNavigation>>confirmRemovalOf:on: (in category 'ui') ----- confirmRemovalOf: aSelector on: aClass "Determine if it is okay to remove the given selector. Answer 1 if it should be removed, 2 if it should be removed followed by a senders browse, and 3 if it should not be removed." | count answer caption allCalls | allCalls := self allCallsOn: aSelector. (count := allCalls size) = 0 ifTrue: [^ 1]. "no senders -- let the removal happen without warning" count = 1 ifTrue: [(allCalls first actualClass == aClass and: [allCalls first methodSymbol == aSelector]) ifTrue: [^ 1]]. "only sender is itself" + caption := 'The message "{1}" has {2} sender{3}.' translated format: {aSelector. count. count > 1 ifTrue: ['s'] ifFalse: ['']}. + - caption := 'This message has ' , count printString , ' sender'. - count > 1 - ifTrue: [caption := caption copyWith: $s]. answer := UIManager default chooseFrom: #('Remove it' 'Remove, then browse senders' 'Don''t remove, but show me those senders' 'Forget it -- do nothing -- sorry I asked') title: caption. answer = 3 ifTrue: [self browseMessageList: allCalls name: 'Senders of ' , aSelector autoSelect: aSelector keywords first]. answer = 0 ifTrue: [answer := 3]. "If user didn't answer, treat it as cancel" ^ answer min: 3! From peter at ozzard.org Thu Jul 21 11:09:49 2016 From: peter at ozzard.org (Peter Crowther) Date: Thu Jul 21 11:09:53 2016 Subject: [squeak-dev] Rounding floats In-Reply-To: <912CDD1B-AA07-464D-BF9F-F4C0F4FD1BAB@rowledge.org> References: <3E107FAD-4C58-47DA-8E42-6DA50302CB70@rowledge.org> <912CDD1B-AA07-464D-BF9F-F4C0F4FD1BAB@rowledge.org> Message-ID: On 20 July 2016 at 19:47, tim Rowledge wrote: > > > On 19-07-2016, at 1:35 PM, Peter Crowther wrote: > > > > On 19 July 2016 at 18:43, tim Rowledge wrote: > > [...] > > the displaying morph has no idea about any rounding, limits, scaling etc > of the value it might have to display? > > > > Therein lies the problem, I fear. There's a reason for models and views? > > The problem is that a general purpose ?display a string? morph can?t know > enough to display a string representing a number to any special format, and > so has to rely upon the number value being ?reasonable?. Which is of course > a bit of a problem since numbers are well known for being unreliable jerks > with bad manners. > Quite. The interesting architectural question is then where to put the cat-herder ("development manager") that converts between really useful data from unreliable jerks with bad manners (call these "developers" or "managers" as you prefer) and easy-to-consume data in an expected format for those on the other side (call these ditto). I'm presently dealing with a large legacy* desktop stats application that's traditionally done all its rounding in the stats functions and handed ready-formatted strings to the output template system for printing. We're migrating to an approach where the stats functions are exposed to new consumers that expect numeric data, so the rounding and formatting needs to be described by the output template and the template processing system needs to be extended to cope. I feel your pain! Cheers, - Peter P.S. Strange opcode back atcha: BEA - Bitwise Exclusive-And. * Started in Fortran 20+ years ago, went to mixed Fortran, x86 assembler and Visual Basic, now all in C# - interesting how times change! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160721/899c5711/attachment.htm From Marcel.Taeumel at hpi.de Thu Jul 21 14:57:36 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Jul 21 15:41:11 2016 Subject: [squeak-dev] Re: The Trunk: Morphic-pre.1192.mcz In-Reply-To: References: Message-ID: <1469113056831-4907364.post@n4.nabble.com> commits-2 wrote > Patrick Rein uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-pre.1192.mcz > > ==================== Summary ==================== > > Name: Morphic-pre.1192 > Author: pre > Time: 20 July 2016, 11:03:12.063382 pm > UUID: bd2a03f6-120a-d543-af91-d4535051c547 > Ancestors: Morphic-mt.1191 > > Removing code from the TextMorph which copied text attributes from the old > content to the new content in certain cases. > > =============== Diff against Morphic-mt.1191 =============== > > Item was changed: > ----- Method: TextMorph>>newContents: (in category 'accessing') ----- > newContents: stringOrText > "Accept new text contents." > | newText embeddedMorphs oldSelection | > "If my text is all the same font, use the font for my new contents" > + newText := stringOrText isString > + ifTrue: [Text fromString: stringOrText copy ] > + ifFalse: [ stringOrText copy asText. "should be veryDeepCopy?" ]. > - newText := stringOrText isString ifTrue: [ | textSize | > - (text notNil > - and: [ (textSize := text size) > 0 > - and: [ (text runLengthFor: 1) = textSize ]]) ifTrue: [ | attribs | > - attribs := text attributesAt: 1 forStyle: textStyle. > - Text string: stringOrText copy attributes: attribs. > - ] > - ifFalse: [ Text fromString: stringOrText copy ] > - ] > - ifFalse: [ stringOrText copy asText. "should be veryDeepCopy?" ]. > > (text = newText and: [text runs = newText runs]) ifTrue: [^ self]. "No > substantive change" > text ifNotNil: [(embeddedMorphs := text embeddedMorphs) > ifNotNil: > [self removeAllMorphsIn: embeddedMorphs. > embeddedMorphs do: [:m | m delete]]]. > > oldSelection := editor ifNotNil: [:ed | ed selectionInterval]. > text := newText. > > "add all morphs off the visible region; they'll be moved into the right > place when they become visible. (this can make the scrollable area too > large, though)" > newText embeddedMorphs do: > [:m | > self addMorph: m. > m position: -1000 @ 0]. > self releaseParagraph. > "update the paragraph cache" > self paragraph. > oldSelection ifNotNil: [:sel | self selectFrom: sel first to: sel > last]. > "re-instantiate to set bounds" > self world ifNotNil: [self world startSteppingSubmorphsOf: self]! Hi Patrick, this does the same job: ... newText := stringOrText copy asText. ... Because Text >> #asText does not create a new instance of Text for a Text. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-pre-1192-mcz-tp4907285p4907364.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Thu Jul 21 19:50:41 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Jul 21 19:51:24 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1196.mcz In-Reply-To: <579094c6.c28b370a.79cd9.fbafSMTPIN_ADDED_MISSING@mx.google.com> References: <579094c6.c28b370a.79cd9.fbafSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: The original intent was to have a working #flash, and do that when the very next keystroke would result in an empty filter. Because by the time you've emptied the list, you can't use backspace to see where the matching started to fail, and the results thus far. So does this option lead the user into a dead-end? The system is too fast, #flash is rather useless, I think we should put the delay back in to #flash, so it can be a the good indicator it was meant to be of "no more results"... On Thu, Jul 21, 2016 at 4:23 AM, wrote: > Marcel Taeumel uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-mt.1196.mcz > > ==================== Summary ==================== > > Name: Morphic-mt.1196 > Author: mt > Time: 21 July 2016, 11:23:40.453126 am > UUID: d866228c-fedc-2147-afd9-821191a84612 > Ancestors: Morphic-mt.1195 > > For lists, add an option to allow empty filter results. Also support setting the current filter string programmatically. > > =============== Diff against Morphic-mt.1195 =============== > > Item was added: > + ----- Method: PluggableListMorph>>allowEmptyFilterResult (in category 'filtering') ----- > + allowEmptyFilterResult > + ^ self valueOfProperty: #allowEmptyFilterResult ifAbsent: [false]! > > Item was added: > + ----- Method: PluggableListMorph>>allowEmptyFilterResult: (in category 'filtering') ----- > + allowEmptyFilterResult: aBoolean > + > + self > + setProperty: #allowEmptyFilterResult > + toValue: aBoolean.! > > Item was changed: > ----- Method: PluggableListMorph>>filterList (in category 'filtering') ----- > filterList > self hasFilter > ifTrue: > [ | frontMatching substringMatching newList | > self indicateFiltered. > frontMatching := OrderedCollection new. > substringMatching := OrderedCollection new. > list withIndexDo: > [ : each : n | | foundPos | > foundPos := each asString > findString: lastKeystrokes > startingAt: 1 > caseSensitive: false. > foundPos = 1 > ifTrue: [ frontMatching add: each ] > ifFalse: > [ foundPos = 0 ifFalse: [ substringMatching add: each ] ] ]. > newList := frontMatching , substringMatching. > + (newList isEmpty not or: [ self allowEmptyFilterResult ]) > + ifTrue: [ list := newList ] > + ifFalse: > - newList > - ifEmpty: > [ lastKeystrokes := lastKeystrokes allButLast: 1. > self > flash ; > + filterList ] ] > - filterList ] > - ifNotEmpty: [ list := newList ] ] > ifFalse: [ self indicateUnfiltered ]! > > Item was added: > + ----- Method: PluggableListMorph>>filterList: (in category 'filtering') ----- > + filterList: aString > + "Manually set the list filter." > + > + lastKeystrokes := aString. > + self filterList. > + self updateList. > + self changeModelSelection: (list ifEmpty: [0] ifNotEmpty: [self modelIndexFor: 1]).! > > From commits at source.squeak.org Thu Jul 21 20:44:12 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 21 20:44:14 2016 Subject: [squeak-dev] The Trunk: Files-cmm.159.mcz Message-ID: Chris Muller uploaded a new version of Files to project The Trunk: http://source.squeak.org/trunk/Files-cmm.159.mcz ==================== Summary ==================== Name: Files-cmm.159 Author: cmm Time: 21 July 2016, 3:44:04.16263 pm UUID: 52077283-7106-4ab6-8368-d5f4b5f6f641 Ancestors: Files-eem.158 Fix FileDirectory>>#/ to not assume the argument represents another directory; it could be a file. =============== Diff against Files-eem.158 =============== Item was changed: ----- Method: FileDirectory>>/ (in category 'path access') ----- / aString "Answer a FileDirectory on a subdirectory named aString, of the receiver." + ^ FileDirectory directoryEntryFor: (self fullNameFor: aString)! - ^ FileDirectory on: (self fullNameFor: aString)! From asqueaker at gmail.com Thu Jul 21 20:57:06 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Jul 21 20:57:50 2016 Subject: [squeak-dev] The Trunk: Files-cmm.159.mcz In-Reply-To: <57913420.ce4f370a.56e2.5eceSMTPIN_ADDED_MISSING@mx.google.com> References: <57913420.ce4f370a.56e2.5eceSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: This does change the return type in the case of a directory from a FileDirectory to a DirectoryEntryDirectory. The intention is to gradually migrate most of FileDirectory's public api to DirectoryEntryDirectory, and let FileDirectory be concerned with the platform-specific access issues. In the meantime, the most compatible thing to do for backward compatibility with the old #/ is to send #asFileDirectory to the result. On Thu, Jul 21, 2016 at 3:44 PM, wrote: > Chris Muller uploaded a new version of Files to project The Trunk: > http://source.squeak.org/trunk/Files-cmm.159.mcz > > ==================== Summary ==================== > > Name: Files-cmm.159 > Author: cmm > Time: 21 July 2016, 3:44:04.16263 pm > UUID: 52077283-7106-4ab6-8368-d5f4b5f6f641 > Ancestors: Files-eem.158 > > Fix FileDirectory>>#/ to not assume the argument represents another directory; it could be a file. > > =============== Diff against Files-eem.158 =============== > > Item was changed: > ----- Method: FileDirectory>>/ (in category 'path access') ----- > / aString > "Answer a FileDirectory on a subdirectory named aString, of the receiver." > + ^ FileDirectory directoryEntryFor: (self fullNameFor: aString)! > - ^ FileDirectory on: (self fullNameFor: aString)! > > From Das.Linux at gmx.de Thu Jul 21 21:06:22 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Jul 21 21:06:26 2016 Subject: [squeak-dev] The Trunk: Files-cmm.159.mcz In-Reply-To: References: <57913420.ce4f370a.56e2.5eceSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: On 21.07.2016, at 22:57, Chris Muller wrote: > This does change the return type in the case of a directory from a > FileDirectory to a DirectoryEntryDirectory. > > The intention is to gradually migrate most of FileDirectory's public > api to DirectoryEntryDirectory, and let FileDirectory be concerned > with the platform-specific access issues. > > In the meantime, the most compatible thing to do for backward > compatibility with the old #/ is to send #asFileDirectory to the > result. I'm not ok with this change. It makes FileDirectory default / 'myDir' / 'aSubDir' oldFileNamed: 'foo' do: [:stream | ..] unduly complex. If we were about to migrate, we should migrate to FileSytem, I'd say. :) best regards -Tobias > > > On Thu, Jul 21, 2016 at 3:44 PM, wrote: >> Chris Muller uploaded a new version of Files to project The Trunk: >> http://source.squeak.org/trunk/Files-cmm.159.mcz >> >> ==================== Summary ==================== >> >> Name: Files-cmm.159 >> Author: cmm >> Time: 21 July 2016, 3:44:04.16263 pm >> UUID: 52077283-7106-4ab6-8368-d5f4b5f6f641 >> Ancestors: Files-eem.158 >> >> Fix FileDirectory>>#/ to not assume the argument represents another directory; it could be a file. >> >> =============== Diff against Files-eem.158 =============== >> >> Item was changed: >> ----- Method: FileDirectory>>/ (in category 'path access') ----- >> / aString >> "Answer a FileDirectory on a subdirectory named aString, of the receiver." >> + ^ FileDirectory directoryEntryFor: (self fullNameFor: aString)! >> - ^ FileDirectory on: (self fullNameFor: aString)! From commits at source.squeak.org Thu Jul 21 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 21 21:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160721215502.22920.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068285.html Name: Morphic-pre.1193 Ancestors: Morphic-pre.1192 Fixing the comment of TextMorph>>#newContents: and while being on it improving code readability of some methods. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068286.html Name: Morphic-mt.1194 Ancestors: Morphic-pre.1193 Fixes a small bug in layout computation of buttons. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068287.html Name: Morphic-mt.1195 Ancestors: Morphic-mt.1194 Fixes a small UI glitch where the help text was not removed if the contents of a pluggable text morph were changed programmatically. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068288.html Name: Morphic-mt.1196 Ancestors: Morphic-mt.1195 For lists, add an option to allow empty filter results. Also support setting the current filter string programmatically. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068289.html Name: ToolBuilder-Kernel-mt.99 Ancestors: ToolBuilder-Kernel-mt.98 Add a way to choose-or-add via the UI manager. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068290.html Name: Tools-mt.707 Ancestors: Tools-eem.706 When adding a message category in the browser, invoke choose-or-add dialog via the UI manager. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068291.html Name: Morphic-mt.1197 Ancestors: Morphic-mt.1196 Since grips and splitters are at the level of bordered morphs, support fast-reframing at the level of bordered morphs, too. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068292.html Name: ToolBuilder-Morphic-mt.169 Ancestors: ToolBuilder-Morphic-topa.168 Fixes a bug in tool builder. Pluggable buttons that have color-callbacks now correctly update the color when created. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068293.html Name: System-mt.838 Ancestors: System-mt.837 In "slips detected - browse?" dialogs, use "confirm" instead of "choose". ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068294.html Name: System-mt.839 Ancestors: System-mt.838 A more descriptive dialog when removing a selector that is used in the system. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068295.html Name: Files-cmm.159 Ancestors: Files-eem.158 Fix FileDirectory>>#/ to not assume the argument represents another directory; it could be a file. ============================================= From commits at source.squeak.org Fri Jul 22 01:14:46 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 22 01:14:49 2016 Subject: [squeak-dev] The Trunk: Graphics-tpr.354.mcz Message-ID: tim Rowledge uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-tpr.354.mcz ==================== Summary ==================== Name: Graphics-tpr.354 Author: tpr Time: 21 July 2016, 6:14:06.280273 pm UUID: 31f2b403-7687-49a8-944b-b067f32fb482 Ancestors: Graphics-mt.353 Extend Color class>>fromString parsing to allow also a string of the forrm 'r,g,b' where each item can be the string representation of an integer between 0 and 255 =============== Diff against Graphics-mt.353 =============== Item was changed: ----- Method: Color class>>fromString: (in category 'instance creation') ----- fromString: aString + "for HTML color spec: #FFCCAA or white/black/red/other name, or an r,g,b triplet string" - "for HTML color spec: #FFCCAA or white/black" "Color fromString: '#FFCCAA'. Color fromString: 'white'. + Color fromString: 'orange' + Color fromString: '126,42,33' " - Color fromString: 'orange'" + | aColorHex rgb| - | aColorHex | aString isEmptyOrNil ifTrue: [ ^self white ]. aString first = $# ifTrue: [ aColorHex := aString allButFirst ] ifFalse: [ aColorHex := aString ]. + "is the string a 6 digit hex number?" (aColorHex size = 6 and: [ aColorHex allSatisfy: [ :each | '0123456789ABCDEFabcdef' includes: each ] ]) ifTrue: [ | green red blue | + red := (Integer readFrom: (aColorHex first: 2) base: 16). + green := (Integer readFrom: (aColorHex copyFrom: 3 to: 4) base: 16). + blue := (Integer readFrom: (aColorHex last: 2) base: 16). + ^self r: red g: green b: blue range: 255]. + "is the string in the form a,b,c ?" + rgb := aColorHex findTokens: $, . + rgb size = 3 ifTrue: [ + | green red blue | + red := (Integer readFrom:(rgb at: 1)) min: 255 max: 0. + green := (Integer readFrom:(rgb at: 2)) min: 255 max: 0. + blue := (Integer readFrom:(rgb at: 3)) min: 255 max: 0. + ^self r: red g: green b: blue range: 255]. - red := (Integer readFrom: (aColorHex first: 2) base: 16) / 255. - green := (Integer readFrom: (aColorHex copyFrom: 3 to: 4) base: 16) / 255. - blue := (Integer readFrom: (aColorHex last: 2) base: 16) / 255. - ^self r: red g: green b: blue ]. "try to match aColorHex with known named colors, case insensitive" ^self perform: (ColorNames detect: [:colorSymbol | aColorHex sameAs: colorSymbol] ifNone: [ #white ])! From commits at source.squeak.org Fri Jul 22 02:50:57 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 22 02:50:58 2016 Subject: [squeak-dev] The Trunk: Files-cmm.160.mcz Message-ID: Chris Muller uploaded a new version of Files to project The Trunk: http://source.squeak.org/trunk/Files-cmm.160.mcz ==================== Summary ==================== Name: Files-cmm.160 Author: cmm Time: 21 July 2016, 9:50:48.903412 pm UUID: 39b8ccca-fb51-40b1-9967-44ed1dbb2648 Ancestors: Files-cmm.159 Enable DirectoryEntry's with directory-tree enumeration and content stream access. =============== Diff against Files-cmm.159 =============== Item was added: + ----- Method: DirectoryEntry>>directoryTreeDo: (in category 'enumeration') ----- + directoryTreeDo: oneArgBlock + self subclassResponsibility! Item was added: + ----- Method: DirectoryEntryDirectory>>directoryTreeDo: (in category 'enumeration') ----- + directoryTreeDo: oneArgBlock + self asFileDirectory directoryTreeDo: oneArgBlock! Item was changed: + ----- Method: DirectoryEntryFile>>contentsFrom:to: (in category 'contents') ----- - ----- Method: DirectoryEntryFile>>contentsFrom:to: (in category 'stream access') ----- contentsFrom: startPosition to: endPosition "Answer my contents from startPosition to endPosition." ^ FileStream detectFile: self readStream do: [ : stream | stream position: startPosition ; next: endPosition - startPosition + 1 ]! Item was changed: + ----- Method: DirectoryEntryFile>>contentsTo: (in category 'contents') ----- - ----- Method: DirectoryEntryFile>>contentsTo: (in category 'stream access') ----- contentsTo: endPosition "Answer my contents up to endPosition." ^ self contentsFrom: 0 to: endPosition! Item was added: + ----- Method: DirectoryEntryFile>>directoryTreeDo: (in category 'enumeration') ----- + directoryTreeDo: oneArgBlock + oneArgBlock value: (OrderedCollection with: self)! Item was added: + ----- Method: DirectoryEntryFile>>readStreamDo: (in category 'stream access') ----- + readStreamDo: aBlock + "Open a read stream on my contents and answer the value of aBlock with it, ensuring the stream is closed." + ^ FileStream + detectFile: self readStream + do: aBlock! Item was added: + ----- Method: DirectoryEntryFile>>readWriteStreamDo: (in category 'stream access') ----- + readWriteStreamDo: aBlock + "Open a read-write stream on my contents and answer the value of aBlock with it, ensuring the stream is closed." + ^ FileStream + detectFile: self readWriteStream + do: aBlock! From ma.chris.m at gmail.com Fri Jul 22 02:57:08 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Fri Jul 22 02:57:50 2016 Subject: [squeak-dev] The Trunk: Files-cmm.159.mcz In-Reply-To: References: <57913420.ce4f370a.56e2.5eceSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Hi Tobias, this is just a fix, not a change. The 2007 refactor was intended for applications to migrate to the use of the DirectoryEntry hierarchy, so you can (and should) now write this instead: FileDirectory default / 'myDir' / 'aSubDir' / 'foo' readWriteStreamDo: [:stream | ..] The intent always was to add them lazily, as needed. I have just committed that along with one of my other recent improvements. Best, Chris On Thu, Jul 21, 2016 at 4:06 PM, Tobias Pape wrote: > > On 21.07.2016, at 22:57, Chris Muller wrote: > >> This does change the return type in the case of a directory from a >> FileDirectory to a DirectoryEntryDirectory. >> >> The intention is to gradually migrate most of FileDirectory's public >> api to DirectoryEntryDirectory, and let FileDirectory be concerned >> with the platform-specific access issues. >> >> In the meantime, the most compatible thing to do for backward >> compatibility with the old #/ is to send #asFileDirectory to the >> result. > > > I'm not ok with this change. > > It makes > > FileDirectory default / 'myDir' / 'aSubDir' oldFileNamed: 'foo' do: [:stream | ..] > > unduly complex. > If we were about to migrate, we should migrate to FileSytem, I'd say. :) > > best regards > -Tobias > >> >> >> On Thu, Jul 21, 2016 at 3:44 PM, wrote: >>> Chris Muller uploaded a new version of Files to project The Trunk: >>> http://source.squeak.org/trunk/Files-cmm.159.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: Files-cmm.159 >>> Author: cmm >>> Time: 21 July 2016, 3:44:04.16263 pm >>> UUID: 52077283-7106-4ab6-8368-d5f4b5f6f641 >>> Ancestors: Files-eem.158 >>> >>> Fix FileDirectory>>#/ to not assume the argument represents another directory; it could be a file. >>> >>> =============== Diff against Files-eem.158 =============== >>> >>> Item was changed: >>> ----- Method: FileDirectory>>/ (in category 'path access') ----- >>> / aString >>> "Answer a FileDirectory on a subdirectory named aString, of the receiver." >>> + ^ FileDirectory directoryEntryFor: (self fullNameFor: aString)! >>> - ^ FileDirectory on: (self fullNameFor: aString)! > > From Marcel.Taeumel at hpi.de Fri Jul 22 07:17:22 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Jul 22 08:01:00 2016 Subject: [squeak-dev] Re: The Trunk: Morphic-mt.1196.mcz In-Reply-To: References: Message-ID: <1469171842182-4907433.post@n4.nabble.com> Chris Muller-3 wrote > The original intent was to have a working #flash, and do that when the > very next keystroke would result in an empty filter. > > Because by the time you've emptied the list, you can't use backspace > to see where the matching started to fail, and the results thus far. > So does this option lead the user into a dead-end? > > The system is too fast, #flash is rather useless, I think we should > put the delay back in to #flash, so it can be a the good indicator it > was meant to be of "no more results"... > > > On Thu, Jul 21, 2016 at 4:23 AM, < > commits@.squeak > > wrote: >> Marcel Taeumel uploaded a new version of Morphic to project The Trunk: >> http://source.squeak.org/trunk/Morphic-mt.1196.mcz >> >> ==================== Summary ==================== >> >> Name: Morphic-mt.1196 >> Author: mt >> Time: 21 July 2016, 11:23:40.453126 am >> UUID: d866228c-fedc-2147-afd9-821191a84612 >> Ancestors: Morphic-mt.1195 >> >> For lists, add an option to allow empty filter results. Also support >> setting the current filter string programmatically. >> >> =============== Diff against Morphic-mt.1195 =============== >> >> Item was added: >> + ----- Method: PluggableListMorph>>allowEmptyFilterResult (in category >> 'filtering') ----- >> + allowEmptyFilterResult >> + ^ self valueOfProperty: #allowEmptyFilterResult ifAbsent: >> [false]! >> >> Item was added: >> + ----- Method: PluggableListMorph>>allowEmptyFilterResult: (in category >> 'filtering') ----- >> + allowEmptyFilterResult: aBoolean >> + >> + self >> + setProperty: #allowEmptyFilterResult >> + toValue: aBoolean.! >> >> Item was changed: >> ----- Method: PluggableListMorph>>filterList (in category 'filtering') >> ----- >> filterList >> self hasFilter >> ifTrue: >> [ | frontMatching substringMatching newList | >> self indicateFiltered. >> frontMatching := OrderedCollection new. >> substringMatching := OrderedCollection new. >> list withIndexDo: >> [ : each : n | | foundPos | >> foundPos := each asString >> findString: lastKeystrokes >> startingAt: 1 >> caseSensitive: false. >> foundPos = 1 >> ifTrue: [ frontMatching add: each >> ] >> ifFalse: >> [ foundPos = 0 ifFalse: [ >> substringMatching add: each ] ] ]. >> newList := frontMatching , substringMatching. >> + (newList isEmpty not or: [ self >> allowEmptyFilterResult ]) >> + ifTrue: [ list := newList ] >> + ifFalse: >> - newList >> - ifEmpty: >> [ lastKeystrokes := >> lastKeystrokes allButLast: 1. >> self >> flash ; >> + filterList ] ] >> - filterList ] >> - ifNotEmpty: [ list := newList ] ] >> ifFalse: [ self indicateUnfiltered ]! >> >> Item was added: >> + ----- Method: PluggableListMorph>>filterList: (in category 'filtering') >> ----- >> + filterList: aString >> + "Manually set the list filter." >> + >> + lastKeystrokes := aString. >> + self filterList. >> + self updateList. >> + self changeModelSelection: (list ifEmpty: [0] ifNotEmpty: [self >> modelIndexFor: 1]).! >> >> Hi Chris, sure, we can make the flash work again. Still, I want to support a filter that does not matches any results to use it in our ListChooser. :-) Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-1196-mcz-tp4907320p4907433.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Fri Jul 22 07:21:15 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Jul 22 08:04:52 2016 Subject: [squeak-dev] Re: The Trunk: Files-cmm.159.mcz In-Reply-To: References: Message-ID: <1469172075086-4907435.post@n4.nabble.com> Chris Muller-3 wrote > This does change the return type in the case of a directory from a > FileDirectory to a DirectoryEntryDirectory. > > The intention is to gradually migrate most of FileDirectory's public > api to DirectoryEntryDirectory, and let FileDirectory be concerned > with the platform-specific access issues. > > In the meantime, the most compatible thing to do for backward > compatibility with the old #/ is to send #asFileDirectory to the > result. > > > On Thu, Jul 21, 2016 at 3:44 PM, < > commits@.squeak > > wrote: >> Chris Muller uploaded a new version of Files to project The Trunk: >> http://source.squeak.org/trunk/Files-cmm.159.mcz >> >> ==================== Summary ==================== >> >> Name: Files-cmm.159 >> Author: cmm >> Time: 21 July 2016, 3:44:04.16263 pm >> UUID: 52077283-7106-4ab6-8368-d5f4b5f6f641 >> Ancestors: Files-eem.158 >> >> Fix FileDirectory>>#/ to not assume the argument represents another >> directory; it could be a file. >> >> =============== Diff against Files-eem.158 =============== >> >> Item was changed: >> ----- Method: FileDirectory>>/ (in category 'path access') ----- >> / aString >> "Answer a FileDirectory on a subdirectory named aString, of the >> receiver." >> + ^ FileDirectory directoryEntryFor: (self fullNameFor: aString)! >> - ^ FileDirectory on: (self fullNameFor: aString)! >> >> Hi Chris, please watch out for the feature freeze deadline, which is a good week from today. Either ensure that you can finish this migration in time or do it so that no other code breaks. Changing the return type of a call is a serious thing. :-) Thanks. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Files-cmm-159-mcz-tp4907392p4907435.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Fri Jul 22 08:39:09 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 22 08:39:11 2016 Subject: [squeak-dev] The Trunk: System-mt.840.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.840.mcz ==================== Summary ==================== Name: System-mt.840 Author: mt Time: 22 July 2016, 10:38:45.135908 am UUID: 6ab5c492-6207-3e4f-b2df-8028d64fcf94 Ancestors: System-mt.839 Fixes a bug when filing out change sets with changed class definitions. The bug was that the concept of "fat class definition", which merges old and new inst vars for the loading process, did not account for existing vars in the super class. =============== Diff against System-mt.839 =============== Item was changed: ----- Method: ChangeSet>>fatDefForClass: (in category 'class changes') ----- fatDefForClass: class + | newDef oldDef oldStrm newStrm outStrm oldVars newVars addedVars superVars | - | newDef oldDef oldStrm newStrm outStrm oldVars newVars addedVars | class isBehavior ifFalse: [^class definition]. newDef := class definition. oldDef := (self changeRecorderFor: class) priorDefinition. oldDef ifNil: [^ newDef]. oldDef = newDef ifTrue: [^ newDef]. oldStrm := ReadStream on: oldDef. newStrm := ReadStream on: newDef. outStrm := WriteStream on: (String new: newDef size * 2). "Merge inst vars from old and new defs..." oldStrm upToAll: 'instanceVariableNames'; upTo: $'. outStrm nextPutAll: (newStrm upToAll: 'instanceVariableNames'); nextPutAll: 'instanceVariableNames:'. newStrm peek = $: ifTrue: [newStrm next]. "may or may not be there, but already written" outStrm nextPutAll: (newStrm upTo: $'); nextPut: $'. oldVars := (oldStrm upTo: $') findTokens: Character separators. newVars := (newStrm upTo: $') findTokens: Character separators. addedVars := oldVars asSet addAll: newVars; removeAll: oldVars; asOrderedCollection. + superVars := class allInstVarNames copyWithoutAll: class instVarNames. + oldVars := oldVars copyWithoutAll: superVars. oldVars , addedVars do: [:var | outStrm nextPutAll: var; space]. outStrm nextPut: $'. class isMeta ifFalse: ["Merge class vars from old and new defs..." oldStrm upToAll: 'classVariableNames:'; upTo: $'. outStrm nextPutAll: (newStrm upToAll: 'classVariableNames:'); nextPutAll: 'classVariableNames:'; nextPutAll: (newStrm upTo: $'); nextPut: $'. oldVars := (oldStrm upTo: $') findTokens: Character separators. newVars := (newStrm upTo: $') findTokens: Character separators. addedVars := oldVars asSet addAll: newVars; removeAll: oldVars; asOrderedCollection. + superVars := class allClassVarNames copyWithoutAll: class classVarNames. + oldVars := oldVars copyWithoutAll: superVars. oldVars , addedVars do: [:var | outStrm nextPutAll: var; space]. outStrm nextPut: $']. outStrm nextPutAll: newStrm upToEnd. ^ outStrm contents ! From commits at source.squeak.org Fri Jul 22 09:48:36 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 22 09:48:40 2016 Subject: [squeak-dev] The Trunk: System-mt.841.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.841.mcz ==================== Summary ==================== Name: System-mt.841 Author: mt Time: 22 July 2016, 11:48:11.810945 am UUID: b1354fd5-23af-774d-a0df-a39882b25093 Ancestors: System-mt.840 Make the file-drop-service-menu more descriptive. =============== Diff against System-mt.840 =============== Item was changed: ----- Method: DefaultExternalDropHandler>>chooseServiceFrom: (in category 'private') ----- chooseServiceFrom: aCollection "private - choose a service from aCollection asking the user if needed" ^aCollection size = 1 ifTrue: [aCollection anyOne] ifFalse:[UIManager default chooseFrom: (aCollection collect:[:each| each label]) + values: aCollection + title: 'You dropped a file. Please choose a service:' translated withCRs].! - values: aCollection].! Item was changed: ----- Method: ExternalDropHandler class>>chooseServiceFrom: (in category 'private') ----- chooseServiceFrom: aCollection "private - choose a service from aCollection asking the user if needed" ^aCollection size = 1 ifTrue: [aCollection anyOne] ifFalse:[UIManager default chooseFrom: (aCollection collect:[:each| each label]) + values: aCollection + title: 'You dropped a file. Please choose a service:' translated withCRs].! - values: aCollection].! From commits at source.squeak.org Fri Jul 22 11:25:04 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 22 11:25:06 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1198.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1198.mcz ==================== Summary ==================== Name: Morphic-mt.1198 Author: mt Time: 22 July 2016, 1:24:23.585873 pm UUID: 052d96c3-da19-7d4e-9448-5c3fd07148db Ancestors: Morphic-mt.1197 Make system progress morph use accessors instead of direct instVar accesses to support smooth feature updates in the future. Especially #position:label:min:max: is problematic if we add or remove instVars in SystemProgressMorph because that morph is used when loading code. We had a similar issue with HandMorph in the recent past. Still, bugs can occur when updating from older Squeak images. Hence, we might want to consider "restarting" the update process for each entry in an update map. =============== Diff against Morphic-mt.1197 =============== Item was added: + ----- Method: SystemProgressMorph>>activeSlots (in category 'accessing') ----- + activeSlots + + ^ activeSlots! Item was added: + ----- Method: SystemProgressMorph>>activeSlots: (in category 'accessing') ----- + activeSlots: anObject + + activeSlots := anObject! Item was added: + ----- Method: SystemProgressMorph>>bars (in category 'accessing') ----- + bars + + ^ bars! Item was added: + ----- Method: SystemProgressMorph>>bars: (in category 'accessing') ----- + bars: anObject + + bars := anObject! Item was added: + ----- Method: SystemProgressMorph>>font (in category 'accessing') ----- + font + + ^ font! Item was added: + ----- Method: SystemProgressMorph>>font: (in category 'accessing') ----- + font: anObject + + font := anObject! Item was changed: ----- Method: SystemProgressMorph>>freeSlot: (in category 'private') ----- freeSlot: number number > 0 ifFalse: [^self]. lock critical: [| label | + label := self labels at: number. - label := labels at: number. (label isNil or: [label owner isNil]) ifTrue: [^self]. "Has been freed before" label delete. + (self bars at: number) delete. + self activeSlots: self activeSlots - 1. + self activeSlots = 0 - (bars at: number) delete. - activeSlots := activeSlots - 1. - activeSlots = 0 ifTrue: [self delete] ifFalse: [self reposition]]! Item was added: + ----- Method: SystemProgressMorph>>labels (in category 'accessing') ----- + labels + + ^ labels! Item was added: + ----- Method: SystemProgressMorph>>labels: (in category 'accessing') ----- + labels: anObject + + labels := anObject! Item was changed: ----- Method: SystemProgressMorph>>nextSlotFor: (in category 'private') ----- nextSlotFor: shortDescription lock critical: [ | label bar slots | + slots := self labels size. + self activeSlots = slots ifTrue: [^0]. + self activeSlots: self activeSlots + 1. - slots := labels size. - activeSlots = slots ifTrue: [^0]. - activeSlots := activeSlots + 1. 1 to: slots do: [:index | + label := (self labels at: index). - label := (labels at: index). label ifNil: [ + bar := self bars at: index put: (SystemProgressBarMorph new extent: BarWidth@BarHeight). + label := self labels at: index put: (StringMorph contents: shortDescription font: self font). - bar := bars at: index put: (SystemProgressBarMorph new extent: BarWidth@BarHeight). - label := labels at: index put: (StringMorph contents: shortDescription font: font). self addMorphBack: label; addMorphBack: bar. ^index]. label owner ifNil: [ + bar := self bars at: index. + label := self labels at: index. - bar := bars at: index. - label := labels at: index. self addMorphBack: (label contents: shortDescription); addMorphBack: (bar barSize: 0). ^index]]] ! Item was changed: ----- Method: SystemProgressMorph>>position:label:min:max: (in category 'private') ----- position: aPoint label: shortDescription min: minValue max: maxValue | slot range barSize lastRefresh | + self requestedPosition: aPoint. - requestedPosition := aPoint. ((range := maxValue - minValue) < 0 or: [(slot := self nextSlotFor: shortDescription) = 0]) ifTrue: [^[:barVal| 0 ]]. + range <= 0 ifTrue: [self removeMorph: (self bars at: slot)]. - range <= 0 ifTrue: [self removeMorph: (bars at: slot)]. self reposition. self openInWorld. barSize := -1. "Enforces a inital draw of the morph" lastRefresh := 0. ^[:barVal | | newBarSize | barVal isString ifTrue: [ self setLabel: barVal at: slot. self currentWorld displayWorld]. (barVal isNumber and: [range >= 1 and: [barVal between: minValue and: maxValue]]) ifTrue: [ newBarSize := (barVal - minValue / range * BarWidth) truncated. newBarSize = barSize ifFalse: [ barSize := newBarSize. + (self bars at: slot) barSize: barSize. - (bars at: slot) barSize: barSize. Time utcMicrosecondClock - lastRefresh > 25000 ifTrue: [ self currentWorld displayWorld. lastRefresh := Time utcMicrosecondClock]]]. slot]! Item was changed: ----- Method: SystemProgressMorph>>reposition (in category 'private') ----- reposition "Put ourself in the requested position on the display, but ensure completely within the bounds of the display" | position | self bounds: ((self fullBounds align: self fullBounds center + with: (self requestedPosition ifNil: [ self fullBounds center ])) translatedToBeWithin: Display boundingBox). - with: (requestedPosition ifNil: [ self fullBounds center ])) translatedToBeWithin: Display boundingBox). "Check to see if labels are wider than progress bars. In that case do a centered instead of the default left aligned layout." position := self width > (Inset x * 2 + (self borderWidth * 2) + BarWidth) ifTrue: [ #topCenter ] ifFalse: [ #leftCenter ]. self cellPositioning: position! Item was added: + ----- Method: SystemProgressMorph>>requestedPosition (in category 'accessing') ----- + requestedPosition + + ^ requestedPosition! Item was added: + ----- Method: SystemProgressMorph>>requestedPosition: (in category 'accessing') ----- + requestedPosition: anObject + + requestedPosition := anObject! Item was changed: ----- Method: SystemProgressMorph>>setLabel:at: (in category 'labelling') ----- setLabel: shortDescription at: slot + (self labels at: slot) contents: shortDescription. - (labels at: slot) contents: shortDescription. self reposition! From commits at source.squeak.org Fri Jul 22 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 22 21:55:05 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160722215502.12916.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068296.html Name: Graphics-tpr.354 Ancestors: Graphics-mt.353 Extend Color class>>fromString parsing to allow also a string of the forrm 'r,g,b' where each item can be the string representation of an integer between 0 and 255 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068297.html Name: Files-cmm.160 Ancestors: Files-cmm.159 Enable DirectoryEntry's with directory-tree enumeration and content stream access. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068298.html Name: System-mt.840 Ancestors: System-mt.839 Fixes a bug when filing out change sets with changed class definitions. The bug was that the concept of "fat class definition", which merges old and new inst vars for the loading process, did not account for existing vars in the super class. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068299.html Name: System-mt.841 Ancestors: System-mt.840 Make the file-drop-service-menu more descriptive. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068300.html Name: Morphic-mt.1198 Ancestors: Morphic-mt.1197 Make system progress morph use accessors instead of direct instVar accesses to support smooth feature updates in the future. Especially #position:label:min:max: is problematic if we add or remove instVars in SystemProgressMorph because that morph is used when loading code. We had a similar issue with HandMorph in the recent past. Still, bugs can occur when updating from older Squeak images. Hence, we might want to consider "restarting" the update process for each entry in an update map. ============================================= From commits at source.squeak.org Sat Jul 23 09:20:49 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jul 23 09:20:50 2016 Subject: [squeak-dev] The Trunk: Tools-mt.708.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.708.mcz ==================== Summary ==================== Name: Tools-mt.708 Author: mt Time: 23 July 2016, 11:20:24.615969 am UUID: aa8c41ed-8fea-9649-8d36-a44b5f1c73c3 Ancestors: Tools-mt.707 Fixes the small bug where the code holder and browser omitted to communicate the state of their buttons correctly to the pluggable button. =============== Diff against Tools-mt.707 =============== Item was added: + ----- Method: Browser>>decorateButtons (in category 'controls') ----- + decorateButtons + + super decorateButtons. + + self changed: #classCommentIndicated. + self changed: #instanceMessagesIndicated. + self changed: #classMessagesIndicated.! Item was changed: ----- Method: Browser>>plusButtonHit (in category 'class functions') ----- plusButtonHit "Cycle among definition, comment, and hierachy" + editSelection == #editComment ifTrue: [ + self hierarchy. + self decorateButtons. + ^ self]. + + editSelection == #hierarchy ifTrue: [ + self editSelection: #editClass. + (self hasClassSelected and: [self okToChange]) ifTrue: [ - editSelection == #editComment - ifTrue: [self hierarchy. ^ self]. - editSelection == #hierarchy - ifTrue: [self editSelection: #editClass. - self hasClassSelected ifFalse: [^ self]. - self okToChange ifFalse: [^ self]. self changed: #editComment. + self contentsChanged]. + self decorateButtons. + ^ self]. + + self editComment. + self decorateButtons.! - self contentsChanged. - ^ self]. - self editComment! Item was changed: ----- Method: CodeHolder>>decorateButtons (in category 'controls') ----- decorateButtons "Change screen feedback for any buttons in the UI of the receiver that may wish it. Initially, it is only the Inheritance button that is decorated, but one can imagine others." + self changed: #inheritanceButtonColor. + self changed: #inheritanceButtonEnabled. + self changed: #versionsButtonEnabled.! - self changed: #inheritanceButtonColor.! From commits at source.squeak.org Sat Jul 23 09:23:42 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jul 23 09:23:44 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.170.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.170.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.170 Author: mt Time: 23 July 2016, 11:23:30.185969 am UUID: dd12d103-fc6a-f341-8075-c12e14322142 Ancestors: ToolBuilder-Morphic-mt.169 Action buttons being white was surprising and overridden long time ago in PluggableButtonMorphPlus. Still, retain the hook to build action buttions. Maybe we can distinguish them in the future like tool buttons distinguish from push buttons in other UI frameworks such as Qt. =============== Diff against ToolBuilder-Morphic-mt.169 =============== Item was removed: - ----- Method: MorphicToolBuilder>>buildPluggableActionButton: (in category 'widgets optional') ----- - buildPluggableActionButton: aSpec - | button | - button := self buildPluggableButton: aSpec. - button color: Color white. - ^button! Item was changed: ----- Method: MorphicToolBuilder>>buildPluggableButton: (in category 'widgets required') ----- buildPluggableButton: aSpec | widget label state action enabled | label := aSpec label. state := aSpec state. action := aSpec action. widget := self buttonClass on: aSpec model getState: (state isSymbol ifTrue:[state]) action: nil label: (label isSymbol ifTrue:[label]). widget style: aSpec style. aSpec changeLabelWhen ifNotNilDo: [ :event | widget whenChanged: event update: aSpec label]. self register: widget id: aSpec name. enabled := aSpec enabled. enabled isSymbol ifTrue:[widget getEnabledSelector: enabled] ifFalse:[widget enabled:enabled]. widget action: action. aSpec color isColor + ifTrue: [widget offColor: aSpec color] + ifFalse: [widget getColorSelector: aSpec color]. - ifTrue: [widget - onColor: aSpec color - offColor: aSpec color] - ifFalse: [ - widget getColorSelector: aSpec color. - widget update: aSpec color]. self buildHelpFor: widget spec: aSpec. (label isSymbol or:[label == nil]) ifFalse:[widget label: label]. self setFrame: aSpec frame in: widget. self setLayoutHintsFor: widget spec: aSpec. parent ifNotNil:[self add: widget to: parent]. ^widget! From commits at source.squeak.org Sat Jul 23 12:20:13 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jul 23 12:20:15 2016 Subject: [squeak-dev] The Inbox: Tests-pre.347.mcz Message-ID: Patrick Rein uploaded a new version of Tests to project The Inbox: http://source.squeak.org/inbox/Tests-pre.347.mcz ==================== Summary ==================== Name: Tests-pre.347 Author: pre Time: 23 July 2016, 2:20:08.768962 pm UUID: 8272055d-5600-c34b-aac4-9c29a9fda5e5 Ancestors: Tests-pre.346 Adds a Compiler test to the list of expected failures as it can not currently work in an image only using the V3PlusClosures encoder. The test is expected to be executable in an image which uses the V3Encoder. =============== Diff against Tests-pre.346 =============== Item was changed: ----- Method: ClosureCompilerTest>>expectedFailures (in category 'failures') ----- expectedFailures + + ^#(testDebuggerTempAccess testInjectIntoDecompilations testInjectIntoDecompiledDebugs) , + (({CompiledMethod classPool at: #SecondaryBytecodeSetEncoderClass . + CompiledMethod classPool at: #PrimaryBytecodeSetEncoderClass} + includes: EncoderForV3) + ifFalse: [#(testSourceRangeAccessForBlueBookInjectInto)] + ifTrue: [#()]) + ! - ^#(testDebuggerTempAccess testInjectIntoDecompilations testInjectIntoDecompiledDebugs)! Item was changed: ----- Method: ClosureCompilerTest>>testSourceRangeAccessForBlueBookInjectInto (in category 'tests') ----- testSourceRangeAccessForBlueBookInjectInto "Test debugger source range selection for inject:into: for a version compiled with closures" "self new testSourceRangeAccessForBlueBookInjectInto" | source method | + [source := (Collection sourceCodeAt: #inject:into:) asString. - source := (Collection sourceCodeAt: #inject:into:) asString. method := (Parser new encoderClass: EncoderForV3; parse: source class: Collection) generate: (Collection compiledMethodAt: #inject:into:) trailer. + self supportTestSourceRangeAccessForInjectInto: method source: source.] + on: Error + do: [:e | self fail: e.]! - self supportTestSourceRangeAccessForInjectInto: method source: source! From commits at source.squeak.org Sat Jul 23 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jul 23 21:55:03 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160723215502.23821.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068301.html Name: Tools-mt.708 Ancestors: Tools-mt.707 Fixes the small bug where the code holder and browser omitted to communicate the state of their buttons correctly to the pluggable button. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068302.html Name: ToolBuilder-Morphic-mt.170 Ancestors: ToolBuilder-Morphic-mt.169 Action buttons being white was surprising and overridden long time ago in PluggableButtonMorphPlus. Still, retain the hook to build action buttions. Maybe we can distinguish them in the future like tool buttons distinguish from push buttons in other UI frameworks such as Qt. ============================================= From commits at source.squeak.org Mon Jul 25 13:24:55 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Jul 25 13:24:56 2016 Subject: [squeak-dev] The Trunk: Monticello-tfel.637.mcz Message-ID: Tim Felgentreff uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-tfel.637.mcz ==================== Summary ==================== Name: Monticello-tfel.637 Author: tfel Time: 25 July 2016, 3:24:24.996828 pm UUID: cf0d6af1-c703-5044-9c57-e798b0cf3abf Ancestors: Monticello-cmm.636 add a button for rejecting all incoming conflicts that only change AST =============== Diff against Monticello-cmm.636 =============== Item was added: + ----- Method: MCConflict>>chooseSameAST (in category 'as yet unclassified') ----- + chooseSameAST + | fromSrc toSrc | + (self definition isNil or: [self definition isMethodDefinition not]) + ifTrue: [^ self]. + fromSrc := (Parser new parse: operation fromSource class: nil class) + generate decompile asString. + toSrc := (Parser new parse: operation toSource class: nil class) + generate decompile asString. + fromSrc = toSrc ifTrue: [self chooseLocal].! Item was changed: ----- Method: MCMergeBrowser>>buttonSpecs (in category 'as yet unclassified') ----- buttonSpecs ^ #((Merge merge 'Proceed with the merge' canMerge) (Cancel cancel 'Cancel the merge') ('All Newer' chooseAllNewerConflicts 'Choose all newer conflict versions') ('All Older' chooseAllOlderConflicts 'Choose all older conflict versions') ('Rest Reject' chooseAllUnchosenLocal 'Choose local versions of all remaining conflicts') ('Rest Accept' chooseAllUnchosenRemote 'Choose remote versions of all remaining conflicts') + ('Accept same source' chooseAllSameAST 'Choose all local conflicting versions that have essentially the same code') )! Item was added: + ----- Method: MCMergeBrowser>>chooseAllSameAST (in category 'as yet unclassified') ----- + chooseAllSameAST + conflicts do: [ :ea | + ea chooseSameAST ]. + self changed: #text; changed: #list.! From asqueaker at gmail.com Mon Jul 25 15:55:03 2016 From: asqueaker at gmail.com (Chris Muller) Date: Mon Jul 25 15:55:45 2016 Subject: [squeak-dev] The Trunk: Monticello-tfel.637.mcz In-Reply-To: <5796132c.05b7370a.b070b.862bSMTPIN_ADDED_MISSING@mx.google.com> References: <5796132c.05b7370a.b070b.862bSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Please do not use abbreviations. What is AST? Abstract Syntax Tree? This takes the Monticello tool to a new level of technical intimidation and confusion. Why do we need a button for this? On Mon, Jul 25, 2016 at 8:24 AM, wrote: > Tim Felgentreff uploaded a new version of Monticello to project The Trunk: > http://source.squeak.org/trunk/Monticello-tfel.637.mcz > > ==================== Summary ==================== > > Name: Monticello-tfel.637 > Author: tfel > Time: 25 July 2016, 3:24:24.996828 pm > UUID: cf0d6af1-c703-5044-9c57-e798b0cf3abf > Ancestors: Monticello-cmm.636 > > add a button for rejecting all incoming conflicts that only change AST > > =============== Diff against Monticello-cmm.636 =============== > > Item was added: > + ----- Method: MCConflict>>chooseSameAST (in category 'as yet unclassified') ----- > + chooseSameAST > + | fromSrc toSrc | > + (self definition isNil or: [self definition isMethodDefinition not]) > + ifTrue: [^ self]. > + fromSrc := (Parser new parse: operation fromSource class: nil class) > + generate decompile asString. > + toSrc := (Parser new parse: operation toSource class: nil class) > + generate decompile asString. > + fromSrc = toSrc ifTrue: [self chooseLocal].! > > Item was changed: > ----- Method: MCMergeBrowser>>buttonSpecs (in category 'as yet unclassified') ----- > buttonSpecs > ^ #((Merge merge 'Proceed with the merge' canMerge) > (Cancel cancel 'Cancel the merge') > ('All Newer' chooseAllNewerConflicts 'Choose all newer conflict versions') > ('All Older' chooseAllOlderConflicts 'Choose all older conflict versions') > ('Rest Reject' chooseAllUnchosenLocal 'Choose local versions of all remaining conflicts') > ('Rest Accept' chooseAllUnchosenRemote 'Choose remote versions of all remaining conflicts') > + ('Accept same source' chooseAllSameAST 'Choose all local conflicting versions that have essentially the same code') > )! > > Item was added: > + ----- Method: MCMergeBrowser>>chooseAllSameAST (in category 'as yet unclassified') ----- > + chooseAllSameAST > + conflicts do: [ :ea | > + ea chooseSameAST ]. > + self changed: #text; changed: #list.! > > From nicolas.cellier.aka.nice at gmail.com Mon Jul 25 17:03:05 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Mon Jul 25 17:03:08 2016 Subject: [squeak-dev] The Trunk: Monticello-tfel.637.mcz In-Reply-To: References: <5796132c.05b7370a.b070b.862bSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Hi both, 2016-07-25 17:55 GMT+02:00 Chris Muller : > Please do not use abbreviations. What is AST? Abstract Syntax Tree? > This takes the Monticello tool to a new level of technical > intimidation and confusion. > > Why do we need a button for this? > I would say, why only one? Why a lack of symmetry? The same AST means that some formatting has been performed. I think AST currently contains comments, but see below... Of course, with auto-format that we currently apply in the UI, we can't even visualize those diff (grrr! I hate those auto-format) So anyway we are blind to these changes, we could as well throw a dice ;) > > On Mon, Jul 25, 2016 at 8:24 AM, wrote: > > Tim Felgentreff uploaded a new version of Monticello to project The > Trunk: > > http://source.squeak.org/trunk/Monticello-tfel.637.mcz > > > > ==================== Summary ==================== > > > > Name: Monticello-tfel.637 > > Author: tfel > > Time: 25 July 2016, 3:24:24.996828 pm > > UUID: cf0d6af1-c703-5044-9c57-e798b0cf3abf > > Ancestors: Monticello-cmm.636 > > > > add a button for rejecting all incoming conflicts that only change AST > > > > =============== Diff against Monticello-cmm.636 =============== > > > > Item was added: > > + ----- Method: MCConflict>>chooseSameAST (in category 'as yet > unclassified') ----- > > + chooseSameAST > > + | fromSrc toSrc | > > + (self definition isNil or: [self definition isMethodDefinition > not]) > > + ifTrue: [^ self]. > > + fromSrc := (Parser new parse: operation fromSource class: nil > class) > > + generate decompile asString. > > + toSrc := (Parser new parse: operation toSource class: nil class) > > + generate decompile asString. > > + fromSrc = toSrc ifTrue: [self chooseLocal].! > > > OK, so this does not even take the comments in account, because this is decompiled code (reconstructed AST) not original AST. There's another problem here: decompile: sometimes fail, so we should protect ourselves... > > Item was changed: > > ----- Method: MCMergeBrowser>>buttonSpecs (in category 'as yet > unclassified') ----- > > buttonSpecs > > ^ #((Merge merge 'Proceed with the merge' canMerge) > > (Cancel cancel 'Cancel the merge') > > ('All Newer' chooseAllNewerConflicts 'Choose all newer > conflict versions') > > ('All Older' chooseAllOlderConflicts 'Choose all older > conflict versions') > > ('Rest Reject' chooseAllUnchosenLocal 'Choose local > versions of all remaining conflicts') > > ('Rest Accept' chooseAllUnchosenRemote 'Choose remote > versions of all remaining conflicts') > > + ('Accept same source' chooseAllSameAST 'Choose all local > conflicting versions that have essentially the same code') > > )! > > > There's another problem above: Rest Accept is for accepting the remote changes Accept same source is for accepting the local... That can't be the same word, much confusing! > > Item was added: > > + ----- Method: MCMergeBrowser>>chooseAllSameAST (in category 'as yet > unclassified') ----- > > + chooseAllSameAST > > + conflicts do: [ :ea | > > + ea chooseSameAST ]. > > + self changed: #text; changed: #list.! > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160725/1044e014/attachment.htm From leves at caesar.elte.hu Mon Jul 25 18:32:21 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Mon Jul 25 18:32:25 2016 Subject: [squeak-dev] The Trunk: Monticello-tfel.637.mcz In-Reply-To: References: Message-ID: What if the decompiler fails? (Yes, there are a bunch of failing tests.) What if the decompiler generates the same code for different input? Levente On Mon, 25 Jul 2016, commits@source.squeak.org wrote: > Tim Felgentreff uploaded a new version of Monticello to project The Trunk: > http://source.squeak.org/trunk/Monticello-tfel.637.mcz > > ==================== Summary ==================== > > Name: Monticello-tfel.637 > Author: tfel > Time: 25 July 2016, 3:24:24.996828 pm > UUID: cf0d6af1-c703-5044-9c57-e798b0cf3abf > Ancestors: Monticello-cmm.636 > > add a button for rejecting all incoming conflicts that only change AST > > =============== Diff against Monticello-cmm.636 =============== > > Item was added: > + ----- Method: MCConflict>>chooseSameAST (in category 'as yet unclassified') ----- > + chooseSameAST > + | fromSrc toSrc | > + (self definition isNil or: [self definition isMethodDefinition not]) > + ifTrue: [^ self]. > + fromSrc := (Parser new parse: operation fromSource class: nil class) > + generate decompile asString. > + toSrc := (Parser new parse: operation toSource class: nil class) > + generate decompile asString. > + fromSrc = toSrc ifTrue: [self chooseLocal].! > > Item was changed: > ----- Method: MCMergeBrowser>>buttonSpecs (in category 'as yet unclassified') ----- > buttonSpecs > ^ #((Merge merge 'Proceed with the merge' canMerge) > (Cancel cancel 'Cancel the merge') > ('All Newer' chooseAllNewerConflicts 'Choose all newer conflict versions') > ('All Older' chooseAllOlderConflicts 'Choose all older conflict versions') > ('Rest Reject' chooseAllUnchosenLocal 'Choose local versions of all remaining conflicts') > ('Rest Accept' chooseAllUnchosenRemote 'Choose remote versions of all remaining conflicts') > + ('Accept same source' chooseAllSameAST 'Choose all local conflicting versions that have essentially the same code') > )! > > Item was added: > + ----- Method: MCMergeBrowser>>chooseAllSameAST (in category 'as yet unclassified') ----- > + chooseAllSameAST > + conflicts do: [ :ea | > + ea chooseSameAST ]. > + self changed: #text; changed: #list.! > > > From commits at source.squeak.org Mon Jul 25 18:40:51 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Jul 25 18:40:52 2016 Subject: [squeak-dev] The Inbox: Network-ul.180.mcz Message-ID: Levente Uzonyi uploaded a new version of Network to project The Inbox: http://source.squeak.org/inbox/Network-ul.180.mcz ==================== Summary ==================== Name: Network-ul.180 Author: ul Time: 25 July 2016, 8:40:01.001452 pm UUID: 2f23a55c-fec5-41ac-95bd-6a8c2458be95 Ancestors: Network-nice.179 Socket changes: - fixed the comment of #isOtherEndConnected and #isThisEndConnected - do not slice the data (TCP) in the image in #sendData:. Let the VM, the kernel, the hardware deal with that. - use #isOtherEndConnected when receiving data, and #isThisEndConnected when sending data instead of #isConnected - move away from #milliseconds:since:, since we have a clock that won't roll over =============== Diff against Network-nice.179 =============== Item was changed: ----- Method: Socket>>closeAndDestroy: (in category 'connection open/close') ----- closeAndDestroy: timeoutSeconds "First, try to close this connection gracefully. If the close attempt fails or times out, abort the connection. In either case, destroy the socket. Do nothing if the socket has already been destroyed (i.e., if its socketHandle is nil)." + socketHandle ifNil: [ ^self ]. + self isThisEndConnected ifTrue: [ + self close. "Close this end." ]. + (self waitForDisconnectionFor: timeoutSeconds) ifFalse: [ + "The other end has not closed the connect yet, so we will just abort it." + self primSocketAbortConnection: socketHandle ]. + self destroy! - socketHandle ifNotNil: [ - self isConnected ifTrue: [ - self close. "close this end" - (self waitForDisconnectionFor: timeoutSeconds) ifFalse: [ - "The other end didn't close so we just abort the connection" - self primSocketAbortConnection: socketHandle]]. - self destroy]. - ! Item was changed: ----- Method: Socket>>discardReceivedData (in category 'receiving') ----- discardReceivedData "Discard any data received up until now, and return the number of bytes discarded." | buf totalBytesDiscarded | buf := String new: 10000. totalBytesDiscarded := 0. + [self isOtherEndConnected and: [self dataAvailable]] whileTrue: [ - [self isConnected and: [self dataAvailable]] whileTrue: [ totalBytesDiscarded := totalBytesDiscarded + (self receiveDataInto: buf)]. ^ totalBytesDiscarded ! Item was changed: ----- Method: Socket>>isOtherEndConnected (in category 'queries') ----- isOtherEndConnected + "Return true if this socket is connected, or this end has closed the connection but not the other end, so we can still receive data." - "Return true if this socket is connected, or this end has closed the connection but not the other end, so we can still send data." | state | socketHandle ifNil: [ ^false ]. (state := self primSocketConnectionStatus: socketHandle) == Connected ifTrue: [ ^true ]. ^state == ThisEndClosed ! Item was changed: ----- Method: Socket>>isThisEndConnected (in category 'queries') ----- isThisEndConnected + "Return true if this socket is connected, other the other end has closed the connection but not this end, so we can still send data." - "Return true if this socket is connected, other the other end has closed the connection but not this end, so we can still receive data." | state | socketHandle ifNil: [ ^false ]. (state := self primSocketConnectionStatus: socketHandle) == Connected ifTrue: [ ^true ]. ^state == OtherEndClosed ! Item was changed: ----- Method: Socket>>sendData: (in category 'sending') ----- sendData: aStringOrByteArray "Send all of the data in the given array, even if it requires multiple calls to send it all. Return the number of bytes sent." "An experimental version use on slow lines: Longer timeout and smaller writes to try to avoid spurious timeouts." | bytesSent bytesToSend count | bytesToSend := aStringOrByteArray size. bytesSent := 0. [bytesSent < bytesToSend] whileTrue: [ (self waitForSendDoneFor: 60) ifFalse: [ConnectionTimedOut signal: 'send data timeout; data not sent']. count := self primSocket: socketHandle sendData: aStringOrByteArray startIndex: bytesSent + 1 + count: bytesToSend - bytesSent. - count: (bytesToSend - bytesSent min: DefaultSendBufferSize). bytesSent := bytesSent + count]. ^ bytesSent ! Item was changed: ----- Method: Socket>>waitForConnectionFor:ifTimedOut:ifRefused: (in category 'waiting') ----- waitForConnectionFor: timeout ifTimedOut: timeoutBlock ifRefused: refusedBlock "Wait up until the given deadline for a connection to be established. Return true if it is established by the deadline, false if not." + | deadline timeLeft status | + deadline := Time millisecondClockValue + (timeout * 1000) truncated. + (status := self primSocketConnectionStatus: socketHandle) == Connected ifTrue: [^true]. + [ (status == WaitingForConnection) and: [ (timeLeft := deadline - Time millisecondClockValue) > 0 ] ] - | startTime msecsDelta msecsEllapsed status | - startTime := Time millisecondClockValue. - msecsDelta := (timeout * 1000) truncated. - status := self primSocketConnectionStatus: socketHandle. - status = Connected ifTrue: [^true]. - [(status = WaitingForConnection) and: [(msecsEllapsed := Time millisecondsSince: startTime) < msecsDelta]] whileTrue: [ + semaphore waitTimeoutMSecs: timeLeft. + status := self primSocketConnectionStatus: socketHandle ]. + status == Connected ifTrue: [ ^true ]. + status == WaitingForConnection + ifTrue: [ timeoutBlock value ] + ifFalse: [ refusedBlock value ]. + ^false! - semaphore waitTimeoutMSecs: msecsDelta - msecsEllapsed. - status := self primSocketConnectionStatus: socketHandle]. - status = Connected - ifFalse: [ - status = WaitingForConnection - ifTrue: [timeoutBlock value] - ifFalse: [refusedBlock value]. - ^false]. - ^ true! Item was changed: ----- Method: Socket>>waitForConnectionUntil: (in category 'waiting') ----- waitForConnectionUntil: deadline "Wait up until the given deadline for a connection to be established. Return true if it is established by the deadline, false if not." + | status timeLeft | - | status waitTime | [ (status := self primSocketConnectionStatus: socketHandle) == Connected ifTrue: [ ^true ]. status == WaitingForConnection ifFalse: [ ^false ]. + (timeLeft := deadline - Time millisecondClockValue) <= 0 ifTrue: [ ^false ]. + semaphore waitTimeoutMSecs: timeLeft ] repeat! - (waitTime := deadline - Time millisecondClockValue) > 0 ifFalse: [ ^false ]. - semaphore waitTimeoutMSecs: waitTime ] repeat! Item was changed: ----- Method: Socket>>waitForDataFor:ifClosed:ifTimedOut: (in category 'waiting') ----- waitForDataFor: timeout ifClosed: closedBlock ifTimedOut: timedOutBlock "Wait for the given nr of seconds for data to arrive." + | deadline timeLeft | - | startTime msecsDelta | socketHandle ifNil: [ ^closedBlock value ]. + deadline := Time millisecondClockValue + (timeout * 1000) truncated. - startTime := Time millisecondClockValue. - msecsDelta := (timeout * 1000) truncated. [ (self primSocketReceiveDataAvailable: socketHandle) ifTrue: [ ^self ]. + self isOtherEndConnected ifFalse: [ ^closedBlock value ]. + (timeLeft := deadline - Time millisecondClockValue) <= 0 ifTrue: [ ^timedOutBlock value ]. - self isConnected ifFalse: [ ^closedBlock value ]. - (Time millisecondsSince: startTime) < msecsDelta ifFalse: [ ^timedOutBlock value ]. "Providing a maximum for the time for waiting is a workaround for a VM bug which causes sockets waiting for data forever in some rare cases, because the semaphore doesn't get signaled. Remove the ""min: self class maximumReadSemaphoreWaitTimeout"" part when the bug is fixed." readSemaphore waitTimeoutMSecs: + (timeLeft min: self class maximumReadSemaphoreWaitTimeout) ] repeat! - (msecsDelta - (Time millisecondsSince: startTime) min: self class maximumReadSemaphoreWaitTimeout) ] repeat! Item was changed: ----- Method: Socket>>waitForDataIfClosed: (in category 'waiting') ----- waitForDataIfClosed: closedBlock "Wait indefinitely for data to arrive. This method will block until data is available or the socket is closed." socketHandle ifNil: [ ^closedBlock value ]. [ (self primSocketReceiveDataAvailable: socketHandle) ifTrue: [ ^self ]. + self isOtherEndConnected ifFalse: [ ^closedBlock value ]. - self isConnected ifFalse: [ ^closedBlock value ]. "ul 8/13/2014 21:16 Providing a maximum for the time for waiting is a workaround for a VM bug which causes sockets waiting for data forever in some rare cases, because the semaphore doesn't get signaled. Replace the ""waitTimeoutMSecs: self class maximumReadSemaphoreWaitTimeout"" part with ""wait"" when the bug is fixed." readSemaphore waitTimeoutMSecs: self class maximumReadSemaphoreWaitTimeout ] repeat! Item was changed: ----- Method: Socket>>waitForDisconnectionFor: (in category 'waiting') ----- waitForDisconnectionFor: timeout "Wait for the given nr of seconds for the connection to be broken. Return true if it is broken by the deadline, false if not. The client should know the connection is really going to be closed (e.g., because he has called 'close' to send a close request to the other end) before calling this method." + | deadline | + deadline := Time millisecondClockValue + (timeout * 1000) truncated. + [ self isOtherEndConnected and: [ deadline - Time millisecondClockValue > 0 ] ] + whileTrue: [ + self discardReceivedData. + "Providing a maximum for the time for waiting is a workaround for a VM bug which causes sockets waiting for data forever in some rare cases, because the semaphore doesn't get signaled. Remove the ""min: self class maximumReadSemaphoreWaitTimeout"" part when the bug is fixed." + readSemaphore waitTimeoutMSecs: + (deadline - Time millisecondClockValue min: self class maximumReadSemaphoreWaitTimeout) ]. + ^self isOtherEndConnected! - | startTime msecsDelta status | - startTime := Time millisecondClockValue. - msecsDelta := (timeout * 1000) truncated. - status := self primSocketConnectionStatus: socketHandle. - [((status == Connected) or: [(status == ThisEndClosed)]) and: - [(Time millisecondsSince: startTime) < msecsDelta]] whileTrue: [ - self discardReceivedData. - "Providing a maximum for the time for waiting is a workaround for a VM bug which causes sockets waiting for data forever in some rare cases, because the semaphore doesn't get signaled. Remove the ""min: self class maximumReadSemaphoreWaitTimeout"" part when the bug is fixed." - readSemaphore waitTimeoutMSecs: - (msecsDelta - (Time millisecondsSince: startTime) min: self class maximumReadSemaphoreWaitTimeout). - status := self primSocketConnectionStatus: socketHandle]. - ^ status ~= Connected! Item was changed: ----- Method: Socket>>waitForSendDoneFor: (in category 'waiting') ----- waitForSendDoneFor: timeout "Wait up until the given deadline for the current send operation to complete. Return true if it completes by the deadline, false if not." + | deadline timeleft | + deadline := Time millisecondClockValue + (timeout * 1000) truncated. - | startTime msecsDelta msecsEllapsed | - startTime := Time millisecondClockValue. - msecsDelta := (timeout * 1000) truncated. [ (self primSocketSendDone: socketHandle) ifTrue: [ ^true ]. + self isThisEndConnected ifFalse: [ ^false ]. + (timeleft := deadline - Time millisecondClockValue) <= 0 ifTrue: [ ^false ]. + writeSemaphore waitTimeoutMSecs: timeleft ] repeat! - self isConnected ifFalse: [ ^false ]. - (msecsEllapsed := Time millisecondsSince: startTime) < msecsDelta ifFalse: [ ^false ]. - writeSemaphore waitTimeoutMSecs: msecsDelta - msecsEllapsed ] repeat! From ma.chris.m at gmail.com Mon Jul 25 18:49:59 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Mon Jul 25 18:50:41 2016 Subject: [squeak-dev] The Trunk: Monticello-tfel.637.mcz In-Reply-To: References: <5796132c.05b7370a.b070b.862bSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: > Of course, with auto-format that we currently apply in the UI, we can't even > visualize those diff (grrr! I hate those auto-format) If we are able to identify when it only differs by format, then we could have it ignore the "diff with pretty print" preference in that case and always show the diff of the actual texts.. > ... snip ... > There's another problem above: > Rest Accept is for accepting the remote changes > Accept same source is for accepting the local... > > That can't be the same word, much confusing! +1 From leves at caesar.elte.hu Mon Jul 25 19:40:29 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Mon Jul 25 19:40:34 2016 Subject: [squeak-dev] The Inbox: Network-ul.180.mcz In-Reply-To: References: Message-ID: Hi All, This is something to test on all platforms before push. I've used it on 64-bit linux without problems so far. Levente On Mon, 25 Jul 2016, commits@source.squeak.org wrote: > Levente Uzonyi uploaded a new version of Network to project The Inbox: > http://source.squeak.org/inbox/Network-ul.180.mcz > > ==================== Summary ==================== > > Name: Network-ul.180 > Author: ul > Time: 25 July 2016, 8:40:01.001452 pm > UUID: 2f23a55c-fec5-41ac-95bd-6a8c2458be95 > Ancestors: Network-nice.179 > > Socket changes: > - fixed the comment of #isOtherEndConnected and #isThisEndConnected > - do not slice the data (TCP) in the image in #sendData:. Let the VM, the kernel, the hardware deal with that. > - use #isOtherEndConnected when receiving data, and #isThisEndConnected when sending data instead of #isConnected > - move away from #milliseconds:since:, since we have a clock that won't roll over > > =============== Diff against Network-nice.179 =============== > > Item was changed: > ----- Method: Socket>>closeAndDestroy: (in category 'connection open/close') ----- > closeAndDestroy: timeoutSeconds > "First, try to close this connection gracefully. If the close attempt fails or times out, abort the connection. In either case, destroy the socket. Do nothing if the socket has already been destroyed (i.e., if its socketHandle is nil)." > > + socketHandle ifNil: [ ^self ]. > + self isThisEndConnected ifTrue: [ > + self close. "Close this end." ]. > + (self waitForDisconnectionFor: timeoutSeconds) ifFalse: [ > + "The other end has not closed the connect yet, so we will just abort it." > + self primSocketAbortConnection: socketHandle ]. > + self destroy! > - socketHandle ifNotNil: [ > - self isConnected ifTrue: [ > - self close. "close this end" > - (self waitForDisconnectionFor: timeoutSeconds) ifFalse: [ > - "The other end didn't close so we just abort the connection" > - self primSocketAbortConnection: socketHandle]]. > - self destroy]. > - ! > > Item was changed: > ----- Method: Socket>>discardReceivedData (in category 'receiving') ----- > discardReceivedData > "Discard any data received up until now, and return the number of bytes discarded." > > | buf totalBytesDiscarded | > buf := String new: 10000. > totalBytesDiscarded := 0. > + [self isOtherEndConnected and: [self dataAvailable]] whileTrue: [ > - [self isConnected and: [self dataAvailable]] whileTrue: [ > totalBytesDiscarded := > totalBytesDiscarded + (self receiveDataInto: buf)]. > ^ totalBytesDiscarded > ! > > Item was changed: > ----- Method: Socket>>isOtherEndConnected (in category 'queries') ----- > isOtherEndConnected > + "Return true if this socket is connected, or this end has closed the connection but not the other end, so we can still receive data." > - "Return true if this socket is connected, or this end has closed the connection but not the other end, so we can still send data." > > | state | > socketHandle ifNil: [ ^false ]. > (state := self primSocketConnectionStatus: socketHandle) == Connected ifTrue: [ ^true ]. > ^state == ThisEndClosed > ! > > Item was changed: > ----- Method: Socket>>isThisEndConnected (in category 'queries') ----- > isThisEndConnected > + "Return true if this socket is connected, other the other end has closed the connection but not this end, so we can still send data." > - "Return true if this socket is connected, other the other end has closed the connection but not this end, so we can still receive data." > > | state | > socketHandle ifNil: [ ^false ]. > (state := self primSocketConnectionStatus: socketHandle) == Connected ifTrue: [ ^true ]. > ^state == OtherEndClosed > ! > > Item was changed: > ----- Method: Socket>>sendData: (in category 'sending') ----- > sendData: aStringOrByteArray > "Send all of the data in the given array, even if it requires multiple calls to send it all. Return the number of bytes sent." > > "An experimental version use on slow lines: Longer timeout and smaller writes to try to avoid spurious timeouts." > > | bytesSent bytesToSend count | > bytesToSend := aStringOrByteArray size. > bytesSent := 0. > [bytesSent < bytesToSend] whileTrue: [ > (self waitForSendDoneFor: 60) > ifFalse: [ConnectionTimedOut signal: 'send data timeout; data not sent']. > count := self primSocket: socketHandle > sendData: aStringOrByteArray > startIndex: bytesSent + 1 > + count: bytesToSend - bytesSent. > - count: (bytesToSend - bytesSent min: DefaultSendBufferSize). > bytesSent := bytesSent + count]. > > ^ bytesSent > ! > > Item was changed: > ----- Method: Socket>>waitForConnectionFor:ifTimedOut:ifRefused: (in category 'waiting') ----- > waitForConnectionFor: timeout ifTimedOut: timeoutBlock ifRefused: refusedBlock > "Wait up until the given deadline for a connection to be established. Return true if it is established by the deadline, false if not." > > + | deadline timeLeft status | > + deadline := Time millisecondClockValue + (timeout * 1000) truncated. > + (status := self primSocketConnectionStatus: socketHandle) == Connected ifTrue: [^true]. > + [ (status == WaitingForConnection) and: [ (timeLeft := deadline - Time millisecondClockValue) > 0 ] ] > - | startTime msecsDelta msecsEllapsed status | > - startTime := Time millisecondClockValue. > - msecsDelta := (timeout * 1000) truncated. > - status := self primSocketConnectionStatus: socketHandle. > - status = Connected ifTrue: [^true]. > - [(status = WaitingForConnection) and: [(msecsEllapsed := Time millisecondsSince: startTime) < msecsDelta]] > whileTrue: [ > + semaphore waitTimeoutMSecs: timeLeft. > + status := self primSocketConnectionStatus: socketHandle ]. > + status == Connected ifTrue: [ ^true ]. > + status == WaitingForConnection > + ifTrue: [ timeoutBlock value ] > + ifFalse: [ refusedBlock value ]. > + ^false! > - semaphore waitTimeoutMSecs: msecsDelta - msecsEllapsed. > - status := self primSocketConnectionStatus: socketHandle]. > - status = Connected > - ifFalse: [ > - status = WaitingForConnection > - ifTrue: [timeoutBlock value] > - ifFalse: [refusedBlock value]. > - ^false]. > - ^ true! > > Item was changed: > ----- Method: Socket>>waitForConnectionUntil: (in category 'waiting') ----- > waitForConnectionUntil: deadline > "Wait up until the given deadline for a connection to be established. Return true if it is established by the deadline, false if not." > > + | status timeLeft | > - | status waitTime | > [ > (status := self primSocketConnectionStatus: socketHandle) == Connected ifTrue: [ ^true ]. > status == WaitingForConnection ifFalse: [ ^false ]. > + (timeLeft := deadline - Time millisecondClockValue) <= 0 ifTrue: [ ^false ]. > + semaphore waitTimeoutMSecs: timeLeft ] repeat! > - (waitTime := deadline - Time millisecondClockValue) > 0 ifFalse: [ ^false ]. > - semaphore waitTimeoutMSecs: waitTime ] repeat! > > Item was changed: > ----- Method: Socket>>waitForDataFor:ifClosed:ifTimedOut: (in category 'waiting') ----- > waitForDataFor: timeout ifClosed: closedBlock ifTimedOut: timedOutBlock > "Wait for the given nr of seconds for data to arrive." > > + | deadline timeLeft | > - | startTime msecsDelta | > socketHandle ifNil: [ ^closedBlock value ]. > + deadline := Time millisecondClockValue + (timeout * 1000) truncated. > - startTime := Time millisecondClockValue. > - msecsDelta := (timeout * 1000) truncated. > [ > (self primSocketReceiveDataAvailable: socketHandle) ifTrue: [ ^self ]. > + self isOtherEndConnected ifFalse: [ ^closedBlock value ]. > + (timeLeft := deadline - Time millisecondClockValue) <= 0 ifTrue: [ ^timedOutBlock value ]. > - self isConnected ifFalse: [ ^closedBlock value ]. > - (Time millisecondsSince: startTime) < msecsDelta ifFalse: [ ^timedOutBlock value ]. > "Providing a maximum for the time for waiting is a workaround for a VM bug which causes sockets waiting for data forever in some rare cases, because the semaphore doesn't get signaled. Remove the ""min: self class maximumReadSemaphoreWaitTimeout"" part when the bug is fixed." > readSemaphore waitTimeoutMSecs: > + (timeLeft min: self class maximumReadSemaphoreWaitTimeout) ] repeat! > - (msecsDelta - (Time millisecondsSince: startTime) min: self class maximumReadSemaphoreWaitTimeout) ] repeat! > > Item was changed: > ----- Method: Socket>>waitForDataIfClosed: (in category 'waiting') ----- > waitForDataIfClosed: closedBlock > "Wait indefinitely for data to arrive. This method will block until > data is available or the socket is closed." > > socketHandle ifNil: [ ^closedBlock value ]. > [ > (self primSocketReceiveDataAvailable: socketHandle) ifTrue: [ ^self ]. > + self isOtherEndConnected ifFalse: [ ^closedBlock value ]. > - self isConnected ifFalse: [ ^closedBlock value ]. > "ul 8/13/2014 21:16 > Providing a maximum for the time for waiting is a workaround for a VM bug which > causes sockets waiting for data forever in some rare cases, because the semaphore > doesn't get signaled. Replace the ""waitTimeoutMSecs: self class maximumReadSemaphoreWaitTimeout"" > part with ""wait"" when the bug is fixed." > readSemaphore waitTimeoutMSecs: self class maximumReadSemaphoreWaitTimeout ] repeat! > > Item was changed: > ----- Method: Socket>>waitForDisconnectionFor: (in category 'waiting') ----- > waitForDisconnectionFor: timeout > "Wait for the given nr of seconds for the connection to be broken. > Return true if it is broken by the deadline, false if not. > The client should know the connection is really going to be closed > (e.g., because he has called 'close' to send a close request to the other end) > before calling this method." > > + | deadline | > + deadline := Time millisecondClockValue + (timeout * 1000) truncated. > + [ self isOtherEndConnected and: [ deadline - Time millisecondClockValue > 0 ] ] > + whileTrue: [ > + self discardReceivedData. > + "Providing a maximum for the time for waiting is a workaround for a VM bug which causes sockets waiting for data forever in some rare cases, because the semaphore doesn't get signaled. Remove the ""min: self class maximumReadSemaphoreWaitTimeout"" part when the bug is fixed." > + readSemaphore waitTimeoutMSecs: > + (deadline - Time millisecondClockValue min: self class maximumReadSemaphoreWaitTimeout) ]. > + ^self isOtherEndConnected! > - | startTime msecsDelta status | > - startTime := Time millisecondClockValue. > - msecsDelta := (timeout * 1000) truncated. > - status := self primSocketConnectionStatus: socketHandle. > - [((status == Connected) or: [(status == ThisEndClosed)]) and: > - [(Time millisecondsSince: startTime) < msecsDelta]] whileTrue: [ > - self discardReceivedData. > - "Providing a maximum for the time for waiting is a workaround for a VM bug which causes sockets waiting for data forever in some rare cases, because the semaphore doesn't get signaled. Remove the ""min: self class maximumReadSemaphoreWaitTimeout"" part when the bug is fixed." > - readSemaphore waitTimeoutMSecs: > - (msecsDelta - (Time millisecondsSince: startTime) min: self class maximumReadSemaphoreWaitTimeout). > - status := self primSocketConnectionStatus: socketHandle]. > - ^ status ~= Connected! > > Item was changed: > ----- Method: Socket>>waitForSendDoneFor: (in category 'waiting') ----- > waitForSendDoneFor: timeout > "Wait up until the given deadline for the current send operation to complete. Return true if it completes by the deadline, false if not." > > + | deadline timeleft | > + deadline := Time millisecondClockValue + (timeout * 1000) truncated. > - | startTime msecsDelta msecsEllapsed | > - startTime := Time millisecondClockValue. > - msecsDelta := (timeout * 1000) truncated. > [ > (self primSocketSendDone: socketHandle) ifTrue: [ ^true ]. > + self isThisEndConnected ifFalse: [ ^false ]. > + (timeleft := deadline - Time millisecondClockValue) <= 0 ifTrue: [ ^false ]. > + writeSemaphore waitTimeoutMSecs: timeleft ] repeat! > - self isConnected ifFalse: [ ^false ]. > - (msecsEllapsed := Time millisecondsSince: startTime) < msecsDelta ifFalse: [ ^false ]. > - writeSemaphore waitTimeoutMSecs: msecsDelta - msecsEllapsed ] repeat! > > > From commits at source.squeak.org Mon Jul 25 20:52:26 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Jul 25 20:52:28 2016 Subject: [squeak-dev] The Trunk: Files-cmm.161.mcz Message-ID: Chris Muller uploaded a new version of Files to project The Trunk: http://source.squeak.org/trunk/Files-cmm.161.mcz ==================== Summary ==================== Name: Files-cmm.161 Author: cmm Time: 25 July 2016, 3:52:18.391906 pm UUID: 23aaa0dc-71b3-4585-a06a-25a113d14404 Ancestors: Files-cmm.160 - Soften the change to FileDirectory>>#/ to be more backward compatible, and extend it to DirectoryEntry. - We have #assureExistence, add #assureAbsence for safely ensuring a directory does not exist without having to write a error-handler. =============== Diff against Files-cmm.160 =============== Item was added: + ----- Method: DirectoryEntryDirectory>>/ (in category 'access') ----- + / aString + ^ self asFileDirectory / aString! Item was added: + ----- Method: DirectoryEntryDirectory>>assureAbsence (in category 'file operations') ----- + assureAbsence + self asFileDirectory assureAbsence! Item was added: + ----- Method: DirectoryEntryDirectory>>delete (in category 'file operations') ----- + delete + self asFileDirectory recursiveDelete! Item was changed: ----- Method: FileDirectory>>/ (in category 'path access') ----- / aString + "Answer a FileDirectory on a subdirectory named aString, of the receiver. If there is already a file named aString in the receiver directory, answer its Entry." + | dir | + dir := FileDirectory on: (self fullNameFor: aString). + ^ dir exists + ifTrue: [ dir ] + ifFalse: + [ self + entryAt: aString + ifAbsent: [ dir ] ]! - "Answer a FileDirectory on a subdirectory named aString, of the receiver." - ^ FileDirectory directoryEntryFor: (self fullNameFor: aString)! Item was added: + ----- Method: FileDirectory>>assureAbsence (in category 'file directory') ----- + assureAbsence + self exists ifTrue: [ self recursiveDelete ]! From cunningham.cb at gmail.com Mon Jul 25 21:17:40 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Mon Jul 25 21:17:44 2016 Subject: [squeak-dev] The Trunk: Monticello-tfel.637.mcz In-Reply-To: References: <5796132c.05b7370a.b070b.862bSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: On Mon, Jul 25, 2016 at 10:03 AM, Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com> wrote: > Hi both, > > 2016-07-25 17:55 GMT+02:00 Chris Muller : > >> Please do not use abbreviations. What is AST? Abstract Syntax Tree? >> This takes the Monticello tool to a new level of technical >> intimidation and confusion. >> >> Why do we need a button for this? >> > > I would say, why only one? Why a lack of symmetry? > The same AST means that some formatting has been performed. > I think AST currently contains comments, but see below... > > Of course, with auto-format that we currently apply in the UI, we can't > even visualize those diff (grrr! I hate those auto-format) > So anyway we are blind to these changes, we could as well throw a dice ;) > > >> >> On Mon, Jul 25, 2016 at 8:24 AM, wrote: >> > Tim Felgentreff uploaded a new version of Monticello to project The >> Trunk: >> > http://source.squeak.org/trunk/Monticello-tfel.637.mcz >> > >> > ==================== Summary ==================== >> > >> > Name: Monticello-tfel.637 >> > Author: tfel >> > Time: 25 July 2016, 3:24:24.996828 pm >> > UUID: cf0d6af1-c703-5044-9c57-e798b0cf3abf >> > Ancestors: Monticello-cmm.636 >> > >> > add a button for rejecting all incoming conflicts that only change AST >> > >> > =============== Diff against Monticello-cmm.636 =============== >> > >> > Item was added: >> > + ----- Method: MCConflict>>chooseSameAST (in category 'as yet >> unclassified') ----- >> > + chooseSameAST >> > + | fromSrc toSrc | >> > + (self definition isNil or: [self definition isMethodDefinition >> not]) >> > + ifTrue: [^ self]. >> > + fromSrc := (Parser new parse: operation fromSource class: nil >> class) >> > + generate decompile asString. >> > + toSrc := (Parser new parse: operation toSource class: nil class) >> > + generate decompile asString. >> > + fromSrc = toSrc ifTrue: [self chooseLocal].! >> > >> > > OK, so this does not even take the comments in account, because this is > decompiled code (reconstructed AST) not original AST. > There's another problem here: decompile: sometimes fail, so we should > protect ourselves... > > > >> > Item was changed: >> > ----- Method: MCMergeBrowser>>buttonSpecs (in category 'as yet >> unclassified') ----- >> > buttonSpecs >> > ^ #((Merge merge 'Proceed with the merge' canMerge) >> > (Cancel cancel 'Cancel the merge') >> > ('All Newer' chooseAllNewerConflicts 'Choose all newer >> conflict versions') >> > ('All Older' chooseAllOlderConflicts 'Choose all older >> conflict versions') >> > ('Rest Reject' chooseAllUnchosenLocal 'Choose local >> versions of all remaining conflicts') >> > ('Rest Accept' chooseAllUnchosenRemote 'Choose remote >> versions of all remaining conflicts') >> > + ('Accept same source' chooseAllSameAST 'Choose all >> local conflicting versions that have essentially the same code') >> > )! >> > >> > > There's another problem above: > Rest Accept is for accepting the remote changes > Accept same source is for accepting the local... > > That can't be the same word, much confusing! > > Right. If that option is added, it must be called 'Reject same source'. Probably call it something else: 'Reject cosmetic changes', maybe. In any case, let's not make it worse after recently cleaning up the wording. -cbc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160725/fb25fce9/attachment.htm From nicolas.cellier.aka.nice at gmail.com Mon Jul 25 21:43:47 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Mon Jul 25 21:43:50 2016 Subject: [squeak-dev] The Trunk: Monticello-tfel.637.mcz In-Reply-To: References: <5796132c.05b7370a.b070b.862bSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Whatever the flow of critics, I find the feature interesting. 2016-07-25 23:17 GMT+02:00 Chris Cunningham : > > > On Mon, Jul 25, 2016 at 10:03 AM, Nicolas Cellier < > nicolas.cellier.aka.nice@gmail.com> wrote: > >> Hi both, >> >> 2016-07-25 17:55 GMT+02:00 Chris Muller : >> >>> Please do not use abbreviations. What is AST? Abstract Syntax Tree? >>> This takes the Monticello tool to a new level of technical >>> intimidation and confusion. >>> >>> Why do we need a button for this? >>> >> >> I would say, why only one? Why a lack of symmetry? >> The same AST means that some formatting has been performed. >> I think AST currently contains comments, but see below... >> >> Of course, with auto-format that we currently apply in the UI, we can't >> even visualize those diff (grrr! I hate those auto-format) >> So anyway we are blind to these changes, we could as well throw a dice ;) >> >> >>> >>> On Mon, Jul 25, 2016 at 8:24 AM, wrote: >>> > Tim Felgentreff uploaded a new version of Monticello to project The >>> Trunk: >>> > http://source.squeak.org/trunk/Monticello-tfel.637.mcz >>> > >>> > ==================== Summary ==================== >>> > >>> > Name: Monticello-tfel.637 >>> > Author: tfel >>> > Time: 25 July 2016, 3:24:24.996828 pm >>> > UUID: cf0d6af1-c703-5044-9c57-e798b0cf3abf >>> > Ancestors: Monticello-cmm.636 >>> > >>> > add a button for rejecting all incoming conflicts that only change AST >>> > >>> > =============== Diff against Monticello-cmm.636 =============== >>> > >>> > Item was added: >>> > + ----- Method: MCConflict>>chooseSameAST (in category 'as yet >>> unclassified') ----- >>> > + chooseSameAST >>> > + | fromSrc toSrc | >>> > + (self definition isNil or: [self definition isMethodDefinition >>> not]) >>> > + ifTrue: [^ self]. >>> > + fromSrc := (Parser new parse: operation fromSource class: nil >>> class) >>> > + generate decompile asString. >>> > + toSrc := (Parser new parse: operation toSource class: nil >>> class) >>> > + generate decompile asString. >>> > + fromSrc = toSrc ifTrue: [self chooseLocal].! >>> > >>> >> >> OK, so this does not even take the comments in account, because this is >> decompiled code (reconstructed AST) not original AST. >> There's another problem here: decompile: sometimes fail, so we should >> protect ourselves... >> >> >> >>> > Item was changed: >>> > ----- Method: MCMergeBrowser>>buttonSpecs (in category 'as yet >>> unclassified') ----- >>> > buttonSpecs >>> > ^ #((Merge merge 'Proceed with the merge' canMerge) >>> > (Cancel cancel 'Cancel the merge') >>> > ('All Newer' chooseAllNewerConflicts 'Choose all newer >>> conflict versions') >>> > ('All Older' chooseAllOlderConflicts 'Choose all older >>> conflict versions') >>> > ('Rest Reject' chooseAllUnchosenLocal 'Choose local >>> versions of all remaining conflicts') >>> > ('Rest Accept' chooseAllUnchosenRemote 'Choose remote >>> versions of all remaining conflicts') >>> > + ('Accept same source' chooseAllSameAST 'Choose all >>> local conflicting versions that have essentially the same code') >>> > )! >>> > >>> >> >> There's another problem above: >> Rest Accept is for accepting the remote changes >> Accept same source is for accepting the local... >> >> That can't be the same word, much confusing! >> >> Right. If that option is added, it must be called 'Reject same source'. > > Probably call it something else: 'Reject cosmetic changes', maybe. > > In any case, let's not make it worse after recently cleaning up the > wording. > > -cbc > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160725/62ad69db/attachment.htm From commits at source.squeak.org Mon Jul 25 21:52:30 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Jul 25 21:52:33 2016 Subject: [squeak-dev] The Trunk: Installer-Core-cmm.414.mcz Message-ID: Chris Muller uploaded a new version of Installer-Core to project The Trunk: http://source.squeak.org/trunk/Installer-Core-cmm.414.mcz ==================== Summary ==================== Name: Installer-Core-cmm.414 Author: cmm Time: 18 July 2016, 11:29:44.226614 am UUID: c43c7349-b55d-41fa-a754-be8e8e21c683 Ancestors: Installer-Core-cmm.407 Support more configuration use-cases: * Automatically addLocalRepositories and addRemoteRepositories to the MC browser when merging packages. * Ability to #copyLocalVersionsToRemoteFor: a package. This can be used as a single 'commit' of all changes across multiple packages (which reside in their own repositories). - Connectors was moved back to SqueakSource. - webClientSsp seems to be just as current at SqueakSource as it does at SS3. - Fixed some assumptions in the package-definitions that assumed they exist in their same repository as their prerequisite packages. =============== Diff against Installer-Core-cmm.407 =============== Item was changed: Object subclass: #Installer + instanceVariableNames: 'answers packages messagesToSuppress useFileIn noiseLevel' - instanceVariableNames: 'answers packages messagesToSuppress useFileIn noiseLevel currentRepository' classVariableNames: 'InstallerBindings IsSetToTrapErrors Repositories SkipLoadingTests ValidationBlock' poolDictionaries: '' category: 'Installer-Core'! Installer class instanceVariableNames: 'localRepository'! !Installer commentStamp: 'kph 3/30/2009 01:29' prior: 0! Documentation now available at http://installer.pbwiki.com/Installer useFileIn - flag to load source.st rather than using Monticello! Installer class instanceVariableNames: 'localRepository'! Item was added: + ----- Method: Installer class>>suspendRepositoryOverridesWhile: (in category 'repository-overrides') ----- + suspendRepositoryOverridesWhile: aBlock + | priorOverrides | + [ priorOverrides := Repositories. + self clearOverrides. + aBlock value ] ensure: [ Repositories := priorOverrides ]! Item was added: + ----- Method: Installer class>>symbolicPackages (in category 'accessing') ----- + symbolicPackages + ^ self methodsInCategory: 'package-definitions'! Item was added: + ----- Method: Installer>>addLocalRepositories (in category 'configure') ----- + addLocalRepositories + "For all MC packages defined in my 'package-definitions', add the local directory repository where they reside." + self allPackages do: + [ : each | self class suspendRepositoryOverridesWhile: + [ self class useLocalRepository. + self addRepositoryFor: each ] ]! Item was added: + ----- Method: Installer>>addRemoteRepositories (in category 'configure') ----- + addRemoteRepositories + "For all MC packages defined in my 'package-definitions', add the remote repository where they reside." + self allPackages do: + [ : each | self class suspendRepositoryOverridesWhile: [ self addRepositoryFor: each ] ]! Item was added: + ----- Method: Installer>>addRepositoryFor: (in category 'configure') ----- + addRepositoryFor: structureOrSymbol + self + packageDependenciesFor: structureOrSymbol + do: + [ : eachPackageName : eachRepositorySpec | MCWorkingCopy allManagers + detect: [ : eachWorkingCopy | eachWorkingCopy packageName = eachPackageName ] + ifFound: [ : foundWorkingCopy | foundWorkingCopy repositoryGroup addRepository: (self class repositoryFor: eachRepositorySpec) ] + ifNone: [ nil ] ]! Item was changed: ----- Method: Installer>>allPackages (in category 'accessing') ----- allPackages + | installerClasses | installerClasses := self class withAllSuperclasses. + installerClasses := installerClasses copyFrom: 1 to: (installerClasses indexOf: Installer). + ^ (installerClasses - ^ (self class withAllSuperclasses inject: OrderedCollection new into: [ : coll : each | coll + addAll: each symbolicPackages ; - addAll: (each methodsInCategory: 'package-definitions') ; yourself ]) sort! Item was changed: ----- Method: Installer>>broomMorphsBase (in category 'package-definitions') ----- broomMorphsBase "Morph alignment user-interface tool." + ^ { #ss -> 'Connectors'. - ^ { #ss3 -> 'Connectors'. 'BroomMorphs-Base' }! Item was changed: ----- Method: Installer>>connectors (in category 'package-definitions') ----- connectors "Connect Morphs together. Make diagrams." + ^ { self broomMorphsBase. + #ss -> 'Connectors'. - ^ { self broomMorphsBase. 'CGPrereqs'. 'FSM'. 'Connectors'. 'ConnectorsText'. 'ConnectorsShapes'. 'ConnectorsTools'. 'ConnectorsGraphLayout'. 'BroomMorphs-Connectors' }! Item was added: + ----- Method: Installer>>copyLocalVersionsToRemoteFor: (in category 'configure') ----- + copyLocalVersionsToRemoteFor: structureOrSymbol + "Ensure the currently loaded MCVersion is present in each repository which holds the packages represented by structureOrSymbol. Use as a single 'commit' of all changes across multiple packages (which reside in their own repositories). + Make sure id's and passwords are already set up on your repositories. Recommend using the mcSettings file for doing this, see MCHttpRepository>>#userAndPasswordFromSettingsDo: for details." + (self remoteRepositoriesFor: structureOrSymbol) do: + [ : each | each copyImageVersions ]! Item was changed: ----- Method: Installer>>curvedSpaceExplorer (in category 'package-definitions') ----- curvedSpaceExplorer "Explore curved 3D spaces." ^ { self openGL. + #krestianstvo -> 'ccse'. 'CCSpaceExplorer' }! Item was changed: ----- Method: Installer>>ffiTests (in category 'package-definitions') ----- ffiTests "Tests for Foreign Function Interface." ^ { self ffi. + #squeak -> 'FFI'. 'FFI-Tests' }! Item was changed: ----- Method: Installer>>mathMorphs (in category 'package-definitions') ----- mathMorphs "MathMorphs is a project that combines mathematics and Smalltalk. See http://www.dm.uba.ar/MathMorphs/ and chapter 10 of the 'new blue book'." ^ { self morphicWrappers. + #ss -> 'MathMorphsRevival'. 'Functions' }! Item was changed: ----- Method: Installer>>merge: (in category 'public interface') ----- merge: structureOrSymbol | toUncache | toUncache := Set new. self packageDependenciesFor: structureOrSymbol do: + [ : eachPackageName : eachRepositorySpec | | repo version | - [ : eachPackageName : eachRepositorySpec | | repo | (repo := self class repositoryFor: eachRepositorySpec) cacheAllFilenames. toUncache add: repo. + version := self + primMerge: eachPackageName + from: repo. + "Lazy code, polite MC won't add duplicates if they already exist." + version ifNotNil: + [ version workingCopy repositoryGroup + addRepository: repo ; + addRepository: (self class defaultRepositoryFor: eachRepositorySpec) ] ]. - self primMerge: eachPackageName ]. toUncache do: [ : each | each flushAllFilenames ]! Item was changed: ----- Method: Installer>>packageDependenciesFor:do: (in category 'private') ----- packageDependenciesFor: structureOrSymbol do: twoArgBlock "Value twoArgBlock with each package name and the currently-specified repository where that package resides." + | currentRepository | structureOrSymbol isSymbol ifTrue: [ self packageDependenciesFor: (self perform: structureOrSymbol) do: twoArgBlock ] ifFalse: [ self depthFirstOf: structureOrSymbol do: [ : each | each isVariableBinding ifTrue: [ currentRepository := each ] ifFalse: [ each isString ifTrue: [ twoArgBlock value: each value: currentRepository ] ifFalse: [ self error: 'invalid specification' ] ] ] ]! Item was added: + ----- Method: Installer>>packagesFor: (in category 'configure') ----- + packagesFor: structureOrSymbol + ^ Array streamContents: + [ : stream | self + packageDependenciesFor: structureOrSymbol + do: + [ : eachPackageName : eachRepositorySpec | stream nextPut: eachPackageName ] ]! Item was removed: - ----- Method: Installer>>primMerge: (in category 'private') ----- - primMerge: packageName - | version repo | - repo := self class repositoryFor: currentRepository. - version := (repo includesVersionNamed: packageName) - ifTrue: [ repo versionNamed: packageName ] - ifFalse: [ repo highestNumberedVersionForPackageNamed: packageName ]. - [ version shouldMerge - ifTrue: [ version merge ] - ifFalse: [ version load ] ] - on: MCNoChangesException - do: [ : req | req resume ] - on: MCMergeResolutionRequest - do: - [ : request | request merger conflicts isEmpty - ifTrue: [ request resume: true ] - ifFalse: [ request pass ] ]. - version workingCopy repositoryGroup addRepository: repo! Item was added: + ----- Method: Installer>>primMerge:from: (in category 'private') ----- + primMerge: packageName from: aMCRepository + | version | + version := (aMCRepository includesVersionNamed: packageName) + ifTrue: [ aMCRepository versionNamed: packageName ] + ifFalse: [ aMCRepository highestNumberedVersionForPackageNamed: packageName ]. + [ version shouldMerge + ifTrue: [ version merge ] + ifFalse: [ version load ] ] + on: MCNoChangesException + do: [ : req | req resume ] + on: MCMergeResolutionRequest + do: + [ : request | request merger conflicts isEmpty + ifTrue: [ request resume: true ] + ifFalse: [ request pass ] ]. + ^ version! Item was added: + ----- Method: Installer>>remoteRepositoriesFor: (in category 'configure') ----- + remoteRepositoriesFor: structureOrSymbol + | reps | + reps := Set new. + self class suspendRepositoryOverridesWhile: + [ self + packageDependenciesFor: structureOrSymbol + do: + [ : eachPackageName : eachRepositorySpec | | rep | + rep := self class repositoryFor: eachRepositorySpec. + "Collect up the repositories in the default MCRepositoryGroup, because those ones will have user and password specified." + reps add: + (MCRepositoryGroup default repositories + detect: [ : each | each = rep ] + ifNone: [ rep ]) ] ]. + ^ reps! Item was changed: ----- Method: Installer>>webClientSsp (in category 'package-definitions') ----- webClientSsp "WebClient supports NTLM/SPNEGO authentication via the Microsoft SSP interface (Windows only)." ^ { self ffiTests. + #ss -> 'WebClient'. - #ss3 -> 'WebClient'. 'WebClient-SSP' }! From commits at source.squeak.org Mon Jul 25 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Jul 25 21:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160725215502.29486.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068303.html Name: Monticello-tfel.637 Ancestors: Monticello-cmm.636 add a button for rejecting all incoming conflicts that only change AST ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068304.html Name: Files-cmm.161 Ancestors: Files-cmm.160 - Soften the change to FileDirectory>>#/ to be more backward compatible, and extend it to DirectoryEntry. - We have #assureExistence, add #assureAbsence for safely ensuring a directory does not exist without having to write a error-handler. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068305.html Name: Installer-Core-cmm.414 Ancestors: Installer-Core-cmm.407 Support more configuration use-cases: * Automatically addLocalRepositories and addRemoteRepositories to the MC browser when merging packages. * Ability to #copyLocalVersionsToRemoteFor: a package. This can be used as a single 'commit' of all changes across multiple packages (which reside in their own repositories). - Connectors was moved back to SqueakSource. - webClientSsp seems to be just as current at SqueakSource as it does at SS3. - Fixed some assumptions in the package-definitions that assumed they exist in their same repository as their prerequisite packages. ============================================= From asqueaker at gmail.com Mon Jul 25 21:56:19 2016 From: asqueaker at gmail.com (Chris Muller) Date: Mon Jul 25 21:57:07 2016 Subject: [squeak-dev] The Trunk: Monticello-tfel.637.mcz In-Reply-To: References: <5796132c.05b7370a.b070b.862bSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Why interesting? I tend to think that people should not be committing changes in which only the formatting was changed. So, maybe better to take measures to minimize that from happening in the first place than introduce a button to "undo" it later....? On Mon, Jul 25, 2016 at 4:43 PM, Nicolas Cellier wrote: > Whatever the flow of critics, I find the feature interesting. > > > > 2016-07-25 23:17 GMT+02:00 Chris Cunningham : >> >> >> >> On Mon, Jul 25, 2016 at 10:03 AM, Nicolas Cellier >> wrote: >>> >>> Hi both, >>> >>> 2016-07-25 17:55 GMT+02:00 Chris Muller : >>>> >>>> Please do not use abbreviations. What is AST? Abstract Syntax Tree? >>>> This takes the Monticello tool to a new level of technical >>>> intimidation and confusion. >>>> >>>> Why do we need a button for this? >>> >>> >>> I would say, why only one? Why a lack of symmetry? >>> The same AST means that some formatting has been performed. >>> I think AST currently contains comments, but see below... >>> >>> Of course, with auto-format that we currently apply in the UI, we can't >>> even visualize those diff (grrr! I hate those auto-format) >>> So anyway we are blind to these changes, we could as well throw a dice ;) >>> >>>> >>>> >>>> On Mon, Jul 25, 2016 at 8:24 AM, wrote: >>>> > Tim Felgentreff uploaded a new version of Monticello to project The >>>> > Trunk: >>>> > http://source.squeak.org/trunk/Monticello-tfel.637.mcz >>>> > >>>> > ==================== Summary ==================== >>>> > >>>> > Name: Monticello-tfel.637 >>>> > Author: tfel >>>> > Time: 25 July 2016, 3:24:24.996828 pm >>>> > UUID: cf0d6af1-c703-5044-9c57-e798b0cf3abf >>>> > Ancestors: Monticello-cmm.636 >>>> > >>>> > add a button for rejecting all incoming conflicts that only change AST >>>> > >>>> > =============== Diff against Monticello-cmm.636 =============== >>>> > >>>> > Item was added: >>>> > + ----- Method: MCConflict>>chooseSameAST (in category 'as yet >>>> > unclassified') ----- >>>> > + chooseSameAST >>>> > + | fromSrc toSrc | >>>> > + (self definition isNil or: [self definition isMethodDefinition >>>> > not]) >>>> > + ifTrue: [^ self]. >>>> > + fromSrc := (Parser new parse: operation fromSource class: nil >>>> > class) >>>> > + generate decompile asString. >>>> > + toSrc := (Parser new parse: operation toSource class: nil >>>> > class) >>>> > + generate decompile asString. >>>> > + fromSrc = toSrc ifTrue: [self chooseLocal].! >>>> > >>> >>> >>> OK, so this does not even take the comments in account, because this is >>> decompiled code (reconstructed AST) not original AST. >>> There's another problem here: decompile: sometimes fail, so we should >>> protect ourselves... >>> >>> >>>> >>>> > Item was changed: >>>> > ----- Method: MCMergeBrowser>>buttonSpecs (in category 'as yet >>>> > unclassified') ----- >>>> > buttonSpecs >>>> > ^ #((Merge merge 'Proceed with the merge' canMerge) >>>> > (Cancel cancel 'Cancel the merge') >>>> > ('All Newer' chooseAllNewerConflicts 'Choose all newer >>>> > conflict versions') >>>> > ('All Older' chooseAllOlderConflicts 'Choose all older >>>> > conflict versions') >>>> > ('Rest Reject' chooseAllUnchosenLocal 'Choose local >>>> > versions of all remaining conflicts') >>>> > ('Rest Accept' chooseAllUnchosenRemote 'Choose remote >>>> > versions of all remaining conflicts') >>>> > + ('Accept same source' chooseAllSameAST 'Choose all >>>> > local conflicting versions that have essentially the same code') >>>> > )! >>>> > >>> >>> >>> There's another problem above: >>> Rest Accept is for accepting the remote changes >>> Accept same source is for accepting the local... >>> >>> That can't be the same word, much confusing! >>> >> Right. If that option is added, it must be called 'Reject same source'. >> >> Probably call it something else: 'Reject cosmetic changes', maybe. >> >> In any case, let's not make it worse after recently cleaning up the >> wording. >> >> -cbc >> >> >> >> > > > > From Das.Linux at gmx.de Mon Jul 25 22:05:58 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon Jul 25 22:06:03 2016 Subject: [squeak-dev] The Trunk: Monticello-tfel.637.mcz In-Reply-To: References: <5796132c.05b7370a.b070b.862bSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <3F4877E2-69FB-4E88-81C0-CF875B874C7F@gmx.de> On 25.07.2016, at 23:56, Chris Muller wrote: > I tend to think that people should not be committing > changes in which only the formatting was changed. Au contraire. If a method is more understandable if formatted differently, it should be committed, even if it is only formatting rewriting. Best regards -Tobias From nicolas.cellier.aka.nice at gmail.com Mon Jul 25 22:06:19 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Mon Jul 25 22:06:24 2016 Subject: [squeak-dev] The Trunk: Monticello-tfel.637.mcz In-Reply-To: References: <5796132c.05b7370a.b070b.862bSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: 2016-07-25 23:56 GMT+02:00 Chris Muller : > Why interesting? I tend to think that people should not be committing > changes in which only the formatting was changed. So, maybe better to > take measures to minimize that from happening in the first place than > introduce a button to "undo" it later....? > > Well, it happens that such change are interesting... For example some literal arrays are table that can suffer from misalignment. Or some constant has been expressed in decimal when the intention would have been more clear with hexa. Also the feature concerns comment conflicts. It's also interesting because it happens that we compare a very distant branch like Squeak vs Pharo and we don't want to be perturbated by cosmetic conflicts (ok this happens less and less as the divergence increase). > On Mon, Jul 25, 2016 at 4:43 PM, Nicolas Cellier > wrote: > > Whatever the flow of critics, I find the feature interesting. > > > > > > > > 2016-07-25 23:17 GMT+02:00 Chris Cunningham : > >> > >> > >> > >> On Mon, Jul 25, 2016 at 10:03 AM, Nicolas Cellier > >> wrote: > >>> > >>> Hi both, > >>> > >>> 2016-07-25 17:55 GMT+02:00 Chris Muller : > >>>> > >>>> Please do not use abbreviations. What is AST? Abstract Syntax Tree? > >>>> This takes the Monticello tool to a new level of technical > >>>> intimidation and confusion. > >>>> > >>>> Why do we need a button for this? > >>> > >>> > >>> I would say, why only one? Why a lack of symmetry? > >>> The same AST means that some formatting has been performed. > >>> I think AST currently contains comments, but see below... > >>> > >>> Of course, with auto-format that we currently apply in the UI, we can't > >>> even visualize those diff (grrr! I hate those auto-format) > >>> So anyway we are blind to these changes, we could as well throw a dice > ;) > >>> > >>>> > >>>> > >>>> On Mon, Jul 25, 2016 at 8:24 AM, wrote: > >>>> > Tim Felgentreff uploaded a new version of Monticello to project The > >>>> > Trunk: > >>>> > http://source.squeak.org/trunk/Monticello-tfel.637.mcz > >>>> > > >>>> > ==================== Summary ==================== > >>>> > > >>>> > Name: Monticello-tfel.637 > >>>> > Author: tfel > >>>> > Time: 25 July 2016, 3:24:24.996828 pm > >>>> > UUID: cf0d6af1-c703-5044-9c57-e798b0cf3abf > >>>> > Ancestors: Monticello-cmm.636 > >>>> > > >>>> > add a button for rejecting all incoming conflicts that only change > AST > >>>> > > >>>> > =============== Diff against Monticello-cmm.636 =============== > >>>> > > >>>> > Item was added: > >>>> > + ----- Method: MCConflict>>chooseSameAST (in category 'as yet > >>>> > unclassified') ----- > >>>> > + chooseSameAST > >>>> > + | fromSrc toSrc | > >>>> > + (self definition isNil or: [self definition > isMethodDefinition > >>>> > not]) > >>>> > + ifTrue: [^ self]. > >>>> > + fromSrc := (Parser new parse: operation fromSource class: > nil > >>>> > class) > >>>> > + generate decompile asString. > >>>> > + toSrc := (Parser new parse: operation toSource class: nil > >>>> > class) > >>>> > + generate decompile asString. > >>>> > + fromSrc = toSrc ifTrue: [self chooseLocal].! > >>>> > > >>> > >>> > >>> OK, so this does not even take the comments in account, because this is > >>> decompiled code (reconstructed AST) not original AST. > >>> There's another problem here: decompile: sometimes fail, so we should > >>> protect ourselves... > >>> > >>> > >>>> > >>>> > Item was changed: > >>>> > ----- Method: MCMergeBrowser>>buttonSpecs (in category 'as yet > >>>> > unclassified') ----- > >>>> > buttonSpecs > >>>> > ^ #((Merge merge 'Proceed with the merge' canMerge) > >>>> > (Cancel cancel 'Cancel the merge') > >>>> > ('All Newer' chooseAllNewerConflicts 'Choose all > newer > >>>> > conflict versions') > >>>> > ('All Older' chooseAllOlderConflicts 'Choose all > older > >>>> > conflict versions') > >>>> > ('Rest Reject' chooseAllUnchosenLocal 'Choose local > >>>> > versions of all remaining conflicts') > >>>> > ('Rest Accept' chooseAllUnchosenRemote 'Choose > remote > >>>> > versions of all remaining conflicts') > >>>> > + ('Accept same source' chooseAllSameAST 'Choose all > >>>> > local conflicting versions that have essentially the same code') > >>>> > )! > >>>> > > >>> > >>> > >>> There's another problem above: > >>> Rest Accept is for accepting the remote changes > >>> Accept same source is for accepting the local... > >>> > >>> That can't be the same word, much confusing! > >>> > >> Right. If that option is added, it must be called 'Reject same source'. > >> > >> Probably call it something else: 'Reject cosmetic changes', maybe. > >> > >> In any case, let's not make it worse after recently cleaning up the > >> wording. > >> > >> -cbc > >> > >> > >> > >> > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160726/cfbe59fc/attachment.htm From asqueaker at gmail.com Tue Jul 26 03:17:03 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Jul 26 03:17:45 2016 Subject: [squeak-dev] The Inbox: Network-ul.180.mcz In-Reply-To: References: Message-ID: Hi Levente, Magma's test cases can't seem to get to the end with this.. I haven't investigated yet.. On Mon, Jul 25, 2016 at 2:40 PM, Levente Uzonyi wrote: > Hi All, > > This is something to test on all platforms before push. I've used it on > 64-bit linux without problems so far. > > Levente > > > On Mon, 25 Jul 2016, commits@source.squeak.org wrote: > >> Levente Uzonyi uploaded a new version of Network to project The Inbox: >> http://source.squeak.org/inbox/Network-ul.180.mcz >> >> ==================== Summary ==================== >> >> Name: Network-ul.180 >> Author: ul >> Time: 25 July 2016, 8:40:01.001452 pm >> UUID: 2f23a55c-fec5-41ac-95bd-6a8c2458be95 >> Ancestors: Network-nice.179 >> >> Socket changes: >> - fixed the comment of #isOtherEndConnected and #isThisEndConnected >> - do not slice the data (TCP) in the image in #sendData:. Let the VM, the >> kernel, the hardware deal with that. >> - use #isOtherEndConnected when receiving data, and #isThisEndConnected >> when sending data instead of #isConnected >> - move away from #milliseconds:since:, since we have a clock that won't >> roll over >> >> =============== Diff against Network-nice.179 =============== >> >> Item was changed: >> ----- Method: Socket>>closeAndDestroy: (in category 'connection >> open/close') ----- >> closeAndDestroy: timeoutSeconds >> "First, try to close this connection gracefully. If the close >> attempt fails or times out, abort the connection. In either case, destroy >> the socket. Do nothing if the socket has already been destroyed (i.e., if >> its socketHandle is nil)." >> >> + socketHandle ifNil: [ ^self ]. >> + self isThisEndConnected ifTrue: [ >> + self close. "Close this end." ]. >> + (self waitForDisconnectionFor: timeoutSeconds) ifFalse: [ >> + "The other end has not closed the connect yet, so we will >> just abort it." >> + self primSocketAbortConnection: socketHandle ]. >> + self destroy! >> - socketHandle ifNotNil: [ >> - self isConnected ifTrue: [ >> - self close. "close this end" >> - (self waitForDisconnectionFor: >> timeoutSeconds) ifFalse: [ >> - "The other end didn't >> close so we just abort the connection" >> - self >> primSocketAbortConnection: socketHandle]]. >> - self destroy]. >> - ! >> >> Item was changed: >> ----- Method: Socket>>discardReceivedData (in category 'receiving') ----- >> discardReceivedData >> "Discard any data received up until now, and return the number of >> bytes discarded." >> >> | buf totalBytesDiscarded | >> buf := String new: 10000. >> totalBytesDiscarded := 0. >> + [self isOtherEndConnected and: [self dataAvailable]] whileTrue: [ >> - [self isConnected and: [self dataAvailable]] whileTrue: [ >> totalBytesDiscarded := >> totalBytesDiscarded + (self receiveDataInto: >> buf)]. >> ^ totalBytesDiscarded >> ! >> >> Item was changed: >> ----- Method: Socket>>isOtherEndConnected (in category 'queries') ----- >> isOtherEndConnected >> + "Return true if this socket is connected, or this end has closed >> the connection but not the other end, so we can still receive data." >> - "Return true if this socket is connected, or this end has closed >> the connection but not the other end, so we can still send data." >> >> | state | >> socketHandle ifNil: [ ^false ]. >> (state := self primSocketConnectionStatus: socketHandle) == >> Connected ifTrue: [ ^true ]. >> ^state == ThisEndClosed >> ! >> >> Item was changed: >> ----- Method: Socket>>isThisEndConnected (in category 'queries') ----- >> isThisEndConnected >> + "Return true if this socket is connected, other the other end has >> closed the connection but not this end, so we can still send data." >> - "Return true if this socket is connected, other the other end has >> closed the connection but not this end, so we can still receive data." >> >> | state | >> socketHandle ifNil: [ ^false ]. >> (state := self primSocketConnectionStatus: socketHandle) == >> Connected ifTrue: [ ^true ]. >> ^state == OtherEndClosed >> ! >> >> Item was changed: >> ----- Method: Socket>>sendData: (in category 'sending') ----- >> sendData: aStringOrByteArray >> "Send all of the data in the given array, even if it requires >> multiple calls to send it all. Return the number of bytes sent." >> >> "An experimental version use on slow lines: Longer timeout and >> smaller writes to try to avoid spurious timeouts." >> >> | bytesSent bytesToSend count | >> bytesToSend := aStringOrByteArray size. >> bytesSent := 0. >> [bytesSent < bytesToSend] whileTrue: [ >> (self waitForSendDoneFor: 60) >> ifFalse: [ConnectionTimedOut signal: 'send data >> timeout; data not sent']. >> count := self primSocket: socketHandle >> sendData: aStringOrByteArray >> startIndex: bytesSent + 1 >> + count: bytesToSend - bytesSent. >> - count: (bytesToSend - bytesSent min: >> DefaultSendBufferSize). >> bytesSent := bytesSent + count]. >> >> ^ bytesSent >> ! >> >> Item was changed: >> ----- Method: Socket>>waitForConnectionFor:ifTimedOut:ifRefused: (in >> category 'waiting') ----- >> waitForConnectionFor: timeout ifTimedOut: timeoutBlock ifRefused: >> refusedBlock >> "Wait up until the given deadline for a connection to be >> established. Return true if it is established by the deadline, false if >> not." >> >> + | deadline timeLeft status | >> + deadline := Time millisecondClockValue + (timeout * 1000) >> truncated. >> + (status := self primSocketConnectionStatus: socketHandle) == >> Connected ifTrue: [^true]. >> + [ (status == WaitingForConnection) and: [ (timeLeft := deadline - >> Time millisecondClockValue) > 0 ] ] >> - | startTime msecsDelta msecsEllapsed status | >> - startTime := Time millisecondClockValue. >> - msecsDelta := (timeout * 1000) truncated. >> - status := self primSocketConnectionStatus: socketHandle. >> - status = Connected ifTrue: [^true]. >> - [(status = WaitingForConnection) and: [(msecsEllapsed := Time >> millisecondsSince: startTime) < msecsDelta]] >> whileTrue: [ >> + semaphore waitTimeoutMSecs: timeLeft. >> + status := self primSocketConnectionStatus: >> socketHandle ]. >> + status == Connected ifTrue: [ ^true ]. >> + status == WaitingForConnection >> + ifTrue: [ timeoutBlock value ] >> + ifFalse: [ refusedBlock value ]. >> + ^false! >> - semaphore waitTimeoutMSecs: msecsDelta - >> msecsEllapsed. >> - status := self primSocketConnectionStatus: >> socketHandle]. >> - status = Connected >> - ifFalse: [ >> - status = WaitingForConnection >> - ifTrue: [timeoutBlock value] >> - ifFalse: [refusedBlock value]. >> - ^false]. >> - ^ true! >> >> Item was changed: >> ----- Method: Socket>>waitForConnectionUntil: (in category 'waiting') >> ----- >> waitForConnectionUntil: deadline >> "Wait up until the given deadline for a connection to be >> established. Return true if it is established by the deadline, false if >> not." >> >> + | status timeLeft | >> - | status waitTime | >> [ >> (status := self primSocketConnectionStatus: socketHandle) >> == Connected ifTrue: [ ^true ]. >> status == WaitingForConnection ifFalse: [ ^false ]. >> + (timeLeft := deadline - Time millisecondClockValue) <= 0 >> ifTrue: [ ^false ]. >> + semaphore waitTimeoutMSecs: timeLeft ] repeat! >> - (waitTime := deadline - Time millisecondClockValue) > 0 >> ifFalse: [ ^false ]. >> - semaphore waitTimeoutMSecs: waitTime ] repeat! >> >> Item was changed: >> ----- Method: Socket>>waitForDataFor:ifClosed:ifTimedOut: (in category >> 'waiting') ----- >> waitForDataFor: timeout ifClosed: closedBlock ifTimedOut: timedOutBlock >> "Wait for the given nr of seconds for data to arrive." >> >> + | deadline timeLeft | >> - | startTime msecsDelta | >> socketHandle ifNil: [ ^closedBlock value ]. >> + deadline := Time millisecondClockValue + (timeout * 1000) >> truncated. >> - startTime := Time millisecondClockValue. >> - msecsDelta := (timeout * 1000) truncated. >> [ >> (self primSocketReceiveDataAvailable: socketHandle) >> ifTrue: [ ^self ]. >> + self isOtherEndConnected ifFalse: [ ^closedBlock value ]. >> + (timeLeft := deadline - Time millisecondClockValue) <= 0 >> ifTrue: [ ^timedOutBlock value ]. >> - self isConnected ifFalse: [ ^closedBlock value ]. >> - (Time millisecondsSince: startTime) < msecsDelta ifFalse: >> [ ^timedOutBlock value ]. >> "Providing a maximum for the time for waiting is a >> workaround for a VM bug which causes sockets waiting for data forever in >> some rare cases, because the semaphore doesn't get signaled. Remove the >> ""min: self class maximumReadSemaphoreWaitTimeout"" part when the bug is >> fixed." >> readSemaphore waitTimeoutMSecs: >> + (timeLeft min: self class >> maximumReadSemaphoreWaitTimeout) ] repeat! >> - (msecsDelta - (Time millisecondsSince: startTime) >> min: self class maximumReadSemaphoreWaitTimeout) ] repeat! >> >> Item was changed: >> ----- Method: Socket>>waitForDataIfClosed: (in category 'waiting') ----- >> waitForDataIfClosed: closedBlock >> "Wait indefinitely for data to arrive. This method will block >> until >> data is available or the socket is closed." >> >> socketHandle ifNil: [ ^closedBlock value ]. >> [ >> (self primSocketReceiveDataAvailable: socketHandle) >> ifTrue: [ ^self ]. >> + self isOtherEndConnected ifFalse: [ ^closedBlock value ]. >> - self isConnected ifFalse: [ ^closedBlock value ]. >> "ul 8/13/2014 21:16 >> Providing a maximum for the time for waiting is a >> workaround for a VM bug which >> causes sockets waiting for data forever in some rare >> cases, because the semaphore >> doesn't get signaled. Replace the ""waitTimeoutMSecs: >> self class maximumReadSemaphoreWaitTimeout"" >> part with ""wait"" when the bug is fixed." >> readSemaphore waitTimeoutMSecs: self class >> maximumReadSemaphoreWaitTimeout ] repeat! >> >> Item was changed: >> ----- Method: Socket>>waitForDisconnectionFor: (in category 'waiting') >> ----- >> waitForDisconnectionFor: timeout >> "Wait for the given nr of seconds for the connection to be broken. >> Return true if it is broken by the deadline, false if not. >> The client should know the connection is really going to be closed >> (e.g., because he has called 'close' to send a close request to >> the other end) >> before calling this method." >> >> + | deadline | >> + deadline := Time millisecondClockValue + (timeout * 1000) >> truncated. >> + [ self isOtherEndConnected and: [ deadline - Time >> millisecondClockValue > 0 ] ] >> + whileTrue: [ >> + self discardReceivedData. >> + "Providing a maximum for the time for waiting is a >> workaround for a VM bug which causes sockets waiting for data forever in >> some rare cases, because the semaphore doesn't get signaled. Remove the >> ""min: self class maximumReadSemaphoreWaitTimeout"" part when the bug is >> fixed." >> + readSemaphore waitTimeoutMSecs: >> + (deadline - Time millisecondClockValue >> min: self class maximumReadSemaphoreWaitTimeout) ]. >> + ^self isOtherEndConnected! >> - | startTime msecsDelta status | >> - startTime := Time millisecondClockValue. >> - msecsDelta := (timeout * 1000) truncated. >> - status := self primSocketConnectionStatus: socketHandle. >> - [((status == Connected) or: [(status == ThisEndClosed)]) and: >> - [(Time millisecondsSince: startTime) < msecsDelta]] whileTrue: [ >> - self discardReceivedData. >> - "Providing a maximum for the time for waiting is a >> workaround for a VM bug which causes sockets waiting for data forever in >> some rare cases, because the semaphore doesn't get signaled. Remove the >> ""min: self class maximumReadSemaphoreWaitTimeout"" part when the bug is >> fixed." >> - readSemaphore waitTimeoutMSecs: >> - (msecsDelta - (Time millisecondsSince: startTime) >> min: self class maximumReadSemaphoreWaitTimeout). >> - status := self primSocketConnectionStatus: socketHandle]. >> - ^ status ~= Connected! >> >> Item was changed: >> ----- Method: Socket>>waitForSendDoneFor: (in category 'waiting') ----- >> waitForSendDoneFor: timeout >> "Wait up until the given deadline for the current send operation >> to complete. Return true if it completes by the deadline, false if not." >> >> + | deadline timeleft | >> + deadline := Time millisecondClockValue + (timeout * 1000) >> truncated. >> - | startTime msecsDelta msecsEllapsed | >> - startTime := Time millisecondClockValue. >> - msecsDelta := (timeout * 1000) truncated. >> [ >> (self primSocketSendDone: socketHandle) ifTrue: [ ^true ]. >> + self isThisEndConnected ifFalse: [ ^false ]. >> + (timeleft := deadline - Time millisecondClockValue) <= 0 >> ifTrue: [ ^false ]. >> + writeSemaphore waitTimeoutMSecs: timeleft ] repeat! >> - self isConnected ifFalse: [ ^false ]. >> - (msecsEllapsed := Time millisecondsSince: startTime) < >> msecsDelta ifFalse: [ ^false ]. >> - writeSemaphore waitTimeoutMSecs: msecsDelta - >> msecsEllapsed ] repeat! >> >> >> > From Marcel.Taeumel at hpi.de Tue Jul 26 13:45:27 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Jul 26 21:37:25 2016 Subject: [squeak-dev] source.squeak.org is down (502 Bad Gateway) Message-ID: <1469540727857-4908040.post@n4.nabble.com> Who can fix this? :-) Best, Marcel -- View this message in context: http://forum.world.st/source-squeak-org-is-down-502-Bad-Gateway-tp4908040.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From dale.henrichs at gemtalksystems.com Tue Jul 26 16:40:31 2016 From: dale.henrichs at gemtalksystems.com (Dale Henrichs) Date: Tue Jul 26 21:48:18 2016 Subject: [squeak-dev] http://source.squeakfoundation.org down? Message-ID: <523502a8-908a-13bc-f8fd-cd194aad23a6@gemtalksystems.com> It's not just me: http://downforeveryoneorjustme.com/source.squeakfoundation.org I'm getting a '502 Bad Gateway' error ... I seems to have broken in the last hour or so ... Dale From Das.Linux at gmx.de Tue Jul 26 21:50:07 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Jul 26 21:50:09 2016 Subject: [squeak-dev] source.squeak.org is down (502 Bad Gateway) In-Reply-To: <1469540727857-4908040.post@n4.nabble.com> References: <1469540727857-4908040.post@n4.nabble.com> Message-ID: I did. On 26.07.2016, at 15:45, marcel.taeumel wrote: > Who can fix this? :-) > > Best, > Marcel From Das.Linux at gmx.de Tue Jul 26 21:50:25 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Jul 26 21:50:29 2016 Subject: [squeak-dev] http://source.squeakfoundation.org down? In-Reply-To: <523502a8-908a-13bc-f8fd-cd194aad23a6@gemtalksystems.com> References: <523502a8-908a-13bc-f8fd-cd194aad23a6@gemtalksystems.com> Message-ID: <4417F1AA-8304-4BDB-91FF-C7BE576AB05C@gmx.de> Fixed On 26.07.2016, at 18:40, Dale Henrichs wrote: > It's not just me: > > http://downforeveryoneorjustme.com/source.squeakfoundation.org > > I'm getting a '502 Bad Gateway' error ... I seems to have broken in the last hour or so ... > > Dale From leves at caesar.elte.hu Tue Jul 26 21:59:38 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Tue Jul 26 21:59:42 2016 Subject: [squeak-dev] http://source.squeakfoundation.org down? In-Reply-To: <523502a8-908a-13bc-f8fd-cd194aad23a6@gemtalksystems.com> References: <523502a8-908a-13bc-f8fd-cd194aad23a6@gemtalksystems.com> Message-ID: Hi Dale, Please don't use that domain. It still works, though we should have moved away from it long ago. Use source.squeak.org instead. Levente On Tue, 26 Jul 2016, Dale Henrichs wrote: > It's not just me: > > http://downforeveryoneorjustme.com/source.squeakfoundation.org > > I'm getting a '502 Bad Gateway' error ... I seems to have broken in the last > hour or so ... > > Dale > > > From ron at usmedrec.com Tue Jul 26 22:22:52 2016 From: ron at usmedrec.com (Ron Teitelbaum) Date: Tue Jul 26 22:22:57 2016 Subject: [squeak-dev] source.squeak.org is down (502 Bad Gateway) In-Reply-To: References: <1469540727857-4908040.post@n4.nabble.com> Message-ID: <085401d1e78c$405931c0$c10b9540$@usmedrec.com> Thanks Tobias!!! Ron -----Original Message----- From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev-bounces@lists.squeakfoundation.org] On Behalf Of Tobias Pape Sent: Tuesday, July 26, 2016 5:50 PM To: The general-purpose Squeak developers list Subject: Re: [squeak-dev] source.squeak.org is down (502 Bad Gateway) I did. On 26.07.2016, at 15:45, marcel.taeumel wrote: > Who can fix this? :-) > > Best, > Marcel From Das.Linux at gmx.de Tue Jul 26 22:26:38 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Jul 26 22:26:44 2016 Subject: [squeak-dev] http://source.squeakfoundation.org down? In-Reply-To: References: <523502a8-908a-13bc-f8fd-cd194aad23a6@gemtalksystems.com> Message-ID: On 26.07.2016, at 23:59, Levente Uzonyi wrote: > Hi Dale, > > Please don't use that domain. It still works, though we should have moved away from it long ago. Use source.squeak.org instead. > I've just added a redirect so that it will work but show the canonical url. best regards -tobias > Levente > > On Tue, 26 Jul 2016, Dale Henrichs wrote: > >> It's not just me: >> >> http://downforeveryoneorjustme.com/source.squeakfoundation.org >> >> I'm getting a '502 Bad Gateway' error ... I seems to have broken in the last hour or so ... >> >> Dale From dale.henrichs at gemtalksystems.com Tue Jul 26 22:57:57 2016 From: dale.henrichs at gemtalksystems.com (Dale Henrichs) Date: Tue Jul 26 22:58:02 2016 Subject: [squeak-dev] http://source.squeakfoundation.org down? In-Reply-To: References: <523502a8-908a-13bc-f8fd-cd194aad23a6@gemtalksystems.com> Message-ID: <3d105570-8ff8-ef55-480a-030b3f08e08b@gemtalksystems.com> I didn't happen to be using that domain myself ... it was in a configuration that I was using, but I _will_ pass this information along to the maintainers of the project ... Thanks! Dale On 7/26/16 2:59 PM, Levente Uzonyi wrote: > Hi Dale, > > Please don't use that domain. It still works, though we should have > moved away from it long ago. Use source.squeak.org instead. > > Levente > > On Tue, 26 Jul 2016, Dale Henrichs wrote: > >> It's not just me: >> >> http://downforeveryoneorjustme.com/source.squeakfoundation.org >> >> I'm getting a '502 Bad Gateway' error ... I seems to have broken in >> the last hour or so ... >> >> Dale >> >> >> > From dale.henrichs at gemtalksystems.com Tue Jul 26 22:58:23 2016 From: dale.henrichs at gemtalksystems.com (Dale Henrichs) Date: Tue Jul 26 22:58:28 2016 Subject: [squeak-dev] http://source.squeakfoundation.org down? In-Reply-To: References: <523502a8-908a-13bc-f8fd-cd194aad23a6@gemtalksystems.com> Message-ID: Thanks! On 7/26/16 3:26 PM, Tobias Pape wrote: > On 26.07.2016, at 23:59, Levente Uzonyi wrote: > >> Hi Dale, >> >> Please don't use that domain. It still works, though we should have moved away from it long ago. Use source.squeak.org instead. >> > I've just added a redirect so that it will work but show the canonical url. > > best regards > -tobias > >> Levente >> >> On Tue, 26 Jul 2016, Dale Henrichs wrote: >> >>> It's not just me: >>> >>> http://downforeveryoneorjustme.com/source.squeakfoundation.org >>> >>> I'm getting a '502 Bad Gateway' error ... I seems to have broken in the last hour or so ... >>> >>> Dale > > From dale.henrichs at gemtalksystems.com Tue Jul 26 23:05:26 2016 From: dale.henrichs at gemtalksystems.com (Dale Henrichs) Date: Tue Jul 26 23:05:31 2016 Subject: [squeak-dev] http://source.squeakfoundation.org down? In-Reply-To: References: <523502a8-908a-13bc-f8fd-cd194aad23a6@gemtalksystems.com> Message-ID: Levente, It also looks like the mailing list is also using source.squeakfoundation.org ... I didn't see any Squeak email until Tobias fixed things ... Dale On 7/26/16 2:59 PM, Levente Uzonyi wrote: > Hi Dale, > > Please don't use that domain. It still works, though we should have > moved away from it long ago. Use source.squeak.org instead. > > Levente > > On Tue, 26 Jul 2016, Dale Henrichs wrote: > >> It's not just me: >> >> http://downforeveryoneorjustme.com/source.squeakfoundation.org >> >> I'm getting a '502 Bad Gateway' error ... I seems to have broken in >> the last hour or so ... >> >> Dale >> >> >> > From Das.Linux at gmx.de Wed Jul 27 05:40:33 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Jul 27 05:40:36 2016 Subject: [squeak-dev] http://source.squeakfoundation.org down? In-Reply-To: References: <523502a8-908a-13bc-f8fd-cd194aad23a6@gemtalksystems.com> Message-ID: <27C2F089-E6F2-400D-9777-010274323B48@gmx.de> Hi Dale On 27.07.2016, at 01:05, Dale Henrichs wrote: > Levente, > > It also looks like the mailing list is also using source.squeakfoundation.org ... I didn't see any Squeak email until Tobias fixed things ... That's correct. Although, the host was only half-down, at least. Most stuff did still run, now it should be everything again :) best regards -tobias > > Dale > > On 7/26/16 2:59 PM, Levente Uzonyi wrote: >> Hi Dale, >> >> Please don't use that domain. It still works, though we should have moved away from it long ago. Use source.squeak.org instead. >> >> Levente >> >> On Tue, 26 Jul 2016, Dale Henrichs wrote: >> >>> It's not just me: >>> >>> http://downforeveryoneorjustme.com/source.squeakfoundation.org >>> >>> I'm getting a '502 Bad Gateway' error ... I seems to have broken in the last hour or so ... >>> >>> Dale From commits at source.squeak.org Wed Jul 27 15:59:16 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jul 27 15:59:18 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.139.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.139.mcz ==================== Summary ==================== Name: EToys-tfel.139 Author: tfel Time: 27 July 2016, 5:58:58.495152 pm UUID: 0a7e78da-2cb3-874b-8a82-0e22900f06c7 Ancestors: EToys-topa.138 push variableDocks from CardPlayer up to Player, to make older EToys examples work =============== Diff against EToys-topa.138 =============== Item was changed: Player subclass: #CardPlayer instanceVariableNames: 'privateMorphs' classVariableNames: '' poolDictionaries: '' category: 'Etoys-Stacks'! - CardPlayer class - instanceVariableNames: 'variableDocks'! !CardPlayer commentStamp: '' prior: 0! CardPlayer Instance variables of the Uniclass represent the data in the "fields" of each card in the stack. Each Instance variable is some kind of value holder. The code for the *buttons* on the background resides in the CardPlayer uniclass. privateMorphs -- OrderedCollection of objects specific to this card. Individual CardPlayer classes need to store the search results of any instances that are templates. As a hack, we use a class variable TemplateMatches in each individual class (CardPlayer21). It is initialized in #matchIndex:. TemplateMatches an IndentityDictionary of (aCardPlayer -> (list of matching cards, index in that list)) ! - CardPlayer class - instanceVariableNames: 'variableDocks'! Item was removed: - ----- Method: CardPlayer class>>newVariableDocks: (in category 'variable docks') ----- - newVariableDocks: dockList - "Set the receiver's variableDocks to be the list provided in dockList. Assimilate this new information into the receiver's slotInfo, which contains both automatically-generated variables such as the variable docks and also explicitly-user-specified variables" - - self variableDocks: dockList. - self setSlotInfoFromVariableDocks! Item was removed: - ----- Method: CardPlayer class>>resortInstanceVariables: (in category 'user-defined inst vars') ----- - resortInstanceVariables: newList - "Accept a new ordering for instance variables" - - variableDocks := newList collect: [:aName | variableDocks detect: [:d | d variableName = aName]]. - self setNewInstVarNames: newList asOrderedCollection. - self newVariableDocks: variableDocks. - ! Item was removed: - ----- Method: CardPlayer class>>setNewInstVarNames: (in category 'user-defined inst vars') ----- - setNewInstVarNames: listOfStrings - "Make listOfStrings be the new list of instance variable names for the receiver" - - | disappearing firstAppearing instVarString instVarList | - instVarList := self instVarNames asOrderedCollection. - disappearing := instVarList copy. - disappearing removeAllFoundIn: listOfStrings. - disappearing do: - [:oldName | self removeAccessorsFor: oldName]. - firstAppearing := listOfStrings copy. - firstAppearing removeAllFoundIn: instVarList. - instVarString := String streamContents: - [:aStream | listOfStrings do: [:aString | aStream nextPutAll: aString; nextPut: $ ]]. - - superclass subclass: self name instanceVariableNames: instVarString - classVariableNames: '' poolDictionaries: '' category: self categoryForUniclasses. - firstAppearing do: - [:newName | self compileAccessorsFor: newName]. - ! Item was removed: - ----- Method: CardPlayer class>>setSlotInfoFromVariableDocks (in category 'variable docks') ----- - setSlotInfoFromVariableDocks - "Get the slotInfo fixed up after a change in background shape. Those instance variables that are proactively added by the user will persist, whereas those that are automatically generated will be updated" - - self slotInfo copy do: "Remove old automatically-created slots" - [:aSlotInfo | | aDock | - (aDock := aSlotInfo variableDock) ifNotNil: - [slotInfo removeKey: aDock variableName]]. - - self variableDocks do: [:dock | | newInfo | "Generate fresh slots from variable docks" - newInfo := SlotInformation new type: dock variableType. - newInfo variableDock: dock. - slotInfo at: dock variableName asSymbol put: newInfo]! Item was removed: - ----- Method: CardPlayer class>>variableDocks (in category 'variable docks') ----- - variableDocks - "Answer the list of variable docks in the receiver. Initialize the variable-dock list if not already done." - - variableDocks ifNil: [variableDocks := OrderedCollection new]. - ^ variableDocks! Item was removed: - ----- Method: CardPlayer class>>variableDocks: (in category 'variable docks') ----- - variableDocks: dockList - "Set the variable-dock list as indicated" - - variableDocks := dockList! Item was changed: Model subclass: #Player instanceVariableNames: 'costume costumes' classVariableNames: 'BiggestSubclassNumber TimeOfError' poolDictionaries: 'References' category: 'Etoys-Scripting'! Player class + instanceVariableNames: 'scripts slotInfo variableDocks'! - instanceVariableNames: 'scripts slotInfo'! !Player commentStamp: '' prior: 0! The fundamental user-scriptable entity. Always represented by a user-specific subclass of Player; instance vars and methods relate to user-defined structures. costume is a Morph, the primary morph I am currently wearing for graphical display. Scripts are defined in subclasses of Player. These are UniClasses. Messages in scripts are sent to Players. A Player may delegate to its costume, or to an object the costume suggests. Or, a Player may designate some other object to receive the script messages it does not understand. (see doesNotUnderstand:) ! Player class + instanceVariableNames: 'scripts slotInfo variableDocks'! - instanceVariableNames: 'scripts slotInfo'! Item was added: + ----- Method: Player class>>newVariableDocks: (in category 'variable docks') ----- + newVariableDocks: dockList + "Set the receiver's variableDocks to be the list provided in dockList. Assimilate this new information into the receiver's slotInfo, which contains both automatically-generated variables such as the variable docks and also explicitly-user-specified variables" + + self variableDocks: dockList. + self setSlotInfoFromVariableDocks! Item was added: + ----- Method: Player class>>resortInstanceVariables: (in category 'user-defined inst vars') ----- + resortInstanceVariables: newList + "Accept a new ordering for instance variables" + + variableDocks := newList collect: [:aName | variableDocks detect: [:d | d variableName = aName]]. + self setNewInstVarNames: newList asOrderedCollection. + self newVariableDocks: variableDocks. + ! Item was added: + ----- Method: Player class>>setNewInstVarNames: (in category 'user-defined inst vars') ----- + setNewInstVarNames: listOfStrings + "Make listOfStrings be the new list of instance variable names for the receiver" + + | disappearing firstAppearing instVarString instVarList | + instVarList := self instVarNames asOrderedCollection. + disappearing := instVarList copy. + disappearing removeAllFoundIn: listOfStrings. + disappearing do: + [:oldName | self removeAccessorsFor: oldName]. + firstAppearing := listOfStrings copy. + firstAppearing removeAllFoundIn: instVarList. + instVarString := String streamContents: + [:aStream | listOfStrings do: [:aString | aStream nextPutAll: aString; nextPut: $ ]]. + + superclass subclass: self name instanceVariableNames: instVarString + classVariableNames: '' poolDictionaries: '' category: self categoryForUniclasses. + firstAppearing do: + [:newName | self compileAccessorsFor: newName]. + ! Item was added: + ----- Method: Player class>>setSlotInfoFromVariableDocks (in category 'variable docks') ----- + setSlotInfoFromVariableDocks + "Get the slotInfo fixed up after a change in background shape. Those instance variables that are proactively added by the user will persist, whereas those that are automatically generated will be updated" + + self slotInfo copy do: "Remove old automatically-created slots" + [:aSlotInfo | | aDock | + (aDock := aSlotInfo variableDock) ifNotNil: + [slotInfo removeKey: aDock variableName]]. + + self variableDocks do: [:dock | | newInfo | "Generate fresh slots from variable docks" + newInfo := SlotInformation new type: dock variableType. + newInfo variableDock: dock. + slotInfo at: dock variableName asSymbol put: newInfo]! Item was added: + ----- Method: Player class>>variableDocks (in category 'variable docks') ----- + variableDocks + "Answer the list of variable docks in the receiver. Initialize the variable-dock list if not already done." + + variableDocks ifNil: [variableDocks := OrderedCollection new]. + ^ variableDocks! Item was added: + ----- Method: Player class>>variableDocks: (in category 'variable docks') ----- + variableDocks: dockList + "Set the variable-dock list as indicated" + + variableDocks := dockList! Item was changed: Player subclass: #UnscriptedPlayer + instanceVariableNames: 'patch' - instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Etoys-Scripting'! UnscriptedPlayer class instanceVariableNames: 'ephemeralPlayerRef'! !UnscriptedPlayer commentStamp: '' prior: 0! My instances are Player objects that have not been scripted, and which hence do not require a unique scripts dictionary, etc. As soon as the needed, I am transformed automatically into a unique subclass of Player.! UnscriptedPlayer class instanceVariableNames: 'ephemeralPlayerRef'! Item was added: + ----- Method: UnscriptedPlayer>>getPatch (in category 'access') ----- + getPatch + ^ patch! Item was added: + ----- Method: UnscriptedPlayer>>setPatch: (in category 'access') ----- + setPatch: t1 + patch := t1! From commits at source.squeak.org Wed Jul 27 16:03:34 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jul 27 16:03:35 2016 Subject: [squeak-dev] The Trunk: Graphics-tfel.355.mcz Message-ID: Tim Felgentreff uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-tfel.355.mcz ==================== Summary ==================== Name: Graphics-tfel.355 Author: tfel Time: 27 July 2016, 6:02:58.629152 pm UUID: 004f1a41-9be9-c443-9853-26c892c7a2ae Ancestors: Graphics-tpr.354 small fix to allow creating Forms from hibernated bitmaps, like the Sugar icon library does =============== Diff against Graphics-tpr.354 =============== Item was changed: ----- Method: Form>>setExtent:depth:bits: (in category 'private') ----- setExtent: extent depth: bitsPerPixel bits: bitmap "Create a virtual bit map with the given extent and bitsPerPixel." width := extent x asInteger. width < 0 ifTrue: [width := 0]. height := extent y asInteger. height < 0 ifTrue: [height := 0]. depth := bitsPerPixel. depth := bitsPerPixel. + (bits isNil - (bitmap isNil or:[(bitmap class isWords and: [self bitsSize = bitmap size]) or: [bitmap class isBytes and: [self bitsSize * 4 = bitmap size]]]) ifFalse:[^self error:'Bad dimensions']. bits := bitmap! From commits at source.squeak.org Wed Jul 27 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jul 27 21:55:06 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160727215502.24335.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068306.html Name: EToys-tfel.139 Ancestors: EToys-topa.138 push variableDocks from CardPlayer up to Player, to make older EToys examples work ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068307.html Name: Graphics-tfel.355 Ancestors: Graphics-tpr.354 small fix to allow creating Forms from hibernated bitmaps, like the Sugar icon library does ============================================= From commits at source.squeak.org Thu Jul 28 08:20:15 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 08:20:18 2016 Subject: [squeak-dev] The Trunk: Tools-tfel.709.mcz Message-ID: Tim Felgentreff uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-tfel.709.mcz ==================== Summary ==================== Name: Tools-tfel.709 Author: tfel Time: 28 July 2016, 10:19:54.053676 am UUID: 14f22a50-0418-2c43-9139-d5b28a9b9ea9 Ancestors: Tools-mt.708 Fix a small bug in FileList2. FileList>>itemsForFile: now needs a fully qualified path =============== Diff against Tools-mt.708 =============== Item was changed: ----- Method: FileList2 class>>endingSpecs (in category 'blue ui') ----- endingSpecs "Answer a collection of specs to build the selective 'find anything' tool called by the Navigator. This version uses the services registry to do so." "FileList2 morphicViewGeneralLoaderInWorld: World" | categories specs rejects | rejects := #(addFileToNewZip: compressFile: openInZipViewer: extractAllFrom: openOn:). categories := #( ('Art' ('bmp' 'gif' 'jpg' 'jpeg' 'form' 'png' 'pcx' 'xbm' 'xpm' 'ppm' 'pbm')) ('Morphs' ('morph' 'morphs' 'sp')) ('Projects' ('extseg' 'project' 'pr')) ('MIDI' ('mid' 'midi')) ('Music' ('mp3')) ('Movies' ('movie' 'mpg' 'mpeg' 'qt' 'mov')) ('Flash' ('swf')) ). "('Books' ('bo'))" "('Code' ('st' 'cs'))" "('TrueType' ('ttf'))" "('3ds' ('3ds'))" "('Tape' ('tape'))" "('Wonderland' ('wrl'))" "('HTML' ('htm' 'html'))" categories first at: 2 put: ImageReadWriter allTypicalFileExtensions. specs := OrderedCollection new. categories do: [ :cat | | catSpecs catServices okExtensions services | services := Dictionary new. catSpecs := Array new: 3. catServices := OrderedCollection new. okExtensions := Set new. + cat second do: [ :ext | (FileList itemsForFile: (FileDirectory default fullPathFor: ('fred.',ext))) do: [ :i | - cat second do: [ :ext | (FileList itemsForFile: 'fred.',ext) do: [ :i | (rejects includes: i selector) ifFalse: [ okExtensions add: ext. services at: i label put: i ]]]. services do: [ :svc | catServices add: svc ]. services isEmpty ifFalse: [ catSpecs at: 1 put: cat first; at: 2 put: okExtensions; at: 3 put: catServices. specs add: catSpecs ] ]. ^specs ! From commits at source.squeak.org Thu Jul 28 08:31:20 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 08:31:22 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1199.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1199.mcz ==================== Summary ==================== Name: Morphic-mt.1199 Author: mt Time: 28 July 2016, 10:29:17.521721 am UUID: c1d1bd2b-0884-f749-8b20-91ddd42be224 Ancestors: Morphic-mt.1198 Improve robustness for tricky debugging scenarios. =============== Diff against Morphic-mt.1198 =============== Item was changed: ----- Method: MorphicProject>>spawnNewProcessIfThisIsUI: (in category 'active process') ----- spawnNewProcessIfThisIsUI: suspendedProcess "Initialize a UI process if needed. Answer true if suspendedProcess was interrupted from a UI process." self uiProcess == suspendedProcess ifTrue: [ self spawnNewProcess. ^true ]. "Ensure that the UI process is running." + self uiProcess + ifNil: [self spawnNewProcess] + ifNotNil: [:p | p isSuspended ifTrue: [ + self restoreDisplay. + self uiProcess resume]]. - self uiProcess isSuspended ifTrue: [ - self restoreDisplay. - self uiProcess resume]. ^false "no new process was created" ! From commits at source.squeak.org Thu Jul 28 09:00:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 09:00:04 2016 Subject: [squeak-dev] The Trunk: System-mt.842.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.842.mcz ==================== Summary ==================== Name: System-mt.842 Author: mt Time: 28 July 2016, 10:59:39.771276 am UUID: b894e8fa-54e5-b949-9ffc-692b40146ba3 Ancestors: System-mt.841 Fixes uni-class check due to latest updates in EToys package. =============== Diff against System-mt.841 =============== Item was changed: ----- Method: DeepCopier>>checkBasicClasses (in category 'like fullCopy') ----- checkBasicClasses "Check that no indexes of instance vars have changed in certain classes. If you get an error in this method, an implementation of veryDeepCopyWith: needs to be updated. The idea is to catch a change while it is still in the system of the programmer who made it. DeepCopier new checkVariables " | str str2 objCls morphCls playerCls | str := '|veryDeepCopyWith: or veryDeepInner: is out of date.'. (objCls := self objInMemory: #Object) ifNotNil: [ objCls instSize = 0 ifFalse: [self error: 'Many implementers of veryDeepCopyWith: are out of date']]. (morphCls := self objInMemory: #Morph) ifNotNil: [ morphCls superclass == Object ifFalse: [self error: 'Morph', str]. (morphCls instVarNames copyFrom: 1 to: 6) = #('bounds' 'owner' 'submorphs' 'fullBounds' 'color' 'extension') ifFalse: [self error: 'Morph', str]]. "added ones are OK" str2 := 'Player|copyUniClassWith: and DeepCopier|mapUniClasses are out of date'. (playerCls := self objInMemory: #Player) ifNotNil: [ + playerCls class instVarNames = #('scripts' 'slotInfo' 'variableDocks') - playerCls class instVarNames = #('scripts' 'slotInfo') ifFalse: [self error: str2]]. ! From commits at source.squeak.org Thu Jul 28 09:16:04 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 09:16:06 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1200.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1200.mcz ==================== Summary ==================== Name: Morphic-mt.1200 Author: mt Time: 28 July 2016, 11:15:23.107276 am UUID: e7d3f249-f9e8-e546-97f7-a98a3db03b31 Ancestors: Morphic-mt.1199 Adds pragma preference for rounded window corners. =============== Diff against Morphic-mt.1199 =============== Item was changed: ----- Method: ProjectViewMorph>>wantsRoundedCorners (in category 'rounding') ----- wantsRoundedCorners + ^SystemWindow roundedWindowCorners - ^Preferences roundedWindowCorners and: [(owner isSystemWindow) not]! Item was changed: ----- Method: ScorePlayerMorph>>wantsRoundedCorners (in category 'rounding') ----- wantsRoundedCorners + ^ SystemWindow roundedWindowCorners or: [super wantsRoundedCorners]! - ^ Preferences roundedWindowCorners or: [super wantsRoundedCorners]! Item was changed: MorphicModel subclass: #SystemWindow instanceVariableNames: 'labelString stripes label closeBox collapseBox paneMorphs paneRects collapsedFrame fullFrame isCollapsed isActive isLookingFocused menuBox mustNotClose labelWidgetAllowance updatablePanes allowReframeHandles labelArea expandBox' + classVariableNames: 'ClickOnLabelToEdit CloseBoxFrame CloseBoxImageFlat CloseBoxImageGradient CollapseBoxImageFlat CollapseBoxImageGradient DoubleClickOnLabelToExpand ExpandBoxFrame ExpandBoxImageFlat ExpandBoxImageGradient FocusFollowsMouse GradientWindow HideExpandButton MenuBoxFrame MenuBoxImageFlat MenuBoxImageGradient ResizeAlongEdges ReuseWindows RoundedWindowCorners TopWindow WindowTitleActiveOnFirstClick WindowsRaiseOnClick' - classVariableNames: 'ClickOnLabelToEdit CloseBoxFrame CloseBoxImageFlat CloseBoxImageGradient CollapseBoxImageFlat CollapseBoxImageGradient DoubleClickOnLabelToExpand ExpandBoxFrame ExpandBoxImageFlat ExpandBoxImageGradient FocusFollowsMouse GradientWindow HideExpandButton MenuBoxFrame MenuBoxImageFlat MenuBoxImageGradient ResizeAlongEdges ReuseWindows TopWindow WindowTitleActiveOnFirstClick WindowsRaiseOnClick' poolDictionaries: '' category: 'Morphic-Windows'! !SystemWindow commentStamp: '' prior: 0! SystemWindow is the Morphic equivalent of StandardSystemView -- a labelled container for rectangular views, with iconic facilities for close, collapse/expand, and resizing. The attribute onlyActiveOnTop, if set to true (and any call to activate will set this), determines that only the top member of a collection of such windows on the screen shall be active. To be not active means that a mouse click in any region will only result in bringing the window to the top and then making it active.! Item was removed: - ----- Method: SystemWindow class>>initialize (in category 'initializing') ----- - initialize - "SystemWindow initialize" - - CollapseBoxImageGradient := nil. - CloseBoxImageGradient := nil. - ExpandBoxImageGradient := nil. - MenuBoxImageGradient := nil. - - CollapseBoxImageFlat := nil. - CloseBoxImageFlat := nil. - ExpandBoxImageFlat := nil. - MenuBoxImageFlat := nil. - - self updatePreferences.! Item was added: + ----- Method: SystemWindow class>>roundedWindowCorners (in category 'preferences') ----- + roundedWindowCorners + + + ^ RoundedWindowCorners ifNil: [false]! Item was added: + ----- Method: SystemWindow class>>roundedWindowCorners: (in category 'preferences') ----- + roundedWindowCorners: aBoolean + + RoundedWindowCorners = aBoolean ifTrue: [^ self]. + RoundedWindowCorners := aBoolean. + self refreshAllWindows.! Item was removed: - ----- Method: SystemWindow class>>updatePreferences (in category 'initializing') ----- - updatePreferences - "Temporary method to update system-wide preferences" - Preferences installNormalWindowColors. - - Preferences setPreference: #menuAppearance3d toValue: true. - (Preferences preferenceAt: #menuAppearance3d) defaultValue: true. - - Preferences setPreference: #menuColorFromWorld toValue: false. - (Preferences preferenceAt: #menuColorFromWorld) defaultValue: false. - - MenuMorph roundedMenuCorners: false. - - MenuMorph menuColor: (Color gray: 0.9). - MenuMorph menuTitleColor: (Color transparent). - MenuMorph menuTitleBorderWidth: 0. - Preferences - setParameter: #defaultWorldColor - to: (Color gray: 0.25). - - Preferences setPreference: #showSplitterHandles toValue: false. - (Preferences preferenceAt: #showSplitterHandles) defaultValue: true. - - Preferences setPreference: #showSharedFlaps toValue: false. - (Preferences preferenceAt: #showSharedFlaps) defaultValue: false. - - CornerGripMorph drawCornerResizeHandles: false. - FillInTheBlankMorph roundedDialogCorners: true. - - LazyListMorph - listSelectionColor: LazyListMorph listSelectionColor; - listSelectionTextColor: Color black. - PluggableButtonMorph roundedButtonCorners: true. - SystemWindow - clickOnLabelToEdit: false; - doubleClickOnLabelToExpand: true; - moveMenuButtonRight: true; - hideExpandButton: false.! Item was changed: ----- Method: SystemWindow>>wantsRoundedCorners (in category 'drawing') ----- wantsRoundedCorners + ^ false "Temporarily."! - ^ Preferences roundedWindowCorners or: [super wantsRoundedCorners]! Item was changed: ----- Method: TheWorldMenu>>roundedCornersString (in category 'action') ----- roundedCornersString + ^ (((SystemWindow roundedWindowCorners) + ifTrue: ['stop'] + ifFalse: ['start']) , ' rounding window corners') translated! - ^ Preferences roundedCornersString! Item was changed: ----- Method: TheWorldMenu>>toggleRoundedCorners (in category 'action') ----- toggleRoundedCorners + SystemWindow roundedWindowCorners: SystemWindow roundedWindowCorners not.! - Preferences toggle: #roundedWindowCorners.! Item was changed: + (PackageInfo named: 'Morphic') postscript: 'TheWorldMainDockingBar updateInstances.'! - (PackageInfo named: 'Morphic') postscript: '"Fixes the event handling that occurs in the same control flow after loading this code." - HandMorph allInstancesDo: [:ea | ea initForEvents]. - - "Deploy mouse-wheel event handling to existing scrollpanes and hands." - Project allMorphicProjects do: [:morphicProject | - morphicProject world handsDo: [:hand | - hand addKeyboardCaptureFilter: hand]]. - ScrollPane allSubInstancesDo: [:ea | - ea addKeyboardCaptureFilter: ea]. - - "Add Do-menu." - TheWorldMainDockingBar updateInstances.'! From commits at source.squeak.org Thu Jul 28 09:16:40 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 09:16:44 2016 Subject: [squeak-dev] The Trunk: MorphicExtras-mt.177.mcz Message-ID: Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-mt.177.mcz ==================== Summary ==================== Name: MorphicExtras-mt.177 Author: mt Time: 28 July 2016, 11:16:16.844276 am UUID: d99cb4ca-a34d-8143-8035-b67fd586bc7f Ancestors: MorphicExtras-topa.176 Uses pragma preference for rounded window corners. =============== Diff against MorphicExtras-topa.176 =============== Item was changed: ----- Method: EnvelopeEditorMorph>>wantsRoundedCorners (in category 'rounding') ----- wantsRoundedCorners + ^ SystemWindow roundedWindowCorners or: [super wantsRoundedCorners]! - ^ Preferences roundedWindowCorners or: [super wantsRoundedCorners]! From commits at source.squeak.org Thu Jul 28 09:17:17 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 09:17:20 2016 Subject: [squeak-dev] The Trunk: ReleaseBuilder-mt.136.mcz Message-ID: Marcel Taeumel uploaded a new version of ReleaseBuilder to project The Trunk: http://source.squeak.org/trunk/ReleaseBuilder-mt.136.mcz ==================== Summary ==================== Name: ReleaseBuilder-mt.136 Author: mt Time: 28 July 2016, 11:17:09.194276 am UUID: b6fdd985-9dda-6340-846d-b83b94410096 Ancestors: ReleaseBuilder-mt.135 Uses pragma preference for rounded window corners. =============== Diff against ReleaseBuilder-mt.135 =============== Item was changed: ----- Method: ReleaseBuilder class>>setPreferences (in category 'scripts') ----- setPreferences "Preferences class defaultValueTableForCurrentRelease" " Preferences outOfTheBox." "<-- uncomment after #defaultValueTableForCurrentRelease is fixed up." "General User interaction" Preferences enable: #generalizedYellowButtonMenu ; enable: #swapMouseButtons; disable: #mouseOverForKeyboardFocus. Morph indicateKeyboardFocus: true. ToolBuilder openToolsAttachedToMouseCursor: false. SearchBar useScratchPad: false. "Text input." TextEditor autoEnclose: true ; autoIndent: true ; destructiveBackWord: false ; blinkingCursor: true ; dumbbellCursor: false. Preferences insertionPointColor: Color red. PluggableTextMorph simpleFrameAdornments: false. "Windows" Preferences installUniformWindowColors. SystemWindow reuseWindows: false. SystemWindow windowsActiveOnlyOnTop: true. Model windowActiveOnFirstClick: false. "Not good for 800x600" Preferences disable: #showSplitterHandles; enable: #fastDragWindowForMorphic. CornerGripMorph drawCornerResizeHandles: false. ProportionalSplitterMorph smartHorizontalSplitters: false ; smartVerticalSplitters: false. "Scroll bars." Preferences enable: #scrollBarsNarrow; enable: #scrollBarsOnRight; disable: #alwaysHideHScrollbar; disable: #alwaysShowHScrollbar; disable: #alwaysShowVScrollbar. ScrollBar scrollBarsWithoutArrowButtons: true; scrollBarsWithoutMenuButton: true. ScrollPane useRetractableScrollBars: false. "Rounded corners." Morph preferredCornerRadius: 6. + SystemWindow roundedWindowCorners: false. - Preferences disable: #roundedWindowCorners. PluggableButtonMorph roundedButtonCorners: false. FillInTheBlankMorph roundedDialogCorners: false. MenuMorph roundedMenuCorners: false. ScrollBar roundedScrollBarLook: false. "Gradients." Preferences disable: #gradientScrollBars. SystemWindow gradientWindow: false. MenuMorph gradientMenu: false. PluggableButtonMorph gradientButton: false. "Shadows" Preferences enable: #menuAppearance3d. MenuMorph menuBorderWidth: 1; menuBorderColor: Color lightGray; menuLineColor: Color lightGray. Morph useSoftDropShadow: true.. "Lists and Trees" PluggableListMorph filterableLists: true; clearFilterAutomatically: false; highlightHoveredRow: true; menuRequestUpdatesSelection: true. PluggableTreeMorph filterByLabelsOnly: false; maximumSearchDepth: 1. LazyListMorph listSelectionTextColor: Color black; listSelectionColor: (Color r: 0.72 g: 0.72 b: 0.9). "Standard Tools" BalloonMorph balloonColor: (Color r: 0.92 g: 0.92 b: 0.706). Workspace shouldStyle: false. Browser listClassesHierarchically: true; showClassIcons: true; showMessageIcons: true; sortMessageCategoriesAlphabetically: true. Preferences enable: #annotationPanes; enable: #optionalButtons; enable: #diffsWithPrettyPrint; enable: #traceMessages; enable: #alternativeBrowseIt; enable: #menuWithIcons; enable: #visualExplorer. SystemNavigation thoroughSenders: true. Preferences disable: #debugLogTimestamp. "Halo" Preferences enable: #showBoundsInHalo ; disable: #alternateHandlesLook. "System" NetNameResolver enableIPv6: false. Scanner allowUnderscoreAsAssignment: true; prefAllowUnderscoreSelectors: true. "that's all, folks"! From commits at source.squeak.org Thu Jul 28 09:18:17 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 09:18:18 2016 Subject: [squeak-dev] The Trunk: System-mt.843.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.843.mcz ==================== Summary ==================== Name: System-mt.843 Author: mt Time: 28 July 2016, 11:17:49.223276 am UUID: fd2a497a-5f3f-dc4e-8790-4bab7415b3cc Ancestors: System-mt.842 Removes old-style preference for rounded window corners. =============== Diff against System-mt.842 =============== Item was changed: ----- Method: Preferences class>>defaultValueTableForCurrentRelease (in category 'defaults') ----- defaultValueTableForCurrentRelease "Answer a table defining default values for all the preferences in the release. Returns a list of (pref-symbol, boolean-symbol) pairs" ^ #( (abbreviatedBrowserButtons false) (alternativeBrowseIt false) (annotationPanes false) (areaFillsAreTolerant false) (areaFillsAreVeryTolerant false) (automaticFlapLayout true) (automaticKeyGeneration false) (automaticPlatformSettings true) (automaticViewerPlacement true) (balloonHelpEnabled true) (balloonHelpInMessageLists false) (batchPenTrails false) (capitalizedReferences true) (caseSensitiveFinds false) (cautionBeforeClosing false) (changeSetVersionNumbers true) (checkForSlips true) (checkForUnsavedProjects true) (classicNavigatorEnabled false) (cmdDotEnabled true) (collapseWindowsInPlace false) (compactViewerFlaps false) (compressFlashImages false) (confirmFirstUseOfStyle true) (conversionMethodsAtFileOut false) (debugHaloHandle true) (debugPrintSpaceLog false) (debugShowDamage false) (decorateBrowserButtons true) (diffsInChangeList true) (diffsWithPrettyPrint false) (dismissAllOnOptionClose false) (dragNDropWithAnimation false) (eToyFriendly false) (eToyLoginEnabled false) (enableLocalSave true) (extractFlashInHighQuality true) (extractFlashInHighestQuality false) (fastDragWindowForMorphic true) (fenceEnabled true) (fullScreenLeavesDeskMargins true) (haloTransitions false) (higherPerformance false) (honorDesktopCmdKeys true) (includeSoundControlInNavigator false) (infiniteUndo false) (logDebuggerStackToFile true) (magicHalos false) (menuButtonInToolPane false) (menuColorFromWorld false) (menuKeyboardControl false) (modalColorPickers true) (mouseOverForKeyboardFocus false) (mouseOverHalos false) (mvcProjectsAllowed true) (navigatorOnLeftEdge true) (noviceMode false) (okToReinitializeFlaps true) (optionalButtons true) (passwordsOnPublish false) (personalizedWorldMenu true) (postscriptStoredAsEPS false) (projectViewsInWindows true) (projectZoom true) (projectsSentToDisk false) (propertySheetFromHalo false) (readDocumentAtStartup true) (restartAlsoProceeds false) (reverseWindowStagger true) (roundedMenuCorners true) - (roundedWindowCorners true) (scrollBarsNarrow false) (scrollBarsOnRight true) (gradientScrollBars true) (securityChecksEnabled false) (selectiveHalos false) (showBoundsInHalo false) (showDirectionForSketches false) (showDirectionHandles false) (showFlapsWhenPublishing false) (showProjectNavigator false) (showSecurityStatus true) (showSharedFlaps true) (signProjectFiles true) (simpleMenus false) (smartUpdating true) (startInUntrustedDirectory false) (systemWindowEmbedOK false) (tileTranslucentDrag true) (timeStampsInMenuTitles true) (turnOffPowerManager false) (twentyFourHourFileStamps true) (typeCheckingInTileScripting true) (uniTilesClassic true) (uniqueNamesInHalos false) (universalTiles false) (unlimitedPaintArea false) (useButtonPropertiesToFire false) (useUndo true) (viewersInFlaps true) (warnAboutInsecureContent true) (warnIfNoChangesFile true) (warnIfNoSourcesFile true)) " Preferences defaultValueTableForCurrentRelease do: [:pair | (Preferences preferenceAt: pair first ifAbsent: [nil]) ifNotNilDo: [:pref | pref defaultValue: (pair last == true)]]. Preferences chooseInitialSettings. "! Item was removed: - ----- Method: Preferences class>>roundedCornersString (in category 'support - misc') ----- - roundedCornersString - ^ (((self valueOfFlag: #roundedWindowCorners) - ifTrue: ['stop'] - ifFalse: ['start']) , ' rounding window corners') translated! Item was removed: - ----- Method: Preferences class>>roundedWindowCorners (in category 'standard queries') ----- - roundedWindowCorners - ^ self - valueOfFlag: #roundedWindowCorners - ifAbsent: [ true ]! Item was changed: ----- Method: Preferences class>>setNotificationParametersForStandardPreferences (in category 'initialization - misc') ----- setNotificationParametersForStandardPreferences "Set up the notification parameters for the standard preferences that require need them. When adding new Preferences that require use of the notification mechanism, users declare the notifcation info as part of the call that adds the preference, or afterwards -- the two relevant methods for doing that are: Preferences.addPreference:categories:default:balloonHelp:projectLocal:changeInformee:changeSelector: and Preference changeInformee:changeSelector:" "Preferences setNotificationParametersForStandardPreferences" #( (annotationPanes annotationPanesChanged) (eToyFriendly eToyFriendlyChanged) (infiniteUndo infiniteUndoChanged) (uniTilesClassic classicTilesSettingToggled) (optionalButtons optionalButtonsChanged) - (roundedWindowCorners roundedWindowCornersChanged) (showProjectNavigator showProjectNavigatorChanged) (smartUpdating smartUpdatingChanged) (universalTiles universalTilesSettingToggled) (showSharedFlaps sharedFlapsSettingChanged) (noviceMode noviceModeSettingChanged) ) do: [:pair | | aPreference | aPreference := self preferenceAt: pair first. aPreference changeInformee: self changeSelector: pair second]! Item was changed: + (PackageInfo named: 'System') postscript: 'Preferences removePreference: #roundedWindowCorners.'! - (PackageInfo named: 'System') postscript: '" Convert SoundService registeredClasses to classes if necessary " - [ | currentSoundSystem | - currentSoundSystem := SoundService defaultOrNil. - (SoundService registeredClasses copy collect: [:ss | - SoundService unregister: ss. - ss isBehavior - ifTrue: [ss] - ifFalse: [ss class]] - ) do: [:ssClass | - SoundService register: ssClass]. - SoundService default: (currentSoundSystem - ifNotNil: [:css| css isBehavior ifTrue: [css] ifFalse: [css class]]). - ] value. - - "Convert preferences dictionary from class var to inst var if necessary." - (Preferences instVarNamed: ''preferencesDictionary'') ifNil: - [(Preferences classPool at: #DictionaryOfPreferences) ifNotNil: - [:dictionary| - Preferences - instVarNamed: ''preferencesDictionary'' - put: dictionary]]. - - (Smalltalk classNamed: #ServicePreferences) ifNotNil: - [:sp| - (sp instVarNamed: ''preferencesDictionary'') ifNil: - [(sp classPool at: #ServiceDictionaryOfPreferences) ifNotNil: - [:dictionary| - sp - instVarNamed: ''preferencesDictionary'' - put: dictionary]]]'! From commits at source.squeak.org Thu Jul 28 09:19:03 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 09:19:05 2016 Subject: [squeak-dev] The Trunk: 51Deprecated-mt.33.mcz Message-ID: Marcel Taeumel uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-mt.33.mcz ==================== Summary ==================== Name: 51Deprecated-mt.33 Author: mt Time: 28 July 2016, 11:18:56.332276 am UUID: 8dba9ec7-5272-7e40-bbed-b06cf8b669db Ancestors: 51Deprecated-mt.32 Just in case, deprecate but not remove old-style rounded-corners string message. =============== Diff against 51Deprecated-mt.32 =============== Item was added: + ----- Method: Preferences class>>roundedCornersString (in category '*51Deprecated-support') ----- + roundedCornersString + + self deprecated: 'mt: Use SystemWindow >> #roundedWindowCorners'. + ^ (((self valueOfFlag: #roundedWindowCorners) + ifTrue: ['stop'] + ifFalse: ['start']) , ' rounding window corners') translated! From commits at source.squeak.org Thu Jul 28 09:25:25 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 09:25:27 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1201.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1201.mcz ==================== Summary ==================== Name: Morphic-mt.1201 Author: mt Time: 28 July 2016, 11:24:07.846886 am UUID: aff57b94-6551-be4d-bbfa-7b8ad3f0e3e8 Ancestors: Morphic-mt.1200 Restore functionality for rounded window corners, how that the preference is pragma-style. =============== Diff against Morphic-mt.1200 =============== Item was changed: ----- Method: SystemWindow>>wantsRoundedCorners (in category 'drawing') ----- wantsRoundedCorners + ^ self class roundedWindowCorners or: [super wantsRoundedCorners]! - ^ false "Temporarily."! From commits at source.squeak.org Thu Jul 28 09:32:30 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 09:32:32 2016 Subject: [squeak-dev] The Trunk: SystemReporter-mt.27.mcz Message-ID: Marcel Taeumel uploaded a new version of SystemReporter to project The Trunk: http://source.squeak.org/trunk/SystemReporter-mt.27.mcz ==================== Summary ==================== Name: SystemReporter-mt.27 Author: mt Time: 28 July 2016, 11:32:24.083845 am UUID: afe89257-ac5a-814d-9bc7-b9f991c3f9aa Ancestors: SystemReporter-mt.26 The System Reporter tool is created via tool builder and hence should be a model like all other tools created via tool builder. Note that Model does also have a more efficient management for dependents compared to Object. =============== Diff against SystemReporter-mt.26 =============== Item was changed: + Model subclass: #SystemReporter - Object subclass: #SystemReporter instanceVariableNames: 'categories categoriesSelected report tinyBenchmarksResult categoryList testRunner spaceAnalysisResult' classVariableNames: '' poolDictionaries: '' category: 'SystemReporter'! !SystemReporter commentStamp: 'laza 1/18/2011 12:04' prior: 0! SystemReporter offers a window where information about the system is gathered. This can be easily copied to the clipboard and be attached to a bug report for better identification of the context the bug occured in. To extend the SystemReporter: - add a method reportXYZ: aStream to the reporting category - insert a line add: #XYZ method: #reportXYZ to the initialize method ! From commits at source.squeak.org Thu Jul 28 09:58:30 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 09:58:32 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1202.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1202.mcz ==================== Summary ==================== Name: Morphic-mt.1202 Author: mt Time: 28 July 2016, 11:57:51.049147 am UUID: e61b0d9d-ba29-b74a-a3ac-aaf3d1be624a Ancestors: Morphic-mt.1201 Add and use pragma-style preference for gradient scroll bars. =============== Diff against Morphic-mt.1201 =============== Item was changed: Slider subclass: #ScrollBar instanceVariableNames: 'menuButton upButton downButton pagingArea scrollDelta pageDelta interval menuSelector timeOfMouseDown timeOfLastScroll nextPageDirection currentScrollDelay' + classVariableNames: 'ArrowImagesCache BoxesImagesCache GradientScrollBar RoundedScrollBarLook ScrollBarsWithoutArrowButtons ScrollBarsWithoutMenuButton UpArrow UpArrow8Bit' - classVariableNames: 'ArrowImagesCache BoxesImagesCache RoundedScrollBarLook ScrollBarsWithoutArrowButtons ScrollBarsWithoutMenuButton UpArrow UpArrow8Bit' poolDictionaries: '' category: 'Morphic-Windows'! !ScrollBar commentStamp: '' prior: 0! Inspired by an oiginal design of Hans-Martin Mosner, this ScrollBar is intended to exercise the handling of input events in Morphic. With sufficient flexibility in this area, all particular behavior can be concentrated in this single class with no need to specialize any other morphs to achieve button, slider and menu-button behavior. Once we have this working, put in logic for horizontal operation as well. CachedImages was added to reduce the number of forms created and thrown away. This will be helpful for Nebraska and others as well.! Item was changed: ----- Method: ScrollBar class>>createArrowOfDirection:size:color: (in category 'images') ----- createArrowOfDirection: aSymbolDirection size: finalSizeInteger color: aColor "PRIVATE - create an arrow with aSymbolDirectionDirection, finalSizeInteger and aColor aSymbolDirectionDirection = #top, #bottom. #left or #right Try with: (ScrollBar createArrowOfDirection: #top size: 32 color: Color lightGreen) asMorph openInHand. " | resizeFactor outerBox arrow resizedForm gradient | resizeFactor := 4. outerBox := RectangleMorph new extent: finalSizeInteger asPoint * resizeFactor; borderWidth: 0; color: aColor. + self gradientScrollBar ifTrue: [ - Preferences gradientScrollBars ifTrue: [ gradient := GradientFillStyle ramp: { 0 -> (Color gray: 0.95). 0.49 -> (Color gray: 0.9). 0.5 -> (Color gray: 0.87). 1 -> (Color gray: 0.93). }. gradient origin: outerBox topLeft. (aSymbolDirection == #left or:[aSymbolDirection == #right]) ifTrue:[gradient direction: 0@ outerBox height] ifFalse:[gradient direction: outerBox width @ 0]. outerBox fillStyle: gradient]. outerBox borderStyle: (BorderStyle width: 4 color: Color lightGray). "" arrow := self createArrowOfDirection: aSymbolDirection in: (outerBox bounds expandBy: -4). self updateScrollBarButtonAspect: arrow color: aColor muchDarker. outerBox addMorphCentered: arrow. "" resizedForm := outerBox imageForm magnify: outerBox imageForm boundingBox by: 1 / resizeFactor smoothing: 4. "" ^ (resizedForm replaceColor: aColor withColor: Color transparent) trimBordersOfColor: Color transparent! Item was changed: ----- Method: ScrollBar class>>createBoxOfSize:color: (in category 'images') ----- createBoxOfSize: finalSizeInteger color: aColor "PRIVATE - create a box with finalSizeInteger and aColor Try with: (ScrollBar createBoxOfSize: 32 color: Color lightGreen) asMorph openInHand. " | resizeFactor outerBox innerBox resizedForm gradient | resizeFactor := 4. outerBox := RectangleMorph new extent: finalSizeInteger asPoint * resizeFactor; borderWidth: 0; color: aColor. + self gradientScrollBar ifTrue: [ - Preferences gradientScrollBars ifTrue: [ gradient := GradientFillStyle ramp: { 0 -> (Color gray: 0.95). 0.49 -> (Color gray: 0.9). 0.5 -> (Color gray: 0.87). 1 -> (Color gray: 0.93). }. gradient origin: outerBox topLeft. gradient direction: outerBox width @ 0. outerBox fillStyle: gradient]. outerBox borderStyle: (BorderStyle width: 4 color: Color lightGray). "" innerBox := self createBoxIn: (outerBox bounds expandBy: -4). self updateScrollBarButtonAspect: innerBox color: aColor muchDarker. outerBox addMorphCentered: innerBox. "" resizedForm := outerBox imageForm magnify: outerBox imageForm boundingBox by: 1 / resizeFactor smoothing: 4. "" ^ (resizedForm replaceColor: aColor withColor: Color transparent) trimBordersOfColor: Color transparent! Item was added: + ----- Method: ScrollBar class>>gradientScrollBar (in category 'preferences') ----- + gradientScrollBar + + + ^ GradientScrollBar ifNil: [false]! Item was added: + ----- Method: ScrollBar class>>gradientScrollBar: (in category 'preferences') ----- + gradientScrollBar: aBoolean + + GradientScrollBar = aBoolean ifTrue: [^ self]. + GradientScrollBar := aBoolean. + + ScrollBar allSubInstancesDo: [:ea | ea updateSliderColor].! Item was changed: ----- Method: ScrollBar class>>updateScrollBarButtonAspect:color: (in category 'coloring morphs') ----- updateScrollBarButtonAspect: aMorph color: aColor "update aMorph with aColor" | fill direction | aMorph isNil ifTrue: [^ self]. "" aMorph color: aColor. + self gradientScrollBar - Preferences gradientScrollBars ifFalse: [^ self]. "" fill := GradientFillStyle ramp: { 0.0 -> aColor twiceLighter twiceLighter. 1.0 -> aColor twiceDarker}. "" direction := ((aMorph width min: aMorph height) + ((aMorph width - aMorph height) abs * 0.3)) rounded. "" fill origin: aMorph topLeft + (direction // 8). fill direction: direction @ direction. fill radial: true. "" aMorph fillStyle: fill! Item was changed: ----- Method: ScrollBar>>initializePagingArea (in category 'initialize') ----- initializePagingArea "Appearance" pagingArea := RectangleMorph newBounds: self totalSliderArea color: (self class roundedScrollBarLook ifTrue: [Color gray: 0.9] ifFalse: [Color r: 0.6 g: 0.6 b: 0.8]). + self class gradientScrollBar - Preferences gradientScrollBars ifTrue: [pagingArea setBorderWidth: 1 borderColor: (Color lightGray alpha: 0.5)] ifFalse: [pagingArea borderWidth: 0]. self addMorphBack: pagingArea. "Interactions" pagingArea on: #mouseDown send: #scrollPageInit: to: self. pagingArea on: #mouseUp send: #finishedScrolling to: self. ! Item was added: + ----- Method: ScrollBar>>updateSliderColor (in category 'access') ----- + updateSliderColor + + self updateSliderColor: self sliderColor.! Item was changed: ----- Method: ScrollBar>>updateSliderColor: (in category 'access') ----- updateSliderColor: aColor | gradient | + self class gradientScrollBar ifFalse: [ - Preferences gradientScrollBars ifFalse: [ slider borderColor: (aColor adjustBrightness: -0.3); color: aColor. pagingArea borderColor: (aColor muchDarker alpha: pagingArea borderStyle color alpha); color: (aColor darker alpha: 0.35). ^ self]. slider borderStyle: (BorderStyle width: 1 color: Color lightGray). "Fill the slider." gradient := GradientFillStyle ramp: { 0 -> (Color gray: 0.95). 0.49 -> (Color gray: 0.9). 0.5 -> (Color gray: 0.87). 1 -> (Color gray: 0.93). }. gradient origin: slider topLeft. gradient direction: (self orientation == #horizontal ifTrue:[0@slider height] ifFalse:[slider width@0]). slider fillStyle: gradient. "Fill the paging area." gradient := GradientFillStyle ramp: { 0 -> (Color gray: 0.65). 0.6 -> (Color gray: 0.82). 1 -> (Color gray: 0.88). }. gradient origin: self topLeft. gradient direction: (self orientation == #horizontal ifTrue:[0@self height] ifFalse:[self width@0]). pagingArea fillStyle: gradient.! From commits at source.squeak.org Thu Jul 28 09:58:50 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 09:58:52 2016 Subject: [squeak-dev] The Trunk: ReleaseBuilder-mt.137.mcz Message-ID: Marcel Taeumel uploaded a new version of ReleaseBuilder to project The Trunk: http://source.squeak.org/trunk/ReleaseBuilder-mt.137.mcz ==================== Summary ==================== Name: ReleaseBuilder-mt.137 Author: mt Time: 28 July 2016, 11:58:36.903147 am UUID: e71c47ca-4f2f-994b-9c92-f720cc2c0eb5 Ancestors: ReleaseBuilder-mt.136 Use pragma-style preference for gradient scroll bars. =============== Diff against ReleaseBuilder-mt.136 =============== Item was changed: ----- Method: ReleaseBuilder class>>setPreferences (in category 'scripts') ----- setPreferences "Preferences class defaultValueTableForCurrentRelease" " Preferences outOfTheBox." "<-- uncomment after #defaultValueTableForCurrentRelease is fixed up." "General User interaction" Preferences enable: #generalizedYellowButtonMenu ; enable: #swapMouseButtons; disable: #mouseOverForKeyboardFocus. Morph indicateKeyboardFocus: true. ToolBuilder openToolsAttachedToMouseCursor: false. SearchBar useScratchPad: false. "Text input." TextEditor autoEnclose: true ; autoIndent: true ; destructiveBackWord: false ; blinkingCursor: true ; dumbbellCursor: false. Preferences insertionPointColor: Color red. PluggableTextMorph simpleFrameAdornments: false. "Windows" Preferences installUniformWindowColors. SystemWindow reuseWindows: false. SystemWindow windowsActiveOnlyOnTop: true. Model windowActiveOnFirstClick: false. "Not good for 800x600" Preferences disable: #showSplitterHandles; enable: #fastDragWindowForMorphic. CornerGripMorph drawCornerResizeHandles: false. ProportionalSplitterMorph smartHorizontalSplitters: false ; smartVerticalSplitters: false. "Scroll bars." Preferences enable: #scrollBarsNarrow; enable: #scrollBarsOnRight; disable: #alwaysHideHScrollbar; disable: #alwaysShowHScrollbar; disable: #alwaysShowVScrollbar. ScrollBar scrollBarsWithoutArrowButtons: true; scrollBarsWithoutMenuButton: true. ScrollPane useRetractableScrollBars: false. "Rounded corners." Morph preferredCornerRadius: 6. SystemWindow roundedWindowCorners: false. PluggableButtonMorph roundedButtonCorners: false. FillInTheBlankMorph roundedDialogCorners: false. MenuMorph roundedMenuCorners: false. ScrollBar roundedScrollBarLook: false. "Gradients." + ScrollBar gradientScrollBar: false. - Preferences disable: #gradientScrollBars. SystemWindow gradientWindow: false. MenuMorph gradientMenu: false. PluggableButtonMorph gradientButton: false. "Shadows" Preferences enable: #menuAppearance3d. MenuMorph menuBorderWidth: 1; menuBorderColor: Color lightGray; menuLineColor: Color lightGray. Morph useSoftDropShadow: true.. "Lists and Trees" PluggableListMorph filterableLists: true; clearFilterAutomatically: false; highlightHoveredRow: true; menuRequestUpdatesSelection: true. PluggableTreeMorph filterByLabelsOnly: false; maximumSearchDepth: 1. LazyListMorph listSelectionTextColor: Color black; listSelectionColor: (Color r: 0.72 g: 0.72 b: 0.9). "Standard Tools" BalloonMorph balloonColor: (Color r: 0.92 g: 0.92 b: 0.706). Workspace shouldStyle: false. Browser listClassesHierarchically: true; showClassIcons: true; showMessageIcons: true; sortMessageCategoriesAlphabetically: true. Preferences enable: #annotationPanes; enable: #optionalButtons; enable: #diffsWithPrettyPrint; enable: #traceMessages; enable: #alternativeBrowseIt; enable: #menuWithIcons; enable: #visualExplorer. SystemNavigation thoroughSenders: true. Preferences disable: #debugLogTimestamp. "Halo" Preferences enable: #showBoundsInHalo ; disable: #alternateHandlesLook. "System" NetNameResolver enableIPv6: false. Scanner allowUnderscoreAsAssignment: true; prefAllowUnderscoreSelectors: true. "that's all, folks"! From commits at source.squeak.org Thu Jul 28 09:59:57 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 09:59:58 2016 Subject: [squeak-dev] The Trunk: System-mt.844.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.844.mcz ==================== Summary ==================== Name: System-mt.844 Author: mt Time: 28 July 2016, 11:59:33.417147 am UUID: 4f0b53df-2cca-de41-8e79-958da96f21ce Ancestors: System-mt.843 Remove old-style preference for gradient scroll bars. =============== Diff against System-mt.843 =============== Item was changed: ----- Method: Preferences class>>defaultValueTableForCurrentRelease (in category 'defaults') ----- defaultValueTableForCurrentRelease "Answer a table defining default values for all the preferences in the release. Returns a list of (pref-symbol, boolean-symbol) pairs" ^ #( (abbreviatedBrowserButtons false) (alternativeBrowseIt false) (annotationPanes false) (areaFillsAreTolerant false) (areaFillsAreVeryTolerant false) (automaticFlapLayout true) (automaticKeyGeneration false) (automaticPlatformSettings true) (automaticViewerPlacement true) (balloonHelpEnabled true) (balloonHelpInMessageLists false) (batchPenTrails false) (capitalizedReferences true) (caseSensitiveFinds false) (cautionBeforeClosing false) (changeSetVersionNumbers true) (checkForSlips true) (checkForUnsavedProjects true) (classicNavigatorEnabled false) (cmdDotEnabled true) (collapseWindowsInPlace false) (compactViewerFlaps false) (compressFlashImages false) (confirmFirstUseOfStyle true) (conversionMethodsAtFileOut false) (debugHaloHandle true) (debugPrintSpaceLog false) (debugShowDamage false) (decorateBrowserButtons true) (diffsInChangeList true) (diffsWithPrettyPrint false) (dismissAllOnOptionClose false) (dragNDropWithAnimation false) (eToyFriendly false) (eToyLoginEnabled false) (enableLocalSave true) (extractFlashInHighQuality true) (extractFlashInHighestQuality false) (fastDragWindowForMorphic true) (fenceEnabled true) (fullScreenLeavesDeskMargins true) (haloTransitions false) (higherPerformance false) (honorDesktopCmdKeys true) (includeSoundControlInNavigator false) (infiniteUndo false) (logDebuggerStackToFile true) (magicHalos false) (menuButtonInToolPane false) (menuColorFromWorld false) (menuKeyboardControl false) (modalColorPickers true) (mouseOverForKeyboardFocus false) (mouseOverHalos false) (mvcProjectsAllowed true) (navigatorOnLeftEdge true) (noviceMode false) (okToReinitializeFlaps true) (optionalButtons true) (passwordsOnPublish false) (personalizedWorldMenu true) (postscriptStoredAsEPS false) (projectViewsInWindows true) (projectZoom true) (projectsSentToDisk false) (propertySheetFromHalo false) (readDocumentAtStartup true) (restartAlsoProceeds false) (reverseWindowStagger true) (roundedMenuCorners true) (scrollBarsNarrow false) (scrollBarsOnRight true) - (gradientScrollBars true) (securityChecksEnabled false) (selectiveHalos false) (showBoundsInHalo false) (showDirectionForSketches false) (showDirectionHandles false) (showFlapsWhenPublishing false) (showProjectNavigator false) (showSecurityStatus true) (showSharedFlaps true) (signProjectFiles true) (simpleMenus false) (smartUpdating true) (startInUntrustedDirectory false) (systemWindowEmbedOK false) (tileTranslucentDrag true) (timeStampsInMenuTitles true) (turnOffPowerManager false) (twentyFourHourFileStamps true) (typeCheckingInTileScripting true) (uniTilesClassic true) (uniqueNamesInHalos false) (universalTiles false) (unlimitedPaintArea false) (useButtonPropertiesToFire false) (useUndo true) (viewersInFlaps true) (warnAboutInsecureContent true) (warnIfNoChangesFile true) (warnIfNoSourcesFile true)) " Preferences defaultValueTableForCurrentRelease do: [:pair | (Preferences preferenceAt: pair first ifAbsent: [nil]) ifNotNilDo: [:pref | pref defaultValue: (pair last == true)]]. Preferences chooseInitialSettings. "! Item was removed: - ----- Method: Preferences class>>gradientScrollBars (in category 'standard queries') ----- - gradientScrollBars - ^ self - valueOfFlag: #gradientScrollBars - ifAbsent: [ true ]! Item was changed: + (PackageInfo named: 'System') postscript: 'Preferences removePreference: #roundedWindowCorners. + Preferences removePreference: #gradientScrollBars.'! - (PackageInfo named: 'System') postscript: 'Preferences removePreference: #roundedWindowCorners.'! From commits at source.squeak.org Thu Jul 28 11:14:06 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 11:14:08 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1203.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1203.mcz ==================== Summary ==================== Name: Morphic-mt.1203 Author: mt Time: 28 July 2016, 1:13:25.393105 pm UUID: c1d37e3b-d0d3-8542-88d3-1d50d513eb9d Ancestors: Morphic-mt.1202 Cleans up window refreshing code. Fixes a bug that recreated the close box for windows that where uncloseable. =============== Diff against Morphic-mt.1202 =============== Item was changed: ----- Method: SystemWindow class>>clickOnLabelToEdit: (in category 'preferences') ----- clickOnLabelToEdit: aBoolean ClickOnLabelToEdit := aBoolean. + self refreshAllWindows.! - self rebuildAllWindowLabels.! Item was changed: ----- Method: SystemWindow class>>doubleClickOnLabelToExpand: (in category 'preferences') ----- doubleClickOnLabelToExpand: aBoolean DoubleClickOnLabelToExpand := aBoolean. + self refreshAllWindows. - self rebuildAllWindowLabels. ! Item was changed: ----- Method: SystemWindow class>>moveMenuButtonRight: (in category 'preferences') ----- moveMenuButtonRight: aBoolean | absLeftOffset | absLeftOffset := ((self hideExpandButton and: [aBoolean]) ifTrue: [absLeftOffset := self boxExtent x * 2] ifFalse: [absLeftOffset := self boxExtent x]) + 3. self menuBoxFrame leftOffset: (aBoolean ifTrue: [absLeftOffset negated] ifFalse: [absLeftOffset]). + self refreshAllWindows.! - self rebuildAllWindowLabels.! Item was removed: - ----- Method: SystemWindow class>>rebuildAllWindowLabels (in category 'private') ----- - rebuildAllWindowLabels - - self withAllSubclasses do: [:c | c allInstances do: [:w | w replaceBoxes]].! Item was changed: ----- Method: SystemWindow class>>refreshAllWindows (in category 'initializing') ----- refreshAllWindows "If there is some prominent UI change, use this method to update all open windows." SystemWindow allSubInstances do: [:w | w + replaceBoxes; setDefaultParameters; refreshWindowColor].! Item was changed: ----- Method: SystemWindow>>addCloseBox (in category 'initialization') ----- addCloseBox "If I have a labelArea, add a close box to it" + labelArea ifNil: [^ self]. + mustNotClose == true ifTrue: [^ self]. - labelArea - ifNil: [^ self]. closeBox ifNotNil: [closeBox delete]. closeBox := self createCloseBox. closeBox layoutFrame: self class closeBoxFrame. labelArea addMorphFront: closeBox! From commits at source.squeak.org Thu Jul 28 11:16:10 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 11:16:12 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1204.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1204.mcz ==================== Summary ==================== Name: Morphic-mt.1204 Author: mt Time: 28 July 2016, 1:15:31.997105 pm UUID: 3969d0bd-e244-6d44-94e2-da5263abe41a Ancestors: Morphic-mt.1203 Fixes some code that is used when refreshing the window colors after a preference change. =============== Diff against Morphic-mt.1203 =============== Item was changed: ----- Method: SystemWindow>>refreshWindowColor (in category 'colors') ----- refreshWindowColor "For changing the underlying model's default window color" self setProperty: #paneColor toValue: nil. self setWindowColor: self paneColor. + self isLookingFocused + ifTrue: [self lookUnfocused; lookFocused] + ifFalse: [self lookFocused; lookUnfocused].! - "Reset colors if we are not active." - self isKeyWindow ifFalse: [ - self paneColorToUseWhenNotActive in: [:c | - self - setStripeColorsFrom: c; - adoptPaneColor: c]].! From commits at source.squeak.org Thu Jul 28 13:40:01 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 13:40:02 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1205.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1205.mcz ==================== Summary ==================== Name: Morphic-mt.1205 Author: mt Time: 28 July 2016, 3:39:20.355087 pm UUID: aa6ba894-8f4a-344e-8506-25c7e6418266 Ancestors: Morphic-mt.1204 Provide a simple interface to avoid display updates. For example, if you change a bunch of things in, say, the PluggableButtonMorph and you happen to have one visible on the screen, transcripts or system progress bars will trigger visual updates at a time when code is in an inconsistent state. =============== Diff against Morphic-mt.1204 =============== Item was added: + ----- Method: MorphicProject>>noDisplayDuring: (in category 'display') ----- + noDisplayDuring: block + + self world noDisplayDuring: block.! Item was changed: ----- Method: PasteUpMorph>>displayWorld (in category 'world state') ----- displayWorld + (self valueOfProperty: #shouldDisplayWorld ifAbsent: [true]) + ifTrue: [worldState displayWorld: self submorphs: submorphs].! - worldState displayWorld: self submorphs: submorphs.! Item was added: + ----- Method: PasteUpMorph>>noDisplayDuring: (in category 'world state') ----- + noDisplayDuring: block + "Some morphs insist on updating the display like the system progress bar does. However, some code might be in an inconsistent state. For this, you can use this method to be safe." + + self + setProperty: #shouldDisplayWorld + toValue: false. + + block ensure: [self removeProperty: #shouldDisplayWorld].! Item was changed: ----- Method: PasteUpMorph>>restoreMorphicDisplay (in category 'world state') ----- restoreMorphicDisplay + self removeProperty: #shouldDisplayWorld. - ThumbnailMorph recursionReset. + ThumbnailMorph recursionReset. + self extent: Display extent; viewBox: Display boundingBox; handsDo: [:h | h visible: true; showTemporaryCursor: nil]; restoreFlapsDisplay; restoreMainDockingBarDisplay; fullRepaintNeeded. WorldState addDeferredUIMessage: [Cursor normal show]. ! From commits at source.squeak.org Thu Jul 28 13:41:04 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 13:41:06 2016 Subject: [squeak-dev] The Trunk: System-mt.845.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.845.mcz ==================== Summary ==================== Name: System-mt.845 Author: mt Time: 28 July 2016, 3:40:31.153087 pm UUID: 0a96d066-bdea-2845-abeb-2adcc248dd29 Ancestors: System-mt.844 Also add the generic hook to avoid display updates to all project kinds. =============== Diff against System-mt.844 =============== Item was added: + ----- Method: Project>>noDisplayDuring: (in category 'displaying') ----- + noDisplayDuring: block + "Projects can provide means to bypass screen updates so that graphics code can be updated safely."! From Marcel.Taeumel at hpi.de Thu Jul 28 13:14:31 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Jul 28 13:58:53 2016 Subject: [squeak-dev] [ANN] Widget Refactorings & UI Themes for Squeak Message-ID: <1469711671857-4908439.post@n4.nabble.com> Hi, there! :-) TL;DR: Here is a SAR file that cleans up the code of all widget classes such as lists and buttons in your image and adds support for UI theming as well as a bunch of UI themes (choose Themes via "Extras > Themes & Colors"): squeak_trunk_uitheme_v12.sar Here is a preview: http://i.giphy.com/l46CcX46yRE9H6yQ0.gif *Try it out. Report bugs. Report performance issues!!* We will commit the changes to trunk this Saturday. Btw: The SAR installer is compatible with Eliot's current working image. ;o) And there are numerous open windows and projects in that image...^^ ========================================== 0. The Long History of Squeak & UI Theming ========================================== ... http://forum.world.st/Dark-theme-td4869082.html http://forum.world.st/Themes-for-Squeak-5-1-td4882848.html http://forum.world.st/Skylark-Theme-and-Squeak-3-9-td54720.html http://forum.world.st/Non-SmallLand-colour-theme-lying-around-td4697438.html#a4697446 ... ======================== 1. User Interface Themes ======================== Chris, Karl, and I designed a very lightweight abstraction to support UI themes in Squeak. You can find the whole implementation in the class UserInterfaceTheme and a bunch of tests in UserInterfaceThemeTests. An object that wants to support theming SHOULD (!) implement three methods: MyFancyClass class >> #themeProperties MyFancyClass >> #applyUserInterfaceTheme MyFancyClass >> #canApplyUserInterfaceTheme It also MUST (!) access the current UI theme when setting visual state. And here comes the nice part: ... self color: (self userInterfaceTheme color ifNil: [Color white]). ... Remember, usually you would write something like this: ... self color: Color white. ... How can this work? It works by using #doesNotUnderstand: and trigger a dynamic lookup in a dictionary inside the current theme: Object >> #userInterfaceTheme ^ UserInterfaceTheme current pushScope: self; yourself UserInterfaceTheme >> #doesNotUnderstand: aMessage ... ^ [self get: scope top class -> aMessage selector] ensure: [scope pop] Isn't this slow? No, not at all. If you have any doubts, try benching it on your machine: UserInterfaceThemeTestObject benchLookup. On my machine, this is even fast enough to support theme lookups in frequently called messages such as Morph >> #drawOn:. However, applications are advised to cache. That's why we have the explicit #applyUserInterfaceTheme callbacks as described above. Note that amazing effects can be achieved by adjusting #color, #borderColor, #borderWidth, #fillStyle, and fonts. :-) The existing themes do exactly that. To get a feeling of the impact of having themes in Squeak, try browsing senders and implementors of #applyUserInterfaceTheme, #themeProperties, #userInterfaceTheme, and maybe #canApplyUserInterfaceTheme. I think we can still reduce the number of sends to #userInterfaceTheme a little more. ================================== 2. Code clean-up in widget classes ================================== We made Shout look up the current theme to build its internal cache of text attributes to quickly style code as you type it. We removed window color specifications and replaced them by simply implementing Model >> #defaultWindowColor. There is also still the #uniformWindowColor if you do not like colorful windows. This makes it also much easier for new applications to have their own window color. We unified the implementation of MenuMorph and DockingBarMorph and fixed several bugs there. Dialogs! *phew* ... *arrrrgss* ... Dialogs. :-) We managed to introduce a general DialogWindow class. FillInTheBlankMorph and UserDialogBoxMorph are now mere subclasses with a custom interface. There is also support for ToolBuilder, see ListChooser for an example. *yay* Buttons feel more like buttons now. It's a good thing, right? For lists and trees and text boxes, we greatly reduced the amount of code that just accessed global state. LazyListMorph, NewParagraph, TextMorph, IndentingListItemMorph, ... they all now get configured by their "hosts", which are PluggableListMorph, PluggableTextMorph, and SimpleHierarchicalListMorph. Having this, we improved the modular structure of our whole Squeak widget library. That modular structure made applying themes much easier. :-) ======================== 3. Theme all the widgets ======================== There is a nice existing pattern with the message #setDefaultParameters, which is usually called from #initialize. Go, see for yourself. Browse implementors of #setDefaultParameters. We used that pattern and cleaned up many implementations of that message in the image. Note that rounded corners, gradients, colorful windows, and shadows are still preferences outside of UI themes. You can toggle them in any UI theme. Note that the background color/image is also not subject to be themed. Just drop your favorite picture or pattern in the image. It's really easy. Now, take a look at the class SqueakTheme. There, you will find source code for creating the default Squeak theme to be shared via SqueakSource and reset during the release building process. :-) Besides get/set/clear -- which might be expected from the theme structure because it is basically a dictionary with some properties -- There, you will notice a "merge" or "link" or "derive". When creating themes programmatically, you can: - derive properties from other properties - link themes to extend property look-up - merge one theme into another theme How does property look-up work? Well, see UserInterfaceTheme >> #get: 1. Look up the key, which is usually "Class -> symbol". 2. Try the superclass chain. 3. Try the same lookup in the linked theme if any. Theoretically, you could actually implement messages in subclasses of UserInterfaceTheme and bypass that DNU-triggered lookup. We do not do this right now. As you can see, Squeak/Smalltalk offers a great deal of flexibility. It is remains subject to discussion of how to employ the language and its semantics. Think of the current implementation of user interface themes as one way that represents a trade-off between a concise programming interface (i.e. ... self userInterfaceTheme color ifNil ...), a fair amount of comprehensive patterns (i.e. #setDefaultParameters, #applyUserInterfaceTheme, ...), and some other existing constraints (i.e. old code, Monticello/Squeaksource, existing tools such as senders/implementors, ...). Happy Squeaking! Marcel, Chris, Karl -- View this message in context: http://forum.world.st/ANN-Widget-Refactorings-UI-Themes-for-Squeak-tp4908439.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Thu Jul 28 14:53:21 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 14:53:23 2016 Subject: [squeak-dev] The Trunk: System-tfel.846.mcz Message-ID: Tim Felgentreff uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-tfel.846.mcz ==================== Summary ==================== Name: System-tfel.846 Author: tfel Time: 28 July 2016, 4:52:57.324263 pm UUID: 7f191604-b02d-4e48-946a-9001cd9c6480 Ancestors: System-mt.845 various fixes for locale support =============== Diff against System-mt.845 =============== Item was changed: ----- Method: GetTextTranslator class>>availableLanguageLocaleIDs (in category 'accessing') ----- availableLanguageLocaleIDs "GetTextTranslator availableLanguageLocaleIDs" | ids dirs localeDirForLang directoryNames | ids := Set new. dirs := Set new. dirs addAll: LocaleDirsForDomain values. dirs addAll: self defaultLocaleDirs. dirs do: [:dir | | localesDir | localesDir := FileDirectory on: dir. directoryNames := [localesDir directoryNames] on: InvalidDirectoryError do: [:e | #()]. directoryNames do: [:langDirName | | localeID | localeID := LocaleID posixName: langDirName. localeDirForLang := localesDir directoryNamed: (self langDirNameForLocaleID: localeID). localeDirForLang ifNotNil: [ + (localeDirForLang fileNamesMatching: '*.mo') ifNotEmpty: [ids add: localeID]]. + localeID hasParent ifTrue: [ + localeDirForLang := localesDir directoryNamed: (self langDirNameForLocaleID: localeID parent). + localeDirForLang ifNotNil: [ + (localeDirForLang fileNamesMatching: '*.mo') ifNotEmpty: [ids add: localeID parent]]]. - (localeDirForLang fileNamesMatching: '*.mo') ifNotEmpty: [ids add: localeID] - ] ]. ]. ^ids! Item was changed: ----- Method: LocaleID class>>posixName: (in category 'instance creation') ----- posixName: aString ^ self + isoString: (aString copyReplaceAll: '_' with: '-')! - isoString: (aString copyReplaceAll: ':=' with: '-')! Item was changed: ----- Method: LocaleID>>displayName (in category 'accessing') ----- displayName "Answer a proper name to represent the receiver in GUI. The wording is provided by translations of the magic value ''. 'English' -> 'English' 'German' -> 'Deutsch' " | magicPhrase translatedMagicPhrase | magicPhrase := ''. + translatedMagicPhrase := NaturalLanguageTranslator translateWithoutLoading: magicPhrase toLocaleID: self. - translatedMagicPhrase := GetTextTranslator translateWithoutLoading: magicPhrase toLocaleID: self. ^ translatedMagicPhrase = magicPhrase ifTrue: [self displayLanguage] ifFalse: [translatedMagicPhrase]! Item was added: + ----- Method: LocaleID>>isoCountry: (in category 'accessing') ----- + isoCountry: aValue + + isoCountry := aValue! Item was changed: ----- Method: LocaleID>>parent (in category 'accessing') ----- parent + ^ (self class + isoLanguage: self isoLanguage) + isoCountry: nil; + yourself! - ^self class isoLanguage: self isoLanguage! Item was changed: ----- Method: LocaleID>>posixName (in category 'printing') ----- posixName "(LocaleID isoString: 'es-MX') posixName" "(LocaleID isoString: 'es') posixName" "language[_territory]" ^ self isoCountry ifNil: [self isoLanguage] + ifNotNil: [self isoLanguage , '_' , self isoCountry]! - ifNotNil: [self isoLanguage , ':=' , self isoCountry]! Item was changed: ----- Method: Object>>localeChanged (in category '*System-Localization-locales') ----- localeChanged + "Can react to changed locales"! - self shouldBeImplemented! From cunningham.cb at gmail.com Thu Jul 28 14:59:28 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Thu Jul 28 14:59:32 2016 Subject: [squeak-dev] [ANN] Widget Refactorings & UI Themes for Squeak In-Reply-To: <1469711671857-4908439.post@n4.nabble.com> References: <1469711671857-4908439.post@n4.nabble.com> Message-ID: Hi. First, a warning for other using this sar - it applies updates before loading. So, if you are on trunk, you will be updated to the latest trunk. Mostly that should be ok. Second, if you have a LOT of open windows, the image will appear to seize up briefly at one point during load. It isn't frozen - it is just applying the theme to all open windows. (I have 47 open windows - takes a bit of time). Changing themes (with my 47 open windows) takes about 9 seconds. Changing themes works - mostly. It appears to just change the thematic elements that are visible at the time of theme changing. What is mean is, if you have a window minimized, then the contents of that window will not change to the new theme, but will stay with the old theme (at least, the colors do). This may not be an issue for folks with a reasonably small number of windows open, of course. As a side effect, it is possible to mix themes this way. I'll run with it today, and report any issues, although I doubt I'll see many more. -cbc On Thu, Jul 28, 2016 at 6:14 AM, marcel.taeumel wrote: > Hi, there! :-) > > TL;DR: Here is a SAR file that cleans up the code of all widget classes > such > as lists and buttons in your image and adds support for UI theming as well > as a bunch of UI themes (choose Themes via "Extras > Themes & Colors"): > squeak_trunk_uitheme_v12.sar > > > Here is a preview: > http://i.giphy.com/l46CcX46yRE9H6yQ0.gif > > *Try it out. Report bugs. Report performance issues!!* We will commit the > changes to trunk this Saturday. > > Btw: The SAR installer is compatible with Eliot's current working image. > ;o) > And there are numerous open windows and projects in that image...^^ > > > ========================================== > 0. The Long History of Squeak & UI Theming > ========================================== > > ... > http://forum.world.st/Dark-theme-td4869082.html > http://forum.world.st/Themes-for-Squeak-5-1-td4882848.html > http://forum.world.st/Skylark-Theme-and-Squeak-3-9-td54720.html > > http://forum.world.st/Non-SmallLand-colour-theme-lying-around-td4697438.html#a4697446 > ... > > > ======================== > 1. User Interface Themes > ======================== > > Chris, Karl, and I designed a very lightweight abstraction to support UI > themes in Squeak. You can find the whole implementation in the class > UserInterfaceTheme and a bunch of tests in UserInterfaceThemeTests. > > An object that wants to support theming SHOULD (!) implement three methods: > > MyFancyClass class >> #themeProperties > MyFancyClass >> #applyUserInterfaceTheme > MyFancyClass >> #canApplyUserInterfaceTheme > > It also MUST (!) access the current UI theme when setting visual state. And > here comes the nice part: > > ... > self color: (self userInterfaceTheme color ifNil: [Color white]). > ... > > Remember, usually you would write something like this: > > ... > self color: Color white. > ... > > How can this work? It works by using #doesNotUnderstand: and trigger a > dynamic lookup in a dictionary inside the current theme: > > Object >> #userInterfaceTheme > ^ UserInterfaceTheme current > pushScope: self; > yourself > > UserInterfaceTheme >> #doesNotUnderstand: aMessage > ... > ^ [self get: scope top class -> aMessage selector] > ensure: [scope pop] > > Isn't this slow? No, not at all. If you have any doubts, try benching it on > your machine: > > UserInterfaceThemeTestObject benchLookup. > > On my machine, this is even fast enough to support theme lookups in > frequently called messages such as Morph >> #drawOn:. However, applications > are advised to cache. That's why we have the explicit > #applyUserInterfaceTheme callbacks as described above. > > Note that amazing effects can be achieved by adjusting #color, > #borderColor, > #borderWidth, #fillStyle, and fonts. :-) The existing themes do exactly > that. > > To get a feeling of the impact of having themes in Squeak, try browsing > senders and implementors of #applyUserInterfaceTheme, #themeProperties, > #userInterfaceTheme, and maybe #canApplyUserInterfaceTheme. I think we can > still reduce the number of sends to #userInterfaceTheme a little more. > > > ================================== > 2. Code clean-up in widget classes > ================================== > > We made Shout look up the current theme to build its internal cache of text > attributes to quickly style code as you type it. > > We removed window color specifications and replaced them by simply > implementing Model >> #defaultWindowColor. There is also still the > #uniformWindowColor if you do not like colorful windows. This makes it also > much easier for new applications to have their own window color. > > We unified the implementation of MenuMorph and DockingBarMorph and fixed > several bugs there. > > Dialogs! *phew* ... *arrrrgss* ... Dialogs. :-) We managed to introduce a > general DialogWindow class. FillInTheBlankMorph and UserDialogBoxMorph are > now mere subclasses with a custom interface. There is also support for > ToolBuilder, see ListChooser for an example. *yay* > > Buttons feel more like buttons now. It's a good thing, right? > > For lists and trees and text boxes, we greatly reduced the amount of code > that just accessed global state. LazyListMorph, NewParagraph, TextMorph, > IndentingListItemMorph, ... they all now get configured by their "hosts", > which are PluggableListMorph, PluggableTextMorph, and > SimpleHierarchicalListMorph. Having this, we improved the modular structure > of our whole Squeak widget library. That modular structure made applying > themes much easier. :-) > > > ======================== > 3. Theme all the widgets > ======================== > > There is a nice existing pattern with the message #setDefaultParameters, > which is usually called from #initialize. Go, see for yourself. Browse > implementors of #setDefaultParameters. We used that pattern and cleaned up > many implementations of that message in the image. > > Note that rounded corners, gradients, colorful windows, and shadows are > still preferences outside of UI themes. You can toggle them in any UI > theme. > > Note that the background color/image is also not subject to be themed. Just > drop your favorite picture or pattern in the image. It's really easy. > > Now, take a look at the class SqueakTheme. There, you will find source code > for creating the default Squeak theme to be shared via SqueakSource and > reset during the release building process. :-) > > Besides get/set/clear -- which might be expected from the theme structure > because it is basically a dictionary with some properties -- There, you > will > notice a "merge" or "link" or "derive". When creating themes > programmatically, you can: > - derive properties from other properties > - link themes to extend property look-up > - merge one theme into another theme > > How does property look-up work? Well, see UserInterfaceTheme >> #get: > 1. Look up the key, which is usually "Class -> symbol". > 2. Try the superclass chain. > 3. Try the same lookup in the linked theme if any. > > Theoretically, you could actually implement messages in subclasses of > UserInterfaceTheme and bypass that DNU-triggered lookup. We do not do this > right now. > > As you can see, Squeak/Smalltalk offers a great deal of flexibility. It is > remains subject to discussion of how to employ the language and its > semantics. Think of the current implementation of user interface themes as > one way that represents a trade-off between a concise programming interface > (i.e. ... self userInterfaceTheme color ifNil ...), a fair amount of > comprehensive patterns (i.e. #setDefaultParameters, > #applyUserInterfaceTheme, ...), and some other existing constraints (i.e. > old code, Monticello/Squeaksource, existing tools such as > senders/implementors, ...). > > Happy Squeaking! > > Marcel, Chris, Karl > > > > -- > View this message in context: > http://forum.world.st/ANN-Widget-Refactorings-UI-Themes-for-Squeak-tp4908439.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160728/3d2055f9/attachment.htm From karlramberg at gmail.com Thu Jul 28 15:01:10 2016 From: karlramberg at gmail.com (karl ramberg) Date: Thu Jul 28 15:01:14 2016 Subject: [squeak-dev] [ANN] Widget Refactorings & UI Themes for Squeak In-Reply-To: <1469711671857-4908439.post@n4.nabble.com> References: <1469711671857-4908439.post@n4.nabble.com> Message-ID: Yay, Marcel! Best, Karl On Thu, Jul 28, 2016 at 3:14 PM, marcel.taeumel wrote: > Hi, there! :-) > > TL;DR: Here is a SAR file that cleans up the code of all widget classes > such > as lists and buttons in your image and adds support for UI theming as well > as a bunch of UI themes (choose Themes via "Extras > Themes & Colors"): > squeak_trunk_uitheme_v12.sar > > > Here is a preview: > http://i.giphy.com/l46CcX46yRE9H6yQ0.gif > > *Try it out. Report bugs. Report performance issues!!* We will commit the > changes to trunk this Saturday. > > Btw: The SAR installer is compatible with Eliot's current working image. > ;o) > And there are numerous open windows and projects in that image...^^ > > > ========================================== > 0. The Long History of Squeak & UI Theming > ========================================== > > ... > http://forum.world.st/Dark-theme-td4869082.html > http://forum.world.st/Themes-for-Squeak-5-1-td4882848.html > http://forum.world.st/Skylark-Theme-and-Squeak-3-9-td54720.html > > http://forum.world.st/Non-SmallLand-colour-theme-lying-around-td4697438.html#a4697446 > ... > > > ======================== > 1. User Interface Themes > ======================== > > Chris, Karl, and I designed a very lightweight abstraction to support UI > themes in Squeak. You can find the whole implementation in the class > UserInterfaceTheme and a bunch of tests in UserInterfaceThemeTests. > > An object that wants to support theming SHOULD (!) implement three methods: > > MyFancyClass class >> #themeProperties > MyFancyClass >> #applyUserInterfaceTheme > MyFancyClass >> #canApplyUserInterfaceTheme > > It also MUST (!) access the current UI theme when setting visual state. And > here comes the nice part: > > ... > self color: (self userInterfaceTheme color ifNil: [Color white]). > ... > > Remember, usually you would write something like this: > > ... > self color: Color white. > ... > > How can this work? It works by using #doesNotUnderstand: and trigger a > dynamic lookup in a dictionary inside the current theme: > > Object >> #userInterfaceTheme > ^ UserInterfaceTheme current > pushScope: self; > yourself > > UserInterfaceTheme >> #doesNotUnderstand: aMessage > ... > ^ [self get: scope top class -> aMessage selector] > ensure: [scope pop] > > Isn't this slow? No, not at all. If you have any doubts, try benching it on > your machine: > > UserInterfaceThemeTestObject benchLookup. > > On my machine, this is even fast enough to support theme lookups in > frequently called messages such as Morph >> #drawOn:. However, applications > are advised to cache. That's why we have the explicit > #applyUserInterfaceTheme callbacks as described above. > > Note that amazing effects can be achieved by adjusting #color, > #borderColor, > #borderWidth, #fillStyle, and fonts. :-) The existing themes do exactly > that. > > To get a feeling of the impact of having themes in Squeak, try browsing > senders and implementors of #applyUserInterfaceTheme, #themeProperties, > #userInterfaceTheme, and maybe #canApplyUserInterfaceTheme. I think we can > still reduce the number of sends to #userInterfaceTheme a little more. > > > ================================== > 2. Code clean-up in widget classes > ================================== > > We made Shout look up the current theme to build its internal cache of text > attributes to quickly style code as you type it. > > We removed window color specifications and replaced them by simply > implementing Model >> #defaultWindowColor. There is also still the > #uniformWindowColor if you do not like colorful windows. This makes it also > much easier for new applications to have their own window color. > > We unified the implementation of MenuMorph and DockingBarMorph and fixed > several bugs there. > > Dialogs! *phew* ... *arrrrgss* ... Dialogs. :-) We managed to introduce a > general DialogWindow class. FillInTheBlankMorph and UserDialogBoxMorph are > now mere subclasses with a custom interface. There is also support for > ToolBuilder, see ListChooser for an example. *yay* > > Buttons feel more like buttons now. It's a good thing, right? > > For lists and trees and text boxes, we greatly reduced the amount of code > that just accessed global state. LazyListMorph, NewParagraph, TextMorph, > IndentingListItemMorph, ... they all now get configured by their "hosts", > which are PluggableListMorph, PluggableTextMorph, and > SimpleHierarchicalListMorph. Having this, we improved the modular structure > of our whole Squeak widget library. That modular structure made applying > themes much easier. :-) > > > ======================== > 3. Theme all the widgets > ======================== > > There is a nice existing pattern with the message #setDefaultParameters, > which is usually called from #initialize. Go, see for yourself. Browse > implementors of #setDefaultParameters. We used that pattern and cleaned up > many implementations of that message in the image. > > Note that rounded corners, gradients, colorful windows, and shadows are > still preferences outside of UI themes. You can toggle them in any UI > theme. > > Note that the background color/image is also not subject to be themed. Just > drop your favorite picture or pattern in the image. It's really easy. > > Now, take a look at the class SqueakTheme. There, you will find source code > for creating the default Squeak theme to be shared via SqueakSource and > reset during the release building process. :-) > > Besides get/set/clear -- which might be expected from the theme structure > because it is basically a dictionary with some properties -- There, you > will > notice a "merge" or "link" or "derive". When creating themes > programmatically, you can: > - derive properties from other properties > - link themes to extend property look-up > - merge one theme into another theme > > How does property look-up work? Well, see UserInterfaceTheme >> #get: > 1. Look up the key, which is usually "Class -> symbol". > 2. Try the superclass chain. > 3. Try the same lookup in the linked theme if any. > > Theoretically, you could actually implement messages in subclasses of > UserInterfaceTheme and bypass that DNU-triggered lookup. We do not do this > right now. > > As you can see, Squeak/Smalltalk offers a great deal of flexibility. It is > remains subject to discussion of how to employ the language and its > semantics. Think of the current implementation of user interface themes as > one way that represents a trade-off between a concise programming interface > (i.e. ... self userInterfaceTheme color ifNil ...), a fair amount of > comprehensive patterns (i.e. #setDefaultParameters, > #applyUserInterfaceTheme, ...), and some other existing constraints (i.e. > old code, Monticello/Squeaksource, existing tools such as > senders/implementors, ...). > > Happy Squeaking! > > Marcel, Chris, Karl > > > > -- > View this message in context: > http://forum.world.st/ANN-Widget-Refactorings-UI-Themes-for-Squeak-tp4908439.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160728/28476a2c/attachment.htm From commits at source.squeak.org Thu Jul 28 15:07:35 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 15:07:36 2016 Subject: [squeak-dev] The Trunk: Graphics-tfel.356.mcz Message-ID: Tim Felgentreff uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-tfel.356.mcz ==================== Summary ==================== Name: Graphics-tfel.356 Author: tfel Time: 28 July 2016, 5:07:03.284263 pm UUID: 563a9dfa-5c42-b44a-8122-dbb5f553f5c4 Ancestors: Graphics-tfel.355 add a preference for bigger cursors (from etoys) and fix fallback for CursorWithAlpha for systems that do not support 32-bit cursors with alpha =============== Diff against Graphics-tfel.355 =============== Item was changed: Form subclass: #Cursor instanceVariableNames: '' + classVariableNames: 'BlankCursor BottomLeftCursor BottomRightCursor CornerCursor CrossHairCursor CurrentCursor DownCursor MarkerCursor MenuCursor MoveCursor NormalCursor OriginCursor ReadCursor ResizeLeftCursor ResizeTopCursor ResizeTopLeftCursor ResizeTopRightCursor RightArrowCursor SquareCursor TargetCursor TopLeftCursor TopRightCursor UpCursor UseBiggerCursors WaitCursor WebLinkCursor WriteCursor XeqCursor' - classVariableNames: 'BlankCursor BottomLeftCursor BottomRightCursor CornerCursor CrossHairCursor CurrentCursor DownCursor MarkerCursor MenuCursor MoveCursor NormalCursor OriginCursor ReadCursor ResizeLeftCursor ResizeTopCursor ResizeTopLeftCursor ResizeTopRightCursor RightArrowCursor SquareCursor TargetCursor TopLeftCursor TopRightCursor UpCursor WaitCursor WebLinkCursor WriteCursor XeqCursor' poolDictionaries: '' category: 'Graphics-Display Objects'! !Cursor commentStamp: '' prior: 0! I am a Form that is a possible appearance for a mouse cursor. My size is always 16x16, ever since the original implementation on the Alto. There are many examples available in the "current cursor" category of class methods. For example, "Cursor normal" and "Cursor wait". For example: Cursor wait show ! Item was changed: ----- Method: Cursor class>>currentCursor: (in category 'current cursor') ----- currentCursor: aCursor "Make the instance of cursor, aCursor, be the current cursor. Display it. Create an error if the argument is not a Cursor." (aCursor isKindOf: self) ifTrue: [CurrentCursor := aCursor. + self useBiggerCursors + ifTrue: [[^ aCursor asBigCursor beCursor] + on: Error do: ["fall through"]]. aCursor beCursor] ifFalse: [self error: 'The new cursor must be an instance of class Cursor']! Item was added: + ----- Method: Cursor class>>useBiggerCursors (in category 'preferences') ----- + useBiggerCursors + + + ^ UseBiggerCursors ifNil: [false]! Item was added: + ----- Method: Cursor class>>useBiggerCursors: (in category 'preferences') ----- + useBiggerCursors: aBool + + UseBiggerCursors := aBool! Item was added: + ----- Method: Cursor>>asBigCursor (in category 'converting') ----- + asBigCursor + "Big cursors are 32 bits deep (ARGB premultiplied)" + depth = 32 + ifFalse: [^self enlargedBy: 2]. + ^self! Item was added: + ----- Method: Cursor>>enlargedBy: (in category 'converting') ----- + enlargedBy: scale + "Big cursors are 32 bits deep (ARGB premultiplied)" + | big | + scale = 1 ifTrue: [^self]. + big := CursorWithAlpha extent: self extent * scale depth: 32. + (self asCursorForm magnifyBy: scale) displayOn: big. + big offset: (self offset - 0.5 * scale min: 0@0 max: big extent negated) asIntegerPoint. + big fallback: self. + ^big! Item was added: + ----- Method: CursorWithAlpha>>beCursor (in category 'primitives') ----- + beCursor + + self fallback beCursor! Item was removed: - ----- Method: CursorWithAlpha>>primBeCursor (in category 'primitives') ----- - primBeCursor - - self fallback primBeCursor! From Marcel.Taeumel at hpi.de Thu Jul 28 14:49:16 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Jul 28 15:33:37 2016 Subject: [squeak-dev] Re: [ANN] Widget Refactorings & UI Themes for Squeak In-Reply-To: References: <1469711671857-4908439.post@n4.nabble.com> Message-ID: <1469717356456-4908467.post@n4.nabble.com> cbc wrote > Hi. > > First, a warning for other using this sar - it applies updates before > loading. So, if you are on trunk, you will be updated to the latest > trunk. Mostly that should be ok. > > Second, if you have a LOT of open windows, the image will appear to seize > up briefly at one point during load. It isn't frozen - it is just > applying > the theme to all open windows. (I have 47 open windows - takes a bit of > time). > > Changing themes (with my 47 open windows) takes about 9 seconds. > > Changing themes works - mostly. It appears to just change the thematic > elements that are visible at the time of theme changing. What is mean is, > if you have a window minimized, then the contents of that window will not > change to the new theme, but will stay with the old theme (at least, the > colors do). This may not be an issue for folks with a reasonably small > number of windows open, of course. > > As a side effect, it is possible to mix themes this way. > > I'll run with it today, and report any issues, although I doubt I'll see > many more. > > -cbc > > On Thu, Jul 28, 2016 at 6:14 AM, marcel.taeumel < > Marcel.Taeumel@ > > > wrote: > >> Hi, there! :-) >> >> TL;DR: Here is a SAR file that cleans up the code of all widget classes >> such >> as lists and buttons in your image and adds support for UI theming as >> well >> as a bunch of UI themes (choose Themes via "Extras > Themes & Colors"): >> squeak_trunk_uitheme_v12.sar >> <http://forum.world.st/file/n4908439/squeak_trunk_uitheme_v12.sar> >> >> Here is a preview: >> http://i.giphy.com/l46CcX46yRE9H6yQ0.gif >> >> *Try it out. Report bugs. Report performance issues!!* We will commit the >> changes to trunk this Saturday. >> >> Btw: The SAR installer is compatible with Eliot's current working image. >> ;o) >> And there are numerous open windows and projects in that image...^^ >> >> >> ========================================== >> 0. The Long History of Squeak & UI Theming >> ========================================== >> >> ... >> http://forum.world.st/Dark-theme-td4869082.html >> http://forum.world.st/Themes-for-Squeak-5-1-td4882848.html >> http://forum.world.st/Skylark-Theme-and-Squeak-3-9-td54720.html >> >> http://forum.world.st/Non-SmallLand-colour-theme-lying-around-td4697438.html#a4697446 >> ... >> >> >> ======================== >> 1. User Interface Themes >> ======================== >> >> Chris, Karl, and I designed a very lightweight abstraction to support UI >> themes in Squeak. You can find the whole implementation in the class >> UserInterfaceTheme and a bunch of tests in UserInterfaceThemeTests. >> >> An object that wants to support theming SHOULD (!) implement three >> methods: >> >> MyFancyClass class >> #themeProperties >> MyFancyClass >> #applyUserInterfaceTheme >> MyFancyClass >> #canApplyUserInterfaceTheme >> >> It also MUST (!) access the current UI theme when setting visual state. >> And >> here comes the nice part: >> >> ... >> self color: (self userInterfaceTheme color ifNil: [Color white]). >> ... >> >> Remember, usually you would write something like this: >> >> ... >> self color: Color white. >> ... >> >> How can this work? It works by using #doesNotUnderstand: and trigger a >> dynamic lookup in a dictionary inside the current theme: >> >> Object >> #userInterfaceTheme >> ^ UserInterfaceTheme current >> pushScope: self; >> yourself >> >> UserInterfaceTheme >> #doesNotUnderstand: aMessage >> ... >> ^ [self get: scope top class -> aMessage selector] >> ensure: [scope pop] >> >> Isn't this slow? No, not at all. If you have any doubts, try benching it >> on >> your machine: >> >> UserInterfaceThemeTestObject benchLookup. >> >> On my machine, this is even fast enough to support theme lookups in >> frequently called messages such as Morph >> #drawOn:. However, >> applications >> are advised to cache. That's why we have the explicit >> #applyUserInterfaceTheme callbacks as described above. >> >> Note that amazing effects can be achieved by adjusting #color, >> #borderColor, >> #borderWidth, #fillStyle, and fonts. :-) The existing themes do exactly >> that. >> >> To get a feeling of the impact of having themes in Squeak, try browsing >> senders and implementors of #applyUserInterfaceTheme, #themeProperties, >> #userInterfaceTheme, and maybe #canApplyUserInterfaceTheme. I think we >> can >> still reduce the number of sends to #userInterfaceTheme a little more. >> >> >> ================================== >> 2. Code clean-up in widget classes >> ================================== >> >> We made Shout look up the current theme to build its internal cache of >> text >> attributes to quickly style code as you type it. >> >> We removed window color specifications and replaced them by simply >> implementing Model >> #defaultWindowColor. There is also still the >> #uniformWindowColor if you do not like colorful windows. This makes it >> also >> much easier for new applications to have their own window color. >> >> We unified the implementation of MenuMorph and DockingBarMorph and fixed >> several bugs there. >> >> Dialogs! *phew* ... *arrrrgss* ... Dialogs. :-) We managed to introduce a >> general DialogWindow class. FillInTheBlankMorph and UserDialogBoxMorph >> are >> now mere subclasses with a custom interface. There is also support for >> ToolBuilder, see ListChooser for an example. *yay* >> >> Buttons feel more like buttons now. It's a good thing, right? >> >> For lists and trees and text boxes, we greatly reduced the amount of code >> that just accessed global state. LazyListMorph, NewParagraph, TextMorph, >> IndentingListItemMorph, ... they all now get configured by their "hosts", >> which are PluggableListMorph, PluggableTextMorph, and >> SimpleHierarchicalListMorph. Having this, we improved the modular >> structure >> of our whole Squeak widget library. That modular structure made applying >> themes much easier. :-) >> >> >> ======================== >> 3. Theme all the widgets >> ======================== >> >> There is a nice existing pattern with the message #setDefaultParameters, >> which is usually called from #initialize. Go, see for yourself. Browse >> implementors of #setDefaultParameters. We used that pattern and cleaned >> up >> many implementations of that message in the image. >> >> Note that rounded corners, gradients, colorful windows, and shadows are >> still preferences outside of UI themes. You can toggle them in any UI >> theme. >> >> Note that the background color/image is also not subject to be themed. >> Just >> drop your favorite picture or pattern in the image. It's really easy. >> >> Now, take a look at the class SqueakTheme. There, you will find source >> code >> for creating the default Squeak theme to be shared via SqueakSource and >> reset during the release building process. :-) >> >> Besides get/set/clear -- which might be expected from the theme structure >> because it is basically a dictionary with some properties -- There, you >> will >> notice a "merge" or "link" or "derive". When creating themes >> programmatically, you can: >> - derive properties from other properties >> - link themes to extend property look-up >> - merge one theme into another theme >> >> How does property look-up work? Well, see UserInterfaceTheme >> #get: >> 1. Look up the key, which is usually "Class -> symbol". >> 2. Try the superclass chain. >> 3. Try the same lookup in the linked theme if any. >> >> Theoretically, you could actually implement messages in subclasses of >> UserInterfaceTheme and bypass that DNU-triggered lookup. We do not do >> this >> right now. >> >> As you can see, Squeak/Smalltalk offers a great deal of flexibility. It >> is >> remains subject to discussion of how to employ the language and its >> semantics. Think of the current implementation of user interface themes >> as >> one way that represents a trade-off between a concise programming >> interface >> (i.e. ... self userInterfaceTheme color ifNil ...), a fair amount of >> comprehensive patterns (i.e. #setDefaultParameters, >> #applyUserInterfaceTheme, ...), and some other existing constraints (i.e. >> old code, Monticello/Squeaksource, existing tools such as >> senders/implementors, ...). >> >> Happy Squeaking! >> >> Marcel, Chris, Karl >> >> >> >> -- >> View this message in context: >> http://forum.world.st/ANN-Widget-Refactorings-UI-Themes-for-Squeak-tp4908439.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> Thanks for this elaborate report. :-) "Changing themes works - mostly. It appears to just change the thematic elements that are visible at the time of theme changing. What is mean is, if you have a window minimized, then the contents of that window will not change to the new theme, but will stay with the old theme (at least, the colors do). This may not be an issue for folks with a reasonably small number of windows open, of course." There is a filter in Morph >> #canApplyUserInterfaceTheme, which checks "self isInWorld". For collapsed window contents (text boxes etc.), that returns false. One could experiment with removing that check for a while. We think that we might not want to change prototypical content or left-overs... Hmm... I think we can fix this for Pluggable* widgets very easy by checking #containingWindow. Thanks! Best, Marcel -- View this message in context: http://forum.world.st/ANN-Widget-Refactorings-UI-Themes-for-Squeak-tp4908439p4908467.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Thu Jul 28 14:53:58 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Jul 28 15:38:21 2016 Subject: [squeak-dev] Re: [ANN] Widget Refactorings & UI Themes for Squeak In-Reply-To: <1469717356456-4908467.post@n4.nabble.com> References: <1469711671857-4908439.post@n4.nabble.com> <1469717356456-4908467.post@n4.nabble.com> Message-ID: <1469717638899-4908468.post@n4.nabble.com> marcel.taeumel wrote > > cbc wrote >> Hi. >> >> First, a warning for other using this sar - it applies updates before >> loading. So, if you are on trunk, you will be updated to the latest >> trunk. Mostly that should be ok. >> >> Second, if you have a LOT of open windows, the image will appear to seize >> up briefly at one point during load. It isn't frozen - it is just >> applying >> the theme to all open windows. (I have 47 open windows - takes a bit of >> time). >> >> Changing themes (with my 47 open windows) takes about 9 seconds. >> >> Changing themes works - mostly. It appears to just change the thematic >> elements that are visible at the time of theme changing. What is mean >> is, >> if you have a window minimized, then the contents of that window will not >> change to the new theme, but will stay with the old theme (at least, the >> colors do). This may not be an issue for folks with a reasonably small >> number of windows open, of course. >> >> As a side effect, it is possible to mix themes this way. >> >> I'll run with it today, and report any issues, although I doubt I'll see >> many more. >> >> -cbc >> >> On Thu, Jul 28, 2016 at 6:14 AM, marcel.taeumel < >> Marcel.Taeumel@ >> > >> wrote: >> >>> Hi, there! :-) >>> >>> TL;DR: Here is a SAR file that cleans up the code of all widget classes >>> such >>> as lists and buttons in your image and adds support for UI theming as >>> well >>> as a bunch of UI themes (choose Themes via "Extras > Themes & Colors"): >>> squeak_trunk_uitheme_v12.sar >>> <http://forum.world.st/file/n4908439/squeak_trunk_uitheme_v12.sar> >>> >>> Here is a preview: >>> http://i.giphy.com/l46CcX46yRE9H6yQ0.gif >>> >>> *Try it out. Report bugs. Report performance issues!!* We will commit >>> the >>> changes to trunk this Saturday. >>> >>> Btw: The SAR installer is compatible with Eliot's current working image. >>> ;o) >>> And there are numerous open windows and projects in that image...^^ >>> >>> >>> ========================================== >>> 0. The Long History of Squeak & UI Theming >>> ========================================== >>> >>> ... >>> http://forum.world.st/Dark-theme-td4869082.html >>> http://forum.world.st/Themes-for-Squeak-5-1-td4882848.html >>> http://forum.world.st/Skylark-Theme-and-Squeak-3-9-td54720.html >>> >>> http://forum.world.st/Non-SmallLand-colour-theme-lying-around-td4697438.html#a4697446 >>> ... >>> >>> >>> ======================== >>> 1. User Interface Themes >>> ======================== >>> >>> Chris, Karl, and I designed a very lightweight abstraction to support UI >>> themes in Squeak. You can find the whole implementation in the class >>> UserInterfaceTheme and a bunch of tests in UserInterfaceThemeTests. >>> >>> An object that wants to support theming SHOULD (!) implement three >>> methods: >>> >>> MyFancyClass class >> #themeProperties >>> MyFancyClass >> #applyUserInterfaceTheme >>> MyFancyClass >> #canApplyUserInterfaceTheme >>> >>> It also MUST (!) access the current UI theme when setting visual state. >>> And >>> here comes the nice part: >>> >>> ... >>> self color: (self userInterfaceTheme color ifNil: [Color white]). >>> ... >>> >>> Remember, usually you would write something like this: >>> >>> ... >>> self color: Color white. >>> ... >>> >>> How can this work? It works by using #doesNotUnderstand: and trigger a >>> dynamic lookup in a dictionary inside the current theme: >>> >>> Object >> #userInterfaceTheme >>> ^ UserInterfaceTheme current >>> pushScope: self; >>> yourself >>> >>> UserInterfaceTheme >> #doesNotUnderstand: aMessage >>> ... >>> ^ [self get: scope top class -> aMessage selector] >>> ensure: [scope pop] >>> >>> Isn't this slow? No, not at all. If you have any doubts, try benching it >>> on >>> your machine: >>> >>> UserInterfaceThemeTestObject benchLookup. >>> >>> On my machine, this is even fast enough to support theme lookups in >>> frequently called messages such as Morph >> #drawOn:. However, >>> applications >>> are advised to cache. That's why we have the explicit >>> #applyUserInterfaceTheme callbacks as described above. >>> >>> Note that amazing effects can be achieved by adjusting #color, >>> #borderColor, >>> #borderWidth, #fillStyle, and fonts. :-) The existing themes do exactly >>> that. >>> >>> To get a feeling of the impact of having themes in Squeak, try browsing >>> senders and implementors of #applyUserInterfaceTheme, #themeProperties, >>> #userInterfaceTheme, and maybe #canApplyUserInterfaceTheme. I think we >>> can >>> still reduce the number of sends to #userInterfaceTheme a little more. >>> >>> >>> ================================== >>> 2. Code clean-up in widget classes >>> ================================== >>> >>> We made Shout look up the current theme to build its internal cache of >>> text >>> attributes to quickly style code as you type it. >>> >>> We removed window color specifications and replaced them by simply >>> implementing Model >> #defaultWindowColor. There is also still the >>> #uniformWindowColor if you do not like colorful windows. This makes it >>> also >>> much easier for new applications to have their own window color. >>> >>> We unified the implementation of MenuMorph and DockingBarMorph and fixed >>> several bugs there. >>> >>> Dialogs! *phew* ... *arrrrgss* ... Dialogs. :-) We managed to introduce >>> a >>> general DialogWindow class. FillInTheBlankMorph and UserDialogBoxMorph >>> are >>> now mere subclasses with a custom interface. There is also support for >>> ToolBuilder, see ListChooser for an example. *yay* >>> >>> Buttons feel more like buttons now. It's a good thing, right? >>> >>> For lists and trees and text boxes, we greatly reduced the amount of >>> code >>> that just accessed global state. LazyListMorph, NewParagraph, TextMorph, >>> IndentingListItemMorph, ... they all now get configured by their >>> "hosts", >>> which are PluggableListMorph, PluggableTextMorph, and >>> SimpleHierarchicalListMorph. Having this, we improved the modular >>> structure >>> of our whole Squeak widget library. That modular structure made applying >>> themes much easier. :-) >>> >>> >>> ======================== >>> 3. Theme all the widgets >>> ======================== >>> >>> There is a nice existing pattern with the message #setDefaultParameters, >>> which is usually called from #initialize. Go, see for yourself. Browse >>> implementors of #setDefaultParameters. We used that pattern and cleaned >>> up >>> many implementations of that message in the image. >>> >>> Note that rounded corners, gradients, colorful windows, and shadows are >>> still preferences outside of UI themes. You can toggle them in any UI >>> theme. >>> >>> Note that the background color/image is also not subject to be themed. >>> Just >>> drop your favorite picture or pattern in the image. It's really easy. >>> >>> Now, take a look at the class SqueakTheme. There, you will find source >>> code >>> for creating the default Squeak theme to be shared via SqueakSource and >>> reset during the release building process. :-) >>> >>> Besides get/set/clear -- which might be expected from the theme >>> structure >>> because it is basically a dictionary with some properties -- There, you >>> will >>> notice a "merge" or "link" or "derive". When creating themes >>> programmatically, you can: >>> - derive properties from other properties >>> - link themes to extend property look-up >>> - merge one theme into another theme >>> >>> How does property look-up work? Well, see UserInterfaceTheme >> #get: >>> 1. Look up the key, which is usually "Class -> symbol". >>> 2. Try the superclass chain. >>> 3. Try the same lookup in the linked theme if any. >>> >>> Theoretically, you could actually implement messages in subclasses of >>> UserInterfaceTheme and bypass that DNU-triggered lookup. We do not do >>> this >>> right now. >>> >>> As you can see, Squeak/Smalltalk offers a great deal of flexibility. It >>> is >>> remains subject to discussion of how to employ the language and its >>> semantics. Think of the current implementation of user interface themes >>> as >>> one way that represents a trade-off between a concise programming >>> interface >>> (i.e. ... self userInterfaceTheme color ifNil ...), a fair amount of >>> comprehensive patterns (i.e. #setDefaultParameters, >>> #applyUserInterfaceTheme, ...), and some other existing constraints >>> (i.e. >>> old code, Monticello/Squeaksource, existing tools such as >>> senders/implementors, ...). >>> >>> Happy Squeaking! >>> >>> Marcel, Chris, Karl >>> >>> >>> >>> -- >>> View this message in context: >>> http://forum.world.st/ANN-Widget-Refactorings-UI-Themes-for-Squeak-tp4908439.html >>> Sent from the Squeak - Dev mailing list archive at Nabble.com. >>> >>> > Thanks for this elaborate report. :-) > > "Changing themes works - mostly. It appears to just change the thematic > elements that are visible at the time of theme changing. What is mean is, > if you have a window minimized, then the contents of that window will not > change to the new theme, but will stay with the old theme (at least, the > colors do). This may not be an issue for folks with a reasonably small > number of windows open, of course." > > There is a filter in Morph >> #canApplyUserInterfaceTheme, which checks > "self isInWorld". For collapsed window contents (text boxes etc.), that > returns false. > > One could experiment with removing that check for a while. We think that > we might not want to change prototypical content or left-overs... Hmm... I > think we can fix this for Pluggable* widgets very easy by checking > #containingWindow. > > Thanks! > > Best, > Marcel Anyway, you can always re-apply a theme. Best, Marcel -- View this message in context: http://forum.world.st/ANN-Widget-Refactorings-UI-Themes-for-Squeak-tp4908439p4908468.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Thu Jul 28 15:40:12 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 15:40:15 2016 Subject: [squeak-dev] The Trunk: Morphic-tfel.1206.mcz Message-ID: Tim Felgentreff uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-tfel.1206.mcz ==================== Summary ==================== Name: Morphic-tfel.1206 Author: tfel Time: 28 July 2016, 5:39:34.138262 pm UUID: 5576675a-2dc1-5a44-af3d-adccb4b2649e Ancestors: Morphic-mt.1205 Use all translators to offer languages =============== Diff against Morphic-mt.1205 =============== Item was changed: ----- Method: MorphicProject>>chooseNaturalLanguage (in category 'language') ----- chooseNaturalLanguage "Put up a menu allowing the user to choose the natural language for the project" | aMenu availableLanguages | aMenu := MenuMorph new defaultTarget: self. aMenu addTitle: 'choose language' translated. aMenu lastItem setBalloonText: 'This controls the human language in which tiles should be viewed. It is potentially extensible to be a true localization mechanism, but initially it only works in the classic tile scripting system. Each project has its own private language choice' translated. Preferences noviceMode ifFalse:[aMenu addStayUpItem]. + availableLanguages := NaturalLanguageTranslator availableLanguageLocaleIDs - availableLanguages := InternalTranslator availableLanguageLocaleIDs asSortedCollection:[:x :y | x displayName < y displayName]. availableLanguages do: [:localeID | aMenu addUpdating: #stringForLanguageNameIs: target: Locale selector: #switchAndInstallFontToID: argumentList: {localeID}]. aMenu popUpInWorld "Project current chooseNaturalLanguage"! From commits at source.squeak.org Thu Jul 28 15:41:14 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 15:41:16 2016 Subject: [squeak-dev] The Trunk: MorphicExtras-tfel.178.mcz Message-ID: Tim Felgentreff uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-tfel.178.mcz ==================== Summary ==================== Name: MorphicExtras-tfel.178 Author: tfel Time: 28 July 2016, 5:40:57.037262 pm UUID: 7f1a4b18-8035-ab4c-a0e6-f61404b53cd9 Ancestors: MorphicExtras-mt.177 use a default value for flaptabs if we don't have a referent =============== Diff against MorphicExtras-mt.177 =============== Item was changed: ----- Method: FlapTab>>referentThickness (in category 'access') ----- referentThickness + referent ifNil: [^ 32]. ^ (self orientation == #horizontal) ifTrue: [referent height] ifFalse: [referent width]! From commits at source.squeak.org Thu Jul 28 15:42:41 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 15:42:45 2016 Subject: [squeak-dev] The Trunk: Multilingual-tfel.215.mcz Message-ID: Tim Felgentreff uploaded a new version of Multilingual to project The Trunk: http://source.squeak.org/trunk/Multilingual-tfel.215.mcz ==================== Summary ==================== Name: Multilingual-tfel.215 Author: tfel Time: 28 July 2016, 5:42:27.421262 pm UUID: eb0c9954-a8c7-1247-ad77-d0e95c015e9a Ancestors: Multilingual-tpr.214 only run the language environment startup code for the current language platform when the locale changes. no need to run it for all platforms. =============== Diff against Multilingual-tpr.214 =============== Item was changed: ----- Method: LanguageEnvironment class>>localeChanged (in category 'class initialization') ----- localeChanged + + (self currentPlatform class == self) + ifTrue: [self startUp].! - self startUp! From commits at source.squeak.org Thu Jul 28 15:44:35 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 15:44:37 2016 Subject: [squeak-dev] The Trunk: System-tfel.847.mcz Message-ID: Tim Felgentreff uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-tfel.847.mcz ==================== Summary ==================== Name: System-tfel.847 Author: tfel Time: 28 July 2016, 5:44:07.697262 pm UUID: f9564962-6572-0f40-80ce-109dcd9dc1fb Ancestors: System-tfel.846 avoid infinite recursion in Locale class>>localeChanged only inform the current project of a locale change if that project is of the same class as the one we're currently in =============== Diff against System-tfel.846 =============== Item was changed: ----- Method: Locale class>>localeChanged (in category 'notification') ----- localeChanged + SystemNavigation default allBehaviorsDo: [:b | + b == self ifFalse: [b localeChanged]].! - self class environment allBehaviorsDo: [:b | b localeChanged].! Item was changed: ----- Method: Project class>>localeChanged (in category 'class initialization') ----- localeChanged + self current class == self + ifTrue: [self current localeChanged].! - self current localeChanged! From commits at source.squeak.org Thu Jul 28 16:04:57 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 16:04:59 2016 Subject: [squeak-dev] The Trunk: GetText-ul.38.mcz Message-ID: Levente Uzonyi uploaded a new version of GetText to project The Trunk: http://source.squeak.org/trunk/GetText-ul.38.mcz ==================== Summary ==================== Name: GetText-ul.38 Author: ul Time: 28 July 2016, 6:04:51.67039 pm UUID: 391f6add-8779-418e-aca7-8b3f282fd463 Ancestors: GetText-mt.37 - fixed two erroneous underscore conversions =============== Diff against GetText-mt.37 =============== Item was changed: ----- Method: GetTextExporter>>dirNameCategory:translator: (in category 'exporting') ----- dirNameCategory: category translator: translator "Answer a file name for the category. Make one if it is not exist yet. Make template file name if translator is nil" "self new dirNameCategory: 'Morphic-Scripting Support' translator: NaturalLanguageTranslator current" "self new dirNameCategory: 'Morphic-Scripting Support' translator: nil" | safeCategory fileName dirName pathName | + safeCategory := category copyReplaceAll: ' ' with: '_'. - safeCategory := category copyReplaceAll: ' ' with: ':='. fileName := translator ifNil: [safeCategory , '.pot'] ifNotNil: [translator localeID posixName , '.po']. dirName := (safeCategory findTokens: '-') inject: 'po' into: [:aString :next | aString , FileDirectory slash , next]. pathName := dirName , FileDirectory slash , fileName. (FileDirectory default directoryNamed: dirName) assureExistence. ^ pathName! Item was changed: ----- Method: GetTextExporter>>exportBody:translator: (in category 'file out') ----- exportBody: literals translator: translator "Export a gettext file body. literals is a dictionary of keyword -> #(MethodReference...) in the textDomain." "Build {sortKey. comment. msgid } to optimize sorting (getting category is too slow). If there are two or more methods for a mgsid, only first method (alphabetical) is used for sorting." | sorted msgid sortedMethods category sortKey comment triplets commentUnderLined | triplets := literals associations collect: [:assoc | msgid := assoc key. sortedMethods := assoc value asArray sort. category := (Smalltalk at: sortedMethods first classSymbol) category asString. sortKey := category , ',' , sortedMethods first printString , ',' , msgid. comment := (sortedMethods collect: [:each | each actualClass asString , '>>' , each methodSymbol asString]) inject: category into: [:result :methodName | result , ',' , methodName]. + "Replace white spaces to _ because gettext tool might - "Replace white spaces to := because gettext tool might replace a space to a new line some times, and it makes difficult to take a diff." + commentUnderLined := comment copyReplaceAll: ' ' with: '_'. - commentUnderLined := comment copyReplaceAll: ' ' with: ':='. Array with: sortKey with: commentUnderLined with: msgid]. "Sort and output the words" sorted := triplets sort: [:a :b | a first <= b first]. sorted do: [:triplet | comment := triplet second. msgid := triplet third. self exportRecordHeader: comment. self exportPhrase: msgid translation: (self translationFor: msgid in: translator)]! From commits at source.squeak.org Thu Jul 28 16:11:32 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 16:11:34 2016 Subject: [squeak-dev] The Trunk: WebClient-Core-ul.102.mcz Message-ID: Levente Uzonyi uploaded a new version of WebClient-Core to project The Trunk: http://source.squeak.org/trunk/WebClient-Core-ul.102.mcz ==================== Summary ==================== Name: WebClient-Core-ul.102 Author: ul Time: 28 July 2016, 6:11:24.053224 pm UUID: 41aff69b-9c82-4685-a1de-9d2b7b3dd30e Ancestors: WebClient-Core-topa.101 Send #destroy to stream instead of its socket in WebClient >> #destroy, so that SecureSocketStream can properly release its SqueakSSL instance instead of leaking it. =============== Diff against WebClient-Core-topa.101 =============== Item was changed: ----- Method: WebClient>>destroy (in category 'initialize') ----- destroy "Destroys the client" stream ifNotNil:[ + stream destroy. - stream socket ifNotNil:[:s| s destroy]. stream := nil. ]. ! From cunningham.cb at gmail.com Thu Jul 28 17:08:47 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Thu Jul 28 17:08:51 2016 Subject: [squeak-dev] Re: [ANN] Widget Refactorings & UI Themes for Squeak In-Reply-To: <1469717356456-4908467.post@n4.nabble.com> References: <1469711671857-4908439.post@n4.nabble.com> <1469717356456-4908467.post@n4.nabble.com> Message-ID: On Thu, Jul 28, 2016 at 7:49 AM, marcel.taeumel wrote: > Thanks for this elaborate report. :-) You're welcome. I'm in the UI most every day, for several hours. Looks matter to me. I notice that the selection lists have changed somewhat - either in this package or in the trunk recently (not sure which). I think I like the new selections - but will take some time to get used to them. > > "Changing themes works - mostly. It appears to just change the thematic > elements that are visible at the time of theme changing. What is mean is, > if you have a window minimized, then the contents of that window will not > change to the new theme, but will stay with the old theme (at least, the > colors do). This may not be an issue for folks with a reasonably small > number of windows open, of course." > > There is a filter in Morph >> #canApplyUserInterfaceTheme, which checks > "self isInWorld". For collapsed window contents (text boxes etc.), that > returns false. > > One could experiment with removing that check for a while. I'm thinking I'll need to do this. Some of the older themes plus highlighting in the newest produce startling results - old dark theme in new dark theme = blinding white selections. We think that we > might not want to change prototypical content or left-overs... Hmm... I > think we can fix this for Pluggable* widgets very easy by checking > #containingWindow. > > Thanks! > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/ANN-Widget-Refactorings-UI-Themes-for-Squeak-tp4908439p4908467.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160728/e3bfb89c/attachment.htm From cunningham.cb at gmail.com Thu Jul 28 17:27:10 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Thu Jul 28 17:27:13 2016 Subject: [squeak-dev] Re: [ANN] Widget Refactorings & UI Themes for Squeak In-Reply-To: References: <1469711671857-4908439.post@n4.nabble.com> <1469717356456-4908467.post@n4.nabble.com> Message-ID: Oh, and I should mention that I do like this. The theme selection is nice/reasonable to use and was easy to understand. and the look - I really like that. -cbc On Thu, Jul 28, 2016 at 10:08 AM, Chris Cunningham wrote: > > On Thu, Jul 28, 2016 at 7:49 AM, marcel.taeumel > wrote: > > >> Thanks for this elaborate report. :-) > > > You're welcome. I'm in the UI most every day, for several hours. Looks > matter to me. > > I notice that the selection lists have changed somewhat - either in this > package or in the trunk recently (not sure which). I think I like the new > selections - but will take some time to get used to them. > >> >> "Changing themes works - mostly. It appears to just change the thematic >> elements that are visible at the time of theme changing. What is mean is, >> if you have a window minimized, then the contents of that window will not >> change to the new theme, but will stay with the old theme (at least, the >> colors do). This may not be an issue for folks with a reasonably small >> number of windows open, of course." >> >> There is a filter in Morph >> #canApplyUserInterfaceTheme, which checks >> "self isInWorld". For collapsed window contents (text boxes etc.), that >> returns false. >> >> One could experiment with removing that check for a while. > > > I'm thinking I'll need to do this. Some of the older themes plus > highlighting in the newest produce startling results - old dark theme in > new dark theme = blinding white selections. > > We think that we >> might not want to change prototypical content or left-overs... Hmm... I >> think we can fix this for Pluggable* widgets very easy by checking >> #containingWindow. >> >> Thanks! >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/ANN-Widget-Refactorings-UI-Themes-for-Squeak-tp4908439p4908467.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160728/f44c4cc9/attachment.htm From karlramberg at gmail.com Thu Jul 28 18:45:22 2016 From: karlramberg at gmail.com (karl ramberg) Date: Thu Jul 28 18:45:26 2016 Subject: [squeak-dev] Re: [ANN] Widget Refactorings & UI Themes for Squeak In-Reply-To: References: <1469711671857-4908439.post@n4.nabble.com> <1469717356456-4908467.post@n4.nabble.com> Message-ID: I noticed that white/ light colored on dark background letters now look a little bolder than before. Black on white does not look so bold. Best, Karl On Thu, Jul 28, 2016 at 7:27 PM, Chris Cunningham wrote: > Oh, and I should mention that I do like this. The theme selection is > nice/reasonable to use and was easy to understand. > > and the look - I really like that. > -cbc > > On Thu, Jul 28, 2016 at 10:08 AM, Chris Cunningham < > cunningham.cb@gmail.com> wrote: > >> >> On Thu, Jul 28, 2016 at 7:49 AM, marcel.taeumel >> wrote: >> >> >>> Thanks for this elaborate report. :-) >> >> >> You're welcome. I'm in the UI most every day, for several hours. Looks >> matter to me. >> >> I notice that the selection lists have changed somewhat - either in this >> package or in the trunk recently (not sure which). I think I like the new >> selections - but will take some time to get used to them. >> >>> >>> "Changing themes works - mostly. It appears to just change the thematic >>> elements that are visible at the time of theme changing. What is mean >>> is, >>> if you have a window minimized, then the contents of that window will not >>> change to the new theme, but will stay with the old theme (at least, the >>> colors do). This may not be an issue for folks with a reasonably small >>> number of windows open, of course." >>> >>> There is a filter in Morph >> #canApplyUserInterfaceTheme, which checks >>> "self isInWorld". For collapsed window contents (text boxes etc.), that >>> returns false. >>> >>> One could experiment with removing that check for a while. >> >> >> I'm thinking I'll need to do this. Some of the older themes plus >> highlighting in the newest produce startling results - old dark theme in >> new dark theme = blinding white selections. >> >> We think that we >>> might not want to change prototypical content or left-overs... Hmm... I >>> think we can fix this for Pluggable* widgets very easy by checking >>> #containingWindow. >>> >>> Thanks! >>> >>> Best, >>> Marcel >>> >>> >>> >>> -- >>> View this message in context: >>> http://forum.world.st/ANN-Widget-Refactorings-UI-Themes-for-Squeak-tp4908439p4908467.html >>> Sent from the Squeak - Dev mailing list archive at Nabble.com. >>> >>> >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160728/39d0d85f/attachment.htm From commits at source.squeak.org Thu Jul 28 21:55:03 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jul 28 21:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160728215503.18013.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068308.html Name: Tools-tfel.709 Ancestors: Tools-mt.708 Fix a small bug in FileList2. FileList>>itemsForFile: now needs a fully qualified path ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068309.html Name: Morphic-mt.1199 Ancestors: Morphic-mt.1198 Improve robustness for tricky debugging scenarios. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068310.html Name: System-mt.842 Ancestors: System-mt.841 Fixes uni-class check due to latest updates in EToys package. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068311.html Name: Morphic-mt.1200 Ancestors: Morphic-mt.1199 Adds pragma preference for rounded window corners. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068312.html Name: MorphicExtras-mt.177 Ancestors: MorphicExtras-topa.176 Uses pragma preference for rounded window corners. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068313.html Name: ReleaseBuilder-mt.136 Ancestors: ReleaseBuilder-mt.135 Uses pragma preference for rounded window corners. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068314.html Name: System-mt.843 Ancestors: System-mt.842 Removes old-style preference for rounded window corners. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068315.html Name: 51Deprecated-mt.33 Ancestors: 51Deprecated-mt.32 Just in case, deprecate but not remove old-style rounded-corners string message. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068316.html Name: Morphic-mt.1201 Ancestors: Morphic-mt.1200 Restore functionality for rounded window corners, how that the preference is pragma-style. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068317.html Name: SystemReporter-mt.27 Ancestors: SystemReporter-mt.26 The System Reporter tool is created via tool builder and hence should be a model like all other tools created via tool builder. Note that Model does also have a more efficient management for dependents compared to Object. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068318.html Name: Morphic-mt.1202 Ancestors: Morphic-mt.1201 Add and use pragma-style preference for gradient scroll bars. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068319.html Name: ReleaseBuilder-mt.137 Ancestors: ReleaseBuilder-mt.136 Use pragma-style preference for gradient scroll bars. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068320.html Name: System-mt.844 Ancestors: System-mt.843 Remove old-style preference for gradient scroll bars. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068321.html Name: Morphic-mt.1203 Ancestors: Morphic-mt.1202 Cleans up window refreshing code. Fixes a bug that recreated the close box for windows that where uncloseable. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068322.html Name: Morphic-mt.1204 Ancestors: Morphic-mt.1203 Fixes some code that is used when refreshing the window colors after a preference change. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068323.html Name: Morphic-mt.1205 Ancestors: Morphic-mt.1204 Provide a simple interface to avoid display updates. For example, if you change a bunch of things in, say, the PluggableButtonMorph and you happen to have one visible on the screen, transcripts or system progress bars will trigger visual updates at a time when code is in an inconsistent state. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068324.html Name: System-mt.845 Ancestors: System-mt.844 Also add the generic hook to avoid display updates to all project kinds. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068325.html Name: System-tfel.846 Ancestors: System-mt.845 various fixes for locale support ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068326.html Name: Graphics-tfel.356 Ancestors: Graphics-tfel.355 add a preference for bigger cursors (from etoys) and fix fallback for CursorWithAlpha for systems that do not support 32-bit cursors with alpha ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068327.html Name: Morphic-tfel.1206 Ancestors: Morphic-mt.1205 Use all translators to offer languages ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068328.html Name: MorphicExtras-tfel.178 Ancestors: MorphicExtras-mt.177 use a default value for flaptabs if we don't have a referent ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068329.html Name: Multilingual-tfel.215 Ancestors: Multilingual-tpr.214 only run the language environment startup code for the current language platform when the locale changes. no need to run it for all platforms. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068330.html Name: System-tfel.847 Ancestors: System-tfel.846 avoid infinite recursion in Locale class>>localeChanged only inform the current project of a locale change if that project is of the same class as the one we're currently in ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068331.html Name: GetText-ul.38 Ancestors: GetText-mt.37 - fixed two erroneous underscore conversions ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068332.html Name: WebClient-Core-ul.102 Ancestors: WebClient-Core-topa.101 Send #destroy to stream instead of its socket in WebClient >> #destroy, so that SecureSocketStream can properly release its SqueakSSL instance instead of leaking it. ============================================= From Yoshiki.Ohshima at acm.org Thu Jul 28 22:22:25 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Thu Jul 28 22:22:28 2016 Subject: [squeak-dev] Smallapack Message-ID: I am trying to do a bit of linear algebra stuff that involves to solve a sparse 2D matrix (for a variation of doing least square fit). There was a message from Nicolas: http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-August/161113.html Is this where it stands today, too? It looks like that arg count problem is still there in 5.0, but is it in a way non-issue as it is still FFI based? Thanks! -- -- Yoshiki From nicolas.cellier.aka.nice at gmail.com Thu Jul 28 23:04:25 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Jul 28 23:04:29 2016 Subject: [squeak-dev] Smallapack In-Reply-To: References: Message-ID: Hi Yoshiki, Thanks for inquiring about Smallapack. This problem has been solved in 2011 as the post tells. Moreover, it was about alignment of squeak objects that was on multiple of 4 on SqueakV3 memory. Spur is 8 byte aligned, so the problem would have also vanished without any patch for those being patient :) For the 15 arguments limit, Smallapack comes with it's own compiler, so it's a non issue. Maybe I should make the documentation more clear on https://github.com/nicolas-cellier-aka-nice/smallapack/wiki/SmallapackSqueak ? Unfortunately, there's no Sparse Matrix representation in Lapack. If you know of a good package for that, it could be integrated. If you have other questions, don't hesitate to ask. cheers Nicolas 2016-07-29 0:22 GMT+02:00 Yoshiki Ohshima : > I am trying to do a bit of linear algebra stuff that involves to solve > a sparse 2D matrix (for a variation of doing least square fit). > > There was a message from Nicolas: > > http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-August/161113.html > > Is this where it stands today, too? It looks like that arg count > problem is still there in 5.0, but is it in a way non-issue as it is > still FFI based? > > Thanks! > > -- > -- Yoshiki > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160729/8001bc82/attachment.htm From Yoshiki.Ohshima at acm.org Thu Jul 28 23:11:58 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Thu Jul 28 23:12:01 2016 Subject: [squeak-dev] Smallapack In-Reply-To: References: Message-ID: Thanks! On Thu, Jul 28, 2016 at 4:04 PM, Nicolas Cellier wrote: > Hi Yoshiki, > > Thanks for inquiring about Smallapack. > > This problem has been solved in 2011 as the post tells. > Moreover, it was about alignment of squeak objects that was on multiple of 4 > on SqueakV3 memory. > Spur is 8 byte aligned, so the problem would have also vanished without any > patch for those being patient :) > > For the 15 arguments limit, Smallapack comes with it's own compiler, so it's > a non issue. > Maybe I should make the documentation more clear on > https://github.com/nicolas-cellier-aka-nice/smallapack/wiki/SmallapackSqueak > ? > > Unfortunately, there's no Sparse Matrix representation in Lapack. > If you know of a good package for that, it could be integrated. > > If you have other questions, don't hesitate to ask. > > cheers > > Nicolas > > 2016-07-29 0:22 GMT+02:00 Yoshiki Ohshima : >> >> I am trying to do a bit of linear algebra stuff that involves to solve >> a sparse 2D matrix (for a variation of doing least square fit). >> >> There was a message from Nicolas: >> >> http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-August/161113.html >> >> Is this where it stands today, too? It looks like that arg count >> problem is still there in 5.0, but is it in a way non-issue as it is >> still FFI based? >> >> Thanks! >> >> -- >> -- Yoshiki >> > > > > -- -- Yoshiki From commits at source.squeak.org Fri Jul 29 11:48:23 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 29 11:48:26 2016 Subject: [squeak-dev] The Trunk: SystemReporter-mt.28.mcz Message-ID: Marcel Taeumel uploaded a new version of SystemReporter to project The Trunk: http://source.squeak.org/trunk/SystemReporter-mt.28.mcz ==================== Summary ==================== Name: SystemReporter-mt.28 Author: mt Time: 29 July 2016, 1:48:17.592006 pm UUID: 1810451e-c781-4c4e-b3d6-8c6d6bb2389b Ancestors: SystemReporter-mt.27 List Squeak Contributors in the System Reporter. =============== Diff against SystemReporter-mt.27 =============== Item was changed: ----- Method: SystemReporter>>initialize (in category 'initialize-release') ----- initialize self + add: #'Contributors' method: #reportContributors; add: #Image method: #reportImage; add: #'Image Parameters' method: #reportImageParameters; add: #'Image Sources' method: #reportSources; add: #'Image Preferences' method: #reportPreferences; add: #'MC Repositories' method: #reportRepositories; add: #'MC Working Copies' method: #reportWorkingCopies; add: #'VM General' method: #reportVM; add: #'VM Options' method: #reportVMOptions; add: #'VM Modules' method: #reportModules; add: #'VM Parameters' method: #reportVMParameters; add: #'VM Stats' method: #reportVMStats. Smalltalk os platformName = 'Win32' ifTrue: [ self add: #'VM Configuration' method: #reportWin32VMConfig. ]. self add: #'OS General' method: #reportOS. Smalltalk os platformName = 'Win32' ifTrue: [ self add: #'OS Details' method: #reportWin32OSDetails; add: #'Hardware Details' method: #reportWin32HardwareDetails; add: #'GFX Hardware Details' method: #reportWin32GFXDetails. ]. Smalltalk os osVersion = 'linux' ifTrue: [ self add: #'OS Details' method: #reportLinuxOSDetails ]. self add: #'Tiny Benchmarks' method: #reportTinyBenchmarks; add: #'Space Analysis' method: #reportSpaceAnalysis; add: #'SUnit' method: #reportTestRunner; add: #'Debug Log' method: #reportDebugLog. categoriesSelected := Set with: #Image with: #'VM General'. self updateReport ! Item was added: + ----- Method: SystemReporter>>reportContributors: (in category 'reporting') ----- + reportContributors: stream + + | squeakBoardAuthors | + self header: 'Squeak Contributors' on: stream. + + stream withAttribute: (TextColor color: (Color r: 0 g: 0.5 b: 0)) do: [ + stream nextPutAll: 'If we forgot to mention YOU in this list, please report to board@lists.squeakfoundation.org']. + stream cr. + + "Squeak Oversight Board Members and other influential Squeakers since its first days. :-)" + squeakBoardAuthors := (SystemNavigation authors keys + select: [:nm | #(curtis kaehler ingalls teitelbaum freudenberg latta 't. lewis' muller rowledge taeumel uzonyi assumpcao black causey cleene cunnington groot denker ducasse miranda ohshima putney raab schwartz shearar stasenko vuletich) anySatisfy: [:token | nm includesSubstring: token caseSensitive: false]]). + + stream cr. + squeakBoardAuthors sorted do: [:fullName | + (SystemNavigation authors at: fullName) in: [:abbreviations | + stream nextPutAll: ('{1} ({2})' format: {fullName. abbreviations asArray joinSeparatedBy: ' '}); cr]]. + + stream cr. + stream withAttribute: (TextColor color: (Color r: 0 g: 0.5 b: 0)) do: [ + stream nextPutAll: '_,.-''~''-.,__,.-''~''-.,__,.-''~''-.,__,.-''~''-.,__,.-''~''-.,_']. + stream cr;cr . + + (SystemNavigation authors keys copyWithoutAll: squeakBoardAuthors) sorted do: [:fullName | + (SystemNavigation authors at: fullName) in: [:abbreviations | + stream nextPutAll: ('{1} ({2})' format: {fullName. abbreviations asArray joinSeparatedBy: ' '}); cr]].! From commits at source.squeak.org Fri Jul 29 11:56:36 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 29 11:56:39 2016 Subject: [squeak-dev] The Trunk: SystemReporter-mt.29.mcz Message-ID: Marcel Taeumel uploaded a new version of SystemReporter to project The Trunk: http://source.squeak.org/trunk/SystemReporter-mt.29.mcz ==================== Summary ==================== Name: SystemReporter-mt.29 Author: mt Time: 29 July 2016, 1:56:31.420062 pm UUID: acb6c18a-32cd-0346-a521-610207d5c2f2 Ancestors: SystemReporter-mt.28 Order all Squeak Contributors alphabetically. =============== Diff against SystemReporter-mt.28 =============== Item was changed: ----- Method: SystemReporter>>reportContributors: (in category 'reporting') ----- reportContributors: stream + self header: 'Squeak Contributors (alphabetically)' on: stream. - | squeakBoardAuthors | - self header: 'Squeak Contributors' on: stream. stream withAttribute: (TextColor color: (Color r: 0 g: 0.5 b: 0)) do: [ stream nextPutAll: 'If we forgot to mention YOU in this list, please report to board@lists.squeakfoundation.org']. + stream cr; cr. - stream cr. + SystemNavigation authors keys sorted do: [:fullName | - "Squeak Oversight Board Members and other influential Squeakers since its first days. :-)" - squeakBoardAuthors := (SystemNavigation authors keys - select: [:nm | #(curtis kaehler ingalls teitelbaum freudenberg latta 't. lewis' muller rowledge taeumel uzonyi assumpcao black causey cleene cunnington groot denker ducasse miranda ohshima putney raab schwartz shearar stasenko vuletich) anySatisfy: [:token | nm includesSubstring: token caseSensitive: false]]). - - stream cr. - squeakBoardAuthors sorted do: [:fullName | (SystemNavigation authors at: fullName) in: [:abbreviations | - stream nextPutAll: ('{1} ({2})' format: {fullName. abbreviations asArray joinSeparatedBy: ' '}); cr]]. - - stream cr. - stream withAttribute: (TextColor color: (Color r: 0 g: 0.5 b: 0)) do: [ - stream nextPutAll: '_,.-''~''-.,__,.-''~''-.,__,.-''~''-.,__,.-''~''-.,__,.-''~''-.,_']. - stream cr;cr . - - (SystemNavigation authors keys copyWithoutAll: squeakBoardAuthors) sorted do: [:fullName | - (SystemNavigation authors at: fullName) in: [:abbreviations | stream nextPutAll: ('{1} ({2})' format: {fullName. abbreviations asArray joinSeparatedBy: ' '}); cr]].! From commits at source.squeak.org Fri Jul 29 13:48:35 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 29 13:48:36 2016 Subject: [squeak-dev] The Trunk: System-mt.849.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.849.mcz ==================== Summary ==================== Name: System-mt.849 Author: mt Time: 29 July 2016, 3:48:10.227103 pm UUID: 5adcb3ba-a052-e84f-9b7b-a176d4acff98 Ancestors: System-mt.848 Adds some convenience methods to get more information about the current system version. =============== Diff against System-mt.848 =============== Item was added: + ----- Method: SystemVersion>>isAlpha (in category 'testing') ----- + isAlpha + ^ (version endsWith: #alpha)! Item was added: + ----- Method: SystemVersion>>isCodeFreeze (in category 'testing') ----- + isCodeFreeze + ^ self isFeatureFreeze and: [(version endsWith: #beta) not]! Item was added: + ----- Method: SystemVersion>>isFeatureFreeze (in category 'testing') ----- + isFeatureFreeze + ^ self isAlpha not! Item was added: + ----- Method: SystemVersion>>isRelease (in category 'testing') ----- + isRelease + ^ self isReleaseCandidate not and: [version last isDigit]! Item was added: + ----- Method: SystemVersion>>isReleaseCandidate (in category 'testing') ----- + isReleaseCandidate + ^ (version findTokens: 'rc') size > 1! Item was added: + ----- Method: SystemVersion>>majorVersionNumber (in category 'accessing') ----- + majorVersionNumber + + ^ (version copyFrom: 'Squeak' size to: (version indexOf: $.)) asInteger! Item was added: + ----- Method: SystemVersion>>minorVersionNumber (in category 'accessing') ----- + minorVersionNumber + + | pointIndex | + pointIndex := version indexOf: $.. + ^ (version + copyFrom: pointIndex + to: (self isRelease + "e.g. Squeak5.1" + ifTrue: [version size] + "e.g. Squeak5.1rc5" + ifFalse: [(pointIndex+1 to: version size) detect: [:ea | (version at: ea) isDigit not]])) asInteger! Item was added: + ----- Method: SystemVersion>>releaseCandidateNumber (in category 'accessing') ----- + releaseCandidateNumber + ^ self isReleaseCandidate + ifFalse: [0] + ifTrue: [(version findTokens: 'rc') last asInteger]! From commits at source.squeak.org Fri Jul 29 13:50:13 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 29 13:50:15 2016 Subject: [squeak-dev] The Trunk: ReleaseBuilder-mt.138.mcz Message-ID: Marcel Taeumel uploaded a new version of ReleaseBuilder to project The Trunk: http://source.squeak.org/trunk/ReleaseBuilder-mt.138.mcz ==================== Summary ==================== Name: ReleaseBuilder-mt.138 Author: mt Time: 29 July 2016, 3:50:05.208103 pm UUID: 3a79fdbe-4a63-c44d-84d2-561de7f32556 Ancestors: ReleaseBuilder-mt.137 Improve release building process. Some clean-up. Automate this and that. :-) Add the "alpha" suffix for the current trunk version again. =============== Diff against ReleaseBuilder-mt.137 =============== Item was changed: Object subclass: #ReleaseBuilder instanceVariableNames: '' + classVariableNames: 'DeferredTask NextMajorVersion NextMinorVersion NextTask' - classVariableNames: '' poolDictionaries: '' category: 'ReleaseBuilder'! + !ReleaseBuilder commentStamp: 'mt 6/22/2016 18:08' prior: 0! + I'm the script that prepares a trunk image for release. - !ReleaseBuilder commentStamp: 'mt 5/12/2016 16:50' prior: 0! - I'm the script that prepares a trunk image for release. For the next release version please update #releaseVersionMajor and #releaseVersionMinor. + Just do "ReleaseBuilder doNextStep" repeatedly until the next release is done. - Prepare and save this image as a release image via "ReleaseBuilder saveAsNewRelease." - If you want to save this image as the next alpha release, do: "ReleaseBuilder saveAsNextVersionAlpha." + For the final release step: + - If you want to try it locally, change #localBuild to return true. + - Most of the code operates (read-only) on the build repository, which is usually the trunk. For releases, there is a release repository, to which some package versions will be copied from trunk.! - If you want to try it locally, change #localBuild to return true. - - Most of the code operates (read-only) on the build repository, which is usually the trunk. For releases, there is a release repository, to which some package versions will be copied from trunk.! Item was added: + ----- Method: ReleaseBuilder class>>assureReleaseRepositoryReadAccess: (in category 'manual') ----- + assureReleaseRepositoryReadAccess: repo + + self releaseLocally ifTrue: [ + (FileDirectory on: repo description) assureExistence. + ^ true]. + + [repo allFileNames] on: NetworkError do: [ + UserDialogBoxMorph + inform: ('Please create the release repository:\{1}\...and ensure that you have global read access to it.' withCRs + format: {repo description}) title: 'Release Builder - Manual Step Required'. + ^ false]. + ^ true! Item was added: + ----- Method: ReleaseBuilder class>>assureReleaseRepositoryWriteAccess: (in category 'manual') ----- + assureReleaseRepositoryWriteAccess: repo + + self releaseLocally ifTrue: [^ self]. + + repo + user: (UIManager default + request: 'Enter user for ', repo description + initialAnswer: (repo user ifEmpty: [Utilities authorInitials])); + password: (UIManager default + requestPassword: 'Enter password for ' , repo description).! Item was changed: ----- Method: ReleaseBuilder class>>configureTools (in category 'scripts') ----- configureTools "Initialize well-known tools and other resources." TTCFont registerAll. + StrikeFont initialize. FileList initialize. "register file reader services" RealEstateAgent standardSize: 600 @ 400. SMLoaderPlus setDefaultFilters: #(filterSafelyAvailable). ! Item was added: + ----- Method: ReleaseBuilder class>>copyPackages (in category 'manual') ----- + copyPackages + "For bootstrapping the contents of the release repository." + + self copyPackagesFrom: self buildRepository to: self releaseRepository depth: 1.! Item was changed: + ----- Method: ReleaseBuilder class>>copyPackagesFrom:to:depth: (in category 'manual') ----- - ----- Method: ReleaseBuilder class>>copyPackagesFrom:to:depth: (in category 'scripts - support') ----- copyPackagesFrom: sourceRepository to: targetRepository depth: historyDepth "Copy the packages currently loaded in the image from the source repository to a target repository. Follow ancestry up to the depth specified." | currentDepth nextVersions currentVersions ignoredVersions | currentDepth := 0. nextVersions := (MCWorkingCopy allManagers gather: [:wc | wc ancestors]) asOrderedCollection. ignoredVersions := OrderedCollection new. [nextVersions notEmpty] whileTrue: [ currentVersions := nextVersions. nextVersions := OrderedCollection new. currentDepth := currentDepth + 1. currentVersions do: [:versionInfo | (targetRepository includesVersionNamed: versionInfo versionName) ifTrue: [Transcript showln: ('[ReleaseBuilder] Version {1} already exists in {2}' format: {versionInfo versionName. targetRepository description})] ifFalse: [(sourceRepository versionWithInfo: versionInfo) ifNil: [ignoredVersions add: versionInfo] ifNotNil: [:version | targetRepository storeVersion: version ] ]. currentDepth < historyDepth ifTrue: [ nextVersions addAll: versionInfo ancestors]]]. ignoredVersions ifNotEmpty: [ ignoredVersions explore. Warning signal: 'There were versions not found in the source repository.'].! Item was added: + ----- Method: ReleaseBuilder class>>copyUpdateMap (in category 'manual') ----- + copyUpdateMap + "For bootstrapping the contents of the release repository." + + self copyUpdateMap: self buildConfiguration to: self releaseRepository.! Item was added: + ----- Method: ReleaseBuilder class>>copyUpdateMap:to: (in category 'manual') ----- + copyUpdateMap: configuration to: targetRepository + + | newConfig | + newConfig := MCConfiguration new. + newConfig repositories add: targetRepository. + newConfig dependencies addAll: configuration dependencies. + newConfig name: configuration name. + + targetRepository storeVersion: newConfig.! Item was removed: - ----- Method: ReleaseBuilder class>>copyUpdateMapTo: (in category 'scripts - support') ----- - copyUpdateMapTo: targetRepository - - self buildConfiguration in: [:config | - | newConfig | - newConfig := MCConfiguration new. - newConfig repositories add: targetRepository. - newConfig dependencies addAll: config dependencies. - newConfig name: config name. - - targetRepository storeVersion: newConfig].! Item was added: + ----- Method: ReleaseBuilder class>>doNextStep (in category 'manual') ----- + doNextStep + "Use this call to perform the manual steps in the release process." + + | versionString | + SystemVersion current isRelease ifTrue: [ + ^ self inform: 'This is a release image. Please use a trunk image to prepare the next release']. + + versionString := SystemVersion current version. + + SystemVersion current isAlpha ifTrue: [^ self step1FeatureFreeze]. + SystemVersion current isFeatureFreeze ifTrue: [^ self step2CodeFreeze]. + SystemVersion current isReleaseCandidate ifTrue: [ + "Still code freeze and another RC? Or do the release?" + (UIManager default + chooseFrom: #('Create next release candidate' 'Create next release' 'Do nothing') lines: #(2) + title: versionString) in: [:answer | + answer = 1 ifTrue: [^ self step3NextReleaseCandidate]. + answer = 2 ifTrue: [^ self step4Release]]. + ^ self].! Item was added: + ----- Method: ReleaseBuilder class>>initialize (in category 'class initialization') ----- + initialize + Smalltalk addToStartUpList: self. + + SystemVersion newVersion: 'Squeak5.1alpha'.! Item was removed: - ----- Method: ReleaseBuilder class>>localBuild (in category 'accessing') ----- - localBuild - "If true, use a local, directory-based repository. Usually in the working directory." - - ^ true! Item was removed: - ----- Method: ReleaseBuilder class>>prepareNewRelease (in category 'preparing') ----- - prepareNewRelease - "This method is run at time of release to transfer the top trunk versions into my releaseRepository, and produce a release image." - - | source target | - source := self buildRepository. - target := self releaseRepository. - - [ self - setTopProject; - prepareSourceCode; - copyPackagesFrom: source to: target depth: 1; - copyUpdateMapTo: target; - prepareEnvironment; - switchToNewRepository: target. - ] on: MCEmptyVersion do: [:warning | warning resume]. - - SystemVersion newVersion: self versionString.! Item was removed: - ----- Method: ReleaseBuilder class>>prepareNextVersionAlpha (in category 'preparing') ----- - prepareNextVersionAlpha - "Prepare the first alpha image for next release." - - self - setTopProject; - prepareSourceCode; - prepareEnvironment; - switchToNewRepository: self buildRepository. - - SystemVersion newVersion: self versionStringAlpha.! Item was added: + ----- Method: ReleaseBuilder class>>releaseLocally (in category 'accessing') ----- + releaseLocally + "If true, use a local, directory-based repository. Usually in the working directory." + + ^ true! Item was changed: ----- Method: ReleaseBuilder class>>releaseRepository (in category 'accessing') ----- releaseRepository + (MCRepositoryGroup default repositories + detect: [:repo | repo description = self releaseRepositoryUrl] + ifNone: [MCRepository location: self releaseRepositoryUrl]) + in: [:repo | + MCRepositoryGroup default addRepository: repo. + (self assureReleaseRepositoryReadAccess: repo) + ifFalse: [ReleaseBuilderFailed signal: 'Could not build the release.']. + ^ repo]! - ^ (MCRepository location: self releaseRepositoryUrl) in: [:repo | - self localBuild ifFalse: [ - repo - user: (UIManager default - request: 'Enter user for ', self releaseRepositoryUrl - initialAnswer: Utilities authorInitials); - password: (UIManager default - requestPassword: 'Enter password for ' , self releaseRepositoryUrl)]. - repo].! Item was added: + ----- Method: ReleaseBuilder class>>releaseRepositoryName (in category 'accessing') ----- + releaseRepositoryName + + ^ (self versionString copyWithout: $.) asLowercase! Item was changed: ----- Method: ReleaseBuilder class>>releaseRepositoryUrl (in category 'accessing') ----- releaseRepositoryUrl + ^ self releaseLocally + ifFalse: [self serverUrl, '/', self releaseRepositoryName] + ifTrue: [(FileDirectory default on: 'repositories', FileDirectory slash, self releaseRepositoryName) fullName]! - ^ self localBuild - ifFalse: [(self serverUrl, '/', (self versionString copyWithout: $.)) asLowercase] - ifTrue: [(FileDirectory default on: 'repositories', FileDirectory slash, (self versionString copyWithout: $.) asLowercase) - assureExistence; - fullName]! Item was changed: ----- Method: ReleaseBuilder class>>releaseVersionMajor (in category 'accessing') ----- releaseVersionMajor + ^ NextMajorVersion ifNil: [5]! - ^ 5! Item was changed: ----- Method: ReleaseBuilder class>>releaseVersionMinor (in category 'accessing') ----- releaseVersionMinor + ^ NextMinorVersion ifNil: [1]! - ^ 1! Item was added: + ----- Method: ReleaseBuilder class>>requestNextReleaseVersion (in category 'manual - steps') ----- + requestNextReleaseVersion + "self requestNextReleaseVersion" + + | nextMinor nextMajor current | + current := { + SystemVersion current majorVersionNumber. + SystemVersion current minorVersionNumber}. + nextMinor := { + current first. + current second + 1}. + nextMajor := { + current first + 1. + 0}. + + (UIManager default + chooseFrom: { + '{1}.{2}' format: {nextMinor first. nextMinor second}. + '{1}.{2}' format: {nextMajor first. nextMajor second}} + title: 'Please Choose Next Version') in: [:answer | + answer ifNil: [^ false]. + answer = 1 ifTrue: [ + NextMinorVersion := nextMinor second]. + answer = 2 ifTrue: [ + NextMajorVersion := nextMajor first. + NextMinorVersion := 0]]. + + ^ true! Item was removed: - ----- Method: ReleaseBuilder class>>saveAsNewRelease (in category 'saving') ----- - saveAsNewRelease - "ReleaseManager saveAsNewRelease" - - (Project current uiManager - confirm: 'About to build new release', (self localBuild ifTrue: [' (locally!!)'] ifFalse: ['']),': ', self versionString, String cr, String cr, 'The VM will quit after that. Continue?' - title: 'Release Builder') ifFalse: [^ self]. - - self prepareNewRelease. - Smalltalk saveAs: self versionString, '-', SystemVersion current highestUpdate asString, (self localBuild ifTrue: ['-offline'] ifFalse: ['']). - Smalltalk condenseChanges. - Smalltalk snapshot: true "Important!!" andQuit: true.! Item was added: + ----- Method: ReleaseBuilder class>>saveAsNewTrunk (in category 'saving') ----- + saveAsNewTrunk + "Use this to create a new trunk image to be used by smalltalkCI." + + | fileName | + fileName := ('squeak-trunk{1}' format: { + self releaseLocally ifTrue: ['-offline'] ifFalse: ['']}). + + [ self + setTopProject; + prepareSourceCode; + prepareEnvironment; + switchToNewRepository: self buildRepository. + ] on: MCEmptyVersion do: [:warning | warning resume]. + + Smalltalk saveAs: fileName. + + Smalltalk condenseChanges. + Smalltalk snapshot: true "Important!!" andQuit: true.! Item was removed: - ----- Method: ReleaseBuilder class>>saveAsNextVersionAlpha (in category 'saving') ----- - saveAsNextVersionAlpha - "ReleaseBuilder saveNextVersionAlpha." - - (Project current uiManager - confirm: 'About to build new release', (self localBuild ifTrue: [' (locally!!)'] ifFalse: ['']),': ', self versionStringAlpha, String cr, String cr, 'The VM will quit after that. Continue?' - title: 'Release Builder') ifFalse: [^ self]. - - self prepareNextVersionAlpha. - Smalltalk saveAs: self versionStringAlpha, '-', SystemVersion current highestUpdate asString, (self localBuild ifTrue: ['-offline'] ifFalse: ['']). - Smalltalk condenseChanges. - Smalltalk snapshot: true "Important!!" andQuit: true.! Item was added: + ----- Method: ReleaseBuilder class>>setNewSystemVersion: (in category 'manual') ----- + setNewSystemVersion: version + + self class + compile: ('initialize + Smalltalk addToStartUpList: self. + + SystemVersion newVersion: ''{1}''.' format: {version}) + classified: 'class initialization'. + + self initialize.! Item was changed: ----- Method: ReleaseBuilder class>>setPreferences (in category 'scripts') ----- setPreferences "Preferences class defaultValueTableForCurrentRelease" " Preferences outOfTheBox." "<-- uncomment after #defaultValueTableForCurrentRelease is fixed up." "General User interaction" Preferences enable: #generalizedYellowButtonMenu ; enable: #swapMouseButtons; disable: #mouseOverForKeyboardFocus. Morph indicateKeyboardFocus: true. ToolBuilder openToolsAttachedToMouseCursor: false. SearchBar useScratchPad: false. "Text input." TextEditor autoEnclose: true ; autoIndent: true ; destructiveBackWord: false ; blinkingCursor: true ; dumbbellCursor: false. Preferences insertionPointColor: Color red. PluggableTextMorph simpleFrameAdornments: false. "Windows" - Preferences installUniformWindowColors. SystemWindow reuseWindows: false. SystemWindow windowsActiveOnlyOnTop: true. Model windowActiveOnFirstClick: false. "Not good for 800x600" Preferences disable: #showSplitterHandles; enable: #fastDragWindowForMorphic. CornerGripMorph drawCornerResizeHandles: false. ProportionalSplitterMorph smartHorizontalSplitters: false ; smartVerticalSplitters: false. "Scroll bars." Preferences enable: #scrollBarsNarrow; enable: #scrollBarsOnRight; disable: #alwaysHideHScrollbar; disable: #alwaysShowHScrollbar; disable: #alwaysShowVScrollbar. ScrollBar scrollBarsWithoutArrowButtons: true; scrollBarsWithoutMenuButton: true. ScrollPane useRetractableScrollBars: false. "Rounded corners." Morph preferredCornerRadius: 6. SystemWindow roundedWindowCorners: false. PluggableButtonMorph roundedButtonCorners: false. FillInTheBlankMorph roundedDialogCorners: false. MenuMorph roundedMenuCorners: false. ScrollBar roundedScrollBarLook: false. "Gradients." ScrollBar gradientScrollBar: false. SystemWindow gradientWindow: false. MenuMorph gradientMenu: false. PluggableButtonMorph gradientButton: false. "Shadows" Preferences enable: #menuAppearance3d. - MenuMorph - menuBorderWidth: 1; - menuBorderColor: Color lightGray; - menuLineColor: Color lightGray. Morph useSoftDropShadow: true.. "Lists and Trees" PluggableListMorph filterableLists: true; clearFilterAutomatically: false; highlightHoveredRow: true; menuRequestUpdatesSelection: true. PluggableTreeMorph filterByLabelsOnly: false; maximumSearchDepth: 1. - LazyListMorph - listSelectionTextColor: Color black; - listSelectionColor: (Color r: 0.72 g: 0.72 b: 0.9). "Standard Tools" - BalloonMorph balloonColor: (Color r: 0.92 g: 0.92 b: 0.706). Workspace shouldStyle: false. Browser listClassesHierarchically: true; showClassIcons: true; showMessageIcons: true; sortMessageCategoriesAlphabetically: true. Preferences enable: #annotationPanes; enable: #optionalButtons; enable: #diffsWithPrettyPrint; enable: #traceMessages; enable: #alternativeBrowseIt; enable: #menuWithIcons; enable: #visualExplorer. SystemNavigation thoroughSenders: true. Preferences disable: #debugLogTimestamp. "Halo" Preferences enable: #showBoundsInHalo ; disable: #alternateHandlesLook. "System" NetNameResolver enableIPv6: false. Scanner allowUnderscoreAsAssignment: true; prefAllowUnderscoreSelectors: true. "that's all, folks"! Item was added: + ----- Method: ReleaseBuilder class>>startUp: (in category 'class initialization') ----- + startUp: resuming + resuming + ifTrue: [DeferredTask ifNotNil: [:task | DeferredTask := nil. task value]. NextTask := nil] + ifFalse: [NextTask ifNotNil: [:task | NextTask := nil. task value]. DeferredTask := nil].! Item was added: + ----- Method: ReleaseBuilder class>>step0AssureAlpha (in category 'manual - steps') ----- + step0AssureAlpha + + self requestNextReleaseVersion ifFalse: [^ self]. + self setNewSystemVersion: self versionString, 'alpha'.! Item was added: + ----- Method: ReleaseBuilder class>>step1FeatureFreeze (in category 'manual - steps') ----- + step1FeatureFreeze + + (UIManager default + confirm: ('Do you really want to feature-freeze the trunk\in preparation for the next release {1}?\Bugfixes only after this.' withCRs format: {self versionString}) + title: 'Release Builder Step 1 of 4: Feature Freeze') ifFalse: [^ self]. + + self setNewSystemVersion: self versionString, 'beta'.! Item was added: + ----- Method: ReleaseBuilder class>>step2CodeFreeze (in category 'manual - steps') ----- + step2CodeFreeze + "Creates the first release candidate." + + (UIManager default + confirm: ('Do you really want to code-freeze the trunk\in preparation for the next release {1}?\Urgent fixes only after this.' withCRs format: {self versionString}) + title: 'Release Builder Step 2 of 4: Code Freeze') ifFalse: [^ self]. + + self setNewSystemVersion: self versionString, 'rc', (SystemVersion current releaseCandidateNumber + 1) asString.! Item was added: + ----- Method: ReleaseBuilder class>>step3NextReleaseCandidate (in category 'manual - steps') ----- + step3NextReleaseCandidate + "Creates additional release candidates." + "update version, update post load script, add stuff commit" + + (UIManager default + confirm: ('Do you want create another release candidate\for the next release {1}?\Urgent fixes still possible.' withCRs format: {self versionString}) + title: 'Release Builder Step 3 of 4: Release Candidate') ifFalse: [^ self]. + + self setNewSystemVersion: self versionString, 'rc', (SystemVersion current releaseCandidateNumber + 1) asString.! Item was added: + ----- Method: ReleaseBuilder class>>step4Release (in category 'manual - steps') ----- + step4Release + "Creates the release. New file, clean-ed up." + + | fileName | + (UIManager default + confirm: ('Do you want release {1}{2}?' withCRs format: { + self versionString. + (self releaseLocally ifTrue: [' locally'] ifFalse: [''])}) + title: 'Release Builder Step 4 of 4: The Release') + ifFalse: [^ self]. + + "If you re-open the current trunk image again, it will be an alpha version for the next release." + DeferredTask := [self step0AssureAlpha]. + Smalltalk snapshot: true andQuit: false. + + "Create new .image and .changes files for the release image." + self setNewSystemVersion: self versionString. + fileName := ('squeak-{1}.{2}{3}' format: { + SystemVersion current majorVersionNumber. + SystemVersion current minorVersionNumber. + self releaseLocally ifTrue: ['-offline'] ifFalse: ['']}). + Smalltalk saveAs: fileName. + + "Update the image state." + [ self + setTopProject; + prepareSourceCode; + prepareEnvironment; + switchToNewRepository: self releaseRepository. + ] on: MCEmptyVersion do: [:warning | warning resume]. + + NextTask := [self uploadForSmalltalkCI: fileName.]. + + Smalltalk condenseChanges. + Smalltalk snapshot: true "Important!!" andQuit: false.! Item was added: + ----- Method: ReleaseBuilder class>>uploadForSmalltalkCI: (in category 'manual') ----- + uploadForSmalltalkCI: fileName + "TODO Automate upload." + + self releaseLocally ifTrue: [ + ^ UserDialogBoxMorph + inform: ('Please do never upload images that are meant to be used locally.') + title: 'Release Builder - Local Release Finished'.]. + + UserDialogBoxMorph + inform: ('Please upload {1] and {2} to files.squeak.org/smalltalkCI' format: {fileName, '.image'. fileName, '.changes'}) + title: 'Release Builder - Almost Done'.! Item was added: + Error subclass: #ReleaseBuilderFailed + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'ReleaseBuilder'! From commits at source.squeak.org Fri Jul 29 15:01:29 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 29 15:01:30 2016 Subject: [squeak-dev] The Trunk: System-mt.850.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.850.mcz ==================== Summary ==================== Name: System-mt.850 Author: mt Time: 29 July 2016, 5:01:02.699103 pm UUID: 0ab532ec-842f-c947-9d48-f7a2ff444b8d Ancestors: System-mt.849 Adds descriptions for the current starte of the system version. =============== Diff against System-mt.849 =============== Item was added: + ----- Method: SystemVersion>>description (in category 'printing') ----- + description + + self isAlpha ifTrue: [^ 'This is an ALPHA version. It means that new features might be\introduced with each update or that very basic functions might\be quite buggy at the moment.\\Please refrain from using this version for important projects.' translated withCRs]. + + self isFeatureFreeze ifTrue: [^ 'This is a FEATURE FREEZE version. We are in the middle of preparing\a new release. It means that there will be no new features but only bugfixes.\\Please do not contribute new features at the moment. ;-)' translated withCRs]. + + self isCodeFreeze ifTrue: [^ 'This is a RELEASE CANDIDATE version. It means that we are almost\done preparing the new release.\\Please do ONLY contribute URGENT fixes. Thank you. :-)' translated withCRs]. + + self isRelease ifTrue: [^ self inform: 'This is a release version. It means that there will be only\bugfixes but no new features.\\Have fun. :-)' translated withCRs].! From commits at source.squeak.org Fri Jul 29 15:02:10 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 29 15:02:11 2016 Subject: [squeak-dev] The Trunk: ReleaseBuilder-mt.139.mcz Message-ID: Marcel Taeumel uploaded a new version of ReleaseBuilder to project The Trunk: http://source.squeak.org/trunk/ReleaseBuilder-mt.139.mcz ==================== Summary ==================== Name: ReleaseBuilder-mt.139 Author: mt Time: 29 July 2016, 5:02:02.533103 pm UUID: cee7fc24-d57e-8a46-a5d7-142aa6e0d44d Ancestors: ReleaseBuilder-mt.138 Some updates for guided release process. =============== Diff against ReleaseBuilder-mt.138 =============== Item was changed: ----- Method: ReleaseBuilder class>>buildConfiguration (in category 'accessing') ----- buildConfiguration | max versionName | max := 0. versionName := ''. + (self buildRepository versionNamesForPackageNamed: MCMcmUpdater updateMapName) do: [:nm | - (self buildRepository versionNamesForPackageNamed: 'update') do: [:nm | ((nm findTokens: $.) atLast: 2) asInteger in: [:versionNumber | versionNumber > max ifTrue: [max := versionNumber. versionName := nm]]]. ^ self buildRepository versionNamed: versionName ! Item was changed: ----- Method: ReleaseBuilder class>>requestNextReleaseVersion (in category 'manual - steps') ----- requestNextReleaseVersion "self requestNextReleaseVersion" | nextMinor nextMajor current | current := { SystemVersion current majorVersionNumber. SystemVersion current minorVersionNumber}. nextMinor := { current first. current second + 1}. nextMajor := { current first + 1. 0}. (UIManager default chooseFrom: { '{1}.{2}' format: {nextMinor first. nextMinor second}. '{1}.{2}' format: {nextMajor first. nextMajor second}} title: 'Please Choose Next Version') in: [:answer | + answer ifNil: [^ self requestNextReleaseVersion]. - answer ifNil: [^ false]. answer = 1 ifTrue: [ NextMinorVersion := nextMinor second]. answer = 2 ifTrue: [ NextMajorVersion := nextMajor first. + NextMinorVersion := 0]].! - NextMinorVersion := 0]]. - - ^ true! Item was changed: ----- Method: ReleaseBuilder class>>setNewSystemVersion: (in category 'manual') ----- setNewSystemVersion: version self class compile: ('initialize Smalltalk addToStartUpList: self. SystemVersion newVersion: ''{1}''.' format: {version}) classified: 'class initialization'. + self initialize. + + SystemVersion current isRelease + ifFalse: [self uploadNewSystemVersion].! - self initialize.! Item was changed: ----- Method: ReleaseBuilder class>>startUp: (in category 'class initialization') ----- startUp: resuming resuming + ifTrue: [NextTask := nil. DeferredTask ifNotNil: [:task | DeferredTask := nil. task value]] + ifFalse: [DeferredTask := nil. NextTask ifNotNil: [:task | NextTask := nil. task value]].! - ifTrue: [DeferredTask ifNotNil: [:task | DeferredTask := nil. task value]. NextTask := nil] - ifFalse: [NextTask ifNotNil: [:task | NextTask := nil. task value]. DeferredTask := nil].! Item was changed: ----- Method: ReleaseBuilder class>>step0AssureAlpha (in category 'manual - steps') ----- step0AssureAlpha + "Re-open the trunk again." + + self requestNextReleaseVersion. - - self requestNextReleaseVersion ifFalse: [^ self]. self setNewSystemVersion: self versionString, 'alpha'.! Item was changed: ----- Method: ReleaseBuilder class>>step1FeatureFreeze (in category 'manual - steps') ----- step1FeatureFreeze (UIManager default confirm: ('Do you really want to feature-freeze the trunk\in preparation for the next release {1}?\Bugfixes only after this.' withCRs format: {self versionString}) title: 'Release Builder Step 1 of 4: Feature Freeze') ifFalse: [^ self]. self setNewSystemVersion: self versionString, 'beta'.! Item was changed: ----- Method: ReleaseBuilder class>>step4Release (in category 'manual - steps') ----- step4Release "Creates the release. New file, clean-ed up." - | fileName | (UIManager default confirm: ('Do you want release {1}{2}?' withCRs format: { self versionString. (self releaseLocally ifTrue: [' locally'] ifFalse: [''])}) title: 'Release Builder Step 4 of 4: The Release') ifFalse: [^ self]. "If you re-open the current trunk image again, it will be an alpha version for the next release." DeferredTask := [self step0AssureAlpha]. - Smalltalk snapshot: true andQuit: false. + "We continue with preparing the release image." + NextTask := [self step5DoRelease]. - "Create new .image and .changes files for the release image." - self setNewSystemVersion: self versionString. - fileName := ('squeak-{1}.{2}{3}' format: { - SystemVersion current majorVersionNumber. - SystemVersion current minorVersionNumber. - self releaseLocally ifTrue: ['-offline'] ifFalse: ['']}). - Smalltalk saveAs: fileName. - - "Update the image state." - [ self - setTopProject; - prepareSourceCode; - prepareEnvironment; - switchToNewRepository: self releaseRepository. - ] on: MCEmptyVersion do: [:warning | warning resume]. + "Now save it but do not quit." + Smalltalk snapshot: true andQuit: false.! - NextTask := [self uploadForSmalltalkCI: fileName.]. - - Smalltalk condenseChanges. - Smalltalk snapshot: true "Important!!" andQuit: false.! Item was added: + ----- Method: ReleaseBuilder class>>step5DoRelease (in category 'manual - steps') ----- + step5DoRelease + "Creates the release. New file, clean-ed up." + + | fileName | + + "Create new .image and .changes files for the release image." + self setNewSystemVersion: self versionString. + fileName := ('squeak-{1}.{2}{3}' format: { + SystemVersion current majorVersionNumber. + SystemVersion current minorVersionNumber. + self releaseLocally ifTrue: ['-offline'] ifFalse: ['']}). + Smalltalk saveAs: fileName. + + "Update the image state." + [ self + setTopProject; + prepareSourceCode; + prepareEnvironment; + switchToNewRepository: self releaseRepository. + ] on: MCEmptyVersion do: [:warning | warning resume]. + + NextTask := [self uploadForSmalltalkCI: fileName.]. + + Smalltalk condenseChanges. + Smalltalk snapshot: true "Important!!" andQuit: false. + "Finished. See NextTask."! Item was added: + ----- Method: ReleaseBuilder class>>uploadNewSystemVersion (in category 'manual') ----- + uploadNewSystemVersion + "TODO: Just commit changes in the ReleaseBuilder because #initialize will change the system version:" + + UIManager default + confirm: 'Do you want to set the new system version for all?' + title: 'Publish New System Version'. + + + self inform: 'Upload not implemented.'.! From commits at source.squeak.org Fri Jul 29 15:03:24 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 29 15:03:25 2016 Subject: [squeak-dev] The Trunk: MonticelloConfigurations-mt.143.mcz Message-ID: Marcel Taeumel uploaded a new version of MonticelloConfigurations to project The Trunk: http://source.squeak.org/trunk/MonticelloConfigurations-mt.143.mcz ==================== Summary ==================== Name: MonticelloConfigurations-mt.143 Author: mt Time: 29 July 2016, 5:03:17.048103 pm UUID: 0c21d221-5b25-084d-9a20-df5f67ba0b9e Ancestors: MonticelloConfigurations-dtl.142 A more descriptive information dialog after the update finished. =============== Diff against MonticelloConfigurations-dtl.142 =============== Item was changed: ----- Method: MCMcmUpdater>>doUpdate: (in category 'updating') ----- doUpdate: interactive "Update the image by loading all pending updates from the server. If this is the default updater for the system, update the system version when complete. If interteractive use a modal notifier, otherwise only update the transcript. Flush all caches. If a previous download failed this is often helpful" | config | MCFileBasedRepository flushAllCaches. config := self updateFromRepositories: { self repository }. config ifNil: [ interactive ifTrue: [ ^self inform: 'Unable to retrieve updates from remote repository.' translated ]. Transcript cr; show: '========== Unable to retrieve updates from remote repository. ==========' translated; cr. ^ self ]. MCMcmUpdater default == self ifTrue: [ config setSystemVersion. + interactive ifTrue: [ + self inform: ('Update completed.\\Version: {1}\Update: {2}\\Url: {3}\Map: ''{4}''\\{5}' translated withCRs format: { + SystemVersion current version. + SystemVersion current highestUpdate. + self repository. + MCMcmUpdater updateMapName. + SystemVersion current description})]. - interactive ifTrue: [ self inform: ('Update completed. - Current update number: ' translated, SystemVersion current highestUpdate) ]. Transcript cr; show: '========== Update completed. Current update number ' translated; show: SystemVersion current highestUpdate; show: ' =========='; cr ] ifFalse: [ interactive ifTrue: [ self inform: 'Update completed.' ]. Transcript cr; show: '========== Update completed. ==========' translated; cr ] ! From Yoshiki.Ohshima at acm.org Fri Jul 29 17:02:12 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Fri Jul 29 17:02:16 2016 Subject: [squeak-dev] Smallapack In-Reply-To: References: Message-ID: First question: The Mac OS comes with Accelerate.Framework and that contains BLAS. But probably I still should compile those libraries, right? On Thu, Jul 28, 2016 at 4:11 PM, Yoshiki Ohshima wrote: > Thanks! > > On Thu, Jul 28, 2016 at 4:04 PM, Nicolas Cellier > wrote: >> Hi Yoshiki, >> >> Thanks for inquiring about Smallapack. >> >> This problem has been solved in 2011 as the post tells. >> Moreover, it was about alignment of squeak objects that was on multiple of 4 >> on SqueakV3 memory. >> Spur is 8 byte aligned, so the problem would have also vanished without any >> patch for those being patient :) >> >> For the 15 arguments limit, Smallapack comes with it's own compiler, so it's >> a non issue. >> Maybe I should make the documentation more clear on >> https://github.com/nicolas-cellier-aka-nice/smallapack/wiki/SmallapackSqueak >> ? >> >> Unfortunately, there's no Sparse Matrix representation in Lapack. >> If you know of a good package for that, it could be integrated. >> >> If you have other questions, don't hesitate to ask. >> >> cheers >> >> Nicolas >> >> 2016-07-29 0:22 GMT+02:00 Yoshiki Ohshima : >>> >>> I am trying to do a bit of linear algebra stuff that involves to solve >>> a sparse 2D matrix (for a variation of doing least square fit). >>> >>> There was a message from Nicolas: >>> >>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-August/161113.html >>> >>> Is this where it stands today, too? It looks like that arg count >>> problem is still there in 5.0, but is it in a way non-issue as it is >>> still FFI based? >>> >>> Thanks! >>> >>> -- >>> -- Yoshiki >>> >> >> >> >> > > > > -- > -- Yoshiki -- -- Yoshiki From nicolas.cellier.aka.nice at gmail.com Fri Jul 29 17:28:58 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Fri Jul 29 17:29:01 2016 Subject: [squeak-dev] Smallapack In-Reply-To: References: Message-ID: 2016-07-29 19:02 GMT+02:00 Yoshiki Ohshima : > First question: > > The Mac OS comes with Accelerate.Framework and that contains BLAS. > But probably I still should compile those libraries, right? > > No, it's better to link to accelerated library. I don't have a Mac handy here to verify how to link to it though. I'll be able to check latter in the evening > > On Thu, Jul 28, 2016 at 4:11 PM, Yoshiki Ohshima > wrote: > > Thanks! > > > > On Thu, Jul 28, 2016 at 4:04 PM, Nicolas Cellier > > wrote: > >> Hi Yoshiki, > >> > >> Thanks for inquiring about Smallapack. > >> > >> This problem has been solved in 2011 as the post tells. > >> Moreover, it was about alignment of squeak objects that was on multiple > of 4 > >> on SqueakV3 memory. > >> Spur is 8 byte aligned, so the problem would have also vanished without > any > >> patch for those being patient :) > >> > >> For the 15 arguments limit, Smallapack comes with it's own compiler, so > it's > >> a non issue. > >> Maybe I should make the documentation more clear on > >> > https://github.com/nicolas-cellier-aka-nice/smallapack/wiki/SmallapackSqueak > >> ? > >> > >> Unfortunately, there's no Sparse Matrix representation in Lapack. > >> If you know of a good package for that, it could be integrated. > >> > >> If you have other questions, don't hesitate to ask. > >> > >> cheers > >> > >> Nicolas > >> > >> 2016-07-29 0:22 GMT+02:00 Yoshiki Ohshima : > >>> > >>> I am trying to do a bit of linear algebra stuff that involves to solve > >>> a sparse 2D matrix (for a variation of doing least square fit). > >>> > >>> There was a message from Nicolas: > >>> > >>> > http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-August/161113.html > >>> > >>> Is this where it stands today, too? It looks like that arg count > >>> problem is still there in 5.0, but is it in a way non-issue as it is > >>> still FFI based? > >>> > >>> Thanks! > >>> > >>> -- > >>> -- Yoshiki > >>> > >> > >> > >> > >> > > > > > > > > -- > > -- Yoshiki > > > > -- > -- Yoshiki > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160729/287f4540/attachment.htm From nicolas.cellier.aka.nice at gmail.com Fri Jul 29 17:41:50 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Fri Jul 29 17:41:52 2016 Subject: [squeak-dev] Smallapack In-Reply-To: References: Message-ID: 2016-07-29 19:28 GMT+02:00 Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com>: > > > 2016-07-29 19:02 GMT+02:00 Yoshiki Ohshima : > >> First question: >> >> The Mac OS comes with Accelerate.Framework and that contains BLAS. >> But probably I still should compile those libraries, right? >> >> > No, it's better to link to accelerated library. > I don't have a Mac handy here to verify how to link to it though. > I'll be able to check latter in the evening > > I've downloaded the code, and I see it now: the library names are hardcoded (see implementors of moduleName). For Mac it is libblas.dylib and libcblas.dylib Also note that there is a preference for switching to cblas (blas functions with C interface). This should be faster because we pass some parameters by value rather than allocating them and pass reference... Module names could also be replaced by Preferences eventually, but by now, you'll have to override... > >> On Thu, Jul 28, 2016 at 4:11 PM, Yoshiki Ohshima >> wrote: >> > Thanks! >> > >> > On Thu, Jul 28, 2016 at 4:04 PM, Nicolas Cellier >> > wrote: >> >> Hi Yoshiki, >> >> >> >> Thanks for inquiring about Smallapack. >> >> >> >> This problem has been solved in 2011 as the post tells. >> >> Moreover, it was about alignment of squeak objects that was on >> multiple of 4 >> >> on SqueakV3 memory. >> >> Spur is 8 byte aligned, so the problem would have also vanished >> without any >> >> patch for those being patient :) >> >> >> >> For the 15 arguments limit, Smallapack comes with it's own compiler, >> so it's >> >> a non issue. >> >> Maybe I should make the documentation more clear on >> >> >> https://github.com/nicolas-cellier-aka-nice/smallapack/wiki/SmallapackSqueak >> >> ? >> >> >> >> Unfortunately, there's no Sparse Matrix representation in Lapack. >> >> If you know of a good package for that, it could be integrated. >> >> >> >> If you have other questions, don't hesitate to ask. >> >> >> >> cheers >> >> >> >> Nicolas >> >> >> >> 2016-07-29 0:22 GMT+02:00 Yoshiki Ohshima : >> >>> >> >>> I am trying to do a bit of linear algebra stuff that involves to solve >> >>> a sparse 2D matrix (for a variation of doing least square fit). >> >>> >> >>> There was a message from Nicolas: >> >>> >> >>> >> http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-August/161113.html >> >>> >> >>> Is this where it stands today, too? It looks like that arg count >> >>> problem is still there in 5.0, but is it in a way non-issue as it is >> >>> still FFI based? >> >>> >> >>> Thanks! >> >>> >> >>> -- >> >>> -- Yoshiki >> >>> >> >> >> >> >> >> >> >> >> > >> > >> > >> > -- >> > -- Yoshiki >> >> >> >> -- >> -- Yoshiki >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160729/8fca9be6/attachment.htm From asqueaker at gmail.com Fri Jul 29 19:12:46 2016 From: asqueaker at gmail.com (Chris Muller) Date: Fri Jul 29 19:13:30 2016 Subject: [squeak-dev] [ANN] Widget Refactorings & UI Themes for Squeak In-Reply-To: <1469711671857-4908439.post@n4.nabble.com> References: <1469711671857-4908439.post@n4.nabble.com> Message-ID: Thank you, Marcel, for slogging through this detailed work and bringing it to the level of excellence expected of a first class IDE. Your initiative to get this pushed across the finish-line means the Squeak release will be looking gorgeous at ESUG! I finally had a moment to read your whole note. :) Yes, we spent a lot of time thinking about this themeing implementation, those trade-offs you mentioned are exactly what we were aiming for and I think the balance we ended up with is fantastic. Its light, flexible, easy to understand, nad supports a variety of integration cases which you said actually brought some uniformity to some legacy areas of the system. Oh, and its not slow. What more could we possibly want from a theming implementation? Just two things: 1) A window which presents all the themeProperties and ability to change them and, 2) Ability to save/load as objects. :) Best, Chris On Thu, Jul 28, 2016 at 8:14 AM, marcel.taeumel wrote: > Hi, there! :-) > > TL;DR: Here is a SAR file that cleans up the code of all widget classes such > as lists and buttons in your image and adds support for UI theming as well > as a bunch of UI themes (choose Themes via "Extras > Themes & Colors"): > squeak_trunk_uitheme_v12.sar > > > Here is a preview: > http://i.giphy.com/l46CcX46yRE9H6yQ0.gif > > *Try it out. Report bugs. Report performance issues!!* We will commit the > changes to trunk this Saturday. > > Btw: The SAR installer is compatible with Eliot's current working image. ;o) > And there are numerous open windows and projects in that image...^^ > > > ========================================== > 0. The Long History of Squeak & UI Theming > ========================================== > > ... > http://forum.world.st/Dark-theme-td4869082.html > http://forum.world.st/Themes-for-Squeak-5-1-td4882848.html > http://forum.world.st/Skylark-Theme-and-Squeak-3-9-td54720.html > http://forum.world.st/Non-SmallLand-colour-theme-lying-around-td4697438.html#a4697446 > ... > > > ======================== > 1. User Interface Themes > ======================== > > Chris, Karl, and I designed a very lightweight abstraction to support UI > themes in Squeak. You can find the whole implementation in the class > UserInterfaceTheme and a bunch of tests in UserInterfaceThemeTests. > > An object that wants to support theming SHOULD (!) implement three methods: > > MyFancyClass class >> #themeProperties > MyFancyClass >> #applyUserInterfaceTheme > MyFancyClass >> #canApplyUserInterfaceTheme > > It also MUST (!) access the current UI theme when setting visual state. And > here comes the nice part: > > ... > self color: (self userInterfaceTheme color ifNil: [Color white]). > ... > > Remember, usually you would write something like this: > > ... > self color: Color white. > ... > > How can this work? It works by using #doesNotUnderstand: and trigger a > dynamic lookup in a dictionary inside the current theme: > > Object >> #userInterfaceTheme > ^ UserInterfaceTheme current > pushScope: self; > yourself > > UserInterfaceTheme >> #doesNotUnderstand: aMessage > ... > ^ [self get: scope top class -> aMessage selector] > ensure: [scope pop] > > Isn't this slow? No, not at all. If you have any doubts, try benching it on > your machine: > > UserInterfaceThemeTestObject benchLookup. > > On my machine, this is even fast enough to support theme lookups in > frequently called messages such as Morph >> #drawOn:. However, applications > are advised to cache. That's why we have the explicit > #applyUserInterfaceTheme callbacks as described above. > > Note that amazing effects can be achieved by adjusting #color, #borderColor, > #borderWidth, #fillStyle, and fonts. :-) The existing themes do exactly > that. > > To get a feeling of the impact of having themes in Squeak, try browsing > senders and implementors of #applyUserInterfaceTheme, #themeProperties, > #userInterfaceTheme, and maybe #canApplyUserInterfaceTheme. I think we can > still reduce the number of sends to #userInterfaceTheme a little more. > > > ================================== > 2. Code clean-up in widget classes > ================================== > > We made Shout look up the current theme to build its internal cache of text > attributes to quickly style code as you type it. > > We removed window color specifications and replaced them by simply > implementing Model >> #defaultWindowColor. There is also still the > #uniformWindowColor if you do not like colorful windows. This makes it also > much easier for new applications to have their own window color. > > We unified the implementation of MenuMorph and DockingBarMorph and fixed > several bugs there. > > Dialogs! *phew* ... *arrrrgss* ... Dialogs. :-) We managed to introduce a > general DialogWindow class. FillInTheBlankMorph and UserDialogBoxMorph are > now mere subclasses with a custom interface. There is also support for > ToolBuilder, see ListChooser for an example. *yay* > > Buttons feel more like buttons now. It's a good thing, right? > > For lists and trees and text boxes, we greatly reduced the amount of code > that just accessed global state. LazyListMorph, NewParagraph, TextMorph, > IndentingListItemMorph, ... they all now get configured by their "hosts", > which are PluggableListMorph, PluggableTextMorph, and > SimpleHierarchicalListMorph. Having this, we improved the modular structure > of our whole Squeak widget library. That modular structure made applying > themes much easier. :-) > > > ======================== > 3. Theme all the widgets > ======================== > > There is a nice existing pattern with the message #setDefaultParameters, > which is usually called from #initialize. Go, see for yourself. Browse > implementors of #setDefaultParameters. We used that pattern and cleaned up > many implementations of that message in the image. > > Note that rounded corners, gradients, colorful windows, and shadows are > still preferences outside of UI themes. You can toggle them in any UI theme. > > Note that the background color/image is also not subject to be themed. Just > drop your favorite picture or pattern in the image. It's really easy. > > Now, take a look at the class SqueakTheme. There, you will find source code > for creating the default Squeak theme to be shared via SqueakSource and > reset during the release building process. :-) > > Besides get/set/clear -- which might be expected from the theme structure > because it is basically a dictionary with some properties -- There, you will > notice a "merge" or "link" or "derive". When creating themes > programmatically, you can: > - derive properties from other properties > - link themes to extend property look-up > - merge one theme into another theme > > How does property look-up work? Well, see UserInterfaceTheme >> #get: > 1. Look up the key, which is usually "Class -> symbol". > 2. Try the superclass chain. > 3. Try the same lookup in the linked theme if any. > > Theoretically, you could actually implement messages in subclasses of > UserInterfaceTheme and bypass that DNU-triggered lookup. We do not do this > right now. > > As you can see, Squeak/Smalltalk offers a great deal of flexibility. It is > remains subject to discussion of how to employ the language and its > semantics. Think of the current implementation of user interface themes as > one way that represents a trade-off between a concise programming interface > (i.e. ... self userInterfaceTheme color ifNil ...), a fair amount of > comprehensive patterns (i.e. #setDefaultParameters, > #applyUserInterfaceTheme, ...), and some other existing constraints (i.e. > old code, Monticello/Squeaksource, existing tools such as > senders/implementors, ...). > > Happy Squeaking! > > Marcel, Chris, Karl > > > > -- > View this message in context: http://forum.world.st/ANN-Widget-Refactorings-UI-Themes-for-Squeak-tp4908439.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From asqueaker at gmail.com Fri Jul 29 19:14:23 2016 From: asqueaker at gmail.com (Chris Muller) Date: Fri Jul 29 19:15:06 2016 Subject: [squeak-dev] Re: [ANN] Widget Refactorings & UI Themes for Squeak In-Reply-To: References: <1469711671857-4908439.post@n4.nabble.com> <1469717356456-4908467.post@n4.nabble.com> Message-ID: >> One could experiment with removing that check for a while. Instead of removing it, couldn't we just override it in SystemWindow? From commits at source.squeak.org Fri Jul 29 20:03:22 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 29 20:03:24 2016 Subject: [squeak-dev] The Trunk: Monticello-cmm.638.mcz Message-ID: Chris Muller uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-cmm.638.mcz ==================== Summary ==================== Name: Monticello-cmm.638 Author: cmm Time: 29 July 2016, 3:03:07.655086 pm UUID: 809e9283-dcfe-41df-88cb-0e6b9beec1a9 Ancestors: Monticello-tfel.637 Confirm before discarding unsaved Version notes. =============== Diff against Monticello-tfel.637 =============== Item was added: + ----- Method: MCSaveVersionDialog>>okToClose (in category 'actions') ----- + okToClose + ^ (self findTextMorph: #logMessage) + ifNil: [true] + ifNotNil: + [:widget | widget canDiscardEdits or: [self confirm: 'Version notes are not saved. + Is it OK to discard those notes?' translated]]! From asqueaker at gmail.com Fri Jul 29 20:06:52 2016 From: asqueaker at gmail.com (Chris Muller) Date: Fri Jul 29 20:07:34 2016 Subject: [squeak-dev] The Trunk: Monticello-cmm.638.mcz In-Reply-To: <579bb68e.b225ed0a.8b016.3153SMTPIN_ADDED_MISSING@mx.google.com> References: <579bb68e.b225ed0a.8b016.3153SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: An unintentional commit... I'll delete or fix it. On Fri, Jul 29, 2016 at 3:03 PM, wrote: > Chris Muller uploaded a new version of Monticello to project The Trunk: > http://source.squeak.org/trunk/Monticello-cmm.638.mcz > > ==================== Summary ==================== > > Name: Monticello-cmm.638 > Author: cmm > Time: 29 July 2016, 3:03:07.655086 pm > UUID: 809e9283-dcfe-41df-88cb-0e6b9beec1a9 > Ancestors: Monticello-tfel.637 > > Confirm before discarding unsaved Version notes. > > =============== Diff against Monticello-tfel.637 =============== > > Item was added: > + ----- Method: MCSaveVersionDialog>>okToClose (in category 'actions') ----- > + okToClose > + ^ (self findTextMorph: #logMessage) > + ifNil: [true] > + ifNotNil: > + [:widget | widget canDiscardEdits or: [self confirm: 'Version notes are not saved. > + Is it OK to discard those notes?' translated]]! > > From commits at source.squeak.org Fri Jul 29 20:15:12 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 29 20:15:13 2016 Subject: [squeak-dev] The Trunk: Monticello-cmm.639.mcz Message-ID: Chris Muller uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-cmm.639.mcz ==================== Summary ==================== Name: Monticello-cmm.639 Author: cmm Time: 29 July 2016, 3:14:55.573436 pm UUID: c40c17b7-6df1-42e2-8542-7769a54f7e08 Ancestors: Monticello-cmm.638 Avoid confirmation prompt when clicking Accept. =============== Diff against Monticello-cmm.638 =============== Item was changed: ----- Method: MCSaveVersionDialog>>accept (in category 'actions') ----- accept + | logMessage logMessageWidget | - | logMessage | self updateItems. + logMessage := (logMessageWidget := self findTextMorph: #logMessage) text asString. + (logMessage isEmpty or: [logMessage beginsWith: 'empty log message']) + ifTrue: + [(UIManager confirm: 'the log message is empty; are you sure you want to commit') ifFalse: [^ self]] + ifFalse: [logMessageWidget accept]. - logMessage := (self findTextMorph: #logMessage) text asString. - (logMessage isEmpty or: [logMessage beginsWith: 'empty log message']) ifTrue: - [(UIManager confirm: 'the log message is empty; are you sure you want to commit') ifFalse: - [^self]]. self answer: (Array with: (self findTextMorph: #versionName) text asString with: logMessage + with: ignore)! - with: ignore) - ! From commits at source.squeak.org Fri Jul 29 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jul 29 21:55:05 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160729215502.25336.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068333.html Name: SystemReporter-mt.28 Ancestors: SystemReporter-mt.27 List Squeak Contributors in the System Reporter. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068334.html Name: SystemReporter-mt.29 Ancestors: SystemReporter-mt.28 Order all Squeak Contributors alphabetically. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068335.html Name: System-mt.849 Ancestors: System-mt.848 Adds some convenience methods to get more information about the current system version. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068336.html Name: ReleaseBuilder-mt.138 Ancestors: ReleaseBuilder-mt.137 Improve release building process. Some clean-up. Automate this and that. :-) Add the "alpha" suffix for the current trunk version again. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068337.html Name: System-mt.850 Ancestors: System-mt.849 Adds descriptions for the current starte of the system version. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068338.html Name: ReleaseBuilder-mt.139 Ancestors: ReleaseBuilder-mt.138 Some updates for guided release process. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068339.html Name: MonticelloConfigurations-mt.143 Ancestors: MonticelloConfigurations-dtl.142 A more descriptive information dialog after the update finished. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068340.html Name: Monticello-cmm.638 Ancestors: Monticello-tfel.637 Confirm before discarding unsaved Version notes. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068341.html Name: Monticello-cmm.639 Ancestors: Monticello-cmm.638 Avoid confirmation prompt when clicking Accept. ============================================= From Marcel.Taeumel at hpi.de Fri Jul 29 21:12:04 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Jul 29 21:56:35 2016 Subject: [squeak-dev] Re: [ANN] Widget Refactorings & UI Themes for Squeak In-Reply-To: References: <1469711671857-4908439.post@n4.nabble.com> <1469717356456-4908467.post@n4.nabble.com> Message-ID: <1469826724440-4908739.post@n4.nabble.com> Chris Muller-3 wrote >>> One could experiment with removing that check for a while. > > Instead of removing it, couldn't we just override it in SystemWindow? Wouldn't work because it does not affect instances of SystemWindow but its submorphs. Anyway, I found a solution. Best, Marcel -- View this message in context: http://forum.world.st/ANN-Widget-Refactorings-UI-Themes-for-Squeak-tp4908439p4908739.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From nicolas.cellier.aka.nice at gmail.com Fri Jul 29 22:24:49 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Fri Jul 29 22:24:53 2016 Subject: [squeak-dev] Smallapack In-Reply-To: References: Message-ID: OK, what I did on my Mac: 1) look under the Squeak app and edit the Contents/Info.plist 2) change value of SqueakPluginsBuiltInOrLocalOnly to "No" otherwise library loading is restricted to the Squeak app bundle 3) copy the veclib framework library files (dylib) in same directory as squeak image 4) launch Squeak 5) install Smallapack follow instruction from https://github.com/nicolas-cellier-aka-nice/smallapack/wiki/SmallapackSqueak 6) change CBlasLibrary class>>moduleName 'libcblas.dylib' -> 'libBlas.dylib' nowadays, cblas and blas are in the same dylib... 7) change CLapackLibrary class>>moduleName 'libclapack.dylib' -> 'libLapack.dylib' idem 8) re-initialize the cache (I know, I know, there are too many...) CBlasLibrary install. CLapackLibrary install. LapackMatrix resetBlasInterfaces; resetLapackInterfaces. 9) run the TestCBlas suite It should be green I will commit the changes later, and will probably implement moduleNames as a Preference (pragma oriented). No need to override code anymore :) I think step 3) is necessary because of ioLoadModuleRaw() in platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m It would only look those frameworks: static char *frameworks[]= { "", "/CoreServices.framework/Frameworks", "/ApplicationServices.framework/Frameworks", "/Carbon.framework/Frameworks", 0 }; But I did step 3) before I tried 1) + 2), adn did not retry, so maybe I'm wrong... Scanning all the frameworks is not a solution. And what if we want a specific version? It would be far better to be able to specify the path to the library from within the image like VW... 2016-07-29 19:41 GMT+02:00 Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com>: > > > 2016-07-29 19:28 GMT+02:00 Nicolas Cellier < > nicolas.cellier.aka.nice@gmail.com>: > >> >> >> 2016-07-29 19:02 GMT+02:00 Yoshiki Ohshima : >> >>> First question: >>> >>> The Mac OS comes with Accelerate.Framework and that contains BLAS. >>> But probably I still should compile those libraries, right? >>> >>> >> No, it's better to link to accelerated library. >> I don't have a Mac handy here to verify how to link to it though. >> I'll be able to check latter in the evening >> >> > > I've downloaded the code, and I see it now: the library names are > hardcoded (see implementors of moduleName). > For Mac it is libblas.dylib and libcblas.dylib > Also note that there is a preference for switching to cblas (blas > functions with C interface). > This should be faster because we pass some parameters by value rather than > allocating them and pass reference... > > Module names could also be replaced by Preferences eventually, but by now, > you'll have to override... > > >> >>> On Thu, Jul 28, 2016 at 4:11 PM, Yoshiki Ohshima >>> wrote: >>> > Thanks! >>> > >>> > On Thu, Jul 28, 2016 at 4:04 PM, Nicolas Cellier >>> > wrote: >>> >> Hi Yoshiki, >>> >> >>> >> Thanks for inquiring about Smallapack. >>> >> >>> >> This problem has been solved in 2011 as the post tells. >>> >> Moreover, it was about alignment of squeak objects that was on >>> multiple of 4 >>> >> on SqueakV3 memory. >>> >> Spur is 8 byte aligned, so the problem would have also vanished >>> without any >>> >> patch for those being patient :) >>> >> >>> >> For the 15 arguments limit, Smallapack comes with it's own compiler, >>> so it's >>> >> a non issue. >>> >> Maybe I should make the documentation more clear on >>> >> >>> https://github.com/nicolas-cellier-aka-nice/smallapack/wiki/SmallapackSqueak >>> >> ? >>> >> >>> >> Unfortunately, there's no Sparse Matrix representation in Lapack. >>> >> If you know of a good package for that, it could be integrated. >>> >> >>> >> If you have other questions, don't hesitate to ask. >>> >> >>> >> cheers >>> >> >>> >> Nicolas >>> >> >>> >> 2016-07-29 0:22 GMT+02:00 Yoshiki Ohshima : >>> >>> >>> >>> I am trying to do a bit of linear algebra stuff that involves to >>> solve >>> >>> a sparse 2D matrix (for a variation of doing least square fit). >>> >>> >>> >>> There was a message from Nicolas: >>> >>> >>> >>> >>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-August/161113.html >>> >>> >>> >>> Is this where it stands today, too? It looks like that arg count >>> >>> problem is still there in 5.0, but is it in a way non-issue as it is >>> >>> still FFI based? >>> >>> >>> >>> Thanks! >>> >>> >>> >>> -- >>> >>> -- Yoshiki >>> >>> >>> >> >>> >> >>> >> >>> >> >>> > >>> > >>> > >>> > -- >>> > -- Yoshiki >>> >>> >>> >>> -- >>> -- Yoshiki >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160730/2c384b6e/attachment.htm From Yoshiki.Ohshima at acm.org Sat Jul 30 14:55:16 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Sat Jul 30 14:55:20 2016 Subject: [squeak-dev] Smallapack In-Reply-To: References: Message-ID: Great! Before (I got into a meeting and then entered the "Friday mode", I was going down the path of trying to call the Framework functions but copying files anyway was a simpler solution for now. Yes, I got all tests green. Thank you! On Fri, Jul 29, 2016 at 3:24 PM, Nicolas Cellier wrote: > OK, what I did on my Mac: > > 1) look under the Squeak app and edit the Contents/Info.plist > 2) change value of SqueakPluginsBuiltInOrLocalOnly to "No" > otherwise library loading is restricted to the Squeak app bundle > 3) copy the veclib framework library files (dylib) in same directory as > squeak image > 4) launch Squeak > 5) install Smallapack > follow instruction from > https://github.com/nicolas-cellier-aka-nice/smallapack/wiki/SmallapackSqueak > 6) change CBlasLibrary class>>moduleName 'libcblas.dylib' -> 'libBlas.dylib' > nowadays, cblas and blas are in the same dylib... > 7) change CLapackLibrary class>>moduleName 'libclapack.dylib' -> > 'libLapack.dylib' > idem > 8) re-initialize the cache (I know, I know, there are too many...) > CBlasLibrary install. CLapackLibrary install. LapackMatrix > resetBlasInterfaces; resetLapackInterfaces. > 9) run the TestCBlas suite > > It should be green > I will commit the changes later, and will probably implement moduleNames as > a Preference (pragma oriented). > No need to override code anymore :) > > I think step 3) is necessary because of ioLoadModuleRaw() in > platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m > https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m > It would only look those frameworks: > > static char *frameworks[]= > { > "", > "/CoreServices.framework/Frameworks", > "/ApplicationServices.framework/Frameworks", > "/Carbon.framework/Frameworks", > 0 > }; > > But I did step 3) before I tried 1) + 2), adn did not retry, so maybe I'm > wrong... > Scanning all the frameworks is not a solution. And what if we want a > specific version? > It would be far better to be able to specify the path to the library from > within the image like VW... > > > 2016-07-29 19:41 GMT+02:00 Nicolas Cellier > : >> >> >> >> 2016-07-29 19:28 GMT+02:00 Nicolas Cellier >> : >>> >>> >>> >>> 2016-07-29 19:02 GMT+02:00 Yoshiki Ohshima : >>>> >>>> First question: >>>> >>>> The Mac OS comes with Accelerate.Framework and that contains BLAS. >>>> But probably I still should compile those libraries, right? >>>> >>> >>> No, it's better to link to accelerated library. >>> I don't have a Mac handy here to verify how to link to it though. >>> I'll be able to check latter in the evening >>> >> >> >> I've downloaded the code, and I see it now: the library names are >> hardcoded (see implementors of moduleName). >> For Mac it is libblas.dylib and libcblas.dylib >> Also note that there is a preference for switching to cblas (blas >> functions with C interface). >> This should be faster because we pass some parameters by value rather than >> allocating them and pass reference... >> >> Module names could also be replaced by Preferences eventually, but by now, >> you'll have to override... >> >>>> >>>> >>>> On Thu, Jul 28, 2016 at 4:11 PM, Yoshiki Ohshima >>>> wrote: >>>> > Thanks! >>>> > >>>> > On Thu, Jul 28, 2016 at 4:04 PM, Nicolas Cellier >>>> > wrote: >>>> >> Hi Yoshiki, >>>> >> >>>> >> Thanks for inquiring about Smallapack. >>>> >> >>>> >> This problem has been solved in 2011 as the post tells. >>>> >> Moreover, it was about alignment of squeak objects that was on >>>> >> multiple of 4 >>>> >> on SqueakV3 memory. >>>> >> Spur is 8 byte aligned, so the problem would have also vanished >>>> >> without any >>>> >> patch for those being patient :) >>>> >> >>>> >> For the 15 arguments limit, Smallapack comes with it's own compiler, >>>> >> so it's >>>> >> a non issue. >>>> >> Maybe I should make the documentation more clear on >>>> >> >>>> >> https://github.com/nicolas-cellier-aka-nice/smallapack/wiki/SmallapackSqueak >>>> >> ? >>>> >> >>>> >> Unfortunately, there's no Sparse Matrix representation in Lapack. >>>> >> If you know of a good package for that, it could be integrated. >>>> >> >>>> >> If you have other questions, don't hesitate to ask. >>>> >> >>>> >> cheers >>>> >> >>>> >> Nicolas >>>> >> >>>> >> 2016-07-29 0:22 GMT+02:00 Yoshiki Ohshima : >>>> >>> >>>> >>> I am trying to do a bit of linear algebra stuff that involves to >>>> >>> solve >>>> >>> a sparse 2D matrix (for a variation of doing least square fit). >>>> >>> >>>> >>> There was a message from Nicolas: >>>> >>> >>>> >>> >>>> >>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-August/161113.html >>>> >>> >>>> >>> Is this where it stands today, too? It looks like that arg count >>>> >>> problem is still there in 5.0, but is it in a way non-issue as it is >>>> >>> still FFI based? >>>> >>> >>>> >>> Thanks! >>>> >>> >>>> >>> -- >>>> >>> -- Yoshiki >>>> >>> >>>> >> >>>> >> >>>> >> >>>> >> >>>> > >>>> > >>>> > >>>> > -- >>>> > -- Yoshiki >>>> >>>> >>>> >>>> -- >>>> -- Yoshiki >>>> >>> >> > > > > -- -- Yoshiki From Yoshiki.Ohshima at acm.org Sat Jul 30 15:23:10 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Sat Jul 30 15:23:13 2016 Subject: [squeak-dev] Smallapack In-Reply-To: References: Message-ID: But some of TestLapackMatrix tests fail. A few external functions cannot be found, it looks like. On Sat, Jul 30, 2016 at 7:55 AM, Yoshiki Ohshima wrote: > Great! > > Before (I got into a meeting and then entered the "Friday mode", I was > going down the path of trying to call the Framework functions but > copying files anyway was a simpler solution for now. > > Yes, I got all tests green. Thank you! > > On Fri, Jul 29, 2016 at 3:24 PM, Nicolas Cellier > wrote: >> OK, what I did on my Mac: >> >> 1) look under the Squeak app and edit the Contents/Info.plist >> 2) change value of SqueakPluginsBuiltInOrLocalOnly to "No" >> otherwise library loading is restricted to the Squeak app bundle >> 3) copy the veclib framework library files (dylib) in same directory as >> squeak image >> 4) launch Squeak >> 5) install Smallapack >> follow instruction from >> https://github.com/nicolas-cellier-aka-nice/smallapack/wiki/SmallapackSqueak >> 6) change CBlasLibrary class>>moduleName 'libcblas.dylib' -> 'libBlas.dylib' >> nowadays, cblas and blas are in the same dylib... >> 7) change CLapackLibrary class>>moduleName 'libclapack.dylib' -> >> 'libLapack.dylib' >> idem >> 8) re-initialize the cache (I know, I know, there are too many...) >> CBlasLibrary install. CLapackLibrary install. LapackMatrix >> resetBlasInterfaces; resetLapackInterfaces. >> 9) run the TestCBlas suite >> >> It should be green >> I will commit the changes later, and will probably implement moduleNames as >> a Preference (pragma oriented). >> No need to override code anymore :) >> >> I think step 3) is necessary because of ioLoadModuleRaw() in >> platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m >> https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m >> It would only look those frameworks: >> >> static char *frameworks[]= >> { >> "", >> "/CoreServices.framework/Frameworks", >> "/ApplicationServices.framework/Frameworks", >> "/Carbon.framework/Frameworks", >> 0 >> }; >> >> But I did step 3) before I tried 1) + 2), adn did not retry, so maybe I'm >> wrong... >> Scanning all the frameworks is not a solution. And what if we want a >> specific version? >> It would be far better to be able to specify the path to the library from >> within the image like VW... >> >> >> 2016-07-29 19:41 GMT+02:00 Nicolas Cellier >> : >>> >>> >>> >>> 2016-07-29 19:28 GMT+02:00 Nicolas Cellier >>> : >>>> >>>> >>>> >>>> 2016-07-29 19:02 GMT+02:00 Yoshiki Ohshima : >>>>> >>>>> First question: >>>>> >>>>> The Mac OS comes with Accelerate.Framework and that contains BLAS. >>>>> But probably I still should compile those libraries, right? >>>>> >>>> >>>> No, it's better to link to accelerated library. >>>> I don't have a Mac handy here to verify how to link to it though. >>>> I'll be able to check latter in the evening >>>> >>> >>> >>> I've downloaded the code, and I see it now: the library names are >>> hardcoded (see implementors of moduleName). >>> For Mac it is libblas.dylib and libcblas.dylib >>> Also note that there is a preference for switching to cblas (blas >>> functions with C interface). >>> This should be faster because we pass some parameters by value rather than >>> allocating them and pass reference... >>> >>> Module names could also be replaced by Preferences eventually, but by now, >>> you'll have to override... >>> >>>>> >>>>> >>>>> On Thu, Jul 28, 2016 at 4:11 PM, Yoshiki Ohshima >>>>> wrote: >>>>> > Thanks! >>>>> > >>>>> > On Thu, Jul 28, 2016 at 4:04 PM, Nicolas Cellier >>>>> > wrote: >>>>> >> Hi Yoshiki, >>>>> >> >>>>> >> Thanks for inquiring about Smallapack. >>>>> >> >>>>> >> This problem has been solved in 2011 as the post tells. >>>>> >> Moreover, it was about alignment of squeak objects that was on >>>>> >> multiple of 4 >>>>> >> on SqueakV3 memory. >>>>> >> Spur is 8 byte aligned, so the problem would have also vanished >>>>> >> without any >>>>> >> patch for those being patient :) >>>>> >> >>>>> >> For the 15 arguments limit, Smallapack comes with it's own compiler, >>>>> >> so it's >>>>> >> a non issue. >>>>> >> Maybe I should make the documentation more clear on >>>>> >> >>>>> >> https://github.com/nicolas-cellier-aka-nice/smallapack/wiki/SmallapackSqueak >>>>> >> ? >>>>> >> >>>>> >> Unfortunately, there's no Sparse Matrix representation in Lapack. >>>>> >> If you know of a good package for that, it could be integrated. >>>>> >> >>>>> >> If you have other questions, don't hesitate to ask. >>>>> >> >>>>> >> cheers >>>>> >> >>>>> >> Nicolas >>>>> >> >>>>> >> 2016-07-29 0:22 GMT+02:00 Yoshiki Ohshima : >>>>> >>> >>>>> >>> I am trying to do a bit of linear algebra stuff that involves to >>>>> >>> solve >>>>> >>> a sparse 2D matrix (for a variation of doing least square fit). >>>>> >>> >>>>> >>> There was a message from Nicolas: >>>>> >>> >>>>> >>> >>>>> >>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-August/161113.html >>>>> >>> >>>>> >>> Is this where it stands today, too? It looks like that arg count >>>>> >>> problem is still there in 5.0, but is it in a way non-issue as it is >>>>> >>> still FFI based? >>>>> >>> >>>>> >>> Thanks! >>>>> >>> >>>>> >>> -- >>>>> >>> -- Yoshiki >>>>> >>> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> > >>>>> > >>>>> > >>>>> > -- >>>>> > -- Yoshiki >>>>> >>>>> >>>>> >>>>> -- >>>>> -- Yoshiki >>>>> >>>> >>> >> >> >> >> > > > > -- > -- Yoshiki -- -- Yoshiki From commits at source.squeak.org Sun Jul 31 08:00:54 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:00:59 2016 Subject: [squeak-dev] The Trunk: System-mt.851.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.851.mcz ==================== Summary ==================== Name: System-mt.851 Author: mt Time: 31 July 2016, 10:00:28.58249 am UUID: ce5a9701-16c6-a14a-a457-0e4b46aeb2e7 Ancestors: System-mt.850 *** Widget Refactorings and UI Themes (Part 1 of 11) *** Adds the core theming mechanism =============== Diff against System-mt.850 =============== Item was added: + ----- Method: ClassDescription>>applyThemeToInstances (in category '*System-Support') ----- + applyThemeToInstances + "User interface themes. Manage how to update existing instances. Classes can override this to use a different update schema than iterating over all instances." + + self allInstancesDo: + [ : eachInstance | eachInstance canApplyUserInterfaceTheme ifTrue: [ eachInstance applyUserInterfaceTheme ] ]! Item was added: + ----- Method: ClassDescription>>canApplyThemeToInstances (in category '*System-Support') ----- + canApplyThemeToInstances + "Override this to ignore your instances." + + ^ true! Item was added: + ----- Method: Object class>>themeProperties (in category '*System-Preferences') ----- + themeProperties + "Return a list of triples that describe configurable properties in a theme." + ^ {}! Item was added: + ----- Method: Object>>applyUserInterfaceTheme (in category '*System-Preferences') ----- + applyUserInterfaceTheme + "A new UserInterfaceTheme has been asked to #apply itself onto the current desktop. The receiver should do what is necessary to change its colors on the screen, update its fonts, form images, etc., if the current UserInterfaceTheme specifies overrides for those values. + + Only subclasses which implement new #themeProperties on the class-side should implement this method. + Implementors of this method should not call 'super applyUserInterfaceTheme'. + + The default implementation does nothing."! Item was added: + ----- Method: Object>>canApplyUserInterfaceTheme (in category '*System-Preferences') ----- + canApplyUserInterfaceTheme + "Use this hook to control whether you want to get notified if a new theme gets applied." + + ^ true! Item was added: + ----- Method: Object>>userInterfaceTheme (in category '*System-Preferences') ----- + userInterfaceTheme + "Call this to conveniently access properties from the current user interface theme." + + ^ UserInterfaceTheme current + pushScope: self; + yourself! Item was added: + Object subclass: #UserInterfaceTheme + instanceVariableNames: 'scope properties name next' + classVariableNames: 'All Current Default' + poolDictionaries: '' + category: 'System-Support'! + + !UserInterfaceTheme commentStamp: '' prior: 0! + A UserInterfaceTheme is a dictionary of preferred visual-properties; colors, borderStyles, borderWidths, fonts, forms, etc. used to color and style the IDE. + + Accessing The Theme + To access the proper UserInterfaceTheme instance for an object, send it #userInterfaceTheme. The default implementation on Object provides the one instance of that is in-use by the IDE at the current time. + + Customizing The Theme + We can ask the userInterfaceTheme for the value of any visual-property, by name: + + mySystemWindow userInterfaceTheme closeBoxImage + + Initially, the above answers nil, which causes the legacy code to use whatever default it's always used. To override various visual-properties of any kind of object, the #set: onAny: to: message can be used. For example, + + myUserInterfaceTheme + set: #closeBoxImage + for: SystemWindow + to: MenuIcons smallCancelIcon + + Alternatively, values may be derived based on other values in the theme, as in: + + myUserInterfaceTheme + set: #color + for: FillInTheBlankMorph + to: { MenuMorph->#color. #twiceDarker } + + Now, the accessing expression, above, will answer will answer MenuIcons' smallCancelIcon instead of nil. SystemWindow's code can be changed to use the expression above to access elements of the theme. + + Upgrading Legacy Code + Following the introduction of this class, various client code all around the system must be modified to access it. This variety of legacy code uses a variety of methods to specify their visual properties: + + 1) a hard-coded values. + 2) a values derived from some other value. + 3) providing local storage for a settable value which can be nil. + 4) providing local storage for a settable value which is expected to always have a particular valid value (never nil). + + The requirement, for each case, is to let the value be overridden. + + The solution for each of the above should be handled respectively to the above list, as follows: + + 1) Check the userInterfaceTheme, if that property returns nil, use the legacy hard-coded value. (see example: SystemWindow>>#createCloseBox). + 2) Nothing to do -- simply perform the same derivation on the result of (1). + 3) Check the local storage, if present, use it. If nil, then check the userInterfaceTheme, if it has this property present, use it, else return nil. + 4) Check the userInterfaceTheme, if the property is not nil, use it, otherwise use the local value. + + Tool Support + If a new access to #userInterfaceTheme is added to the code, be sure to add the property and its description to the #themeSettings for that class. See implementors of #themeSettings for examples.! Item was added: + ----- Method: UserInterfaceTheme class>>allThemeProperties (in category 'tools') ----- + allThemeProperties + "Answer an Array of 3-element Array's. Each inner Array are the information needed to present a Theme editor tool; the property name, category, and description. + + self allThemeProperties" + + ^ Array streamContents: + [ : stream | self allThemePropertiesDo: [ : cls : prop | stream nextPut: {cls}, prop ]]! Item was added: + ----- Method: UserInterfaceTheme class>>allThemePropertiesDo: (in category 'tools') ----- + allThemePropertiesDo: block + "Iterate over all classes that provide theme properties." + + Smalltalk allClassesDo: [:eachClass | + (eachClass respondsTo: #themeProperties) ifTrue: [ + eachClass themeProperties do: [:eachProperty | + block cull: eachClass cull: eachProperty]]].! Item was added: + ----- Method: UserInterfaceTheme class>>allThemes (in category 'accessing') ----- + allThemes + ^ All ifNil: [All := IdentitySet new]! Item was added: + ----- Method: UserInterfaceTheme class>>categories (in category 'tools') ----- + categories + "self categories" + + ^ Set new in: [:result | + self allThemePropertiesDo: [:cls :prop | result add: prop second]. + result]! Item was added: + ----- Method: UserInterfaceTheme class>>clientClasses (in category 'private') ----- + clientClasses + + ^ Set new in: [:result | + self allThemePropertiesDo: [:cls :prop | result add: cls]. + result]! Item was added: + ----- Method: UserInterfaceTheme class>>clientClassesToReapply (in category 'private') ----- + clientClassesToReapply + "All client classes plus their unique subclasses." + + ^ Set new in: [:result | self clientClasses do: [:cc | cc withAllSubclassesDo: [:sc | + result add: sc]]. result] + ! Item was added: + ----- Method: UserInterfaceTheme class>>current (in category 'accessing') ----- + current + + ^ Current ifNil: [Current := Default]! Item was added: + ----- Method: UserInterfaceTheme class>>current: (in category 'accessing') ----- + current: aUserInterfaceTheme + "Replace the current system theme with aUserInterfaceTheme." + Current := aUserInterfaceTheme + "Notify?"! Item was added: + ----- Method: UserInterfaceTheme class>>default (in category 'accessing') ----- + default + ^ Default ifNil: [Default := self new name: 'Autogenerated Default'; yourself]! Item was added: + ----- Method: UserInterfaceTheme class>>default: (in category 'accessing') ----- + default: aUserInterfaceTheme + Default := aUserInterfaceTheme.! Item was added: + ----- Method: UserInterfaceTheme class>>initialize (in category 'initialize-release') ----- + initialize + + self reset.! Item was added: + ----- Method: UserInterfaceTheme class>>named: (in category 'initialize-release') ----- + named: aString + ^ self allThemes + detect: [:ea | ea name = aString] + ifNone: [self new name: aString; register]! Item was added: + ----- Method: UserInterfaceTheme class>>propertiesForCategory: (in category 'tools') ----- + propertiesForCategory: categoryName + ^ self allThemeProperties select: [ : each | each third = categoryName ]! Item was added: + ----- Method: UserInterfaceTheme class>>propertiesForClass: (in category 'tools') ----- + propertiesForClass: aClass + ^ self allThemeProperties select: [ : each | each first = aClass ]! Item was added: + ----- Method: UserInterfaceTheme class>>reset (in category 'initialize-release') ----- + reset + self default apply.! Item was added: + ----- Method: UserInterfaceTheme>>apply (in category 'actions') ----- + apply + "Apply this theme to all affected objects. Let classes decide on how to iterate and call their instances." + + UserInterfaceTheme current: self. + + self class clientClassesToReapply in: [:cc | + cc do: [:eachClass | eachClass applyUserInterfaceTheme]. + cc + select: [:eachClass | eachClass canApplyThemeToInstances] + thenDo: [:eachClass | eachClass applyThemeToInstances]]. + + Project current restoreDisplay.! Item was added: + ----- Method: UserInterfaceTheme>>applyTo: (in category 'actions') ----- + applyTo: someObjects + "Apply this theme to the given objects. Useful if you have to re-theme a specific set of objects. Restore the current theme after that." + + UserInterfaceTheme current in: [:priorTheme | + [ + UserInterfaceTheme current: self. + + someObjects + select: [:ea | ea canApplyUserInterfaceTheme] + thenDo: [:ea | ea applyUserInterfaceTheme]. + + Project current restoreDisplay. + ] ensure: [UserInterfaceTheme current: priorTheme]].! Item was added: + ----- Method: UserInterfaceTheme>>atomicUpdate: (in category 'private') ----- + atomicUpdate: aBlock + "Like our Preferences >> #atomicUpdatePreference" + [ + | original copy returnValue | + original := properties. + copy := properties copy. + returnValue := aBlock value: copy. + original == properties ifTrue: [ + properties := copy. + ^ returnValue] + ] repeat! Item was added: + ----- Method: UserInterfaceTheme>>clear: (in category 'building') ----- + clear: propertySymbol + + ^ self + set: propertySymbol + to: nil! Item was added: + ----- Method: UserInterfaceTheme>>clear:for: (in category 'building') ----- + clear: propertySymbol for: aClass + "No longer override the default visual property specified by propertySymbol for any kinds of aClass. Use the default." + ^ self + set: propertySymbol + for: aClass + to: nil! Item was added: + ----- Method: UserInterfaceTheme>>derive:for:from: (in category 'building') ----- + derive: propertySymbol for: aClassOrSymbol from: anotherClassOrSymbol + + ^ self + derive: propertySymbol + for: aClassOrSymbol + from: anotherClassOrSymbol + at: propertySymbol + ! Item was added: + ----- Method: UserInterfaceTheme>>derive:for:from:at: (in category 'building') ----- + derive: propertySymbol for: aClassOrSymbol from: anotherClassOrSymbol at: anotherPropertySymbol + "Derive this property from another property." + + self + set: propertySymbol + for: aClassOrSymbol + to: (MessageSend + receiver: self + selector: #get:for: + arguments: {anotherPropertySymbol. anotherClassOrSymbol}).! Item was added: + ----- Method: UserInterfaceTheme>>derive:for:from:at:do: (in category 'building') ----- + derive: propertySymbol for: aClassOrSymbol from: anotherClassOrSymbol at: anotherPropertySymbol do: block + + self + set: propertySymbol + for: aClassOrSymbol + to: (MessageSend + receiver: self + selector: #get:for:do: + arguments: {anotherPropertySymbol. anotherClassOrSymbol. block}).! Item was added: + ----- Method: UserInterfaceTheme>>derive:for:from:do: (in category 'building') ----- + derive: propertySymbol for: aClassOrSymbol from: anotherClassOrSymbol do: block + + ^ self + derive: propertySymbol + for: aClassOrSymbol + from: anotherClassOrSymbol + at: propertySymbol + do: block! Item was added: + ----- Method: UserInterfaceTheme>>doesNotUnderstand: (in category 'lookup') ----- + doesNotUnderstand: aMessage + "Answer whether I have, or inherit, a value for the visual-attribute specified by aMessage's #selector." + + aMessage numArgs > 0 ifTrue: [^ super doesNotUnderstand: aMessage]. + scope isEmpty ifTrue: [^ super doesNotUnderstand: aMessage]. + + ^ [self get: scope top class -> aMessage selector] + ensure: [scope pop]! Item was added: + ----- Method: UserInterfaceTheme>>get: (in category 'private') ----- + get: keyObject + "keyObject is intended to be an Association. We have two lookup strategies: 1) along the superclass chain, 2) via a linke theme. Evaluate the result because there can be message sends stored or blocks." + + | k | + properties + at: keyObject + ifPresent: [:prop | ^ prop value]. + + keyObject isVariableBinding "simple key objects" + ifFalse: [^ self getViaLink: keyObject]. + + k := keyObject key. + (self getViaSuperclasses: keyObject) + ifNotNil: [:prop | ^ prop]. + + keyObject key: k. "restore" + ^ self getViaLink: keyObject! Item was added: + ----- Method: UserInterfaceTheme>>get:for: (in category 'private') ----- + get: propertySymbol for: scope + "For convenience. Does support access to non-class keys." + + | aClass | + aClass := (scope isNil or: [scope isBehavior]) + ifTrue: [scope] + ifFalse: [Smalltalk classNamed: scope]. + + aClass ifNotNil: [^ self get: aClass -> propertySymbol]. + + properties + at: scope -> propertySymbol + ifPresent: [:prop | ^ prop value]. + + ^ self getViaLink: scope -> propertySymbol! Item was added: + ----- Method: UserInterfaceTheme>>get:for:do: (in category 'private') ----- + get: propertySymbol for: scope do: block + + ^ block cull: (self get: propertySymbol for: scope)! Item was added: + ----- Method: UserInterfaceTheme>>getViaLink: (in category 'private') ----- + getViaLink: keyObject + "keyObject is intended to be an Association" + + ^ next ifNotNil: [next get: keyObject]! Item was added: + ----- Method: UserInterfaceTheme>>getViaSuperclasses: (in category 'private') ----- + getViaSuperclasses: keyObject + "keyObject is intended to be an Association" + + "We know we're the only referencer of keyObject. Update it rather than create new ones, for performance reasons." + keyObject key: keyObject key superclass. + + keyObject key ifNil: [^ nil]. + + properties + at: keyObject + ifPresent: [:prop | ^ prop value]. + + ^ self getViaSuperclasses: keyObject! Item was added: + ----- Method: UserInterfaceTheme>>initialize (in category 'initialization') ----- + initialize + super initialize. + name := 'unnamed'. + properties := Dictionary new. + scope := Stack new! Item was added: + ----- Method: UserInterfaceTheme>>link: (in category 'building') ----- + link: aUserInterfaceTheme + "When accessing properties by name, if a property is not specified in the receiver, give aUserInterfaceTheme a chance to provide it." + next := aUserInterfaceTheme! Item was added: + ----- Method: UserInterfaceTheme>>merge: (in category 'building') ----- + merge: aUserInterfaceTheme + "Merge aUserInterfaceTheme into my properties. Same as #link:, except merges all the properties of aUserInterfaceTheme into the receiver" + self + merge: aUserInterfaceTheme + overwrite: false! Item was added: + ----- Method: UserInterfaceTheme>>merge:overwrite: (in category 'building') ----- + merge: aUserInterfaceTheme overwrite: aBoolean + "Merge aUserInterfaceTheme into my properties. Only overwrite properties if it sais so." + + self + validateCanMerge: aUserInterfaceTheme ; + preMerge: aUserInterfaceTheme. + + self atomicUpdate: [:props | + aUserInterfaceTheme properties keysAndValuesDo: [:key :value | + (aBoolean or: [(props includesKey: key) not]) + ifTrue: [ | mergedValue | + mergedValue := value copy. + "Update receiver when deriving properties." + mergedValue isMessageSend ifTrue: [mergedValue receiver: self]. + props at: key put: mergedValue. + ]]].! Item was added: + ----- Method: UserInterfaceTheme>>name (in category 'accessing') ----- + name + ^ name! Item was added: + ----- Method: UserInterfaceTheme>>name: (in category 'accessing') ----- + name: aString + name := aString! Item was added: + ----- Method: UserInterfaceTheme>>next (in category 'accessing') ----- + next + "The next theme to look for properties when I don't contain a particular property." + ^ next! Item was added: + ----- Method: UserInterfaceTheme>>postCopy (in category 'copying') ----- + postCopy + "Keep same name and linked next." + super postCopy. + properties := properties copy. + scope := nil! Item was added: + ----- Method: UserInterfaceTheme>>preMerge: (in category 'private') ----- + preMerge: aUserInterfaceTheme + name := name , ' + ' , aUserInterfaceTheme name. + next ifNil: [ next := aUserInterfaceTheme next ]! Item was added: + ----- Method: UserInterfaceTheme>>printOn: (in category 'printing') ----- + printOn: aStream + super printOn: aStream. + aStream space; print: name! Item was added: + ----- Method: UserInterfaceTheme>>properties (in category 'private') ----- + properties + ^ properties! Item was added: + ----- Method: UserInterfaceTheme>>pushScope: (in category 'private') ----- + pushScope: anObject + scope push: anObject! Item was added: + ----- Method: UserInterfaceTheme>>register (in category 'initialization') ----- + register + self class allThemes add: self.! Item was added: + ----- Method: UserInterfaceTheme>>set:for:to: (in category 'building') ----- + set: propertySymbol for: aClassOrSymbol to: valueObject + "Where aClass asks its userInterfaceTheme for propertySymbol, provide valueObject." + + | aClass | + aClass := aClassOrSymbol isBehavior ifTrue: [aClassOrSymbol] ifFalse: [Smalltalk classNamed: aClassOrSymbol]. + aClass ifNil: [^ self]. + ^ self atomicUpdate: + [ : props | | key | + key := aClass -> propertySymbol. + valueObject + ifNil: + [ props + removeKey: key + ifAbsent: [ "already cleared, don't error" ] ] + ifNotNil: + [ props + at: key + put: valueObject ] ]! Item was added: + ----- Method: UserInterfaceTheme>>set:to: (in category 'building') ----- + set: propertySymbol to: valueObject + "For convenience." + + ^ self atomicUpdate: + [ : props | + valueObject + ifNil: + [ props + removeKey: propertySymbol + ifAbsent: [ "already cleared, don't error" ] ] + ifNotNil: + [ props + at: propertySymbol + put: valueObject ] ]! Item was added: + ----- Method: UserInterfaceTheme>>unregister (in category 'initialization') ----- + unregister + self class allThemes remove: self ifAbsent: [].! Item was added: + ----- Method: UserInterfaceTheme>>unsetProperties (in category 'accessing') ----- + unsetProperties + "Answer the property keys which are unset."! Item was added: + ----- Method: UserInterfaceTheme>>validateCanMerge: (in category 'private') ----- + validateCanMerge: aUserInterfaceTheme + (next notNil and: + [ aUserInterfaceTheme next notNil and: [ next ~= aUserInterfaceTheme next ] ]) ifTrue: [ self error: 'Links to different themes. Cannot merge.' ]! From commits at source.squeak.org Sun Jul 31 08:02:46 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:02:49 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1207.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1207.mcz ==================== Summary ==================== Name: Morphic-mt.1207 Author: mt Time: 31 July 2016, 10:02:03.29849 am UUID: 1d83c7f8-e88f-8645-9afb-92f8926b7164 Ancestors: Morphic-tfel.1206 *** Widget Refactorings and UI Themes (Part 1 of 11) *** By default, morphs can only apply themes if they are in the world. Prevents prototypes and other invisible/broken stuff from changing too often or causing debuggers. =============== Diff against Morphic-tfel.1206 =============== Item was added: + ----- Method: Morph>>canApplyUserInterfaceTheme (in category 'visual properties') ----- + canApplyUserInterfaceTheme + ^ self isInWorld! From commits at source.squeak.org Sun Jul 31 08:03:33 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:03:35 2016 Subject: [squeak-dev] The Trunk: Tests-mt.347.mcz Message-ID: Marcel Taeumel uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-mt.347.mcz ==================== Summary ==================== Name: Tests-mt.347 Author: mt Time: 31 July 2016, 10:03:21.36749 am UUID: 390a9533-4e83-fb43-bee0-c05731033988 Ancestors: Tests-pre.346 *** Widget Refactorings and UI Themes (Part 1 of 11) *** Tests for the theming mechanism. And a benchmark. =============== Diff against Tests-pre.346 =============== Item was added: + TestCase subclass: #UserInterfaceThemeTest + instanceVariableNames: 'theme previous' + classVariableNames: '' + poolDictionaries: '' + category: 'Tests-System-Preferences'! Item was added: + ----- Method: UserInterfaceThemeTest>>setUp (in category 'running') ----- + setUp + + super setUp. + previous := UserInterfaceTheme current. + theme := UserInterfaceTheme new name: 'ui theme test'.! Item was added: + ----- Method: UserInterfaceThemeTest>>tearDown (in category 'running') ----- + tearDown + + previous + ifNil: [UserInterfaceTheme reset] + ifNotNil: [UserInterfaceTheme current == previous + ifFalse: [previous apply]]. + + super tearDown.! Item was added: + ----- Method: UserInterfaceThemeTest>>test01ImplementationHooks (in category 'tests') ----- + test01ImplementationHooks + "Any class which implements themeProperties must implement #applyUserInterfaceTheme on the instance side." + + | problematicClasses | + problematicClasses := OrderedCollection new. + Smalltalk allClassesDo: [ : each | ((each theMetaClass includesSelector: #themeProperties) not + or: [each theNonMetaClass includesSelector: #applyUserInterfaceTheme]) + ifFalse: [problematicClasses add: each]]. + self assert: problematicClasses isEmpty description: ('UI Theme Violations: {1}' format: {(problematicClasses collect: [:ea | ea name]) joinSeparatedBy: ' '})! Item was added: + ----- Method: UserInterfaceThemeTest>>test02SetProperty (in category 'tests') ----- + test02SetProperty + + | m | + m := UserInterfaceThemeTestObject new. + + theme set: #testColor for: UserInterfaceThemeTestObject to: Color white. + self assert: m testColor isNil. + + theme apply. + self assert: Color white equals: m testColor. + ! Item was added: + ----- Method: UserInterfaceThemeTest>>test03RegisterAndName (in category 'tests') ----- + test03RegisterAndName + + self deny: (UserInterfaceTheme allThemes includes: theme). + theme register. + self assert: (UserInterfaceTheme allThemes includes: theme). + theme unregister. + self deny: (UserInterfaceTheme allThemes includes: theme). + + theme name: 'test03'. + theme register. + self assert: theme == (UserInterfaceTheme named: 'test03'). + theme unregister. + + self assert: theme ~~ (UserInterfaceTheme named: 'testXX'). + self assert: (UserInterfaceTheme named: 'testXX') == (UserInterfaceTheme named: 'testXX'). + (UserInterfaceTheme named: 'testXX') unregister. + self deny: (UserInterfaceTheme allThemes anySatisfy: [:ea | ea name = 'testXX']).! Item was added: + ----- Method: UserInterfaceThemeTest>>test04SuperClassLookup (in category 'tests') ----- + test04SuperClassLookup + + | m | + m := UserInterfaceThemeTestObject new. + + theme set: #testColor for: Object to: Color white. + self assert: m testColor isNil. + + theme apply. + self assert: Color white equals: m testColor. + ! Item was added: + ----- Method: UserInterfaceThemeTest>>test05ClearProperty (in category 'tests') ----- + test05ClearProperty + + | m | + m := UserInterfaceThemeTestObject new. + theme set: #testColor for: UserInterfaceThemeTestObject to: Color white. + theme apply. + + self assert: Color white equals: m testColor. + theme clear: #testColor for: UserInterfaceThemeTestObject. + self assert: Color white equals: m testColor. + theme apply. + + self assert: m testColor isNil. + ! Item was added: + ----- Method: UserInterfaceThemeTest>>test06SetAndClearUnkownProperty (in category 'tests') ----- + test06SetAndClearUnkownProperty + "Unknown means not defined in #themeProperties und used in code such as #applyUserInterfaceTheme." + + | m | + m := UserInterfaceThemeTestObject new. + theme set: #unknownProperty for: UserInterfaceThemeTestObject to: #blubb. + theme apply. + + self assert:#blubb equals: m unknownProperty. + theme clear: #unknownProperty for: UserInterfaceThemeTestObject. + self assert:#blubb equals: m unknownProperty. + theme apply. + + self assert: m unknownProperty isNil. + ! Item was added: + ----- Method: UserInterfaceThemeTest>>test07Merge (in category 'tests') ----- + test07Merge + + | anotherTheme | + anotherTheme := UserInterfaceTheme new. + anotherTheme set: #someColor for: Morph to: Color red. + anotherTheme set: #thirdColor for: Morph to: Color blue. + + theme set: #myColor for: Morph to: Color white. + theme set: #thirdColor for: Morph to: Color yellow. + + self assert: (theme get: #someColor for: Morph) isNil. + self assert: (anotherTheme get: #myColor for: Morph) isNil. + + theme merge: anotherTheme. + + self assert: Color red equals: (theme get: #someColor for: Morph). + self assert: (anotherTheme get: #myColor for: Morph) isNil. + + "No overwrite." + self assert: Color yellow equals: (theme get: #thirdColor for: Morph). + self assert: Color blue equals: (anotherTheme get: #thirdColor for: Morph). + ! Item was added: + ----- Method: UserInterfaceThemeTest>>test08MergeAndOverwrite (in category 'tests') ----- + test08MergeAndOverwrite + + | anotherTheme | + anotherTheme := UserInterfaceTheme new. + anotherTheme set: #thirdColor for: Morph to: Color blue. + theme set: #thirdColor for: Morph to: Color yellow. + + self assert: Color yellow equals: (theme get: #thirdColor for: Morph). + self assert: Color blue equals: (anotherTheme get: #thirdColor for: Morph). + + theme merge: anotherTheme overwrite: true. + + self assert: Color blue equals: (theme get: #thirdColor for: Morph). + self assert: Color blue equals: (anotherTheme get: #thirdColor for: Morph).! Item was added: + ----- Method: UserInterfaceThemeTest>>test09Link (in category 'tests') ----- + test09Link + + | anotherTheme | + anotherTheme := UserInterfaceTheme new. + + anotherTheme set: #testColor for: Object to: Color white. + self assert: (theme get: #testColor for: Object) isNil. + + theme link: anotherTheme. + self assert: theme next == anotherTheme. + self assert: Color white equals: (theme get: #testColor for: Object). + ! Item was added: + ----- Method: UserInterfaceThemeTest>>test10Blocks (in category 'tests') ----- + test10Blocks + + theme set: #testColor for: Object to: [Color r: 1 g: 1 b: 1]. + self assert: (theme get: #testColor for: Object) ~~ (theme get: #testColor for: Object). + + ! Item was added: + ----- Method: UserInterfaceThemeTest>>test11LinkAgain (in category 'tests') ----- + test11LinkAgain + + | anotherTheme yetAnotherTheme | + anotherTheme := UserInterfaceTheme new. + yetAnotherTheme := UserInterfaceTheme new. + + yetAnotherTheme set: #testColor for: Object to: Color white. + self assert: (theme get: #testColor for: Object) isNil. + + theme link: anotherTheme. + anotherTheme link: yetAnotherTheme. + + self assert: Color white equals: (theme get: #testColor for: Object).! Item was added: + ----- Method: UserInterfaceThemeTest>>test12RealDNU (in category 'tests') ----- + test12RealDNU + "If we forgot to push a scope, it is a real DNU and not stack is empty." + self should: [theme perform: #undefinedMessage] raise: MessageNotUnderstood! Item was added: + ----- Method: UserInterfaceThemeTest>>test13ClassName (in category 'tests') ----- + test13ClassName + + self assert: (theme get: #testColor for: #Object) isNil. + + theme set: #testColor for: #Object to: Color white. + self assert: Color white equals: (theme get: #testColor for: #Object). + + theme clear: #testColor for: #Object. + self assert: (theme get: #testColor for: #Object) isNil. + + self shouldnt: [theme set: #testColor for: #SomeNonExistentClass to: Color white] raise: Error. + self assert: (theme get: #testColor for: nil) isNil.! Item was added: + ----- Method: UserInterfaceThemeTest>>test14Perform (in category 'tests') ----- + test14Perform + + | m | + m := UserInterfaceThemeTestObject new. + theme apply. + + self assert: m getTestColor isNil. + self assert: m getTestColorViaPerform isNil. + + theme set: #testColor for: #UserInterfaceThemeTestObject to: Color white. + + self assert: Color white equals: m getTestColor. + self assert: Color white equals: m getTestColorViaPerform.! Item was added: + ----- Method: UserInterfaceThemeTest>>test15DerivedProperties (in category 'tests') ----- + test15DerivedProperties + + theme set: #fanciness for: Point to: 42. + theme derive: #fanciness for: Rectangle from: Point at: #fanciness. + + self assert: 42 equals: (theme get: #fanciness for: Point). + self assert: 42 equals: (theme get: #fanciness for: Rectangle).! Item was added: + ----- Method: UserInterfaceThemeTest>>test16ArraysAsProperties (in category 'tests') ----- + test16ArraysAsProperties + "Used, for example, by Shout styling. There might be many reasons for storing arrays as properties." + + theme set: #complexSpec for: UserInterfaceThemeTestObject to: {#foo. 42. #(a b c)}. + + self assert: {#foo. 42. #(a b c)} equals: (theme get: #complexSpec for: UserInterfaceThemeTestObject).! Item was added: + ----- Method: UserInterfaceThemeTest>>test17DerivedPropertiesWithBlock (in category 'tests') ----- + test17DerivedPropertiesWithBlock + + theme set: #fanciness for: Point to: 42. + theme derive: #fanciness for: Rectangle from: Point at: #fanciness do: [:f | f + 1]. + + self assert: 42 equals: (theme get: #fanciness for: Point). + self assert: 43 equals: (theme get: #fanciness for: Rectangle).! Item was added: + ----- Method: UserInterfaceThemeTest>>test18MergeWithDerivedProperties (in category 'tests') ----- + test18MergeWithDerivedProperties + + | anotherTheme | + anotherTheme := UserInterfaceTheme new. + + theme set: #fanciness for: Point to: 42. + theme derive: #fanciness for: Rectangle from: Point at: #fanciness do: [:f | f + 1]. + + anotherTheme merge: theme. + theme set: #fanciness for: Point to: 21. + + self assert: 22 equals: (theme get: #fanciness for: Rectangle). + self assert: 43 equals: (anotherTheme get: #fanciness for: Rectangle).! Item was added: + ----- Method: UserInterfaceThemeTest>>test19MergeWithCopy (in category 'tests') ----- + test19MergeWithCopy + + | anotherTheme | + anotherTheme := UserInterfaceTheme new. + + theme set: #someColor for: Object to: Color red. + anotherTheme merge: theme. + + self assert: (theme get: #someColor for: Object) ~~ (anotherTheme get: #someColor for: Object).! Item was added: + ----- Method: UserInterfaceThemeTest>>test20ClassSideApply (in category 'tests') ----- + test20ClassSideApply + + UserInterfaceThemeTestObject resetApplyCounter. + self assert: 0 equals: UserInterfaceThemeTestObject applyCounter. + theme apply. + self assert: 1 equals: UserInterfaceThemeTestObject applyCounter. + ! Item was added: + ----- Method: UserInterfaceThemeTest>>test21BlocksNoDuplicateEvaluation (in category 'tests') ----- + test21BlocksNoDuplicateEvaluation + + | anotherTheme | + anotherTheme := UserInterfaceTheme new. + anotherTheme set: #modifier for: Object to: [ [:color | color darker] ]. + + theme link: anotherTheme. + self shouldnt: [theme get: #modifier for: Color] raise: Error. + self assert: Color yellow darker equals: ((theme get: #modifier for: Color) value: Color yellow).! Item was added: + ----- Method: UserInterfaceThemeTest>>test22SetAndClearConveniently (in category 'tests') ----- + test22SetAndClearConveniently + + self assert: (theme get: #foo22) isNil. + theme set: #foo22 to: 22. + self assert: 22 equals: (theme get: #foo22). + theme clear: #foo22. + self assert: (theme get: #foo22) isNil.! Item was added: + ----- Method: UserInterfaceThemeTest>>test23LookUpReset (in category 'tests') ----- + test23LookUpReset + "When nothing is found in the super-class hierarchy, try linked themes. However, start at with the original class again." + + | anotherTheme | + anotherTheme := UserInterfaceTheme new. + + + theme set: #fanciness for: Object to: 42. + theme set: #fanciness for: Point to: 43. + + anotherTheme link: theme. + + self assert: 43 equals: (theme get: #fanciness for: Point). + self assert: 43 equals: (anotherTheme get: #fanciness for: Point).! Item was added: + ----- Method: UserInterfaceThemeTest>>test24GetSimplePropertiesViaLink (in category 'tests') ----- + test24GetSimplePropertiesViaLink + + | anotherTheme | + anotherTheme := UserInterfaceTheme new. + + theme set: #fanciness to: 42. + anotherTheme link: theme. + + self assert: 42 equals: (anotherTheme get: #fanciness).! Item was added: + ----- Method: UserInterfaceThemeTest>>test25DerivedPropertiesViaLink (in category 'tests') ----- + test25DerivedPropertiesViaLink + "It is not (yet?) possible to reset the look-up for derived properties. You should merge themes if you need it." + + | anotherTheme | + anotherTheme := UserInterfaceTheme new. + + theme set: #fanciness for: Point to: 42. + theme derive: #fanciness for: Rectangle from: Point at: #fanciness do: [:f | f + 1]. + + anotherTheme set: #fanciness for: Point to: 21. + anotherTheme link: theme. + + self assert: 43 equals: (theme get: #fanciness for: Rectangle). + "self assert: 22 equals: (anotherTheme get: #fanciness for: Rectangle)." + self assert: 43 equals: (anotherTheme get: #fanciness for: Rectangle).! Item was added: + ----- Method: UserInterfaceThemeTest>>test26ApplyTo (in category 'tests') ----- + test26ApplyTo + + | m | + m := UserInterfaceThemeTestObject new. + + theme set: #testColor for: UserInterfaceThemeTestObject to: Color white. + self assert: m testColor isNil. + + theme applyTo: {m}. + self assert: Color white equals: m testColor. + ! Item was added: + Object subclass: #UserInterfaceThemeTestObject + instanceVariableNames: 'testColor unknownProperty' + classVariableNames: 'ApplyCounter' + poolDictionaries: '' + category: 'Tests-System-Preferences'! Item was added: + ----- Method: UserInterfaceThemeTestObject class>>applyCounter (in category 'as yet unclassified') ----- + applyCounter + ^ ApplyCounter! Item was added: + ----- Method: UserInterfaceThemeTestObject class>>applyUserInterfaceTheme (in category 'as yet unclassified') ----- + applyUserInterfaceTheme + ApplyCounter := (ApplyCounter ifNil: [0]) + 1.! Item was added: + ----- Method: UserInterfaceThemeTestObject class>>benchLookup (in category 'benchmark') ----- + benchLookup + " + Microsoft Surface Pro 3, Windows 10 v1511, CogVM r201606301459, Squeak 5.1alpha #16138 + '210,000 per second. 4.76 microseconds per run.' -- leaves enough room for quirky morphs that keep on drawing themselves based on direct theme lookup. + + I think this setup is really heavy. Morphs should not look-up things that often. They can cache. Anyway: + - link through 3 themes + - look up superclasses up to ProtoObject (for each theme!!) + + self benchLookup" + + | c t1 t2 t3 m result | + c := UserInterfaceTheme current. + m := UserInterfaceThemeTestObject new. + t1 := UserInterfaceTheme new name: #benchmarkOne. + t2 := UserInterfaceTheme new name: #benchmarkTwo. + t3 := UserInterfaceTheme new name: #benchmarkThree. + + t3 set: #testColor for: ProtoObject to: Color white. + t1 link: t2. + t2 link: t3. + + t1 apply. + + result := OrderedCollection new. + + [ + 3 timesRepeat: [result add: [m getTestColor] bench]. + ] ensure: [c apply]. + + result explore.! Item was added: + ----- Method: UserInterfaceThemeTestObject class>>resetApplyCounter (in category 'as yet unclassified') ----- + resetApplyCounter + ApplyCounter := 0.! Item was added: + ----- Method: UserInterfaceThemeTestObject class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ super themeProperties, { + {#testColor. 'test'. 'Some test property'} + }! Item was added: + ----- Method: UserInterfaceThemeTestObject>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + + self testColor: self userInterfaceTheme testColor. + self unknownProperty: self userInterfaceTheme unknownProperty.! Item was added: + ----- Method: UserInterfaceThemeTestObject>>canApplyUserInterfaceTheme (in category 'visual properties') ----- + canApplyUserInterfaceTheme + ^ true! Item was added: + ----- Method: UserInterfaceThemeTestObject>>getTestColor (in category 'updating') ----- + getTestColor + + ^ self userInterfaceTheme testColor! Item was added: + ----- Method: UserInterfaceThemeTestObject>>getTestColorViaPerform (in category 'updating') ----- + getTestColorViaPerform + + ^ self userInterfaceTheme perform: #testColor! Item was added: + ----- Method: UserInterfaceThemeTestObject>>testColor (in category 'accessing') ----- + testColor + + ^ testColor! Item was added: + ----- Method: UserInterfaceThemeTestObject>>testColor: (in category 'accessing') ----- + testColor: anObject + + testColor := anObject! Item was added: + ----- Method: UserInterfaceThemeTestObject>>unknownProperty (in category 'accessing') ----- + unknownProperty + + ^ unknownProperty! Item was added: + ----- Method: UserInterfaceThemeTestObject>>unknownProperty: (in category 'accessing') ----- + unknownProperty: anObject + + unknownProperty := anObject! From commits at source.squeak.org Sun Jul 31 08:21:34 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:21:36 2016 Subject: [squeak-dev] The Trunk: Kernel-mt.1034.mcz Message-ID: Marcel Taeumel uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-mt.1034.mcz ==================== Summary ==================== Name: Kernel-mt.1034 Author: mt Time: 31 July 2016, 10:21:08.99049 am UUID: f57f51f9-aa84-5e4e-90cb-a9c6228e3cd4 Ancestors: Kernel-topa.1033 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. =============== Diff against Kernel-topa.1033 =============== Item was changed: Object subclass: #Model instanceVariableNames: 'dependents' + classVariableNames: 'UseColorfulWindows WindowActiveOnFirstClick' - classVariableNames: 'WindowActiveOnFirstClick' poolDictionaries: '' category: 'Kernel-Models'! !Model commentStamp: '' prior: 0! Provides a superclass for classes that function as models. The only behavior provided is fast dependents maintenance, which bypasses the generic DependentsFields mechanism. 1/23/96 sw! Item was added: + ----- Method: Model class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ { + { #uniformWindowColor. 'Colors'. 'The color to be used when all windows should have the same color' }. + { #customWindowColor. 'Colors'. 'The color to be used when all windows can have their own color' }. + }! Item was added: + ----- Method: Model class>>useColorfulWindows (in category 'preferences') ----- + useColorfulWindows + + ^UseColorfulWindows ifNil:[true]! Item was added: + ----- Method: Model class>>useColorfulWindows: (in category 'preferences') ----- + useColorfulWindows: aBoolean + + UseColorfulWindows = aBoolean ifTrue: [^ self]. + UseColorfulWindows := aBoolean. + + (Smalltalk classNamed: #SystemWindow) ifNotNil: [:c | c refreshAllWindows]. + (Smalltalk classNamed: #TheWorldMainDockingBar) ifNotNil: [:c | c updateInstances].! Item was added: + ----- Method: Model>>applyUserInterfaceTheme (in category 'morphic ui') ----- + applyUserInterfaceTheme + + self dependents do: [:ea | + ea isSystemWindow ifTrue: [ + ea refreshWindowColor]].! Item was added: + ----- Method: Model>>canApplyUserInterfaceTheme (in category 'morphic ui') ----- + canApplyUserInterfaceTheme + ^ self dependents notEmpty! Item was added: + ----- Method: Model>>defaultBackgroundColor (in category 'morphic ui') ----- + defaultBackgroundColor + + self flag: #remove. "Use #windowColorToUse" + ^ self windowColorToUse! Item was added: + ----- Method: Model>>defaultWindowColor (in category 'morphic ui') ----- + defaultWindowColor + + ^ self uniformWindowColor! Item was added: + ----- Method: Model>>uniformWindowColor (in category 'morphic ui') ----- + uniformWindowColor + + ^ self userInterfaceTheme uniformWindowColor ifNil: [Color veryVeryLightGray]! Item was added: + ----- Method: Model>>windowColorToUse (in category 'morphic ui') ----- + windowColorToUse + + ^ Color colorFrom: (self class useColorfulWindows + ifTrue: [self userInterfaceTheme customWindowColor ifNil: [self defaultWindowColor]] + ifFalse: [self uniformWindowColor])! Item was removed: - ----- Method: Object>>defaultBackgroundColor (in category 'user interface') ----- - defaultBackgroundColor - "Answer the color to be used as the base window color for a window whose model is an object of the receiver's class" - - ^ Preferences windowColorFor: self class name! Item was added: + ----- Method: StringHolder>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.9 g: 0.9 b: 0.719)! From commits at source.squeak.org Sun Jul 31 08:26:48 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:26:50 2016 Subject: [squeak-dev] The Trunk: System-mt.852.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.852.mcz ==================== Summary ==================== Name: System-mt.852 Author: mt Time: 31 July 2016, 10:26:23.47249 am UUID: 2f87dcb0-45b2-4747-a5dc-2968f97a816a Ancestors: System-mt.851 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. =============== Diff against System-mt.851 =============== Item was removed: - ----- Method: Object class>>windowColorSpecification (in category '*System-Support-window color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference. - This is a backstop for classes that don't otherwise define a preference." - - ^ WindowColorSpec classSymbol: self name - wording: 'Default' brightColor: #veryVeryLightGray - pastelColor: #veryVeryLightGray - normalColor: #veryVeryLightGray - helpMessage: 'Other windows without color preferences.'! Item was removed: - ----- Method: Preferences class>>checkForWindowColors (in category 'prefs - window colors') ----- - checkForWindowColors - (self allPreferences noneSatisfy: [:aPref | aPref name endsWith: 'WindowColor']) - ifTrue: [self installBrightWindowColors].! Item was removed: - ----- Method: Preferences class>>darkenStandardWindowPreferences (in category 'prefs - window colors') ----- - darkenStandardWindowPreferences - "Make all window-color preferences one shade darker" - - (self allPreferences - select: [:aPref | (aPref name endsWith: 'WindowColor') - and: [aPref preferenceValue isColor]]) - do: [:aPref | aPref preferenceValue: aPref preferenceValue darker]. - - "Preferences darkenStandardWindowPreferences" - ! Item was removed: - ----- Method: Preferences class>>installBrightWindowColors (in category 'prefs - window colors') ----- - installBrightWindowColors - "Install the factory-provided default window colors for all tools" - - "Preferences installBrightWindowColors" - - self installWindowColorsVia: [:aSpec | aSpec brightColor]! Item was removed: - ----- Method: Preferences class>>installNormalWindowColors (in category 'prefs - window colors') ----- - installNormalWindowColors - "Install the factory-provided default window colors for all tools" - - "Preferences installNormalWindowColors" - - self installWindowColorsVia: [:aSpec | aSpec normalColor]! Item was removed: - ----- Method: Preferences class>>installPastelWindowColors (in category 'prefs - window colors') ----- - installPastelWindowColors - "Install the factory-provided default pastel window colors for all tools" - - "Preferences installPastelWindowColors" - self installWindowColorsVia: [:aSpec | aSpec pastelColor]! Item was removed: - ----- Method: Preferences class>>installUniformWindowColors (in category 'prefs - window colors') ----- - installUniformWindowColors - "Install the factory-provided uniform window colors for all tools" - - "Preferences installUniformWindowColors" - self installWindowColorsVia: [:aQuad | self uniformWindowColor]! Item was removed: - ----- Method: Preferences class>>installWindowColorsVia: (in category 'prefs - window colors') ----- - installWindowColorsVia: colorSpecBlock - "Install windows colors using colorSpecBlock to deliver the color source for each element; the block is handed a WindowColorSpec object" - "Preferences installBrightWindowColors" - - WindowColorRegistry refresh. - self windowColorTable do: - [:aColorSpec | | color | - color := (Color colorFrom: (colorSpecBlock value: aColorSpec)). - self setWindowColorFor: aColorSpec classSymbol to: color]. - SystemWindow refreshAllWindows. - TheWorldMainDockingBar updateInstances.! Item was removed: - ----- Method: Preferences class>>lightenStandardWindowPreferences (in category 'prefs - window colors') ----- - lightenStandardWindowPreferences - "Make all window-color preferences one shade darker" - - (self allPreferences - select: [:aPref | (aPref name endsWith: 'WindowColor') - and: [aPref preferenceValue isColor]]) - do: [:aPref | aPref preferenceValue: aPref preferenceValue lighter]. - - "Preferences lightenStandardWindowPreferences" - ! Item was removed: - ----- Method: Preferences class>>preferencesPanelWindowColor (in category 'standard queries') ----- - preferencesPanelWindowColor - ^ self - valueOfFlag: #preferencesPanelWindowColor - ifAbsent: - [ Color - r: 0.645 - g: 1.0 - b: 1.0 ]! Item was removed: - ----- Method: Preferences class>>setWindowColorFor:to: (in category 'prefs - window colors') ----- - setWindowColorFor: modelSymbol to: incomingColor - | aColor aPrefSymbol aColorSpec | - aColorSpec := WindowColorRegistry registeredWindowColorSpecFor: modelSymbol. - aColorSpec ifNil: [^self]. - aColor := incomingColor asNontranslucentColor. - (aColor = ColorPickerMorph perniciousBorderColor or: [aColor = Color black]) - ifTrue: [^ self]. - aPrefSymbol := self windowColorPreferenceForClassNamed: aColorSpec classSymbol. - self - addPreference: aPrefSymbol - categories: { #'window colors' } - default: aColor - balloonHelp: aColorSpec helpMessage translated - projectLocal: false - changeInformee: nil - changeSelector: nil - type: #WindowColor! Item was removed: - ----- Method: Preferences class>>uniformWindowColor (in category 'prefs - window colors') ----- - uniformWindowColor - ^Color veryVeryLightGray! Item was removed: - ----- Method: Preferences class>>windowColorFor: (in category 'prefs - window colors') ----- - windowColorFor: aModelClassName - | classToCheck prefSymbol | - self checkForWindowColors. - classToCheck := Smalltalk at: aModelClassName. - prefSymbol := self windowColorPreferenceForClassNamed: classToCheck name. - [(classToCheck ~~ Object) and: [(self preferenceAt: prefSymbol) isNil]] - whileTrue: - [classToCheck := classToCheck superclass. - prefSymbol := self windowColorPreferenceForClassNamed: classToCheck name]. - ^self valueOfPreference: prefSymbol ifAbsent: [self uniformWindowColor].! Item was removed: - ----- Method: Preferences class>>windowColorHelp (in category 'prefs - window colors') ----- - windowColorHelp - "Provide help for the window-color panel" - - | helpString | - helpString := - 'The "Window Colors" panel lets you select colors for many kinds of standard Squeak windows. - - You can change your color preference for any particular tool by clicking on the color swatch and then selecting the desired color from the resulting color-picker. - - The three buttons entitled "Bright", "Pastel", and "Gray" let you revert to any of three different standard color schemes. - - The choices you make in the Window Colors panel only affect the colors of new windows that you open. - - You can make other tools have their colors governed by this panel by simply implementing #windowColorSpecification on the class side of the model -- consult implementors of that method to see examples of how to do this.'. - - (StringHolder new contents: helpString) - openLabel: 'About Window Colors' - - "Preferences windowColorHelp"! Item was removed: - ----- Method: Preferences class>>windowColorPreferenceForClassNamed: (in category 'prefs - window colors') ----- - windowColorPreferenceForClassNamed: aClassName - | aColorSpec wording | - aColorSpec := WindowColorRegistry registeredWindowColorSpecFor: aClassName. - wording := aColorSpec ifNil: [aClassName] ifNotNil: [aColorSpec wording]. - ^(wording, 'WindowColor') asLegalSelector asSymbol.! Item was removed: - ----- Method: Preferences class>>windowColorTable (in category 'prefs - window colors') ----- - windowColorTable - "Answer a list of WindowColorSpec objects, one for each tool to be represented in the window-color panel" - ^ (WindowColorRegistry registeredWindowColorSpecs - asSortedCollection: - [:specOne :specTwo | specOne wording < specTwo wording]) asArray. - - "Preferences windowColorTable"! Item was removed: - ----- Method: StringHolder class>>windowColorSpecification (in category '*System-Support-window colorwindow color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference" - - ^ WindowColorSpec classSymbol: self name wording: 'Workspace' brightColor: #lightYellow pastelColor: #paleYellow helpMessage: 'A place for text in a window.'! Item was removed: - Object subclass: #WindowColorRegistry - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'System-Support'! - WindowColorRegistry class - instanceVariableNames: 'registry'! - - !WindowColorRegistry commentStamp: 'hpt 10/9/2005 22:54' prior: 0! - I provide to the applications developer a place where they can register their WindowColorSpecification for their application's windows. - ! - WindowColorRegistry class - instanceVariableNames: 'registry'! Item was removed: - ----- Method: WindowColorRegistry class>>initialize (in category 'registry') ----- - initialize - self refresh.! Item was removed: - ----- Method: WindowColorRegistry class>>refresh (in category 'registry') ----- - refresh - "This is a one-time only method for bootstraping the new registry. Here we will scan all classes for #windowColorSpecification methods and register those to the registry" - - registry := nil. - ((self systemNavigation allClassesImplementing: #windowColorSpecification) - collect: [:aClass | aClass theNonMetaClass windowColorSpecification]) - do: [:spec | self registerColorSpecification: spec toClassNamed: spec classSymbol ].! Item was removed: - ----- Method: WindowColorRegistry class>>registerColorSpecification:toClassNamed: (in category 'registry') ----- - registerColorSpecification: aColorSpec toClassNamed: aClassName - self registry at: aClassName asSymbol put: aColorSpec.! Item was removed: - ----- Method: WindowColorRegistry class>>registeredWindowColorSpecFor: (in category 'registry') ----- - registeredWindowColorSpecFor: aClassName - "Return the Window Color Spec for the given class. " - ^self registry at: aClassName asSymbol ifAbsent: []. - ! Item was removed: - ----- Method: WindowColorRegistry class>>registeredWindowColorSpecs (in category 'registry') ----- - registeredWindowColorSpecs - ^self registry values! Item was removed: - ----- Method: WindowColorRegistry class>>registry (in category 'registry') ----- - registry - ^registry ifNil: [registry := Dictionary new].! Item was removed: - ----- Method: WindowColorRegistry class>>unregisterColorSpecificationForClassNamed: (in category 'registry') ----- - unregisterColorSpecificationForClassNamed: aClassName - - self registry removeKey: aClassName asSymbol ! Item was removed: - Object subclass: #WindowColorSpec - instanceVariableNames: 'classSymbol wording brightColor pastelColor normalColor helpMessage' - classVariableNames: '' - poolDictionaries: '' - category: 'System-Support'! Item was removed: - ----- Method: WindowColorSpec class>>classSymbol:wording:brightColor:pastelColor:helpMessage: (in category 'instance creation') ----- - classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol helpMessage: hlpMsg - "Answer a new instance of the receiver with the given slots filled in" - - ^ self new classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol helpMessage: hlpMsg! Item was removed: - ----- Method: WindowColorSpec class>>classSymbol:wording:brightColor:pastelColor:normalColor:helpMessage: (in category 'instance creation') ----- - classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol normalColor: noCol helpMessage: hlpMsg - - ^ self new classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol normalColor: noCol helpMessage: hlpMsg! Item was removed: - ----- Method: WindowColorSpec>>brightColor (in category 'access') ----- - brightColor - "Answer the brightColor" - - ^ brightColor! Item was removed: - ----- Method: WindowColorSpec>>classSymbol (in category 'access') ----- - classSymbol - "Answer the classSymbol" - - ^ classSymbol! Item was removed: - ----- Method: WindowColorSpec>>classSymbol:wording:brightColor:pastelColor:helpMessage: (in category 'initialization') ----- - classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol helpMessage: hlpMsg - "Initialize the receiver's instance variables" - - self - classSymbol: sym - wording: wrd - brightColor: brCol - pastelColor: paCol - normalColor: (Color colorFrom: brCol) duller - helpMessage: hlpMsg! Item was removed: - ----- Method: WindowColorSpec>>classSymbol:wording:brightColor:pastelColor:normalColor:helpMessage: (in category 'initialization') ----- - classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol normalColor: noCol helpMessage: hlpMsg - "Initialize the receiver's instance variables" - - classSymbol := sym. - wording := wrd. - brightColor := brCol. - pastelColor := paCol. - normalColor := noCol. - helpMessage := hlpMsg! Item was removed: - ----- Method: WindowColorSpec>>helpMessage (in category 'access') ----- - helpMessage - "Answer the helpMessage" - - ^ helpMessage! Item was removed: - ----- Method: WindowColorSpec>>normalColor (in category 'access') ----- - normalColor - - ^ normalColor! Item was removed: - ----- Method: WindowColorSpec>>pastelColor (in category 'access') ----- - pastelColor - "Answer the pastelColor" - - ^ pastelColor! Item was removed: - ----- Method: WindowColorSpec>>printOn: (in category 'printing') ----- - printOn: aStream - "Print the receiver on a stream" - - super printOn: aStream. - classSymbol printOn: aStream. - aStream nextPutAll: ' bright: ', brightColor printString, ' pastel: ', pastelColor printString, ' normal: ', normalColor printString! Item was removed: - ----- Method: WindowColorSpec>>wording (in category 'access') ----- - wording - "Answer the wording" - - ^ wording! Item was changed: + (PackageInfo named: 'System') postscript: 'Preferences allPreferences + select: [:ea | ea name endsWith: #WindowColor] + thenDo: [:ea | Preferences removePreference: ea name].'! - (PackageInfo named: 'System') postscript: 'Preferences removePreference: #roundedWindowCorners. - Preferences removePreference: #gradientScrollBars.'! From commits at source.squeak.org Sun Jul 31 08:28:27 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:28:29 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1208.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1208.mcz ==================== Summary ==================== Name: Morphic-mt.1208 Author: mt Time: 31 July 2016, 10:27:47.31449 am UUID: e9b6775b-a536-0145-9d2f-ef874b6e84f4 Ancestors: Morphic-mt.1207 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. =============== Diff against Morphic-mt.1207 =============== Item was changed: ----- Method: CornerGripMorph class>>activeColor (in category 'handle settings') ----- activeColor ^(self activeForm colorAt: 24@24) alpha: 1! Item was changed: ----- Method: CornerGripMorph class>>passiveColor (in category 'handle settings') ----- passiveColor ^(self passiveForm colorAt: 24@24) alpha: 1! Item was changed: ----- Method: Morph>>embeddedInMorphicWindowLabeled: (in category 'e-toy support') ----- embeddedInMorphicWindowLabeled: labelString | window | window := (SystemWindow labelled: labelString) model: nil. + window setStripeColorsFrom: Color white. - window setStripeColorsFrom: nil defaultBackgroundColor. window addMorph: self frame: (0@0 extent: 1@1). ^ window! Item was added: + ----- Method: SystemWindow class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ super themeProperties, { + { #borderColorModifier. 'Colors'. 'How to derive the borderColor from the window color.' }. + { #borderWidth. 'Borders'. 'Width of the menu''s border.' }. + { #titleFont. 'Fonts'. 'Font of the window title.' }. + + { #unfocusedWindowColorModifier. 'Colors'. 'A block with one argument that modifies a color to look unfocused.' }. + { #unfocusedLabelColor. 'Colors'. 'Window title color when window has no focus.'}. + { #focusedLabelColor. 'Colors'. 'Window title color when window has focus.'}. + }! Item was removed: - ----- Method: SystemWindow>>adoptPaneColor: (in category 'colors') ----- - adoptPaneColor: aPaneColor - - super adoptPaneColor: (self class gradientWindow - ifTrue: [aPaneColor ifNotNil: [:c | c duller]] - ifFalse: [aPaneColor]).! Item was added: + ----- Method: SystemWindow>>applyUserInterfaceTheme (in category 'user interface') ----- + applyUserInterfaceTheme + + super applyUserInterfaceTheme. + + self + setDefaultParameters; + refreshWindowColor. + + self isLookingFocused + ifTrue: [self lookUnfocused; lookFocused] + ifFalse: [self lookFocused; lookUnfocused]. + + self isCollapsed ifTrue: [self setProperty: #applyTheme toValue: true].! Item was changed: ----- Method: SystemWindow>>collapseOrExpand (in category 'resize/collapse') ----- collapseOrExpand "Collapse or expand the window, depending on existing state" | cf | isCollapsed ifTrue: ["Expand -- restore panes to morphics structure" isCollapsed := false. self beKeyWindow. "Bring to frint first" Preferences collapseWindowsInPlace ifTrue: [fullFrame := fullFrame align: fullFrame topLeft with: self getBoundsWithFlex topLeft] ifFalse: [collapsedFrame := self getBoundsWithFlex]. collapseBox ifNotNil: [collapseBox setBalloonText: 'collapse this window' translated]. self setBoundsWithFlex: fullFrame. paneMorphs reverseDo: [:m | self addMorph: m unlock. self world startSteppingSubmorphsOf: m]. + self addPaneSplitters. + (self hasProperty: #applyTheme) ifTrue: [ + self removeProperty: #applyTheme. + self userInterfaceTheme applyTo: self allMorphs]] - self addPaneSplitters] ifFalse: ["Collapse -- remove panes from morphics structure" isCollapsed := true. fullFrame := self getBoundsWithFlex. "First save latest fullFrame" paneMorphs do: [:m | m delete; releaseCachedState]. self removePaneSplitters. self removeCornerGrips. model modelSleep. cf := self getCollapsedFrame. (collapsedFrame isNil and: [Preferences collapseWindowsInPlace not]) ifTrue: [collapsedFrame := cf]. self setBoundsWithFlex: cf. collapseBox ifNotNil: [collapseBox setBalloonText: 'expand this window' translated ]. expandBox ifNotNil: [expandBox setBalloonText: 'expand this window' translated ]. self sendToBack]. self layoutChanged! Item was removed: - ----- Method: SystemWindow>>defaultBorderColor (in category 'initialization') ----- - defaultBorderColor - "answer the default border color/fill style for the receiver" - ^ self defaultColor muchDarker! Item was removed: - ----- Method: SystemWindow>>defaultBorderWidth (in category 'initialization') ----- - defaultBorderWidth - "answer the default border width for the receiver" - ^ 1! Item was removed: - ----- Method: SystemWindow>>defaultColor (in category 'initialization') ----- - defaultColor - "answer the default color/fill style for the receiver" - ^ Preferences uniformWindowColor! Item was changed: ----- Method: SystemWindow>>gradientWithColor: (in category 'colors') ----- gradientWithColor: aColor + | gradient cc | + cc := aColor adjustSaturation: -0.08 brightness: 0.4. - | gradient | gradient := GradientFillStyle ramp: { + 0.0 -> (self isKeyWindow ifTrue: [cc muchLighter] ifFalse: [cc]). + 0.25 -> (aColor mixed: 0.5 with: cc). + 1.0 -> aColor. - 0.0 -> Color white. - 0.2 -> (aColor duller mixed: 0.5 with: (Color gray: 0.9)) lighter. - 1.0 -> aColor duller. }. gradient origin: self topLeft. gradient direction: 0 @ self labelHeight. ^gradient! Item was changed: ----- Method: SystemWindow>>initializeLabelArea (in category 'initialization') ----- initializeLabelArea "Initialize the label area (titlebar) for the window." labelString ifNil: [labelString := 'Untitled Window']. + label := StringMorph new contents: labelString. - label := StringMorph new contents: labelString; - font: Preferences windowTitleFont emphasis: 0. "Add collapse box so #labelHeight will work" collapseBox := self createCollapseBox. stripes := Array with: (RectangleMorph newBounds: bounds) with: (RectangleMorph newBounds: bounds). "see extent:" self addLabelArea. self setLabelWidgetAllowance. self addCloseBox. self class moveMenuButtonRight ifTrue: [self addLabel. self addMenuControl] ifFalse: [self addMenuControl. self addLabel]. self addExpandBox. labelArea addMorphBack: collapseBox. self setFramesForLabelArea. Preferences noviceMode ifTrue: [closeBox ifNotNil: [closeBox setBalloonText: 'close window']. menuBox ifNotNil: [menuBox setBalloonText: 'window menu']. collapseBox ifNotNil: [collapseBox setBalloonText: 'collapse/expand window']]. ! Item was changed: ----- Method: SystemWindow>>lookFocused (in category 'focus') ----- lookFocused "Optimize performance." self isLookingFocused ifTrue: [^ self]. self isLookingFocused: true. + label ifNotNil: [ label color: (self userInterfaceTheme focusedLabelColor ifNil: [Color black]) ]. - label ifNotNil: [ label color: Color black ]. (self isKeyWindow or: [self class windowTitleActiveOnFirstClick]) ifTrue: [self undimWindowButtons]. self paneColorToUse in: [ : col | self setStripeColorsFrom: col ; adoptPaneColor: col].! Item was changed: ----- Method: SystemWindow>>lookUnfocused (in category 'focus') ----- lookUnfocused "Optimize performance." self isLookingFocused ifFalse: [^ self]. self isLookingFocused: false. + label ifNotNil: [ label color: (self userInterfaceTheme unfocusedLabelColor ifNil: [Color darkGray]) ]. - label ifNotNil: [ label color: Color darkGray ]. self dimWindowButtons. self paneColorToUseWhenNotActive in: [ : col | self setStripeColorsFrom: col ; adoptPaneColor: col ]! Item was changed: ----- Method: SystemWindow>>paneColor (in category 'colors') ----- paneColor | cc | (cc := self valueOfProperty: #paneColor) ifNotNil: [^cc]. + model notNil ifTrue: [cc := model windowColorToUse]. + cc ifNil: [cc := paneMorphs isEmptyOrNil ifFalse: [paneMorphs first color]]. + cc ifNil: [cc := self defaultColor]. - Display depth > 2 - ifTrue: - [model ifNotNil: - [model isInMemory - ifTrue: - [cc := Color colorFrom: model defaultBackgroundColor]]. - cc ifNil: [cc := paneMorphs isEmptyOrNil ifFalse: [paneMorphs first color]]]. - cc ifNil: [cc := self defaultBackgroundColor]. self paneColor: cc. ^cc! Item was changed: ----- Method: SystemWindow>>paneColorToUseWhenNotActive (in category 'colors') ----- paneColorToUseWhenNotActive + ^ (self userInterfaceTheme unfocusedWindowColorModifier ifNil: [ [:color | color darker] ]) + value: self paneColorToUse! - ^ self paneColorToUse darker! Item was changed: ----- Method: SystemWindow>>setDefaultParameters (in category 'initialization') ----- setDefaultParameters Preferences menuAppearance3d ifTrue: [ + self addDropShadow. + self hasDropShadow: self isKeyWindow. "maybe turn off again"]. + + self borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]). + label font: (self userInterfaceTheme titleFont ifNil: [TextStyle defaultFont]).! - self hasDropShadow: self isKeyWindow. - - self useSoftDropShadow - ifTrue: [ - self - shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.01); - shadowOffset: (10@8 corner: 10@12)] - ifFalse: [ - self - shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.333); - shadowOffset: 1@1] ]. - self changed.! Item was removed: - ----- Method: SystemWindow>>setLabelFont: (in category 'label') ----- - setLabelFont: aFont - - label ifNil: [^ self]. - label font: aFont. - ! Item was changed: ----- Method: SystemWindow>>setStripeColorsFrom: (in category 'colors') ----- setStripeColorsFrom: paneColor "Set the stripe color based on the given paneColor" labelArea ifNotNil: [labelArea color: Color transparent]. self updateBoxesColor: paneColor. stripes ifNil: [^self]. + self borderColor: ((self userInterfaceTheme borderColorModifier ifNil: [ [:c | c adjustBrightness: -0.3] ]) + value: paneColor). - self borderColor: (paneColor adjustBrightness: -0.3). self class gradientWindow ifTrue: [self fillStyle: (self gradientWithColor: paneColor)] ifFalse: [self color: paneColor].! Item was changed: ----- Method: TheWorldMainDockingBar>>browserMenuItemOn: (in category 'submenu - tools') ----- browserMenuItemOn: menu menu addItem: [ :item | item contents: 'Browser' translated; help: 'Open a browser' translated; + icon: (self colorIcon: Browser basicNew windowColorToUse); - icon: (self colorIcon: Preferences browserWindowColor); target: StandardToolSet; selector: #openClassBrowser ]! Item was changed: ----- Method: TheWorldMainDockingBar>>colorIcon: (in category 'private') ----- colorIcon: aColor "Guess if 'uniform window colors' are used and avoid all icons to be just gray" + (aColor = (UserInterfaceTheme current get: #uniformWindowColor for: Model) or: [Preferences tinyDisplay]) ifTrue: [ ^nil ]. - (aColor = Preferences uniformWindowColor or: [Preferences tinyDisplay]) ifTrue: [ ^nil ]. ^(aColor iconOrThumbnailOfSize: 14) borderWidth: 3 color: MenuMorph menuColor muchDarker; borderWidth: 2 color: Color transparent! Item was changed: ----- Method: TheWorldMainDockingBar>>dualChangeSorterMenuItemOn: (in category 'submenu - tools') ----- dualChangeSorterMenuItemOn: menu menu addItem: [ :item | item contents: 'Dual Change Sorter' translated; help: 'Open a Dual Change Sorter' translated; + icon: (self colorIcon: ChangeSorter basicNew windowColorToUse); - icon: (self colorIcon: ChangeSorter basicNew defaultBackgroundColor); target: DualChangeSorter; selector: #open ]! Item was changed: ----- Method: TheWorldMainDockingBar>>fileListMenuItemOn: (in category 'submenu - tools') ----- fileListMenuItemOn: menu menu addItem: [ :item | item contents: 'File List' translated; help: 'Open a file list' translated; + icon: (self colorIcon: FileList basicNew windowColorToUse); - icon: (self colorIcon: Preferences fileListWindowColor); target: StandardToolSet; selector: #openFileList ]! Item was changed: ----- Method: TheWorldMainDockingBar>>methodFinderMenuItemOn: (in category 'submenu - tools') ----- methodFinderMenuItemOn: menu menu addItem: [:item | item contents: 'Method Finder' translated; help: 'Open the Method Finder' translated; + icon: (self colorIcon: SelectorBrowser basicNew windowColorToUse); - icon: (self colorIcon: Preferences methodFinderWindowColor); target: StandardToolSet; selector: #openSelectorBrowser]! Item was changed: ----- Method: TheWorldMainDockingBar>>monticelloBrowserMenuItemOn: (in category 'submenu - tools') ----- monticelloBrowserMenuItemOn: menu menu addItem: [ :item | item contents: 'Monticello Browser' translated; help: 'Open a Monticello Browser' translated; + icon: (self colorIcon: MCTool basicNew windowColorToUse); - icon: (self colorIcon: MCTool basicNew defaultBackgroundColor); target: MCWorkingCopyBrowser; selector: #open ]! Item was changed: ----- Method: TheWorldMainDockingBar>>monticelloConfigurationsMenuItemOn: (in category 'submenu - tools') ----- monticelloConfigurationsMenuItemOn: menu menu addItem: [ :item | item contents: 'Monticello Configurations' translated; help: 'Open a Monticello Configurations Editor' translated; + icon: (self colorIcon: MCConfigurationBrowser basicNew windowColorToUse); - icon: (self colorIcon: MCConfigurationBrowser basicNew defaultBackgroundColor); target: MCConfigurationBrowser; selector: #open ]! Item was changed: ----- Method: TheWorldMainDockingBar>>preferenceBrowserMenuItemOn: (in category 'submenu - tools') ----- preferenceBrowserMenuItemOn: menu Smalltalk at: #PreferenceBrowser ifPresent:[:pb| menu addItem: [ :item | item contents: 'Preferences' translated; help: 'Open a Preferences Browser' translated; + icon: (self colorIcon: pb basicNew windowColorToUse); - icon: (self colorIcon: pb basicNew defaultBackgroundColor); target: pb; selector: #open ] ].! Item was changed: ----- Method: TheWorldMainDockingBar>>processBrowserMenuItemOn: (in category 'submenu - tools') ----- processBrowserMenuItemOn: menu menu addItem: [ :item | item contents: 'Process Browser' translated; help: 'Open a Process Browser' translated; + icon: (self colorIcon: ProcessBrowser basicNew windowColorToUse); - icon: (self colorIcon: ProcessBrowser basicNew defaultBackgroundColor); target: ProcessBrowser; selector: #open ]! Item was changed: ----- Method: TheWorldMainDockingBar>>simpleChangeSorterMenuItemOn: (in category 'submenu - tools') ----- simpleChangeSorterMenuItemOn: menu menu addItem: [ :item | item contents: 'Simple Change Sorter' translated; help: 'Open a Change Sorter' translated; + icon: (self colorIcon: ChangeSorter basicNew windowColorToUse); - icon: (self colorIcon: ChangeSorter basicNew defaultBackgroundColor); target: ChangeSorter; selector: #open ]! Item was changed: ----- Method: TheWorldMainDockingBar>>testRunnerMenuItemOn: (in category 'submenu - tools') ----- testRunnerMenuItemOn: menu Smalltalk at: #TestRunner ifPresent:[:aClass| menu addItem: [ :item | item contents: 'Test Runner' translated; help: 'Open the Test Runner' translated; + icon: (self colorIcon: aClass basicNew windowColorToUse); - icon: (self colorIcon: aClass basicNew defaultBackgroundColor); target: aClass; selector: #open ] ].! Item was changed: ----- Method: TheWorldMainDockingBar>>transcriptMenuItemOn: (in category 'submenu - tools') ----- transcriptMenuItemOn: menu menu addItem: [ :item | item contents: 'Transcript' translated; help: 'Open the Transcript' translated; + icon: (self colorIcon: Transcript windowColorToUse); - icon: (self colorIcon: Preferences transcriptWindowColor); target: Transcript; selector: #open ]! Item was changed: ----- Method: TheWorldMainDockingBar>>workspaceMenuItemOn: (in category 'submenu - tools') ----- workspaceMenuItemOn: menu menu addItem: [ :item | item contents: 'Workspace' translated; help: 'Open a Workspace' translated; + icon: (self colorIcon: Workspace basicNew windowColorToUse); - icon: (self colorIcon: Preferences workspaceWindowColor); target: StandardToolSet; selector: #openWorkspace ]! Item was changed: + (PackageInfo named: 'Morphic') postscript: 'TheWorldMainDockingBar updateInstances. "..."'! - (PackageInfo named: 'Morphic') postscript: 'TheWorldMainDockingBar updateInstances.'! From commits at source.squeak.org Sun Jul 31 08:30:00 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:30:02 2016 Subject: [squeak-dev] The Trunk: 51Deprecated-mt.34.mcz Message-ID: Marcel Taeumel uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-mt.34.mcz ==================== Summary ==================== Name: 51Deprecated-mt.34 Author: mt Time: 31 July 2016, 10:29:55.07349 am UUID: 99b93939-2985-7149-9b93-1aa8b90728c7 Ancestors: 51Deprecated-mt.33 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. =============== Diff against 51Deprecated-mt.33 =============== Item was changed: SystemOrganization addCategory: #'51Deprecated-Files-Kernel'! SystemOrganization addCategory: #'51Deprecated-Morphic-Support'! SystemOrganization addCategory: #'51Deprecated-Morphic-Text Support'! + SystemOrganization addCategory: #'51Deprecated-PreferenceBrowser'! + SystemOrganization addCategory: #'51Deprecated-System-Support'! Item was added: + ----- Method: Object>>defaultBackgroundColor (in category '*51Deprecated') ----- + defaultBackgroundColor + + self deprecated: 'Implement #uniformWindowColor and #customWindowColor in your model.'. + ^ Color veryVeryLightGray! Item was added: + PBColorPreferenceView subclass: #PBWindowColorPreferenceView + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: '51Deprecated-PreferenceBrowser'! Item was added: + ----- Method: PBWindowColorPreferenceView class>>initialize (in category 'class initialization') ----- + initialize + self viewRegistry register: self.! Item was added: + ----- Method: PBWindowColorPreferenceView class>>unload (in category 'class initialization') ----- + unload + "Unload order is not guaranteed so guard against failure" + [self viewRegistry unregister: self] on: Error do:[]! Item was added: + ----- Method: PBWindowColorPreferenceView class>>viewRegistry (in category 'class initialization') ----- + viewRegistry + ^(PreferenceViewRegistry registryOf: #windowColorPreferences) + viewOrder: 6; + yourself.! Item was added: + ----- Method: PBWindowColorPreferenceView>>initialize (in category 'initialization') ----- + initialize + super initialize. + self addActionTitled: 'Bright' target: Preferences selector: #yourself arguments: {} balloonText: 'Use standard bright colors for all windows' translated. + self addActionTitled: 'Pastel' target: Preferences selector: #yourself arguments: {} balloonText: 'Use standard pastel colors for all windows' translated. + self addActionTitled: 'Gray' target: Preferences selector: #yourself arguments: {} balloonText: 'Use gray backgrounds for all standard windows' translated.! Item was added: + ----- Method: Preferences class>>setWindowColorFor:to: (in category '*51Deprecated-window colors') ----- + setWindowColorFor: modelSymbol to: incomingColor + + | aColor | + self deprecated: 'Configure UI themes directly.'. + aColor := incomingColor asNontranslucentColor. + (aColor = ColorPickerMorph perniciousBorderColor or: [aColor = Color black]) + ifTrue: [^ self]. + UserInterfaceTheme set: #customWindowColor for: modelSymbol to: aColor. ! Item was added: + ----- Method: Preferences class>>uniformWindowColor (in category '*51Deprecated-window colors') ----- + uniformWindowColor + + self deprecated: 'Use Model >> #uniformWindowColor.'. + ^Color veryVeryLightGray! Item was added: + ----- Method: Preferences class>>windowColorFor: (in category '*51Deprecated-window colors') ----- + windowColorFor: aModelClassName + + | classToCheck | + self deprecated: 'Use Model >> #customWindowColor'. + classToCheck := Smalltalk at: aModelClassName. + ^ (UserInterfaceTheme current get: #customWindowColor for: classToCheck) + ifNil: [(UserInterfaceTheme current get: #uniformWindowColor for: classToCheck) + ifNil: [Color veryVeryLightGray]]! Item was added: + ----- Method: Preferences class>>windowColorTable (in category '*51Deprecated-window colors') ----- + windowColorTable + "Answer a list of WindowColorSpec objects, one for each tool to be represented in the window-color panel" + + self deprecated: 'Consult current UI theme.'. + ^ {}! Item was added: + ----- Method: SystemWindow>>setLabelFont: (in category '*51Deprecated') ----- + setLabelFont: aFont + + label ifNil: [^ self]. + label font: aFont. + ! Item was added: + Object subclass: #WindowColorRegistry + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: '51Deprecated-System-Support'! + WindowColorRegistry class + instanceVariableNames: 'registry'! + + !WindowColorRegistry commentStamp: 'hpt 10/9/2005 22:54' prior: 0! + I provide to the applications developer a place where they can register their WindowColorSpecification for their application's windows. + ! + WindowColorRegistry class + instanceVariableNames: 'registry'! Item was added: + ----- Method: WindowColorRegistry class>>initialize (in category 'registry') ----- + initialize + self refresh.! Item was added: + ----- Method: WindowColorRegistry class>>refresh (in category 'registry') ----- + refresh + "This is a one-time only method for bootstraping the new registry. Here we will scan all classes for #windowColorSpecification methods and register those to the registry" + + registry := nil. + ((self systemNavigation allClassesImplementing: #windowColorSpecification) + collect: [:aClass | aClass theNonMetaClass windowColorSpecification]) + do: [:spec | self registerColorSpecification: spec toClassNamed: spec classSymbol ].! Item was added: + ----- Method: WindowColorRegistry class>>registerColorSpecification:toClassNamed: (in category 'registry') ----- + registerColorSpecification: aColorSpec toClassNamed: aClassName + self registry at: aClassName asSymbol put: aColorSpec.! Item was added: + ----- Method: WindowColorRegistry class>>registeredWindowColorSpecFor: (in category 'registry') ----- + registeredWindowColorSpecFor: aClassName + "Return the Window Color Spec for the given class. " + ^self registry at: aClassName asSymbol ifAbsent: []. + ! Item was added: + ----- Method: WindowColorRegistry class>>registeredWindowColorSpecs (in category 'registry') ----- + registeredWindowColorSpecs + ^self registry values! Item was added: + ----- Method: WindowColorRegistry class>>registry (in category 'registry') ----- + registry + ^registry ifNil: [registry := Dictionary new].! Item was added: + ----- Method: WindowColorRegistry class>>unregisterColorSpecificationForClassNamed: (in category 'registry') ----- + unregisterColorSpecificationForClassNamed: aClassName + + self registry removeKey: aClassName asSymbol ! Item was added: + Object subclass: #WindowColorSpec + instanceVariableNames: 'classSymbol wording brightColor pastelColor normalColor helpMessage' + classVariableNames: '' + poolDictionaries: '' + category: '51Deprecated-System-Support'! Item was added: + ----- Method: WindowColorSpec class>>classSymbol:wording:brightColor:pastelColor:helpMessage: (in category 'instance creation') ----- + classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol helpMessage: hlpMsg + "Answer a new instance of the receiver with the given slots filled in" + + ^ self new classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol helpMessage: hlpMsg! Item was added: + ----- Method: WindowColorSpec class>>classSymbol:wording:brightColor:pastelColor:normalColor:helpMessage: (in category 'instance creation') ----- + classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol normalColor: noCol helpMessage: hlpMsg + + ^ self new classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol normalColor: noCol helpMessage: hlpMsg! Item was added: + ----- Method: WindowColorSpec>>brightColor (in category 'access') ----- + brightColor + "Answer the brightColor" + + ^ brightColor! Item was added: + ----- Method: WindowColorSpec>>classSymbol (in category 'access') ----- + classSymbol + "Answer the classSymbol" + + ^ classSymbol! Item was added: + ----- Method: WindowColorSpec>>classSymbol:wording:brightColor:pastelColor:helpMessage: (in category 'initialization') ----- + classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol helpMessage: hlpMsg + "Initialize the receiver's instance variables" + + self + classSymbol: sym + wording: wrd + brightColor: brCol + pastelColor: paCol + normalColor: (Color colorFrom: brCol) duller + helpMessage: hlpMsg! Item was added: + ----- Method: WindowColorSpec>>classSymbol:wording:brightColor:pastelColor:normalColor:helpMessage: (in category 'initialization') ----- + classSymbol: sym wording: wrd brightColor: brCol pastelColor: paCol normalColor: noCol helpMessage: hlpMsg + "Initialize the receiver's instance variables" + + classSymbol := sym. + wording := wrd. + brightColor := brCol. + pastelColor := paCol. + normalColor := noCol. + helpMessage := hlpMsg! Item was added: + ----- Method: WindowColorSpec>>helpMessage (in category 'access') ----- + helpMessage + "Answer the helpMessage" + + ^ helpMessage! Item was added: + ----- Method: WindowColorSpec>>normalColor (in category 'access') ----- + normalColor + + ^ normalColor! Item was added: + ----- Method: WindowColorSpec>>pastelColor (in category 'access') ----- + pastelColor + "Answer the pastelColor" + + ^ pastelColor! Item was added: + ----- Method: WindowColorSpec>>printOn: (in category 'printing') ----- + printOn: aStream + "Print the receiver on a stream" + + super printOn: aStream. + classSymbol printOn: aStream. + aStream nextPutAll: ' bright: ', brightColor printString, ' pastel: ', pastelColor printString, ' normal: ', normalColor printString! Item was added: + ----- Method: WindowColorSpec>>wording (in category 'access') ----- + wording + "Answer the wording" + + ^ wording! Item was added: + (PackageInfo named: '51Deprecated') postscript: 'PBWindowColorPreferenceView unload. + WindowColorRegistry refresh.'! From commits at source.squeak.org Sun Jul 31 08:32:08 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:32:10 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.171.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.171.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.171 Author: mt Time: 31 July 2016, 10:32:00.85249 am UUID: de835798-12b4-df4e-9232-dcf31e11ee6f Ancestors: ToolBuilder-Morphic-mt.170 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. =============== Diff against ToolBuilder-Morphic-mt.170 =============== Item was changed: + Model subclass: #ListChooser - Object subclass: #ListChooser instanceVariableNames: 'window fullList selectedItems searchText searchMorph title listMorph index realIndex buttonBar builder addAllowed result' classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Morphic'! !ListChooser commentStamp: 'MAD 3/14/2010 16:20' prior: 0! I am a simple dialog to allow the user to pick from a list of strings or symbols. I support keyboard and mouse navigation, and interactive filtering of the displayed items. You can specify whether you want the index, or the value of the selected item. If you're interested in the value, you can also allow users to Add a new value not in the list. cmd-s or or double-click answers the currently selected item's value/index; cmd-l or or closing the window answers nil/zero. Now using ToolBuilder, so needs Morphic-MAD.381. Released under the MIT Licence.! From commits at source.squeak.org Sun Jul 31 08:33:09 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:33:10 2016 Subject: [squeak-dev] The Trunk: Tools-mt.710.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.710.mcz ==================== Summary ==================== Name: Tools-mt.710 Author: mt Time: 31 July 2016, 10:32:50.22549 am UUID: 6a406dc5-4534-3d42-8443-d5d6509382a3 Ancestors: Tools-tfel.709 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. =============== Diff against Tools-tfel.709 =============== Item was added: + ----- Method: ArchiveViewer>>defaultBackgroundColor (in category 'accessing') ----- + defaultBackgroundColor + + ^ Color veryVeryLightGray! Item was added: + ----- Method: ArchiveViewer>>defaultColor (in category 'accessing') ----- + defaultColor + + ^ Color veryVeryLightGray! Item was removed: - ----- Method: Browser class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference" - - ^ WindowColorSpec classSymbol: self name wording: 'Browser' brightColor: #lightGreen pastelColor: #paleGreen helpMessage: 'The standard "system browser" tool that allows you to browse through all the code in the system'! Item was added: + ----- Method: Browser>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.764 g: 0.9 b: 0.63)! Item was removed: - ----- Method: ChangeList class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference" - - ^ WindowColorSpec classSymbol: self name wording: 'Change List' brightColor: #lightBlue pastelColor: #paleBlue helpMessage: 'A tool that presents a list of all the changes found in an external file.'! Item was added: + ----- Method: ChangeList>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.719 g: 0.9 b: 0.9)! Item was removed: - ----- Method: ChangeSorter class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference" - - ^ WindowColorSpec classSymbol: self name wording: 'Change Sorter' brightColor: #lightBlue pastelColor: #paleBlue helpMessage: 'A tool that lets you see the code for one change set at a time.'! Item was added: + ----- Method: ChangeSorter>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.719 g: 0.9 b: 0.9)! Item was removed: - ----- Method: ClassCommentVersionsBrowser class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference" - - ^ WindowColorSpec classSymbol: self name wording: 'Class Comment Versions Browser' brightColor: #(0.769 0.653 1.0) pastelColor: #(0.819 0.753 1.0) helpMessage: 'A tool for viewing prior versions of a class comment.'! Item was added: + ----- Method: ClassCommentVersionsBrowser>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.753 g: 0.677 b: 0.9)! Item was removed: - ----- Method: Debugger class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference" - - ^ WindowColorSpec classSymbol: self name wording: 'Debugger' brightColor: #lightRed pastelColor: #veryPaleRed helpMessage: 'The system debugger.'! Item was added: + ----- Method: Debugger>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.9 g: 0.719 b: 0.719)! Item was removed: - ----- Method: DualChangeSorter class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference" - - ^ WindowColorSpec classSymbol: self name wording: 'Dual Change Sorter' brightColor: #lightBlue pastelColor: #paleBlue helpMessage: 'Lets you view and manipulate two change sets concurrently.'! Item was added: + ----- Method: DualChangeSorter>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.719 g: 0.9 b: 0.9)! Item was removed: - ----- Method: FileContentsBrowser class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference" - - ^ WindowColorSpec classSymbol: self name wording: 'File Contents Browser' brightColor: #tan pastelColor: #paleTan helpMessage: 'Lets you view the contents of a file as code, in a browser-like tool.'! Item was added: + ----- Method: FileContentsBrowser>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.7 g: 0.7 b: 0.508)! Item was removed: - ----- Method: FileList class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference" - ^ WindowColorSpec - classSymbol: self name - wording: 'File List' - brightColor: #veryLightGray - pastelColor: #veryLightGray - helpMessage: 'A tool for looking at files'! Item was added: + ----- Method: FileList>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.65 g: 0.65 b: 0.65)! Item was removed: - ----- Method: MessageNames class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference" - - ^ WindowColorSpec classSymbol: self name wording: 'Message Names' brightColor: #(0.645 1.0 0.452) pastelColor: #(0.843 0.976 0.843) helpMessage: 'A tool finding, viewing, and editing all methods whose names contiane a given character sequence.'! Item was added: + ----- Method: MessageNames>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.639 g: 0.9 b: 0.497)! Item was removed: - ----- Method: MessageSet class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference" - - ^ WindowColorSpec classSymbol: self name wording: 'Message List' brightColor: #lightBlue pastelColor: #paleBlue helpMessage: 'A list of messages (e.g. senders, implementors)'! Item was added: + ----- Method: MessageSet>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.719 g: 0.9 b: 0.9)! Item was removed: - ----- Method: PackagePaneBrowser class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference" - - ^ WindowColorSpec classSymbol: self name wording: 'Package Browser' brightColor: #(1.0 1.0 0.6) pastelColor: #(0.976 0.976 0.835) helpMessage: 'A system browser with an extra pane at top-left for module.'! Item was added: + ----- Method: PackagePaneBrowser>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.9 g: 0.9 b: 0.63)! Item was removed: - ----- Method: PluggableFileList>>defaultBackgroundColor (in category 'initialize-release') ----- - defaultBackgroundColor - - ^Color lightYellow! Item was added: + ----- Method: PluggableFileList>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ Color lightYellow! Item was removed: - ----- Method: SelectorBrowser class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference" - - ^ WindowColorSpec classSymbol: self name wording: 'Method Finder' brightColor: #lightCyan pastelColor: #palePeach helpMessage: 'A tool for finding methods by giving sample arguments and values.'! Item was added: + ----- Method: SelectorBrowser>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.45 g: 0.9 b: 0.9)! Item was changed: ----- Method: StandardToolSet class>>initialize (in category 'class initialization') ----- initialize + ToolSet register: self.! - ToolSet register: self. - Preferences installNormalWindowColors.! Item was removed: - ----- Method: TranscriptStream class>>windowColorSpecification (in category '*Tools') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference" - - ^ WindowColorSpec classSymbol: self name wording: 'Transcript' brightColor: #lightOrange pastelColor: #paleOrange helpMessage: 'The system transcript'! Item was removed: - ----- Method: VersionsBrowser class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference" - - ^ WindowColorSpec classSymbol: self name wording: 'Versions Browser' brightColor: #(0.869 0.753 1.0) pastelColor: #(0.919 0.853 1.0) helpMessage: 'A tool for viewing prior versions of a method.'! Item was added: + ----- Method: VersionsBrowser>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.782 g: 0.677 b: 0.9)! From commits at source.squeak.org Sun Jul 31 08:33:40 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:33:41 2016 Subject: [squeak-dev] The Trunk: PreferenceBrowser-mt.62.mcz Message-ID: Marcel Taeumel uploaded a new version of PreferenceBrowser to project The Trunk: http://source.squeak.org/trunk/PreferenceBrowser-mt.62.mcz ==================== Summary ==================== Name: PreferenceBrowser-mt.62 Author: mt Time: 31 July 2016, 10:33:35.36249 am UUID: 2ef5e9cc-18c3-7041-813b-54a1d5856f9f Ancestors: PreferenceBrowser-topa.61 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. =============== Diff against PreferenceBrowser-topa.61 =============== Item was removed: - PBColorPreferenceView subclass: #PBWindowColorPreferenceView - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'PreferenceBrowser'! Item was removed: - ----- Method: PBWindowColorPreferenceView class>>initialize (in category 'class initialization') ----- - initialize - self viewRegistry register: self.! Item was removed: - ----- Method: PBWindowColorPreferenceView class>>unload (in category 'class initialization') ----- - unload - "Unload order is not guaranteed so guard against failure" - [self viewRegistry unregister: self] on: Error do:[]! Item was removed: - ----- Method: PBWindowColorPreferenceView class>>viewRegistry (in category 'class initialization') ----- - viewRegistry - ^(PreferenceViewRegistry registryOf: #windowColorPreferences) - viewOrder: 6; - yourself.! Item was removed: - ----- Method: PBWindowColorPreferenceView>>initialize (in category 'initialization') ----- - initialize - super initialize. - self addActionTitled: 'Bright' target: Preferences selector: #installBrightWindowColors arguments: {} balloonText: 'Use standard bright colors for all windows' translated. - self addActionTitled: 'Pastel' target: Preferences selector: #installPastelWindowColors arguments: {} balloonText: 'Use standard pastel colors for all windows' translated. - self addActionTitled: 'Gray' target: Preferences selector: #installUniformWindowColors arguments: {} balloonText: 'Use gray backgrounds for all standard windows' translated.! Item was changed: ----- Method: PreferenceBrowser class>>initialize (in category 'class initialization') ----- initialize self - registerWindowColor; registerInOpenMenu; registerInFlaps! Item was removed: - ----- Method: PreferenceBrowser class>>registerWindowColor (in category 'class initialization') ----- - registerWindowColor - (Preferences windowColorFor: self name) = Color white - ifTrue: [ Preferences setWindowColorFor: self name to: (Color colorFrom: self windowColorSpecification brightColor) ].! Item was removed: - ----- Method: PreferenceBrowser class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference" - - ^ WindowColorSpec classSymbol: self name wording: 'Preference Browser' brightColor: #(0.645 1.0 1.0) pastelColor: #(0.886 1.0 1.0) helpMessage: 'A tool for expressing personal preferences for numerous options.'! Item was added: + ----- Method: PreferenceBrowser>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.671 g: 0.9 b: 0.9)! Item was changed: ----- Method: PreferenceView>>tearOffButton (in category 'user interface') ----- tearOffButton "Hand the user a button the can control this" | aButton | + aButton := self representativeButtonWithColor: Color white inPanel: nil. - aButton := self representativeButtonWithColor: self preference defaultBackgroundColor inPanel: nil. aButton borderWidth: 1; borderColor: Color black; useRoundedCorners. aButton openInHand! Item was removed: - (PackageInfo named: 'PreferenceBrowser') postscript: 'Preferences removePreference: #syntaxHighlightingAsYouType. - Preferences removePreference: #syntaxHighlightingAsYouTypeLeftArrowAssignment. - Preferences removePreference: #syntaxHighlightingAsYouTypeAnsiAssignment.'! From commits at source.squeak.org Sun Jul 31 08:34:32 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:34:33 2016 Subject: [squeak-dev] The Trunk: Collections-mt.702.mcz Message-ID: Marcel Taeumel uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-mt.702.mcz ==================== Summary ==================== Name: Collections-mt.702 Author: mt Time: 31 July 2016, 10:34:09.51149 am UUID: b1aa2c6f-bf2f-a642-ae79-6d85d806a417 Ancestors: Collections-topa.701 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. =============== Diff against Collections-topa.701 =============== Item was added: + ----- Method: TranscriptStream class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ Model themeProperties! Item was added: + ----- Method: TranscriptStream>>applyUserInterfaceTheme (in category 'model protocol') ----- + applyUserInterfaceTheme + + self dependents do: [:ea | + ea isSystemWindow ifTrue: [ + ea refreshWindowColor]].! Item was added: + ----- Method: TranscriptStream>>windowColorToUse (in category 'model protocol') ----- + windowColorToUse + + ^ Color colorFrom: (Model useColorfulWindows + ifTrue: [self userInterfaceTheme customWindowColor ifNil: [Color r: 0.9 g: 0.75 b: 0.45]] + ifFalse: [self userInterfaceTheme uniformWindowColor ifNil: [Color veryVeryLightGray]])! From commits at source.squeak.org Sun Jul 31 08:35:25 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:35:25 2016 Subject: [squeak-dev] The Trunk: Monticello-mt.640.mcz Message-ID: Marcel Taeumel uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-mt.640.mcz ==================== Summary ==================== Name: Monticello-mt.640 Author: mt Time: 31 July 2016, 10:35:10.36149 am UUID: 245be9a0-8610-2140-b4ed-57064cbe00ee Ancestors: Monticello-cmm.639 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. =============== Diff against Monticello-cmm.639 =============== Item was removed: - ----- Method: MCTool class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - - ^ WindowColorSpec - classSymbol: self name - wording: 'Monticello Tool' - brightColor: (Color r: 0.627 g: 0.69 b: 0.976) - pastelColor: (Color r: 0.65 g: 0.753 b: 0.976) paler - helpMessage: 'A Tool Window for the Monticello VCS'! Item was removed: - ----- Method: MCTool>>defaultBackgroundColor (in category 'morphic ui') ----- - defaultBackgroundColor - ^ Preferences monticelloToolWindowColor! Item was added: + ----- Method: MCTool>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.65 g: 0.691 b: 0.876)! From commits at source.squeak.org Sun Jul 31 08:35:59 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:36:00 2016 Subject: [squeak-dev] The Trunk: SmallLand-ColorTheme-mt.7.mcz Message-ID: Marcel Taeumel uploaded a new version of SmallLand-ColorTheme to project The Trunk: http://source.squeak.org/trunk/SmallLand-ColorTheme-mt.7.mcz ==================== Summary ==================== Name: SmallLand-ColorTheme-mt.7 Author: mt Time: 31 July 2016, 10:35:55.17149 am UUID: e0eb5d6c-e032-b843-96b5-90e78b70d353 Ancestors: SmallLand-ColorTheme-fbs.6 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. =============== Diff against SmallLand-ColorTheme-fbs.6 =============== Item was changed: ----- Method: SmallLandColorTheme>>apply (in category 'applying') ----- apply + - Preferences installBrightWindowColors. "" super apply. "" self updateTopProject. self updateFlaps. self updateWorldMainDockingBar! From commits at source.squeak.org Sun Jul 31 08:36:48 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:36:49 2016 Subject: [squeak-dev] The Trunk: SUnitGUI-mt.63.mcz Message-ID: Marcel Taeumel uploaded a new version of SUnitGUI to project The Trunk: http://source.squeak.org/trunk/SUnitGUI-mt.63.mcz ==================== Summary ==================== Name: SUnitGUI-mt.63 Author: mt Time: 31 July 2016, 10:36:41.86449 am UUID: 7ed7c1d5-ab99-b248-ad1a-fa14d90fc687 Ancestors: SUnitGUI-mt.62 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. =============== Diff against SUnitGUI-mt.62 =============== Item was changed: + Model subclass: #TestRunner - Object subclass: #TestRunner instanceVariableNames: 'categories categoriesSelected classes classIndex classesSelected failedList failedSelected errorList errorSelected lastUpdate result previousRun categoryPattern classPattern' classVariableNames: '' poolDictionaries: '' category: 'SUnitGUI'! !TestRunner commentStamp: '' prior: 0! ! Item was removed: - ----- Method: TestRunner class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - - ^ WindowColorSpec - classSymbol: self name - wording: 'Test Runner' - brightColor: Color orange - pastelColor: (Color r: 0.65 g: 0.753 b: 0.976) - helpMessage: 'The Camp Smalltalk TestRunner tool for SUnit'! Item was removed: - ----- Method: TestRunner>>defaultBackgroundColor (in category 'private') ----- - defaultBackgroundColor - "" - - ^ Preferences testRunnerWindowColor! Item was added: + ----- Method: TestRunner>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.9 g: 0.576 b: 0.09)! From commits at source.squeak.org Sun Jul 31 08:37:42 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:37:48 2016 Subject: [squeak-dev] The Trunk: EToys-mt.140.mcz Message-ID: Marcel Taeumel uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-mt.140.mcz ==================== Summary ==================== Name: EToys-mt.140 Author: mt Time: 31 July 2016, 10:37:24.17349 am UUID: 5fbe9cfe-d356-bc44-9dcb-a08a8d5493d1 Ancestors: EToys-tfel.139 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. =============== Diff against EToys-tfel.139 =============== Item was removed: - ----- Method: ScriptingDomain>>defaultBackgroundColor (in category 'user interface') ----- - defaultBackgroundColor - ^ Color r: 0.91 g: 0.91 b: 0.91! Item was added: + ----- Method: ScriptingDomain>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.91 g: 0.91 b: 0.91)! From commits at source.squeak.org Sun Jul 31 08:38:29 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:38:32 2016 Subject: [squeak-dev] The Trunk: Nebraska-mt.42.mcz Message-ID: Marcel Taeumel uploaded a new version of Nebraska to project The Trunk: http://source.squeak.org/trunk/Nebraska-mt.42.mcz ==================== Summary ==================== Name: Nebraska-mt.42 Author: mt Time: 31 July 2016, 10:38:22.08149 am UUID: f6330fa2-1555-2749-bbf3-4fc7a3addaf8 Ancestors: Nebraska-kfr.41 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. =============== Diff against Nebraska-kfr.41 =============== Item was removed: - ----- Method: ChatNotes>>defaultBackgroundColor (in category 'morphic') ----- - defaultBackgroundColor - "In a better design, this would be handled by preferences." - ^Color r: 1.0 g: 0.7 b: 0.8! Item was added: + ----- Method: ChatNotes>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 1 g: 0.7 b: 0.8)! From commits at source.squeak.org Sun Jul 31 08:39:16 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:39:17 2016 Subject: [squeak-dev] The Trunk: Protocols-mt.55.mcz Message-ID: Marcel Taeumel uploaded a new version of Protocols to project The Trunk: http://source.squeak.org/trunk/Protocols-mt.55.mcz ==================== Summary ==================== Name: Protocols-mt.55 Author: mt Time: 31 July 2016, 10:39:09.97349 am UUID: 9be47d93-9f26-8144-a2c2-b3b1b00c22d6 Ancestors: Protocols-mt.54 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. =============== Diff against Protocols-mt.54 =============== Item was removed: - ----- Method: InstanceBrowser class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference" - - ^ WindowColorSpec classSymbol: self name wording: 'Instance Browser' brightColor: #(0.806 1.0 1.0) pastelColor: #(0.925 1.000 1.0) helpMessage: 'A tool for browsing the full protocol of an instance.'! Item was added: + ----- Method: InstanceBrowser>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.726 g: 0.9 b: 0.9)! Item was removed: - ----- Method: Lexicon class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference" - - ^ WindowColorSpec classSymbol: self name wording: 'Lexicon' brightColor: #(0.878 1.000 0.878) pastelColor: #(0.925 1.000 0.925) helpMessage: 'A tool for browsing the full protocol of a class.'! Item was added: + ----- Method: Lexicon>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.79 g: 0.9 b: 0.79)! From commits at source.squeak.org Sun Jul 31 08:40:07 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:40:08 2016 Subject: [squeak-dev] The Trunk: SMLoader-mt.88.mcz Message-ID: Marcel Taeumel uploaded a new version of SMLoader to project The Trunk: http://source.squeak.org/trunk/SMLoader-mt.88.mcz ==================== Summary ==================== Name: SMLoader-mt.88 Author: mt Time: 31 July 2016, 10:39:59.37549 am UUID: 401c17bd-0096-f542-8b44-53ed7ede31ac Ancestors: SMLoader-tpr.87 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. =============== Diff against SMLoader-tpr.87 =============== Item was changed: ----- Method: SMLoader class>>initialize (in category 'class initialization') ----- initialize "Hook us up in the world menu." "self initialize" Smalltalk at: #ToolBuilder ifAbsent: [self registerInFlapsRegistry. - (Preferences windowColorFor: #SMLoader) = Color white - ifTrue: ["not set" - Preferences - setWindowColorFor: #SMLoader - to: (Color colorFrom: self windowColorSpecification brightColor)]. (TheWorldMenu respondsTo: #registerOpenCommand:) ifTrue: [| oldCmds | oldCmds := TheWorldMenu registry select: [:cmd | cmd first includesSubstring: 'Package Loader']. oldCmds do: [:cmd | TheWorldMenu unregisterOpenCommand: cmd first]. TheWorldMenu registerOpenCommand: {self openMenuString. {self. #open}}]]. DefaultFilters := OrderedCollection new. DefaultCategoriesToFilterIds := OrderedCollection new! Item was removed: - ----- Method: SMLoader class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference." - - ^WindowColorSpec - classSymbol: self name - wording: 'Package Loader' - brightColor: Color yellow muchLighter duller - pastelColor: Color yellow veryMuchLighter duller - helpMessage: 'The SqueakMap Package Loader'! Item was added: + ----- Method: SMLoader>>defaultColor (in category 'user interface') ----- + defaultColor + + ^ self defaultWindowColor! Item was added: + ----- Method: SMLoader>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.801 g: 0.801 b: 0.614)! Item was changed: ----- Method: SMLoaderPlus class>>initialize (in category 'class initialization') ----- initialize "Hook us up in the world menu." "self initialize" Smalltalk at: #ToolBuilder ifPresent: [ : tb | self registerInFlapsRegistry. - (Preferences windowColorFor: #SMLoader) = Color white "note set" ifTrue: - [ - #(#SMLoader #SMReleaseBrowser ) do: - [ : each | - Preferences - setWindowColorFor: each - to: (Color colorFrom: self windowColorSpecification brightColor) ] ]. (TheWorldMenu respondsTo: #registerOpenCommand:) ifTrue: [ | oldCmds | oldCmds := TheWorldMenu registry select: [ : cmd | cmd first includesSubstring: 'Package Loader' ]. oldCmds do: [ : cmd | TheWorldMenu unregisterOpenCommand: cmd first ]. TheWorldMenu registerOpenCommand: {self openMenuString. {self. #open}} ] ]. DefaultFilters := OrderedCollection new. DefaultCategoriesToFilterIds := OrderedCollection new! Item was removed: - ----- Method: SMLoaderPlus class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference." - - ^WindowColorSpec - classSymbol: self name - wording: 'Package Loader' - brightColor: Color yellow muchLighter duller - pastelColor: Color yellow veryMuchLighter duller - helpMessage: 'The SqueakMap Package Loader'! Item was added: + ----- Method: SMLoaderPlus>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.801 g: 0.801 b: 0.614)! Item was removed: - ----- Method: SMReleaseBrowser class>>windowColorSpecification (in category 'window color') ----- - windowColorSpecification - "Answer a WindowColorSpec object that declares my preference." - ^WindowColorSpec - classSymbol: self name - wording: 'Package Release Browser' - brightColor: Color yellow muchLighter duller - pastelColor: Color yellow veryMuchLighter duller - helpMessage: 'The SqueakMap Release Browser'! Item was added: + ----- Method: SMReleaseBrowser>>defaultWindowColor (in category 'user interface') ----- + defaultWindowColor + ^ (Color r: 0.801 g: 0.801 b: 0.614)! From commits at source.squeak.org Sun Jul 31 08:43:26 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:43:28 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1209.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1209.mcz ==================== Summary ==================== Name: Morphic-mt.1209 Author: mt Time: 31 July 2016, 10:42:45.52449 am UUID: c7a82e5c-9317-3e43-8751-489f7248ac76 Ancestors: Morphic-mt.1208 Avoid updating the menu bar instances too early. =============== Diff against Morphic-mt.1208 =============== Item was removed: - (PackageInfo named: 'Morphic') postscript: 'TheWorldMainDockingBar updateInstances. "..."'! From commits at source.squeak.org Sun Jul 31 08:47:59 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:48:01 2016 Subject: [squeak-dev] The Trunk: 51Deprecated-mt.35.mcz Message-ID: Marcel Taeumel uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-mt.35.mcz ==================== Summary ==================== Name: 51Deprecated-mt.35 Author: mt Time: 31 July 2016, 10:47:53.76249 am UUID: 317a680b-450c-8c41-82f5-8ce249f8d6e4 Ancestors: 51Deprecated-mt.34 Clean-up window color spec data if requested. =============== Diff against 51Deprecated-mt.34 =============== Item was added: + ----- Method: WindowColorRegistry class>>cleanUp: (in category 'registry') ----- + cleanUp: aggressive + + aggressive ifTrue: [self refresh].! From commits at source.squeak.org Sun Jul 31 08:54:15 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:54:17 2016 Subject: [squeak-dev] The Trunk: ShoutCore-mt.56.mcz Message-ID: Marcel Taeumel uploaded a new version of ShoutCore to project The Trunk: http://source.squeak.org/trunk/ShoutCore-mt.56.mcz ==================== Summary ==================== Name: ShoutCore-mt.56 Author: mt Time: 31 July 2016, 10:54:09.29549 am UUID: a1a7570e-2171-8e4a-b231-0bd7b2b5e290 Ancestors: ShoutCore-eem.55 *** Widget Refactorings and UI Themes (Part 3 of 11) *** Prepare Shout syntax highlighting for UI themes. (Temporarily no syntax highlighting. Sorry. Be patient.) =============== Diff against ShoutCore-eem.55 =============== Item was changed: SHTextStyler subclass: #SHTextStylerST80 instanceVariableNames: 'classOrMetaClass workspace font parser formatAssignments environment sourceMap processedSourceMap pixelHeight attributesByPixelHeight parseAMethod' + classVariableNames: 'SyntaxHighlightingAsYouType SyntaxHighlightingAsYouTypeAnsiAssignment SyntaxHighlightingAsYouTypeLeftArrowAssignment TextAttributesByPixelHeight' - classVariableNames: 'SubduedSyntaxHighlights SyntaxHighlightingAsYouType SyntaxHighlightingAsYouTypeAnsiAssignment SyntaxHighlightingAsYouTypeLeftArrowAssignment' poolDictionaries: '' category: 'ShoutCore-Styling'! - SHTextStylerST80 class - instanceVariableNames: 'styleTable textAttributesByPixelHeight'! !SHTextStylerST80 commentStamp: 'tween 8/27/2004 10:55' prior: 0! I style Smalltalk methods and expressions. My 'styleTable' class instance var holds an array ofArrays which control how each token is styled/coloured. See my defaultStyleTable class method for its structure. My styleTable can be changed by either modifying the defaultStyleTable class method and then executing SHTextStylerST80 initialize ; or by giving me a new styleTable through my #styleTable: class method. My 'textAttributesByPixelSize' class instance var contains a dictionary of dictionaries. The key is a pixelSize and the value a Dictionary from token type Symbol to TextAttribute array. It is created/maintained automatically. I also install these 3 preferences when my class initialize method is executed.... #syntaxHighlightingAsYouType - controls whether methods are styled in browsers #syntaxHighlightingAsYouTypeAnsiAssignment - controls whether assignments are formatted to be := #syntaxHighlightingAsYouTypeLeftArrowAssignment - controls whether assignments are formatted to be _ I reimplement #unstyledTextFrom: so that TextActions are preserved in the unstyled text ! - SHTextStylerST80 class - instanceVariableNames: 'styleTable textAttributesByPixelHeight'! Item was added: + ----- Method: SHTextStylerST80 class>>applyUserInterfaceTheme (in category 'preferences') ----- + applyUserInterfaceTheme + + self resetTextAttributesByPixelHeight.! Item was removed: - ----- Method: SHTextStylerST80 class>>attributeArrayForColor:emphasis:font: (in category 'style table') ----- - attributeArrayForColor: aColorOrNil emphasis: anEmphasisSymbolOrArrayorNil font: aTextStyleOrFontOrNil - "Answer a new Array containing any non nil TextAttributes specified" - | answer emphArray | - - answer := Array new. - aColorOrNil ifNotNil: [answer := answer, {TextColor color: aColorOrNil}]. - anEmphasisSymbolOrArrayorNil ifNotNil: [ - emphArray := anEmphasisSymbolOrArrayorNil isSymbol - ifTrue: [{anEmphasisSymbolOrArrayorNil}] - ifFalse: [anEmphasisSymbolOrArrayorNil]. - emphArray do: [:each | - each ~= #normal - ifTrue:[ - answer := answer, {TextEmphasis perform: each}]]]. - aTextStyleOrFontOrNil ifNotNil: [ - answer := answer, {TextFontReference toFont: aTextStyleOrFontOrNil}]. - ^answer! Item was removed: - ----- Method: SHTextStylerST80 class>>attributesByPixelHeight: (in category 'style table') ----- - attributesByPixelHeight: aNumber - - ^self textAttributesByPixelHeight - at: aNumber - ifAbsent: [ - | result | - result := self initialTextAttributesForPixelHeight: aNumber. - " thread safety first " - textAttributesByPixelHeight := textAttributesByPixelHeight copy - at: aNumber put: result; - yourself. - result ]! Item was removed: - ----- Method: SHTextStylerST80 class>>attributesFor:pixelHeight: (in category 'style table') ----- - attributesFor: aSymbol pixelHeight: aNumber - - ^(self textAttributesByPixelHeight - at: aNumber - ifAbsentPut:[self initialTextAttributesForPixelHeight: aNumber]) - at: aSymbol ifAbsent:[nil]! Item was added: + ----- Method: SHTextStylerST80 class>>canApplyThemeToInstances (in category 'preferences') ----- + canApplyThemeToInstances + + ^ false! Item was removed: - ----- Method: SHTextStylerST80 class>>chooseDefaultStyleTable (in category 'style table') ----- - chooseDefaultStyleTable - "Choose the default style table" - ^self subduedSyntaxHighlights - ifTrue:[self subduedStyleTable] - ifFalse:[self defaultStyleTable]! Item was removed: - ----- Method: SHTextStylerST80 class>>defaultStyleTable (in category 'style table') ----- - defaultStyleTable - "color can be a valid argument to Color class>>colorFrom: , or nil to - use the editor text color. - Multiple emphases can be specified using an array e.g. #(bold italic). - If emphasis is not specified, #normal will be used. - if pixel height is not specified , then the editor font size will be used. - " - - ^#( - "(symbol color [emphasisSymbolOrArray [textStyleName [pixelHeight]]])" - (default black ) - (invalid red ) - (excessCode red ) - (comment (green muchDarker) italic) - (unfinishedComment (red muchDarker) italic) - (#'$' (red muchDarker) ) - (character (red muchDarker) ) - (integer (red muchDarker) ) - (number (red muchDarker) ) - (#- (red muchDarker) ) - (symbol (blue muchDarker) bold) - (stringSymbol (blue muchDarker) bold) - (literalArray (blue muchDarker) bold) - (string (magenta muchDarker) normal) - (unfinishedString red normal ) - (assignment nil bold ) - (ansiAssignment nil bold) - (literal nil italic) - (keyword (blue muchDarker) ) - (binary (blue muchDarker) ) - (unary (blue muchDarker) ) - (incompleteKeyword (gray muchDarker) underlined) - (incompleteBinary (gray muchDarker) underlined) - (incompleteUnary (gray muchDarker) underlined) - (undefinedKeyword red ) - (undefinedBinary red ) - (undefinedUnary red ) - (patternKeyword nil bold) - (patternBinary nil bold) - (patternUnary nil bold) - (#self (red muchDarker) bold) - (#super (red muchDarker) bold) - (#true (red muchDarker) bold) - (#false (red muchDarker) bold) - (#nil (red muchDarker) bold) - (#thisContext (red muchDarker) bold) - (#return (red muchDarker) bold) - (patternArg (blue muchDarker) italic) - (methodArg (blue muchDarker) italic) - (blockPatternArg (blue muchDarker) italic) - (blockArg (blue muchDarker) italic) - (argument (blue muchDarker) italic) - (blockArgColon black ) - (leftParenthesis black ) - (rightParenthesis black ) - (leftParenthesis1 (green muchDarker) ) - (rightParenthesis1 (green muchDarker) ) - (leftParenthesis2 (magenta muchDarker) ) - (rightParenthesis2 (magenta muchDarker) ) - (leftParenthesis3 (red muchDarker) ) - (rightParenthesis3 (red muchDarker) ) - (leftParenthesis4 (green darker) ) - (rightParenthesis4 (green darker) ) - (leftParenthesis5 (orange darker) ) - (rightParenthesis5 (orange darker) ) - (leftParenthesis6 (magenta darker) ) - (rightParenthesis6 (magenta darker) ) - (leftParenthesis7 blue ) - (rightParenthesis7 blue ) - (blockStart black ) - (blockEnd black ) - (blockStart1 (green muchDarker) ) - (blockEnd1 (green muchDarker) ) - (blockStart2 (magenta muchDarker) ) - (blockEnd2 (magenta muchDarker) ) - (blockStart3 (red muchDarker) ) - (blockEnd3 (red muchDarker) ) - (blockStart4 (green darker) ) - (blockEnd4 (green darker) ) - (blockStart5 (orange darker) ) - (blockEnd5 (orange darker) ) - (blockStart6 (magenta darker) ) - (blockEnd6 (magenta darker) ) - (blockStart7 blue ) - (blockEnd7 blue ) - (arrayStart black ) - (arrayEnd black ) - (arrayStart1 black ) - (arrayEnd1 black ) - (byteArrayStart black ) - (byteArrayEnd black ) - (byteArrayStart1 black ) - (byteArrayEnd1 black ) - (leftBrace black ) - (rightBrace black ) - (cascadeSeparator black ) - (statementSeparator black ) - (externalCallType black ) - (externalCallTypePointerIndicator black ) - (primitiveOrExternalCallStart black bold ) - (primitiveOrExternalCallEnd black bold ) - (methodTempBar gray ) - (blockTempBar gray ) - (blockArgsBar gray ) - (primitive (green muchDarker) bold) - (pragmaKeyword (green muchDarker) bold) - (pragmaUnary (green muchDarker) bold) - (pragmaBinary (green muchDarker) bold) - (externalFunctionCallingConvention (green muchDarker) bold) - (module (green muchDarker) bold) - (blockTempVar gray italic) - (blockPatternTempVar gray italic) - (instVar black bold) - (workspaceVar black bold) - (undefinedIdentifier red bold) - (incompleteIdentifier (gray darker) (italic underlined)) - (tempVar (gray darker) italic) - (patternTempVar (gray darker) italic) - (poolConstant (gray darker) italic) - (classVar (gray darker) bold) - (globalVar black bold) ) - ! Item was removed: - ----- Method: SHTextStylerST80 class>>initialTextAttributesForPixelHeight: (in category 'style table') ----- - initialTextAttributesForPixelHeight: aNumber - | d | - - d := IdentityDictionary new. - self styleTable do: [:each | | textStyle element emphasis font pixelHeight attrArray color textStyleName | - element := each first. - color := each at: 2 ifAbsent:[nil]. - color:=color ifNotNil: [Color colorFrom: color]. - emphasis := each at: 3 ifAbsent:[nil]. - textStyleName := each at: 4 ifAbsent: [nil]. - pixelHeight := each at: 5 ifAbsent: [aNumber]. - textStyleName ifNil:[pixelHeight := nil]. - textStyle := TextStyle named: textStyleName. - font := textStyle ifNotNil:[pixelHeight ifNotNil:[textStyle fontOfSize: pixelHeight]]. - attrArray := self attributeArrayForColor: color emphasis: emphasis font: font. - attrArray notEmpty - ifTrue:[ - d at: element put: attrArray]]. - ^d - ! Item was removed: - ----- Method: SHTextStylerST80 class>>initialize (in category 'class initialization') ----- - initialize - "Clear styleTable and textAttributesByPixelSize cache so that they will - reinitialize. - - SHTextStylerST80 initialize - " - - styleTable := nil. - textAttributesByPixelHeight := nil. ! Item was added: + ----- Method: SHTextStylerST80 class>>resetTextAttributesByPixelHeight (in category 'style table') ----- + resetTextAttributesByPixelHeight + + TextAttributesByPixelHeight := nil.! Item was removed: - ----- Method: SHTextStylerST80 class>>styleTable (in category 'style table') ----- - styleTable - - ^styleTable ifNil: [ styleTable := self chooseDefaultStyleTable ]! Item was removed: - ----- Method: SHTextStylerST80 class>>styleTable: (in category 'style table') ----- - styleTable: anArray - "Set the receiver's styleTable to anArray. - Clear textAttributesByPixelSize cache so that it will reinitialize. - " - - styleTable := anArray. - textAttributesByPixelHeight := nil! Item was removed: - ----- Method: SHTextStylerST80 class>>subduedStyleTable (in category 'style table') ----- - subduedStyleTable - "color can be a valid argument to Color class>>colorFrom: , or nil to - use the editor text color. - Multiple emphases can be specified using an array e.g. #(bold italic). - If emphasis is not specified, #normal will be used. - if pixel height is not specified , then the editor font size will be used. - " - - ^#( - "(symbol color [emphasisSymbolOrArray [textStyleName [pixelHeight]]])" - (default black ) - (invalid red ) - (excessCode red ) - (comment (cyan muchDarker) ) - (unfinishedComment (red muchDarker) italic) - (#'$' (red muchDarker) ) - (character (red muchDarker) ) - (integer (red muchDarker) ) - (number (red muchDarker) ) - (#- (red muchDarker) ) - (symbol (blue muchDarker) ) - (stringSymbol (blue muchDarker) ) - (literalArray (blue muchDarker) ) - (string (magenta muchDarker) normal ) - (unfinishedString red normal ) - (assignment nil bold ) - (ansiAssignment nil bold) - (literal nil italic) - (keyword (blue muchDarker) ) - (binary (blue muchDarker) ) - (unary (blue muchDarker) ) - (incompleteKeyword (gray muchDarker) underlined) - (incompleteBinary (gray muchDarker) underlined) - (incompleteUnary (gray muchDarker) underlined) - (undefinedKeyword red ) - (undefinedBinary red ) - (undefinedUnary red ) - (patternKeyword nil bold) - (patternBinary nil bold) - (patternUnary nil bold) - (#self (red muchDarker) ) - (#super (red muchDarker) ) - (#true (red muchDarker) ) - (#false (red muchDarker) ) - (#nil (red muchDarker) ) - (#thisContext (red muchDarker) ) - (#return (red muchDarker) ) - (patternArg (blue muchDarker) ) - (methodArg (blue muchDarker) ) - (blockPatternArg (blue muchDarker) ) - (blockArg (blue muchDarker) ) - (argument (blue muchDarker) ) - (blockArgColon black ) - (leftParenthesis black ) - (rightParenthesis black ) - (leftParenthesis1 (green muchDarker) ) - (rightParenthesis1 (green muchDarker) ) - (leftParenthesis2 (magenta muchDarker) ) - (rightParenthesis2 (magenta muchDarker) ) - (leftParenthesis3 (red muchDarker) ) - (rightParenthesis3 (red muchDarker) ) - (leftParenthesis4 (green darker) ) - (rightParenthesis4 (green darker) ) - (leftParenthesis5 (orange darker) ) - (rightParenthesis5 (orange darker) ) - (leftParenthesis6 (magenta darker) ) - (rightParenthesis6 (magenta darker) ) - (leftParenthesis7 blue ) - (rightParenthesis7 blue ) - (blockStart black ) - (blockEnd black ) - (blockStart1 (green muchDarker) ) - (blockEnd1 (green muchDarker) ) - (blockStart2 (magenta muchDarker) ) - (blockEnd2 (magenta muchDarker) ) - (blockStart3 (red muchDarker) ) - (blockEnd3 (red muchDarker) ) - (blockStart4 (green darker) ) - (blockEnd4 (green darker) ) - (blockStart5 (orange darker) ) - (blockEnd5 (orange darker) ) - (blockStart6 (magenta darker) ) - (blockEnd6 (magenta darker) ) - (blockStart7 blue ) - (blockEnd7 blue ) - (arrayStart black ) - (arrayEnd black ) - (arrayStart1 black ) - (arrayEnd1 black ) - (byteArrayStart black ) - (byteArrayEnd black ) - (byteArrayStart1 black ) - (byteArrayEnd1 black ) - (leftBrace black ) - (rightBrace black ) - (cascadeSeparator black ) - (statementSeparator black ) - (externalCallType black ) - (externalCallTypePointerIndicator black ) - (primitiveOrExternalCallStart black ) - (primitiveOrExternalCallEnd black ) - (methodTempBar gray ) - (blockTempBar gray ) - (blockArgsBar gray ) - (primitive (green muchDarker) bold) - (pragmaKeyword (green muchDarker) bold) - (pragmaUnary (green muchDarker) bold) - (pragmaBinary (green muchDarker) bold) - (externalFunctionCallingConvention (green muchDarker) bold) - (module (green muchDarker) bold) - (blockTempVar gray ) - (blockPatternTempVar gray ) - (instVar black ) - (workspaceVar black ) - (undefinedIdentifier red ) - (incompleteIdentifier (gray darker) (italic underlined)) - (tempVar (gray darker) ) - (patternTempVar (gray darker) ) - (poolConstant (gray muchDarker) ) - (classVar (gray muchDarker) ) - (globalVar black ) )! Item was removed: - ----- Method: SHTextStylerST80 class>>subduedSyntaxHighlights (in category 'preferences') ----- - subduedSyntaxHighlights - - ^SubduedSyntaxHighlights ifNil:[true]! Item was removed: - ----- Method: SHTextStylerST80 class>>subduedSyntaxHighlights: (in category 'preferences') ----- - subduedSyntaxHighlights: aBool - "Change the subdued syntax highlighting preference" - SubduedSyntaxHighlights := aBool. - "Force reload" - styleTable := nil. - textAttributesByPixelHeight := nil.! Item was changed: ----- Method: SHTextStylerST80 class>>textAttributesByPixelHeight (in category 'style table') ----- textAttributesByPixelHeight + "A cache for text attributes used by all instances of text styler." + ^ TextAttributesByPixelHeight ifNil: [ TextAttributesByPixelHeight := Dictionary new ]! - ^ textAttributesByPixelHeight ifNil: [ textAttributesByPixelHeight := Dictionary new ]! Item was added: + ----- Method: SHTextStylerST80 class>>textAttributesByPixelHeightAt:put: (in category 'style table') ----- + textAttributesByPixelHeightAt: aNumber put: someTextAttributes + "Thread-safety first." + + TextAttributesByPixelHeight := self textAttributesByPixelHeight copy + at: aNumber put: someTextAttributes; + yourself. + ^ someTextAttributes! Item was added: + ----- Method: SHTextStylerST80 class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ { + { #default. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #invalid. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #excessCode. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #comment. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #unfinishedComment. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #'$'. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #character. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #integer. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #number. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #-. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #symbol. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #stringSymbol. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #literalArray. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #string. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #unfinishedString. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #assignment. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #ansiAssignment. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #literal. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #keyword. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #binary. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #unary. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #incompleteKeyword. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #incompleteBinary. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #incompleteUnary. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #undefinedKeyword. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #undefinedBinary. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #undefinedUnary. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #patternKeyword. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #patternBinary. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #patternUnary. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #self. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #super. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #true. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #false. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #nil. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #thisContext. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #return. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #patternArg. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #methodArg. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockPatternArg. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockArg. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #argument. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockArgColon. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #leftParenthesis. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #rightParenthesis. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #leftParenthesis1. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #rightParenthesis1. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #leftParenthesis2. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #rightParenthesis2. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #leftParenthesis3. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #rightParenthesis3. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #leftParenthesis4. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #rightParenthesis4. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #leftParenthesis5. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #rightParenthesis5. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #leftParenthesis6. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #rightParenthesis6. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #leftParenthesis7. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #rightParenthesis7. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockStart. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockEnd. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockStart1. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockEnd1. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockStart2. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockEnd2. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockStart3. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockEnd3. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockStart4. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockEnd4. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockStart5. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockEnd5. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockStart6. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockEnd6. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockStart7. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockEnd7. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #arrayStart. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #arrayEnd. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #arrayStart1. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #arrayEnd1. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #byteArrayStart. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #byteArrayEnd. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #byteArrayStart1. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #byteArrayEnd1. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #leftBrace. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #rightBrace. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #cascadeSeparator. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #statementSeparator. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #externalCallType. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #externalCallTypePointerIndicator. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #primitiveOrExternalCallStart. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #primitiveOrExternalCallEnd. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #methodTempBar. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockTempBar. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockArgsBar. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #primitive. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #pragmaKeyword. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #pragmaUnary. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #pragmaBinary. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #externalFunctionCallingConvention. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #module. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockTempVar. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #blockPatternTempVar. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #instVar. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #workspaceVar. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #undefinedIdentifier. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #incompleteIdentifier. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #tempVar. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #patternTempVar. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #poolConstant. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #classVar. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + { #globalVar. 'Styling'. 'Specify color, emphasis, and font in a triple.' }. + }! Item was added: + ----- Method: SHTextStylerST80>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + "My dependents should take care of invalidating my caches and then ask me to style again. It is of no use to invalidate my caches right now because I have no idea when my dependents will ask me to style again."! Item was added: + ----- Method: SHTextStylerST80>>attributesByPixelHeight (in category 'style table') ----- + attributesByPixelHeight + + ^ attributesByPixelHeight ifNil: [ + attributesByPixelHeight := self attributesByPixelHeight: self pixelHeight]! Item was added: + ----- Method: SHTextStylerST80>>attributesByPixelHeight: (in category 'style table') ----- + attributesByPixelHeight: aNumber + + ^ self class textAttributesByPixelHeight + at: aNumber + ifAbsent: [ + self class + textAttributesByPixelHeightAt: aNumber + put: (self createTextAttributesForPixelHeight: aNumber)]! Item was changed: + ----- Method: SHTextStylerST80>>attributesFor: (in category 'style table') ----- - ----- Method: SHTextStylerST80>>attributesFor: (in category 'private') ----- attributesFor: aSymbol + ^ self attributesByPixelHeight at: aSymbol ifAbsent: nil! - ^(attributesByPixelHeight ifNil: [ - attributesByPixelHeight := self class attributesByPixelHeight: self pixelHeight ]) - at: aSymbol - ifAbsent: nil! Item was added: + ----- Method: SHTextStylerST80>>createAttributeArrayForColor:emphasis:font: (in category 'style table') ----- + createAttributeArrayForColor: aColorOrNil emphasis: anEmphasisOrArrayorNil font: aFontOrNil + "Answer a new Array containing any non nil TextAttributes specified" + + | answer emphArray | + answer := Array new. + aColorOrNil ifNotNil: [answer := answer, {TextColor color: aColorOrNil}]. + anEmphasisOrArrayorNil ifNotNil: [ + emphArray := anEmphasisOrArrayorNil isArray + ifFalse: [{anEmphasisOrArrayorNil}] + ifTrue: [anEmphasisOrArrayorNil]. + answer := answer, emphArray]. + aFontOrNil ifNotNil: [ + answer := answer, {TextFontReference toFont: aFontOrNil}]. + ^answer! Item was added: + ----- Method: SHTextStylerST80>>createTextAttributesForPixelHeight: (in category 'style table') ----- + createTextAttributesForPixelHeight: aNumber + + | result | + result := IdentityDictionary new. + result at: #default put: {}. "Required as fall-back for non-existing attributes." + + self class themeProperties do: [:each | + | spec element emphasis font color | + element := each first. + spec := self userInterfaceTheme perform: element. + spec isArray ifFalse: [spec := {spec}]. "Support color-only hints." + + color := spec first ifNotNil: [:colorSpec | Color colorFrom: colorSpec]. + emphasis := spec at: 2 ifAbsent:[nil]. + font := spec at: 3 ifAbsent: [nil]. + + "Support for named text styles." + font isString ifTrue: [ + | textStyle | + textStyle := TextStyle named: font. + font := textStyle ifNotNil: [textStyle fontOfSize: aNumber]]. + + (self createAttributeArrayForColor: color emphasis: emphasis font: font) + ifNotEmpty: [:attrArray | result at: element put: attrArray]]. + ^ result + ! Item was added: + ----- Method: SHTextStylerST80>>reset (in category 'initialize-release') ----- + reset + + attributesByPixelHeight := nil.! From commits at source.squeak.org Sun Jul 31 08:55:21 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:55:23 2016 Subject: [squeak-dev] The Trunk: System-mt.853.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.853.mcz ==================== Summary ==================== Name: System-mt.853 Author: mt Time: 31 July 2016, 10:54:53.47549 am UUID: 51cc93f8-a4bd-3c46-87c6-509e16783c2b Ancestors: System-mt.852 *** Widget Refactorings and UI Themes (Part 3 of 11) *** Prepare Shout syntax highlighting for UI themes. (Temporarily no syntax highlighting. Sorry. Be patient.) =============== Diff against System-mt.852 =============== Item was added: + ----- Method: TextDiffBuilder class>>applyUserInterfaceTheme (in category 'preferences') ----- + applyUserInterfaceTheme + + NormalTextAttributes := nil. + InsertTextAttributes := nil. + RemoveTextAttributes := nil.! Item was added: + ----- Method: TextDiffBuilder class>>canApplyThemeToInstances (in category 'preferences') ----- + canApplyThemeToInstances + ^ false! Item was removed: - ----- Method: TextDiffBuilder class>>initialize (in category 'class initialization') ----- - initialize - - self initializeTextAttributes! Item was removed: - ----- Method: TextDiffBuilder class>>initializeTextAttributes (in category 'class initialization') ----- - initializeTextAttributes - - InsertTextAttributes := { TextColor red }. - RemoveTextAttributes := { TextEmphasis struckOut. TextColor blue }. - NormalTextAttributes :={ TextEmphasis normal } - ! Item was added: + ----- Method: TextDiffBuilder class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ { + { #insertTextAttributes. 'Styling'. 'Text attributes to use when a patch was inserted.' }. + { #normalTextAttributes. 'Styling'. 'Text attributes to use when text did not change.' }. + { #removeTextAttributes. 'Styling'. 'Text attributes to use when a patch was removed.' }. + }! Item was added: + ----- Method: TextDiffBuilder>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + "My class-side cache is invalidated there. My dependents have to invoke my services again."! Item was changed: ----- Method: TextDiffBuilder>>buildDisplayPatch (in category 'creating patches') ----- buildDisplayPatch | stream | stream := AttributedTextStream new. + + "Lazy initialize the text attributes cache." + NormalTextAttributes ifNil: [NormalTextAttributes := self userInterfaceTheme normalTextAttributes + ifNil: [{TextEmphasis normal}]]. + InsertTextAttributes ifNil: [InsertTextAttributes := self userInterfaceTheme insertTextAttributes + ifNil: [{TextColor red}]]. + RemoveTextAttributes ifNil: [RemoveTextAttributes := self userInterfaceTheme removeTextAttributes + ifNil: [{TextEmphasis struckOut. TextColor blue}]]. + self patchSequenceDoIfMatch: [ :string | self print: string withAttributes: NormalTextAttributes on: stream ] ifInsert: [ :string | self print: string withAttributes: InsertTextAttributes on: stream ] ifRemove: [ :string | self print: string withAttributes: RemoveTextAttributes on: stream ]. ^stream contents! From commits at source.squeak.org Sun Jul 31 08:55:42 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:55:44 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.172.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.172.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.172 Author: mt Time: 31 July 2016, 10:55:34.11149 am UUID: 525ee50b-1280-0244-981d-a03a26aae3eb Ancestors: ToolBuilder-Morphic-mt.171 *** Widget Refactorings and UI Themes (Part 3 of 11) *** Prepare Shout syntax highlighting for UI themes. (Temporarily no syntax highlighting. Sorry. Be patient.) =============== Diff against ToolBuilder-Morphic-mt.171 =============== Item was added: + ----- Method: PluggableTextMorphPlus class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ super themeProperties, { + { #stylerClass. 'Editing'. 'The styler class you want to use for syntax highlighting' }. + { #balloonTextColor. 'Colors'. 'Color to use when drawing the balloon text on an empty text field.' }. + { #balloonTextFont. 'Fonts'. 'Font to use when drawing the balloon text on an empty text field.' }. + }! Item was added: + ----- Method: PluggableTextMorphPlus>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + + super applyUserInterfaceTheme. + + self styler ifNotNil: [:s | + s reset. + self updateStyle].! Item was changed: ----- Method: PluggableTextMorphPlus>>useDefaultStyler (in category 'initialize') ----- useDefaultStyler "This should be changed to a proper registry but as long as there is only shout this will do" + + (self userInterfaceTheme stylerClass ifNil: [Smalltalk at: #SHTextStylerST80]) + ifNotNil: [:stylerClass | self styler: (stylerClass new view: self)].! - Smalltalk at: #SHTextStylerST80 ifPresent:[:stylerClass| - self styler: (stylerClass new view: self). - ].! From commits at source.squeak.org Sun Jul 31 08:56:12 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 08:56:13 2016 Subject: [squeak-dev] The Trunk: 51Deprecated-mt.36.mcz Message-ID: Marcel Taeumel uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-mt.36.mcz ==================== Summary ==================== Name: 51Deprecated-mt.36 Author: mt Time: 31 July 2016, 10:56:06.86249 am UUID: 5dae79d1-829b-6046-82de-e00a2acb0379 Ancestors: 51Deprecated-mt.35 *** Widget Refactorings and UI Themes (Part 3 of 11) *** Prepare Shout syntax highlighting for UI themes. (Temporarily no syntax highlighting. Sorry. Be patient.) =============== Diff against 51Deprecated-mt.35 =============== Item was added: + ----- Method: SHTextStylerST80 class>>attributesByPixelHeight: (in category '*51Deprecated') ----- + attributesByPixelHeight: aNumber + + self deprecated: 'Use UI themes.'. + ^self textAttributesByPixelHeight + at: aNumber + ifAbsent: [Dictionary new]! Item was added: + ----- Method: SHTextStylerST80 class>>attributesFor:pixelHeight: (in category '*51Deprecated') ----- + attributesFor: aSymbol pixelHeight: aNumber + + self deprecated: 'Use UI themes.'. + ^(self textAttributesByPixelHeight + at: aNumber + ifAbsent:[Dictionary new]) + at: aSymbol ifAbsent:[nil]! From commits at source.squeak.org Sun Jul 31 09:02:29 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 09:02:32 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1210.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1210.mcz ==================== Summary ==================== Name: Morphic-mt.1210 Author: mt Time: 31 July 2016, 11:01:49.38749 am UUID: 885974ef-35e1-cd4f-8c9e-858dcd73e15b Ancestors: Morphic-mt.1209 *** Widget Refactorings and UI Themes (Part 4 of 11) *** Some fixes and refactorings in menus and docking bars. Prepare both for UI themeing. =============== Diff against Morphic-mt.1209 =============== Item was changed: ----- Method: DockingBarItemMorph>>adjacentTo (in category 'selecting') ----- adjacentTo + | roundedCornersOffset verticalOffset | - | roundedCornersOffset | roundedCornersOffset := MenuMorph roundedMenuCorners ifTrue: [Morph preferredCornerRadius negated] ifFalse: [0]. + verticalOffset := 2. owner isFloating + ifTrue: [^ {self bounds bottomLeft + (roundedCornersOffset @ verticalOffset)}]. - ifTrue: [^ {self bounds bottomLeft + (roundedCornersOffset @ 4)}]. owner isAdheringToTop + ifTrue: [^ {self bounds bottomLeft + (roundedCornersOffset @ verticalOffset)}]. - ifTrue: [^ {self bounds bottomLeft + (roundedCornersOffset @ 4)}]. owner isAdheringToLeft + ifTrue: [^ {self bounds topRight + (roundedCornersOffset @ verticalOffset)}]. - ifTrue: [^ {self bounds topRight + (roundedCornersOffset @ 4)}]. owner isAdheringToBottom + ifTrue: [^ {self bounds topLeft + (roundedCornersOffset @ verticalOffset)}]. - ifTrue: [^ {self bounds topLeft + (roundedCornersOffset @ 4)}]. owner isAdheringToRight + ifTrue: [^ {self bounds topLeft + (roundedCornersOffset @ verticalOffset negated)}]. - ifTrue: [^ {self bounds topLeft + (roundedCornersOffset @ -4)}]. ^ {self bounds bottomLeft + (roundedCornersOffset @ 5)}! Item was added: + ----- Method: DockingBarItemMorph>>drawIconOn: (in category 'drawing') ----- + drawIconOn: aCanvas + + | pos | + self hasIcon ifTrue: [ + | iconForm | + iconForm := self iconForm. + + pos := (contents + ifEmpty: [self left + (self width - iconForm width // 2)] + ifNotEmpty: [self left]) + @ (self top + (self height - iconForm height // 2)). + + aCanvas + translucentImage: iconForm + at: pos].! Item was added: + ----- Method: DockingBarItemMorph>>drawLabelOn: (in category 'drawing') ----- + drawLabelOn: aCanvas + + | stringBounds | + self contents ifEmpty: [^ self]. + + stringBounds := bounds. + + self hasIcon ifTrue: [ + stringBounds := stringBounds left: stringBounds left + self iconForm width + 2 ]. + + "Vertical centering." + stringBounds := stringBounds top: stringBounds top + stringBounds bottom - self fontToUse height // 2. + "Horizontal centering." + stringBounds := stringBounds left: stringBounds left + (stringBounds width - (self fontToUse widthOfString: contents) // 2) abs. + + aCanvas + drawString: contents + in: stringBounds + font: self fontToUse + color: self colorToUse.! Item was removed: - ----- Method: DockingBarItemMorph>>drawOn: (in category 'drawing') ----- - drawOn: aCanvas - | stringColor stringBounds | - (isSelected and: [ isEnabled ]) - ifTrue: [ - aCanvas fillRectangle: self bounds fillStyle: self selectionFillStyle. - stringColor := color negated ] - ifFalse: [ stringColor := color ]. - stringBounds := bounds. - stringBounds := stringBounds left: stringBounds left + self stringMargin. - self hasIcon ifTrue: [ - | iconForm | - iconForm := self iconForm. - aCanvas - translucentImage: iconForm - at: stringBounds left @ (self top + (self height - iconForm height // 2)). - stringBounds := stringBounds left: stringBounds left + iconForm width + 2 ]. - stringBounds := stringBounds top: stringBounds top + stringBounds bottom - self fontToUse height // 2. - aCanvas - drawString: contents - in: stringBounds - font: self fontToUse - color: stringColor! Item was added: + ----- Method: DockingBarItemMorph>>drawSubMenuMarkerOn: (in category 'drawing') ----- + drawSubMenuMarkerOn: aCanvas + "Ignore."! Item was removed: - ----- Method: DockingBarItemMorph>>minWidth (in category 'layout') ----- - minWidth - - | iconWidth | - iconWidth := self hasIcon - ifTrue: [ self icon width + 2 ] - ifFalse: [ 0 ]. - ^ (self fontToUse widthOfString: contents) + iconWidth + (2 * self stringMargin)! Item was removed: - ----- Method: DockingBarItemMorph>>stringMargin (in category 'layout') ----- - stringMargin - - ^Preferences tinyDisplay - ifTrue: [ 1 ] - ifFalse: [ 6 ]! Item was removed: - ----- Method: DockingBarItemMorph>>subMenuMarker (in category 'private') ----- - subMenuMarker - - self shouldNotImplement! Item was changed: + Morph subclass: #DockingBarMorph - AlignmentMorph subclass: #DockingBarMorph instanceVariableNames: 'originalColor gradientRamp fillsOwner avoidVisibleBordersAtEdge autoGradient selectedItem activeSubMenu oldKeyboardFocus oldMouseFocus' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Menus-DockingBar'! Item was added: + ----- Method: DockingBarMorph class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ super themeProperties, { + { #borderColor. 'Colors'. 'Color of the menu''s border.' }. + { #borderWidth. 'Geometry'. 'Width of the menu''s border.' }. + { #borderStyle. 'Borders'. 'Whether to use a plain border, inset, or outset.' }. + { #color. 'Colors'. 'Background color of the menu.' }. + + { #lineColor. 'Colors'. 'Color of the separators between menu items.' }. + { #lineStyle. 'Colors'. 'Use border-style to change appearance.' }. + { #lineWidth. 'Geometry'. 'How big the separators should be.' }. + }! Item was changed: ----- Method: DockingBarMorph>>addLine (in category 'construction') ----- addLine "Append a divider line to this menu. Suppress duplicate lines." + | colorToUse | submorphs isEmpty ifTrue: [^ self]. + self lastSubmorph knownName = #line ifTrue: [^ self]. + + colorToUse := self userInterfaceTheme lineColor ifNil: [Color gray: 0.9]. + self addMorphBack: (Morph new + color: colorToUse; + extent: (self userInterfaceTheme lineWidth ifNil: [2]) asPoint; + borderStyle: (self userInterfaceTheme lineStyle ifNil: [BorderStyle inset]); + borderColor: colorToUse; + borderWidth: 1; + name: #line; "see above" + yourself).! - (self lastSubmorph isKindOf: MenuLineMorph) - ifFalse: [self addMorphBack: MenuLineMorph new]. - ! Item was added: + ----- Method: DockingBarMorph>>applyUserInterfaceTheme (in category 'update') ----- + applyUserInterfaceTheme + + | colorToUse | + gradientRamp := nil. + + super applyUserInterfaceTheme. + + self setDefaultParameters. + + "Update properties of separating lines." + colorToUse := self userInterfaceTheme lineColor ifNil: [Color gray: 0.9]. + self submorphs + select: [:ea | ea knownName = #line] + thenDo: [:line | + line + color: colorToUse; + extent: (self userInterfaceTheme lineWidth ifNil: [2]) asPoint; + borderStyle: (self userInterfaceTheme lineStyle ifNil: [BorderStyle inset]); + borderColor: colorToUse].! Item was changed: ----- Method: DockingBarMorph>>color: (in category 'accessing') ----- color: aColor "Set the receiver's color." + super color: aColor. originalColor := aColor asColor. + gradientRamp := nil. "" self updateColor! Item was changed: ----- Method: DockingBarMorph>>gradientRamp (in category 'private - layout') ----- gradientRamp + | cc | + cc := originalColor adjustSaturation: -0.08 brightness: 0.4. + ^ gradientRamp ifNil:[gradientRamp := { + 0.0 -> cc. + 0.25 -> (originalColor mixed: 0.5 with: cc). + 0.9 -> originalColor. + 1.0 -> originalColor darker.}]! - ^ gradientRamp ifNil:[{0.0 -> originalColor muchLighter. 1.0 -> originalColor twiceDarker}]! Item was changed: ----- Method: DockingBarMorph>>initialize (in category 'initialize-release') ----- initialize "initialize the receiver" super initialize. + self changeTableLayout. + selectedItem := nil. activeSubMenu := nil. fillsOwner := true. avoidVisibleBordersAtEdge := true. autoGradient := MenuMorph gradientMenu. self setDefaultParameters ; beFloating ; beSticky ; layoutInset: 0 ; dropEnabled: true! Item was changed: ----- Method: DockingBarMorph>>setDefaultParameters (in category 'initialize-release') ----- setDefaultParameters "private - set the default parameter using Preferences as the inspiration source" + - | colorFromMenu worldColor menuColor menuBorderColor | - colorFromMenu := Preferences menuColorFromWorld - and: [Display depth > 4 - and: [(worldColor := self currentWorld color) isColor]]. - "" - menuColor := colorFromMenu - ifTrue: [worldColor luminance > 0.7 - ifTrue: [worldColor mixed: 0.85 with: Color black] - ifFalse: [worldColor mixed: 0.4 with: Color white]] - ifFalse: [MenuMorph menuColor]. - "" - menuBorderColor := Preferences menuAppearance3d - ifTrue: [#raised] - ifFalse: [colorFromMenu - ifTrue: [worldColor muchDarker] - ifFalse: [MenuMorph menuBorderColor]]. - "" self + color: (self userInterfaceTheme color ifNil: [Color r: 0.9 g: 0.9 b: 0.9]); + borderStyle: (self userInterfaceTheme borderStyle ifNil: [BorderStyle default]); + borderColor: (self userInterfaceTheme borderColor ifNil: [Color gray]); + borderWidth: (self userInterfaceTheme borderWidth ifNil: [0]). + + self extent: (Preferences standardMenuFont height asPoint).! - setColor: menuColor - borderWidth: MenuMorph menuBorderWidth - borderColor: menuBorderColor! Item was changed: ----- Method: DockingBarMorph>>updateColor (in category 'private - layout') ----- updateColor "private - update the receiver's color" | fill | + MenuMorph gradientMenu ifFalse: [ - self autoGradient ifFalse: [ self color ~= originalColor ifTrue: [self color: originalColor]. ^ self]. "" fill := GradientFillStyle ramp: self gradientRamp. "" fill origin: self topLeft. self isVertical ifTrue: [fill direction: self width @ 0] ifFalse: [fill direction: 0 @ self height]. "" self fillStyle: fill! Item was changed: ----- Method: DockingBarMorph>>updateLayoutProperties (in category 'private - layout') ----- updateLayoutProperties "private - update the layout properties based on adhering, fillsOwner and avoidVisibleBordersAtEdge preferencs" "" (self isHorizontal or: [self isFloating]) ifTrue: [self listDirection: #leftToRight] ifFalse: [self listDirection: #topToBottom]. "" self hResizing: #shrinkWrap. self vResizing: #shrinkWrap. self fillsOwner ifTrue: ["" self isHorizontal ifTrue: [self hResizing: #spaceFill]. self isVertical ifTrue: [self vResizing: #spaceFill]]. + "" + self isHorizontal ifTrue: [ + self submorphsDo: [:m | m hResizing: #shrinkWrap; vResizing: #spaceFill]]. + self isVertical ifTrue: [ + self submorphsDo: [:m | m vResizing: #shrinkWrap; hResizing: #spaceFill]]. + ! - ! Item was changed: ----- Method: MenuIcons class>>squeakLogoIcon (in category 'accessing - icons') ----- squeakLogoIcon ^ Icons at: #squeakLogoIcon ifAbsentPut: [(Form extent: 24@16 depth: 32 + fromArray: #( 0 0 67108865 2063597569 1778384897 889192449 0 0 0 0 0 0 0 0 0 0 0 0 1610612737 1811939329 1610612737 0 0 0 0 0 905969665 889192449 0 1442840577 788529153 0 0 0 0 0 0 0 0 0 0 1711276033 469762049 0 1728053249 0 0 0 0 0 1006632961 704643073 0 0 1895825409 234881025 0 0 0 0 0 0 0 0 1207959553 838860801 0 0 1728053249 0 0 0 0 0 738197505 989855745 0 0 167772161 1862270977 0 0 0 0 0 0 0 83886081 1879048193 0 0 0 1744830465 0 0 0 0 0 469762049 1258291201 0 0 0 1543503873 520093697 0 0 0 0 0 0 1543503873 335544321 0 0 0 1761607681 0 0 0 0 0 16777217 1644167169 0 0 0 33554433 67108865 0 0 0 0 0 0 33554433 0 0 0 0 1795162113 0 0 0 0 0 0 1711276033 0 0 0 0 0 117440513 0 0 0 0 0 0 0 0 0 100663297 1677721601 0 0 0 0 0 0 1744830465 0 0 0 0 3019898881 4009754625 1056964609 0 0 1090519041 3204448257 1325400065 0 0 0 889192449 889192449 0 0 0 0 0 0 1392508929 352321537 0 0 637534209 4278190081 4278190081 2650800129 0 0 3372220417 4278190081 3758096385 0 0 0 1560281089 117440513 0 0 0 0 0 0 0 0 0 0 134217729 4060086273 4278190081 1929379841 0 0 3187671041 4278190081 3590324225 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 704643073 1577058305 83886081 0 0 771751937 2667577345 956301313 0 0 0 0 0 0 0 0 0 0 369098753 973078529 1577058305 1728053249 1711276033 1325400065 805306369 218103809 0 855638017 922746881 16777217 0 268435457 788529153 1308622849 1593835521 1056964609 436207617 16777217 0 0 1442840577 1761607681 1409286145 788529153 301989889 872415233 1124073473 1627389953 1929379841 973078529 2030043137 4278190081 4278190081 2164260865 1040187393 1946157057 1577058305 939524097 452984833 687865857 1325400065 1778384897 1795162113 1392508929 0 0 855638017 1795162113 1677721601 855638017 620756993 436207617 486539265 285212673 2030043137 4278190081 4278190081 2164260865 486539265 1023410177 922746881 1157627905 1392508929 1845493761 1744830465 486539265 0 0 201326593 2013265921 1006632961 0 553648129 1694498817 1778384897 1694498817 1728053249 738197505 0 855638017 922746881 16777217 738197505 1728053249 1744830465 1778384897 1476395009 251658241 117440513 1476395009 1879048193 150994945 0 16777217 0 486539265 1426063361 16777217 0 0 0 0 0 0 0 0 0 0 0 0 234881025 1728053249 486539265 0 167772161 50331649) - fromArray: #( 16777215 16777215 67108864 2063597568 1778384896 889192448 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 1610612736 1811939328 1610612736 16777215 16777215 16777215 16777215 16777215 905969664 889192448 16777215 1442840576 788529152 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 1711276032 469762048 16777215 1728053248 16777215 16777215 16777215 16777215 16777215 1006632960 704643072 16777215 16777215 1895825408 234881024 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 1207959552 838860800 16777215 16777215 1728053248 16777215 16777215 16777215 16777215 16777215 738197504 989855744 16777215 16777215 167772160 1862270976 16777215 16777215 16777215 16777215 16777215 16777215 16777215 83886080 1879048192 16777215 16777215 16777215 1744830464 16777215 16777215 16777215 16777215 16777215 469762048 1258291200 16777215 16777215 16777215 1543503872 520093696 16777215 16777215 16777215 16777215 16777215 16777215 1543503872 335544320 16777215 16777215 16777215 1761607680 16777215 16777215 16777215 16777215 16777215 16777216 1644167168 16777215 16777215 16777215 33554432 67108864 16777215 16777215 16777215 16777215 16777215 16777215 33554432 16777215 16777215 16777215 16777215 1795162112 16777215 16777215 16777215 16777215 16777215 16777215 1711276032 16777215 16777215 16777215 16777215 16777215 117440512 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 100663296 1677721600 16777215 16777215 16777215 16777215 16777215 16777215 1744830464 16777215 16777215 16777215 16777215 3019898880 4009754624 1056964608 16777215 16777215 1090519040 3204448256 1325400064 16777215 16777215 16777215 889192448 889192448 16777215 16777215 16777215 16777215 16777215 16777215 1392508928 352321536 16777215 16777215 637534208 4278190080 4278190080 2650800128 16777215 16777215 3372220416 4278190080 3758096384 16777215 16777215 16777215 1560281088 117440512 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 134217728 4060086272 4278190080 1929379840 16777215 16777215 3187671040 4278190080 3590324224 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 704643072 1577058304 83886080 16777215 16777215 771751936 2667577344 956301312 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 369098752 973078528 1577058304 1728053248 1711276032 1325400064 805306368 218103808 16777215 858262026 925501705 16777216 16777215 268435456 788529152 1308622848 1593835520 1056964608 436207616 16777216 16777215 16777215 1442840576 1761607680 1409286144 788529152 301989888 872415232 1124073472 1627389952 1929379840 973078528 2032667403 4280814347 4280814347 2166885388 1040187392 1946157056 1577058304 939524096 452984832 687865856 1325400064 1778384896 1795162112 1392508928 16777215 16777215 855638016 1795162112 1677721600 855638016 620756992 436207616 486539264 285212672 2032667403 4280814347 4280814347 2166885388 486539264 1023410176 922746880 1157627904 1392508928 1845493760 1744830464 486539264 16777215 16777215 201326592 2013265920 1006632960 16777215 553648128 1694498816 1778384896 1694498816 1728053248 738197504 16777215 858262026 925501705 16777216 738197504 1728053248 1744830464 1778384896 1476395008 251658240 117440512 1476395008 1879048192 150994944 16777215 16777216 16777215 486539264 1426063360 16777216 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 234881024 1728053248 486539264 16777215 167772160 50331648) offset: 0@0)]! Item was added: + ----- Method: MenuIcons class>>squeakLogoIconColorized: (in category 'accessing - icons') ----- + squeakLogoIconColorized: aColor + + ^ self squeakLogoIcon + collectColors: [:c | aColor alpha: c alpha]! Item was removed: - ----- Method: MenuIcons class>>squeakLogoInvertedIcon (in category 'accessing - icons') ----- - squeakLogoInvertedIcon - ^ Icons - at: #squeakLogoInvertedIcon ifAbsentPut: [(Form - extent: 24@16 - depth: 32 - fromArray: #( 16777215 16777215 83886079 2080374783 1795162111 905969663 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 1627389951 1828716543 1627389951 16777215 16777215 16777215 16777215 16777215 922746879 905969663 16777215 1459617791 805306367 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 1728053247 486539263 16777215 1744830463 16777215 16777215 16777215 16777215 16777215 1023410175 721420287 16777215 16777215 1912602623 251658239 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 1224736767 855638015 16777215 16777215 1744830463 16777215 16777215 16777215 16777215 16777215 754974719 1006632959 16777215 16777215 184549375 1879048191 16777215 16777215 16777215 16777215 16777215 16777215 16777215 100663295 1895825407 16777215 16777215 16777215 1761607679 16777215 16777215 16777215 16777215 16777215 486539263 1275068415 16777215 16777215 16777215 1560281087 536870911 16777215 16777215 16777215 16777215 16777215 16777215 1560281087 352321535 16777215 16777215 16777215 1778384895 16777215 16777215 16777215 16777215 16777215 33554431 1660944383 16777215 16777215 16777215 50331647 83886079 16777215 16777215 16777215 16777215 16777215 16777215 50331647 16777215 16777215 16777215 16777215 1811939327 16777215 16777215 16777215 16777215 16777215 16777215 1728053247 16777215 16777215 16777215 16777215 16777215 134217727 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 117440511 1694498815 16777215 16777215 16777215 16777215 16777215 16777215 1761607679 16777215 16777215 16777215 16777215 3036676095 4026531839 1073741823 16777215 16777215 1107296255 3221225471 1342177279 16777215 16777215 16777215 905969663 905969663 16777215 16777215 16777215 16777215 16777215 16777215 1409286143 369098751 16777215 16777215 654311423 4294967295 4294967295 2667577343 16777215 16777215 3388997631 4294967295 3774873599 16777215 16777215 16777215 1577058303 134217727 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 150994943 4076863487 4294967295 1946157055 16777215 16777215 3204448255 4294967295 3607101439 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 721420287 1593835519 100663295 16777215 16777215 788529151 2684354559 973078527 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 385875967 989855743 1593835519 1744830463 1728053247 1342177279 822083583 234881023 16777215 869791221 936769270 33554431 16777215 285212671 805306367 1325400063 1610612735 1073741823 452984831 33554431 16777215 16777215 1459617791 1778384895 1426063359 805306367 318767103 889192447 1140850687 1644167167 1946157055 989855743 2044196084 4292343028 4292343028 2178413555 1056964607 1962934271 1593835519 956301311 469762047 704643071 1342177279 1795162111 1811939327 1409286143 16777215 16777215 872415231 1811939327 1694498815 872415231 637534207 452984831 503316479 301989887 2044196084 4292343028 4292343028 2178413555 503316479 1040187391 939524095 1174405119 1409286143 1862270975 1761607679 503316479 16777215 16777215 218103807 2030043135 1023410175 16777215 570425343 1711276031 1795162111 1711276031 1744830463 754974719 16777215 869791221 936769270 33554431 754974719 1744830463 1761607679 1795162111 1493172223 268435455 134217727 1493172223 1895825407 167772159 16777215 33554431 16777215 503316479 1442840575 33554431 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 251658239 1744830463 503316479 16777215 184549375 67108863) - offset: 0@0)]! Item was added: + ----- Method: MenuItemMorph class>>applyUserInterfaceTheme (in category 'preferences') ----- + applyUserInterfaceTheme + + SubMenuMarker := (UserInterfaceTheme current get: #subMenuMarker for: self) + ifNil: [self defaultSubMenuMarker].! Item was added: + ----- Method: MenuItemMorph class>>defaultSubMenuMarker (in category 'defaults') ----- + defaultSubMenuMarker + + | f | + f := Form + extent: 5@9 + fromArray: #(2147483648 3221225472 3758096384 4026531840 4160749568 4026531840 3758096384 3221225472 2147483648) + offset: 0@0. + ^ ColorForm mappingWhiteToTransparentFrom: f! Item was changed: ----- Method: MenuItemMorph class>>initialize (in category 'class initialization') ----- initialize "MenuItemMorph initialize" + SubMenuMarker := self defaultSubMenuMarker. - | f | - f := Form - extent: 5@9 - fromArray: #(2147483648 3221225472 3758096384 4026531840 4160749568 4026531840 3758096384 3221225472 2147483648) - offset: 0@0. - SubMenuMarker := ColorForm mappingWhiteToTransparentFrom: f. ! Item was added: + ----- Method: MenuItemMorph class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ super themeProperties, { + { #font. 'Fonts'. 'Font for menu items.' }. + { #textColor. 'Colors'. 'Color for the menu item''s labels.' }. + { #selectionColor. 'Colors'. 'Color used for items when hovering or selecting them.' }. + { #selectionTextColor. 'Colors'. 'Color used for label when hovering or selecting them.' }. + { #subMenuMarker. 'Forms'. 'The form to be used to indicate a submenu.' }. + }! Item was added: + ----- Method: MenuItemMorph>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + + super applyUserInterfaceTheme. + + self + color: (self userInterfaceTheme textColor ifNil: [Color black]); + font: (self userInterfaceTheme font ifNil: [TextStyle defaultFont]). + ! Item was added: + ----- Method: MenuItemMorph>>colorToUse (in category 'accessing') ----- + colorToUse + + ^ isSelected & isEnabled + ifTrue: [ self userInterfaceTheme selectionTextColor ifNil: [Color white] ] + ifFalse: [ color ]! Item was added: + ----- Method: MenuItemMorph>>drawBackgroundOn: (in category 'drawing') ----- + drawBackgroundOn: aCanvas + + isSelected & isEnabled + ifTrue: [aCanvas fillRectangle: self bounds fillStyle: self selectionFillStyle].! Item was added: + ----- Method: MenuItemMorph>>drawIconOn: (in category 'drawing') ----- + drawIconOn: aCanvas + + self hasIcon ifTrue: [ + | iconForm | + iconForm := self iconForm. + aCanvas + translucentImage: iconForm + at: self bounds left @ (self top + (self height - iconForm height // 2)).].! Item was added: + ----- Method: MenuItemMorph>>drawLabelOn: (in category 'drawing') ----- + drawLabelOn: aCanvas + + | stringBounds | + stringBounds := bounds. + + self hasIcon ifTrue: [ + stringBounds := stringBounds left: stringBounds left + self iconForm width + 2 ]. + self hasMarker ifTrue: [ + stringBounds := stringBounds left: stringBounds left + self submorphBounds width + 8 ]. + + stringBounds := stringBounds top: stringBounds top + stringBounds bottom - self fontToUse height // 2. + + aCanvas + drawString: contents + in: stringBounds + font: self fontToUse + color: self colorToUse.! Item was changed: ----- Method: MenuItemMorph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas + + self + drawBackgroundOn: aCanvas; + drawIconOn: aCanvas; + drawLabelOn: aCanvas; + drawSubMenuMarkerOn: aCanvas.! - | stringColor stringBounds | - isSelected & isEnabled - ifTrue: [ - aCanvas fillRectangle: self bounds fillStyle: self selectionFillStyle. - stringColor := color negated ] - ifFalse: [ stringColor := color ]. - stringBounds := bounds. - self hasIcon ifTrue: [ - | iconForm | - iconForm := self iconForm. - aCanvas - translucentImage: iconForm - at: stringBounds left @ (self top + (self height - iconForm height // 2)). - stringBounds := stringBounds left: stringBounds left + iconForm width + 2 ]. - self hasMarker ifTrue: [ - stringBounds := stringBounds left: stringBounds left + self submorphBounds width + 8 ]. - stringBounds := stringBounds top: stringBounds top + stringBounds bottom - self fontToUse height // 2. - aCanvas - drawString: contents - in: stringBounds - font: self fontToUse - color: stringColor. - self hasSubMenu - ifTrue: [| subMenuMarker subMenuMarkerPosition | - subMenuMarker := self subMenuMarker. - subMenuMarkerPosition := self right - subMenuMarker width @ (self top + self bottom - subMenuMarker height // 2). - aCanvas paintImage: subMenuMarker at: subMenuMarkerPosition ]! Item was added: + ----- Method: MenuItemMorph>>drawSubMenuMarkerOn: (in category 'drawing') ----- + drawSubMenuMarkerOn: aCanvas + + self hasSubMenu ifTrue: [ + | subMenuMarker subMenuMarkerPosition | + subMenuMarker := self subMenuMarker. + subMenuMarkerPosition := self right - subMenuMarker width @ (self top + self bottom - subMenuMarker height // 2). + aCanvas paintImage: subMenuMarker at: subMenuMarkerPosition ]! Item was changed: ----- Method: MenuItemMorph>>initialize (in category 'initialization') ----- initialize "initialize the state of the receiver" super initialize. "" contents := ''. hasFocus := false. isEnabled := true. subMenu := nil. isSelected := false. target := nil. selector := nil. arguments := nil. + font := self userInterfaceTheme font ifNil: [TextStyle defaultFont]. + self + color: (self userInterfaceTheme textColor ifNil: [Color black]); + hResizing: #spaceFill; + vResizing: #shrinkWrap! - font := Preferences standardMenuFont. - self hResizing: #spaceFill; - vResizing: #shrinkWrap! Item was changed: ----- Method: MenuItemMorph>>minWidth (in category 'layout') ----- minWidth | subMenuWidth iconWidth markerWidth | subMenuWidth := self hasSubMenu ifTrue: [ 10 ] ifFalse: [ 0 ]. iconWidth := self hasIcon ifTrue: [ self icon width + 2 ] ifFalse: [ 0 ]. markerWidth := self hasMarker ifTrue: [ self submorphBounds width + 8 ] ifFalse: [ 0 ]. ^(self fontToUse widthOfString: contents) + + subMenuWidth + iconWidth + markerWidth + self stringMargin! - + subMenuWidth + iconWidth + markerWidth! Item was changed: ----- Method: MenuItemMorph>>selectionFillStyle (in category 'private') ----- selectionFillStyle + " Answer the fill style to use with the receiver is the selected element " - " Answer the fill style to use with the receiver is the selected - element " + | fill baseColor | + baseColor := self userInterfaceTheme selectionColor ifNil: [Color r: 0.4 g: 0.5 b: 0.7]. - | fill baseColor preferenced | - Display depth <= 2 ifTrue: [ - ^Color gray ]. - preferenced := MenuMorph menuSelectionColor. - preferenced notNil ifTrue: [ ^preferenced ]. - baseColor := owner color negated. MenuMorph gradientMenu ifFalse: [ ^baseColor ]. + fill := GradientFillStyle ramp: { 0.0 -> baseColor twiceLighter. 1 -> baseColor twiceDarker }. fill origin: self topLeft. + fill direction: 0 @ self height. ^ fill! Item was added: + ----- Method: MenuItemMorph>>stringMargin (in category 'layout') ----- + stringMargin + + ^Preferences tinyDisplay + ifTrue: [ 1 ] + ifFalse: [ 6 ]! Item was changed: + Morph subclass: #MenuMorph - AlignmentMorph subclass: #MenuMorph instanceVariableNames: 'defaultTarget selectedItem stayUp popUpOwner activeSubMenu' classVariableNames: 'CloseBoxImage CloseBoxImageFlat CloseBoxImageGradient GradientMenu MenuBorderColor MenuBorderWidth MenuColor MenuLineColor MenuSelectionColor MenuTitleBorderColor MenuTitleBorderWidth MenuTitleColor PushPinImage RoundedMenuCorners' poolDictionaries: '' category: 'Morphic-Menus'! !MenuMorph commentStamp: '' prior: 0! Instance variables: defaultTarget The default target for creating menu items selectedItem The currently selected item in the receiver stayUp True if the receiver should stay up after clicks popUpOwner The menu item that automatically invoked the receiver, if any. activeSubMenu The currently active submenu.! Item was removed: - ----- Method: MenuMorph class>>menuBorderColor (in category 'preferences') ----- - menuBorderColor - - - Display depth <= 2 ifTrue: [^ Color black]. - ^MenuBorderColor ifNil: [(Color r: 0.2 g: 0.3 b: 0.9)]! Item was removed: - ----- Method: MenuMorph class>>menuBorderColor: (in category 'preferences') ----- - menuBorderColor: aColor - MenuBorderColor := aColor! Item was removed: - ----- Method: MenuMorph class>>menuBorderWidth (in category 'preferences') ----- - menuBorderWidth - - ^MenuBorderWidth ifNil: [2]! Item was removed: - ----- Method: MenuMorph class>>menuBorderWidth: (in category 'preferences') ----- - menuBorderWidth: anInteger - MenuBorderWidth := anInteger! Item was removed: - ----- Method: MenuMorph class>>menuColor (in category 'preferences') ----- - menuColor - - Display depth <= 2 ifTrue: [^ Color black]. - ^MenuColor ifNil: [(Color r: 0.9 g: 0.9 b: 0.9)]! Item was removed: - ----- Method: MenuMorph class>>menuColor: (in category 'preferences') ----- - menuColor: aColor - MenuColor := aColor! Item was removed: - ----- Method: MenuMorph class>>menuLineColor (in category 'preferences') ----- - menuLineColor - - ^MenuLineColor ifNil: [(Color r: 0.6 g: 0.7 b: 1)]! Item was removed: - ----- Method: MenuMorph class>>menuLineColor: (in category 'preferences') ----- - menuLineColor: aColor - MenuLineColor := aColor! Item was removed: - ----- Method: MenuMorph class>>menuSelectionColor (in category 'preferences') ----- - menuSelectionColor - - Display depth <= 2 ifTrue: [^ Color black]. - ^MenuSelectionColor ifNil: [(Color r: 0.4 g: 0.5 b: 0.7)]! Item was removed: - ----- Method: MenuMorph class>>menuSelectionColor: (in category 'preferences') ----- - menuSelectionColor: aColor - MenuSelectionColor := aColor! Item was removed: - ----- Method: MenuMorph class>>menuTitleBorderColor (in category 'preferences') ----- - menuTitleBorderColor - - Display depth <= 2 ifTrue: [^ Color black]. - ^MenuTitleBorderColor ifNil: [(Color r: 0.6 g: 0.7 b: 1)]! Item was removed: - ----- Method: MenuMorph class>>menuTitleBorderColor: (in category 'preferences') ----- - menuTitleBorderColor: aColor - MenuTitleBorderColor := aColor! Item was removed: - ----- Method: MenuMorph class>>menuTitleBorderWidth (in category 'preferences') ----- - menuTitleBorderWidth - - ^MenuTitleBorderWidth ifNil: [0]! Item was removed: - ----- Method: MenuMorph class>>menuTitleBorderWidth: (in category 'preferences') ----- - menuTitleBorderWidth: anInteger - MenuTitleBorderWidth := anInteger! Item was removed: - ----- Method: MenuMorph class>>menuTitleColor (in category 'preferences') ----- - menuTitleColor - - Display depth = 1 ifTrue: [^ Color white]. - Display depth = 2 ifTrue: [^ Color gray]. - ^MenuTitleColor ifNil: [ Color transparent]! Item was removed: - ----- Method: MenuMorph class>>menuTitleColor: (in category 'preferences') ----- - menuTitleColor: aColor - MenuTitleColor := aColor! Item was added: + ----- Method: MenuMorph class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ super themeProperties, { + { #borderColor. 'Colors'. 'Color of the menu''s border.' }. + { #borderWidth. 'Borders'. 'Width of the menu''s border.' }. + { #borderStyle. 'Borders'. 'Whether to use a plain border, inset, or outset.' }. + { #color. 'Colors'. 'Background color of the menu.' }. + + { #titleBorderColor. 'Colors'. 'Color of the menu title border.' }. + { #titleBorderWidth. 'Geometry'. 'Width of the menu title border.' }. + { #titleBorderStyle. 'Borders'. 'Whether to use a plain border, inset, or outset for the title.' }. + { #titleColor. 'Colors'. 'Background color of the menu'' title.' }. + { #titleFont. 'Fonts'. 'Font for menu title.' }. + { #titleTextColor. 'Colors'. 'Color for the menu title label.' }. + + { #lineColor. 'Colors'. 'Color of the separators between menu items.' }. + { #lineStyle. 'Colors'. 'Use border-style to change appearance.' }. + { #lineWidth. 'Geometry'. 'How big the separators should be.' }. + }! Item was changed: ----- Method: MenuMorph>>addLine (in category 'construction') ----- addLine "Append a divider line to this menu. Suppress duplicate lines." + + | colorToUse | + self hasItems ifFalse: [^ self]. + self lastSubmorph knownName = #line ifTrue: [^ self]. + + colorToUse := self userInterfaceTheme lineColor ifNil: [Color gray: 0.9]. + self addMorphBack: (Morph new + color: colorToUse; + hResizing: #spaceFill; + height: (self userInterfaceTheme lineWidth ifNil: [2]); + borderStyle: (self userInterfaceTheme lineStyle ifNil: [BorderStyle inset]); + borderColor: colorToUse; + borderWidth: 1; + name: #line; "see above" + yourself).! - self hasItems - ifFalse: [^ self]. - (self lastSubmorph isKindOf: MenuLineMorph) - ifFalse: [self addMorphBack: MenuLineMorph new] ! Item was changed: ----- Method: MenuMorph>>addStayUpIcons (in category 'construction') ----- addStayUpIcons + | title closeBox pinBox | - | title closeBox pinBox titleBarArea titleString | title := submorphs detect: [:ea | ea hasProperty: #titleString] + ifNone: [ + "Called too soon. Will add stay-up icons when title is added." + self setProperty: #needsTitlebarWidgets toValue: true. - ifNone: [self setProperty: #needsTitlebarWidgets toValue: true. ^ self]. closeBox := SystemWindowButton new target: self; actionSelector: #delete; labelGraphic: self class closeBoxImage; color: Color transparent; extent: self class closeBoxImage extent; borderWidth: 0. pinBox := SystemWindowButton new target: self; actionSelector: #stayUp:; arguments: {true}; labelGraphic: self class pushPinImage; color: Color transparent; extent: self class pushPinImage extent; borderWidth: 0. + Preferences noviceMode ifTrue: [ + closeBox setBalloonText: 'close this menu'. + pinBox setBalloonText: 'keep this menu up']. + + title + addMorphFront: closeBox; + addMorphBack: pinBox. + - Preferences noviceMode - ifTrue: [closeBox setBalloonText: 'close this menu'. - pinBox setBalloonText: 'keep this menu up']. - titleBarArea := AlignmentMorph newRow vResizing: #shrinkWrap; - layoutInset: 3; - color: MenuMorph menuTitleColor; - addMorphBack: closeBox; - addMorphBack: title; - addMorphBack: pinBox. - - title color: Color transparent. - - titleString := title - findDeepSubmorphThat: [:each | each respondsTo: #font: ] - ifAbsent: [StringMorph contents: String empty]. - titleString font: Preferences windowTitleFont. - self wantsRoundedCorners - ifTrue: [titleBarArea useRoundedCorners]. - - self addMorphFront: titleBarArea. - titleBarArea setProperty: #titleString toValue: (title valueOfProperty: #titleString). - title removeProperty: #titleString. self setProperty: #hasTitlebarWidgets toValue: true. self removeProperty: #needsTitlebarWidgets. self removeStayUpItems! Item was changed: ----- Method: MenuMorph>>addTitle:icon:updatingSelector:updateTarget: (in category 'construction') ----- addTitle: aString icon: aForm updatingSelector: aSelector updateTarget: aTarget + "Add a title line at the top of this menu Make aString its initial contents. If aSelector is not nil, then periodically obtain fresh values for its contents by sending aSelector to aTarget." + + | container fontToUse colorToUse labelArea | + + container := AlignmentMorph newRow. + self setTitleParametersFor: container. + + aForm ifNotNil: [:form | container addMorphBack: form asMorph]. - "Add a title line at the top of this menu Make aString its initial - contents. - If aSelector is not nil, then periodically obtain fresh values for - its - contents by sending aSelector to aTarget.." - | title titleContainer | - title := AlignmentMorph newColumn. - self setTitleParametersFor: title. - "" - aForm isNil - ifTrue: [titleContainer := title] - ifFalse: [| pair | - pair := AlignmentMorph newRow. + fontToUse := self userInterfaceTheme titleFont ifNil: [TextStyle defaultFont]. + colorToUse := self userInterfaceTheme titleTextColor ifNil: [Color black]. + + "Build the label." - pair color: Color transparent. - pair hResizing: #shrinkWrap. - pair layoutInset: 0. - pair addMorphBack: (Morph new extent: 5@5; color: Color transparent). "padding" - pair addMorphBack: aForm asMorph. - pair addMorphBack: (Morph new extent: 5@5; color: Color transparent). "padding" - titleContainer := AlignmentMorph newColumn. - titleContainer color: Color transparent. - titleContainer vResizing: #shrinkWrap. - titleContainer wrapCentering: #center. - titleContainer cellPositioning: #topCenter. - titleContainer layoutInset: 0. - pair addMorphBack: titleContainer. - "" - title addMorphBack: pair]. - "" aSelector + ifNil: [ + labelArea := AlignmentMorph newColumn + color: Color transparent; + vResizing: #shrinkWrap; + wrapCentering: #center; + cellPositioning: #topCenter. + aString asString linesDo: [:line | labelArea + addMorphBack: ((StringMorph contents: line + font: fontToUse) + color: colorToUse; - ifNil: ["" - aString asString - linesDo: [:line | titleContainer - addMorphBack: ((StringMorph - contents: line - font: Preferences standardMenuFont) - color: (Color black); yourself)]] + ifNotNil: [ + labelArea := UpdatingStringMorph on: aTarget selector: aSelector. + labelArea font: fontToUse. + labelArea color: colorToUse. + labelArea useStringFormat. + labelArea lock]. + + container addMorphBack: labelArea. - ifNotNil: [| usm | - usm := UpdatingStringMorph on: aTarget selector: aSelector. - usm font: Preferences standardMenuFont. - usm useStringFormat. - usm lock. - titleContainer addMorphBack: usm]. "" + container setProperty: #titleString toValue: aString. + self addMorphFront: container. - title setProperty: #titleString toValue: aString. - self addMorphFront: title. "" - title useSquareCorners. (self hasProperty: #needsTitlebarWidgets) ifTrue: [self addStayUpIcons]! Item was added: + ----- Method: MenuMorph>>applyUserInterfaceTheme (in category 'update') ----- + applyUserInterfaceTheme + + | colorToUse | + super applyUserInterfaceTheme. + + self setDefaultParameters. + + "Update properties of separating lines." + colorToUse := self userInterfaceTheme lineColor ifNil: [Color gray: 0.9]. + self submorphs + select: [:ea | ea knownName = #line] + thenDo: [:line | + line + color: colorToUse; + height: (self userInterfaceTheme lineWidth ifNil: [2]); + borderStyle: (self userInterfaceTheme lineStyle ifNil: [BorderStyle inset]); + borderColor: colorToUse].! Item was changed: ----- Method: MenuMorph>>initialize (in category 'initialization') ----- initialize super initialize. bounds := 0 @ 0 corner: 40 @ 10. self setDefaultParameters. + self changeTableLayout. self listDirection: #topToBottom. self hResizing: #shrinkWrap. self vResizing: #shrinkWrap. defaultTarget := nil. selectedItem := nil. stayUp := false. popUpOwner := nil.! Item was changed: ----- Method: MenuMorph>>setDefaultParameters (in category 'initialization') ----- setDefaultParameters "change the receiver's appareance parameters" + self + color: (self userInterfaceTheme color ifNil: [Color r: 0.9 g: 0.9 b: 0.9]); + borderStyle: (self userInterfaceTheme borderStyle ifNil: [BorderStyle default]); + borderColor: (self userInterfaceTheme borderColor ifNil: [Color gray]); + borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]). - | colorFromMenu worldColor menuColor | - - colorFromMenu := Preferences menuColorFromWorld - and: [Display depth > 4 - and: [(worldColor := self currentWorld color) isColor]]. + Preferences menuAppearance3d ifTrue: [self addDropShadow]. + - menuColor := colorFromMenu - ifTrue: [worldColor luminance > 0.7 - ifTrue: [worldColor mixed: 0.85 with: Color black] - ifFalse: [worldColor mixed: 0.4 with: Color white]] - ifFalse: [self class menuColor]. - - self color: menuColor. - self borderWidth: self class menuBorderWidth. - - Preferences menuAppearance3d ifTrue: [ - self borderStyle: BorderStyle thinGray. - self hasDropShadow: true. - - self useSoftDropShadow - ifFalse: [ - self - shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.666); - shadowOffset: 1 @ 1] - ifTrue: [ - self - shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.01); - shadowOffset: (10@8 corner: 10@12) ] - ] - ifFalse: [ - | menuBorderColor | - menuBorderColor := colorFromMenu - ifTrue: [worldColor muchDarker] - ifFalse: [self class menuBorderColor]. - self borderColor: menuBorderColor. - ]. - - self layoutInset: 3. ! Item was added: + ----- Method: MenuMorph>>setTitleParameters (in category 'initialization') ----- + setTitleParameters + + self setTitleParametersFor: (self allMorphs + detect: [:each | each hasProperty: #titleString] + ifNone: [^ self]).! Item was changed: ----- Method: MenuMorph>>setTitleParametersFor: (in category 'initialization') ----- setTitleParametersFor: aMenuTitle - | menuTitleColor menuTitleBorderColor | - self wantsRoundedCorners - ifTrue: [aMenuTitle useRoundedCorners]. - menuTitleColor := Preferences menuColorFromWorld - ifTrue: [self color darker] - ifFalse: [MenuMorph menuTitleColor]. - - menuTitleBorderColor := Preferences menuAppearance3d - ifTrue: [#inset] - ifFalse: [Preferences menuColorFromWorld - ifTrue: [self color darker muchDarker] - ifFalse: [MenuMorph menuTitleBorderColor]]. - aMenuTitle + color: (self userInterfaceTheme titleColor ifNil: [Color transparent]); + borderStyle: (self userInterfaceTheme titleBorderStyle ifNil: [BorderStyle default]); + borderColor: (self userInterfaceTheme titleBorderColor ifNil: [Color r: 0.6 g: 0.7 b: 1]); + borderWidth: (self userInterfaceTheme titleBorderWidth ifNil: [0]); + cornerStyle: (self wantsRoundedCorners ifTrue: [#rounded] ifFalse: [#square]); - setColor: menuTitleColor - borderWidth: MenuMorph menuTitleBorderWidth - borderColor: menuTitleBorderColor; vResizing: #shrinkWrap; wrapCentering: #center; + cellPositioning: #center; + cellInset: 5; + layoutInset: (5@0 corner: 5@0).! - cellPositioning: #topCenter; - layoutInset: 0. - ! Item was changed: ----- Method: MenuMorph>>updateColor (in category 'control') ----- updateColor + | fill title cc | - | fill title | self class gradientMenu ifFalse: [^ self]. (self fillStyle == self color) not ifTrue: [^ self]. "Don't apply the gradient more than once" "" + title := self allMorphs + detect: [:each | each hasProperty: #titleString] + ifNone: []. + + cc := self color adjustSaturation: -0.08 brightness: 0.4. + fill := GradientFillStyle ramp: { + 0.0 -> (title ifNil: [cc] ifNotNil: [cc muchLighter]). + 0.25 -> (self color mixed: 0.5 with: cc). + 1.0 -> self color}. - fill := GradientFillStyle ramp: {0.0 -> Color white. 1 -> self color}. "" fill radial: false; origin: self topLeft; direction: 0 @ self height. "" - self fillStyle: fill. " update the title color" + + title ifNotNil: [fill direction: 0@ title height]. + self fillStyle: fill. + title ifNil: [^ self]. - title := self allMorphs - detect: [:each | each hasProperty: #titleString] - ifNone: [^ self]. "" + fill := GradientFillStyle ramp: { + 0.0 -> title color twiceLighter. + 1 -> title color twiceDarker}. - fill := GradientFillStyle ramp: {0.0 -> title color twiceLighter. 1 -> title color twiceDarker}. "" fill origin: title topLeft; direction: title width @ 0. "" title fillStyle: fill! Item was added: + ----- Method: TheWorldMainDockingBar class>>applyUserInterfaceTheme (in category 'preferences') ----- + applyUserInterfaceTheme + + self updateInstances.! Item was added: + ----- Method: TheWorldMainDockingBar class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ { + { #textColor. 'Colors'. 'The color for the clock and other labels.' }. + { #font. 'Fonts'. 'The font for the clock and other labels.' }. + { #logoColor. 'Colors'. 'The color of the Squeak logo.' }. + { #selectionLogoColor. 'Colors'. 'The color of the Squeak logo when it is selected.' }. + }! Item was added: + ----- Method: TheWorldMainDockingBar>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + "Do it on the class-side."! Item was changed: ----- Method: TheWorldMainDockingBar>>clockOn: (in category 'right side') ----- clockOn: aDockingBar aDockingBar addMorphBack: (ClockMorph new + font: self fontToUse; + color: self colorToUse; show24hr: self class twentyFourHourClock; showSeconds: self class showSecondsInClock; yourself); addDefaultSpace! Item was added: + ----- Method: TheWorldMainDockingBar>>colorToUse (in category 'private') ----- + colorToUse + + ^ self userInterfaceTheme textColor ifNil: [Color black]! Item was changed: ----- Method: TheWorldMainDockingBar>>createDockingBar (in category 'construction') ----- createDockingBar "Create a docking bar from the receiver's representation" | dockingBar | dockingBar := DockingBarMorph new adhereToTop; color: MenuMorph menuColor; - gradientRamp: self gradientRamp; autoGradient: MenuMorph gradientMenu; borderWidth: 0. self fillDockingBar: dockingBar. self labelIfNeeded: dockingBar. ^ dockingBar! Item was added: + ----- Method: TheWorldMainDockingBar>>fontToUse (in category 'private') ----- + fontToUse + + ^ self userInterfaceTheme font ifNil: [TextStyle defaultFont]! Item was changed: ----- Method: TheWorldMainDockingBar>>squeakMenuOn: (in category 'construction') ----- squeakMenuOn: aDockingBar "Private - fill the given docking bar" aDockingBar addItem: [ :item | item contents: ''; + icon: (MenuIcons squeakLogoIconColorized: + (self userInterfaceTheme logoColor ifNil: [Color black])); + selectedIcon: (MenuIcons squeakLogoIconColorized: + (self userInterfaceTheme selectionLogoColor ifNil: [Color white])); - icon: MenuIcons squeakLogoIcon; - selectedIcon: MenuIcons squeakLogoInvertedIcon; addSubMenu: [ :menu | self aboutMenuItemOn: menu; updateMenuItemOn: menu. menu addLine. self saveMenuItemOn: menu; saveAsMenuItemOn: menu; saveAsNewVersionMenuItemOn: menu. menu addLine. self saveAndQuitMenuItemOn: menu; quitMenuItemOn: menu ] ]! Item was added: + (PackageInfo named: 'Morphic') postscript: 'MenuIcons initializeIcons. + TheWorldMainDockingBar updateInstances.'! From commits at source.squeak.org Sun Jul 31 09:02:37 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 09:02:40 2016 Subject: [squeak-dev] The Trunk: 51Deprecated-mt.37.mcz Message-ID: Marcel Taeumel uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-mt.37.mcz ==================== Summary ==================== Name: 51Deprecated-mt.37 Author: mt Time: 31 July 2016, 11:02:27.47649 am UUID: 7a39db3d-68a6-8545-a4b4-ec7c35d1edf9 Ancestors: 51Deprecated-mt.36 *** Widget Refactorings and UI Themes (Part 4 of 11) *** Some fixes and refactorings in menus and docking bars. Prepare both for UI themeing. =============== Diff against 51Deprecated-mt.36 =============== Item was added: + ----- Method: MenuMorph class>>menuBorderColor (in category '*51Deprecated') ----- + menuBorderColor + + self deprecated: 'mt: Use UI themes.'. + ^ (UserInterfaceTheme current get: #borderColor for: self) ifNil: [(Color r: 0.2 g: 0.3 b: 0.9)]! Item was added: + ----- Method: MenuMorph class>>menuBorderWidth (in category '*51Deprecated') ----- + menuBorderWidth + + self deprecated: 'mt: Use UI themes.'. + ^ (UserInterfaceTheme current get: #borderWidth for: self) ifNil: [2]! Item was added: + ----- Method: MenuMorph class>>menuColor (in category '*51Deprecated') ----- + menuColor + + self deprecated: 'mt: Use UI themes.'. + ^ (UserInterfaceTheme current get: #color for: self) ifNil: [(Color r: 0.9 g: 0.9 b: 0.9)]! Item was added: + ----- Method: MenuMorph class>>menuLineColor (in category '*51Deprecated') ----- + menuLineColor + + self deprecated: 'mt: Use UI themes.'. + ^ (UserInterfaceTheme current get: #lineColor for: self) ifNil: [(Color r: 0.6 g: 0.7 b: 1)]! Item was added: + ----- Method: MenuMorph class>>menuSelectionColor (in category '*51Deprecated') ----- + menuSelectionColor + + self deprecated: 'mt: Use UI themes.'. + ^ (UserInterfaceTheme current get: #selectionColor for: MenuItemMorph) ifNil: [(Color r: 0.4 g: 0.5 b: 0.7)]! Item was added: + ----- Method: MenuMorph class>>menuTitleBorderColor (in category '*51Deprecated') ----- + menuTitleBorderColor + + self deprecated: 'mt: Use UI themes.'. + ^ (UserInterfaceTheme current get: #titleBorderColor for: self) ifNil: [(Color r: 0.6 g: 0.7 b: 1)]! Item was added: + ----- Method: MenuMorph class>>menuTitleBorderWidth (in category '*51Deprecated') ----- + menuTitleBorderWidth + + self deprecated: 'mt: Use UI themes.'. + ^ (UserInterfaceTheme current get: #titleBorderWidth for: self) ifNil: [0]! Item was added: + ----- Method: MenuMorph class>>menuTitleColor (in category '*51Deprecated') ----- + menuTitleColor + + self deprecated: 'mt: Use UI themes.'. + ^ (UserInterfaceTheme current get: #titleColor for: self) ifNil: [ Color transparent]! From commits at source.squeak.org Sun Jul 31 09:09:56 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 09:09:58 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1211.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1211.mcz ==================== Summary ==================== Name: Morphic-mt.1211 Author: mt Time: 31 July 2016, 11:09:16.28949 am UUID: ea98f52e-1be2-e946-947b-465339d1c150 Ancestors: Morphic-mt.1210 *** Widget Refactorings and UI Themes (Part 5 of 11) *** Some fixes and refactorings for dialogs including added support for UI theming. =============== Diff against Morphic-mt.1210 =============== Item was added: + Morph subclass: #DialogWindow + instanceVariableNames: 'titleMorph messageMorph paneMorph buttonRow result selectedButton cancelButton timeout preferredPosition keyMap exclusive' + classVariableNames: 'GradientDialog RoundedDialogCorners UseWiggleAnimation' + poolDictionaries: '' + category: 'Morphic-Windows'! + + !DialogWindow commentStamp: '' prior: 0! + A DialogBoxMorph is Morph used in simple yes/no/confirm dialogs. Strongly modal.! Item was added: + ----- Method: DialogWindow class>>gradientDialog (in category 'preferences') ----- + gradientDialog + + + ^ GradientDialog ifNil: [true] + ! Item was added: + ----- Method: DialogWindow class>>gradientDialog: (in category 'preferences') ----- + gradientDialog: aBoolean + + aBoolean = GradientDialog ifTrue: [^ self]. + GradientDialog := aBoolean. + self refreshAllDialogs.! Item was added: + ----- Method: DialogWindow class>>refreshAllDialogs (in category 'preferences') ----- + refreshAllDialogs + + self allSubInstances do: [:instance | instance setDefaultParameters; setTitleParameters].! Item was added: + ----- Method: DialogWindow class>>roundedDialogCorners (in category 'preferences') ----- + roundedDialogCorners + + ^ RoundedDialogCorners ifNil: [ true ]! Item was added: + ----- Method: DialogWindow class>>roundedDialogCorners: (in category 'preferences') ----- + roundedDialogCorners: aBoolean + + RoundedDialogCorners = aBoolean ifTrue: [^ self]. + RoundedDialogCorners := aBoolean. + self refreshAllDialogs.! Item was added: + ----- Method: DialogWindow class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ super themeProperties, { + { #borderColor. 'Colors'. 'Color of the dialogs''s border.' }. + { #borderWidth. 'Borders'. 'Width of the dialogs''s border.' }. + { #borderStyle. 'Borders'. 'Whether to use a plain border, inset, or outset.' }. + { #color. 'Colors'. 'Background color of the dialog.' }. + { #font. 'Fonts'. 'Font for dialog messages.' }. + { #textColor. 'Colors'. 'Color for dialog messages.' }. + + { #titleBorderColor. 'Colors'. 'Color of the dialogs title border.' }. + { #titleBorderWidth. 'Geometry'. 'Width of the dialog title border.' }. + { #titleBorderStyle. 'Borders'. 'Whether to use a plain border, inset, or outset for the title.' }. + { #titleColor. 'Colors'. 'Background color of the dialogs'' title.' }. + { #titleFont. 'Fonts'. 'Font for dialog title.' }. + { #titleTextColor. 'Colors'. 'Color for the dialog title label.' }. + + { #okColor. 'Colors'. 'Color for the OK button.' }. + { #cancelColor. 'Colors'. 'Color for the Cancel button.' }. + { #buttonColor. 'Colors'. 'Color for a normal button.' }. + { #selectionModifier. 'Colors'. 'How to convert the color of a selected button?' }. + }! Item was added: + ----- Method: DialogWindow class>>useWiggleAnimation (in category 'preferences') ----- + useWiggleAnimation + + + ^ UseWiggleAnimation ifNil: [true]! Item was added: + ----- Method: DialogWindow class>>useWiggleAnimation: (in category 'preferences') ----- + useWiggleAnimation: aBoolean + + UseWiggleAnimation := aBoolean.! Item was added: + ----- Method: DialogWindow>>addPaneMorph: (in category 'constructing') ----- + addPaneMorph: aMorph + + self paneMorph addMorphBack: aMorph.! Item was added: + ----- Method: DialogWindow>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + + super applyUserInterfaceTheme. + + self + setDefaultParameters; + setTitleParameters; + setMessageParameters. + + "Update all buttons." + selectedButton in: [:sb | + self buttons do: [:ea | + ea setProperty: #normalColor toValue: self defaultButtonColor. + self deselectButton: ea]. + sb ifNotNil: [self selectButton: sb]].! Item was added: + ----- Method: DialogWindow>>buttonRowMorph (in category 'accessing - ui') ----- + buttonRowMorph + ^ buttonRow! Item was added: + ----- Method: DialogWindow>>buttons (in category 'accessing - ui') ----- + buttons + + ^buttonRow submorphs! Item was added: + ----- Method: DialogWindow>>cancelButton (in category 'accessing - ui') ----- + cancelButton + ^ cancelButton! Item was added: + ----- Method: DialogWindow>>cancelDialog (in category 'running') ----- + cancelDialog + + self cancelButton + ifNil: [self closeDialog: nil] + ifNotNil: [:btn | btn performAction]. ! Item was added: + ----- Method: DialogWindow>>closeDialog (in category 'running') ----- + closeDialog + + self selectedButton + ifNil: [self closeDialog: nil] + ifNotNil: [:btn | btn performAction]. ! Item was added: + ----- Method: DialogWindow>>closeDialog: (in category 'running') ----- + closeDialog: returnValue + result := returnValue. + self delete.! Item was added: + ----- Method: DialogWindow>>createAcceptButton (in category 'constructing') ----- + createAcceptButton + + ^ self + createButton: 'Accept' translated + value: true + color: (self userInterfaceTheme okColor ifNil: [Color r: 0.49 g: 0.749 b: 0.49])! Item was added: + ----- Method: DialogWindow>>createBody (in category 'initialization') ----- + createBody + + | body | + body := Morph new + changeTableLayout; + hResizing: #shrinkWrap; + vResizing: #shrinkWrap; + listDirection: #topToBottom; + cellPositioning: #leftCenter; + layoutInset: (10@5 corner: 10@10); + cellInset: 5; + color: Color transparent; + yourself. + body addAllMorphs: {self createMessage: ''. self createPane. self createButtonRow}. + self addMorphBack: body.! Item was added: + ----- Method: DialogWindow>>createButton: (in category 'constructing') ----- + createButton: buttonLabel + + ^ self + createButton: buttonLabel + value: self buttonRow submorphs size + 1 + color: self defaultButtonColor! Item was added: + ----- Method: DialogWindow>>createButton:value: (in category 'constructing') ----- + createButton: buttonLabel value: buttonValue + + ^ self + createButton: buttonLabel + value: buttonValue + color: self defaultButtonColor! Item was added: + ----- Method: DialogWindow>>createButton:value:color: (in category 'constructing') ----- + createButton: buttonLabel value: buttonValue color: buttonColor + + | button | + button := PluggableButtonMorphPlus new + label: buttonLabel ; + action: [ self closeDialog: buttonValue ] ; + setProperty: #normalColor toValue: buttonColor ; + setProperty: #normalLabel toValue: buttonLabel ; + hResizing: #rigid; + vResizing: #rigid; + yourself. + + self deselectButton: button. + buttonRow addMorphBack: button. + self updateButtonExtent. + + ^ button! Item was added: + ----- Method: DialogWindow>>createButtonRow (in category 'initialization') ----- + createButtonRow + + ^ buttonRow := Morph new + color: Color transparent; + changeTableLayout; + vResizing: #shrinkWrap; + hResizing: #spaceFill; + listDirection: #leftToRight; + listCentering: #center; + cellInset: 5; + yourself! Item was added: + ----- Method: DialogWindow>>createCancelButton (in category 'constructing') ----- + createCancelButton + + ^ cancelButton := self + createButton: 'Cancel' translated + value: false + color: (self userInterfaceTheme cancelColor ifNil: [Color r: 1 g: 0.6 b: 0.588])! Item was added: + ----- Method: DialogWindow>>createCancelButton:value: (in category 'constructing') ----- + createCancelButton: label value: result + + ^ cancelButton := self + createButton: label + value: result! Item was added: + ----- Method: DialogWindow>>createMessage: (in category 'initialization') ----- + createMessage: aString + + messageMorph := aString asText asMorph lock. + self setMessageParameters. + ^ messageMorph! Item was added: + ----- Method: DialogWindow>>createPane (in category 'initialization') ----- + createPane + + ^ paneMorph := BorderedMorph new + changeProportionalLayout; + hResizing: #rigid; + vResizing: #rigid; + layoutInset: 0; + color: Color transparent; + borderWidth: 0; + yourself.! Item was added: + ----- Method: DialogWindow>>createTitle: (in category 'initialization') ----- + createTitle: aString + "Mimick behavior of MenuMorph title creation." + + | box closeButton menuButton | + box := Morph new + name: #title; + changeTableLayout; + listDirection: #leftToRight; + listCentering: #justified; + yourself. + + titleMorph := aString asText asMorph lock. + + closeButton := SystemWindowButton new + color: Color transparent; + target: self; + extent: 12@12; + actionSelector: #cancelDialog; + balloonText: 'Cancel this dialog' translated; + borderWidth: 0; + labelGraphic: SystemWindow closeBoxImage; + extent: SystemWindow closeBoxImage extent; + yourself. + + menuButton := SystemWindowButton new + color: Color transparent; + target: self; + actionSelector: #offerDialogMenu; + balloonText: 'Dialog menu' translated; + borderWidth: 0; + labelGraphic: SystemWindow menuBoxImage; + extent: SystemWindow menuBoxImage extent; + yourself. + + box addAllMorphs: {closeButton. titleMorph. menuButton}. + + self addMorphBack: box. + self setTitleParameters. + ! Item was added: + ----- Method: DialogWindow>>defaultButtonColor (in category 'accessing') ----- + defaultButtonColor + + ^ self userInterfaceTheme buttonColor ifNil: [(Color r: 0.658 g: 0.678 b: 0.78) twiceLighter]! Item was added: + ----- Method: DialogWindow>>deselectButton: (in category 'selection') ----- + deselectButton: aButton + + aButton ifNil: [^ self]. + aButton offColor: (aButton valueOfProperty: #normalColor). + aButton == selectedButton ifTrue: [selectedButton := nil].! Item was added: + ----- Method: DialogWindow>>drawOverlayOn: (in category 'drawing') ----- + drawOverlayOn: aCanvas + + | title inset | + super drawOverlayOn: aCanvas. + + title := self submorphs first. + + self wantsRoundedCorners ifTrue: [ + inset := (self class roundedDialogCorners and: [self class gradientDialog]) + "This check compensates a bug in balloon." + ifTrue: [0@0 corner: 0@ -1] ifFalse: [self borderWidth @ 0]. + + "Overdraw lower part of title bar to hide bottom corners." + aCanvas + fillRectangle:( (title bottomLeft - (0 @ self submorphs first cornerRadius) corner: title bottomRight) insetBy: inset) + color: self color]. + + "Draw a line between the title and the contents." + self borderWidth > 0 ifTrue: [ + "Redraw the border all around. Needed because rounded borders do not align very well." + self wantsRoundedCorners + ifTrue: [ aCanvas frameRoundRect: self bounds radius: self cornerRadius width: self borderStyle width color: self borderStyle color] + ifFalse: [aCanvas frameRectangle: self bounds width: self borderStyle width color: self borderStyle color]].! Item was added: + ----- Method: DialogWindow>>ensureSelectedButton (in category 'selection') ----- + ensureSelectedButton + + self selectedButton ifNil: [self selectButton: self buttons first].! Item was added: + ----- Method: DialogWindow>>exclusive (in category 'accessing') ----- + exclusive + + ^ exclusive! Item was added: + ----- Method: DialogWindow>>exclusive: (in category 'accessing') ----- + exclusive: aBoolean + + exclusive := aBoolean. + + exclusive + ifTrue: [self activeHand newMouseFocus: self] + ifFalse: [self activeHand releaseMouseFocus: self].! Item was added: + ----- Method: DialogWindow>>exploreInvocation (in category 'running') ----- + exploreInvocation + + | result context | + self exclusive: false. "We want to explore." + + result := OrderedCollection new. + context := thisContext. + + [context method selector = #getUserResponse] + whileFalse: [context := context sender]. + + [context sender] whileNotNil: [ + result add: context method. + context := context sender]. + result add: context method. + + result explore.! Item was added: + ----- Method: DialogWindow>>flash (in category 'running') ----- + flash + "Flash me" + Beeper beepPrimitive. + + self class useWiggleAnimation ifTrue: [ + #(-2 4 -6 8 -4) do: [:i | + self left: self left + i. + self refreshWorld. + ] separatedBy: [(Delay forMilliseconds: 50) wait] + ] ifFalse: [ + 1 to: 2 do:[:i| + self color: Color black. + self world doOneCycleNow. + (Delay forMilliseconds: 50) wait. + self color: Color white. + self world doOneCycleNow. + (Delay forMilliseconds: 50) wait] ]! Item was added: + ----- Method: DialogWindow>>getUserResponse (in category 'running') ----- + getUserResponse + + | hand world | + (ProvideAnswerNotification signal: self title asString) ifNotNil: [:answer| ^ answer]. + + self message ifEmpty: [messageMorph delete]. "Do not waste space." + self paneMorph submorphs ifEmpty: [self paneMorph delete]. "Do not waste space." + + hand := self currentHand. + world := self currentWorld. + + self fullBounds. + self center: preferredPosition. + self bounds: (self bounds translatedToBeWithin: world bounds). + self openInWorld: world. + + hand keyboardFocus in: [:priorKeyboardFocus | + hand mouseFocus in: [:priorMouseFocus | + self exclusive ifTrue: [hand newMouseFocus: self]. + hand newKeyboardFocus: self. + + [self isInWorld] whileTrue:[world doOneSubCycle]. + + hand newKeyboardFocus: priorKeyboardFocus. + self exclusive ifTrue: [ + hand newMouseFocus: priorMouseFocus]]]. + + ^ result! Item was added: + ----- Method: DialogWindow>>getUserResponseAfter: (in category 'running') ----- + getUserResponseAfter: seconds + + timeout := seconds + 1. + + self ensureSelectedButton. + self step. + self updateButtonExtent. + + ^ self getUserResponse! Item was added: + ----- Method: DialogWindow>>getUserResponseAtHand (in category 'running') ----- + getUserResponseAtHand + + ^ self getUserResponseAtHand: ActiveHand! Item was added: + ----- Method: DialogWindow>>getUserResponseAtHand: (in category 'running') ----- + getUserResponseAtHand: aHand + + self message ifEmpty: [messageMorph delete]. "Do not waste space." + self paneMorph submorphs ifEmpty: [self paneMorph delete]. "Do not waste space." + + self moveSelectedButtonToHand: aHand. + ^ self getUserResponse! Item was added: + ----- Method: DialogWindow>>handleMouseUp: (in category 'events') ----- + handleMouseUp: event + + super handleMouseUp: event. + self exclusive ifTrue: [event hand newMouseFocus: self].! Item was added: + ----- Method: DialogWindow>>handlesKeyboard: (in category 'events') ----- + handlesKeyboard: evt + + ^true! Item was added: + ----- Method: DialogWindow>>handlesMouseDown: (in category 'events') ----- + handlesMouseDown: evt + + ^ true! Item was added: + ----- Method: DialogWindow>>initialExtent (in category 'initialization') ----- + initialExtent + + ^ 200@150! Item was added: + ----- Method: DialogWindow>>initialize (in category 'initialization') ----- + initialize + + super initialize. + + self + changeTableLayout; + listDirection: #topToBottom; + hResizing: #shrinkWrap; + vResizing: #shrinkWrap; + setProperty: #indicateKeyboardFocus toValue: #never. + + self createTitle: 'Dialog'. + self createBody. + + self setDefaultParameters. + + keyMap := Dictionary new. + exclusive := true. + preferredPosition := ActiveWorld center.! Item was added: + ----- Method: DialogWindow>>justDroppedInto:event: (in category 'dropping/grabbing') ----- + justDroppedInto: aMorph event: event + + "Restore drop shadow if necessary." + self hasDropShadow: Preferences menuAppearance3d. + + self exclusive ifTrue: [ + "aggressively preserve focus" + event hand newMouseFocus: self].! Item was added: + ----- Method: DialogWindow>>keyStroke: (in category 'events') ----- + keyStroke: evt + | char | + self stopAutoTrigger. + char := evt keyCharacter. + + char = Character escape ifTrue: [ ^ self cancelDialog ]. + (char = Character cr or: [char = Character enter]) ifTrue: [ ^ self closeDialog ]. + + ((char = Character arrowLeft or: [char = Character arrowUp]) + or: [ evt shiftPressed and: [ char = Character tab ] ]) + ifTrue: [ ^ self selectPreviousButton ]. + ((char = Character arrowRight or: [char = Character arrowDown]) + or: [ char = Character tab ]) + ifTrue: [ ^ self selectNextButton ]. + + keyMap + at: char asLowercase + ifPresent: [ : foundButton | foundButton performAction ] + ifAbsent: [ "do nothing" ].! Item was added: + ----- Method: DialogWindow>>message (in category 'accessing') ----- + message + ^messageMorph contents! Item was added: + ----- Method: DialogWindow>>message: (in category 'accessing') ----- + message: aStringOrText + + messageMorph contents: aStringOrText. + self setMessageParameters.! Item was added: + ----- Method: DialogWindow>>messageMorph (in category 'accessing - ui') ----- + messageMorph + ^ messageMorph! Item was added: + ----- Method: DialogWindow>>mouseDown: (in category 'events') ----- + mouseDown: event + + self stopAutoTrigger. + + "Always bring me to the front since I am modal" + self comeToFront. + + (self containsPoint: event position) + ifFalse:[^ self flash]. + + event hand + waitForClicksOrDrag: self + event: event + selectors: { nil. nil. nil. #startDrag: } + threshold: HandMorph dragThreshold.! Item was added: + ----- Method: DialogWindow>>mouseUp: (in category 'events') ----- + mouseUp: event + self stopAutoTrigger. + ! Item was added: + ----- Method: DialogWindow>>moveSelectedButtonToHand: (in category 'position') ----- + moveSelectedButtonToHand: aHand + "Just let the user confirm the selected button without having to reposition the mouse." + + self ensureSelectedButton. + self moveTo: self fullBounds center + (aHand position - self selectedButton center).! Item was added: + ----- Method: DialogWindow>>moveTo: (in category 'position') ----- + moveTo: position + + preferredPosition := position.! Item was added: + ----- Method: DialogWindow>>moveToHand (in category 'position') ----- + moveToHand + + self moveToHand: self activeHand.! Item was added: + ----- Method: DialogWindow>>moveToHand: (in category 'position') ----- + moveToHand: aHand + + self moveTo: aHand position.! Item was added: + ----- Method: DialogWindow>>offerDialogMenu (in category 'running') ----- + offerDialogMenu + + | menu | + menu := MenuMorph new defaultTarget: self. + menu + add: (exclusive == true ifTrue: [''] ifFalse: ['']), 'be modally exclusive' translated + action: #toggleExclusive; + addLine; + add: 'explore dialog invocation' translated + action: #exploreInvocation. + + menu popUpEvent: self currentEvent in: self world. + + [menu isInWorld] whileTrue: [self world doOneSubCycle]. + self exclusive ifTrue: [self activeHand newMouseFocus: self].! Item was added: + ----- Method: DialogWindow>>paneMorph (in category 'accessing - ui') ----- + paneMorph + ^ paneMorph! Item was added: + ----- Method: DialogWindow>>processFocusEvent:using: (in category 'events') ----- + processFocusEvent: evt using: dispatcher + + ^ dispatcher dispatchFocusEventFully: evt with: self! Item was added: + ----- Method: DialogWindow>>registerKeyboardShortcutFor: (in category 'constructing') ----- + registerKeyboardShortcutFor: button + "Take the first alpha-numeric character that is not already used as a shortcut, and use it as a shortcut." + + (button valueOfProperty: #normalLabel) asString in: [:normalLabel | normalLabel do: [:char | + char isAlphaNumeric ifTrue: [ keyMap + at: char asLowercase + ifPresent: [] + ifAbsent: [ + button label: ('{1} ({2})' format: {normalLabel. char}). + ^ keyMap at: char asLowercase put: button ] ] ] ]! Item was added: + ----- Method: DialogWindow>>registerKeyboardShortcuts (in category 'constructing') ----- + registerKeyboardShortcuts + + self buttons do: [:ea | self registerKeyboardShortcutFor: ea].! Item was added: + ----- Method: DialogWindow>>selectButton: (in category 'selection') ----- + selectButton: aButton + + | buttonColor | + buttonColor := ((self userInterfaceTheme selectionModifier ifNil: [ [:c | c muchLighter] ]) value: (aButton valueOfProperty: #normalColor)). + self deselectButton: selectedButton. + aButton offColor: buttonColor. + selectedButton := aButton.! Item was added: + ----- Method: DialogWindow>>selectNextButton (in category 'selection') ----- + selectNextButton + + self selectedButton ifNil: [^ self]. + self selectedButtonIndex: self selectedButtonIndex \\ self buttons size + 1.! Item was added: + ----- Method: DialogWindow>>selectPreviousButton (in category 'selection') ----- + selectPreviousButton + + self selectedButton ifNil: [^ self]. + self selectedButtonIndex: self selectedButtonIndex - 2 \\ self buttons size + 1.! Item was added: + ----- Method: DialogWindow>>selectedButton (in category 'accessing') ----- + selectedButton + ^ selectedButton! Item was added: + ----- Method: DialogWindow>>selectedButton: (in category 'accessing') ----- + selectedButton: aButton + + aButton + ifNil: [self deselectButton: self selectedButton] + ifNotNil: [self selectButton: aButton].! Item was added: + ----- Method: DialogWindow>>selectedButtonIndex (in category 'accessing') ----- + selectedButtonIndex + + ^ self selectedButton + ifNil: [0] + ifNotNil: [:btn | self buttons indexOf: btn]! Item was added: + ----- Method: DialogWindow>>selectedButtonIndex: (in category 'accessing') ----- + selectedButtonIndex: anInteger + + anInteger = 0 ifTrue: [^ self selectedButton: nil]. + self selectedButton: (self buttons at: anInteger).! Item was added: + ----- Method: DialogWindow>>setDefaultParameters (in category 'initialization') ----- + setDefaultParameters + "change the receiver's appareance parameters" + + self + color: (self userInterfaceTheme color ifNil: [Color white]); + borderStyle: (self userInterfaceTheme borderStyle ifNil: [BorderStyle default]); + borderColor: (self userInterfaceTheme borderColor ifNil: [Color gray]); + borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]); + layoutInset: ((self class roundedDialogCorners and: [self class gradientDialog]) + "This check compensates a bug in balloon." + ifTrue: [0] ifFalse: [self borderWidth negated asPoint]). + + Preferences menuAppearance3d ifTrue: [self addDropShadow].! Item was added: + ----- Method: DialogWindow>>setMessageParameters (in category 'initialization') ----- + setMessageParameters + + messageMorph ifNotNil: [ + | fontToUse colorToUse | + fontToUse := self userInterfaceTheme font ifNil: [TextStyle defaultFont]. + colorToUse := self userInterfaceTheme textColor ifNil: [Color black]. + + messageMorph contents + addAttribute: (TextFontReference toFont: fontToUse); + addAttribute: (TextColor color: colorToUse). + messageMorph releaseParagraph; changed].! Item was added: + ----- Method: DialogWindow>>setTitleParameters (in category 'initialization') ----- + setTitleParameters + + (self submorphNamed: #title) ifNotNil: [:title | + title + fillStyle: (self class gradientDialog + ifFalse: [SolidFillStyle color: (self userInterfaceTheme titleColor ifNil: [Color r: 0.658 g: 0.678 b: 0.78])] + ifTrue: [self titleGradientFor: title from: (self userInterfaceTheme titleColor ifNil: [Color r: 0.658 g: 0.678 b: 0.78])]); + borderStyle: (self userInterfaceTheme titleBorderStyle ifNil: [BorderStyle default]); + borderColor: (self userInterfaceTheme titleBorderColor ifNil: [Color r: 0.6 g: 0.7 b: 1]); + borderWidth: (self userInterfaceTheme titleBorderWidth ifNil: [0]); + cornerStyle: (self wantsRoundedCorners ifTrue: [#rounded] ifFalse: [#square]); + vResizing: #shrinkWrap; + hResizing: #spaceFill; + wrapCentering: #center; + cellPositioning: #center; + cellInset: 0; + layoutInset: (5@3 corner: 5@ (2+(self wantsRoundedCorners ifFalse: [0] ifTrue: [self cornerRadius])))]. + + titleMorph ifNotNil: [ + | fontToUse colorToUse | + fontToUse := self userInterfaceTheme titleFont ifNil: [TextStyle defaultFont]. + colorToUse := self userInterfaceTheme titleTextColor ifNil: [Color black]. + + titleMorph contents + addAttribute: (TextFontReference toFont: fontToUse); + addAttribute: (TextColor color: colorToUse). + titleMorph releaseParagraph; changed].! Item was added: + ----- Method: DialogWindow>>startDrag: (in category 'dropping/grabbing') ----- + startDrag: event + + self hasDropShadow: false. + event hand grabMorph: self.! Item was added: + ----- Method: DialogWindow>>step (in category 'stepping and presenter') ----- + step + timeout ifNil: [^self]. + timeout = 0 + ifTrue: [ + self stopStepping. + selectedButton performAction] + ifFalse: [ + selectedButton label: ('{1} ({2})' format: { + selectedButton valueOfProperty: #normalLabel. + timeout}). + timeout := timeout - 1]! Item was added: + ----- Method: DialogWindow>>stepTime (in category 'stepping and presenter') ----- + stepTime + ^1000! Item was added: + ----- Method: DialogWindow>>stopAutoTrigger (in category 'stepping and presenter') ----- + stopAutoTrigger + timeout ifNil: [^self]. + timeout := nil. + self stopStepping. + selectedButton label: (selectedButton valueOfProperty: #normalLabel). ! Item was added: + ----- Method: DialogWindow>>title (in category 'accessing') ----- + title + ^titleMorph contents! Item was added: + ----- Method: DialogWindow>>title: (in category 'accessing') ----- + title: aString + + titleMorph contents: aString asText. + self setTitleParameters.! Item was added: + ----- Method: DialogWindow>>titleGradientFor:from: (in category 'initialization') ----- + titleGradientFor: morph from: aColor + + | cc gradient | + cc := aColor. + gradient := GradientFillStyle ramp: { + 0.0 -> Color white. + 0.15 ->(cc mixed: 0.5 with: Color white). + 0.7 -> cc. + }. + gradient origin: morph topLeft. + gradient direction: 0 @ (TextStyle defaultFont height + 10). + ^ gradient! Item was added: + ----- Method: DialogWindow>>toggleExclusive (in category 'running') ----- + toggleExclusive + + self exclusive: self exclusive not.! Item was added: + ----- Method: DialogWindow>>update: (in category 'updating') ----- + update: aspect + + aspect == #buttons + ifTrue: [self updateButtonExtent]. + + ^ super update: aspect! Item was added: + ----- Method: DialogWindow>>updateButtonExtent (in category 'updating') ----- + updateButtonExtent + + self updateButtonExtent: 20@10.! Item was added: + ----- Method: DialogWindow>>updateButtonExtent: (in category 'updating') ----- + updateButtonExtent: margin + + "Update all button extents." + (buttonRow submorphs collect: [:ea | ea minimumExtent]) max + margin in: [:preferredExtent | + buttonRow submorphsDo: [:ea | ea extent: preferredExtent]]. + + "See if horizontal button layout would be more appropriate." + self flag: #magicNumber. "mt: Remove number with computation, maybe choose button font and 20 characters" + (buttonRow submorphs collect: [:ea | ea fullBounds width]) sum > 400 + ifTrue: [buttonRow + hResizing: #shrinkWrap; + listDirection: #topToBottom; + layoutInset: (buttonRow owner fullBounds width - (buttonRow owner layoutInset left*2) - buttonRow submorphs first fullBounds width // 2@0)] + ifFalse: [buttonRow + hResizing: #spaceFill; + listDirection: #leftToRight; + layoutInset: 0].! Item was added: + ----- Method: DialogWindow>>wantsRoundedCorners (in category 'rounding') ----- + wantsRoundedCorners + + ^ self class roundedDialogCorners or: [super wantsRoundedCorners]! Item was added: + ----- Method: DialogWindow>>wantsToBeDroppedInto: (in category 'dropping/grabbing') ----- + wantsToBeDroppedInto: aMorph + "Return true if it's okay to drop the receiver into aMorph" + ^aMorph isWorldMorph "only into worlds"! Item was changed: + DialogWindow subclass: #FillInTheBlankMorph - RectangleMorph subclass: #FillInTheBlankMorph instanceVariableNames: 'response done textPane responseUponCancel' + classVariableNames: '' - classVariableNames: 'RoundedDialogCorners' poolDictionaries: '' category: 'Morphic-Windows'! Item was changed: ----- Method: FillInTheBlankMorph class>>request:initialAnswer:centerAt:inWorld:onCancelReturn:acceptOnCR:answerExtent: (in category 'instance creation') ----- request: queryString initialAnswer: defaultAnswer centerAt: aPoint inWorld: aWorld onCancelReturn: returnOnCancel acceptOnCR: acceptBoolean answerExtent: answerExtent "Create an instance of me whose question is queryString with the given initial answer. Invoke it centered at the given point, and answer the string the user accepts. If the user cancels, answer returnOnCancel." "FillInTheBlankMorph request: 'Type something, then type CR.' initialAnswer: 'yo ho ho!!' centerAt: Display center" | aFillInTheBlankMorph | aFillInTheBlankMorph := self new setQuery: queryString initialAnswer: defaultAnswer answerExtent: answerExtent acceptOnCR: acceptBoolean. + + aFillInTheBlankMorph createAcceptButton + action: [aFillInTheBlankMorph textPane accept]. + aFillInTheBlankMorph createCancelButton + action: [aFillInTheBlankMorph closeDialog: returnOnCancel]. + + aFillInTheBlankMorph moveTo: aPoint. - aFillInTheBlankMorph responseUponCancel: returnOnCancel. - aWorld addMorph: aFillInTheBlankMorph centeredNear: aPoint. ^ aFillInTheBlankMorph getUserResponse ! Item was changed: ----- Method: FillInTheBlankMorph class>>requestPassword:initialAnswer:centerAt:inWorld:onCancelReturn:acceptOnCR: (in category 'instance creation') ----- requestPassword: queryString initialAnswer: defaultAnswer centerAt: aPoint inWorld: aWorld onCancelReturn: returnOnCancel acceptOnCR: acceptBoolean "Create an instance of me whose question is queryString with the given initial answer. Invoke it centered at the given point, and answer the string the user accepts. If the user cancels, answer returnOnCancel." "FillInTheBlankMorph request: 'Type something, then type CR.' initialAnswer: 'yo ho ho!!' centerAt: Display center" | aFillInTheBlankMorph | aFillInTheBlankMorph := self new setPasswordQuery: queryString initialAnswer: defaultAnswer answerHeight: 50 acceptOnCR: acceptBoolean. + + aFillInTheBlankMorph createAcceptButton + action: [aFillInTheBlankMorph textPane accept]. + aFillInTheBlankMorph createCancelButton + action: [aFillInTheBlankMorph closeDialog: returnOnCancel]. + + aFillInTheBlankMorph moveTo: aPoint. + ^ aFillInTheBlankMorph getUserResponse! - aFillInTheBlankMorph responseUponCancel: returnOnCancel. - aWorld addMorph: aFillInTheBlankMorph centeredNear: aPoint. - ^ aFillInTheBlankMorph getUserResponse - ! Item was removed: - ----- Method: FillInTheBlankMorph class>>roundedDialogCorners (in category 'preferences') ----- - roundedDialogCorners - - ^ RoundedDialogCorners ifNil: [ true ]! Item was removed: - ----- Method: FillInTheBlankMorph class>>roundedDialogCorners: (in category 'preferences') ----- - roundedDialogCorners: aBoolean - - RoundedDialogCorners := aBoolean. - self allInstances do: [:instance | - aBoolean - ifTrue: [instance useRoundedCorners] - ifFalse: [instance useSquareCorners]].! Item was removed: - ----- Method: FillInTheBlankMorph>>accept (in category 'menu') ----- - accept - "Sent by the accept button." - - textPane accept. - ! Item was removed: - ----- Method: FillInTheBlankMorph>>cancel (in category 'menu') ----- - cancel - "Sent by the cancel button." - - response := responseUponCancel. - done := true. - ! Item was removed: - ----- Method: FillInTheBlankMorph>>convertToCurrentVersion:refStream: (in category 'object fileIn') ----- - convertToCurrentVersion: varDict refStream: smartRefStrm - - varDict at: 'responseUponCancel' ifAbsent: [responseUponCancel := '']. - ^super convertToCurrentVersion: varDict refStream: smartRefStrm. - - ! Item was removed: - ----- Method: FillInTheBlankMorph>>createAcceptButton (in category 'initialization') ----- - createAcceptButton - "create the [accept] button" - | result frame | - result := SimpleButtonMorph new target: self; - color: ColorTheme current okColor. - result - borderColor: (Preferences menuAppearance3d - ifTrue: [#raised] - ifFalse: [result color twiceDarker]). - result label: 'Accept(s)' translated; - actionSelector: #accept. - result setNameTo: 'accept'. - frame := LayoutFrame new. - frame rightFraction: 0.5; - rightOffset: -10; - bottomFraction: 1.0; - bottomOffset: -2. - result layoutFrame: frame. - self addMorph: result. - self - updateColor: result - color: result color - intensity: 2. - ^ result! Item was removed: - ----- Method: FillInTheBlankMorph>>createCancelButton (in category 'initialization') ----- - createCancelButton - "create the [cancel] button" - | result frame | - result := SimpleButtonMorph new target: self; - color: ColorTheme current cancelColor. - result - borderColor: (Preferences menuAppearance3d - ifTrue: [#raised] - ifFalse: [result color twiceDarker]). - result label: 'Cancel(l)' translated; - actionSelector: #cancel. - result setNameTo: 'cancel'. - frame := LayoutFrame new. - frame leftFraction: 0.5; - leftOffset: 10; - bottomFraction: 1.0; - bottomOffset: -2. - result layoutFrame: frame. - self addMorph: result. - self - updateColor: result - color: result color - intensity: 2. - ^ result! Item was removed: - ----- Method: FillInTheBlankMorph>>createQueryTextMorph: (in category 'initialization') ----- - createQueryTextMorph: queryString - "create the queryTextMorph" - | result frame | - result := TextMorph new contents: queryString. - result setNameTo: 'query' translated. - result lock. - frame := LayoutFrame new. - frame topFraction: 0.0; - topOffset: 2. - frame leftFraction: 0.5; - leftOffset: (result width // 2) negated. - result layoutFrame: frame. - self addMorph: result. - ^ result! Item was added: + ----- Method: FillInTheBlankMorph>>createTextPaneAcceptOnCR: (in category 'initialization') ----- + createTextPaneAcceptOnCR: acceptBoolean + + textPane := PluggableTextMorph + on: self + text: #response + accept: #response: + readSelection: #selectionInterval + menu: #codePaneMenu:shifted:. + textPane + showScrollBarsOnlyWhenNeeded; + wantsFrameAdornments: false; + hasUnacceptedEdits: true; + acceptOnCR: acceptBoolean; + setNameTo: 'textPane'; + layoutFrame: (LayoutFrame fractions: (0@0 corner: 1@1)); + hResizing: #spaceFill; + vResizing: #spaceFill. + + ^ textPane! Item was removed: - ----- Method: FillInTheBlankMorph>>createTextPaneExtent:acceptBoolean:topOffset:buttonAreaHeight: (in category 'initialization') ----- - createTextPaneExtent: answerExtent acceptBoolean: acceptBoolean topOffset: topOffset buttonAreaHeight: buttonAreaHeight - "create the textPane" - | result frame | - result := PluggableTextMorph - on: self - text: #response - accept: #response: - readSelection: #selectionInterval - menu: #codePaneMenu:shifted:. - result - extent: answerExtent; - showScrollBarsOnlyWhenNeeded; - hResizing: #spaceFill; - vResizing: #spaceFill; - borderWidth: 1; - hasUnacceptedEdits: true; - acceptOnCR: acceptBoolean; - setNameTo: 'textPane'. - frame := LayoutFrame new - leftFraction: 0.0; - rightFraction: 1.0; - topFraction: 0.0; - topOffset: topOffset; - bottomFraction: 1.0; - bottomOffset: buttonAreaHeight negated; - yourself. - result layoutFrame: frame. - self addMorph: result. - ^ result! Item was removed: - ----- Method: FillInTheBlankMorph>>defaultColor (in category 'initialization') ----- - defaultColor - "answer the default color/fill style for the receiver" - ^ Color white! Item was removed: - ----- Method: FillInTheBlankMorph>>delete (in category 'initialization') ----- - delete - - self breakDependents. - super delete.! Item was removed: - ----- Method: FillInTheBlankMorph>>extent: (in category 'geometry') ----- - extent: aPoint - "change the receiver's extent" - - super extent: aPoint . - self setDefaultParameters. - self updateColor! Item was added: + ----- Method: FillInTheBlankMorph>>filterEvent:for: (in category 'events') ----- + filterEvent: event for: morph + + (event isKeystroke and: [event keyCharacter = Character escape]) + ifTrue: [event ignore. self cancelDialog]. + + ^ event! Item was removed: - ----- Method: FillInTheBlankMorph>>getUserResponse (in category 'invoking') ----- - getUserResponse - "Wait for the user to accept or cancel, and answer the result string. Answers the empty string if the user cancels." - "Details: This is invoked synchronously from the caller. In order to keep processing inputs and updating the screen while waiting for the user to respond, this method has its own version of the World's event loop." - - | w | - w := self world. - w ifNil: [^ response]. - - (ProvideAnswerNotification signal: - (self submorphOfClass: TextMorph) userString) ifNotNil: - [:answer | - self delete. - w doOneCycle. - ^ response := (answer == #default) ifTrue: [response] ifFalse: [answer]]. - - done := false. - w activeHand newKeyboardFocus: textPane. - [done] whileFalse: [w doOneCycle]. - self delete. - w doOneCycle. - ^ response - ! Item was removed: - ----- Method: FillInTheBlankMorph>>handlesMouseDown: (in category 'event handling') ----- - handlesMouseDown: evt - ^true! Item was changed: ----- Method: FillInTheBlankMorph>>initialize (in category 'initialization') ----- initialize super initialize. + self addKeyboardCaptureFilter: self.! - self setDefaultParameters. - self extent: 400 @ 150. - responseUponCancel := ''. - self class roundedDialogCorners ifTrue: [self useRoundedCorners]. - ! Item was removed: - ----- Method: FillInTheBlankMorph>>morphicLayerNumber (in category 'invoking') ----- - morphicLayerNumber - - ^10.6! Item was removed: - ----- Method: FillInTheBlankMorph>>mouseDown: (in category 'event handling') ----- - mouseDown: evt - (self containsPoint: evt position) ifFalse:[^ Beeper beep]. "sent in response to outside modal click" - evt hand grabMorph: self. "allow repositioning"! Item was changed: ----- Method: FillInTheBlankMorph>>response (in category 'accessing') ----- response + ^ result - ^ response ! Item was changed: ----- Method: FillInTheBlankMorph>>response: (in category 'accessing') ----- response: aText "Sent when text pane accepts." + result := aText asString. + self delete. - response := aText asString. - done := true. - ^ true ! Item was removed: - ----- Method: FillInTheBlankMorph>>responseUponCancel: (in category 'initialization') ----- - responseUponCancel: anObject - responseUponCancel := anObject - ! Item was changed: ----- Method: FillInTheBlankMorph>>selectionInterval (in category 'accessing') ----- selectionInterval + ^ 1 to: result size - ^ 1 to: response size ! Item was changed: ----- Method: FillInTheBlankMorph>>setDefaultParameters (in category 'initialization') ----- setDefaultParameters - "change the receiver's appareance parameters" + super setDefaultParameters. + textPane ifNotNil: [:tp | tp borderColor: self borderColor].! - | colorFromMenu worldColor menuColor | - - colorFromMenu := Preferences menuColorFromWorld - and: [Display depth > 4 - and: [(worldColor := self currentWorld color) isColor]]. - - menuColor := colorFromMenu - ifTrue: [worldColor luminance > 0.7 - ifTrue: [worldColor mixed: 0.85 with: Color black] - ifFalse: [worldColor mixed: 0.4 with: Color white]] - ifFalse: [MenuMorph menuColor]. - - self color: menuColor. - self borderWidth: MenuMorph menuBorderWidth. - - Preferences menuAppearance3d ifTrue: [ - self borderStyle: BorderStyle thinGray. - self hasDropShadow: true. - - self useSoftDropShadow - ifFalse: [ - self - shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.666); - shadowOffset: 1 @ 1] - ifTrue: [ - self - shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.01); - shadowOffset: (10@8 corner: 10@12) ] - ] - ifFalse: [ - | menuBorderColor | - menuBorderColor := colorFromMenu - ifTrue: [worldColor muchDarker] - ifFalse: [MenuMorph menuBorderColor]. - self borderColor: menuBorderColor. - ]. - - - self layoutInset: 3. - ! Item was changed: ----- Method: FillInTheBlankMorph>>setPasswordQuery:initialAnswer:answerHeight:acceptOnCR: (in category 'initialization') ----- setPasswordQuery: queryString initialAnswer: initialAnswer answerHeight: answerHeight acceptOnCR: acceptBoolean + - | pane | self setQuery: queryString initialAnswer: initialAnswer answerHeight: answerHeight acceptOnCR: acceptBoolean. + textPane font: (StrikeFont passwordFontSize: 12).! - pane := self submorphNamed: 'textPane'. - pane font: (StrikeFont passwordFontSize: 12).! Item was changed: ----- Method: FillInTheBlankMorph>>setQuery:initialAnswer:answerExtent:acceptOnCR: (in category 'initialization') ----- setQuery: queryString initialAnswer: initialAnswer answerExtent: answerExtent acceptOnCR: acceptBoolean + + | text | + + result := initialAnswer. - | query topOffset accept cancel buttonAreaHeight | - response := initialAnswer. done := false. + + self paneMorph removeAllMorphs. + + self title: 'Input Requested'. + self message: queryString. - self removeAllMorphs. - self layoutPolicy: ProportionalLayout new. - query := self createQueryTextMorph: queryString. - topOffset := query height + 4. - accept := self createAcceptButton. - cancel := self createCancelButton. - buttonAreaHeight := (accept height max: cancel height) - + 7. - textPane := self - createTextPaneExtent: answerExtent - acceptBoolean: acceptBoolean - topOffset: topOffset - buttonAreaHeight: buttonAreaHeight. + text := self createTextPaneAcceptOnCR: acceptBoolean. + self paneMorph addMorphBack: text. + + self paneMorph extent: ((initialAnswer asText asMorph extent + (20@10) max: answerExtent) min: 500@500). + self setDefaultParameters.! - self extent: (((answerExtent max: query extent) - max: (initialAnswer asText asMorph extent)) min: 500@500) + (20@30) + (0 @ (topOffset + buttonAreaHeight))! Item was added: + ----- Method: FillInTheBlankMorph>>textPane (in category 'accessing') ----- + textPane + ^ textPane! Item was removed: - ----- Method: FillInTheBlankMorph>>undoGrabCommand (in category 'grabbing/dropping') ----- - undoGrabCommand - ^nil! Item was removed: - ----- Method: FillInTheBlankMorph>>updateColor (in category 'initialization') ----- - updateColor - "update the recevier's fillStyle" - | textPaneBorderColor | - self - updateColor: self - color: self color - intensity: 1. - textPane isNil - ifTrue: [^ self]. - textPaneBorderColor := self borderColor == #raised - ifTrue: [#inset] - ifFalse: [self borderColor]. - textPane borderColor: textPaneBorderColor! Item was removed: - ----- Method: FillInTheBlankMorph>>updateColor:color:intensity: (in category 'initialization') ----- - updateColor: aMorph color: aColor intensity: anInteger - "update the apareance of aMorph" - | fill | - MenuMorph gradientMenu - ifFalse: [^ self]. - - fill := GradientFillStyle ramp: {0.0 -> Color white. 1 -> aColor}. - fill radial: false; - origin: aMorph topLeft; - direction: 0 @ aMorph height. - aMorph fillStyle: fill! Item was changed: Morph subclass: #NewBalloonMorph instanceVariableNames: 'balloonOwner textMorph maximumWidth orientation hasTail' + classVariableNames: 'UseNewBalloonMorph' - classVariableNames: 'DefaultBalloonTextColor UseNewBalloonMorph' poolDictionaries: '' category: 'Morphic-Widgets'! !NewBalloonMorph commentStamp: 'mt 3/31/2015 10:15' prior: 0! A balloon is a bubble with an optional tail. It contains rich text, which describes something about its balloon-owner.! Item was removed: - ----- Method: NewBalloonMorph class>>defaultBalloonTextColor (in category 'preferences') ----- - defaultBalloonTextColor - - - ^ DefaultBalloonTextColor ifNil: [Color black]! Item was removed: - ----- Method: NewBalloonMorph class>>defaultBalloonTextColor: (in category 'preferences') ----- - defaultBalloonTextColor: color - - DefaultBalloonTextColor := color.! Item was changed: ----- Method: NewBalloonMorph class>>string:for:corner: (in category 'instance creation') ----- string: message for: morph corner: symbol ^ self new - color: morph balloonColor; balloonOwner: morph; setText: message; orientation: symbol; yourself! Item was added: + ----- Method: NewBalloonMorph class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ super themeProperties, { + { #borderColor. 'Colors'. 'Color of the balloon''s border.' }. + { #borderWidth. 'Borders'. 'Width of the balloon''s border.' }. + { #color. 'Colors', 'Color for the balloon background.' }. + { #font. 'Fonts'. 'Font for balloon text if not overridden by text attributes.' }. + { #textColor. 'Colors'. 'Color for the balloon text if not overridden by text attributes.' }. + }! Item was added: + ----- Method: NewBalloonMorph>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + + super applyUserInterfaceTheme. + self setDefaultParameters.! Item was removed: - ----- Method: NewBalloonMorph>>defaultBorderColor (in category 'initialization') ----- - defaultBorderColor - - ^ self defaultColor muchDarker"Color black"! Item was removed: - ----- Method: NewBalloonMorph>>defaultBorderWidth (in category 'initialization') ----- - defaultBorderWidth - - ^ MenuMorph menuBorderWidth! Item was removed: - ----- Method: NewBalloonMorph>>defaultColor (in category 'initialization') ----- - defaultColor - - ^ BalloonMorph balloonColor! Item was changed: ----- Method: NewBalloonMorph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas + self fillStyle isColor + ifFalse: [self fillStyle isGradientFill + ifTrue: [self fillStyle direction: 0 @ self height]]. "Bubble." self wantsRoundedCorners ifTrue: [aCanvas frameAndFillRoundRect: self bubbleBounds radius: self cornerRadius fillStyle: self fillStyle borderWidth: self borderStyle width borderColor: self borderStyle color] ifFalse: [aCanvas fillRectangle: self bubbleBounds fillStyle: self fillStyle borderStyle: self borderStyle]. "Tail." self hasTail ifTrue: [ self verticesForTail in: [:points | | pixelOffset | pixelOffset := points first y < points second y ifFalse: [points first x < points second x ifTrue: [self borderStyle width negated @ self borderStyle width] "bottomLeft" ifFalse: [self borderStyle width @ self borderStyle width]] "bottomRight" ifTrue: [points first x < points second x ifTrue: [self borderStyle width negated @ self borderStyle width negated] "topLeft" ifFalse: [self borderStyle width @ self borderStyle width negated]]. "topRight" aCanvas drawPolygon: points fillStyle: self fillStyle. aCanvas line: points first to: points second + pixelOffset width: self borderStyle width color: self borderStyle color. aCanvas line: points first to: points third + pixelOffset width: self borderStyle width color: self borderStyle color]]! Item was changed: ----- Method: NewBalloonMorph>>initialize (in category 'initialization') ----- initialize super initialize. + self setDefaultParameters. + - self - borderWidth: self defaultBorderWidth; - borderColor: self defaultBorderColor; - color: self defaultColor; - hasDropShadow: (Preferences menuAppearance3d and: [self defaultColor isTranslucent not]); - shadowOffset: 1@1; - shadowColor: (self color muchDarker muchDarker alpha: 0.333); - orientation: #bottomLeft. - - MenuMorph roundedMenuCorners - ifTrue: [self cornerStyle: #rounded]. - textMorph := TextMorph new wrapFlag: false; lock; yourself. self addMorph: textMorph.! Item was added: + ----- Method: NewBalloonMorph>>setDefaultParameters (in category 'initialization') ----- + setDefaultParameters + + self + borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]); + borderColor: (self userInterfaceTheme borderColor ifNil: [Color r: 0.46 g: 0.46 b: 0.353]); + color: (self userInterfaceTheme color ifNil: [Color r: 0.92 g: 0.92 b: 0.706]); + hasDropShadow: (Preferences menuAppearance3d and: [self color isTranslucent not]); + shadowOffset: 1@1; + shadowColor: (self color muchDarker muchDarker alpha: 0.333); + orientation: #bottomLeft. + + MenuMorph roundedMenuCorners + ifTrue: [self cornerStyle: #rounded]. + + "Gradients?" + MenuMorph gradientMenu ifTrue: [ + | cc fill | + cc := self color. + fill := GradientFillStyle ramp: { + 0.0 -> Color white. + 0.15 -> (cc mixed: 0.5 with: Color white). + 0.5 -> cc. + 0.8 -> cc twiceDarker}. + fill + origin: self topLeft; + direction: 0@self height. + self fillStyle: fill].! Item was changed: ----- Method: NewBalloonMorph>>setText: (in category 'initialization') ----- setText: stringOrText | text | text := stringOrText asText. text unembellished ifTrue: [ + text addAttribute: (TextColor color: (self userInterfaceTheme textColor ifNil: [Color black]))]. - text addAttribute: (TextColor color: self class defaultBalloonTextColor)]. + text addAttribute: (TextFontReference toFont: (self userInterfaceTheme font ifNil: [TextStyle defaultFont])). - text addAttribute: (TextFontReference toFont: (self balloonOwner ifNil: [BalloonMorph]) balloonFont). self textMorph wrapFlag: false. self textMorph newContents: text. self textMorph fullBounds. (self maximumWidth > 0 and: [self textMorph width > self maximumWidth]) ifTrue: [ self textMorph wrapFlag: true; width: self maximumWidth]. self updateLayout.! Item was changed: + Morph subclass: #SystemProgressBarMorph + instanceVariableNames: 'barSize barColor' - RectangleMorph subclass: #SystemProgressBarMorph - instanceVariableNames: 'barSize' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Widgets'! !SystemProgressBarMorph commentStamp: 'laza 4/9/2004 11:47' prior: 0! Instances of this morph get used by SystemProgressMoprh to quickly display a progress bar.! Item was added: + ----- Method: SystemProgressBarMorph class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ super themeProperties, { + { #borderColor. 'Colors'. 'Color of the progress bar''s border.' }. + { #borderWidth. 'Borders'. 'Width of the progress bar''s border.' }. + { #borderStyle. 'Borders'. 'Whether to use a plain border, inset, or outset.' }. + { #color. 'Colors'. 'Background color of the progress bar.' }. + { #barColor. 'Colors'. 'Color of the progress bar''s bar.' }. + }! Item was added: + ----- Method: SystemProgressBarMorph>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + + super applyUserInterfaceTheme. + + self setDefaultParameters.! Item was changed: ----- Method: SystemProgressBarMorph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas | area | super drawOn: aCanvas. barSize > 0 ifTrue: [ area := self innerBounds. + area := area origin extent: (barSize min: area extent x)@area extent y. + aCanvas fillRectangle: area color: barColor - area := area origin extent: barSize-2@area extent y. - aCanvas fillRectangle: area color: LazyListMorph listSelectionColor ]. ! Item was changed: ----- Method: SystemProgressBarMorph>>initialize (in category 'initialization') ----- initialize super initialize. + self setDefaultParameters. - self - borderWidth: 0; - color: MenuMorph menuColor muchLighter. - barSize := 0. ! Item was added: + ----- Method: SystemProgressBarMorph>>setDefaultParameters (in category 'initialization') ----- + setDefaultParameters + "change the receiver's appareance parameters" + + self + color: (self userInterfaceTheme color ifNil: [Color r: 0.977 g: 0.977 b: 0.977]); + borderStyle: (self userInterfaceTheme borderStyle ifNil: [BorderStyle default]); + borderColor: (self userInterfaceTheme borderColor ifNil: [Color transparent]); + borderWidth: (self userInterfaceTheme borderWidth ifNil: [0]). + + barColor := self userInterfaceTheme barColor ifNil: [Color r: 0.72 g: 0.72 b: 0.9].! Item was changed: + Morph subclass: #SystemProgressMorph + instanceVariableNames: 'activeSlots bars labels font lock requestedPosition textColor' - RectangleMorph subclass: #SystemProgressMorph - instanceVariableNames: 'activeSlots bars labels font lock requestedPosition' classVariableNames: 'BarHeight BarWidth Inset UniqueInstance' poolDictionaries: '' category: 'Morphic-Widgets'! !SystemProgressMorph commentStamp: '' prior: 0! An single instance of this morph class is used to display progress while the system is busy, eg. while it receives code updates or does a fileIn. To give the user progress information you don't deal directly with SystemProgressMorph. You keep on using the well established way of progress notification, that has been a long time in the system, is widely used and does not depend on the existence of SystemProgressMorph. For more information on this look at the example in this class or look at the comment of the method displayProgressAt:from:to:during: in class String. SystemProgressMorph is not meant to be used as a component inside other morphs. You can switch back to the old style of progress display by disabling the morphicProgressStyle setting in the morphic section of the preferences.! Item was added: + ----- Method: SystemProgressMorph class>>applyUserInterfaceTheme (in category 'preferences') ----- + applyUserInterfaceTheme + + self reset.! Item was added: + ----- Method: SystemProgressMorph class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ super themeProperties, { + { #borderColor. 'Colors'. 'Color of the progress'' border.' }. + { #borderWidth. 'Borders'. 'Width of the progress'' border.' }. + { #borderStyle. 'Borders'. 'Whether to use a plain border, inset, or outset.' }. + { #color. 'Colors'. 'Background color of the progress.' }. + + { #font. 'Fonts'. 'Font for bar labels.' }. + { #textColor. 'Colors'. 'Color for bar labels.' }. + }! Item was added: + ----- Method: SystemProgressMorph>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + + super applyUserInterfaceTheme. + + self setDefaultParameters.! Item was changed: ----- Method: SystemProgressMorph>>font: (in category 'accessing') ----- font: anObject + font := anObject. + self labels select: [:ea | ea notNil] thenDo: [:ea | ea font: font].! - font := anObject! Item was changed: ----- Method: SystemProgressMorph>>initialize (in category 'initialization') ----- initialize super initialize. activeSlots := 0. bars := Array new: 10. labels := Array new: 10. - font := Preferences standardMenuFont. lock := Semaphore forMutualExclusion. self setDefaultParameters; setProperty: #morphicLayerNumber toValue: self morphicLayerNumber; layoutPolicy: TableLayout new; listDirection: #topToBottom; cellPositioning: #leftCenter; cellInset: 5; listCentering: #center; hResizing: #shrinkWrap; vResizing: #shrinkWrap; layoutInset: Inset; minWidth: 150! Item was changed: ----- Method: SystemProgressMorph>>nextSlotFor: (in category 'private') ----- nextSlotFor: shortDescription lock critical: [ | label bar slots | slots := self labels size. self activeSlots = slots ifTrue: [^0]. self activeSlots: self activeSlots + 1. 1 to: slots do: [:index | label := (self labels at: index). label ifNil: [ bar := self bars at: index put: (SystemProgressBarMorph new extent: BarWidth@BarHeight). + label := self labels at: index put: ((StringMorph contents: shortDescription font: self font) color: self textColor). - label := self labels at: index put: (StringMorph contents: shortDescription font: self font). self addMorphBack: label; addMorphBack: bar. ^index]. label owner ifNil: [ bar := self bars at: index. label := self labels at: index. self addMorphBack: (label contents: shortDescription); addMorphBack: (bar barSize: 0). ^index]]] ! Item was changed: ----- Method: SystemProgressMorph>>setDefaultParameters (in category 'initialization') ----- setDefaultParameters "change the receiver's appareance parameters" + self + color: (self userInterfaceTheme color ifNil: [Color r: 0.9 g: 0.9 b: 0.9]); + borderStyle: (self userInterfaceTheme borderStyle ifNil: [BorderStyle default]); + borderColor: (self userInterfaceTheme borderColor ifNil: [Color gray]); + borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]). - | colorFromMenu worldColor menuColor | + Preferences menuAppearance3d ifTrue: [self addDropShadow]. - colorFromMenu := Preferences menuColorFromWorld - and: [Display depth > 4 - and: [(worldColor := self currentWorld color) isColor]]. + self + font: (self userInterfaceTheme font ifNil: [TextStyle defaultFont]); + textColor: (self userInterfaceTheme textColor ifNil: [Color black]). - menuColor := colorFromMenu - ifTrue: [worldColor luminance > 0.7 - ifTrue: [worldColor mixed: 0.85 with: Color black] - ifFalse: [worldColor mixed: 0.4 with: Color white]] - ifFalse: [MenuMorph menuColor]. - self color: menuColor. - - MenuMorph roundedMenuCorners - ifTrue: [self useRoundedCorners]. - self borderWidth: MenuMorph menuBorderWidth. - - Preferences menuAppearance3d ifTrue: [ - self borderStyle: BorderStyle thinGray. - self hasDropShadow: true. - - self useSoftDropShadow - ifFalse: [ - self - shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.666); - shadowOffset: 1 @ 1] - ifTrue: [ - self - shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.01); - shadowOffset: (10@8 corner: 10@12) ] - ] - ifFalse: [ - | menuBorderColor | - menuBorderColor := colorFromMenu - ifTrue: [worldColor muchDarker] - ifFalse: [MenuMorph menuBorderColor]. - self borderColor: menuBorderColor. - ]. - self updateColor: self color: self color intensity: 1.! Item was added: + ----- Method: SystemProgressMorph>>textColor (in category 'accessing') ----- + textColor + + ^ textColor ifNil: [Color black]! Item was added: + ----- Method: SystemProgressMorph>>textColor: (in category 'accessing') ----- + textColor: aColor + + textColor := aColor. + self labels select: [:ea | ea notNil] thenDo: [:ea | ea color: textColor].! Item was changed: ----- Method: SystemProgressMorph>>updateColor:color:intensity: (in category 'initialization') ----- updateColor: aMorph color: aColor intensity: anInteger "update the apareance of aMorph" + | fill cc | - | fill | MenuMorph gradientMenu ifFalse: [^ self]. + + cc := aColor adjustSaturation: -0.08 brightness: 0.4. + fill := GradientFillStyle ramp: { + 0.0 -> cc. + 0.25 -> (aColor mixed: 0.5 with: cc). + 1.0 -> aColor}. + - fill := GradientFillStyle ramp: {0.0 -> Color white. 1 ->aColor}. fill radial: false; origin: aMorph topLeft; direction: 0 @ aMorph height. aMorph fillStyle: fill! Item was added: + ----- Method: SystemProgressMorph>>wantsRoundedCorners (in category 'rounding') ----- + wantsRoundedCorners + + ^ MenuMorph roundedMenuCorners or: [super wantsRoundedCorners]! Item was changed: + DialogWindow subclass: #UserDialogBoxMorph + instanceVariableNames: '' - AlignmentMorph subclass: #UserDialogBoxMorph - instanceVariableNames: 'titleMorph labelMorph buttonRow value selectedButton cancelButton timeout savedLabel keyMap' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Windows'! !UserDialogBoxMorph commentStamp: 'ar 12/11/2009 22:33' prior: 0! A DialogBoxMorph is Morph used in simple yes/no/confirm dialogs. Strongly modal.! Item was changed: ----- Method: UserDialogBoxMorph class>>confirm: (in category 'utilities') ----- confirm: aString "UserDialogBoxMorph confirm: 'Do you like chocolate?'" + ^self confirm: aString title: 'Please Confirm'! - ^self confirm: aString title: 'Please confirm:'! Item was changed: ----- Method: UserDialogBoxMorph class>>confirm:orCancel:at: (in category 'utilities') ----- confirm: aString orCancel: cancelBlock at: aPointOrNil ^self confirm: aString orCancel: cancelBlock + title: 'Please Confirm' - title: 'Please confirm:' at: aPointOrNil! Item was changed: ----- Method: UserDialogBoxMorph class>>confirm:orCancel:title:at: (in category 'utilities') ----- confirm: aString orCancel: cancelBlock title: titleString at: aPointOrNil + (self new - ^(self new title: titleString; + message: aString; + createButton: 'Yes' translated value: true; + createButton: 'No' translated value: false; + createButton: 'Cancel' translated value: nil; + selectedButtonIndex: 1; "YES" + yourself) in: [:dialog | + ^ (aPointOrNil + ifNil: [dialog getUserResponseAtHand] + ifNotNil: [ + dialog moveTo: aPointOrNil. + dialog getUserResponse]) + ifNil: [ cancelBlock value ]]! - label: aString; - addSelectedButton: 'Yes' translated value: true; - addButton: 'No' translated value: false; - addCancelButton: 'Cancel' translated value: nil; - runModalIn: ActiveWorld forHand: ActiveHand at: aPointOrNil) - ifNil: [ cancelBlock value ]! Item was changed: ----- Method: UserDialogBoxMorph class>>confirm:title:at: (in category 'utilities') ----- confirm: aString title: titleString at: aPointOrNil "UserDialogBoxMorph confirm: 'Make your choice carefully' withCRs title: 'Do you like chocolate?'" ^self new title: titleString; + message: aString; + createButton: 'Yes' translated value: true; + createCancelButton: 'No' translated value: false; + selectedButtonIndex: 1; "YES" + getUserResponseAtHand! - label: aString; - addSelectedButton: 'Yes' translated value: true; - addCancelButton: 'No' translated value: false; - runModalIn: ActiveWorld forHand: ActiveHand at: aPointOrNil! Item was changed: ----- Method: UserDialogBoxMorph class>>confirm:title:trueChoice:falseChoice:at: (in category 'utilities') ----- confirm: aString title: titleString trueChoice: trueChoice falseChoice: falseChoice at: aPointOrNil "UserDialogBoxMorph confirm: 'Make your choice carefully' withCRs title: 'Do you like chocolate?' trueChoice: 'Oh yessir!!' falseChoice: 'Not so much...'" ^self new title: titleString; + message: aString; + createButton: trueChoice translated value: true; + createCancelButton: falseChoice translated value: false; + selectedButtonIndex: 1; + moveTo: (aPointOrNil ifNil: [ActiveWorld center]); + getUserResponse! - label: aString; - addSelectedButton: trueChoice translated value: true; - addCancelButton: falseChoice translated value: false; - runModalIn: ActiveWorld forHand: ActiveHand at: aPointOrNil! Item was changed: ----- Method: UserDialogBoxMorph class>>confirm:title:trueChoice:falseChoice:default:triggerAfter:at: (in category 'utilities') ----- confirm: aString title: titleString trueChoice: trueChoice falseChoice: falseChoice default: default triggerAfter: seconds at: aPointOrNil "UserDialogBoxMorph confirm: 'I like hot java' title: 'What do you say?' trueChoice: 'You bet!!' falseChoice: 'Nope' default: false triggerAfter: 12 at: 121@212" ^self new title: titleString; + message: aString; + createButton: trueChoice translated value: true; + createCancelButton: falseChoice translated value: false; + selectedButtonIndex: (default ifTrue: [1] ifFalse: [2]); + moveTo: (aPointOrNil ifNil: [ActiveWorld center]); + getUserResponseAfter: seconds! - label: aString; - addButton: trueChoice translated value: true selected: default performActionOnEscape: false; - addButton: falseChoice translated value: false selected: default not performActionOnEscape: true; - triggerAfter: seconds; - runModalIn: ActiveWorld forHand: ActiveHand at: aPointOrNil! Item was changed: ----- Method: UserDialogBoxMorph class>>inform: (in category 'utilities') ----- inform: aString "UserDialogBoxMorph inform: 'Squeak is great!!'" + ^self inform: aString title: 'Note' translated! - ^self inform: aString title: 'Note:'! Item was changed: ----- Method: UserDialogBoxMorph class>>inform:title:at: (in category 'utilities') ----- inform: aString title: titleString at: aPointOrNil "UserDialogBoxMorph inform: 'Squeak is great!!' title: 'Will you look at this:'" ^self new title: titleString; + message: aString; + createButton: 'OK' translated value: nil; + getUserResponseAtHand! - label: aString; - addSelectedCancelButton: 'OK' translated value: nil; - runModalIn: ActiveWorld forHand: ActiveHand at: aPointOrNil! Item was removed: - ----- Method: UserDialogBoxMorph>>addButton:value: (in category 'constructing') ----- - addButton: buttonLabel value: buttonValue - - self - addButton: buttonLabel - value: buttonValue - selected: false - performActionOnEscape: false! Item was removed: - ----- Method: UserDialogBoxMorph>>addButton:value:selected:performActionOnEscape: (in category 'constructing') ----- - addButton: buttonLabel value: buttonValue selected: isSelected performActionOnEscape: performActionOnEscape - "Adds a button with the given label and value. - The value is returned if the user presses the button." - | button | - button := PluggableButtonMorphPlus new - label: buttonLabel ; - action: [ self closeDialog: buttonValue ] ; - onColor: self buttonColor twiceLighter - offColor: self buttonColor twiceLighter. - button hResizing: #spaceFill; vResizing: #spaceFill. - isSelected ifTrue: [ self selectButton: button ]. - performActionOnEscape ifTrue: [ self performActionOnEscapeOf: button ]. - self registerKeyFor: button. - buttonRow addMorphBack: button! Item was removed: - ----- Method: UserDialogBoxMorph>>addCancelButton:value: (in category 'constructing') ----- - addCancelButton: buttonLabel value: buttonValue - - self - addButton: buttonLabel - value: buttonValue - selected: false - performActionOnEscape: true! Item was removed: - ----- Method: UserDialogBoxMorph>>addSelectedButton:value: (in category 'constructing') ----- - addSelectedButton: buttonLabel value: buttonValue - - self - addButton: buttonLabel - value: buttonValue - selected: true - performActionOnEscape: false! Item was removed: - ----- Method: UserDialogBoxMorph>>addSelectedCancelButton:value: (in category 'constructing') ----- - addSelectedCancelButton: buttonLabel value: buttonValue - - self - addButton: buttonLabel - value: buttonValue - selected: true - performActionOnEscape: true! Item was removed: - ----- Method: UserDialogBoxMorph>>buttonColor (in category 'initialization') ----- - buttonColor - ^Color r: 0.658 g: 0.678 b: 0.78! Item was removed: - ----- Method: UserDialogBoxMorph>>buttons (in category 'events') ----- - buttons - - ^buttonRow submorphs select: [ :each | - each isKindOf: PluggableButtonMorphPlus ].! Item was removed: - ----- Method: UserDialogBoxMorph>>checkAgainstKeymap: (in category 'events') ----- - checkAgainstKeymap: aCharacter - keyMap - at: aCharacter asLowercase - ifPresent: [ : foundButton | foundButton performAction ] - ifAbsent: [ "do nothing" ]! Item was removed: - ----- Method: UserDialogBoxMorph>>closeDialog: (in category 'running') ----- - closeDialog: returnValue - value := returnValue. - self delete.! Item was removed: - ----- Method: UserDialogBoxMorph>>deselectSelectedButton (in category 'events') ----- - deselectSelectedButton - - selectedButton ifNil: [ ^self ]. - selectedButton - onColor: self buttonColor twiceLighter - offColor: self buttonColor twiceLighter. - selectedButton := nil! Item was removed: - ----- Method: UserDialogBoxMorph>>drawSubmorphsOn: (in category 'drawing') ----- - drawSubmorphsOn: aCanvas - - super drawSubmorphsOn: aCanvas. - - self wantsRoundedCorners ifTrue: [ - "Overdraw lower part of title bar to hide bottom corners." - aCanvas - fillRectangle: (self submorphs first "titleRow" bottomLeft - (-1 @ self submorphs first cornerRadius) - corner: self submorphs first "titleRow" bottomRight - (1@0)) - color: self color].! Item was removed: - ----- Method: UserDialogBoxMorph>>flash (in category 'events') ----- - flash - "Flash me" - 1 to: 2 do:[:i| - self color: Color black. - self world doOneCycleNow. - (Delay forMilliseconds: 50) wait. - self color: Color white. - self world doOneCycleNow. - (Delay forMilliseconds: 50) wait. - ].! Item was removed: - ----- Method: UserDialogBoxMorph>>handlesKeyboard: (in category 'events') ----- - handlesKeyboard: evt - - ^true! Item was removed: - ----- Method: UserDialogBoxMorph>>initialize (in category 'initialization') ----- - initialize - - | titleRow cc | - super initialize. - self color: Color white. - self listDirection: #topToBottom; wrapCentering: #center; - hResizing: #shrinkWrap; vResizing: #shrinkWrap. - self layoutInset: -1 @ -1; cellInset: 5@5. - self borderStyle: BorderStyle thinGray. - self setProperty: #indicateKeyboardFocus: toValue: #never. - - FillInTheBlankMorph roundedDialogCorners - ifTrue: [self useRoundedCorners]. - - self hasDropShadow: Preferences menuAppearance3d. - self useSoftDropShadow - ifFalse: [ - self - shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.666); - shadowOffset: 1 @ 1] - ifTrue: [ - self - shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.01); - shadowOffset: (10@8 corner: 10@12)]. - - cc := Color gray: 0.8. - titleRow := AlignmentMorph newRow. - titleRow hResizing: #spaceFill; vResizing: #shrinkWrap. - - self cornerStyle == #rounded - ifTrue: [titleRow useRoundedCorners]. - - titleRow borderStyle: BorderStyle thinGray. - titleRow layoutInset: (5@5 corner: (2@ (5 + (titleRow cornerStyle == #rounded ifTrue: [titleRow cornerRadius] ifFalse: [0])))). - titleRow color: cc. - titleRow fillStyle: self titleGradient. - - titleMorph := StringMorph new. - titleMorph emphasis: 1. - titleRow addMorph: titleMorph. - labelMorph := TextMorph new. - labelMorph margins: (Preferences standardButtonFont widthOf: $x) * 2 @ 0. - labelMorph lock. - buttonRow := AlignmentMorph newRow - vResizing: #rigid; - height: (Preferences standardButtonFont height + 20); - hResizing: #spaceFill; - layoutInset: - (((Preferences standardButtonFont widthOf: $x) * 2 @ 0) - corner: ((Preferences standardButtonFont widthOf: $x) * 2 @ 10)); - cellInset: (Preferences standardButtonFont widthOf: $x) * 2. - buttonRow color: Color transparent. - self - addMorphBack: titleRow ; - addMorphBack: labelMorph ; - addMorphBack: buttonRow. - keyMap := Dictionary new! Item was removed: - ----- Method: UserDialogBoxMorph>>justDroppedInto:event: (in category 'events') ----- - justDroppedInto: aMorph event: event - - "Restore drop shadow if necessary." - self hasDropShadow: Preferences menuAppearance3d. - - "aggressively preserve focus" - event hand newMouseFocus: self.! Item was removed: - ----- Method: UserDialogBoxMorph>>keyStroke: (in category 'events') ----- - keyStroke: evt - | evtCharacter | - self stopAutoTrigger. - evtCharacter := evt keyCharacter. - evtCharacter = Character escape ifTrue: [ - ^cancelButton ifNotNil: [ cancelButton performAction ] ]. - evtCharacter = Character cr ifTrue: [ - ^selectedButton ifNotNil: [ selectedButton performAction ] ]. - (evtCharacter = Character arrowLeft or: [ - evt shiftPressed and: [ evtCharacter = Character tab ] ]) ifTrue: [ - ^self selectPreviousButton ]. - (evtCharacter = Character arrowRight or: [ - evtCharacter = Character tab ]) ifTrue: [ - ^self selectNextButton ]. - self checkAgainstKeymap: evtCharacter! Item was changed: + ----- Method: UserDialogBoxMorph>>label (in category 'accessing') ----- - ----- Method: UserDialogBoxMorph>>label (in category 'constructing') ----- label + ^ self message! - "The dialog's label (String)" - ^labelMorph contents - ! Item was changed: + ----- Method: UserDialogBoxMorph>>label: (in category 'accessing') ----- - ----- Method: UserDialogBoxMorph>>label: (in category 'constructing') ----- label: aString + self message: aString.! - "The dialog's label (String)" - labelMorph contents: aString. - ! Item was removed: - ----- Method: UserDialogBoxMorph>>mouseDown: (in category 'events') ----- - mouseDown: event - self stopAutoTrigger. - "Always bring me to the front since I am modal" - self comeToFront. - (self containsPoint: event position) ifFalse:[ - Beeper beepPrimitive. - ^self flash]. - - self hasDropShadow: false. - event hand grabMorph: self.! Item was removed: - ----- Method: UserDialogBoxMorph>>mouseUp: (in category 'events') ----- - mouseUp: event - self stopAutoTrigger. - "aggressively preserve focus" - event hand newMouseFocus: self.! Item was removed: - ----- Method: UserDialogBoxMorph>>performActionOnEscapeOf: (in category 'constructing') ----- - performActionOnEscapeOf: aButton - - cancelButton := aButton! Item was removed: - ----- Method: UserDialogBoxMorph>>processFocusEvent:using: (in category 'events') ----- - processFocusEvent: evt using: dispatcher - - ^ dispatcher dispatchFocusEventFully: evt with: self! Item was removed: - ----- Method: UserDialogBoxMorph>>registerKeyFor: (in category 'constructing') ----- - registerKeyFor: button - button label do: - [ : eachChar | eachChar isAlphaNumeric ifTrue: - [ keyMap - at: eachChar asLowercase - ifPresent: [ : found | "It's already taken, don't use it." ] - ifAbsent: - [ ^ keyMap - at: eachChar asLowercase - put: button ] ] ]! Item was removed: - ----- Method: UserDialogBoxMorph>>runModalIn:forHand:at: (in category 'running') ----- - runModalIn: aWorld forHand: aHand at: aPointOrNil - "Ensure that we have a reasonable minimum size" - | oldFocus pos offset | - (ProvideAnswerNotification signal: self label asString) ifNotNil:[:answer| ^answer]. - self openInWorld: aWorld. - pos := aPointOrNil ifNil: [ - "If called after a longer UI operation, be sure to use the current mouse cursor. Hand position is not up-to-date. Do one world cycle does not help if there are currently no mouse events. So, we *have to be* this extreme." - Sensor cursorPoint]. - offset := aPointOrNil - ifNil: [selectedButton fullBounds origin - (selectedButton fullBounds extent // 2 * (-1@1))] - ifNotNil: [self fullBounds extent // 2]. - self setConstrainedPosition: pos - offset hangOut: false. - oldFocus := aHand keyboardFocus. - aHand newMouseFocus: self. - aHand newKeyboardFocus: self. - savedLabel := selectedButton label. - [self isInWorld] whileTrue:[aWorld doOneSubCycle]. - oldFocus ifNotNil:[aHand newKeyboardFocus: oldFocus]. - ^value! Item was removed: - ----- Method: UserDialogBoxMorph>>selectButton: (in category 'events') ----- - selectButton: aButton - - self deselectSelectedButton. - aButton - onColor: Color orange muchLighter - offColor: Color orange muchLighter. - selectedButton := aButton! Item was removed: - ----- Method: UserDialogBoxMorph>>selectNextButton (in category 'events') ----- - selectNextButton - - | buttons | - buttons := self buttons. - self selectButton: (buttons atWrap: (buttons indexOf: selectedButton) + 1)! Item was removed: - ----- Method: UserDialogBoxMorph>>selectPreviousButton (in category 'events') ----- - selectPreviousButton - - | buttons | - buttons := self buttons. - self selectButton: (buttons atWrap: (buttons indexOf: selectedButton) - 1)! Item was removed: - ----- Method: UserDialogBoxMorph>>step (in category 'stepping and presenter') ----- - step - timeout ifNil: [^self]. - timeout = 0 - ifTrue: [ - self stopStepping. - selectedButton performAction] - ifFalse: [ - selectedButton label: savedLabel, '(', timeout printString, ')'. - timeout := timeout - 1]! Item was removed: - ----- Method: UserDialogBoxMorph>>stepTime (in category 'stepping and presenter') ----- - stepTime - ^1000! Item was removed: - ----- Method: UserDialogBoxMorph>>stopAutoTrigger (in category 'stepping and presenter') ----- - stopAutoTrigger - timeout ifNil: [^self]. - timeout := nil. - self stopStepping. - selectedButton label: savedLabel ! Item was removed: - ----- Method: UserDialogBoxMorph>>title (in category 'constructing') ----- - title - ^titleMorph contents! Item was removed: - ----- Method: UserDialogBoxMorph>>title: (in category 'constructing') ----- - title: aString - titleMorph contents: aString! Item was removed: - ----- Method: UserDialogBoxMorph>>titleGradient (in category 'initialization') ----- - titleGradient - - | cc gradient | - SystemWindow gradientWindow - ifFalse: [^ SolidFillStyle color: self buttonColor]. - - cc := self buttonColor. - gradient := GradientFillStyle ramp: { - 0.0 -> Color white. - 0.33 ->(cc mixed: 0.5 with: Color white). - 1.0 -> cc. - }. - gradient origin: 0@0. - gradient direction: 0 @ (TextStyle defaultFont height + 10). - ^gradient! Item was removed: - ----- Method: UserDialogBoxMorph>>triggerAfter: (in category 'constructing') ----- - triggerAfter: seconds - timeout := seconds! Item was removed: - ----- Method: UserDialogBoxMorph>>wantsToBeDroppedInto: (in category 'events') ----- - wantsToBeDroppedInto: aMorph - "Return true if it's okay to drop the receiver into aMorph" - ^aMorph isWorldMorph "only into worlds"! Item was changed: + (PackageInfo named: 'Morphic') postscript: 'SystemProgressMorph reset.'! - (PackageInfo named: 'Morphic') postscript: 'MenuIcons initializeIcons. - TheWorldMainDockingBar updateInstances.'! From commits at source.squeak.org Sun Jul 31 09:10:26 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 09:10:28 2016 Subject: [squeak-dev] The Trunk: Compiler-mt.324.mcz Message-ID: Marcel Taeumel uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-mt.324.mcz ==================== Summary ==================== Name: Compiler-mt.324 Author: mt Time: 31 July 2016, 11:10:04.90449 am UUID: f8b4e0ae-171c-8541-ae32-656183633ad6 Ancestors: Compiler-eem.323 *** Widget Refactorings and UI Themes (Part 5 of 11) *** Some fixes and refactorings for dialogs including added support for UI theming. =============== Diff against Compiler-eem.323 =============== Item was changed: ----- Method: UndefinedVariable>>openMenuIn: (in category 'as yet unclassified') ----- openMenuIn: aBlock - | labels caption index | - labels := #('yes' 'no'). - caption := name, ' appears to be - undefined at this point. - Proceed anyway?'. + ^ self resume: (UIManager default + confirm: name asText allBold, ' appears to be undefined at this point.\Proceed anyway?' withCRs + title: 'Undefined Variable').! - index := aBlock value: labels value: #() value: caption. - ^ self resume: index = 1! Item was changed: ----- Method: UnknownSelector>>openMenuIn: (in category 'as yet unclassified') ----- openMenuIn: aBlock | alternatives labels lines caption choice | alternatives := Symbol possibleSelectorsFor: name. labels := Array streamContents: + [:s | s nextPut: name; nextPutAll: alternatives]. - [:s | s nextPut: name; nextPutAll: alternatives; nextPut: 'cancel']. lines := {1. alternatives size + 1}. caption := 'Unknown selector, please\confirm, correct, or cancel' withCRs. choice := aBlock value: labels value: lines value: caption. + + choice = 0 ifTrue: [^ self resume: nil]. + choice = 1 ifTrue: [^ self resume: name asSymbol]. - choice = 0 ifTrue: [self resume: nil]. - choice = 1 ifTrue: [self resume: name asSymbol]. - choice = labels size ifTrue: [self resume: nil]. self resume: (alternatives at: choice - 1)! Item was changed: ----- Method: UnusedVariable>>openMenuIn: (in category 'as yet unclassified') ----- openMenuIn: aBlock + + self resume: (UIManager default + confirm: name asText allBold, ' appears to be unused in this method.\Remove it from the code?' withCRs + title: 'Unused Variable').! - | index | - index := aBlock value: #('yes' 'no') - value: #() - value: name, ' appears to be\unused in this method.\OK to remove it?' withCRs. - self resume: index = 1! From commits at source.squeak.org Sun Jul 31 09:11:12 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 09:11:14 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Kernel-mt.100.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Kernel to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Kernel-mt.100.mcz ==================== Summary ==================== Name: ToolBuilder-Kernel-mt.100 Author: mt Time: 31 July 2016, 11:11:03.29749 am UUID: 8ae8d06d-141f-d846-9c73-f7fa561bb78a Ancestors: ToolBuilder-Kernel-mt.99 *** Widget Refactorings and UI Themes (Part 5 of 11) *** Some fixes and refactorings for dialogs including added support for UI theming. =============== Diff against ToolBuilder-Kernel-mt.99 =============== Item was added: + PluggableCompositeSpec subclass: #PluggableDialogSpec + instanceVariableNames: 'title message extent buttons closeAction' + classVariableNames: '' + poolDictionaries: '' + category: 'ToolBuilder-Kernel'! Item was added: + ----- Method: PluggableDialogSpec>>buildWith: (in category 'building') ----- + buildWith: builder + ^builder buildPluggableDialog: self.! Item was added: + ----- Method: PluggableDialogSpec>>buttons (in category 'accessing') ----- + buttons + + ^ buttons! Item was added: + ----- Method: PluggableDialogSpec>>buttons: (in category 'accessing') ----- + buttons: anObject + + buttons := anObject! Item was added: + ----- Method: PluggableDialogSpec>>closeAction (in category 'accessing') ----- + closeAction + + ^ closeAction! Item was added: + ----- Method: PluggableDialogSpec>>closeAction: (in category 'accessing') ----- + closeAction: anObject + + closeAction := anObject! Item was added: + ----- Method: PluggableDialogSpec>>extent (in category 'accessing') ----- + extent + + ^ extent! Item was added: + ----- Method: PluggableDialogSpec>>extent: (in category 'accessing') ----- + extent: anObject + + extent := anObject! Item was added: + ----- Method: PluggableDialogSpec>>horizontalResizing (in category 'as yet unclassified') ----- + horizontalResizing + ^ #rigid! Item was added: + ----- Method: PluggableDialogSpec>>label (in category 'window compatibility') ----- + label + ^ self title! Item was added: + ----- Method: PluggableDialogSpec>>label: (in category 'window compatibility') ----- + label: stringOrSymbol + self title: stringOrSymbol.! Item was added: + ----- Method: PluggableDialogSpec>>message (in category 'accessing') ----- + message + + ^ message! Item was added: + ----- Method: PluggableDialogSpec>>message: (in category 'accessing') ----- + message: anObject + + message := anObject! Item was added: + ----- Method: PluggableDialogSpec>>title (in category 'accessing') ----- + title + + ^ title! Item was added: + ----- Method: PluggableDialogSpec>>title: (in category 'accessing') ----- + title: anObject + + title := anObject! Item was added: + ----- Method: PluggableDialogSpec>>verticalResizing (in category 'as yet unclassified') ----- + verticalResizing + ^ #rigid! Item was changed: PluggableCompositeSpec subclass: #PluggableWindowSpec + instanceVariableNames: 'label extent closeAction multiWindowStyle' - instanceVariableNames: 'label extent closeAction isDialog multiWindowStyle' classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Kernel'! !PluggableWindowSpec commentStamp: '' prior: 0! A common window. Expects to see change/update notifications when the label should change. Instance variables: label The selector under which to retrieve the label or the label directly extent The (initial) extent of the window. closeAction The action to perform when the window is closed.! Item was removed: - ----- Method: PluggableWindowSpec>>isDialog (in category 'accessing') ----- - isDialog - - ^isDialog ifNil: [false] - ! Item was removed: - ----- Method: PluggableWindowSpec>>isDialog: (in category 'accessing') ----- - isDialog: val - - isDialog := val - - ! Item was added: + ----- Method: ToolBuilder>>buildPluggableDialog: (in category 'widgets optional') ----- + buildPluggableDialog: spec + + | windowSpec | + windowSpec := self pluggableWindowSpec new. + windowSpec children: (spec children ifNil: [OrderedCollection new]). + + "TODO: Convert the dialog's message into some element in the children." + + spec buttons ifNotNil: [:buttons | windowSpec children addAll: buttons]. + windowSpec + model: spec model; + extent: spec extent; + label: spec title. + ^ self buildPluggableWindow: windowSpec! Item was added: + ----- Method: ToolBuilder>>pluggableDialogSpec (in category 'defaults') ----- + pluggableDialogSpec + ^PluggableDialogSpec! From commits at source.squeak.org Sun Jul 31 09:11:48 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 09:11:51 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.173.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.173.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.173 Author: mt Time: 31 July 2016, 11:11:41.15449 am UUID: 859eb0f9-c596-2f48-9ae3-a3f8056450c5 Ancestors: ToolBuilder-Morphic-mt.172 *** Widget Refactorings and UI Themes (Part 5 of 11) *** Some fixes and refactorings for dialogs including added support for UI theming. =============== Diff against ToolBuilder-Morphic-mt.172 =============== Item was changed: Model subclass: #ListChooser + instanceVariableNames: 'selectedIndex items searchText addAllowed result title listMorph dialogMorph' - instanceVariableNames: 'window fullList selectedItems searchText searchMorph title listMorph index realIndex buttonBar builder addAllowed result' classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Morphic'! !ListChooser commentStamp: 'MAD 3/14/2010 16:20' prior: 0! I am a simple dialog to allow the user to pick from a list of strings or symbols. I support keyboard and mouse navigation, and interactive filtering of the displayed items. You can specify whether you want the index, or the value of the selected item. If you're interested in the value, you can also allow users to Add a new value not in the list. cmd-s or or double-click answers the currently selected item's value/index; cmd-l or or closing the window answers nil/zero. Now using ToolBuilder, so needs Morphic-MAD.381. Released under the MIT Licence.! Item was added: + ----- Method: ListChooser class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ super themeProperties, { + { #okColor. 'Colors'. 'Color for the OK button.' }. + { #cancelColor. 'Colors'. 'Color for the Cancel button.' }. + { #addColor. 'Colors'. 'Color for a normal button.' }. + { #disabledColor. 'Colors'. 'Color for a disabled button.' }. + }! Item was changed: + ----- Method: ListChooser>>accept (in category 'actions') ----- - ----- Method: ListChooser>>accept (in category 'event handling') ----- accept "if the user submits with no valid entry, make them start over" - self canAccept ifFalse: [ - searchMorph selectAll. - ^ self ]. + | choice | + self canAccept ifFalse: [ + self canAdd ifTrue: [^ self add]. + ^ self changed: #textSelection]. + + choice := self selectedItem. + + self canAdd ifTrue: [ + "Ask the user whether to add the new item or choose the list selection." + (UserDialogBoxMorph confirm: 'You can either choose an existing item or add a new one.\What do you want?' translated withCRs title: 'Choose or Add' translated trueChoice: choice asString falseChoice: self searchText asString at: ActiveHand position) + ifTrue: [self result: choice] ifFalse: [self result: self searchText asString] + ] ifFalse: [self result: choice]. + + + self changed: #close.! - "find the selected item in the original list, and return it" - result := selectedItems at: index. - - builder ifNotNil: [ :bldr | - builder := nil. - bldr close: window ]! Item was changed: + ----- Method: ListChooser>>acceptColor (in category 'colors') ----- - ----- Method: ListChooser>>acceptColor (in category 'drawing') ----- acceptColor + + self canAdd ifTrue: [^ self addColor]. + ^ self canAccept + ifTrue: [ self userInterfaceTheme okColor ifNil: [(Color r: 0.49 g: 0.749 b: 0.49)] ] + ifFalse: [ self userInterfaceTheme disabledColor ifNil: [Color lightGray] ]! - ifTrue: [ ColorTheme current okColor ] - ifFalse: [ Color lightGray "ColorTheme current disabledColor <- you don't have this!!" ]! Item was added: + ----- Method: ListChooser>>acceptLabel (in category 'colors') ----- + acceptLabel + + ^ self canAdd + ifFalse: ['Choose' translated] + ifTrue: [self canAccept + ifTrue: ['Choose or Add' translated] + ifFalse: ['Add' translated]]! Item was changed: + ----- Method: ListChooser>>acceptText: (in category 'actions') ----- - ----- Method: ListChooser>>acceptText: (in category 'event handling') ----- acceptText: someText "the text morph wants to tell us about its contents but I don't care, I'm only interested in the list" self accept! Item was changed: + ----- Method: ListChooser>>add (in category 'actions') ----- - ----- Method: ListChooser>>add (in category 'event handling') ----- add "if the user submits with no valid entry, make them start over" + self canAdd ifFalse: [^ self changed: #textSelection]. + self result: self searchText asString. + self changed: #close.! - self canAdd ifFalse: [ - searchMorph selectAll. - ^ self ]. - - "find the string to return" - result := searchMorph getText. - - builder ifNotNil: [ :bldr | - builder := nil. - bldr close: window ]! Item was added: + ----- Method: ListChooser>>addAllowed (in category 'accessing') ----- + addAllowed + + ^ addAllowed! Item was added: + ----- Method: ListChooser>>addAllowed: (in category 'accessing') ----- + addAllowed: anObject + + addAllowed := anObject! Item was added: + ----- Method: ListChooser>>addColor (in category 'colors') ----- + addColor + + ^ self canAdd + ifTrue: [ self userInterfaceTheme addColor ifNil: [Color blue muchLighter] ] + ifFalse: [ self userInterfaceTheme disabledColor ifNil: [Color lightGray] ]! Item was added: + ----- Method: ListChooser>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + + super applyUserInterfaceTheme. + + self + changed: #okColor; + changed: #cancelColor; + changed: #addColor.! Item was removed: - ----- Method: ListChooser>>buildButtonBarWith: (in category 'building') ----- - buildButtonBarWith: builder - | panel button | - panel := builder pluggablePanelSpec new - model: self; - layout: #proportional; - children: OrderedCollection new. - button := builder pluggableButtonSpec new. - button - model: self; - label: 'Accept (s)'; - action: #accept; - enabled: #canAccept; - state: #canAccept; - color: #acceptColor; - frame: (0.0 @ 0.0 corner: 0.34@1). - panel children add: button. - - button := builder pluggableButtonSpec new. - button - model: self; - label: 'Add (a)'; - action: #add; - enabled: #canAdd; - frame: (0.36 @ 0.0 corner: 0.63@1). - panel children add: button. - - button := builder pluggableButtonSpec new. - button - model: self; - label: 'Cancel (l)'; - action: #cancel; - color: #cancelColor; - frame: (0.65 @ 0.0 corner: 1@1). - panel children add: button. - - ^ panel! Item was removed: - ----- Method: ListChooser>>buildListMorphWith: (in category 'building') ----- - buildListMorphWith: builder - | listSpec | - listSpec := builder pluggableListSpec new. - listSpec - model: self; - list: #list; - getIndex: #selectedIndex; - setIndex: #selectedIndex:; - doubleClick: #accept; - "handleBasicKeys: false;" - keystrokePreview: #keyStrokeFromList:; - "doubleClickSelector: #accept;" - autoDeselect: false. - ^ listSpec! Item was removed: - ----- Method: ListChooser>>buildSearchMorphWith: (in category 'building') ----- - buildSearchMorphWith: builder - | fieldSpec | - fieldSpec := builder pluggableInputFieldSpec new. - fieldSpec - model: self; - getText: #searchText; - setText: #acceptText:; - menu: nil. - "hideScrollBarsIndefinitely;" - "acceptOnCR: true;" - "setBalloonText: 'Type a string to filter down the listed items'." - "onKeyStrokeSend: #keyStroke: to: self." - ^ fieldSpec! Item was removed: - ----- Method: ListChooser>>buildWindowWith: (in category 'building') ----- - buildWindowWith: builder - | windowSpec | - windowSpec := builder pluggableWindowSpec new. - windowSpec model: self. - windowSpec label: #title. - windowSpec children: OrderedCollection new. - ^windowSpec! Item was removed: - ----- Method: ListChooser>>buildWindowWith:specs: (in category 'building') ----- - buildWindowWith: builder specs: specs - | windowSpec | - windowSpec := self buildWindowWith: builder. - specs do: [ :assoc | - | rect action widgetSpec | - rect := assoc key. - action := assoc value. - widgetSpec := action value. - widgetSpec ifNotNil:[ - widgetSpec frame: rect. - windowSpec children add: widgetSpec ] ]. - ^ windowSpec! Item was changed: ----- Method: ListChooser>>buildWith: (in category 'building') ----- + buildWith: builder + + | dialogSpec searchBarHeight listSpec fieldSpec | - buildWith: aBuilder - | windowSpec searchBarHeight buttonBarHeight | - builder := aBuilder. searchBarHeight := Preferences standardDefaultTextFont height * 2. - buttonBarHeight := Preferences standardButtonFont height * 4. + dialogSpec := builder pluggableDialogSpec new + model: self; + title: #title; + closeAction: #closed; + extent: self initialExtent; + children: OrderedCollection new; + buttons: OrderedCollection new; + yourself. - windowSpec := self buildWindowWith: builder specs: { - (LayoutFrame fractions: (0@0 corner: 1@0) offsets: (0@0 corner: 0@searchBarHeight)) -> [self buildSearchMorphWith: builder]. - (LayoutFrame fractions: (0@0 corner: 1@1) offsets: (0@searchBarHeight corner: 0@buttonBarHeight negated)) -> [self buildListMorphWith: builder]. - (LayoutFrame fractions: (0@1 corner: 1@1) offsets: (0@buttonBarHeight negated corner: 0@0)) -> [self buildButtonBarWith: builder]. - }. - windowSpec closeAction: #closed. - windowSpec extent: self initialExtent. - window := builder build: windowSpec. + listSpec := builder pluggableListSpec new. + listSpec + model: self; + list: #items; + getIndex: #selectedIndex; + setIndex: #selectedIndex:; + doubleClick: #accept; + "keystrokePreview: #keyStrokeFromList:;" + autoDeselect: false; + name: #list; + frame: (LayoutFrame fractions: (0@0 corner: 1@1) offsets: (0@searchBarHeight corner: 0@0)). + dialogSpec children add: listSpec. + fieldSpec := builder pluggableInputFieldSpec new. + fieldSpec + model: self; + getText: #searchText; + editText: #searchText:; + setText: #acceptText:; + selection: #textSelection; + menu: nil; + indicateUnacceptedChanges: false; + askBeforeDiscardingEdits: false; + help: 'Type a string to filter down the listed items'; + frame: (LayoutFrame fractions: (0@0 corner: 1@0) offsets: (0@0 corner: 0@searchBarHeight)). + dialogSpec children add: fieldSpec. + + "Buttons" + dialogSpec buttons add: ( + builder pluggableButtonSpec new + model: self; + label: #acceptLabel; + action: #accept; + enabled: #canAcceptOrAdd; + color: #acceptColor). + + dialogSpec buttons add: ( + builder pluggableButtonSpec new + model: self; + label: 'Cancel'; + action: #cancel; + color: #cancelColor). + + dialogMorph := builder build: dialogSpec. + dialogMorph addKeyboardCaptureFilter: self. + listMorph := builder widgetAt: #list. + listMorph allowEmptyFilterResult: true. + + ^ dialogMorph! - searchMorph := window submorphs detect: - [ :each | each isKindOf: PluggableTextMorph ]. - searchMorph - hideScrollBarsIndefinitely; - acceptOnCR: true; - setBalloonText: 'Type a string to filter down the listed items'; - onKeyStrokeSend: #keyStroke: to: self; - hasUnacceptedEdits: true "force acceptOnCR to work even with no text entered". - listMorph := window submorphs detect: - [ :each | each isKindOf: PluggableListMorph ]. - ^ window! Item was added: + ----- Method: ListChooser>>canAcceptOrAdd (in category 'testing') ----- + canAcceptOrAdd + ^ self canAccept or: [self canAdd]! Item was changed: ----- Method: ListChooser>>canAdd (in category 'testing') ----- canAdd + ^ self addAllowed + and: [self searchText asString withBlanksTrimmed notEmpty] + and: [self selectedItem asString ~= self searchText asString]! - ^ addAllowed and: [ self canAccept not ]! Item was changed: + ----- Method: ListChooser>>cancel (in category 'actions') ----- - ----- Method: ListChooser>>cancel (in category 'event handling') ----- cancel + + self result: nil. + self changed: #close.! - "Cancel the dialog and move on" - index := 0. - builder ifNotNil: [ builder close: window ]! Item was changed: + ----- Method: ListChooser>>cancelColor (in category 'colors') ----- - ----- Method: ListChooser>>cancelColor (in category 'drawing') ----- cancelColor + + ^ self userInterfaceTheme cancelColor ifNil: [Color r: 1 g: 0.6 b: 0.588]! - ^ ColorTheme current cancelColor! Item was changed: ----- Method: ListChooser>>chooseIndexFrom:title: (in category 'initialize-release') ----- chooseIndexFrom: labelList title: aString | choice | choice := self chooseItemFrom: labelList title: aString addAllowed: false. + ^ self items indexOf: choice ifAbsent: 0! - ^ fullList indexOf: choice ifAbsent: 0! Item was changed: ----- Method: ListChooser>>chooseIndexFrom:title:addAllowed: (in category 'initialize-release') ----- chooseIndexFrom: labelList title: aString addAllowed: aBoolean | choice | choice := self chooseItemFrom: labelList title: aString addAllowed: false. + self addAllowed: aBoolean. + ^ self items indexOf: choice ifAbsent: 0! - addAllowed := aBoolean. - ^ fullList indexOf: choice ifAbsent: 0! Item was changed: ----- Method: ListChooser>>chooseItemFrom:title:addAllowed: (in category 'initialize-release') ----- chooseItemFrom: labelList title: aString addAllowed: aBoolean + + self items: labelList asOrderedCollection. - fullList := labelList asOrderedCollection. "coerce everything into an OC" - builder := ToolBuilder default. - self list: fullList. self title: aString. + self addAllowed: aBoolean. + + ToolBuilder open: self. + ^ self result! - addAllowed := aBoolean. - window := ToolBuilder default open: self. - window center: Sensor cursorPoint. - window setConstrainedPosition: (Sensor cursorPoint - (window fullBounds extent // 2)) hangOut: false. - - self changed: #inputRequested with: #searchText. - window lookFocused. "Sigh..." - - builder runModal: window. - ^ result! Item was changed: + ----- Method: ListChooser>>closed (in category 'actions') ----- - ----- Method: ListChooser>>closed (in category 'event handling') ----- closed + + self selectedIndex: 0.! - "Cancel the dialog and move on" - builder ifNotNil: [ index := 0 ]! Item was added: + ----- Method: ListChooser>>filterEvent:for: (in category 'event handling') ----- + filterEvent: aKeyboardEvent for: aMorph + + | char | + aKeyboardEvent isKeystroke ifFalse: [^ aKeyboardEvent]. + aKeyboardEvent anyModifierKeyPressed ifTrue: [^ aKeyboardEvent]. + + char := aKeyboardEvent keyCharacter. + + char = Character backspace + ifTrue: [self searchText: (self searchText asString ifNotEmpty: [:s | s allButLast]). ^ aKeyboardEvent ignore]. + char = Character delete + ifTrue: [self searchText: (self searchText asString ifNotEmpty: [:s | s allButFirst]). ^ aKeyboardEvent ignore]. + (char = Character cr or: [char = Character enter]) + ifTrue: [self accept. aKeyboardEvent ignore]. + char = Character escape + ifTrue: [self cancel. aKeyboardEvent ignore]. + (char asInteger between: 32 and: 126) + ifTrue: [self searchText: self searchText asString, char asString. aKeyboardEvent ignore]. + + ^ aKeyboardEvent! Item was removed: - ----- Method: ListChooser>>handlesKeyboard: (in category 'event handling') ----- - handlesKeyboard: evt - ^ true! Item was changed: ----- Method: ListChooser>>initialExtent (in category 'building') ----- initialExtent + + | listFont | - | listFont titleFont buttonFont listWidth titleWidth buttonWidth | listFont := Preferences standardListFont. + ^ (20 * (listFont widthOf: $m))@(15 * listFont height)! - titleFont := Preferences windowTitleFont. - buttonFont := Preferences standardButtonFont. - listWidth := 20 * (listFont widthOf: $m). - titleWidth := titleFont widthOfString: self title, '__________'. "add some space for titlebar icons" - buttonWidth := buttonFont widthOfString: '_Accept_(s)___Add (a)___Cancel_(l)_'. - ^ (listWidth max: (titleWidth max: buttonWidth))@(30 * (listFont height))! Item was added: + ----- Method: ListChooser>>items (in category 'accessing') ----- + items + + ^ items! Item was added: + ----- Method: ListChooser>>items: (in category 'accessing') ----- + items: anObject + + items := anObject! Item was removed: - ----- Method: ListChooser>>keyStroke: (in category 'event handling') ----- - keyStroke: event - | newText key | - "handle updates to the search box interactively" - key := event keyString. - (key = '') ifTrue: [ - self move: -1. - ^ self ]. - (key = '') ifTrue: [ - self move: 1. - ^ self ]. - - (key = '') ifTrue: [ self accept. ^ self ]. - (key = '') ifTrue: [ self accept. ^ self ]. - - (key = '') ifTrue: [ self cancel. ^ self ]. - (key = '') ifTrue: [ self cancel. ^ self ]. - - (key = '') ifTrue: [ self add. ^ self ]. - - "pull out what's been typed, and update the list as required" - newText := searchMorph textMorph asText asString. - (newText = searchText) ifFalse: [ - searchText := newText. - self updateFilter ]. - ! Item was removed: - ----- Method: ListChooser>>keyStrokeFromList: (in category 'event handling') ----- - keyStrokeFromList: event - "we don't want the list to be picking up events, excepting scroll events" - - "Don't sent ctrl-up/ctrl-down events to the searchMorph: they're scrolling events." - (#(30 31) contains: [:each | each = event keyValue]) not - ifTrue: - ["window world primaryHand keyboardFocus: searchMorph." - searchMorph keyStroke: event. - "let the list know we've dealt with it" - ^true]. - ^false. - ! Item was removed: - ----- Method: ListChooser>>list (in category 'accessing') ----- - list - ^ selectedItems! Item was removed: - ----- Method: ListChooser>>list: (in category 'accessing') ----- - list: items - fullList := items. - selectedItems := items. - self changed: #itemList.! Item was removed: - ----- Method: ListChooser>>list:title: (in category 'accessing') ----- - list: aList title: aString - self list: aList. - self title: aString! Item was removed: - ----- Method: ListChooser>>move: (in category 'event handling') ----- - move: offset - | newindex | - "The up arrow key moves the cursor, and it seems impossible to restore. - So, for consistency, on either arrow, select everything, so a new letter-press starts over. yuk." - searchMorph selectAll. - - newindex := self selectedIndex + offset. - newindex > selectedItems size ifTrue: [ ^ nil ]. - newindex < 1 ifTrue: [ ^ nil ]. - self selectedIndex: newindex. - ! Item was removed: - ----- Method: ListChooser>>moveWindowNear: (in category 'drawing') ----- - moveWindowNear: aPoint - | trialRect delta | - trialRect := Rectangle center: aPoint extent: window fullBounds extent. - delta := trialRect amountToTranslateWithin: World bounds. - window position: trialRect origin + delta.! Item was removed: - ----- Method: ListChooser>>realIndex (in category 'accessing') ----- - realIndex - ^ realIndex ifNil: [ 0 ]! Item was added: + ----- Method: ListChooser>>result (in category 'accessing') ----- + result + + ^ result! Item was added: + ----- Method: ListChooser>>result: (in category 'accessing') ----- + result: anObject + + result := anObject! Item was changed: ----- Method: ListChooser>>searchText: (in category 'accessing') ----- searchText: aString + searchText := aString. + listMorph filterList: aString asString. + + self changed: #searchText. + self changed: #canAcceptOrAdd. + self changed: #acceptLabel. + self changed: #buttons.! - searchText := aString! Item was changed: ----- Method: ListChooser>>selectedIndex (in category 'accessing') ----- selectedIndex + ^ selectedIndex ifNil: [ 1 ]! - ^ index ifNil: [ index := 1 ]! Item was changed: ----- Method: ListChooser>>selectedIndex: (in category 'accessing') ----- selectedIndex: anInt + selectedIndex := anInt. + self changed: #selectedIndex.! - index := (anInt min: selectedItems size). - self changed: #selectedIndex. - self changed: #canAccept.! Item was added: + ----- Method: ListChooser>>selectedItem (in category 'accessing') ----- + selectedItem + + ^ self items at: self selectedIndex ifAbsent: []! Item was added: + ----- Method: ListChooser>>textSelection (in category 'accessing') ----- + textSelection + ^ self searchText size +1 to: self searchText size ! Item was removed: - ----- Method: ListChooser>>updateFilter (in category 'event handling') ----- - updateFilter - - selectedItems := - searchText isEmptyOrNil - ifTrue: [ fullList ] - ifFalse: [ | pattern patternMatches prefixMatches | - pattern := (searchText includes: $*) - ifTrue: [ searchText ] - ifFalse: [ '*', searchText, '*' ]. - patternMatches := fullList select: [:s | pattern match: s ]. - prefixMatches := OrderedCollection new: patternMatches size. - patternMatches removeAllSuchThat: [ :each | - (each findString: searchText startingAt: 1 caseSensitive: false) = 1 - and: [ - prefixMatches add: each. - true ] ]. - prefixMatches addAllLast: patternMatches; yourself]. - self changed: #list. - self selectedIndex: 1. - self changed: #selectedIndex.! Item was added: + ----- Method: ListMultipleChooser class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ super themeProperties, { + { #okColor. 'Colors'. 'Color for the OK button.' }. + { #cancelColor. 'Colors'. 'Color for the Cancel button.' }. + }! Item was added: + ----- Method: ListMultipleChooser>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + + super applyUserInterfaceTheme. + + self + changed: #okColor; + changed: #cancelColor.! Item was changed: ----- Method: ListMultipleChooser>>buildWith: (in category 'toolbuilder') ----- buildWith: builder + | dialogSpec choicesSpec | + dialogSpec := builder pluggableDialogSpec new - | windowSpec choicesSpec acceptSpec cancelSpec buttonHeight | - windowSpec := builder pluggableWindowSpec new model: self; + extent: self initialExtent; + title: #title; + children: OrderedCollection new; + buttons: OrderedCollection new. + - extent: 250@400; - label: #title; - children: OrderedCollection new. - - buttonHeight := Preferences standardButtonFont height * 4. - choicesSpec := builder pluggableMultiSelectionListSpec new model: self; list: #labels; setIndex: #selectedIndex:; getIndex: #selectedIndex; setSelectionList: #selectionAt:put:; getSelectionList: #selectionAt:; + frame: (0@0 corner: 1@1). + dialogSpec children add: choicesSpec. - frame: (LayoutFrame fractions: (0@0 corner: 1@1) offsets: (0@0 corner: 0@ buttonHeight negated)). - windowSpec children add: choicesSpec. + "Buttons" + dialogSpec buttons add: ( + builder pluggableButtonSpec new + model: self; + label: 'accept'; + color: (self userInterfaceTheme okColor ifNil: [Color r: 0.49 g: 0.749 b: 0.49]); + action: #accept). + + dialogSpec buttons add: ( + builder pluggableButtonSpec new + model: self; + label: 'cancel'; + color: (self userInterfaceTheme cancelColor ifNil: [Color r: 1 g: 0.6 b: 0.588]); + action: #cancel). + + ^ builder build: dialogSpec! - acceptSpec := builder pluggableButtonSpec new - model: self; - label: 'accept'; - color: ColorTheme current okColor; - action: #accept; - frame: (LayoutFrame fractions: (0@1 corner: 0.5@1) offsets: (0@ buttonHeight negated corner: 0@0)). - windowSpec children add: acceptSpec. - - cancelSpec := builder pluggableButtonSpec new - model: self; - label: 'cancel'; - color: ColorTheme current cancelColor; - action: #cancel; - frame: (LayoutFrame fractions: (0.5@1 corner: 1@1) offsets: (0@ buttonHeight negated corner: 0@0)). - windowSpec children add: cancelSpec. - - ^ builder build: windowSpec! Item was changed: ----- Method: ListMultipleChooser>>choose (in category 'actions') ----- choose - | builder window | - builder := ToolBuilder default. - window := builder open: self.. - window center: Sensor cursorPoint. "Avoid morphic dependency here..." + " self changed: #inputRequested with: #selectedIndex. + " + ToolBuilder open: self. - self changed: #inputRequested with: #selectedIndex. - window lookFocused. "Sigh..." - - builder runModal: window. - ^ self selectedValues! Item was added: + ----- Method: ListMultipleChooser>>initialExtent (in category 'toolbuilder') ----- + initialExtent + + | listFont | + listFont := Preferences standardListFont. + ^ (20 * (listFont widthOf: $m))@(15 * listFont height)! Item was added: + ----- Method: MorphicToolBuilder>>buildPluggableDialog: (in category 'widgets optional') ----- + buildPluggableDialog: aSpec + + | widget | + + widget := self dialogClass new. + self register: widget id: aSpec name. + + widget model: aSpec model. + + "Set child dependent layout properties. The pane morph holds the special contents." + widget paneMorph wantsPaneSplitters: (aSpec wantsResizeHandles ifNil: [true]). + self setLayoutHintsFor: widget paneMorph spec: aSpec. + widget paneMorph layoutInset: (aSpec padding ifNil: [ProportionalSplitterMorph gripThickness]). + widget paneMorph cellInset: (aSpec spacing ifNil: [ProportionalSplitterMorph gripThickness]). + widget paneMorph wantsPaneSplitters ifTrue: [widget paneMorph addCornerGrips"addEdgeGrips"]. + + "Now create the children." + panes := OrderedCollection new. + aSpec children isSymbol + ifTrue: [ + widget getChildrenSelector: aSpec children. + widget update: aSpec children] + ifFalse: [ + self buildAll: aSpec children in: widget paneMorph]. + + "Now create the buttons." + aSpec buttons isSymbol + ifTrue: [ + widget getButtonsSelector: aSpec buttons. + widget update: aSpec buttons] + ifFalse: [ + self buildAll: aSpec buttons in: widget buttonRowMorph. + widget updateButtonProperties]. + + aSpec title ifNotNil: [:label | + label isSymbol + ifTrue:[widget getTitleSelector: label; update: label] + ifFalse:[widget title: label]]. + aSpec message ifNotNil: [:label | + label isSymbol + ifTrue:[widget getMessageSelector: label; update: label] + ifFalse:[widget message: label]]. + + widget closeDialogSelector: aSpec closeAction. + self buildHelpFor: widget spec: aSpec. + + "Everything is shrink-wrapped around the pane morph." + widget paneMorph extent: (aSpec extent ifNil:[widget initialExtent]). + + ^ widget! Item was added: + ----- Method: MorphicToolBuilder>>dialogClass (in category 'widget classes') ----- + dialogClass + ^ PluggableDialogWindow! Item was changed: ----- Method: MorphicToolBuilder>>open: (in category 'opening') ----- open: anObject "Build and open the object. Answer the widget opened." | morph | anObject isMorph ifTrue:[morph := anObject] ifFalse:[morph := self build: anObject]. (morph isKindOf: MenuMorph) ifTrue:[morph popUpInWorld: World]. + (morph isKindOf: DialogWindow) + ifTrue: [^ morph moveToHand; getUserResponse]. (morph isKindOf: SystemWindow) ifFalse:[morph openInWorld] ifTrue:[ morph := morph openInWorldExtent: morph extent. (self class openToolsAttachedToMouseCursor and: [self currentEvent isMouse and: [self currentEvent isMouseUp]]) ifTrue: [ morph setProperty: #initialDrop toValue: true. morph hasDropShadow: false. self currentHand attachMorph: morph]]. ^morph! Item was changed: ----- Method: MorphicToolBuilder>>windowClassFor: (in category 'widget classes') ----- windowClassFor: aSpec - aSpec isDialog ifTrue: [^ PluggableDialogWindow]. ^aSpec multiWindowStyle caseOf: { [nil] -> [PluggableSystemWindow]. [#labelButton] -> [PluggableSystemWindowWithLabelButton] } otherwise: [PluggableSystemWindowWithLabelButton]! Item was changed: ----- Method: MorphicUIManager>>chooseFrom:lines:title: (in category 'ui requests') ----- chooseFrom: aList lines: linesArray title: aString "Choose an item from the given list. Answer the index of the selected item." + + aList size <= 7 ifTrue: [ + | dialog | + dialog := DialogWindow new + title: 'Please Choose'; + message: aString; + yourself. + aList doWithIndex: [:ea :index | + dialog createButton: ea value: index]. + dialog selectedButtonIndex: 1. + ^ dialog getUserResponseAtHand ifNil: [0]]. + + ^ ListChooser chooseFrom: aList title: aString! - ^ aList size > 30 - ifTrue: - [ "Don't put more than 30 items in a menu. Use ListChooser insted" - ListChooser - chooseFrom: aList - title: aString ] - ifFalse: - [ MenuMorph - chooseFrom: aList - lines: linesArray - title: aString ]! Item was changed: ----- Method: MorphicUIManager>>chooseFrom:values:lines:title: (in category 'ui requests') ----- chooseFrom: labelList values: valueList lines: linesArray title: aString "Choose an item from the given list. Answer the selected item." + | index | + index := self chooseFrom: labelList lines: linesArray title: aString. + ^ index = 0 + ifTrue: [ nil ] + ifFalse: [ valueList at: index ]! - ^ labelList size > 30 - ifTrue: - [ "No point in displaying more than 30 items in a menu. Use ListChooser insted" - index := ListChooser - chooseFrom: labelList - title: aString. - index = 0 ifFalse: [ valueList at: index ] ] - ifFalse: - [ MenuMorph - chooseFrom: labelList - values: valueList - lines: linesArray - title: aString ]! Item was added: + ----- Method: MorphicUIManager>>chooseFromOrAddTo:lines:title: (in category 'ui requests') ----- + chooseFromOrAddTo: aList lines: linesArray title: aString + + ^ ListChooser + chooseItemFrom: aList + title: aString + addAllowed: true! Item was changed: + DialogWindow subclass: #PluggableDialogWindow + instanceVariableNames: 'model getTitleSelector getMessageSelector getChildrenSelector getButtonsSelector closeDialogSelector' - PluggableSystemWindow subclass: #PluggableDialogWindow - instanceVariableNames: 'statusValue' classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Morphic'! Item was added: + ----- Method: PluggableDialogWindow>>closeDialogSelector (in category 'accessing') ----- + closeDialogSelector + + ^ closeDialogSelector! Item was added: + ----- Method: PluggableDialogWindow>>closeDialogSelector: (in category 'accessing') ----- + closeDialogSelector: anObject + + closeDialogSelector := anObject! Item was added: + ----- Method: PluggableDialogWindow>>delete (in category 'submorphs-add/remove') ----- + delete + + self model okToClose ifFalse: [^ self]. + + self closeDialogSelector ifNotNil: [:sel | self model perform: sel]. + + self model + windowIsClosing; + release. + self model: nil. + + super delete.! Item was added: + ----- Method: PluggableDialogWindow>>getButtonsSelector (in category 'accessing') ----- + getButtonsSelector + + ^ getButtonsSelector! Item was added: + ----- Method: PluggableDialogWindow>>getButtonsSelector: (in category 'accessing') ----- + getButtonsSelector: anObject + + getButtonsSelector := anObject! Item was added: + ----- Method: PluggableDialogWindow>>getChildrenSelector (in category 'accessing') ----- + getChildrenSelector + + ^ getChildrenSelector! Item was added: + ----- Method: PluggableDialogWindow>>getChildrenSelector: (in category 'accessing') ----- + getChildrenSelector: anObject + + getChildrenSelector := anObject! Item was added: + ----- Method: PluggableDialogWindow>>getMessageSelector (in category 'accessing') ----- + getMessageSelector + + ^ getMessageSelector! Item was added: + ----- Method: PluggableDialogWindow>>getMessageSelector: (in category 'accessing') ----- + getMessageSelector: anObject + + getMessageSelector := anObject! Item was added: + ----- Method: PluggableDialogWindow>>getTitleSelector (in category 'accessing') ----- + getTitleSelector + + ^ getTitleSelector! Item was added: + ----- Method: PluggableDialogWindow>>getTitleSelector: (in category 'accessing') ----- + getTitleSelector: anObject + + getTitleSelector := anObject! Item was added: + ----- Method: PluggableDialogWindow>>model (in category 'accessing') ----- + model + ^ model! Item was added: + ----- Method: PluggableDialogWindow>>model: (in category 'accessing') ----- + model: anObject + + model ifNotNil: [model removeDependent: self]. + anObject ifNotNil: [anObject addDependent: self]. + model := anObject.! Item was removed: - ----- Method: PluggableDialogWindow>>statusValue (in category 'as yet unclassified') ----- - statusValue - ^statusValue! Item was removed: - ----- Method: PluggableDialogWindow>>statusValue: (in category 'as yet unclassified') ----- - statusValue: val - statusValue := val! Item was added: + ----- Method: PluggableDialogWindow>>update: (in category 'updating') ----- + update: what + + what ifNil:[^self]. + + what == self getTitleSelector ifTrue:[self title: (model perform: self getTitleSelector)]. + what == self getMessageSelector ifTrue:[self message: (model perform: self getMessageSelector)]. + + what == self getChildrenSelector ifTrue:[ + self paneMorph removeAllMorphs. + (self model perform: self getChildrenSelector) + do: [:m| m hResizing: #spaceFill; vResizing: #spaceFill]; + in: [:children | self paneMorph addAllMorphs: children]]. + + what == self getButtonsSelector ifTrue:[ + self buttonRow + removeAllMorphs; + addAllMorphs: (self model perform: self getButtonsSelector). + self updateButtonProperties]. + + what == #close ifTrue: [^ self delete]. + + super update: what.! Item was added: + ----- Method: PluggableDialogWindow>>updateButtonProperties (in category 'updating') ----- + updateButtonProperties + + self buttons do: [:ea | + ea setProperty: #normalColor toValue: ea offColor. + ea setProperty: #normalLabel toValue: ea label. + ea hResizing: #rigid; vResizing: #rigid]. + + self updateButtonExtent.! From commits at source.squeak.org Sun Jul 31 09:17:01 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 09:17:02 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1212.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1212.mcz ==================== Summary ==================== Name: Morphic-mt.1212 Author: mt Time: 31 July 2016, 11:16:13.00249 am UUID: 33cfd9c4-1799-954f-a7fd-b73579490169 Ancestors: Morphic-mt.1211 *** Widget Refactorings and UI Themes (Part 6 of 11) *** Some fixes and refactorings for buttons including added support for UI theming. =============== Diff against Morphic-mt.1211 =============== Item was changed: + Morph subclass: #PluggableButtonMorph + instanceVariableNames: 'model label font getStateSelector actionSelector getLabelSelector getMenuSelector shortcutCharacter askBeforeChanging triggerOnMouseDown offColor onColor feedbackColor showSelectionFeedback allButtons arguments argumentsProvider argumentsSelector style hoverColor borderColor textColor labelOffset' - AlignmentMorph subclass: #PluggableButtonMorph - instanceVariableNames: 'model label font getStateSelector actionSelector getLabelSelector getMenuSelector shortcutCharacter askBeforeChanging triggerOnMouseDown offColor onColor feedbackColor showSelectionFeedback allButtons arguments argumentsProvider argumentsSelector style' classVariableNames: 'GradientButton RoundedButtonCorners' poolDictionaries: '' category: 'Morphic-Pluggable Widgets'! !PluggableButtonMorph commentStamp: '' prior: 0! A PluggableButtonMorph is a combination of an indicator for a boolean value stored in its model and an action button. The action of a button is often, but not always, to toggle the boolean value that it shows. Its pluggable selectors are: getStateSelector fetch a boolean value from the model actionSelector invoke this button's action on the model getLabelSelector fetch this button's lable from the model getMenuSelector fetch a pop-up menu for this button from the model Any of the above selectors can be nil, meaning that the model does not supply behavior for the given action, and the default behavior should be used. For example, if getStateSelector is nil, then this button shows the state of a read-only boolean that is always false. The model informs its view(s) of changes by sending #changed: to itself with getStateSelector as a parameter. The view tells the model when the button is pressed by sending actionSelector. If the actionSelector takes one or more arguments, then the following are relevant: arguments A list of arguments to provide when the actionSelector is called. argumentsProvider The object that is sent the argumentSelector to obtain arguments, if dynamic argumentsSelector The message sent to the argumentProvider to obtain the arguments. Options: askBeforeChanging have model ask user before allowing a change that could lose edits triggerOnMouseDown do this button's action on mouse down (vs. up) transition shortcutCharacter a place to record an optional shortcut key ! Item was changed: ----- Method: PluggableButtonMorph class>>gradientButton: (in category 'preferences') ----- gradientButton: aBoolean + GradientButton = aBoolean ifTrue: [^ self]. + GradientButton := aBoolean. + + PluggableButtonMorph allSubInstancesDo: [:ea | ea updateFillStyle].! - GradientButton := aBoolean.! Item was added: + ----- Method: PluggableButtonMorph class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ super themeProperties, { + { #borderColor. 'Colors'. 'Color of the button''s border.' }. + { #borderWidth. 'Borders'. 'Width of the button''s border.' }. + { #borderStyle. 'Borders'. 'Whether to use a plain border, inset, or outset.' }. + { #color. 'Colors'. 'Background color of the button.' }. + + { #font. 'Fonts'. 'Font for button title.' }. + { #textColor. 'Colors'. 'Color for the button title label.' }. + }! Item was added: + ----- Method: PluggableButtonMorph>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + + super applyUserInterfaceTheme. + self setDefaultParameters.! Item was removed: - ----- Method: PluggableButtonMorph>>defaultBorderWidth (in category 'initialization') ----- - defaultBorderWidth - "answer the default border width for the receiver" - ^ 1! Item was removed: - ----- Method: PluggableButtonMorph>>defaultColor (in category 'initialization') ----- - defaultColor - "answer the default color/fill style for the receiver" - ^ Color gray: 0.7! Item was removed: - ----- Method: PluggableButtonMorph>>drawBackgroundOn: (in category 'drawing') ----- - drawBackgroundOn: aCanvas - | cc gradient borderColor fill | - cc := self color. - cc isTransparent ifTrue:[cc := Color gray: 0.9]. - self enabled ifFalse:[cc := Color lightGray]. - cc brightness > 0.9 ifTrue:[cc := cc adjustBrightness: 0.9 - cc brightness]. - showSelectionFeedback ifTrue:[ - borderColor := cc muchDarker. - gradient := GradientFillStyle ramp: { - 0.0 -> cc muchDarker. - 0.1-> (cc adjustBrightness: -0.2). - 0.5 -> cc. - 0.9-> (cc adjustBrightness: -0.1). - 1 -> cc muchDarker}. - cc := cc muchDarker. - ] ifFalse:[ - borderColor := Color lightGray. - gradient := GradientFillStyle ramp: { - 0.0 -> Color white. - 0.1-> (cc adjustBrightness: 0.05). - 0.6 -> (cc darker)}. - ]. - gradient origin: bounds topLeft. - gradient direction: 0@self height. - - PluggableButtonMorph gradientButton - ifFalse: [fill := SolidFillStyle color: cc] - ifTrue: [fill := gradient]. - - ^ self wantsRoundedCorners - ifTrue: [aCanvas - frameAndFillRoundRect: self bounds - radius: self cornerRadius - fillStyle: fill - borderWidth: 1 - borderColor: borderColor] - ifFalse: [aCanvas - frameAndFillRectangle: self bounds - fillColor: fill asColor - borderWidth: 1 - borderColor: borderColor darker; - fillRectangle: self innerBounds - fillStyle: fill]! Item was changed: ----- Method: PluggableButtonMorph>>drawLabelOn: (in category 'drawing') ----- drawLabelOn: aCanvas + | fontToUse labelToUse colorToUse labelWidth layoutBounds drawBlock | - | fontToUse labelToUse labelWidth layoutBounds drawBlock | self label ifNil: [^ self]. layoutBounds := self layoutBounds. labelToUse := self label asString. fontToUse := self font. + colorToUse := self textColorToUse. "Support very narrow buttons. Shrink text to monogram then." (layoutBounds width < self labelShrinkThreshold and: [labelToUse size > 3]) ifTrue: [ labelToUse := labelToUse first asString. "Show first character only." fontToUse := fontToUse emphasized: (TextEmphasis bold) emphasisCode]. labelWidth := fontToUse widthOfString: labelToUse. drawBlock := [:c | c drawString: labelToUse at: (layoutBounds center x - (labelWidth // 2) max: (layoutBounds left)) @ (layoutBounds center y - (fontToUse height // 2)) font: fontToUse + color: colorToUse]. - color: Color black]. self clipSubmorphs ifTrue: [aCanvas clipBy: layoutBounds during: drawBlock] ifFalse: [drawBlock value: aCanvas]! Item was changed: ----- Method: PluggableButtonMorph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas + (self fillStyle isColor not and: [self fillStyle isGradientFill]) + ifTrue: [self fillStyle origin: self topLeft; direction: 0@ self height]. + + super drawOn: aCanvas. - self drawBackgroundOn: aCanvas. + aCanvas + translateBy: self labelOffset + during: [:c | + self label isMorph + ifTrue: [self drawMorphLabelOn: c] + ifFalse: [self drawLabelOn: c]].! - self label isMorph - ifTrue: [self drawMorphLabelOn: aCanvas] - ifFalse: [self drawLabelOn: aCanvas].! Item was added: + ----- Method: PluggableButtonMorph>>feedbackColor (in category 'accessing') ----- + feedbackColor + ^ feedbackColor! Item was changed: + ----- Method: PluggableButtonMorph>>initialize (in category 'initialization') ----- - ----- Method: PluggableButtonMorph>>initialize (in category 'initialize-release') ----- initialize super initialize. "Layout properties." self extent: 20 @ 15; hResizing: #shrinkWrap; vResizing: #shrinkWrap; layoutInset: (4@0 corner: 4@0); clipSubmorphs: true; wrapCentering: #center; cellPositioning: #topCenter. - "Visuals." - self borderStyle: BorderStyle thinGray. - "Initialize instance variables." model := nil. label := nil. getStateSelector := nil. actionSelector := nil. getLabelSelector := nil. getMenuSelector := nil. shortcutCharacter := nil. askBeforeChanging := false. triggerOnMouseDown := false. - onColor := self color darker. - offColor := self color. - feedbackColor := Color red. - showSelectionFeedback := false. allButtons := nil. argumentsProvider := nil. + argumentsSelector := nil. + + self setDefaultParameters. + ! - argumentsSelector := nil.! Item was changed: ----- Method: PluggableButtonMorph>>label: (in category 'accessing') ----- label: aStringOrTextOrMorph label = aStringOrTextOrMorph ifTrue: [^ self]. + label := aStringOrTextOrMorph isString + ifFalse: [aStringOrTextOrMorph asMorph] + ifTrue: [aStringOrTextOrMorph]. - label := aStringOrTextOrMorph isText - ifTrue: [aStringOrTextOrMorph asMorph] - ifFalse: [aStringOrTextOrMorph]. self updateMinimumExtent. self changed.! Item was added: + ----- Method: PluggableButtonMorph>>labelOffset (in category 'accessing') ----- + labelOffset + ^ labelOffset ifNil: [0@0]! Item was added: + ----- Method: PluggableButtonMorph>>labelOffset: (in category 'accessing') ----- + labelOffset: aPoint + labelOffset := aPoint.! Item was changed: ----- Method: PluggableButtonMorph>>mouseDown: (in category 'event handling') ----- mouseDown: evt "Details: If this button is triggered on mouse down or the event is the menu gesture, handle it immediately. Otherwise, make a list of buttons (including the receiver) for mouseMove feedback. This allows a simple radio-button effect among the button submorphs of a given morph." allButtons := nil. evt yellowButtonPressed ifTrue: [^ self invokeMenu: evt]. triggerOnMouseDown ifTrue: [self performAction] ifFalse: [ allButtons := owner submorphs select: [:m | m class = self class]. + self updateFillStyle: evt]. - self updateFeedbackForEvt: evt]. ! Item was changed: ----- Method: PluggableButtonMorph>>mouseEnter: (in category 'event handling') ----- mouseEnter: evt + self updateFillStyle: evt.! - "0.09375 is exact in floating point so no cumulative rounding error will occur" - self color: (self color adjustBrightness: -0.09375)! Item was changed: ----- Method: PluggableButtonMorph>>mouseLeave: (in category 'event handling') ----- mouseLeave: evt + self updateFillStyle: evt.! - "0.09375 is exact in floating point so no cumulative rounding error will occur" - self color: (self color adjustBrightness: 0.09375). - self update: nil! Item was changed: ----- Method: PluggableButtonMorph>>mouseMove: (in category 'event handling') ----- mouseMove: evt allButtons ifNil: [^ self]. + allButtons do: [:m | m updateFillStyle: evt].! - allButtons do: [:m | m updateFeedbackForEvt: evt]. - ! Item was changed: ----- Method: PluggableButtonMorph>>mouseUp: (in category 'event handling') ----- mouseUp: evt + self updateFillStyle: evt. + - showSelectionFeedback := false. - borderColor isColor ifFalse:[borderColor := #raised]. allButtons ifNil: [^ self]. allButtons do: [:m | (m containsPoint: evt cursorPoint) ifTrue: [m performAction]]. allButtons := nil. self changed. ! Item was changed: ----- Method: PluggableButtonMorph>>offColor: (in category 'accessing') ----- offColor: colorWhenOff "Set the fill colors to be used when this button is off." + | cc | + cc := colorWhenOff isTransparent ifTrue: [(Color gray: 0.9) alpha: 0.5] ifFalse: [colorWhenOff]. + self + onColor: ((self userInterfaceTheme selectionModifier ifNil: [ [:c | c adjustBrightness: -0.2] ]) value: cc) + offColor: cc - self onColor: onColor offColor: colorWhenOff ! Item was changed: + ----- Method: PluggableButtonMorph>>on:getState:action:label:menu: (in category 'initialization') ----- - ----- Method: PluggableButtonMorph>>on:getState:action:label:menu: (in category 'initialize-release') ----- on: anObject getState: getStateSel action: actionSel label: labelSel menu: menuSel self model: anObject. getStateSelector := getStateSel. actionSelector := actionSel. getLabelSelector := labelSel. getMenuSelector := menuSel. + self update: labelSel. + self update: getStateSel. + self updateFillStyle.! - ! Item was changed: ----- Method: PluggableButtonMorph>>onColor:offColor: (in category 'accessing') ----- onColor: colorWhenOn offColor: colorWhenOff "Set the fill colors to be used when this button is on/off." onColor := colorWhenOn. offColor := colorWhenOff. + + hoverColor := (self userInterfaceTheme hoverModifier ifNil: [ [:c | c adjustBrightness: -0.1] ]) value: offColor. + feedbackColor := (self userInterfaceTheme feedbackModifier ifNil: [ [:c | c adjustBrightness: -0.3] ]) value: offColor. + + self updateFillStyle.! - self update: nil. - ! Item was added: + ----- Method: PluggableButtonMorph>>setDefaultParameters (in category 'initialization') ----- + setDefaultParameters + "change the receiver's appareance parameters" + + self + color: (self userInterfaceTheme color ifNil: [Color gray: 0.91]); + borderStyle: (self userInterfaceTheme borderStyle ifNil: [BorderStyle default]); + borderColor: (self userInterfaceTheme borderColor ifNil: [Color gray]); + borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]); + font: (self userInterfaceTheme font ifNil: [TextStyle defaultFont]); + textColor: (self userInterfaceTheme textColor ifNil: [Color black]). + + borderColor := self borderColor. + self offColor: self color.! Item was added: + ----- Method: PluggableButtonMorph>>textColor (in category 'accessing') ----- + textColor + ^ textColor ifNil: [Color black "old instances"]! Item was added: + ----- Method: PluggableButtonMorph>>textColor: (in category 'accessing') ----- + textColor: aColor + textColor := aColor. + self changed.! Item was added: + ----- Method: PluggableButtonMorph>>textColorToUse (in category 'drawing') ----- + textColorToUse + + ^ self textColor! Item was changed: ----- Method: PluggableButtonMorph>>update: (in category 'updating') ----- update: aParameter + getLabelSelector ifNotNil: [:sel | + aParameter == sel ifTrue: [self label: (model perform: sel)]]. + getStateSelector ifNotNil: [:sel | + aParameter == sel ifTrue: [self updateFillStyle]].! - getLabelSelector ifNotNil: [ - aParameter == getLabelSelector ifTrue: [ - self label: (model perform: getLabelSelector)]]. - self getModelState - ifTrue: [self color: onColor] - ifFalse: [self color: offColor]. - ! Item was removed: - ----- Method: PluggableButtonMorph>>updateFeedbackForEvt: (in category 'events') ----- - updateFeedbackForEvt: evt - - | newState | - newState := self containsPoint: evt cursorPoint. - newState = showSelectionFeedback ifFalse: [ - borderColor isColor - ifTrue:[showSelectionFeedback := newState] - ifFalse:[borderColor := newState ifTrue:[#inset] ifFalse:[#raised]]. - self changed]. - ! Item was added: + ----- Method: PluggableButtonMorph>>updateFillStyle (in category 'updating') ----- + updateFillStyle + + self + updateFillStylePressing: false + hovering: false.! Item was added: + ----- Method: PluggableButtonMorph>>updateFillStyle: (in category 'updating') ----- + updateFillStyle: evt + + self + updateFillStylePressing: (evt redButtonPressed and: [self containsPoint: evt position]) + hovering: (evt redButtonPressed not and: [self containsPoint: evt position]).! Item was added: + ----- Method: PluggableButtonMorph>>updateFillStylePressing:hovering: (in category 'updating') ----- + updateFillStylePressing: isPressing hovering: isHovering + + | gradient cc | + "Migrate old instances." + hoverColor ifNil: [hoverColor := onColor darker]. + + self labelOffset: (isPressing ifTrue: [1@1] ifFalse: [0@0]). + + self getModelState + ifTrue: [self color: onColor] + ifFalse: [self color: offColor]. + self borderColor: borderColor. + + self class gradientButton ifFalse: [ + isPressing ifTrue: [ + self color: feedbackColor. + self borderColor: feedbackColor muchDarker]. + isHovering ifTrue: [ + self color: hoverColor. + self borderColor: borderColor]. + ^ self]. + + isPressing ifTrue: [ + cc := feedbackColor. + self borderColor: feedbackColor muchDarker. + gradient := GradientFillStyle ramp: { + 0.0 -> cc muchDarker. + 0.1-> (cc adjustBrightness: -0.2). + 0.5 -> cc. + 0.9-> (cc adjustBrightness: -0.1). + 1 -> cc muchDarker}]. + isHovering ifTrue: [ + cc := hoverColor. + gradient := GradientFillStyle ramp: { + 0.0 -> Color white. + 0.1-> (cc adjustBrightness: 0.05). + 0.6 -> (cc darker)}]. + gradient ifNil: [ + cc := self color. + gradient := GradientFillStyle ramp: { + 0.0 -> Color white. + 0.1-> (cc adjustBrightness: 0.05). + 0.6 -> (cc darker)}]. + + gradient origin: bounds topLeft. + gradient direction: 0@self height. + + self fillStyle: gradient.! Item was changed: ----- Method: PluggableButtonMorph>>veryDeepInner: (in category 'copying') ----- veryDeepInner: deepCopier "Copy all of my instance variables. Some need to be not copied at all, but shared. Warning!!!! Every instance variable defined in this class must be handled. We must also implement veryDeepFixupWith:. See DeepCopier class comment." super veryDeepInner: deepCopier. "model := model. Weakly copied" label := label veryDeepCopyWith: deepCopier. "getStateSelector := getStateSelector. a Symbol" "actionSelector := actionSelector. a Symbol" "getLabelSelector := getLabelSelector. a Symbol" "getMenuSelector := getMenuSelector. a Symbol" shortcutCharacter := shortcutCharacter veryDeepCopyWith: deepCopier. askBeforeChanging := askBeforeChanging veryDeepCopyWith: deepCopier. triggerOnMouseDown := triggerOnMouseDown veryDeepCopyWith: deepCopier. offColor := offColor veryDeepCopyWith: deepCopier. onColor := onColor veryDeepCopyWith: deepCopier. feedbackColor := feedbackColor veryDeepCopyWith: deepCopier. + hoverColor := hoverColor veryDeepCopyWith: deepCopier. + borderColor := borderColor veryDeepCopyWith: deepCopier. + textColor := textColor veryDeepCopyWith: deepCopier. + labelOffset := labelOffset veryDeepCopyWith: deepCopier. - showSelectionFeedback := showSelectionFeedback veryDeepCopyWith: deepCopier. allButtons := nil. "a cache" arguments := arguments veryDeepCopyWith: deepCopier. argumentsProvider := argumentsProvider veryDeepCopyWith: deepCopier. "argumentsSelector := argumentsSelector. a Symbol" style := style. "a Symbol"! From commits at source.squeak.org Sun Jul 31 09:17:20 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 09:17:21 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.174.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.174.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.174 Author: mt Time: 31 July 2016, 11:17:03.77049 am UUID: f9224283-fd0c-3e47-8895-a070844b3e2a Ancestors: ToolBuilder-Morphic-mt.173 *** Widget Refactorings and UI Themes (Part 6 of 11) *** Some fixes and refactorings for buttons including added support for UI theming. =============== Diff against ToolBuilder-Morphic-mt.173 =============== Item was changed: PluggableButtonMorph subclass: #PluggableButtonMorphPlus + instanceVariableNames: 'enabled action getColorSelector getEnabledSelector updateMap disabledColor disabledTextColor' - instanceVariableNames: 'enabled action getColorSelector getEnabledSelector updateMap' classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Morphic'! !PluggableButtonMorphPlus commentStamp: 'ar 2/11/2005 21:53' prior: 0! An extended version of PluggableButtonMorph supporting enablement, color and block/message actions.! Item was added: + ----- Method: PluggableButtonMorphPlus class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ super themeProperties, { + { #disabledColor. 'Colors'. 'Color when button cannot be clicked.' }. + { #disabledTextColor. 'Colors'. 'Color for label when button cannot be clicked.' }. + }! Item was added: + ----- Method: PluggableButtonMorphPlus>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + + super applyUserInterfaceTheme.! Item was changed: ----- Method: PluggableButtonMorphPlus>>enabled: (in category 'accessing') ----- enabled: aBool enabled := aBool. + self updateFillStyle.! - enabled - ifFalse:[self color: Color gray] - ifTrue:[self getModelState - ifTrue: [self color: onColor] - ifFalse: [self color: offColor]]! Item was changed: ----- Method: PluggableButtonMorphPlus>>getEnabledSelector: (in category 'accessing') ----- getEnabledSelector: aSymbol getEnabledSelector := aSymbol. + self update: getEnabledSelector.! - self update: aSymbol.! Item was added: + ----- Method: PluggableButtonMorphPlus>>handlesMouseDown: (in category 'event handling') ----- + handlesMouseDown: evt + ^ enabled! Item was added: + ----- Method: PluggableButtonMorphPlus>>handlesMouseOver: (in category 'event handling') ----- + handlesMouseOver: evt + ^ enabled! Item was added: + ----- Method: PluggableButtonMorphPlus>>handlesMouseOverDragging: (in category 'event handling') ----- + handlesMouseOverDragging: evt + ^ enabled! Item was changed: ----- Method: PluggableButtonMorphPlus>>initialize (in category 'initialize-release') ----- initialize + - super initialize. enabled := true. + super initialize.! - onColor := Color veryLightGray. - offColor := Color white! Item was removed: - ----- Method: PluggableButtonMorphPlus>>mouseDown: (in category 'action') ----- - mouseDown: evt - enabled ifFalse:[^self]. - ^super mouseDown: evt! Item was removed: - ----- Method: PluggableButtonMorphPlus>>mouseMove: (in category 'action') ----- - mouseMove: evt - enabled ifFalse:[^self]. - ^super mouseMove: evt! Item was removed: - ----- Method: PluggableButtonMorphPlus>>mouseUp: (in category 'action') ----- - mouseUp: evt - enabled ifFalse:[^self]. - ^super mouseUp: evt! Item was removed: - ----- Method: PluggableButtonMorphPlus>>onColor:offColor: (in category 'accessing') ----- - onColor: colorWhenOn offColor: colorWhenOff - "Set the fill colors to be used when this button is on/off." - - onColor := colorWhenOn. - offColor := colorWhenOff. - self update: getStateSelector.! Item was added: + ----- Method: PluggableButtonMorphPlus>>setDefaultParameters (in category 'initialize-release') ----- + setDefaultParameters + + disabledColor := (self userInterfaceTheme disabledColor ifNil: [Color transparent]). + disabledTextColor := (self userInterfaceTheme disabledTextColor ifNil: [Color gray: 0.6]). + + super setDefaultParameters. + ! Item was added: + ----- Method: PluggableButtonMorphPlus>>textColorToUse (in category 'drawing') ----- + textColorToUse + + ^ self enabled + ifTrue: [super textColorToUse] + ifFalse: [disabledTextColor ifNil: [Color gray: 0.6]]! Item was changed: ----- Method: PluggableButtonMorphPlus>>update: (in category 'updating') ----- update: what + super update: what. + + getColorSelector ifNotNil: [:sel | + what == sel ifTrue: [self offColor: (model perform: sel)]]. - self getModelState - ifTrue: [self color: onColor] - ifFalse: [self color: offColor]. + getEnabledSelector ifNotNil: [:sel | + what == sel ifTrue: [self enabled: (model perform: sel)]]. - what ifNil:[^self]. - what == getLabelSelector ifTrue: [ - self label: (model perform: getLabelSelector)]. - what == getEnabledSelector ifTrue:[^self enabled: (model perform: getEnabledSelector)]. - - getColorSelector ifNotNil: [ | cc | - color = (cc := model perform: getColorSelector) ifFalse:[ - color := cc. - self onColor: color offColor: color. - self changed. - ]. - ]. - - getEnabledSelector ifNotNil:[ - self enabled: (model perform: getEnabledSelector). - ]. updateMap ifNotNil: [(updateMap at: what ifAbsent: []) + ifNotNilDo: [ :newTarget | self update: newTarget]]. - ifNotNilDo: [ :newTarget | ^self update: newTarget]]. ! Item was added: + ----- Method: PluggableButtonMorphPlus>>updateFillStylePressing:hovering: (in category 'initialize-release') ----- + updateFillStylePressing: isPressing hovering: isHovering + + enabled ifFalse: [ + self color: (disabledColor ifNil: [Color transparent]). + self borderStyle color: Color transparent. + ^ self]. + + super updateFillStylePressing: isPressing hovering: isHovering.! From commits at source.squeak.org Sun Jul 31 09:21:26 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 09:21:28 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1213.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1213.mcz ==================== Summary ==================== Name: Morphic-mt.1213 Author: mt Time: 31 July 2016, 11:20:50.02449 am UUID: c742cfa9-9c98-5a44-a7ad-28b28510a158 Ancestors: Morphic-mt.1212 *** Widget Refactorings and UI Themes (Part 6 of 11) *** Some fixes and refactorings for lists, trees, text boxes --- including added support for UI theming. =============== Diff against Morphic-mt.1212 =============== Item was added: + ----- Method: IndentingListItemMorph>>colorToUse (in category 'drawing') ----- + colorToUse + + ^ (self valueOfProperty: #wasRefreshed ifAbsent: [false]) + ifTrue: [complexContents highlightColor ifNil: [self highlightTextColor]] + ifFalse: [ + self isSelected ifTrue: [^ self selectionTextColor]. + complexContents preferredColor ifNil: [self color]]! Item was added: + ----- Method: IndentingListItemMorph>>drawHoverOn: (in category 'drawing') ----- + drawHoverOn: aCanvas + + aCanvas + fillRectangle: self bounds + color: self hoverColor.! Item was changed: ----- Method: IndentingListItemMorph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas | tRect sRect columnScanner columnLeft | self backgroundColor ifNotNil: [:c | aCanvas fillRectangle: self innerBounds color: c]. tRect := self toggleRectangle. self drawToggleOn: aCanvas in: tRect. sRect := bounds withLeft: tRect right + self hMargin. sRect := sRect top: sRect top + sRect bottom - self fontToUse height // 2. (container columns isNil or: [(contents asString indexOf: Character tab) = 0]) ifTrue: [ icon ifNotNil: [ aCanvas translucentImage: icon at: sRect left @ (self top + (self height - icon height // 2)). sRect := sRect left: sRect left + icon width + 2. ]. + aCanvas drawString: contents asString in: sRect font: self fontToUse color: self colorToUse. - aCanvas drawString: contents asString in: sRect font: self fontToUse color: color. ] ifFalse: [ columnLeft := sRect left. columnScanner := ReadStream on: contents asString. container columns withIndexDo: [ :widthSpec :column | | columnRect columnData columnWidth | "Draw icon." column = self class iconColumnIndex ifTrue: [ icon ifNotNil: [ aCanvas translucentImage: icon at: columnLeft @ (self top + (self height - icon height // 2)). columnLeft := columnLeft + icon width + 2]]. columnWidth := self widthOfColumn: column. columnRect := columnLeft @ sRect top extent: columnWidth @ sRect height. columnData := columnScanner upTo: Character tab. "Draw string." columnData ifNotEmpty: [ + aCanvas drawString: columnData in: columnRect font: self fontToUse color: self colorToUse]. - aCanvas drawString: columnData in: columnRect font: self fontToUse color: color]. "Compute next column offset." columnLeft := columnRect right + 5. column = 1 ifTrue: [columnLeft := columnLeft - tRect right + self left]. ]. ]! Item was added: + ----- Method: IndentingListItemMorph>>drawSelectionOn: (in category 'drawing') ----- + drawSelectionOn: aCanvas + + | fill | + fill := self selectionColor isColor + ifTrue: [SolidFillStyle color: self selectionColor] + ifFalse: [self selectionColor]. + fill isGradientFill ifTrue: [ + fill origin: self topLeft. + fill direction: 0@ self height]. + + aCanvas + fillRectangle: self bounds + fillStyle: fill.! Item was added: + ----- Method: IndentingListItemMorph>>filterColor (in category 'accessing') ----- + filterColor + + ^ self valueOfProperty: #filterColor ifAbsent: [Color yellow]! Item was added: + ----- Method: IndentingListItemMorph>>filterColor: (in category 'accessing') ----- + filterColor: aColor + + | cc fill | + cc := aColor. + + MenuMorph gradientMenu + ifFalse: [fill := SolidFillStyle color: cc] + ifTrue: [ + fill := GradientFillStyle ramp: { + 0.0 -> cc twiceLighter. + 1 -> cc twiceDarker }]. + + self setProperty: #filterColor toValue: fill.! Item was added: + ----- Method: IndentingListItemMorph>>filterTextColor (in category 'accessing') ----- + filterTextColor + + ^ self valueOfProperty: #filterTextColor ifAbsent: [Color black]! Item was added: + ----- Method: IndentingListItemMorph>>filterTextColor: (in category 'accessing') ----- + filterTextColor: aColor + + self setProperty: #filterTextColor toValue: aColor.! Item was added: + ----- Method: IndentingListItemMorph>>fitContents (in category 'accessing') ----- + fitContents + + super fitContents. + self width: container preferredSubmorphWidth.! Item was changed: + ----- Method: IndentingListItemMorph>>highlight (in category 'drawing') ----- - ----- Method: IndentingListItemMorph>>highlight (in category 'container protocol - private') ----- highlight - (self valueOfProperty: #wasRefreshed ifAbsent: [false]) - ifFalse: [self color: complexContents highlightingColor] - ifTrue: [self color: self color negated]. - self changed. ! Item was added: + ----- Method: IndentingListItemMorph>>highlightTextColor (in category 'accessing') ----- + highlightTextColor + + ^ self valueOfProperty: #highlightTextColor ifAbsent: [Color red]! Item was added: + ----- Method: IndentingListItemMorph>>highlightTextColor: (in category 'accessing') ----- + highlightTextColor: aColor + + self setProperty: #highlightTextColor toValue: aColor.! Item was added: + ----- Method: IndentingListItemMorph>>hoverColor (in category 'accessing') ----- + hoverColor + + ^ self valueOfProperty: #hoverColor ifAbsent: [Color veryLightGray]! Item was added: + ----- Method: IndentingListItemMorph>>hoverColor: (in category 'accessing') ----- + hoverColor: aColor + + self setProperty: #hoverColor toValue: aColor.! Item was added: + ----- Method: IndentingListItemMorph>>isSelected (in category 'testing') ----- + isSelected + + ^ container ifNil: [false] ifNotNil: [container selectedMorph == self]! Item was changed: ----- Method: IndentingListItemMorph>>refresh (in category 'initialization') ----- refresh self contents: self getLabel. icon := self getIcon. - self width: container preferredSubmorphWidth. (self valueOfProperty: #wasRefreshed ifAbsent: [false]) ifFalse: [ + self setProperty: #wasRefreshed toValue: true].! - self setProperty: #wasRefreshed toValue: true. - self color: Color yellow. "Indicate refresh operation."].! Item was added: + ----- Method: IndentingListItemMorph>>selectionColor (in category 'accessing') ----- + selectionColor + + ^ self valueOfProperty: #selectionColor ifAbsent: [Color blue]! Item was added: + ----- Method: IndentingListItemMorph>>selectionColor: (in category 'accessing') ----- + selectionColor: aColor + + | cc fill | + cc := aColor. + + MenuMorph gradientMenu + ifFalse: [fill := SolidFillStyle color: cc] + ifTrue: [ + fill := GradientFillStyle ramp: { + 0.0 -> cc twiceLighter. + 1 -> cc twiceDarker }]. + + self setProperty: #selectionColor toValue: fill.! Item was added: + ----- Method: IndentingListItemMorph>>selectionTextColor (in category 'accessing') ----- + selectionTextColor + + ^ self valueOfProperty: #selectionTextColor ifAbsent: [Color white]! Item was added: + ----- Method: IndentingListItemMorph>>selectionTextColor: (in category 'accessing') ----- + selectionTextColor: aColor + + self setProperty: #selectionTextColor toValue: aColor.! Item was changed: ----- Method: IndentingListItemMorph>>unhighlight (in category 'drawing') ----- unhighlight - (self valueOfProperty: #wasRefreshed ifAbsent: [false]) - ifFalse: [self color: complexContents preferredColor] - ifTrue: [self color: self color negated]. - self changed. ! Item was changed: Morph subclass: #LazyListMorph instanceVariableNames: 'listItems listIcons listFilterOffsets font selectedRow selectedRows preSelectedRow listSource maxWidth' + classVariableNames: '' - classVariableNames: 'ListPreSelectionColor ListSelectionColor ListSelectionTextColor' poolDictionaries: '' category: 'Morphic-Widgets'! !LazyListMorph commentStamp: 'efc 8/6/2005 11:34' prior: 0! The morph that displays the list in a PluggableListMorph. It is "lazy" because it will only request the list items that it actually needs to display. I will cache the maximum width of my items in maxWidth to avoid this potentially expensive and frequent computation.! Item was removed: - ----- Method: LazyListMorph class>>listFilterHighlightColor (in category 'preferences') ----- - listFilterHighlightColor - - ^ Color yellow paler alpha: 0.5! Item was removed: - ----- Method: LazyListMorph class>>listPreSelectionColor (in category 'preferences') ----- - listPreSelectionColor - - ^ ListPreSelectionColor ifNil: [Color r: 0.9 g: 0.9 b: 0.9]! Item was removed: - ----- Method: LazyListMorph class>>listPreSelectionColor: (in category 'preferences') ----- - listPreSelectionColor: aColor - - ListPreSelectionColor := aColor. - World invalidRect: World bounds from: World.! Item was removed: - ----- Method: LazyListMorph class>>listSelectionColor (in category 'preferences') ----- - listSelectionColor - - ^ ListSelectionColor ifNil: [Color r: 0.72 g: 0.72 b: 0.9]! Item was removed: - ----- Method: LazyListMorph class>>listSelectionColor: (in category 'preferences') ----- - listSelectionColor: aColor - - ListSelectionColor := aColor. - World invalidRect: World bounds from: World.! Item was removed: - ----- Method: LazyListMorph class>>listSelectionTextColor (in category 'preferences') ----- - listSelectionTextColor - - ^ ListSelectionTextColor ifNil: [Color black]! Item was removed: - ----- Method: LazyListMorph class>>listSelectionTextColor: (in category 'preferences') ----- - listSelectionTextColor: aColor - - ListSelectionTextColor := aColor. - World invalidRect: World bounds from: World.! Item was changed: ----- Method: LazyListMorph>>colorForRow: (in category 'drawing') ----- colorForRow: row ^(selectedRow notNil and: [ row = selectedRow]) + ifTrue: [ self selectionTextColor ] - ifTrue: [ self class listSelectionTextColor ] ifFalse: [ self color ].! Item was changed: ----- Method: LazyListMorph>>display:atRow:on: (in category 'drawing') ----- display: item atRow: row on: canvas "display the given item at row row" | drawBounds emphasized rowColor itemAsText | itemAsText := item asStringOrText. "If it is a text, we will only use the first character's emphasis." emphasized := itemAsText isText ifTrue: [font emphasized: (itemAsText emphasisAt: 1)] ifFalse: [font]. rowColor := itemAsText isText ifTrue: [itemAsText colorAt: 1 ifNone: [self colorForRow: row]] ifFalse: [self colorForRow: row]. drawBounds := (self drawBoundsForRow: row) translateBy: (self hMargin @ 0). drawBounds := drawBounds intersect: self bounds. "Draw icon if existing. Adjust draw bounds in that case." (self icon: row) ifNotNil: [ :icon || top | top := drawBounds top + ((drawBounds height - icon height) // 2). canvas translucentImage: icon at: drawBounds left @ top. drawBounds := drawBounds left: drawBounds left + icon width + 2 ]. - - "Draw filter matches if any." - (self filterOffsets: row) do: [:offset | - canvas - frameAndFillRoundRect: ((drawBounds left + offset first) @ drawBounds top corner: (drawBounds left + offset last) @ drawBounds bottom) - radius: 3 - fillStyle: self class listFilterHighlightColor - borderWidth: 1 - borderColor: self class listFilterHighlightColor twiceDarker]. "We will only draw strings here." canvas drawString: itemAsText asString in: drawBounds font: emphasized + color: rowColor. + + "Draw filter matches if any." + self + displayFilterOn: canvas + for: row + in: drawBounds + font: emphasized.! - color: rowColor.! Item was added: + ----- Method: LazyListMorph>>displayFilterOn:for:in:font: (in category 'drawing') ----- + displayFilterOn: canvas for: row in: drawBounds font: font + "Draw filter matches if any." + + | fill | + fill := self filterColor isColor + ifTrue: [SolidFillStyle color: self filterColor] + ifFalse: [self filterColor]. + fill isGradientFill ifTrue: [ + fill origin: drawBounds topLeft. + fill direction: 0@ drawBounds height]. + + (self filterOffsets: row) do: [:offset | | r | + r := ((drawBounds left + offset first first) @ drawBounds top corner: (drawBounds left + offset first last) @ drawBounds bottom). + canvas + frameAndFillRoundRect: (r outsetBy: 1@0) + radius: 3 + fillStyle: fill + borderWidth: 1 + borderColor: fill asColor twiceDarker. + canvas + drawString: offset second + in: r + font: font + color: self filterTextColor].! Item was changed: ----- Method: LazyListMorph>>drawBackgroundForMulti:on: (in category 'drawing') ----- drawBackgroundForMulti: row on: aCanvas "shade the background paler, if this row is selected, but not the current selected row" + | selectionDrawBounds | + selectedRow = row ifTrue: [^ self]. - | selectionDrawBounds thisColor | - thisColor := selectedRow = row - ifTrue: [ self class listSelectionColor twiceDarker ] - ifFalse: [ self class listSelectionColor ]. selectionDrawBounds := self drawBoundsForRow: row. selectionDrawBounds := selectionDrawBounds intersect: self bounds. aCanvas fillRectangle: selectionDrawBounds + color: self multiSelectionColor! - color: thisColor! Item was removed: - ----- Method: LazyListMorph>>drawBackgroundForPotentialDrop:on: (in category 'drawing') ----- - drawBackgroundForPotentialDrop: row on: aCanvas - | selectionDrawBounds | - "shade the background darker, if this row is a potential drop target" - - selectionDrawBounds := self drawBoundsForRow: row. - selectionDrawBounds := selectionDrawBounds intersect: self bounds. - aCanvas fillRectangle: selectionDrawBounds color: self color muchLighter darker! Item was changed: ----- Method: LazyListMorph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas | topRow bottomRow | listItems ifEmpty: [ ^self ]. + + self drawPreSelectionOn: aCanvas. + - - self - drawPreSelectionOn: aCanvas; - drawSelectionOn: aCanvas. - topRow := self topVisibleRowForCanvas: aCanvas. bottomRow := self bottomVisibleRowForCanvas: aCanvas. "Draw multi-selection." topRow to: bottomRow do: [ :row | (listSource itemSelectedAmongMultiple: row) ifTrue: [ self drawBackgroundForMulti: row on: aCanvas ] ]. + self drawSelectionOn: aCanvas. "Draw hovered row if preference enabled." PluggableListMorph highlightHoveredRow ifTrue: [ listSource hoverRow > 0 ifTrue: [ self highlightHoverRow: listSource hoverRow on: aCanvas ] ]. "Draw all visible rows." topRow to: bottomRow do: [ :row | self display: (self item: row) atRow: row on: aCanvas ]. "Finally, highlight drop row for drag/drop operations.." listSource potentialDropRow > 0 ifTrue: [ self highlightPotentialDropRow: listSource potentialDropRow on: aCanvas ].! Item was changed: ----- Method: LazyListMorph>>drawPreSelectionOn: (in category 'drawing') ----- drawPreSelectionOn: aCanvas self drawSelectionFor: preSelectedRow + withColor: self preSelectionColor - withColor: self class listPreSelectionColor on: aCanvas! Item was changed: ----- Method: LazyListMorph>>drawSelectionFor:withColor:on: (in category 'drawing') ----- drawSelectionFor: index withColor: color on: aCanvas + | selectionDrawBounds fill | - | selectionDrawBounds | index ifNil: [ ^self ]. index = 0 ifTrue: [ ^self ]. selectionDrawBounds := self drawBoundsForRow: index. selectionDrawBounds := selectionDrawBounds intersect: self bounds. + + fill := color isColor + ifTrue: [SolidFillStyle color: color] + ifFalse: [color]. + fill isGradientFill ifTrue: [ + fill origin: selectionDrawBounds topLeft. + fill direction: 0@ selectionDrawBounds height]. + + aCanvas fillRectangle: selectionDrawBounds fillStyle: fill.! - aCanvas fillRectangle: selectionDrawBounds color: color.! Item was changed: ----- Method: LazyListMorph>>drawSelectionOn: (in category 'drawing') ----- drawSelectionOn: aCanvas self drawSelectionFor: selectedRow + withColor: self selectionColor - withColor: self class listSelectionColor on: aCanvas! Item was added: + ----- Method: LazyListMorph>>filterColor (in category 'accessing') ----- + filterColor + ^ self valueOfProperty: #filterColor ifAbsent: [Color yellow]! Item was added: + ----- Method: LazyListMorph>>filterColor: (in category 'accessing') ----- + filterColor: aColor + + | cc fill | + cc := aColor. + + MenuMorph gradientMenu + ifFalse: [fill := SolidFillStyle color: cc] + ifTrue: [ + fill := GradientFillStyle ramp: { + 0.0 -> cc twiceLighter. + 1 -> cc twiceDarker }]. + + self setProperty: #filterColor toValue: fill! Item was added: + ----- Method: LazyListMorph>>filterTextColor (in category 'accessing') ----- + filterTextColor + ^ self valueOfProperty: #filterTextColor ifAbsent: [Color black]! Item was changed: ----- Method: LazyListMorph>>getFilterOffsets: (in category 'list access') ----- getFilterOffsets: row "Calculate matching character indexes for the current filter term." + | item filter offsets currentIndex sub | - | item filter offsets currentIndex | filter := listSource filterTerm. filter ifEmpty: [^ Array empty]. item := (self item: row) asStringOrText asString. "See row drawing. Strings only." offsets := OrderedCollection new. currentIndex := 1. [currentIndex > 0] whileTrue: [ currentIndex := item findString: filter startingAt: currentIndex caseSensitive: false. currentIndex > 0 ifTrue: [ | left width | left := font widthOfString: item from: 1 to: currentIndex-1. + sub := item copyFrom: currentIndex to: currentIndex + filter size - 1. + width := font widthOfString: sub. + offsets addLast: {(left to: left + width). sub}. - width := font widthOfString: item from: currentIndex to: currentIndex + filter size - 1. - offsets addLast: (left to: left + width). currentIndex := currentIndex + 1] ]. ^ offsets! Item was changed: ----- Method: LazyListMorph>>highlightHoverRow:on: (in category 'drawing') ----- highlightHoverRow: row on: aCanvas | drawBounds | drawBounds := self drawBoundsForRow: row. drawBounds := drawBounds intersect: self bounds. + aCanvas fillRectangle: drawBounds color: self hoverColor.! - aCanvas fillRectangle: drawBounds color: (self class listSelectionColor darker alpha: 0.3).! Item was changed: ----- Method: LazyListMorph>>highlightPotentialDropRow:on: (in category 'drawing') ----- highlightPotentialDropRow: row on: aCanvas | drawBounds | drawBounds := self drawBoundsForRow: row. drawBounds := drawBounds intersect: self bounds. + aCanvas frameRectangle: drawBounds color: self selectionColor asColor! - aCanvas frameRectangle: drawBounds color: Color blue! Item was added: + ----- Method: LazyListMorph>>hoverColor (in category 'accessing') ----- + hoverColor + ^ self valueOfProperty: #hoverColor ifAbsent: [Color veryVeryLightGray]! Item was added: + ----- Method: LazyListMorph>>multiSelectionColor (in category 'accessing') ----- + multiSelectionColor + + ^ self valueOfProperty: #multiSelectionColor ifAbsent: [self selectionColor asColor]! Item was added: + ----- Method: LazyListMorph>>multiSelectionColor: (in category 'accessing') ----- + multiSelectionColor: aColor + + self setProperty: #multiSelectionColor toValue: aColor.! Item was added: + ----- Method: LazyListMorph>>preSelectionColor (in category 'accessing') ----- + preSelectionColor + ^ self valueOfProperty: #preSelectionColor ifAbsent: [Color gray]! Item was added: + ----- Method: LazyListMorph>>resetFilterOffsets (in category 'list access') ----- + resetFilterOffsets + + listFilterOffsets := nil.! Item was added: + ----- Method: LazyListMorph>>selectionColor (in category 'accessing') ----- + selectionColor + ^ self valueOfProperty: #selectionColor ifAbsent: [Color blue]! Item was added: + ----- Method: LazyListMorph>>selectionColor: (in category 'accessing') ----- + selectionColor: aColor + + | cc fill | + cc := aColor. + + MenuMorph gradientMenu + ifFalse: [fill := SolidFillStyle color: cc] + ifTrue: [ + fill := GradientFillStyle ramp: { + 0.0 -> cc twiceLighter. + 1 -> cc twiceDarker }]. + + self setProperty: #selectionColor toValue: fill! Item was added: + ----- Method: LazyListMorph>>selectionTextColor (in category 'accessing') ----- + selectionTextColor + ^ self valueOfProperty: #selectionTextColor ifAbsent: [Color white]! Item was added: + ----- Method: ListItemWrapper>>highlightColor (in category 'accessing') ----- + highlightColor + "You can override the current theme's default with a custom value." + + ^ nil! Item was removed: - ----- Method: ListItemWrapper>>highlightingColor (in category 'accessing') ----- - highlightingColor - - ^ LazyListMorph listSelectionColor makeForegroundColor! Item was changed: ----- Method: ListItemWrapper>>preferredColor (in category 'accessing') ----- preferredColor + "You can override the current theme's default with a custom value." + + ^ nil! - ^ Color black! Item was changed: Object subclass: #NewParagraph + instanceVariableNames: 'text textStyle firstCharacterIndex container lines positionWhenComposed offsetToEnd maxRightX selectionStart selectionStop wantsColumnBreaks focused caretRect showCaret caretColor selectionColor unfocusedSelectionColor' - instanceVariableNames: 'text textStyle firstCharacterIndex container lines positionWhenComposed offsetToEnd maxRightX selectionStart selectionStop wantsColumnBreaks focused caretRect showCaret' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Text Support'! !NewParagraph commentStamp: '' prior: 0! A Paragraph represents text that has been laid out, or composed, in some container. text A Text with encoded per-character emphasis. textStyle A TextStyle with font set, line height and horizontal alignment. firstCharacterIndex The starting index in text for this paragraph, allowing composition of a long text into a number of containers. container A Rectangle or TextContainer that determines where text can go. lines An Array of TextLines comprising the final layout of the text after it has been composed within its container. positionWhenComposed As its name implies. Allows display at new locations without the need to recompose the text. Lines are ordered vertically. However, for a given y, there may be several lines in left to right order. Lines must never be empty, even if text is empty. Notes on yet another hack - 5 Feb 2001 We really need to clean up #composeLinesFrom:to:delta:into:priorLines:atY:!!!!!! I added one more habdful of code to correct: This is an annoying bug that's been around for a couple of years, but I finally figured out how to duplicate the problem, so I figured I'd just report it now. (It doesn't necessarily have to be fixed for 3.0 if it looks messy, but if it's a simple fix, it would be worth it.) In Morphic, if you have the following text in a workspace: This is line 1 This is line 2 **and** you have a return character after line 2, you will normally be able to click the mouse two times below line 2 in order to select all the text. If you edit line 2 (e.g. so that it reads "line number 2"), you can still select all the text by clicking below the second line. However, if you edit line 1, you will not be able to select all the text from the bottom in the same way. Things get messed up such that the last return character seems to be gone. In this state, if you position the cursor immediately after the 2, and press the right arrow, the cursor jumps to the beginning of line 2... oof. (report by Doug Way) While I don't have a very deep understanding of the above mentioned method, I was able to determine that text ending in a CR worked better in the editor when the last entry in had a start of text size + 1 and a stop of text size. I have accordingly added code near the end to ensure this. It seems to have fixed the problem, but we do need to clean this baby up some day. - Bob ! Item was added: + ----- Method: NewParagraph>>caretColor (in category 'access') ----- + caretColor + ^ caretColor ifNil: [Color red]! Item was added: + ----- Method: NewParagraph>>caretColor: (in category 'access') ----- + caretColor: aColor + caretColor := aColor.! Item was changed: ----- Method: NewParagraph>>caretWidth (in category 'access') ----- caretWidth ^ Editor dumbbellCursor ifTrue: [ 3 ] + ifFalse: [ 2 ]! - ifFalse: [ 1 ]! Item was added: + ----- Method: NewParagraph>>displayDumbbellCursorOn:at:in: (in category 'display') ----- + displayDumbbellCursorOn: aCanvas at: leftX in: line + + | w | + w := 2. + self focused ifFalse: [^ w]. + + 1 to: w + do: + [:i | + "Draw caret triangles at top and bottom" + + aCanvas fillRectangle: ((leftX - w + i - 1) @ (line top + i - 1) + extent: ((w - i) * 2 + 3) @ 1) + color: self caretColor. + aCanvas fillRectangle: ((leftX - w + i - 1) @ (line bottom - i) + extent: ((w - i) * 2 + 3) @ 1) + color: self caretColor]. + + aCanvas + line: leftX @ line top + to: leftX @ (line bottom-1) + color: self caretColor. + + ^ w! Item was changed: ----- Method: NewParagraph>>displaySelectionInLine:on: (in category 'display') ----- displaySelectionInLine: line on: aCanvas + | leftX rightX w | - | leftX rightX w caretColor | selectionStart ifNil: [^self]. "No selection" aCanvas isShadowDrawing ifTrue: [ ^self ]. "don't draw selection with shadow" selectionStart = selectionStop ifTrue: ["Only show caret on line where clicked" selectionStart textLine ~= line ifTrue: [^self]] + ifFalse: - ifFalse: ["Test entire selection before or after here" (selectionStop stringIndex < line first or: [selectionStart stringIndex > (line last + 1)]) ifTrue: [^self]. "No selection on this line" (selectionStop stringIndex = line first and: [selectionStop textLine ~= line]) ifTrue: [^self]. "Selection ends on line above" (selectionStart stringIndex = (line last + 1) and: [selectionStop textLine ~= line]) ifTrue: [^self]]. "Selection begins on line below" leftX := (selectionStart stringIndex < line first ifTrue: [line ] ifFalse: [selectionStart ])left. rightX := (selectionStop stringIndex > (line last + 1) or: [selectionStop stringIndex = (line last + 1) and: [selectionStop textLine ~= line]]) ifTrue: [line right] ifFalse: [selectionStop left]. selectionStart = selectionStop + ifTrue: [ + rightX := rightX + 1. + caretRect := (leftX-2) @ line top corner: (rightX+2)@ line bottom. "sigh..." + self showCaret ifFalse: [^self]. + w := (Editor dumbbellCursor + ifTrue: [self displayDumbbellCursorOn: aCanvas at: leftX in: line] + ifFalse: [self displaySimpleCursorOn: aCanvas at: leftX in: line]). + caretRect := (leftX-w) @ line top corner: (rightX+w)@ line bottom] + ifFalse: [ + caretRect := nil. - ifTrue: - [rightX := rightX + 1. - w := self caretWidth-1. - caretRect := (leftX-w) @ line top corner: (rightX+w)@ line bottom. - self showCaret ifFalse:[^self]. - caretColor := self insertionPointColor. - 1 to: w - do: - [:i | - "Draw caret triangles at top and bottom" - - aCanvas fillRectangle: ((leftX - w + i - 1) @ (line top + i - 1) - extent: ((w - i) * 2 + 3) @ 1) - color: caretColor. - aCanvas fillRectangle: ((leftX - w + i - 1) @ (line bottom - i) - extent: ((w - i) * 2 + 3) @ 1) - color: caretColor]. aCanvas fillRectangle: (leftX @ line top corner: rightX @ line bottom) + color: (self focused ifTrue: [self selectionColor] ifFalse: [self unfocusedSelectionColor])]! - color: caretColor] - ifFalse: - [caretRect := nil. - aCanvas fillRectangle: (leftX @ line top corner: rightX @ line bottom) - color: self selectionColor]! Item was added: + ----- Method: NewParagraph>>displaySimpleCursorOn:at:in: (in category 'display') ----- + displaySimpleCursorOn: aCanvas at: leftX in: line + + self focused ifFalse: [^ 1]. + + aCanvas + line: leftX @ (line top+1) + to: leftX @ (line bottom-1) + color: self caretColor. + + aCanvas + line: leftX+1 @ (line top+1) + to: leftX+1 @ (line bottom-1) + color: (self caretColor alpha: 0.3). + + ^ 1! Item was removed: - ----- Method: NewParagraph>>insertionPointColor (in category 'display') ----- - insertionPointColor - self focused ifFalse: [^ Color transparent]. - ^ Display depth <= 2 - ifTrue: [Color black] - ifFalse: [Preferences insertionPointColor]! Item was changed: + ----- Method: NewParagraph>>selectionColor (in category 'access') ----- - ----- Method: NewParagraph>>selectionColor (in category 'display') ----- selectionColor + ^ selectionColor ifNil: [Color blue muchLighter]! - | color | - Display depth = 1 ifTrue: [^ Color veryLightGray]. - Display depth = 2 ifTrue: [^ Color gray]. - color := Preferences textHighlightColor. - self focused ifFalse: [color := Color gray: 0.9]. - ^ color! Item was added: + ----- Method: NewParagraph>>selectionColor: (in category 'access') ----- + selectionColor: aColor + selectionColor := aColor.! Item was added: + ----- Method: NewParagraph>>unfocusedSelectionColor (in category 'access') ----- + unfocusedSelectionColor + ^ unfocusedSelectionColor ifNil: [Color gray: 0.9]! Item was added: + ----- Method: NewParagraph>>unfocusedSelectionColor: (in category 'access') ----- + unfocusedSelectionColor: aColor + unfocusedSelectionColor := aColor.! Item was added: + ----- Method: PluggableListMorph class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ super themeProperties, { + { #font. 'Fonts'. 'Font of the list items.' }. + { #textColor. 'Colors'. 'Color of the list items.' }. + { #selectionColor. 'Colors'. 'Color used for items when hovering or selecting them.' }. + { #multiSelectionColor. 'Colors'. 'Colors used for items that are selected among others.'}. + { #selectionTextColor. 'Colors'. 'Color used for label when hovering or selecting them.' }. + { #filterColor. 'Colors'. 'Color used for items to indicate the matching filter.' }. + { #filterTextColor. 'Colors'. 'Color used for items to indicate the matching filter.' }. + + { #preSelectionModifier. 'Colors'. 'How to derive the pre-selection color from the selection color.'}. + { #hoverSelectionModifier. 'Colors'. 'How to derive the hover color from the selection color.'}. + }! Item was added: + ----- Method: PluggableListMorph>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + + super applyUserInterfaceTheme.! Item was changed: ----- Method: PluggableListMorph>>indicateUnfiltered (in category 'filtering') ----- indicateUnfiltered + ! - self color: Color white! Item was removed: - ----- Method: PluggableListMorph>>listItemHeight (in category 'initialization') ----- - listItemHeight - "This should be cleaned up. The list should get spaced by this parameter." - ^ 12! Item was changed: ----- Method: PluggableListMorph>>on:list:selected:changeSelected:menu:keystroke: (in category 'initialization') ----- on: anObject list: getListSel selected: getSelectionSel changeSelected: setSelectionSel menu: getMenuSel keystroke: keyActionSel self model: anObject. getListSelector := getListSel. getIndexSelector := getSelectionSel. setIndexSelector := setSelectionSel. getMenuSelector := getMenuSel. keystrokeActionSelector := keyActionSel. autoDeselect := true. - self borderWidth: 1. self updateList. self selectionIndex: self getCurrentSelectionIndex. self initForKeystrokes! Item was added: + ----- Method: PluggableListMorph>>setDefaultParameters (in category 'initialization') ----- + setDefaultParameters + + super setDefaultParameters. + + self + font: (self userInterfaceTheme font ifNil: [TextStyle defaultFont]); + textColor: (self userInterfaceTheme textColor ifNil: [Color black]). + + self setListParameters.! Item was added: + ----- Method: PluggableListMorph>>setListParameters (in category 'initialization') ----- + setListParameters + + self listMorph + selectionColor: (self userInterfaceTheme selectionColor ifNil: [Color r: 0.72 g: 0.72 b: 0.9]); + multiSelectionColor: (self userInterfaceTheme multiSelectionColor ifNil: [(Color r: 0.72 g: 0.72 b: 0.9) lighter]); + setProperty: #selectionTextColor + toValue: (self userInterfaceTheme selectionTextColor ifNil: [Color black]); + filterColor: (self userInterfaceTheme filterColor ifNil: [Color yellow paler]); + setProperty: #filterTextColor + toValue: (self userInterfaceTheme filterTextColor ifNil: [Color black]); + + setProperty: #preSelectionColor + toValue: ((self userInterfaceTheme preSelectionModifier ifNil: [ [:c | Color gray: 0.9] ]) value: self listMorph selectionColor asColor); + setProperty: #hoverColor + toValue: ((self userInterfaceTheme hoverSelectionModifier ifNil: [ [:c | c darker alpha: 0.3] ]) value: self listMorph selectionColor asColor)! Item was changed: ----- Method: PluggableTextMorph class>>adornmentWithColor: (in category 'frame adornments') ----- adornmentWithColor: aColor "Create and return a frame adornment with the given color" | size box form fillStyle | ^self adornmentCache at: aColor ifAbsentPut:[ + size := 20. - size := 25. box := 0@0 extent: size asPoint. form := Form extent: size@size depth: 32. + fillStyle := MenuMorph gradientMenu ifFalse: [SolidFillStyle color: aColor] ifTrue: [ + (GradientFillStyle ramp: { + 0.0->(aColor alpha: 0.01). + 0.8->aColor. + 1.0->aColor}) + origin: box topRight - (size@0); + direction: (size @ size negated) // 4; + radial: false]. - fillStyle := (GradientFillStyle ramp: { - 0.0->(Color white alpha: 0.01). - 0.8->aColor. - 1.0->aColor}) - origin: box topRight - (size@0); - direction: (size @ size negated) // 4; - radial: false. form getCanvas drawPolygon: { box topRight. box topRight + (0@size). box topRight - (size@0) } fillStyle: fillStyle. form]. ! Item was added: + ----- Method: PluggableTextMorph class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ super themeProperties, { + { #font. 'Fonts'. 'Font for text if not styled.' }. + { #textColor. 'Colors'. 'Color for text if not styled.' }. + { #caretColor. 'Colors'. 'The color of the text cursor.' }. + { #selectionColor. 'Colors'. 'The color of the text selection.' }. + { #unfocusedSelectionModifier. 'Colors'. 'How to derive the text selection color if not focused.' }. + + { #adornmentReadOnly. 'Color'. 'How to indicate read-only contents.' }. + { #adornmentRefuse. 'Color'. 'How to indicate that the model refuses to accept.' }. + { #adornmentConflict. 'Color'. 'How to indicate that there are editing conflicts.' }. + { #adornmentDiff. 'Color'. 'How to indicate that the model wants diff feedback.' }. + { #adornmentNormalEdit. 'Color'. 'How to indicate that there are unaccepted edits.' }. + { #adornmentDiffEdit. 'Color'. 'How to indicate that there are unaccepted edits in a diff view.' }. + + { #wrapBorderColorModifier. 'Color'. 'How to indicate a specific wrap border.' }. + }! Item was added: + ----- Method: PluggableTextMorph>>adoptPaneColor: (in category 'accessing') ----- + adoptPaneColor: aColor + + super adoptPaneColor: aColor. + + self wrapBorderColor: ((self userInterfaceTheme wrapBorderColorModifier ifNil: [ [:c | c muchLighter alpha: 0.3] ]) + value: self borderColor).! Item was added: + ----- Method: PluggableTextMorph>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + + super applyUserInterfaceTheme. + self textMorph releaseParagraph; paragraph.! Item was changed: ----- Method: PluggableTextMorph>>drawFrameAdornmentsOn: (in category 'drawing') ----- drawFrameAdornmentsOn: aCanvas "Include a thin red inset border for unaccepted edits, or, if the unaccepted edits are known to conflict with a change made somewhere else to the same method (typically), put a thick red frame" self wantsFrameAdornments ifFalse: [^ self]. + self readOnly ifTrue: [^ self drawFrameAdornment: (self valueOfProperty: #adornmentReadOnly ifAbsent: [Color black]) on: aCanvas]. - self readOnly ifTrue: [^ self drawFrameAdornment: Color black on: aCanvas]. (model notNil and: [model refusesToAcceptCode]) ifTrue: [ "Put up feedback showing that code cannot be submitted in this state" + ^ self drawFrameAdornment: (self valueOfProperty: #adornmentRefuse ifAbsent: [Color tan]) on: aCanvas]. - ^ self drawFrameAdornment: Color tan on: aCanvas]. self hasEditingConflicts + ifTrue: [^ self drawFrameAdornment: (self valueOfProperty: #adornmentConflict ifAbsent: [Color red]) on: aCanvas]. - ifTrue: [^ self drawFrameAdornment: Color red on: aCanvas]. self hasUnacceptedEdits ifTrue: [ model wantsDiffFeedback + ifTrue: [self drawFrameAdornment: (self valueOfProperty: #adornmentDiffEdit ifAbsent: [Color yellow]) on: aCanvas] + ifFalse: [self drawFrameAdornment: (self valueOfProperty: #adornmentNormalEdit ifAbsent: [Color orange]) on: aCanvas]. - ifTrue: [self drawFrameAdornment: Color yellow on: aCanvas] - ifFalse: [self drawFrameAdornment: Color orange on: aCanvas]. ^ self]. model wantsDiffFeedback + ifTrue: [self drawFrameAdornment: (self valueOfProperty: #adornmentDiff ifAbsent: [Color green]) on: aCanvas].! - ifTrue: [self drawFrameAdornment: Color green on: aCanvas].! Item was changed: ----- Method: PluggableTextMorph>>drawWrapBorderOn: (in category 'drawing') ----- drawWrapBorderOn: aCanvas | offset rect | self wantsWrapBorder ifFalse: [^ self]. textMorph ifNil: [^ self]. offset := textMorph margins isRectangle ifTrue: [textMorph margins left] ifFalse: [textMorph margins isPoint ifTrue: [textMorph margins x] ifFalse: [textMorph margins]]. offset := offset + ((textMorph textStyle defaultFont widthOf: $x) * self class visualWrapBorderLimit). offset > self width ifTrue: [^ self]. rect := scroller topLeft + (offset @ 0) corner: scroller bottomRight. aCanvas fillRectangle: rect + color: self wrapBorderColor. - color: (self borderStyle color muchLighter alpha: 0.3). aCanvas line: rect topLeft to: rect bottomLeft width: self borderStyle width + color: (self wrapBorderColor muchDarker alpha: 0.5).! - color: (self borderStyle color alpha: 0.5).! Item was changed: ----- Method: PluggableTextMorph>>initialize (in category 'initialization') ----- initialize + + self initializeTextMorph. - "initialize the state of the receiver" super initialize. + hasUnacceptedEdits := false. hasEditingConflicts := false. askBeforeDiscardingEdits := true. + self minimumWidth: (TextStyle defaultFont widthOf: $m) * 10. + + scroller addMorph: textMorph. + + "Reset minExtent because only now we can anser #isAutoFit correctly." + self minimumExtent: 0@0; updateMinimumExtent.! - self minimumWidth: (TextStyle defaultFont widthOf: $m) * 10.! Item was added: + ----- Method: PluggableTextMorph>>initializeTextMorph (in category 'initialization') ----- + initializeTextMorph + + textMorph := self textMorphClass new + margins: (3@0 corner: 0@0); + setEditView: self; + autoFit: true; + setProperty: #indicateKeyboardFocus toValue: #never; + yourself.! Item was changed: ----- Method: PluggableTextMorph>>on:text:accept:readSelection:menu: (in category 'initialization') ----- on: anObject text: getTextSel accept: setTextSel readSelection: getSelectionSel menu: getMenuSel self model: anObject. getTextSelector := getTextSel. setTextSelector := setTextSel. getSelectionSelector := getSelectionSel. getMenuSelector := getMenuSel. - self borderWidth: 1. self setText: self getText. self setSelection: self getSelection.! Item was added: + ----- Method: PluggableTextMorph>>setDefaultParameters (in category 'initialization') ----- + setDefaultParameters + + super setDefaultParameters. + + self + font: (self userInterfaceTheme font ifNil: [TextStyle defaultFont]); + setTextColor: (self userInterfaceTheme textColor ifNil: [Color black]). + + self wrapBorderColor: ((self userInterfaceTheme wrapBorderColorModifier ifNil: [ [:c | c muchLighter alpha: 0.3] ]) + value: self borderColor). + + self + setProperty: #adornmentReadOnly + toValue: (self userInterfaceTheme adornmentReadOnly ifNil: [Color black]); + setProperty: #adornmentRefuse + toValue: (self userInterfaceTheme adornmentRefuse ifNil: [Color tan]); + setProperty: #adornmentConflict + toValue: (self userInterfaceTheme adornmentConflict ifNil: [Color red]); + setProperty: #adornmentDiff + toValue: (self userInterfaceTheme adornmentDiff ifNil: [Color green]); + setProperty: #adornmentNormalEdit + toValue: (self userInterfaceTheme adornmentNormalEdit ifNil: [Color orange]); + setProperty: #adornmentDiffEdit + toValue: (self userInterfaceTheme adornmentDiffEdit ifNil: [Color yellow]). + + textMorph + setProperty: #caretColor + toValue: (self userInterfaceTheme caretColor ifNil: [Color red]); + setProperty: #selectionColor + toValue: (self userInterfaceTheme selectionColor ifNil: [TranslucentColor r: 0.0 g: 0.0 b: 0.8 alpha: 0.2]); + setProperty: #unfocusedSelectionColor + toValue: ((self userInterfaceTheme unfocusedSelectionModifier ifNil: [ [:c | Color gray: 0.9] ]) + value: textMorph selectionColor).! Item was changed: ----- Method: PluggableTextMorph>>setText: (in category 'model access') ----- setText: aText + + textMorph newContents: aText. - textMorph - ifNil: [textMorph := self textMorphClass new - contents: aText - wrappedTo: self innerBounds width. - textMorph - margins: (3@0 corner: 0@0); - setEditView: self; - autoFit: true; - setProperty: #indicateKeyboardFocus toValue: #never. - scroller addMorph: textMorph. - "Reset minExtent because only now we can anser #isAutoFit correctly." - self minimumExtent: 0@0; updateMinimumExtent] - ifNotNil: [textMorph newContents: aText]. self hasUnacceptedEdits: false. + self setScrollDeltas. - self setScrollDeltas. - self changed. "Redraw the whole area. For example, it might not be necssary to draw the help text anymore."! Item was added: + ----- Method: PluggableTextMorph>>wrapBorderColor (in category 'accessing') ----- + wrapBorderColor + + ^ self valueOfProperty: #wrapBorderColor ifAbsent: [Color gray alpha: 0.3]! Item was added: + ----- Method: PluggableTextMorph>>wrapBorderColor: (in category 'accessing') ----- + wrapBorderColor: aColor + + self setProperty: #wrapBorderColor toValue: aColor. + self changed.! Item was removed: - ----- Method: ScrollBar class>>createArrowOfDirection:in: (in category 'images') ----- - createArrowOfDirection: aSymbol in: aRectangle - "PRIVATE - create an arrow bounded in aRectangle" - - | arrow vertices | - vertices := Preferences alternativeButtonsInScrollBars - ifTrue: [self verticesForComplexArrow: aRectangle] - ifFalse: [self verticesForSimpleArrow: aRectangle]. - "" - arrow := PolygonMorph - vertices: vertices - color: Color transparent - borderWidth: 0 - borderColor: Color black. - "" - arrow bounds: (arrow bounds insetBy: (aRectangle width / 6) rounded). - "" - Preferences alternativeButtonsInScrollBars - ifTrue: [arrow rotationDegrees: 45]. - "" - aSymbol == #right - ifTrue: [arrow rotationDegrees: arrow rotationDegrees + 90]. - aSymbol == #bottom - ifTrue: [arrow rotationDegrees: arrow rotationDegrees + 180]. - aSymbol == #left - ifTrue: [arrow rotationDegrees: arrow rotationDegrees + 270]. - "" - ^arrow! Item was changed: ----- Method: ScrollBar class>>createArrowOfDirection:size:color: (in category 'images') ----- + createArrowOfDirection: aSymbolDirection size: size color: aColor + "PRIVATE - create an arrow with aSymbolDirectionDirection, finalSizeInteger and aColor - createArrowOfDirection: aSymbolDirection size: finalSizeInteger color: aColor - "PRIVATE - create an arrow with aSymbolDirectionDirection, - finalSizeInteger and aColor - aSymbolDirectionDirection = #top, #bottom. #left or #right + ScrollBar initializeImagesCache. + Try with: + (ScrollBar createArrowOfDirection: #right size: 14 color: Color lightGreen) asMorph openInHand." + + | form canvas vertices margin | + form := Form extent: size asPoint depth: 32. + canvas := form getCanvas. + margin := size < 14 ifTrue: [2] ifFalse: [3]. + vertices := { + size // 2 @ margin. + size asPoint - margin asPoint. + margin @ (size-margin). + size // 2 @ margin}. + + "Preferences gradientScrollBars + ifTrue: [ + fillStyle := GradientFillStyle ramp: { + 0.0 -> (aColor adjustBrightness: 0.5). + 0.1-> (aColor adjustBrightness: 0.05). + 0.6 -> (aColor darker)}. + fillStyle origin: size // 2 @ margin. + fillStyle direction: 0 @ size] + ifFalse: [ + fillStyle := SolidFillStyle color: aColor]. " + + canvas + drawPolygon: vertices + fillStyle: (SolidFillStyle color: aColor). + + ^ (form rotateBy: (aSymbolDirection caseOf: { + [#top] -> [0]. + [#bottom] -> [180]. + [#left] -> [270]. + [#right] -> [90]})) clippedToSize: size asPoint! - - Try with: - (ScrollBar createArrowOfDirection: #top size: 32 color: Color - lightGreen) asMorph openInHand. - " - | resizeFactor outerBox arrow resizedForm gradient | - resizeFactor := 4. - outerBox := RectangleMorph new - extent: finalSizeInteger asPoint * resizeFactor; - borderWidth: 0; - color: aColor. - - self gradientScrollBar ifTrue: [ - gradient := GradientFillStyle ramp: { - 0 -> (Color gray: 0.95). - 0.49 -> (Color gray: 0.9). - 0.5 -> (Color gray: 0.87). - 1 -> (Color gray: 0.93). - }. - gradient origin: outerBox topLeft. - (aSymbolDirection == #left or:[aSymbolDirection == #right]) - ifTrue:[gradient direction: 0@ outerBox height] - ifFalse:[gradient direction: outerBox width @ 0]. - outerBox fillStyle: gradient]. - outerBox borderStyle: (BorderStyle width: 4 color: Color lightGray). - - "" - arrow := self createArrowOfDirection: aSymbolDirection in: (outerBox bounds expandBy: -4). - self updateScrollBarButtonAspect: arrow color: aColor muchDarker. - outerBox addMorphCentered: arrow. - "" - resizedForm := outerBox imageForm - magnify: outerBox imageForm boundingBox - by: 1 / resizeFactor - smoothing: 4. - "" - ^ (resizedForm replaceColor: aColor withColor: Color transparent) - trimBordersOfColor: Color transparent! Item was removed: - ----- Method: ScrollBar class>>createBoxIn: (in category 'images') ----- - createBoxIn: aRectangle - "PRIVATE - create an box bounded in aRectangle" - | box | - box := RectangleMorph new. - box extent: (aRectangle scaleBy: 1 / 2) extent rounded; - borderWidth: 0. - "" - ^ box! Item was changed: ----- Method: ScrollBar class>>createBoxOfSize:color: (in category 'images') ----- + createBoxOfSize: anInteger color: aColor + "PRIVATE - create a box with anInteger and aColor - createBoxOfSize: finalSizeInteger color: aColor - "PRIVATE - create a box with finalSizeInteger and aColor Try with: + (ScrollBar createBoxOfSize: 32 color: Color gray) asMorph - (ScrollBar createBoxOfSize: 32 color: Color lightGreen) asMorph openInHand. " + + | form canvas margin | + form := Form extent: anInteger asPoint depth: 32. + canvas := form getCanvas. + margin := anInteger < 14 ifTrue: [3] ifFalse: [4]. + + "Preferences gradientScrollBars + ifTrue: [ + fillStyle := GradientFillStyle ramp: { + 0.0 -> (aColor adjustBrightness: 0.5). + 0.1-> (aColor adjustBrightness: 0.05). + 0.6 -> (aColor darker)}. + fillStyle origin: margin asPoint. + fillStyle direction: anInteger @ 0] + ifFalse: [ + fillStyle := SolidFillStyle color: aColor]. " + + canvas + fillRectangle: ((0@0 extent: anInteger asPoint) insetBy: margin) + fillStyle: (SolidFillStyle color: aColor). + + ^ form! - | resizeFactor outerBox innerBox resizedForm gradient | - resizeFactor := 4. - outerBox := RectangleMorph new - extent: finalSizeInteger asPoint * resizeFactor; - borderWidth: 0; - color: aColor. - self gradientScrollBar ifTrue: [ - gradient := GradientFillStyle ramp: { - 0 -> (Color gray: 0.95). - 0.49 -> (Color gray: 0.9). - 0.5 -> (Color gray: 0.87). - 1 -> (Color gray: 0.93). - }. - gradient origin: outerBox topLeft. - gradient direction: outerBox width @ 0. - outerBox fillStyle: gradient]. - outerBox borderStyle: (BorderStyle width: 4 color: Color lightGray). - "" - innerBox := self createBoxIn: (outerBox bounds expandBy: -4). - self updateScrollBarButtonAspect: innerBox color: aColor muchDarker. - outerBox addMorphCentered: innerBox. - "" - resizedForm := outerBox imageForm - magnify: outerBox imageForm boundingBox - by: 1 / resizeFactor - smoothing: 4. - "" - ^ (resizedForm replaceColor: aColor withColor: Color transparent) - trimBordersOfColor: Color transparent! Item was changed: ----- Method: ScrollBar class>>roundedScrollBarLook: (in category 'preferences') ----- roundedScrollBarLook: aBoolean + RoundedScrollBarLook = aBoolean ifTrue: [^ self]. + RoundedScrollBarLook := aBoolean. + + ScrollBar allSubInstancesDo: [:ea | ea updateSliderCornerStyle].! - RoundedScrollBarLook := aBoolean.! Item was added: + ----- Method: ScrollBar class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ super themeProperties, { + { #pagingAreaColorModifier. 'Colors'. 'How to modify the paging area color when adopting a pane color.' }. + { #thumbColorModifier. 'Colors'. 'How to modify the thumb color when adopting a pane color.' }. + { #borderColorModifier. 'Colors'. 'How to modify the border color when adopting a pane color.' }. + }! Item was removed: - ----- Method: ScrollBar class>>updateScrollBarButtonAspect:color: (in category 'coloring morphs') ----- - updateScrollBarButtonAspect: aMorph color: aColor - "update aMorph with aColor" - | fill direction | - aMorph isNil - ifTrue: [^ self]. - "" - aMorph color: aColor. - self gradientScrollBar - ifFalse: [^ self]. - "" - fill := GradientFillStyle ramp: { - 0.0 -> aColor twiceLighter twiceLighter. - 1.0 -> aColor twiceDarker}. - "" - direction := ((aMorph width min: aMorph height) - + ((aMorph width - aMorph height) abs * 0.3)) rounded. - "" - fill origin: aMorph topLeft + (direction // 8). - fill direction: direction @ direction. - fill radial: true. - "" - aMorph fillStyle: fill! Item was removed: - ----- Method: ScrollBar class>>updateScrollBarButtonsAspect:color: (in category 'coloring morphs') ----- - updateScrollBarButtonsAspect: aCollection color: aColor - "update aCollection of morphs with aColor" - - - aCollection - do: [:each | self updateScrollBarButtonAspect: each color: aColor]! Item was removed: - ----- Method: ScrollBar class>>verticesForComplexArrow: (in category 'images') ----- - verticesForComplexArrow: aRectangle - "PRIVATE - answer a collection of vertices to draw a complex arrow" - | vertices aux | - vertices := OrderedCollection new. - "" - vertices add: aRectangle bottomLeft. - vertices add: aRectangle topLeft. - vertices add: aRectangle topRight. - "" - aux := (aRectangle width / 3) rounded. - vertices add: aRectangle topRight + (0 @ aux). - vertices add: aRectangle topLeft + aux. - vertices add: aRectangle bottomLeft + (aux @ 0). - "" - ^ vertices! Item was removed: - ----- Method: ScrollBar class>>verticesForSimpleArrow: (in category 'images') ----- - verticesForSimpleArrow: aRectangle - "PRIVATE - answer a collection of vertices to draw a simple arrow" - | vertices | - vertices := OrderedCollection new. - "" - vertices add: aRectangle bottomLeft. - vertices add: aRectangle center x @ (aRectangle top + (aRectangle width / 8)). - vertices add: aRectangle bottomRight. - "" - ^ vertices! Item was changed: + ----- Method: ScrollBar>>adoptPaneColor: (in category 'updating') ----- - ----- Method: ScrollBar>>adoptPaneColor: (in category 'access') ----- adoptPaneColor: aColor "Adopt the given pane color" aColor ifNil:[^self]. self sliderColor: aColor.! Item was added: + ----- Method: ScrollBar>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + + super applyUserInterfaceTheme.! Item was changed: + ----- Method: ScrollBar>>boundsForDownButton (in category 'geometry') ----- - ----- Method: ScrollBar>>boundsForDownButton (in category 'initialize') ----- boundsForDownButton ^ self innerBounds bottomRight - self buttonExtent extent: self buttonExtent! Item was changed: + ----- Method: ScrollBar>>boundsForMenuButton (in category 'geometry') ----- - ----- Method: ScrollBar>>boundsForMenuButton (in category 'initialize') ----- boundsForMenuButton ^ self innerBounds topLeft extent: self buttonExtent! Item was changed: + ----- Method: ScrollBar>>boundsForUpButton (in category 'geometry') ----- - ----- Method: ScrollBar>>boundsForUpButton (in category 'initialize') ----- boundsForUpButton ^ (self menuButton visible ifFalse: [self innerBounds topLeft] ifTrue: [self orientation == #horizontal ifTrue: [self menuButton bounds topRight - (1@0)] ifFalse: [self menuButton bounds bottomLeft - (0@1)]]) extent: self buttonExtent! Item was removed: - ----- Method: ScrollBar>>defaultBorderWidth (in category 'initialize') ----- - defaultBorderWidth - ^ 0! Item was added: + ----- Method: ScrollBar>>downButton (in category 'accessing') ----- + downButton + ^ downButton! Item was changed: + ----- Method: ScrollBar>>downImage (in category 'images') ----- - ----- Method: ScrollBar>>downImage (in category 'initialize') ----- downImage "answer a form to be used in the down button" ^ self class arrowOfDirection: (self orientation == #horizontal ifTrue: [#right] ifFalse: [#bottom]) size: (self buttonExtent x min: self buttonExtent y) + color: self imageColor! - color: self thumbColor! Item was changed: ----- Method: ScrollBar>>extent: (in category 'geometry') ----- extent: p + + (bounds extent closeTo: p) ifTrue: [^ self]. + p x > p y ifTrue: [super extent: (p max: 8 @ 4)] ifFalse: [super extent: (p max: 4 @ 8)]. + + self updateSliderColor. ! Item was changed: ----- Method: ScrollBar>>finishedScrolling (in category 'scrolling') ----- finishedScrolling self stopStepping. self scrollBarAction: nil. - self class roundedScrollBarLook ifTrue:[ - upButton borderStyle: (BorderStyle complexRaised width: upButton borderWidth). - downButton borderStyle: (BorderStyle complexRaised width: downButton borderWidth). - ] ifFalse:[ - downButton borderStyle: BorderStyle thinGray. - upButton borderStyle: BorderStyle thinGray. - ]. - ! Item was added: + ----- Method: ScrollBar>>imageColor (in category 'accessing') ----- + imageColor + + ^ slider ifNil: [Color black] ifNotNil: [:s | s borderColor]! Item was changed: ----- Method: ScrollBar>>initialize (in category 'initialize') ----- initialize interval := 0.2. - - super initialize. - scrollDelta := 0.02. pageDelta := 0.2. + + super initialize.! - - self color: Color transparent. - - self class roundedScrollBarLook - ifFalse: [self borderWidth: 0] - ifTrue:[self borderStyle: ((BorderStyle complexFramed width: 2) "baseColor: Color gray")].! Item was changed: ----- Method: ScrollBar>>initializeDownButton (in category 'initialize') ----- initializeDownButton "initialize the receiver's downButton" + downButton := RectangleMorph newBounds: self boundsForDownButton. - downButton := RectangleMorph - newBounds: self boundsForDownButton - color: self thumbColor. downButton on: #mouseDown send: #scrollDownInit to: self. downButton on: #mouseUp send: #finishedScrolling to: self. + self updateDownButtonImage. + self addMorphFront: downButton. - self updateDownButtonImage. - self class roundedScrollBarLook - ifTrue: - [downButton color: Color veryLightGray. - downButton borderStyle: (BorderStyle complexRaised width: 3)] - ifFalse: [downButton setBorderWidth: 1 borderColor: Color lightGray]. - - self addMorph: downButton. downButton visible: self class scrollBarsWithoutArrowButtons not.! Item was removed: - ----- Method: ScrollBar>>initializeEmbedded: (in category 'initialize') ----- - initializeEmbedded: aBool - "aBool == true => inboard scrollbar - aBool == false => flop-out scrollbar" - self class roundedScrollBarLook ifFalse:[^self]. - aBool ifTrue:[ - self borderStyle: (BorderStyle inset width: 2). - self cornerStyle: #square. - ] ifFalse:[ - self borderStyle: (BorderStyle width: 1 color: Color black). - self cornerStyle: #rounded. - ]. - self removeAllMorphs. - self initializeSlider.! Item was changed: ----- Method: ScrollBar>>initializeMenuButton (in category 'initialize') ----- initializeMenuButton "initialize the receiver's menuButton" "Preferences disable: #scrollBarsWithoutMenuButton" "Preferences enable: #scrollBarsWithoutMenuButton" + menuButton := RectangleMorph newBounds: self boundsForMenuButton. - menuButton := RectangleMorph - newBounds: self boundsForMenuButton - color: self thumbColor. menuButton on: #mouseEnter send: #menuButtonMouseEnter: to: self. menuButton on: #mouseDown send: #menuButtonMouseDown: to: self. menuButton on: #mouseLeave send: #menuButtonMouseLeave: to: self. "menuButton addMorphCentered: (RectangleMorph newBounds: (0 @ 0 extent: 4 @ 2) color: Color black)." self updateMenuButtonImage. + self addMorphFront: menuButton. - self class roundedScrollBarLook - ifTrue: [menuButton color: Color veryLightGray. - menuButton - borderStyle: (BorderStyle complexRaised width: 3)] - ifFalse: [menuButton setBorderWidth: 1 borderColor: Color lightGray]. - - self addMorph: menuButton. menuButton visible: (self class scrollBarsWithoutMenuButton or: [self orientation == #horizontal]) not.! Item was changed: ----- Method: ScrollBar>>initializePagingArea (in category 'initialize') ----- initializePagingArea "Appearance" + pagingArea := RectangleMorph newBounds: self totalSliderArea. - pagingArea := RectangleMorph - newBounds: self totalSliderArea - color: (self class roundedScrollBarLook - ifTrue: [Color gray: 0.9] - ifFalse: [Color r: 0.6 g: 0.6 b: 0.8]). - self class gradientScrollBar - ifTrue: [pagingArea setBorderWidth: 1 borderColor: (Color lightGray alpha: 0.5)] - ifFalse: [pagingArea borderWidth: 0]. self addMorphBack: pagingArea. "Interactions" pagingArea on: #mouseDown send: #scrollPageInit: to: self. pagingArea on: #mouseUp send: #finishedScrolling to: self. ! Item was changed: ----- Method: ScrollBar>>initializeSlider (in category 'initialize') ----- initializeSlider self initializeMenuButton; initializeUpButton; initializeDownButton; initializePagingArea. super initializeSlider. - self expandSlider. + self expandSlider.! - self class roundedScrollBarLook ifTrue: [ - slider cornerStyle: #rounded. - sliderShadow cornerStyle: #rounded. - - Preferences menuAppearance3d ifTrue: [ - slider borderStyle: (BorderStyle complexRaised width: 1)]]. - - self sliderColor: self sliderColor.! Item was changed: ----- Method: ScrollBar>>initializeUpButton (in category 'initialize') ----- initializeUpButton "initialize the receiver's upButton" upButton := RectangleMorph newBounds: self boundsForUpButton. - upButton color: self thumbColor. upButton on: #mouseDown send: #scrollUpInit to: self. upButton on: #mouseUp send: #finishedScrolling to: self. self updateUpButtonImage. - self class roundedScrollBarLook - ifTrue: [upButton color: Color veryLightGray. - upButton - borderStyle: (BorderStyle complexRaised width: 3)] - ifFalse: [upButton setBorderWidth: 1 borderColor: Color lightGray]. - self addMorph: upButton. upButton visible: self class scrollBarsWithoutArrowButtons not.! Item was changed: + ----- Method: ScrollBar>>interval (in category 'accessing') ----- - ----- Method: ScrollBar>>interval (in category 'access') ----- interval ^ interval ifNil: [interval := 0.2]! Item was changed: + ----- Method: ScrollBar>>interval: (in category 'accessing') ----- - ----- Method: ScrollBar>>interval: (in category 'access') ----- interval: d "Supply an optional floating fraction so slider can expand to indicate range" interval := d min: 1.0. self expandSlider. self computeSlider.! Item was changed: + ----- Method: ScrollBar>>menuButton (in category 'accessing') ----- - ----- Method: ScrollBar>>menuButton (in category 'access') ----- menuButton ^ menuButton ifNil: [menuButton := RectangleMorph new]! Item was changed: + ----- Method: ScrollBar>>menuButtonMouseDown: (in category 'event handling') ----- - ----- Method: ScrollBar>>menuButtonMouseDown: (in category 'other events') ----- menuButtonMouseDown: event event hand showTemporaryCursor: nil. self use: menuSelector orMakeModelSelectorFor: 'MenuButtonPressed:' in: [:sel | menuSelector := sel. model perform: sel with: event]! Item was changed: + ----- Method: ScrollBar>>menuImage (in category 'images') ----- - ----- Method: ScrollBar>>menuImage (in category 'initialize') ----- menuImage "answer a form to be used in the menu button" ^ self class boxOfSize: (self buttonExtent x min: self buttonExtent y) + color: self imageColor! - color: self thumbColor! Item was changed: + ----- Method: ScrollBar>>menuSelector (in category 'accessing') ----- - ----- Method: ScrollBar>>menuSelector (in category 'access') ----- menuSelector ^ menuSelector! Item was changed: + ----- Method: ScrollBar>>menuSelector: (in category 'accessing') ----- - ----- Method: ScrollBar>>menuSelector: (in category 'access') ----- menuSelector: aSymbol menuSelector := aSymbol.! Item was changed: + ----- Method: ScrollBar>>mouseDownInSlider: (in category 'event handling') ----- - ----- Method: ScrollBar>>mouseDownInSlider: (in category 'other events') ----- mouseDownInSlider: event + + "make the entire scrollable area visible if a full scrollbar is clicked on" + self interval = self maximumValue ifTrue: [ - self interval = self maximumValue ifTrue: - ["make the entire scrollable area visible if a full scrollbar is clicked on" self setValue: 0. + self model hideOrShowScrollBars]. + + self showSliderShadow.! - self model hideOrShowScrollBars.]. - " super mouseDownInSlider: event" - ! Item was changed: + ----- Method: ScrollBar>>pagingArea (in category 'accessing') ----- - ----- Method: ScrollBar>>pagingArea (in category 'access') ----- pagingArea ^pagingArea! Item was changed: + ----- Method: ScrollBar>>scrollDelta (in category 'accessing') ----- - ----- Method: ScrollBar>>scrollDelta (in category 'access') ----- scrollDelta ^ scrollDelta! Item was changed: + ----- Method: ScrollBar>>scrollDelta:pageDelta: (in category 'accessing') ----- - ----- Method: ScrollBar>>scrollDelta:pageDelta: (in category 'access') ----- scrollDelta: d1 pageDelta: d2 "Supply optional increments for better scrolling of, eg, text" scrollDelta := d1. pageDelta := d2.! Item was removed: - ----- Method: ScrollBar>>scrollDown (in category 'scrolling') ----- - scrollDown - self flag: #obsolete. - downButton eventHandler: nil. - downButton on: #mouseDown send: #scrollDownInit to: self. - downButton on: #mouseUp send: #finishedScrolling to: self. - ^self scrollDownInit! Item was changed: ----- Method: ScrollBar>>scrollDownInit (in category 'scrolling') ----- scrollDownInit - downButton borderInset. self resetTimer. self scrollBarAction: #doScrollDown. self startStepping.! Item was removed: - ----- Method: ScrollBar>>scrollUp (in category 'scrolling') ----- - scrollUp - self flag: #obsolete. - upButton eventHandler: nil. - upButton on: #mouseDown send: #scrollUpInit to: self. - upButton on: #mouseUp send: #finishedScrolling to: self. - ^self scrollUpInit! Item was changed: ----- Method: ScrollBar>>scrollUpInit (in category 'scrolling') ----- scrollUpInit - upButton borderInset. self resetTimer. self scrollBarAction: #doScrollUp. self startStepping.! Item was added: + ----- Method: ScrollBar>>setDefaultParameters (in category 'initialize') ----- + setDefaultParameters + + "Compared to generic sliders, I am not my own paging area. Thus, make me transparent." + self + color: Color transparent; + borderWidth: 0. + + pagingArea + color: (self userInterfaceTheme color ifNil: [Color veryVeryLightGray darker alpha: 0.35]); + borderWidth: 0. "no border for the paging area" + + slider + color: (self userInterfaceTheme thumbColor ifNil: [Color veryVeryLightGray]); + borderColor: (self userInterfaceTheme thumbBorderColor ifNil: [Color gray: 0.6]); + borderWidth: (self userInterfaceTheme thumbBorderWidth ifNil: [1]). + + self updateSliderCornerStyle. + + sliderShadow + cornerStyle: slider cornerStyle; + borderWidth: slider borderWidth; + borderColor: Color transparent. + + sliderColor := slider color. + self updateSliderColor: slider color.! Item was changed: + ----- Method: ScrollBar>>sliderColor: (in category 'accessing') ----- - ----- Method: ScrollBar>>sliderColor: (in category 'access') ----- sliderColor: aColor "Change the color of the scrollbar to go with aColor." + - | buttonColor | super sliderColor: aColor. + self updateSliderColor: aColor.! - self updateSliderColor: aColor. - buttonColor := self thumbColor. - - self menuButton color: aColor. - upButton color: aColor. - downButton color: aColor. - - self class updateScrollBarButtonsAspect: {self menuButton. upButton. downButton} color: aColor. - - self flag: #performance. "mt: This is slow..." - self updateMenuButtonImage. - self updateUpButtonImage. - self updateDownButtonImage.! Item was removed: - ----- Method: ScrollBar>>sliderShadowColor (in category 'access') ----- - sliderShadowColor - ^ self class roundedScrollBarLook - ifTrue: [self sliderColor darker] - ifFalse: [super sliderShadowColor] - ! Item was removed: - ----- Method: ScrollBar>>thumbColor (in category 'access') ----- - thumbColor - "Problem: Part of the ScrollBar/Slider code uses 'slider' to mean the entire scrollbar/slider widget, and part of it uses 'slider' to mean only the draggable 'thumb'. This should be cleaned up so that 'thumb' is used instead of 'slider' where appropriate. For now, the meaning of thumbColor is clear, at least." - - ^ self sliderColor alphaMixed: 0.5 with: (Color gray: 0.95) - ! Item was changed: + ----- Method: ScrollBar>>upArrow8Bit (in category 'images') ----- - ----- Method: ScrollBar>>upArrow8Bit (in category 'initialize') ----- upArrow8Bit "convert to 8-bit and convert white to transparent to avoid gratuitous conversion every time we put one in an ImageMorph" ^UpArrow8Bit ifNil: [ UpArrow8Bit := (ColorForm mappingWhiteToTransparentFrom: UpArrow) asFormOfDepth: 8 ]! Item was added: + ----- Method: ScrollBar>>upButton (in category 'accessing') ----- + upButton + ^ upButton! Item was changed: + ----- Method: ScrollBar>>upImage (in category 'images') ----- - ----- Method: ScrollBar>>upImage (in category 'initialize') ----- upImage "answer a form to be used in the up button" ^ self class arrowOfDirection: (self orientation == #horizontal ifTrue: [#left] ifFalse: [#top]) size: (self buttonExtent x min: self buttonExtent y) + color: self imageColor! - color: self thumbColor! Item was changed: + ----- Method: ScrollBar>>updateDownButtonImage (in category 'updating') ----- - ----- Method: ScrollBar>>updateDownButtonImage (in category 'initialize') ----- updateDownButtonImage "update the receiver's downButton. put a new image inside" downButton removeAllMorphs. + downButton addMorphCentered: (ImageMorph new image: self downImage).! - downButton - addMorphCentered: (ImageMorph new image: self downImage)! Item was changed: + ----- Method: ScrollBar>>updateMenuButtonImage (in category 'updating') ----- - ----- Method: ScrollBar>>updateMenuButtonImage (in category 'initialize') ----- updateMenuButtonImage "update the receiver's menuButton. put a new image inside" self menuButton removeAllMorphs. self menuButton addMorphCentered: (ImageMorph new image: self menuImage).! Item was changed: + ----- Method: ScrollBar>>updateSlider (in category 'updating') ----- - ----- Method: ScrollBar>>updateSlider (in category 'initialize') ----- updateSlider | imagesNeedUpdate | imagesNeedUpdate := upButton width ~= (self orientation == #horizontal ifTrue: [self height] ifFalse: [self width]). self menuButton visible: (self orientation == #horizontal or: [self class scrollBarsWithoutMenuButton]) not; bounds: self boundsForMenuButton. upButton visible: self class scrollBarsWithoutArrowButtons not; bounds: self boundsForUpButton. downButton visible: self class scrollBarsWithoutArrowButtons not; bounds: self boundsForDownButton. super updateSlider. pagingArea bounds: self totalSliderArea. self expandSlider. imagesNeedUpdate ifTrue: [ self menuButton visible ifTrue: [self updateMenuButtonImage]. upButton visible ifTrue: [self updateUpButtonImage]. downButton visible ifTrue: [self updateDownButtonImage]].! Item was changed: + ----- Method: ScrollBar>>updateSliderColor (in category 'updating') ----- - ----- Method: ScrollBar>>updateSliderColor (in category 'access') ----- updateSliderColor self updateSliderColor: self sliderColor.! Item was changed: + ----- Method: ScrollBar>>updateSliderColor: (in category 'updating') ----- - ----- Method: ScrollBar>>updateSliderColor: (in category 'access') ----- updateSliderColor: aColor + self class gradientScrollBar + ifFalse: [self updateSliderColorSolid: aColor] + ifTrue: [self updateSliderColorGradient: aColor]. + + self flag: #performance. "mt: This is slow..." + self updateMenuButtonImage. + self updateUpButtonImage. + self updateDownButtonImage.! - | gradient | - self class gradientScrollBar ifFalse: [ - slider - borderColor: (aColor adjustBrightness: -0.3); - color: aColor. - pagingArea - borderColor: (aColor muchDarker alpha: pagingArea borderStyle color alpha); - color: (aColor darker alpha: 0.35). - ^ self]. - - slider borderStyle: (BorderStyle width: 1 color: Color lightGray). - - "Fill the slider." - gradient := GradientFillStyle ramp: { - 0 -> (Color gray: 0.95). - 0.49 -> (Color gray: 0.9). - 0.5 -> (Color gray: 0.87). - 1 -> (Color gray: 0.93). - }. - gradient origin: slider topLeft. - gradient direction: (self orientation == #horizontal - ifTrue:[0@slider height] - ifFalse:[slider width@0]). - slider fillStyle: gradient. - - "Fill the paging area." - gradient := GradientFillStyle ramp: { - 0 -> (Color gray: 0.65). - 0.6 -> (Color gray: 0.82). - 1 -> (Color gray: 0.88). - }. - gradient origin: self topLeft. - gradient direction: (self orientation == #horizontal - ifTrue:[0@self height] - ifFalse:[self width@0]). - pagingArea fillStyle: gradient.! Item was added: + ----- Method: ScrollBar>>updateSliderColorGradient: (in category 'updating') ----- + updateSliderColorGradient: aColor + + | gradient cc | + pagingArea color: ((self userInterfaceTheme pagingAreaColorModifier + ifNil: [ [:c | c darker alpha: 0.35] ]) value: aColor). + slider borderColor: ((self userInterfaceTheme borderColorModifier + ifNil: [ [:c | c adjustBrightness: -0.3] ]) value: aColor). + + cc := ((self userInterfaceTheme thumbColorModifier + ifNil: [ [:c | c] ]) value: aColor). + + gradient := GradientFillStyle ramp: { + 0.0 -> Color white. + 0.1-> (cc adjustBrightness: 0.05). + 0.6 -> (cc darker)}. + + "Fill the thumb" + gradient origin: slider topLeft. + gradient direction: (self orientation == #horizontal + ifTrue:[0@slider height] + ifFalse:[slider width@0]). + slider fillStyle: gradient. + + "Fill the buttons" + {self menuButton. self upButton. self downButton} do: [:ea | + gradient := gradient copy. + gradient origin: ea topLeft. + gradient direction: (self orientation == #horizontal + ifTrue:[0@ea height] + ifFalse:[ea width@0]). + ea + fillStyle: gradient; + borderWidth: slider borderWidth; + borderColor: slider borderColor].! Item was added: + ----- Method: ScrollBar>>updateSliderColorSolid: (in category 'updating') ----- + updateSliderColorSolid: aColor + + sliderShadow color: self sliderShadowColor. + + slider color: ((self userInterfaceTheme thumbColorModifier + ifNil: [ [:c | c] ]) value: aColor). + + slider borderColor: ((self userInterfaceTheme borderColorModifier + ifNil: [ [:c | c adjustBrightness: -0.3] ]) value: aColor). + + pagingArea color: ((self userInterfaceTheme pagingAreaColorModifier + ifNil: [ [:c | c darker alpha: 0.35] ]) value: aColor). + + {self menuButton. self upButton. self downButton} do: [:ea | + ea + color: slider color; + borderWidth: slider borderWidth; + borderColor: slider borderColor].! Item was added: + ----- Method: ScrollBar>>updateSliderCornerStyle (in category 'updating') ----- + updateSliderCornerStyle + "Right now, only the slider's corner style is affected. Buttons and paging area remain square. Looks better somehow... :-)" + + slider cornerStyle: (self class roundedScrollBarLook ifTrue: [#rounded] ifFalse: [#square]).! Item was changed: + ----- Method: ScrollBar>>updateUpButtonImage (in category 'updating') ----- - ----- Method: ScrollBar>>updateUpButtonImage (in category 'initialize') ----- updateUpButtonImage "update the receiver's upButton. put a new image inside" upButton removeAllMorphs. + upButton addMorphCentered: (ImageMorph new image: self upImage).! - upButton - addMorphCentered: (ImageMorph new image: self upImage)! Item was added: + ----- Method: ScrollPane class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ super themeProperties, { + { #borderColor. 'Colors'. 'Color of the pane''s border.' }. + { #borderWidth. 'Borders'. 'Width of the pane''s border.' }. + { #borderStyle. 'Borders'. 'Whether to use a plain border, inset, or outset.' }. + { #color. 'Colors'. 'Background color of the pane.' }. + }! Item was added: + ----- Method: ScrollPane>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + + super applyUserInterfaceTheme. + self setDefaultParameters.! Item was changed: ----- Method: ScrollPane>>borderWidth: (in category 'accessing') ----- borderWidth: aNumber super borderWidth: aNumber. + self resizeScroller; setScrollDeltas! - self setScrollDeltas! Item was removed: - ----- Method: ScrollPane>>defaultBorderColor (in category 'initialization') ----- - defaultBorderColor - "answer the default border color/fill style for the receiver" - ^ Color black! Item was removed: - ----- Method: ScrollPane>>defaultBorderWidth (in category 'initialization') ----- - defaultBorderWidth - - ^ 1 ! Item was removed: - ----- Method: ScrollPane>>defaultColor (in category 'initialization') ----- - defaultColor - - ^ Color white ! Item was changed: ----- Method: ScrollPane>>initialize (in category 'initialization') ----- initialize "initialize the state of the receiver" super initialize. "" self initializePreferences. hasFocus := false. self initializeScrollBars. "" self extent: self defaultExtent. self resizeScrollBars; resizeScroller; hideOrShowScrollBars; updateMinimumExtent. + + self setDefaultParameters. - self addKeyboardCaptureFilter: self.! Item was changed: ----- Method: ScrollPane>>initializeScrollBars (in category 'initialization') ----- initializeScrollBars "Initialize vertical and horizontal scroll bars." (scrollBar := ScrollBar on: self getValue: nil setValue: #vScrollBarValue:) menuSelector: #vScrollBarMenuButtonPressed:; orientation: #vertical; extent: 1@1. (hScrollBar := ScrollBar on: self getValue: nil setValue: #hScrollBarValue:) menuSelector: #hScrollBarMenuButtonPressed:; orientation: #horizontal; extent: 1@1. "" scroller := TransformMorph new color: Color transparent. scroller offset: 0 @ 0. self addMorph: scroller. "" - scrollBar initializeEmbedded: retractableScrollBar not. - hScrollBar initializeEmbedded: retractableScrollBar not. retractableScrollBar ifFalse: [self addMorph: scrollBar; addMorph: hScrollBar]. self updateMinimumExtent.! Item was added: + ----- Method: ScrollPane>>setDefaultParameters (in category 'initialization') ----- + setDefaultParameters + "change the receiver's appareance parameters" + + self + color: (self userInterfaceTheme color ifNil: [Color white]); + borderStyle: (self userInterfaceTheme borderStyle ifNil: [BorderStyle default]); + borderColor: (self userInterfaceTheme borderColor ifNil: [Color gray: 0.6]); + borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]).! Item was changed: ScrollPane subclass: #SimpleHierarchicalListMorph + instanceVariableNames: 'selectedMorph hoveredMorph getListSelector keystrokeActionSelector autoDeselect columns columnsCache sortingSelector getSelectionSelector setSelectionSelector potentialDropMorph lineColor font textColor' - instanceVariableNames: 'selectedMorph hoveredMorph getListSelector keystrokeActionSelector autoDeselect columns columnsCache sortingSelector getSelectionSelector setSelectionSelector potentialDropMorph lineColor' classVariableNames: 'WrappedNavigation' poolDictionaries: '' category: 'Morphic-Explorer'! SimpleHierarchicalListMorph class instanceVariableNames: 'expandedForm notExpandedForm'! !SimpleHierarchicalListMorph commentStamp: 'ls 3/1/2004 12:15' prior: 0! Display a hierarchical list of items. Each item should be wrapped with a ListItemWrapper. For a simple example, look at submorphsExample. For beefier examples, look at ObjectExplorer or FileList2.! SimpleHierarchicalListMorph class instanceVariableNames: 'expandedForm notExpandedForm'! Item was added: + ----- Method: SimpleHierarchicalListMorph class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ super themeProperties, { + { #font. 'Fonts'. 'Font of the list items.' }. + { #textColor. 'Colors'. 'Color of the list items.' }. + { #selectionColor. 'Colors'. 'Color used for items when hovering or selecting them.' }. + { #selectionTextColor. 'Colors'. 'Color used for label when hovering or selecting them.' }. + + { #filterColor. 'Colors'. 'Color used for items to indicate the matching filter.' }. + { #filterTextColor. 'Colors'. 'Color used for items to indicate the matching filter.' }. + { #highlightTextColor. 'Colors'. 'Color used for highlighted items.' }. + + { #hoverSelectionModifier. 'Colors'. 'How to derive the hover color from the selection color.'}. + + { #lineColor. 'Colors'. 'How the lines are drawn.' }. + }! Item was changed: ----- Method: SimpleHierarchicalListMorph>>addMorphsTo:from:allowSorting:withExpandedItems:atLevel: (in category 'private') ----- addMorphsTo: morphList from: aCollection allowSorting: sortBoolean withExpandedItems: expandedItems atLevel: newIndent | priorMorph newCollection firstAddition | priorMorph := nil. newCollection := (sortBoolean and: [sortingSelector notNil]) ifTrue: [ (aCollection asSortedCollection: [ :a :b | (a perform: sortingSelector) <= (b perform: sortingSelector)]) asOrderedCollection ] ifFalse: [ aCollection ]. firstAddition := nil. newCollection do: [:item | priorMorph := self indentingItemClass basicNew initWithContents: item prior: priorMorph forList: self indentLevel: newIndent. + priorMorph + color: self textColor; + font: self font; + selectionColor: self selectionColor; + selectionTextColor: self selectionTextColor; + hoverColor: self hoverColor; + highlightTextColor: self highlightTextColor; + filterColor: self filterColor; + filterTextColor: self filterTextColor. firstAddition ifNil: [firstAddition := priorMorph]. morphList add: priorMorph. ((item hasEquivalentIn: expandedItems) or: [priorMorph isExpanded]) ifTrue: [ priorMorph isExpanded: true. priorMorph addChildrenForList: self addingTo: morphList withExpandedItems: expandedItems. ]. ]. ^firstAddition ! Item was changed: ----- Method: SimpleHierarchicalListMorph>>addSubmorphsAfter:fromCollection:allowSorting: (in category 'private') ----- addSubmorphsAfter: parentMorph fromCollection: aCollection allowSorting: sortBoolean | priorMorph morphList newCollection | priorMorph := nil. newCollection := (sortBoolean and: [sortingSelector notNil]) ifTrue: [ (aCollection asSortedCollection: [ :a :b | (a perform: sortingSelector) <= (b perform: sortingSelector)]) asOrderedCollection ] ifFalse: [ aCollection ]. morphList := OrderedCollection new. newCollection do: [:item | priorMorph := self indentingItemClass basicNew initWithContents: item prior: priorMorph forList: self indentLevel: parentMorph indentLevel + 1. + priorMorph + color: self textColor; + font: self font; + selectionColor: self selectionColor; + selectionTextColor: self selectionTextColor; + hoverColor: self hoverColor; + highlightTextColor: self highlightTextColor; + filterColor: self filterColor; + filterTextColor: self filterTextColor. morphList add: priorMorph. ]. scroller addAllMorphs: morphList after: parentMorph. ^morphList ! Item was added: + ----- Method: SimpleHierarchicalListMorph>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + + super applyUserInterfaceTheme.! Item was changed: ----- Method: SimpleHierarchicalListMorph>>drawHoverOn: (in category 'drawing') ----- drawHoverOn: aCanvas self hoveredMorph ifNil: [^ self]. PluggableListMorph highlightHoveredRow ifFalse: [^ self]. aCanvas + transformBy: scroller transform + clippingTo: scroller innerBounds + during: [:c | self hoveredMorph drawHoverOn: c].! - fillRectangle: (((scroller transformFrom: self) - invertBoundsRect: self hoveredMorph bounds) - intersect: scroller bounds) - color: (LazyListMorph listSelectionColor darker alpha: 0.3).! Item was changed: ----- Method: SimpleHierarchicalListMorph>>drawSelectionOn: (in category 'drawing') ----- drawSelectionOn: aCanvas + self selectedMorph ifNotNil: [:m | + aCanvas + transformBy: scroller transform + clippingTo: scroller innerBounds + during: [:c | m drawSelectionOn: c] ].! - self selectedMorph ifNil: [^ self]. - - aCanvas - fillRectangle: (((scroller transformFrom: self) - invertBoundsRect: selectedMorph bounds) - intersect: scroller bounds) - color: LazyListMorph listSelectionColor.! Item was added: + ----- Method: SimpleHierarchicalListMorph>>filterColor (in category 'accessing') ----- + filterColor + + ^ self valueOfProperty: #filterColor ifAbsent: [Color yellow]! Item was added: + ----- Method: SimpleHierarchicalListMorph>>filterColor: (in category 'accessing') ----- + filterColor: aColor + + self setProperty: #filterColor toValue: aColor. + scroller submorphsDo: [:ea | ea filterColor: aColor].! Item was added: + ----- Method: SimpleHierarchicalListMorph>>filterTextColor (in category 'accessing') ----- + filterTextColor + + ^ self valueOfProperty: #filterTextColor ifAbsent: [Color black]! Item was added: + ----- Method: SimpleHierarchicalListMorph>>filterTextColor: (in category 'accessing') ----- + filterTextColor: aColor + + self setProperty: #filterTextColor toValue: aColor. + scroller submorphsDo: [:ea | ea filterTextColor: aColor].! Item was added: + ----- Method: SimpleHierarchicalListMorph>>font (in category 'accessing') ----- + font + ^ font ifNil: [TextStyle defaultFont]! Item was added: + ----- Method: SimpleHierarchicalListMorph>>font: (in category 'accessing') ----- + font: aFont + font := aFont. + scroller submorphsDo: [:ea | ea font: font].! Item was added: + ----- Method: SimpleHierarchicalListMorph>>highlightTextColor (in category 'accessing') ----- + highlightTextColor + + ^ self valueOfProperty: #highlightTextColor ifAbsent: [Color red]! Item was added: + ----- Method: SimpleHierarchicalListMorph>>highlightTextColor: (in category 'accessing') ----- + highlightTextColor: aColor + + self setProperty: #highlightTextColor toValue: aColor. + scroller submorphsDo: [:ea | ea highlightTextColor: aColor].! Item was added: + ----- Method: SimpleHierarchicalListMorph>>hoverColor (in category 'accessing') ----- + hoverColor + + ^ self valueOfProperty: #hoverColor ifAbsent: [Color veryLightGray]! Item was added: + ----- Method: SimpleHierarchicalListMorph>>hoverColor: (in category 'accessing') ----- + hoverColor: aColor + + self setProperty: #hoverColor toValue: aColor. + scroller submorphsDo: [:ea | ea setProperty: #hoverColor toValue: aColor].! Item was added: + ----- Method: SimpleHierarchicalListMorph>>selectionColor (in category 'accessing') ----- + selectionColor + + ^ self valueOfProperty: #selectionColor ifAbsent: [Color blue]! Item was added: + ----- Method: SimpleHierarchicalListMorph>>selectionColor: (in category 'accessing') ----- + selectionColor: aColor + + self setProperty: #selectionColor toValue: aColor. + scroller submorphsDo: [:ea | ea selectionColor: aColor].! Item was added: + ----- Method: SimpleHierarchicalListMorph>>selectionTextColor (in category 'accessing') ----- + selectionTextColor + + ^ self valueOfProperty: #selectionTextColor ifAbsent: [Color white]! Item was added: + ----- Method: SimpleHierarchicalListMorph>>selectionTextColor: (in category 'accessing') ----- + selectionTextColor: aColor + + self setProperty: #selectionTextColor toValue: aColor. + scroller submorphsDo: [:ea | ea selectionTextColor: aColor].! Item was added: + ----- Method: SimpleHierarchicalListMorph>>setDefaultParameters (in category 'initialization') ----- + setDefaultParameters + + super setDefaultParameters. + + self + font: (self userInterfaceTheme font ifNil: [TextStyle defaultFont]); + textColor: (self userInterfaceTheme textColor ifNil: [Color black]). + + self + selectionColor: (self userInterfaceTheme selectionColor ifNil: [Color r: 0.72 g: 0.72 b: 0.9]); + selectionTextColor: (self userInterfaceTheme selectionTextColor ifNil: [Color black]); + filterColor: (self userInterfaceTheme filterColor ifNil: [Color yellow paler]); + filterTextColor: (self userInterfaceTheme filterTextColor ifNil: [Color black]); + lineColor: (self userInterfaceTheme lineColor ifNil: [Color veryLightGray]); + hoverColor: ((self userInterfaceTheme hoverSelectionModifier ifNil: [ [:c | c darker alpha: 0.3] ]) value: self selectionColor); + highlightTextColor: (self userInterfaceTheme highlightTextColor ifNil: [Color red]).! Item was added: + ----- Method: SimpleHierarchicalListMorph>>textColor (in category 'accessing') ----- + textColor + ^ textColor ifNil: [Color black]! Item was added: + ----- Method: SimpleHierarchicalListMorph>>textColor: (in category 'accessing') ----- + textColor: aColor + textColor := aColor. + scroller submorphsDo: [:ea | ea color: textColor].! Item was added: + ----- Method: Slider class>>themeProperties (in category 'preferences') ----- + themeProperties + + ^ super themeProperties, { + { #borderColor. 'Colors'. 'Color of the slider''s border.' }. + { #borderWidth. 'Borders'. 'Width of the slider''s border.' }. + { #color. 'Colors'. 'Background color of the slider.' }. + + { #thumbBorderColor. 'Colors'. 'Color of the slider thumb''s border.' }. + { #thumbBorderWidth. 'Borders'. 'Width of the slider thumb''s border.' }. + { #thumbColor. 'Colors'. 'Background color of the slider thumb.' }. + + { #thumbShadowModifier. 'Colors'. 'How to modify the thumb color to get the shadow color.' }. + }! Item was changed: ----- Method: Slider>>adoptPaneColor: (in category 'accessing - ui') ----- adoptPaneColor: paneColor super adoptPaneColor: paneColor. + paneColor ifNotNil: [:c | self sliderColor: c].! - - paneColor ifNotNil: [:c | - self color: c. - self thumb color: c].! Item was added: + ----- Method: Slider>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + + super applyUserInterfaceTheme. + + self setDefaultParameters.! Item was removed: - ----- Method: Slider>>defaultBorderColor (in category 'initialization') ----- - defaultBorderColor - "answer the default border color/fill style for the receiver" - ^ #inset! Item was removed: - ----- Method: Slider>>defaultBorderWidth (in category 'initialization') ----- - defaultBorderWidth - "answer the default border width for the receiver" - ^ 1! Item was removed: - ----- Method: Slider>>defaultColor (in category 'initialization') ----- - defaultColor - "answer the default color/fill style for the receiver" - ^ Color lightGray! Item was added: + ----- Method: Slider>>hideSliderShadow (in category 'other events') ----- + hideSliderShadow + + sliderShadow hide.! Item was changed: ----- Method: Slider>>initialize (in category 'initialization') ----- initialize + - "initialize the state of the receiver" super initialize. + - "" value := 0.0. descending := false. + + self initializeSlider. + self setDefaultParameters.! - self initializeSlider! Item was changed: ----- Method: Slider>>initializeSlider (in category 'initialization') ----- initializeSlider + + slider := RectangleMorph + newBounds: self totalSliderArea + color: self thumbColor. + + sliderShadow := RectangleMorph + newBounds: self totalSliderArea + color: self pagingArea color. + - slider := RectangleMorph newBounds: self totalSliderArea color: self thumbColor. - sliderShadow := RectangleMorph newBounds: self totalSliderArea - color: self pagingArea color. slider on: #mouseMove send: #scrollAbsolute: to: self. slider on: #mouseDown send: #mouseDownInSlider: to: self. slider on: #mouseUp send: #mouseUpInSlider: to: self. + + self addMorphFront: sliderShadow. + self addMorphFront: slider. + - slider setBorderWidth: 1 borderColor: Color lightGray.. - sliderShadow setBorderWidth: 1 borderColor: #inset. - "(the shadow must have the pagingArea as its owner to highlight properly)" - self pagingArea addMorph: sliderShadow. - sliderShadow hide. - self addMorph: slider. self computeSlider. + self hideSliderShadow.! - ! Item was changed: ----- Method: Slider>>mouseDownInSlider: (in category 'other events') ----- mouseDownInSlider: event slider borderStyle style == #raised ifTrue: [slider borderColor: #inset]. + self showSliderShadow.! - sliderShadow color: self sliderShadowColor. - sliderShadow cornerStyle: slider cornerStyle. - sliderShadow bounds: slider bounds. - sliderShadow show! Item was changed: ----- Method: Slider>>mouseUpInSlider: (in category 'other events') ----- mouseUpInSlider: event slider borderStyle style == #inset ifTrue: [slider borderColor: #raised]. + self hideSliderShadow.! - sliderShadow hide! Item was added: + ----- Method: Slider>>setDefaultParameters (in category 'initialization') ----- + setDefaultParameters + "change the receiver's appareance parameters" + + self + color: (self userInterfaceTheme color ifNil: [Color lightGray]); + borderColor: (self userInterfaceTheme borderColor ifNil: [Color gray]); + borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]). + + slider + color: (self userInterfaceTheme thumbColor ifNil: [Color veryVeryLightGray]); + borderColor: (self userInterfaceTheme thumbBorderColor ifNil: [Color gray: 0.6]); + borderWidth: (self userInterfaceTheme thumbBorderWidth ifNil: [0]). + + sliderShadow + borderWidth: slider borderWidth; + borderColor: Color transparent. + + sliderColor := slider color. + self updateSliderColor: slider color.! Item was added: + ----- Method: Slider>>showSliderShadow (in category 'other events') ----- + showSliderShadow + + sliderShadow color: self sliderShadowColor. + sliderShadow cornerStyle: slider cornerStyle. + sliderShadow bounds: slider bounds. + sliderShadow show.! Item was changed: ----- Method: Slider>>sliderColor (in category 'accessing - ui') ----- sliderColor "color scheme for the whole slider widget" + + ^ sliderColor ifNil: [self userInterfaceTheme thumbColor ifNil: [Color veryVeryLightGray]]! - sliderColor ifNil: [^ (color alphaMixed: 0.7 with: Color white) slightlyLighter]. - ^ sliderColor! Item was changed: ----- Method: Slider>>sliderColor: (in category 'accessing - ui') ----- sliderColor: newColor sliderColor := newColor. + self updateSliderColor: sliderColor.! - slider ifNotNil: [slider color: sliderColor]! Item was changed: ----- Method: Slider>>sliderShadowColor (in category 'accessing - ui') ----- sliderShadowColor + + ^ ((self userInterfaceTheme thumbShadowModifier + ifNil: [ [:c | c alpha: 0.7 ] ]) value: self sliderColor)! - ^ self sliderColor alphaMixed: 0.2 with: self pagingArea color! Item was changed: + ----- Method: Slider>>updateSlider (in category 'updating') ----- - ----- Method: Slider>>updateSlider (in category 'initialization') ----- updateSlider "Updates layout properties of the slider." slider bounds: self totalSliderArea. sliderShadow bounds: slider bounds. self computeSlider. ! Item was added: + ----- Method: Slider>>updateSliderColor: (in category 'updating') ----- + updateSliderColor: aColor + + slider color: aColor. + sliderShadow color: self sliderShadowColor.! Item was added: + ----- Method: TextMorph>>createParagraph (in category 'private') ----- + createParagraph + + self setProperty: #CreatingParagraph toValue: true. + + [ + self setDefaultContentsIfNil. + + "...Code here to recreate the paragraph..." + paragraph := (self paragraphClass new textOwner: self owner). + paragraph wantsColumnBreaks: successor notNil. + paragraph + compose: text + style: textStyle copy + from: self startingIndex + in: self container. + wrapFlag ifFalse: + ["Was given huge container at first... now adjust" + paragraph adjustRightX]. + paragraph focused: (self currentHand keyboardFocus == self). + + self fit. + ] ensure: [self removeProperty: #CreatingParagraph]. + + ^ paragraph! Item was changed: ----- Method: TextMorph>>paragraph (in category 'private') ----- paragraph "Paragraph instantiation is lazy -- create it only when needed" - paragraph ifNotNil: [^ paragraph]. + ^ paragraph ifNil: [self createParagraph]! - self setProperty: #CreatingParagraph toValue: true. - - self setDefaultContentsIfNil. - - "...Code here to recreate the paragraph..." - paragraph := (self paragraphClass new textOwner: self owner). - paragraph wantsColumnBreaks: successor notNil. - paragraph - compose: text - style: textStyle copy - from: self startingIndex - in: self container. - wrapFlag ifFalse: - ["Was given huge container at first... now adjust" - paragraph adjustRightX]. - paragraph focused: (self currentHand keyboardFocus == self). - self fit. - self removeProperty: #CreatingParagraph. - - - ^ paragraph! Item was added: + ----- Method: TextMorphForEditView>>caretColor (in category 'accessing') ----- + caretColor + ^ self valueOfProperty: #caretColor ifAbsent: [Color red]! Item was added: + ----- Method: TextMorphForEditView>>createParagraph (in category 'private') ----- + createParagraph + + super createParagraph. + + paragraph + caretColor: self caretColor; + selectionColor: self selectionColor; + unfocusedSelectionColor: self unfocusedSelectionColor. + + ^ paragraph! Item was added: + ----- Method: TextMorphForEditView>>selectionColor (in category 'accessing') ----- + selectionColor + ^ self valueOfProperty: #selectionColor ifAbsent: [Color blue muchLighter]! Item was added: + ----- Method: TextMorphForEditView>>unfocusedSelectionColor (in category 'accessing') ----- + unfocusedSelectionColor + ^ self valueOfProperty: #unfocusedSelectionColor ifAbsent: [Color blue muchLighter]! Item was changed: + (PackageInfo named: 'Morphic') postscript: 'ScrollBar initializeImagesCache. + LazyListMorph allSubInstancesDo: [:ea | ea resetFilterOffsets]. + PluggableTextMorph flushAdornmentCache.'! - (PackageInfo named: 'Morphic') postscript: 'SystemProgressMorph reset.'! From commits at source.squeak.org Sun Jul 31 09:22:19 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 09:22:21 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Kernel-mt.101.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Kernel to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Kernel-mt.101.mcz ==================== Summary ==================== Name: ToolBuilder-Kernel-mt.101 Author: mt Time: 31 July 2016, 11:22:04.71649 am UUID: b332ef4d-c896-ad4c-acfc-1f1e3a6cb96d Ancestors: ToolBuilder-Kernel-mt.100 *** Widget Refactorings and UI Themes (Part 6 of 11) *** Some fixes and refactorings for lists, trees, text boxes --- including added support for UI theming. =============== Diff against ToolBuilder-Kernel-mt.100 =============== Item was changed: ----- Method: PluggableScrollPaneSpec>>borderWidth (in category 'accessing') ----- borderWidth + ^ borderWidth! - ^ borderWidth ifNil: [1]! From commits at source.squeak.org Sun Jul 31 09:22:56 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 09:22:57 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.175.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.175.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.175 Author: mt Time: 31 July 2016, 11:22:46.85449 am UUID: 2aeb6aa3-4498-394f-90dc-d8192d0e8ef9 Ancestors: ToolBuilder-Morphic-mt.174 *** Widget Refactorings and UI Themes (Part 6 of 11) *** Some fixes and refactorings for lists, trees, text boxes --- including added support for UI theming. =============== Diff against ToolBuilder-Morphic-mt.174 =============== Item was changed: ----- Method: MorphicToolBuilder>>buildPluggableList: (in category 'widgets required') ----- buildPluggableList: aSpec | widget listClass getIndex setIndex | aSpec getSelected ifNil:[ listClass := self listClass. getIndex := aSpec getIndex. setIndex := aSpec setIndex. ] ifNotNil:[ listClass := self listByItemClass. getIndex := aSpec getSelected. setIndex := aSpec setSelected. ]. widget := listClass on: aSpec model list: aSpec list selected: getIndex changeSelected: setIndex menu: aSpec menu keystroke: aSpec keyPress. self register: widget id: aSpec name. "Override default scroll bar policies if needed. Widget will use preference values otherwise." aSpec hScrollBarPolicy ifNotNil: [:policy | policy caseOf: { [#always] -> [widget alwaysShowHScrollBar]. [#never] -> [widget hideHScrollBarIndefinitely]. [#whenNeeded] -> [widget showHScrollBarOnlyWhenNeeded]. } ]. aSpec vScrollBarPolicy ifNotNil: [:policy | policy caseOf: { [#always] -> [widget alwaysShowVScrollBar]. [#never] -> [widget hideVScrollBarIndefinitely]. [#whenNeeded] -> [widget showVScrollBarOnlyWhenNeeded]. } ]. widget getListElementSelector: aSpec listItem. widget getListSizeSelector: aSpec listSize. widget getIconSelector: aSpec icon. widget getHelpSelector: aSpec helpItem. widget doubleClickSelector: aSpec doubleClick. widget dragItemSelector: aSpec dragItem. widget dropItemSelector: aSpec dropItem. widget wantsDropSelector: aSpec dropAccept. widget dragStartedSelector: aSpec dragStarted. widget autoDeselect: aSpec autoDeselect. widget keystrokePreviewSelector: aSpec keystrokePreview. + aSpec color ifNotNil: [:c | widget color: c]. - widget - borderWidth: 1; - borderColor: Color lightGray; - color: (aSpec color - ifNil: [Color white] - ifNotNil: [aSpec color]). - self buildHelpFor: widget spec: aSpec. self setFrame: aSpec frame in: widget. self setLayoutHintsFor: widget spec: aSpec. parent ifNotNil:[self add: widget to: parent]. panes ifNotNil:[ aSpec list ifNotNil:[panes add: aSpec list]. ]. ^widget! Item was changed: ----- Method: MorphicToolBuilder>>buildPluggableScrollPane: (in category 'widgets optional') ----- buildPluggableScrollPane: spec | widget panel | widget := self scrollPaneClass new. widget model: spec model. self register: widget id: spec name. spec children ifNotNil: [:obj | "Create panel morph to scroll it." panel := self pluggablePanelSpec new model: spec model; children: obj; layout: spec layout; horizontalResizing: (spec layout == #proportional ifTrue: [#rigid] ifFalse: [#shrinkWrap]); verticalResizing: (spec layout == #proportional ifTrue: [#rigid] ifFalse: [#shrinkWrap]); buildWith: self. widget morph: panel. ] ifNil: [spec morph ifNotNil: [:m | widget morph: m] ifNil: [widget morphClass: spec morphClass]]. self setFrame: spec frame in: widget. self setLayoutHintsFor: widget spec: spec. parent ifNotNil: [self add: widget to: parent]. + spec borderWidth ifNotNil: [:w | widget borderWidth: w]. - widget borderWidth: spec borderWidth. "Override default scroll bar policies if needed. Widget will use preference values otherwise." spec hScrollBarPolicy ifNotNil: [:policy | policy caseOf: { [#always] -> [widget alwaysShowHScrollBar]. [#never] -> [widget hideHScrollBarIndefinitely]. [#whenNeeded] -> [widget showHScrollBarOnlyWhenNeeded]}]. spec vScrollBarPolicy ifNotNil: [:policy | policy caseOf: { [#always] -> [widget alwaysShowVScrollBar]. [#never] -> [widget hideVScrollBarIndefinitely]. [#whenNeeded] -> [widget showVScrollBarOnlyWhenNeeded]}]. ^ widget! Item was changed: ----- Method: MorphicToolBuilder>>buildPluggableText: (in category 'widgets required') ----- buildPluggableText: aSpec | widget | widget := self textPaneClass new. aSpec stylerClass ifNotNil: [:c | widget styler: (c new view: widget)]. widget on: aSpec model text: aSpec getText accept: aSpec setText readSelection: aSpec selection menu: aSpec menu. aSpec font ifNotNil: [:f | widget font: f]. widget readOnly: aSpec readOnly. widget editTextSelector: aSpec editText. widget wantsFrameAdornments: aSpec indicateUnacceptedChanges. widget askBeforeDiscardingEdits: aSpec askBeforeDiscardingEdits. widget setProperty: #alwaysAccept toValue: aSpec askBeforeDiscardingEdits not. aSpec softLineWrap ifNotNil: [:b | widget wrapFlag: b]. widget isAutoFit ifTrue: [widget hideHScrollBarIndefinitely] ifFalse: [widget showHScrollBarOnlyWhenNeeded]. self register: widget id: aSpec name. widget getColorSelector: aSpec color. self buildHelpFor: widget spec: aSpec. self setFrame: aSpec frame in: widget. self setLayoutHintsFor: widget spec: aSpec. parent ifNotNil:[self add: widget to: parent]. - widget borderColor: Color lightGray. - widget color: Color white. ^widget! Item was changed: ----- Method: PluggableTextMorphPlus>>drawBalloonTextOn: (in category 'drawing') ----- drawBalloonTextOn: aCanvas "Show balloon text in the text morph if it has no contents." textMorph contents ifNotEmpty: [ ^ self ]. ([ self balloonText ] on: Error do: [ : err | 'error in balloonText' ]) ifNotNil: [ : text | aCanvas drawString: text in: (self innerBounds insetBy: (5 @ 2 corner: 0 @ 0)) + font: (self userInterfaceTheme balloonTextFont ifNil: [TextStyle defaultFont]) + color: (self userInterfaceTheme balloonTextColor ifNil: [Color gray: 0.7]) ]! - font: textMorph textStyle defaultFont "I want italic here" - color: (Color gray: 0.7) ]! From commits at source.squeak.org Sun Jul 31 09:23:52 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 09:23:54 2016 Subject: [squeak-dev] The Trunk: Tools-mt.711.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.711.mcz ==================== Summary ==================== Name: Tools-mt.711 Author: mt Time: 31 July 2016, 11:23:32.11449 am UUID: 51307e24-030b-e046-a6f0-332c36d3a3ef Ancestors: Tools-mt.710 *** Widget Refactorings and UI Themes (Part 6 of 11) *** Some fixes and refactorings for lists, trees, text boxes --- including added support for UI theming. =============== Diff against Tools-mt.710 =============== Item was changed: ----- Method: PointerExplorerWrapper>>preferredColor (in category 'accessing') ----- preferredColor ^self isWeakOnly ifTrue: [ Color gray ] + ifFalse: [ super preferredColor ]! - ifFalse: [ Color black ]! From commits at source.squeak.org Sun Jul 31 09:24:28 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 09:24:30 2016 Subject: [squeak-dev] The Trunk: 51Deprecated-mt.38.mcz Message-ID: Marcel Taeumel uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-mt.38.mcz ==================== Summary ==================== Name: 51Deprecated-mt.38 Author: mt Time: 31 July 2016, 11:24:23.37849 am UUID: 165d2c29-2c81-c841-a85c-a60b5a222130 Ancestors: 51Deprecated-mt.37 *** Widget Refactorings and UI Themes (Part 6 of 11) *** Some fixes and refactorings for lists, trees, text boxes --- including added support for UI theming. =============== Diff against 51Deprecated-mt.37 =============== Item was added: + ----- Method: NewParagraph>>insertionPointColor (in category '*51Deprecated') ----- + insertionPointColor + self focused ifFalse: [^ Color transparent]. + ^ Display depth <= 2 + ifTrue: [Color black] + ifFalse: [Preferences insertionPointColor]! Item was added: + ----- Method: ScrollBar class>>createArrowOfDirection:in: (in category '*51Deprecated') ----- + createArrowOfDirection: aSymbol in: aRectangle + "PRIVATE - create an arrow bounded in aRectangle" + + | arrow vertices | + vertices := Preferences alternativeButtonsInScrollBars + ifTrue: [self verticesForComplexArrow: aRectangle] + ifFalse: [self verticesForSimpleArrow: aRectangle]. + "" + arrow := PolygonMorph + vertices: vertices + color: Color transparent + borderWidth: 0 + borderColor: Color black. + "" + arrow bounds: (arrow bounds insetBy: (aRectangle width / 6) rounded). + "" + Preferences alternativeButtonsInScrollBars + ifTrue: [arrow rotationDegrees: 45]. + "" + aSymbol == #right + ifTrue: [arrow rotationDegrees: arrow rotationDegrees + 90]. + aSymbol == #bottom + ifTrue: [arrow rotationDegrees: arrow rotationDegrees + 180]. + aSymbol == #left + ifTrue: [arrow rotationDegrees: arrow rotationDegrees + 270]. + "" + ^arrow! Item was added: + ----- Method: ScrollBar class>>createBoxIn: (in category '*51Deprecated') ----- + createBoxIn: aRectangle + "PRIVATE - create an box bounded in aRectangle" + | box | + box := RectangleMorph new. + box extent: (aRectangle scaleBy: 1 / 2) extent rounded; + borderWidth: 0. + "" + ^ box! Item was added: + ----- Method: ScrollBar class>>updateScrollBarButtonAspect:color: (in category '*51Deprecated') ----- + updateScrollBarButtonAspect: aMorph color: aColor + "update aMorph with aColor" + | fill direction | + aMorph isNil + ifTrue: [^ self]. + "" + aMorph color: aColor. + self gradientScrollBar ifFalse: [^ self]. + "" + fill := GradientFillStyle ramp: { + 0.0 -> aColor twiceLighter twiceLighter. + 1.0 -> aColor twiceDarker}. + "" + direction := ((aMorph width min: aMorph height) + + ((aMorph width - aMorph height) abs * 0.3)) rounded. + "" + fill origin: aMorph topLeft + (direction // 8). + fill direction: direction @ direction. + fill radial: true. + "" + aMorph fillStyle: fill! Item was added: + ----- Method: ScrollBar class>>updateScrollBarButtonsAspect:color: (in category '*51Deprecated') ----- + updateScrollBarButtonsAspect: aCollection color: aColor + "update aCollection of morphs with aColor" + + + aCollection + do: [:each | self updateScrollBarButtonAspect: each color: aColor]! Item was added: + ----- Method: ScrollBar class>>verticesForComplexArrow: (in category '*51Deprecated') ----- + verticesForComplexArrow: aRectangle + "PRIVATE - answer a collection of vertices to draw a complex arrow" + | vertices aux | + vertices := OrderedCollection new. + "" + vertices add: aRectangle bottomLeft. + vertices add: aRectangle topLeft. + vertices add: aRectangle topRight. + "" + aux := (aRectangle width / 3) rounded. + vertices add: aRectangle topRight + (0 @ aux). + vertices add: aRectangle topLeft + aux. + vertices add: aRectangle bottomLeft + (aux @ 0). + "" + ^ vertices! Item was added: + ----- Method: ScrollBar class>>verticesForSimpleArrow: (in category '*51Deprecated') ----- + verticesForSimpleArrow: aRectangle + "PRIVATE - answer a collection of vertices to draw a simple arrow" + | vertices | + vertices := OrderedCollection new. + "" + vertices add: aRectangle bottomLeft. + vertices add: aRectangle center x @ (aRectangle top + (aRectangle width / 8)). + vertices add: aRectangle bottomRight. + "" + ^ vertices! Item was added: + ----- Method: ScrollBar>>scrollDown (in category '*51Deprecated') ----- + scrollDown + self flag: #obsolete. + downButton eventHandler: nil. + downButton on: #mouseDown send: #scrollDownInit to: self. + downButton on: #mouseUp send: #finishedScrolling to: self. + ^self scrollDownInit! Item was added: + ----- Method: ScrollBar>>scrollUp (in category '*51Deprecated') ----- + scrollUp + self flag: #obsolete. + upButton eventHandler: nil. + upButton on: #mouseDown send: #scrollUpInit to: self. + upButton on: #mouseUp send: #finishedScrolling to: self. + ^self scrollUpInit! From commits at source.squeak.org Sun Jul 31 09:28:03 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 09:28:04 2016 Subject: [squeak-dev] The Trunk: System-mt.854.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.854.mcz ==================== Summary ==================== Name: System-mt.854 Author: mt Time: 31 July 2016, 11:27:38.353418 am UUID: b8b7f590-e108-a54f-8217-2ba1b4fd793d Ancestors: System-mt.853 *** Widget Refactorings and UI Themes (Part 7 of 11) *** Look-up and store default fonts in the current theme. =============== Diff against System-mt.853 =============== Item was changed: ----- Method: Preferences class>>setBalloonHelpFontTo: (in category 'prefs - fonts') ----- setBalloonHelpFontTo: aFont + UserInterfaceTheme current + set: #balloonHelpFont + to: aFont; + apply.! - Smalltalk at: #BalloonMorph ifPresent: - [:thatClass | thatClass setBalloonFontTo: aFont]! Item was changed: ----- Method: Preferences class>>setButtonFontTo: (in category 'prefs - fonts') ----- setButtonFontTo: aFont + + UserInterfaceTheme current + set: #standardButtonFont + to: aFont; + apply.! - Parameters at: #standardButtonFont put: aFont! Item was changed: ----- Method: Preferences class>>setCodeFontTo: (in category 'prefs - fonts') ----- setCodeFontTo: aFont "Establish the code font." + UserInterfaceTheme current + set: #standardCodeFont + to: aFont; + apply.! - Parameters at: #standardCodeFont put: aFont! Item was changed: ----- Method: Preferences class>>setEToysFontTo: (in category 'prefs - fonts') ----- setEToysFontTo: aFont "change the font used in eToys environment" + + UserInterfaceTheme current + set: #eToysFont + to: aFont; + apply.! - Parameters at: #eToysFont put: aFont! Item was changed: ----- Method: Preferences class>>setEToysTitleFontTo: (in category 'prefs - fonts') ----- setEToysTitleFontTo: aFont "change the font used in eToys environment" + + UserInterfaceTheme current + set: #eToysTitleFont + to: aFont; + apply.! - Parameters at: #eToysTitleFont put: aFont! Item was changed: ----- Method: Preferences class>>setFlapsFontTo: (in category 'prefs - fonts') ----- setFlapsFontTo: aFont + UserInterfaceTheme current + set: #standardFlapFont + to: aFont; + apply. + + "FlapTab allSubInstancesDo: + [:aFlapTab | aFlapTab reformatTextualTab]"! - Parameters at: #standardFlapFont put: aFont. - FlapTab allSubInstancesDo: - [:aFlapTab | aFlapTab reformatTextualTab]! Item was changed: ----- Method: Preferences class>>setHaloLabelFontTo: (in category 'prefs - fonts') ----- setHaloLabelFontTo: aFont "change the font used in eToys environment" + + UserInterfaceTheme current + set: #haloLabelFont + to: aFont; + apply.! - Parameters at: #haloLabelFont put: aFont! Item was changed: ----- Method: Preferences class>>setListFontTo: (in category 'prefs - fonts') ----- setListFontTo: aFont "Set the list font as indicated" + UserInterfaceTheme current + set: #standardListFont + to: aFont; + apply. + + "Smalltalk at: #ListParagraph ifPresent: [:lp | lp initialize]. + Smalltalk at: #Flaps ifPresent: [:flaps | flaps replaceToolsFlap]"! - Parameters at: #standardListFont put: aFont. - Smalltalk at: #ListParagraph ifPresent: [:lp | lp initialize]. - Smalltalk at: #Flaps ifPresent: [:flaps | flaps replaceToolsFlap]! Item was changed: ----- Method: Preferences class>>setMenuFontTo: (in category 'prefs - fonts') ----- setMenuFontTo: aFont + + UserInterfaceTheme current + set: #standardMenuFont + to: aFont; + apply. + + "Smalltalk at: #PopUpMenu ifPresent:[:aClass| aClass setMenuFontTo: aFont]. + TheWorldMainDockingBar updateInstances."! - "rbb 2/18/2005 12:54 - How should this be changed to work - with the UIManager, if at all?" - Parameters at: #standardMenuFont put: aFont. - Smalltalk at: #PopUpMenu ifPresent:[:aClass| aClass setMenuFontTo: aFont]. - TheWorldMainDockingBar updateInstances.! Item was changed: ----- Method: Preferences class>>setPaintBoxButtonFontTo: (in category 'prefs - fonts') ----- setPaintBoxButtonFontTo: aFont "change the font used in the buttons in PaintBox." + + UserInterfaceTheme current + set: #paintBoxButtonFont + to: aFont; + apply.! - Parameters at: #paintBoxButtonFont put: aFont! Item was changed: ----- Method: Preferences class>>setWindowTitleFontTo: (in category 'prefs - fonts') ----- setWindowTitleFontTo: aFont "Set the window-title font to be as indicated" + UserInterfaceTheme current + set: #windowTitleFont + to: aFont; + apply. + + "(Smalltalk hasClassNamed: #StandardSystemView) - Parameters at: #windowTitleFont put: aFont. - (Smalltalk hasClassNamed: #StandardSystemView) ifTrue: [(Smalltalk at: #StandardSystemView) setLabelStyle]. (Smalltalk hasClassNamed: #Flaps) + ifTrue: [(Smalltalk at: #Flaps) replaceToolsFlap]" - ifTrue: [(Smalltalk at: #Flaps) replaceToolsFlap] ! Item was changed: ----- Method: Preferences class>>standardBalloonHelpFont (in category 'prefs - fonts') ----- standardBalloonHelpFont + + ^ (UserInterfaceTheme current get: #balloonHelpFont) + ifNil: [TextStyle defaultFont]! - ^BalloonMorph balloonFont! Item was changed: ----- Method: Preferences class>>standardButtonFont (in category 'prefs - fonts') ----- standardButtonFont + + ^ (UserInterfaceTheme current get: #standardButtonFont) + ifNil: [TextStyle defaultFont]! - "Answer an attractive font to use for buttons" - "Answer the font to be used for textual flap tab labels" - ^ Parameters - at: #standardButtonFont - ifAbsentPut: [StrikeFont familyName: #ComicBold size: 16]! Item was changed: ----- Method: Preferences class>>standardCodeFont (in category 'prefs - fonts') ----- standardCodeFont + + ^ (UserInterfaceTheme current get: #standardCodeFont) + ifNil: [TextStyle defaultFont]! - "Answer the font to be used in code" - ^ Parameters at: #standardCodeFont ifAbsentPut: [TextStyle defaultFont]! Item was changed: ----- Method: Preferences class>>standardDefaultTextFont (in category 'prefs - fonts') ----- standardDefaultTextFont + + ^ (UserInterfaceTheme current get: #standardDefaultTextFont) + ifNil: [TextStyle defaultFont]! - ^TextStyle defaultFont! Item was changed: ----- Method: Preferences class>>standardEToysFont (in category 'prefs - fonts') ----- standardEToysFont + + ^ (UserInterfaceTheme current get: #eToysFont) + ifNil: [self standardButtonFont]! - "Answer the font to be used in the eToys environment" - ^ Parameters at: #eToysFont ifAbsentPut: [self standardButtonFont]! Item was changed: ----- Method: Preferences class>>standardEToysTitleFont (in category 'prefs - fonts') ----- standardEToysTitleFont + + ^ (UserInterfaceTheme current get: #eToysTitleFont) + ifNil: [self standardEToysFont]! - "Answer the font to be used in the eToys environment" - ^ Parameters at: #eToysTitleFont ifAbsentPut: [self standardEToysFont]! Item was changed: ----- Method: Preferences class>>standardFlapFont (in category 'prefs - fonts') ----- standardFlapFont + + ^ (UserInterfaceTheme current get: #standardFlapFont) + ifNil: [self standardButtonFont]! - "Answer the font to be used for textual flap tab labels" - ^ Parameters at: #standardFlapFont ifAbsentPut: [self standardButtonFont]! Item was changed: ----- Method: Preferences class>>standardHaloLabelFont (in category 'prefs - fonts') ----- standardHaloLabelFont + + ^ (UserInterfaceTheme current get: #haloLabelFont) + ifNil: [TextStyle defaultFont]! - "Answer the font to be used in the eToys environment" - ^ Parameters at: #haloLabelFont ifAbsentPut: [TextStyle defaultFont]! Item was changed: ----- Method: Preferences class>>standardListFont (in category 'prefs - fonts') ----- standardListFont + + ^ (UserInterfaceTheme current get: #standardListFont) + ifNil: [TextStyle defaultFont]! - "Answer the font to be used in lists" - ^ Parameters at: #standardListFont ifAbsentPut: [TextStyle defaultFont]! Item was changed: ----- Method: Preferences class>>standardMenuFont (in category 'prefs - fonts') ----- standardMenuFont + + ^ (UserInterfaceTheme current get: #standardMenuFont) + ifNil: [TextStyle defaultFont]! - "Answer the font to be used in menus" - ^ Parameters at: #standardMenuFont ifAbsentPut: [TextStyle defaultFont]! Item was changed: ----- Method: Preferences class>>standardPaintBoxButtonFont (in category 'prefs - fonts') ----- standardPaintBoxButtonFont + + ^ (UserInterfaceTheme current get: #paintBoxButtonFont) + ifNil: [self standardButtonFont]! - "Answer the font to be used in the eToys environment" - ^ Parameters at: #paintBoxButtonFont ifAbsentPut: [self standardButtonFont]! Item was changed: ----- Method: Preferences class>>standardSystemFont (in category 'prefs - fonts') ----- standardSystemFont "Answer the standard system font " + ^ (UserInterfaceTheme current get: #standardSystemFont) + ifNil: [TextStyle defaultFont]! - ^(TextConstants at: #DefaultTextStyle) defaultFont! Item was changed: ----- Method: Preferences class>>windowTitleFont (in category 'prefs - fonts') ----- windowTitleFont "Answer the standard font to use for window titles" + + ^ (UserInterfaceTheme current get: #windowTitleFont) + ifNil: [TextStyle defaultFont]! - ^ Parameters at: #windowTitleFont ifAbsentPut: [StrikeFont familyName: #NewYork size: 15]! From commits at source.squeak.org Sun Jul 31 09:30:24 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 09:30:25 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1214.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1214.mcz ==================== Summary ==================== Name: Morphic-mt.1214 Author: mt Time: 31 July 2016, 11:29:46.133418 am UUID: 0a02a7cb-3826-8d4f-9069-2b6b84a827ae Ancestors: Morphic-mt.1213 *** Widget Refactorings and UI Themes (Part 8 of 11) *** Adds minimal tool support for UI themes to world main docking bar's EXTRAS menu. =============== Diff against Morphic-mt.1213 =============== Item was changed: ----- Method: MenuMorph class>>gradientMenu: (in category 'preferences') ----- gradientMenu: aBoolean + GradientMenu = aBoolean ifTrue: [^ self]. GradientMenu := aBoolean. + + self flag: #refactor. "mt: Heavy use of the gradient-menu property..." - SystemProgressMorph reset. + SystemProgressMorph reset. + PluggableTextMorph flushAdornmentCache. + + MenuMorph allSubInstancesDo: [:ea | ea setDefaultParameters; setTitleParameters; updateColor]. + DockingBarMorph allSubInstancesDo: [:ea | ea setDefaultParameters; updateColor]. + + TheWorldMainDockingBar updateInstances. + PluggableListMorph allSubInstancesDo: [:ea | ea setListParameters]. + SimpleHierarchicalListMorph allSubInstancesDo: [:ea | ea setDefaultParameters]. + ! - "Update docking bars and their sub-menus." - ActiveWorld mainDockingBars do: [:bar | - bar - autoGradient: aBoolean; - updateColor]. - TheWorldMainDockingBar updateInstances.! Item was added: + ----- Method: TheWorldMainDockingBar>>editCurrentTheme (in category 'submenu - extras') ----- + editCurrentTheme + + UserInterfaceTheme current explore.! Item was changed: ----- Method: TheWorldMainDockingBar>>extrasMenuOn: (in category 'submenu - extras') ----- extrasMenuOn: aDockingBar aDockingBar addItem: [ :it| it contents: 'Extras' translated; addSubMenu: [:menu| menu addItem:[:item| item contents: 'Recover Changes' translated; help: 'Recover changes after a crash' translated; icon: MenuIcons smallDocumentClockIcon; target: ChangeList; selector: #browseRecentLog]. menu addLine. menu addItem:[:item| item + contents: 'Themes & Colors' translated; + subMenuUpdater: self + selector: #themesAndWindowColorsOn: ]. - contents: 'Window Colors' translated; - help: 'Changes the window color scheme' translated; - addSubMenu:[:submenu| self windowColorsOn: submenu]]. menu addItem:[:item| item contents: 'Set Author Initials' translated; help: 'Sets the author initials' translated; icon: MenuIcons smallUserQuestionIcon; target: Utilities; selector: #setAuthorInitials]. menu addItem:[:item| item contents: 'Restore Display (r)' translated; help: 'Redraws the entire display' translated; target: Project current; selector: #restoreDisplay]. menu addItem:[:item| item contents: 'Rebuild Menus' translated; help: 'Rebuilds the menu bar' translated; target: TheWorldMainDockingBar; selector: #updateInstances]. menu addLine. menu addItem:[:item| item contents: 'Start Profiler' translated; help: 'Starts the profiler' translated; icon: MenuIcons smallTimerIcon; target: self; selector: #startMessageTally]. menu addItem:[:item| item contents: 'Collect Garbage' translated; help: 'Run the garbage collector and report space usage' translated; target: Utilities; selector: #garbageCollectAndReport]. menu addItem:[:item| item contents: 'Purge Undo Records' translated; help: 'Save space by removing all the undo information remembered in all projects' translated; target: CommandHistory; selector: #resetAllHistory]. menu addItem:[:item| item contents: 'VM statistics' translated; help: 'Virtual Machine information' translated; target: self; selector: #vmStatistics]. menu addLine. menu addItem:[:item| item contents: 'Graphical Imports' translated; help: 'View the global repository called ImageImports; you can easily import external graphics into ImageImports via the FileList' translated; target: (Imports default); selector: #viewImages]. menu addItem:[:item| item contents: 'Standard Graphics Library' translated; help: 'Lets you view and change the system''s standard library of graphics' translated; target: ScriptingSystem; selector: #inspectFormDictionary]. menu addItem:[:item| item contents: 'Annotation Setup' translated; help: 'Click here to get a little window that will allow you to specify which types of annotations, in which order, you wish to see in the annotation panes of browsers and other tools' translated; target: Preferences; selector: #editAnnotations]. menu addItem:[:item| item contents: 'Browse My Changes' translated; help: 'Browse all of my changes since the last time #condenseSources was run.' translated; target: SystemNavigation new; selector: #browseMyChanges]. ] ]! Item was added: + ----- Method: TheWorldMainDockingBar>>themesAndWindowColorsOn: (in category 'submenu - extras') ----- + themesAndWindowColorsOn: menu + + | themes | + themes := UserInterfaceTheme allThemes asArray sortBy: [:t1 :t2 | + t1 name <= t2 name]. + + menu addItem:[:item| + item + contents: (Model useColorfulWindows ifTrue: [''] ifFalse: ['']), 'Colorful Windows' translated; + target: self; + selector: #toggleColorfulWindows]. + menu addItem:[:item| + item + contents: (SystemWindow gradientWindow not ifTrue: [''] ifFalse: ['']), 'Flat Widget Look' translated; + target: self; + selector: #toggleGradients]. + menu addItem:[:item | + item + contents: ((Preferences valueOfFlag: #menuAppearance3d) ifTrue: [''] ifFalse: ['']), 'Shadows' translated; + target: self; + selector: #toggleShadows]. + menu addItem:[:item | + item + contents: (SystemWindow roundedWindowCorners ifTrue: [''] ifFalse: ['']), 'Rounded Widget Look' translated; + target: self; + selector: #toggleRoundedLook]. + + + menu addLine. + + themes ifEmpty: [ + menu addItem: [ :item | + item + contents: '(No UI themes found.)' translated; + isEnabled: false ] ]. + themes do: [ :each | + menu addItem: [ :item | + item + contents: (UserInterfaceTheme current == each ifTrue: [''] ifFalse: ['']), each name; + target: each; + selector: #apply ] ]. + menu + addLine; + add: 'Edit Current UI Theme...' target: self selector: #editCurrentTheme.! Item was added: + ----- Method: TheWorldMainDockingBar>>toggleColorfulWindows (in category 'submenu - extras') ----- + toggleColorfulWindows + + Model useColorfulWindows: Model useColorfulWindows not.! Item was added: + ----- Method: TheWorldMainDockingBar>>toggleGradients (in category 'submenu - extras') ----- + toggleGradients + + | switch | + switch := SystemWindow gradientWindow not. + + SystemWindow gradientWindow: switch. + DialogWindow gradientDialog: switch. + MenuMorph gradientMenu: switch. + ScrollBar gradientScrollBar: switch. + PluggableButtonMorph gradientButton: switch.! Item was added: + ----- Method: TheWorldMainDockingBar>>toggleRoundedLook (in category 'submenu - extras') ----- + toggleRoundedLook + + | switch | + switch := SystemWindow roundedWindowCorners not. + + SystemWindow roundedWindowCorners: switch. + DialogWindow roundedDialogCorners: switch. + PluggableButtonMorph roundedButtonCorners: switch. + MenuMorph roundedMenuCorners: switch. + ScrollBar roundedScrollBarLook: switch.! Item was added: + ----- Method: TheWorldMainDockingBar>>toggleShadows (in category 'submenu - extras') ----- + toggleShadows + + Preferences toggle: #menuAppearance3d.! Item was removed: - ----- Method: TheWorldMainDockingBar>>windowColorsOn: (in category 'construction') ----- - windowColorsOn: menu - - menu addItem:[:item| - item - contents: 'Gray Windows' translated; - help: 'Use uniform window colors' translated; - target: Preferences; - selector: #installUniformWindowColors]. - - menu addItem:[:item| - item - contents: 'Colorful Windows' translated; - help: 'Use normal window colors' translated; - target: Preferences; - selector: #installNormalWindowColors]. - - menu addLine. - - menu addItem:[:item| - item - contents: 'Bright-colored Windows' translated; - help: 'Use bright window colors' translated; - target: Preferences; - selector: #installBrightWindowColors]. - - menu addItem:[:item| - item - contents: 'Pastel-colored Windows' translated; - help: 'Use pastel window colors' translated; - target: Preferences; - selector: #installPastelWindowColors]. - ! Item was changed: + (PackageInfo named: 'Morphic') postscript: 'TheWorldMainDockingBar updateInstances.'! - (PackageInfo named: 'Morphic') postscript: 'ScrollBar initializeImagesCache. - LazyListMorph allSubInstancesDo: [:ea | ea resetFilterOffsets]. - PluggableTextMorph flushAdornmentCache.'! From commits at source.squeak.org Sun Jul 31 09:35:14 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 09:35:16 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1215.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1215.mcz ==================== Summary ==================== Name: Morphic-mt.1215 Author: mt Time: 31 July 2016, 11:34:33.618418 am UUID: 73cf8a9d-c030-5f48-a2de-6bf45a687362 Ancestors: Morphic-mt.1214 *** Widget Refactorings and UI Themes (Part 10 of 11) *** Drop shadow theme support and keyboard focus color theme support. =============== Diff against Morphic-mt.1214 =============== Item was added: + ----- Method: Morph class>>themeProperties (in category 'preferences') ----- + themeProperties + + | catName | + catName := 'Other'. + + ^{ + { #hardShadowColor. catName. 'The color of shadows. An alpha about 0.5 is recommended.' }. + { #hardShadowOffset. catName. 'The offset of the shadows behind the morph.' } . + { #softShadowColor. catName. 'The color of soft shadows. An alpha less than 0.05 is recommended.' }. + { #softShadowOffset. catName. 'The offset of soft shadows behind the morph.' } . + { #keyboardFocusColor. catName. 'The color of the keyboard focus indication.' }. + { #keyboardFocusWidth. catName. 'The width of the keyboard focus indication.' }. + }! Item was changed: ----- Method: Morph class>>useSoftDropShadow: (in category 'preferences') ----- useSoftDropShadow: aBoolean UseSoftDropShadow = aBoolean ifTrue: [^ self]. UseSoftDropShadow := aBoolean. SystemWindow refreshAllWindows. + DialogWindow refreshAllDialogs. SystemProgressMorph reset. TheWorldMainDockingBar updateInstances.! Item was changed: ----- Method: Morph>>addDropShadow (in category 'drop shadows') ----- addDropShadow + self + hasDropShadow: true; + shadowOffset: (self useSoftDropShadow + ifTrue: [self userInterfaceTheme softShadowOffset ifNil: [10@8 corner: 10@12]] + ifFalse: [self userInterfaceTheme hardShadowOffset ifNil: [1@1]]); + shadowColor: (self useSoftDropShadow + ifTrue: [self userInterfaceTheme softShadowColor ifNil: [Color black alpha: 0.01]] + ifFalse: [self userInterfaceTheme hardShadowColor ifNil: [Color black alpha: 0.5]]).! - self hasDropShadow: true. - - self useSoftDropShadow - ifFalse: [ - self - shadowOffset: 3@3; - shadowColor: (Color black alpha: 0.5)] - ifTrue: [ - self - shadowOffset: (10@8 corner: 10@12); - shadowColor: (Color black alpha: 0.01)].! Item was added: + ----- Method: Morph>>applyUserInterfaceTheme (in category 'updating') ----- + applyUserInterfaceTheme + + "Re-initialize the shadow. Ensure shadow cache invalidation." + self hasDropShadow ifTrue: [ + self addDropShadow. + self removeProperty: #dropShadow. + self changed].! Item was changed: ----- Method: Morph>>drawKeyboardFocusIndicationOn: (in category 'drawing') ----- drawKeyboardFocusIndicationOn: aCanvas self wantsRoundedCorners + ifTrue: [aCanvas frameRoundRect: self bounds radius: self cornerRadius width: self keyboardFocusWidth color: self keyboardFocusColor] + ifFalse: [aCanvas frameRectangle: self bounds width: self keyboardFocusWidth color: self keyboardFocusColor].! - ifTrue: [aCanvas frameRoundRect: self bounds radius: self cornerRadius width: 3 "self borderStyle width" color: self keyboardFocusColor] - ifFalse: [aCanvas frameRectangle: self bounds width: 3 "self borderStyle width" color: self keyboardFocusColor].! Item was changed: ----- Method: Morph>>keyboardFocusColor (in category 'drawing') ----- keyboardFocusColor + ^ self userInterfaceTheme keyboardFocusColor ifNil: [TranslucentColor r: 0.3 g: 0.5 b: 0.5 alpha: 0.5]! - ^ Preferences keyboardFocusColor muchDarker alpha: 0.5! Item was added: + ----- Method: Morph>>keyboardFocusWidth (in category 'drawing') ----- + keyboardFocusWidth + + ^ self userInterfaceTheme keyboardFocusWidth ifNil: [3]! Item was changed: ----- Method: Morph>>shadowOffset: (in category 'drop shadows') ----- shadowOffset: aPoint "Set the current shadow offset" self shadowOffset = aPoint ifTrue: [^ self]. self changed. (aPoint isNil or: [ aPoint isZero ]) ifTrue:[self removeProperty: #shadowOffset] ifFalse:[self setProperty: #shadowOffset toValue: aPoint]. + self removeProperty: #dropShadow. self layoutChanged. self changed.! From commits at source.squeak.org Sun Jul 31 09:48:23 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 09:48:26 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1216.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1216.mcz ==================== Summary ==================== Name: Morphic-mt.1216 Author: mt Time: 31 July 2016, 11:47:41.295418 am UUID: 2829bb9f-b521-ec45-9252-77d6143b9dd5 Ancestors: Morphic-mt.1215 Small fix for the button border that was not updated correctly once a disabled button got enabled again. =============== Diff against Morphic-mt.1215 =============== Item was changed: ----- Method: PluggableButtonMorph>>updateFillStylePressing:hovering: (in category 'updating') ----- updateFillStylePressing: isPressing hovering: isHovering | gradient cc | "Migrate old instances." hoverColor ifNil: [hoverColor := onColor darker]. self labelOffset: (isPressing ifTrue: [1@1] ifFalse: [0@0]). self getModelState ifTrue: [self color: onColor] ifFalse: [self color: offColor]. + self borderStyle color: borderColor. - self borderColor: borderColor. self class gradientButton ifFalse: [ isPressing ifTrue: [ self color: feedbackColor. + self borderStyle color: feedbackColor muchDarker]. - self borderColor: feedbackColor muchDarker]. isHovering ifTrue: [ self color: hoverColor. + self borderStyle color: borderColor]. - self borderColor: borderColor]. ^ self]. isPressing ifTrue: [ cc := feedbackColor. self borderColor: feedbackColor muchDarker. gradient := GradientFillStyle ramp: { 0.0 -> cc muchDarker. 0.1-> (cc adjustBrightness: -0.2). 0.5 -> cc. 0.9-> (cc adjustBrightness: -0.1). 1 -> cc muchDarker}]. isHovering ifTrue: [ cc := hoverColor. gradient := GradientFillStyle ramp: { 0.0 -> Color white. 0.1-> (cc adjustBrightness: 0.05). 0.6 -> (cc darker)}]. gradient ifNil: [ cc := self color. gradient := GradientFillStyle ramp: { 0.0 -> Color white. 0.1-> (cc adjustBrightness: 0.05). 0.6 -> (cc darker)}]. gradient origin: bounds topLeft. gradient direction: 0@self height. self fillStyle: gradient.! From Marcel.Taeumel at hpi.de Sun Jul 31 09:55:49 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun Jul 31 10:40:31 2016 Subject: [squeak-dev] Re: [ANN] Widget Refactorings & UI Themes for Squeak In-Reply-To: <1469826724440-4908739.post@n4.nabble.com> References: <1469711671857-4908439.post@n4.nabble.com> <1469717356456-4908467.post@n4.nabble.com> <1469826724440-4908739.post@n4.nabble.com> Message-ID: <1469958949870-4908862.post@n4.nabble.com> marcel.taeumel wrote > > Chris Muller-3 wrote >>>> One could experiment with removing that check for a while. >> >> Instead of removing it, couldn't we just override it in SystemWindow? > Wouldn't work because it does not affect instances of SystemWindow but its > submorphs. Anyway, I found a solution. > > Best, > Marcel Hi, there. It's all in the Trunk now. It should work. :-) I do only have some troubles with the VM when applying all the updates to Eliot's working image. I suspect a bug in the VM. If you also experience VM crashes, open Monticello and the trunk/update map manually. Now load one mcm after the other (starting with mt.372.mcm). If you get debuggers, please report. There might still be some fine-tuning left in the .mcm's package load order. Best, Marcel -- View this message in context: http://forum.world.st/ANN-Widget-Refactorings-UI-Themes-for-Squeak-tp4908439p4908862.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Sun Jul 31 11:06:09 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 11:06:11 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1217.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1217.mcz ==================== Summary ==================== Name: Morphic-mt.1217 Author: mt Time: 31 July 2016, 1:05:33.780679 pm UUID: 40eb6f6d-92d3-574f-8dd7-e13db762ba75 Ancestors: Morphic-mt.1216 Makes icon labels in scroll bar buttons visible again for Solarized and Monokai themes. Those have no distinct border color for scroll bar buttons, which is normally used for determining the color of the iconic labels. =============== Diff against Morphic-mt.1216 =============== Item was changed: ----- Method: ScrollBar>>imageColor (in category 'accessing') ----- imageColor + ^ slider ifNil: [Color black] ifNotNil: [:s | + (s color = s borderColor or: [s borderColor isTransparent]) + ifTrue: [s color adjustBrightness: (s color brightness < 0.5 ifTrue: [0.2] ifFalse: [-0.2])] + ifFalse: [s borderColor]]! - ^ slider ifNil: [Color black] ifNotNil: [:s | s borderColor]! From commits at source.squeak.org Sun Jul 31 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jul 31 21:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160731215502.31172.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-July/068342.html Name: System-mt.851 Ancestors: System-mt.850 *** Widget Refactorings and UI Themes (Part 1 of 11) *** Adds the core theming mechanism ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068343.html Name: Morphic-mt.1207 Ancestors: Morphic-tfel.1206 *** Widget Refactorings and UI Themes (Part 1 of 11) *** By default, morphs can only apply themes if they are in the world. Prevents prototypes and other invisible/broken stuff from changing too often or causing debuggers. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068344.html Name: Tests-mt.347 Ancestors: Tests-pre.346 *** Widget Refactorings and UI Themes (Part 1 of 11) *** Tests for the theming mechanism. And a benchmark. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068345.html Name: Kernel-mt.1034 Ancestors: Kernel-topa.1033 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068346.html Name: System-mt.852 Ancestors: System-mt.851 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068347.html Name: Morphic-mt.1208 Ancestors: Morphic-mt.1207 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068348.html Name: 51Deprecated-mt.34 Ancestors: 51Deprecated-mt.33 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068349.html Name: ToolBuilder-Morphic-mt.171 Ancestors: ToolBuilder-Morphic-mt.170 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068350.html Name: Tools-mt.710 Ancestors: Tools-tfel.709 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068351.html Name: PreferenceBrowser-mt.62 Ancestors: PreferenceBrowser-topa.61 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068352.html Name: Collections-mt.702 Ancestors: Collections-topa.701 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068353.html Name: Monticello-mt.640 Ancestors: Monticello-cmm.639 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068354.html Name: SmallLand-ColorTheme-mt.7 Ancestors: SmallLand-ColorTheme-fbs.6 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068355.html Name: SUnitGUI-mt.63 Ancestors: SUnitGUI-mt.62 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068356.html Name: EToys-mt.140 Ancestors: EToys-tfel.139 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068357.html Name: Nebraska-mt.42 Ancestors: Nebraska-kfr.41 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068358.html Name: Protocols-mt.55 Ancestors: Protocols-mt.54 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068359.html Name: SMLoader-mt.88 Ancestors: SMLoader-tpr.87 *** Widget Refactorings and UI Themes (Part 2 of 11) *** Simplify window colors and prepare them and other properties of system windows to be themed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068360.html Name: Morphic-mt.1209 Ancestors: Morphic-mt.1208 Avoid updating the menu bar instances too early. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068361.html Name: 51Deprecated-mt.35 Ancestors: 51Deprecated-mt.34 Clean-up window color spec data if requested. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068362.html Name: ShoutCore-mt.56 Ancestors: ShoutCore-eem.55 *** Widget Refactorings and UI Themes (Part 3 of 11) *** Prepare Shout syntax highlighting for UI themes. (Temporarily no syntax highlighting. Sorry. Be patient.) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068363.html Name: System-mt.853 Ancestors: System-mt.852 *** Widget Refactorings and UI Themes (Part 3 of 11) *** Prepare Shout syntax highlighting for UI themes. (Temporarily no syntax highlighting. Sorry. Be patient.) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068364.html Name: ToolBuilder-Morphic-mt.172 Ancestors: ToolBuilder-Morphic-mt.171 *** Widget Refactorings and UI Themes (Part 3 of 11) *** Prepare Shout syntax highlighting for UI themes. (Temporarily no syntax highlighting. Sorry. Be patient.) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068365.html Name: 51Deprecated-mt.36 Ancestors: 51Deprecated-mt.35 *** Widget Refactorings and UI Themes (Part 3 of 11) *** Prepare Shout syntax highlighting for UI themes. (Temporarily no syntax highlighting. Sorry. Be patient.) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068366.html Name: Morphic-mt.1210 Ancestors: Morphic-mt.1209 *** Widget Refactorings and UI Themes (Part 4 of 11) *** Some fixes and refactorings in menus and docking bars. Prepare both for UI themeing. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068367.html Name: 51Deprecated-mt.37 Ancestors: 51Deprecated-mt.36 *** Widget Refactorings and UI Themes (Part 4 of 11) *** Some fixes and refactorings in menus and docking bars. Prepare both for UI themeing. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068368.html Name: Morphic-mt.1211 Ancestors: Morphic-mt.1210 *** Widget Refactorings and UI Themes (Part 5 of 11) *** Some fixes and refactorings for dialogs including added support for UI theming. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068369.html Name: Compiler-mt.324 Ancestors: Compiler-eem.323 *** Widget Refactorings and UI Themes (Part 5 of 11) *** Some fixes and refactorings for dialogs including added support for UI theming. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068370.html Name: ToolBuilder-Kernel-mt.100 Ancestors: ToolBuilder-Kernel-mt.99 *** Widget Refactorings and UI Themes (Part 5 of 11) *** Some fixes and refactorings for dialogs including added support for UI theming. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068371.html Name: ToolBuilder-Morphic-mt.173 Ancestors: ToolBuilder-Morphic-mt.172 *** Widget Refactorings and UI Themes (Part 5 of 11) *** Some fixes and refactorings for dialogs including added support for UI theming. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068372.html Name: Morphic-mt.1212 Ancestors: Morphic-mt.1211 *** Widget Refactorings and UI Themes (Part 6 of 11) *** Some fixes and refactorings for buttons including added support for UI theming. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068373.html Name: ToolBuilder-Morphic-mt.174 Ancestors: ToolBuilder-Morphic-mt.173 *** Widget Refactorings and UI Themes (Part 6 of 11) *** Some fixes and refactorings for buttons including added support for UI theming. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068374.html Name: Morphic-mt.1213 Ancestors: Morphic-mt.1212 *** Widget Refactorings and UI Themes (Part 6 of 11) *** Some fixes and refactorings for lists, trees, text boxes --- including added support for UI theming. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068375.html Name: ToolBuilder-Kernel-mt.101 Ancestors: ToolBuilder-Kernel-mt.100 *** Widget Refactorings and UI Themes (Part 6 of 11) *** Some fixes and refactorings for lists, trees, text boxes --- including added support for UI theming. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068376.html Name: ToolBuilder-Morphic-mt.175 Ancestors: ToolBuilder-Morphic-mt.174 *** Widget Refactorings and UI Themes (Part 6 of 11) *** Some fixes and refactorings for lists, trees, text boxes --- including added support for UI theming. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068377.html Name: Tools-mt.711 Ancestors: Tools-mt.710 *** Widget Refactorings and UI Themes (Part 6 of 11) *** Some fixes and refactorings for lists, trees, text boxes --- including added support for UI theming. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068378.html Name: 51Deprecated-mt.38 Ancestors: 51Deprecated-mt.37 *** Widget Refactorings and UI Themes (Part 6 of 11) *** Some fixes and refactorings for lists, trees, text boxes --- including added support for UI theming. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068379.html Name: System-mt.854 Ancestors: System-mt.853 *** Widget Refactorings and UI Themes (Part 7 of 11) *** Look-up and store default fonts in the current theme. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068380.html Name: Morphic-mt.1214 Ancestors: Morphic-mt.1213 *** Widget Refactorings and UI Themes (Part 8 of 11) *** Adds minimal tool support for UI themes to world main docking bar's EXTRAS menu. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068381.html Name: Morphic-mt.1215 Ancestors: Morphic-mt.1214 *** Widget Refactorings and UI Themes (Part 10 of 11) *** Drop shadow theme support and keyboard focus color theme support. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068382.html Name: System-mt.855 Ancestors: System-mt.854 *** Widget Refactorings and UI Themes (Part 11 of 11) *** Some UI themes. :-) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068383.html Name: Morphic-mt.1216 Ancestors: Morphic-mt.1215 Small fix for the button border that was not updated correctly once a disabled button got enabled again. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-July/068384.html Name: Morphic-mt.1217 Ancestors: Morphic-mt.1216 Makes icon labels in scroll bar buttons visible again for Solarized and Monokai themes. Those have no distinct border color for scroll bar buttons, which is normally used for determining the color of the iconic labels. ============================================= From Yoshiki.Ohshima at acm.org Sun Jul 31 22:48:08 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Sun Jul 31 22:48:11 2016 Subject: [squeak-dev] Smallapack In-Reply-To: References: Message-ID: I see you have some changes but it appears that evaluating the Installer do it goes into an infinite loop of #moduleName and #masOsxModuleName. (Thanks again!) On Sat, Jul 30, 2016 at 8:23 AM, Yoshiki Ohshima wrote: > But some of TestLapackMatrix tests fail. A few external functions > cannot be found, it looks like. > > On Sat, Jul 30, 2016 at 7:55 AM, Yoshiki Ohshima > wrote: >> Great! >> >> Before (I got into a meeting and then entered the "Friday mode", I was >> going down the path of trying to call the Framework functions but >> copying files anyway was a simpler solution for now. >> >> Yes, I got all tests green. Thank you! >> >> On Fri, Jul 29, 2016 at 3:24 PM, Nicolas Cellier >> wrote: >>> OK, what I did on my Mac: >>> >>> 1) look under the Squeak app and edit the Contents/Info.plist >>> 2) change value of SqueakPluginsBuiltInOrLocalOnly to "No" >>> otherwise library loading is restricted to the Squeak app bundle >>> 3) copy the veclib framework library files (dylib) in same directory as >>> squeak image >>> 4) launch Squeak >>> 5) install Smallapack >>> follow instruction from >>> https://github.com/nicolas-cellier-aka-nice/smallapack/wiki/SmallapackSqueak >>> 6) change CBlasLibrary class>>moduleName 'libcblas.dylib' -> 'libBlas.dylib' >>> nowadays, cblas and blas are in the same dylib... >>> 7) change CLapackLibrary class>>moduleName 'libclapack.dylib' -> >>> 'libLapack.dylib' >>> idem >>> 8) re-initialize the cache (I know, I know, there are too many...) >>> CBlasLibrary install. CLapackLibrary install. LapackMatrix >>> resetBlasInterfaces; resetLapackInterfaces. >>> 9) run the TestCBlas suite >>> >>> It should be green >>> I will commit the changes later, and will probably implement moduleNames as >>> a Preference (pragma oriented). >>> No need to override code anymore :) >>> >>> I think step 3) is necessary because of ioLoadModuleRaw() in >>> platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m >>> https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m >>> It would only look those frameworks: >>> >>> static char *frameworks[]= >>> { >>> "", >>> "/CoreServices.framework/Frameworks", >>> "/ApplicationServices.framework/Frameworks", >>> "/Carbon.framework/Frameworks", >>> 0 >>> }; >>> >>> But I did step 3) before I tried 1) + 2), adn did not retry, so maybe I'm >>> wrong... >>> Scanning all the frameworks is not a solution. And what if we want a >>> specific version? >>> It would be far better to be able to specify the path to the library from >>> within the image like VW... >>> >>> >>> 2016-07-29 19:41 GMT+02:00 Nicolas Cellier >>> : >>>> >>>> >>>> >>>> 2016-07-29 19:28 GMT+02:00 Nicolas Cellier >>>> : >>>>> >>>>> >>>>> >>>>> 2016-07-29 19:02 GMT+02:00 Yoshiki Ohshima : >>>>>> >>>>>> First question: >>>>>> >>>>>> The Mac OS comes with Accelerate.Framework and that contains BLAS. >>>>>> But probably I still should compile those libraries, right? >>>>>> >>>>> >>>>> No, it's better to link to accelerated library. >>>>> I don't have a Mac handy here to verify how to link to it though. >>>>> I'll be able to check latter in the evening >>>>> >>>> >>>> >>>> I've downloaded the code, and I see it now: the library names are >>>> hardcoded (see implementors of moduleName). >>>> For Mac it is libblas.dylib and libcblas.dylib >>>> Also note that there is a preference for switching to cblas (blas >>>> functions with C interface). >>>> This should be faster because we pass some parameters by value rather than >>>> allocating them and pass reference... >>>> >>>> Module names could also be replaced by Preferences eventually, but by now, >>>> you'll have to override... >>>> >>>>>> >>>>>> >>>>>> On Thu, Jul 28, 2016 at 4:11 PM, Yoshiki Ohshima >>>>>> wrote: >>>>>> > Thanks! >>>>>> > >>>>>> > On Thu, Jul 28, 2016 at 4:04 PM, Nicolas Cellier >>>>>> > wrote: >>>>>> >> Hi Yoshiki, >>>>>> >> >>>>>> >> Thanks for inquiring about Smallapack. >>>>>> >> >>>>>> >> This problem has been solved in 2011 as the post tells. >>>>>> >> Moreover, it was about alignment of squeak objects that was on >>>>>> >> multiple of 4 >>>>>> >> on SqueakV3 memory. >>>>>> >> Spur is 8 byte aligned, so the problem would have also vanished >>>>>> >> without any >>>>>> >> patch for those being patient :) >>>>>> >> >>>>>> >> For the 15 arguments limit, Smallapack comes with it's own compiler, >>>>>> >> so it's >>>>>> >> a non issue. >>>>>> >> Maybe I should make the documentation more clear on >>>>>> >> >>>>>> >> https://github.com/nicolas-cellier-aka-nice/smallapack/wiki/SmallapackSqueak >>>>>> >> ? >>>>>> >> >>>>>> >> Unfortunately, there's no Sparse Matrix representation in Lapack. >>>>>> >> If you know of a good package for that, it could be integrated. >>>>>> >> >>>>>> >> If you have other questions, don't hesitate to ask. >>>>>> >> >>>>>> >> cheers >>>>>> >> >>>>>> >> Nicolas >>>>>> >> >>>>>> >> 2016-07-29 0:22 GMT+02:00 Yoshiki Ohshima : >>>>>> >>> >>>>>> >>> I am trying to do a bit of linear algebra stuff that involves to >>>>>> >>> solve >>>>>> >>> a sparse 2D matrix (for a variation of doing least square fit). >>>>>> >>> >>>>>> >>> There was a message from Nicolas: >>>>>> >>> >>>>>> >>> >>>>>> >>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-August/161113.html >>>>>> >>> >>>>>> >>> Is this where it stands today, too? It looks like that arg count >>>>>> >>> problem is still there in 5.0, but is it in a way non-issue as it is >>>>>> >>> still FFI based? >>>>>> >>> >>>>>> >>> Thanks! >>>>>> >>> >>>>>> >>> -- >>>>>> >>> -- Yoshiki >>>>>> >>> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> > >>>>>> > >>>>>> > >>>>>> > -- >>>>>> > -- Yoshiki >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> -- Yoshiki >>>>>> >>>>> >>>> >>> >>> >>> >>> >> >> >> >> -- >> -- Yoshiki > > > > -- > -- Yoshiki -- -- Yoshiki