From hfern at free.fr Thu Aug 1 06:35:28 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Thu, 1 Aug 2024 15:35:28 +0200 Subject: [Cuis-dev] closeTo: number? Message-ID: Hi, I am porting some package usint it in the test. How should we do it in the stock image? I don't want to add an extension in the package. I think we discussed it some weeks ago but I can't search the mailing list. Thanks From r.mark.volkmann at gmail.com Thu Aug 1 07:11:01 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Thu, 1 Aug 2024 09:11:01 -0500 Subject: [Cuis-dev] official operator names of ; and :: In-Reply-To: References: Message-ID: Thanks Andres! Interestingly page 178 in the Cuis Book (Appendix B) says this: Transcript show: 'hello'; cr message cascade (;) BoxedMorph new :: color: Color blue; openInWorld message cascade (::) But surely these can't go by the same name, so I think you are correct. On Wed, Jul 31, 2024 at 9:37?PM Andres Valloud via Cuis-dev < cuis-dev at lists.cuis.st> wrote: > The name of this bit of syntax is "chain". > > On 7/31/24 6:17 PM, Mark Volkmann via Cuis-dev wrote: > > What is the official name of the :: operator? > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Thu Aug 1 07:54:03 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Thu, 1 Aug 2024 09:54:03 -0500 Subject: [Cuis-dev] >> notation Message-ID: I understand that Foo>>bar is not valid Smalltalk syntax and is just notation seen in documentation that means bar is a method in the class Foo. Can I assume that bar is an instance method and not a class method? Is there a different notation for class methods? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hernan.wilkinson at 10pines.com Thu Aug 1 08:07:44 2024 From: hernan.wilkinson at 10pines.com (=?UTF-8?Q?Hern=C3=A1n_Wilkinson?=) Date: Thu, 1 Aug 2024 12:07:44 -0300 Subject: [Cuis-dev] >> notation In-Reply-To: References: Message-ID: Foo>>#bar is a collaboration. Foo receives de message >> with the parameter #bar If you look at the implementation of #>> in Behavior you will see that it does ^self compiledMethodAt: ... Using Foo>>#bar as documentation as if it was a "notation" is one of the beautys of Smalltalk, it shows who simple and consistent is and its "meta-circularity" we could say... On Thu, Aug 1, 2024 at 11:54?AM Mark Volkmann via Cuis-dev < cuis-dev at lists.cuis.st> wrote: > I understand that > > Foo>>bar > > is not valid Smalltalk syntax and is just notation seen in documentation > that means bar is a method in the class Foo. > Can I assume that bar is an instance method and not a class method? > Is there a different notation for class methods? > > -- > R. Mark Volkmann > Object Computing, Inc. > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -- *Hern?n WilkinsonAgile Software Development, Teaching & Coaching* *Phone: +54-011*-4893-2057 *Twitter: @HernanWilkinson* *site: http://www.10Pines.com * Address: Alem 896, Floor 6, Buenos Aires, Argentina -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Thu Aug 1 08:57:48 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Thu, 1 Aug 2024 10:57:48 -0500 Subject: [Cuis-dev] >> notation In-Reply-To: References: Message-ID: Thanks! I didn't know that >> was an instance method in the Behavior class that takes a Symbol. But I was referring to the use of >> in documentation. For example, page 34 of the Cuis Book contains the following: Number>>squared "Answer the receiver multiplied by itself." ^ self * self Here I believe the intent is to make it clear that squared is a method in the Number class and not to represent valid syntax. So my question is whether when used in documentation this way it always describes an instance method. And second, is there another notation used in documentation to describe class methods that is different from this. On Thu, Aug 1, 2024 at 10:07?AM Hern?n Wilkinson < hernan.wilkinson at 10pines.com> wrote: > Foo>>#bar is a collaboration. > Foo receives de message >> with the parameter #bar > If you look at the implementation of #>> in Behavior you will see that it > does ^self compiledMethodAt: ... > > Using Foo>>#bar as documentation as if it was a "notation" is one of the > beautys of Smalltalk, it shows who simple and consistent is and its > "meta-circularity" we could say... > > On Thu, Aug 1, 2024 at 11:54?AM Mark Volkmann via Cuis-dev < > cuis-dev at lists.cuis.st> wrote: > >> I understand that >> >> Foo>>bar >> >> is not valid Smalltalk syntax and is just notation seen in documentation >> that means bar is a method in the class Foo. >> Can I assume that bar is an instance method and not a class method? >> Is there a different notation for class methods? >> >> -- >> R. Mark Volkmann >> Object Computing, Inc. >> -- >> Cuis-dev mailing list >> Cuis-dev at lists.cuis.st >> https://lists.cuis.st/mailman/listinfo/cuis-dev >> > > > -- > > *Hern?n WilkinsonAgile Software Development, Teaching & Coaching* > *Phone: +54-011*-4893-2057 > *Twitter: @HernanWilkinson* > *site: http://www.10Pines.com * > Address: Alem 896, Floor 6, Buenos Aires, Argentina > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hernan.wilkinson at 10pines.com Thu Aug 1 09:22:15 2024 From: hernan.wilkinson at 10pines.com (=?UTF-8?Q?Hern=C3=A1n_Wilkinson?=) Date: Thu, 1 Aug 2024 13:22:15 -0300 Subject: [Cuis-dev] >> notation In-Reply-To: References: Message-ID: well, the right way to write would be: Number>>#squared ... Because the receiver is Number, the #squeared is an instance method. If it was a class method it should be written: Number class>>#squared .... Remember that it is not syntax, it is a message send. Hernan. On Thu, Aug 1, 2024 at 12:58?PM Mark Volkmann wrote: > Thanks! I didn't know that >> was an instance method in the Behavior class > that takes a Symbol. > > But I was referring to the use of >> in documentation. For example, page > 34 of the Cuis Book contains the following: > > Number>>squared > > "Answer the receiver multiplied by itself." > > ^ self * self > > > Here I believe the intent is to make it clear that squared is a method in > the Number class and not to represent valid syntax. > > > So my question is whether when used in documentation this way it always > describes an instance method. > > And second, is there another notation used in documentation to describe > class methods that is different from this. > > On Thu, Aug 1, 2024 at 10:07?AM Hern?n Wilkinson < > hernan.wilkinson at 10pines.com> wrote: > >> Foo>>#bar is a collaboration. >> Foo receives de message >> with the parameter #bar >> If you look at the implementation of #>> in Behavior you will see that it >> does ^self compiledMethodAt: ... >> >> Using Foo>>#bar as documentation as if it was a "notation" is one of the >> beautys of Smalltalk, it shows who simple and consistent is and its >> "meta-circularity" we could say... >> >> On Thu, Aug 1, 2024 at 11:54?AM Mark Volkmann via Cuis-dev < >> cuis-dev at lists.cuis.st> wrote: >> >>> I understand that >>> >>> Foo>>bar >>> >>> is not valid Smalltalk syntax and is just notation seen in documentation >>> that means bar is a method in the class Foo. >>> Can I assume that bar is an instance method and not a class method? >>> Is there a different notation for class methods? >>> >>> -- >>> R. Mark Volkmann >>> Object Computing, Inc. >>> -- >>> Cuis-dev mailing list >>> Cuis-dev at lists.cuis.st >>> https://lists.cuis.st/mailman/listinfo/cuis-dev >>> >> >> >> -- >> >> *Hern?n WilkinsonAgile Software Development, Teaching & Coaching* >> *Phone: +54-011*-4893-2057 >> *Twitter: @HernanWilkinson* >> *site: http://www.10Pines.com * >> Address: Alem 896, Floor 6, Buenos Aires, Argentina >> > > > -- > R. Mark Volkmann > Object Computing, Inc. > -- *Hern?n WilkinsonAgile Software Development, Teaching & Coaching* *Phone: +54-011*-4893-2057 *Twitter: @HernanWilkinson* *site: http://www.10Pines.com * Address: Alem 896, Floor 6, Buenos Aires, Argentina -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin at hand2mouse.com Thu Aug 1 11:24:07 2024 From: martin at hand2mouse.com (Martin McClure) Date: Thu, 1 Aug 2024 11:24:07 -0700 Subject: [Cuis-dev] >> notation In-Reply-To: References: Message-ID: Hi Mark, You and Hern?n are both correct. Foo>>bar or Foo class >> bar /is/ just notation seen in documentation, and Foo >> #bar /is/ (in some Smalltalk dialects) a valid message send. I'm not sure where the notation originated -- it seemed to just be there wherever people needed to discuss Smalltalk in plain text. I'm pretty sure it was firmly established by the mid-80s when I started using Smalltalk. I long thought that "class >> selector" was a contraction of "class > protocol > selector" (protocol was the term used for method category in the original Smalltalk-80 browsers). But that may be just my imagination. For many years there were no methods for the selector #'>>', but eventually some dialects added a method for it, as Hern?n indicated. Regards, -Martin On 8/1/24 07:54, Mark Volkmann via Cuis-dev wrote: > I understand that > > Foo>>bar > > is not valid Smalltalk syntax and is just notation seen in > documentation that means bar is a method in the class Foo. > Can I assume that bar is an instance method and not a class method? > Is there a different notation for class methods? > > -- > R. Mark Volkmann > Object Computing, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin at hand2mouse.com Thu Aug 1 11:39:26 2024 From: martin at hand2mouse.com (Martin McClure) Date: Thu, 1 Aug 2024 11:39:26 -0700 Subject: [Cuis-dev] closeTo: number? In-Reply-To: References: Message-ID: <03291787-8891-4a4b-9fa0-1e2e56c40747@hand2mouse.com> I quote Juan's reply below. which basically says "we should not do it in the base image." And I completely agree. Although there are situations where this kind of test is appropriate, I've seen too many cases where tests written to accept approximate answers hide legitimate bugs. I realize that this does make porting more difficult, and you have my sympathies for that. Regards, -Martin On 7/9/24 07:31, Juan Vuletich via Cuis-dev wrote: > On 7/8/2024 10:45 PM, Mark Volkmann via Cuis-dev wrote: >> Were these instance methods in the `TestCase` class removed recently? >> >> assert:isCloseTo: >> assert:isCloseTo:withinPrecision: >> assert:isNotCloseTo: >> assert:isNotCloseTo:withinPrecision: >> >> I see them in the file Cuis7.0.sources, but I don't see?them in a >> System Browser when the TestCase class is selected. >> >> -- >> R. Mark Volkmann >> Object Computing, Inc. > > Yes. > > There is no general and correct way to provide those kinds of > services. Anybody writing tests for numerical code should decide how > to test for correct results in the context of what they are testing. On 8/1/24 06:35, Hilaire Fernandes via Cuis-dev wrote: > Hi, > > I am porting some package usint it in the test. > > How should we do it in the stock image? I don't want to add an > extension in the package. > > I think we discussed it some weeks ago but I can't search the mailing > list. > > Thanks > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ten at smallinteger.com Thu Aug 1 11:49:32 2024 From: ten at smallinteger.com (Andres Valloud) Date: Thu, 1 Aug 2024 11:49:32 -0700 Subject: [Cuis-dev] closeTo: number? In-Reply-To: References: Message-ID: <674cd3ae-7015-47c7-98fa-073130a7f240@smallinteger.com> Hi Hilaire, look at Float>>isWithin:floatsFrom: and related methods. You will need to specify a tolerance in ulps (units in the last place, or units of least precision) depending on the numerical analysis for the calculations being done. On 8/1/24 6:35 AM, Hilaire Fernandes via Cuis-dev wrote: > Hi, > > I am porting some package usint it in the test. > > How should we do it in the stock image? I don't want to add an extension > in the package. > > I think we discussed it some weeks ago but I can't search the mailing list. > > Thanks > From hernan.wilkinson at 10pines.com Thu Aug 1 11:51:51 2024 From: hernan.wilkinson at 10pines.com (=?UTF-8?Q?Hern=C3=A1n_Wilkinson?=) Date: Thu, 1 Aug 2024 15:51:51 -0300 Subject: [Cuis-dev] >> notation In-Reply-To: References: Message-ID: > > > > I long thought that "class >> selector" was a contraction of "class > > protocol > selector" (protocol was the term used for method category in the > original Smalltalk-80 browsers). But that may be just my imagination. > wow, cool idea!! I don't know if it will add too much value but it is cool and, the most interesting thing, doable :-) > > For many years there were no methods for the selector #'>>', but > eventually some dialects added a method for it, as Hern?n indicated. > Allen Wirfs-Brook always mentioned the need for a Smalltalk syntax to interchange code, etc. (he used another word that I do not remember) and I think he tried to push it with the ansi standard... I'm mentioning this because in his talk at the Smalltalks 2016 he talked about it and the #>> message and so on (I hope my memory is not playing games with me :-) ) Cheers! Hernan. > > Regards, > -Martin > > > On 8/1/24 07:54, Mark Volkmann via Cuis-dev wrote: > > I understand that > > Foo>>bar > > is not valid Smalltalk syntax and is just notation seen in documentation > that means bar is a method in the class Foo. > Can I assume that bar is an instance method and not a class method? > Is there a different notation for class methods? > > -- > R. Mark Volkmann > Object Computing, Inc. > > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -- *Hern?n WilkinsonAgile Software Development, Teaching & Coaching* *Phone: +54-011*-4893-2057 *Twitter: @HernanWilkinson* *site: http://www.10Pines.com * Address: Alem 896, Floor 6, Buenos Aires, Argentina -------------- next part -------------- An HTML attachment was scrubbed... URL: From ten at smallinteger.com Thu Aug 1 11:54:52 2024 From: ten at smallinteger.com (Andres Valloud) Date: Thu, 1 Aug 2024 11:54:52 -0700 Subject: [Cuis-dev] >> notation In-Reply-To: References: Message-ID: Gilad Bracha, same thing. And of course they are correct. On 8/1/24 11:51 AM, Hern?n Wilkinson via Cuis-dev wrote: > > Allen Wirfs-Brook always mentioned the need for a Smalltalk syntax to > interchange code, etc. From ten at smallinteger.com Thu Aug 1 12:02:05 2024 From: ten at smallinteger.com (Andres Valloud) Date: Thu, 1 Aug 2024 12:02:05 -0700 Subject: [Cuis-dev] closeTo: number? In-Reply-To: <03291787-8891-4a4b-9fa0-1e2e56c40747@hand2mouse.com> References: <03291787-8891-4a4b-9fa0-1e2e56c40747@hand2mouse.com> Message-ID: <9dd5857e-e14e-4152-b955-90b8a2778e7f@smallinteger.com> Yes, defining something like "closeTo:" with e.g. a hard coded tolerance of 0.0001 does not make sense. What does "close" mean? To whom? When? Who knows. What does make sense is to specify the number of ulps of imprecision you're willing to tolerate, for the particular application in question. Sometimes that tolerance is literally 0 ulps, and any positive number of ulps is just bad. Some examples for the sake of clarity... 2.0 * 2.0 must be 4.0 exactly 1.0 timesTwoPower: -1500 must be 0.0 exactly any finite value plus its negation must be 0.0 exactly It is also easy to be led astray. For example, 17 / 20 = 0.85 is a mathematical impossibility, even if right now the system tries to be helpful by answering true. On 8/1/24 11:39 AM, Martin McClure via Cuis-dev wrote: > I quote Juan's reply below. which basically says "we should not do it in > the base image." And I completely agree. Although there are situations > where this kind of test is appropriate, I've seen too many cases where > tests written to accept approximate answers hide legitimate bugs. > > I realize that this does make porting more difficult, and you have my > sympathies for that. > > Regards, > -Martin > > On 7/9/24 07:31, Juan Vuletich via Cuis-dev wrote: >> On 7/8/2024 10:45 PM, Mark Volkmann via Cuis-dev wrote: >>> Were these instance methods in the `TestCase` class removed recently? >>> >>> assert:isCloseTo: >>> assert:isCloseTo:withinPrecision: >>> assert:isNotCloseTo: >>> assert:isNotCloseTo:withinPrecision: >>> >>> I see them in the file Cuis7.0.sources, but I don't see?them in a >>> System Browser when the TestCase class is selected. >>> >>> -- >>> R. Mark Volkmann >>> Object Computing, Inc. >> >> Yes. >> >> There is no general and correct way to provide those kinds of >> services. Anybody writing tests for numerical code should decide how >> to test for correct results in the context of what they are testing. > > > On 8/1/24 06:35, Hilaire Fernandes via Cuis-dev wrote: >> Hi, >> >> I am porting some package usint it in the test. >> >> How should we do it in the stock image? I don't want to add an >> extension in the package. >> >> I think we discussed it some weeks ago but I can't search the mailing >> list. >> >> Thanks >> > > From r.mark.volkmann at gmail.com Thu Aug 1 12:09:25 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Thu, 1 Aug 2024 14:09:25 -0500 Subject: [Cuis-dev] restoring lost changes In-Reply-To: <1f63af2b-d2a8-41f5-a18a-29197e39f24f@free.fr> References: <39a2876d-2494-46ff-9012-8de1bfffd6af@free.fr> <1f63af2b-d2a8-41f5-a18a-29197e39f24f@free.fr> Message-ID: I feel fairly certain that the functionality to display a popup that asks how to handle unsaved changes after a VM crash (or force quit) described in The Cuis Book is broken for macOS. I have the required preference set. See the description at https://cuis-smalltalk.github.io/TheCuisBook/The-Change-Log.html. Can someone that uses a Mac verify this? On Tue, Jul 23, 2024 at 10:51?AM Hilaire Fernandes wrote: > Le 23/07/2024 ? 17:31, Mark Volkmann a ?crit : > > Did I miss a step? > > Likely. It did work for me. I am on Linux but it should not be a > meaningful difference > > I don't see any missing step in your list though. > > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vanessa at codefrau.net Thu Aug 1 12:24:18 2024 From: vanessa at codefrau.net (Vanessa Freudenberg) Date: Thu, 1 Aug 2024 12:24:18 -0700 Subject: [Cuis-dev] official operator names of ; and :: In-Reply-To: References: Message-ID: That's not a great example for :: because it works just as well without it. This may be a better illustration: 3 + 4 squared => 7 3 + 4 ; squared => 9 3 + 4 :: squared => 49 Nessa On Thu, Aug 1, 2024 at 7:11?AM Mark Volkmann via Cuis-dev < cuis-dev at lists.cuis.st> wrote: > Thanks Andres! Interestingly page 178 in the Cuis Book (Appendix B) says > this: > > Transcript show: 'hello'; cr message cascade (;) > > BoxedMorph new :: color: Color blue; openInWorld message cascade (::) > > > But surely these can't go by the same name, so I think you are correct. > > On Wed, Jul 31, 2024 at 9:37?PM Andres Valloud via Cuis-dev < > cuis-dev at lists.cuis.st> wrote: > >> The name of this bit of syntax is "chain". >> >> On 7/31/24 6:17 PM, Mark Volkmann via Cuis-dev wrote: >> > What is the official name of the :: operator? >> -- >> Cuis-dev mailing list >> Cuis-dev at lists.cuis.st >> https://lists.cuis.st/mailman/listinfo/cuis-dev >> > > > -- > R. Mark Volkmann > Object Computing, Inc. > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Thu Aug 1 13:44:42 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Thu, 1 Aug 2024 15:44:42 -0500 Subject: [Cuis-dev] keyboard events in custom morph Message-ID: I'm able to get mouse events in a custom morph, but I haven't been able to do the same for keyboard events. Here is what I tried: I created a subclass of PlacedMorph. In the initialize method I have this: initialize super initialize. self setProperty: #handlesKeyboard toValue: true. In the keyDown: method I have this: keyDown: aKeyboardEvent 'got keyDown' print. I create an instance of my custom morph in a Workspace and send it #openInWorld to render it. I then move the mouse over it and press a key, but I don't see output in the Transcript. Does anyone see what I'm missing? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Thu Aug 1 14:23:36 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Thu, 01 Aug 2024 14:23:36 -0700 Subject: [Cuis-dev] keyboard events in custom morph In-Reply-To: References: Message-ID: On 2024-08-01 13:44, Mark Volkmann via Cuis-dev wrote: > I'm able to get mouse events in a custom morph, but I haven't been able > to do the same for keyboard events. Here is what I tried: > > I created a subclass of PlacedMorph. > > In the initialize method I have this: > > initialize > super initialize. > self setProperty: #handlesKeyboard toValue: true. > > In the keyDown: method I have this: > > keyDown: aKeyboardEvent > 'got keyDown' print. > > I create an instance of my custom morph in a Workspace and send it > #openInWorld to render it. > I then move the mouse over it and press a key, but I don't see output > in the Transcript. > Does anyone see what I'm missing? Yes. You are forgetting to ask for #handlesKeyboard iMplementors. Morph>>processKeystroke: shows you need to supply a handler to #'keyStroke:' Cuis Smalltalk knows a lot about itself. You need to practice various ways of asking the system about itself. Might be a good chapter in your blog.. HTH, -KenD From r.mark.volkmann at gmail.com Fri Aug 2 07:23:22 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Fri, 2 Aug 2024 09:23:22 -0500 Subject: [Cuis-dev] keyboard events in custom morph In-Reply-To: References: Message-ID: On Thu, Aug 1, 2024 at 4:23?PM wrote: > On 2024-08-01 13:44, Mark Volkmann via Cuis-dev wrote: > > > I'm able to get mouse events in a custom morph, but I haven't been able > > to do the same for keyboard events. Here is what I tried: > > > > I created a subclass of PlacedMorph. > > > > In the initialize method I have this: > > > > initialize > > super initialize. > > self setProperty: #handlesKeyboard toValue: true. > > > > In the keyDown: method I have this: > > > > keyDown: aKeyboardEvent > > 'got keyDown' print. > > > > I create an instance of my custom morph in a Workspace and send it > > #openInWorld to render it. > > I then move the mouse over it and press a key, but I don't see output > > in the Transcript. > > Does anyone see what I'm missing? > > Yes. You are forgetting to ask for #handlesKeyboard iMplementors. > > Morph>>processKeystroke: shows you need to supply a handler to > #'keyStroke:' > The main thing I was missing was to get keyboard focus on mouse enter. I needed to add the following instance methods: handlesMouseOver: aMouseEvent ^ true. mouseEnter: event (Preferences at: #focusFollowsMouse) ifTrue: [ event hand newKeyboardFocus: self ]. mouseLeave: event (Preferences at: #focusFollowsMouse) ifTrue: [ event hand releaseKeyboardFocus: self ]. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfern at free.fr Fri Aug 2 07:27:31 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Fri, 2 Aug 2024 16:27:31 +0200 Subject: [Cuis-dev] Encoding a Form in a method Message-ID: <222c76ed-35e3-432b-9b4c-01eacef246cd@free.fr> Hi folks, What is the best practice to encode a Form within a method in a package file .pck.st ? I found I can write: String streamContents: [:str | form storeOn: str] but the size is multiplied by 10. What are other options? Thanks Hilaire From r.mark.volkmann at gmail.com Fri Aug 2 07:42:01 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Fri, 2 Aug 2024 09:42:01 -0500 Subject: [Cuis-dev] Character codePoint: and arrow keys Message-ID: I have a custom morph that implements the keyStroke: method to capture keyboard events. I then use the following get the Character that corresponds to the key value: char := Character codePoint: aKeyboardEvent keyValue. When I press the left arrow key, keyValue is 28 and the Character is a left-pointing arrow. When I press the down arrow key, keyValue is 31 and the Character is a down-pointing arrow. So far, so good. However ... When I press the right arrow key, keyValue is 29 and the Character is an up-pointing arrow. When I press the up arrow key, keyValue is 30 and the Character is a right-pointing arrow. Could this be a bug in the Character codePoint: method which uses ? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfern at free.fr Fri Aug 2 10:36:11 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Fri, 2 Aug 2024 19:36:11 +0200 Subject: [Cuis-dev] keyboard events in custom morph In-Reply-To: References: Message-ID: <2058ced3-da5c-4617-9e4a-0078370fedc6@free.fr> You may find some information the Cuis book too https://cuis-smalltalk.github.io/TheCuisBook/Spacewar_0021-Events.html#Keyboard-event Hilaire From hfern at free.fr Fri Aug 2 11:08:56 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Fri, 2 Aug 2024 20:08:56 +0200 Subject: [Cuis-dev] Encoding a Form in a method In-Reply-To: <222c76ed-35e3-432b-9b4c-01eacef246cd@free.fr> References: <222c76ed-35e3-432b-9b4c-01eacef246cd@free.fr> Message-ID: <5d7c07b4-42ba-4ba5-9beb-5040fd1850fd@free.fr> For the record, here is what I did. Instead of the Form I have the original picture format encoded in the method (JPG, PNG whatever), it will be smaller. * Read the picture contents as binaryContents I execute with Ctrl-I : '/home/hilaire/myPicture.jpg' asFileEntry binaryContents * An insepctor on a BinaryArray? with the full content is open. It looks like [153 234 ...]. I copy the array in a method returning it: pictureData ??? ^ [153 234 ...] * Another method will return the Form instance based on this picture data: samplePicture ??? ^ Form fromBinaryStream: self pictureData readStream Hilaire Le 02/08/2024 ? 16:27, Hilaire Fernandes a ?crit?: > Hi folks, > > What is the best practice to encode a Form within a method in a > package file .pck.st ? > > I found I can write: > > String streamContents: [:str | form storeOn: str] > > but the size is multiplied by 10. > > What are other options? > > Thanks > > Hilaire > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Fri Aug 2 11:25:08 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Fri, 02 Aug 2024 11:25:08 -0700 Subject: [Cuis-dev] Encoding a Form in a method In-Reply-To: <222c76ed-35e3-432b-9b4c-01eacef246cd@free.fr> References: <222c76ed-35e3-432b-9b4c-01eacef246cd@free.fr> Message-ID: On 2024-08-02 07:27, Hilaire Fernandes via Cuis-dev wrote: > Hi folks, > > What is the best practice to encode a Form within a method in a > package file .pck.st ? Not sure it fits your use case, but this is what I did for playing card images in 'Morphic-Games-Solitaire'. FYI, -KenD -------------- next part -------------- 'From Cuis7.1 [latest update: #6541] on 2 August 2024 at 11:21:56 am'! !CardMorph class methodsFor: 'class initialization' stamp: 'KenD 1/27/2011 00:51'! initializeFromPNG | imageDirNamePrefix | ColorNames := #(Red Black). FaceNames := #(Ace Two Three Four Five Six Seven Eight Nine Ten Jack Queen King). SuitNames := #(Clubs Diamonds Hearts Spades). FormsArray := Array new: 53. imageDirNamePrefix := 'PNG-deck/'. 1 to: 13 do: [ :faceNum | #( $c $d $h $s) do: [ :char | FormsArray at: ((faceNum - 1) * 4) + (#($c $d $h $s) indexOf: char) put: ((Form fromFileNamed: (imageDirNamePrefix, faceNum asString, char asString, '.png')) asFormOfDepth: 32)]]. FormsArray at: 53 put: ((Form fromFileNamed: (imageDirNamePrefix , 'back.png')) asFormOfDepth: 32)! ! From r.mark.volkmann at gmail.com Fri Aug 2 13:20:47 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Fri, 2 Aug 2024 15:20:47 -0500 Subject: [Cuis-dev] starting an image with a script Message-ID: I'm learning how to start an image image with a script as described in The Cuis Book here: https://cuis-smalltalk.github.io/TheCuisBook/Daily-Workflow.html#Automate-your-image Perhaps some method names have changed since that was written. To open a System Browser, instead of BrowserWindow openBrowser I think I need Browser open. To open a Workspace, instead of Workspace openWorkspace I think I need Workspace open. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Fri Aug 2 14:27:33 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Fri, 2 Aug 2024 16:27:33 -0500 Subject: [Cuis-dev] scrolling in Transcript window Message-ID: Is there an easy way to get the contents of a Transcript window to be scrollable? I see that Workspace windows display a TextModelMorph that provides the ability to scroll its contents. I see that Transcript windows display a TranscriptMorph which is a subclass of BoxedMorph. As far as I can tell, BoxedMorph does not have the ability to scroll its contents. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Fri Aug 2 16:53:52 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Fri, 2 Aug 2024 18:53:52 -0500 Subject: [Cuis-dev] curried blocks Message-ID: I wanted to see if it was possible to define a class that supports partial application with blocks. The goal is to be able to pass fewer arguments than a block requires and get back a new "block" that requires the remaining arguments. Perhaps this has already been done and I just didn't find it. Here are examples of using my solution: cb := CurriedBlock block: [:a :b | a + b]. cb valueWithArguments: #(2 3). "5" cb2 := cb valueWithArguments: #(5). "a new CurriedBlock" cb2 valueWithArguments: #(7). "12" I attached my solution as a fileOut. I'd love to get some feedback in terms of style and better ways to implement it. What would you do differently? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CurriedBlock.st Type: application/octet-stream Size: 1499 bytes Desc: not available URL: From raiford at labware.com Sat Aug 3 09:44:40 2024 From: raiford at labware.com (Jon Raiford) Date: Sat, 3 Aug 2024 16:44:40 +0000 Subject: [Cuis-dev] curried blocks In-Reply-To: References: Message-ID: Especially as a new user to Smalltalk, I would suggest leaning into Smalltalk concepts rather than trying to bring functional programming into Smalltalk. Although I can?t think of any, there may be a real world benefit to curried blocks in Smalltalk. I think this may be a better subject to breach after a bit more mastery. A natural reaction to this would be ?how would you do it differently??. That may seem like a fair question, but I think it requires a use case that you are trying to solve. Jon From: Cuis-dev on behalf of Mark Volkmann via Cuis-dev Date: Friday, August 2, 2024 at 7:54?PM To: Discussion of Cuis Smalltalk Cc: Mark Volkmann Subject: [Cuis-dev] curried blocks I wanted to see if it was possible to define a class that supports partial application with blocks. The goal is to be able to pass fewer arguments than a block requires and get back a new "block" that requires the remaining arguments. Perhaps this has already been done and I just didn't find it. Here are examples of using my solution: cb := CurriedBlock block: [:a :b | a + b]. cb valueWithArguments: #(2 3). "5" cb2 := cb valueWithArguments: #(5). "a new CurriedBlock" cb2 valueWithArguments: #(7). "12" I attached my solution as a fileOut. I'd love to get some feedback in terms of style and better ways to implement it. What would you do differently? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marianomontone at gmail.com Sat Aug 3 10:29:17 2024 From: marianomontone at gmail.com (Mariano Montone) Date: Sat, 3 Aug 2024 14:29:17 -0300 Subject: [Cuis-dev] curried blocks In-Reply-To: References: Message-ID: <47af2ba2-05f3-4644-acc9-601b31b9b8f7@gmail.com> Cuis includes an implementation already. Have a look at BlockClosure>>withFirstArg: https://en.wikipedia.org/wiki/Partial_application ?? ?[ :a :b | a + b ] value: 1 value: 2 ?? ?[ :a :b | a + b ] withFirstArg: 1 ?? ?([ :a :b | a + b ] withFirstArg: 1) value: 2 ?? ?([ :a :b | a + b ] withFirstArg: 1) withFirstArg: 2 ?? ?(([ :a :b | a + b ] withFirstArg: 1) withFirstArg: 2) value ?? ?([ :a :b | a - b ] withFirstArg: 1) value: 2. Yours supports more arguments, though; you could try adding a #withPartialArgs: to BlockClosure if #withFirstArg: is not enough in your opinion. ??? Mariano El 2/8/24 a las 20:53, Mark Volkmann via Cuis-dev escribi?: > I wanted to see if it was possible to define a class that supports > partial application with blocks. The goal is to be able to pass fewer > arguments than a block requires and get back a new "block" that > requires the?remaining arguments. Perhaps this has already been done > and I just didn't find it. > > Here are examples of using my solution: > > cb := CurriedBlock block: [:a :b | a + b]. > cb valueWithArguments: #(2 3). "5" > > cb2 := cb valueWithArguments: #(5). "a new CurriedBlock" > cb2 valueWithArguments: #(7). "12" > > I attached my solution as a fileOut. I'd love to get some feedback in > terms of style and better ways?to implement it. What would you do > differently? > > -- > R. Mark Volkmann > Object Computing, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marianomontone at gmail.com Sat Aug 3 10:38:04 2024 From: marianomontone at gmail.com (Mariano Montone) Date: Sat, 3 Aug 2024 14:38:04 -0300 Subject: [Cuis-dev] scrolling in Transcript window In-Reply-To: References: Message-ID: El 2/8/24 a las 18:27, Mark Volkmann via Cuis-dev escribi?: > Is there an easy way to get the contents of a Transcript window to be > scrollable? Right click and select Workspace with Contents. I don't about getting the Transcript morph be scrollable. It is as it is for performance reasons. ???????? Mariano From marianomontone at gmail.com Sat Aug 3 10:42:17 2024 From: marianomontone at gmail.com (Mariano Montone) Date: Sat, 3 Aug 2024 14:42:17 -0300 Subject: [Cuis-dev] Character codePoint: and arrow keys In-Reply-To: References: Message-ID: I don't know if that's a bug or not. How about using the methods in KeyboardEvent class? I see: #isArrowDown, #isArrowLeft, etc in 'testing' category. ???? Mariano El 2/8/24 a las 11:42, Mark Volkmann via Cuis-dev escribi?: > I have a custom morph that implements the keyStroke: method to capture > keyboard events. > I then use the following get the Character that corresponds to the key > value: > > char := Character codePoint: aKeyboardEvent keyValue. > > When I press the left arrow key, keyValue is 28 and the Character is a > left-pointing arrow. > When I press the down arrow key, keyValue is 31 and the Character is a > down-pointing arrow. > So far, so good. However ... > When I press the right arrow key, keyValue is 29 and the Character is > an up-pointing arrow. > When I press the up arrow key, keyValue is 30 and the Character is a > right-pointing arrow. > Could this be a bug in the Character codePoint: method which uses > ? > > -- > R. Mark Volkmann > Object Computing, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Sat Aug 3 11:01:58 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Sat, 03 Aug 2024 11:01:58 -0700 Subject: [Cuis-dev] curried blocks In-Reply-To: References: Message-ID: <93a5af18c664883e12efab043832da12@whidbey.com> As a long-time Scheme programmer (circa 1980), I have never found a real use for currying in industrial applications. A much more useful example is CPS (Continuation Passing Style) for flexibly chaining action sequences. E.g. here is how CardMorphs are animated in 'Morphic-Games-Solitaire'. The blocks/closures do capture salient state. Note use of `nextAction value`. "====" CardTableMorph>> animateMoveFrom: aContainer to: aPile next: nextAction "Animate move of the top Card in aPile into aContainer." | topCard worldPos | topCard := aContainer topCard. topCard setProperty: #moveStart toValue: aContainer . worldPos := topCard morphPositionInWorld. "Transfer card to World" aContainer removeMorph: topCard. self world addMorph: topCard. topCard morphPosition: worldPos. topCard scale: self scale. "Animate the image move -- in World coordinates" self slide: topCard to: aPile morphPositionInWorld + aPile containerOffset nSteps: self numberOfMoveSteps delay: self moveDelay next: [ "Give the card to otherContainer." topCard world removeMorph: topCard. aPile acceptDroppingMorph: topCard event: nil. nextAction value ]. "=====" CardTableMorph>> slide: aMorph to: endPoint nSteps: numSteps delay: milliSecondsDelay next: nextAction "Slide from current to new position -- in owner's coordinates" "Nota Bene: Asynchronous. When complete, nextAction value" | startPoint delta stepCount | startPoint := aMorph morphPosition. delta := (endPoint - startPoint) / numSteps. stepCount := 0. aMorph when: #morphicStep evaluate: [ :ignoredArgument | stepCount := stepCount + 1. (stepCount < numSteps) ifTrue: [ aMorph morphPosition: (startPoint + (stepCount * delta)) rounded; redrawNeeded ] ifFalse: [ "done" aMorph stopStepping. aMorph morphPosition: endPoint. aMorph removeActionsForEvent: #morphicStep. nextAction value ] ]. aMorph startSteppingStepTime: milliSecondsDelay "=====" -------------- next part -------------- A non-text attachment was scrubbed... Name: CurriedBlock.st Type: application/octet-stream Size: 1499 bytes Desc: not available URL: From marianomontone at gmail.com Sat Aug 3 12:12:08 2024 From: marianomontone at gmail.com (Mariano Montone) Date: Sat, 3 Aug 2024 16:12:08 -0300 Subject: [Cuis-dev] curried blocks In-Reply-To: <93a5af18c664883e12efab043832da12@whidbey.com> References: <93a5af18c664883e12efab043832da12@whidbey.com> Message-ID: <4ecc35fe-9ef0-4f79-88be-5d1a36ed5f7b@gmail.com> El 3/8/24 a las 15:01, ken.dickey--- via Cuis-dev escribi?: > As a long-time Scheme programmer (circa 1980), I have never found a > real use for currying in industrial applications. I personally use it in my Lisp code, together with compose and "pipe". (->(mm-api:request(api-client) #?"/channels/${channel}/posts") (access:posts) (sort#'< :key(compose(rcurry#'access :create--at) #'cdr))) Perhaps because LAMBDA is less concise than a Smalltalk block. But in anycase it is more about style than "usefulness" IMO. Mariano -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfern at free.fr Sun Aug 4 07:32:58 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Sun, 4 Aug 2024 16:32:58 +0200 Subject: [Cuis-dev] Discarded mouse trail Message-ID: Hi Juan, I have observed you discard trail mouse positions: HandMorph>>generateMouseEvent: evtBuf ... type == #mouseMove ifTrue: [ trail := self mouseTrailFrom: evtBuf. ^MouseMoveEvent new setType: type position: trail last buttons: buttons hand: self stamp: stamp]. In the Squeak implementation, it is still taken in consideration in the MouseMoveEvent instance. I am porting the 1Dollar recognizer from Squeak and I can observed a far greater amount of mouse positions taken in consideration in the original package, because of the trail array: HandMorph>>generateMouseEvent: evtBuf ... type == #mouseMove ifTrue: [trail := self mouseTrailFrom: evtBuf. ^MouseMoveEvent new setType: type startPoint: self position endPoint: trail last *trail: trail* buttons: buttons hand: self stamp: stamp]. I have experimented putting back the trail in the MouseMoveEvent, and indead it provide more information. I ma likely need the trail too in my PaperMorph for the Dynabook. What do you think? Hilaire -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfern at free.fr Sun Aug 4 08:14:23 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Sun, 4 Aug 2024 17:14:23 +0200 Subject: [Cuis-dev] Dollar1 package Message-ID: <2f393495-14e5-410d-a0e2-f170cc2cda04@free.fr> Hi folks, I have ported the Dollar1[1] package of Yoshiki[2]. I will explore its use in the GUI commands for the Paper Morph in my Dynabook project. [1] https://github.com/hilaire/dynabook/tree/main/src/lib [2] https://github.com/yoshikiohshima/Squeak-1Dollar-Recognizer From r.mark.volkmann at gmail.com Sun Aug 4 09:21:45 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sun, 4 Aug 2024 11:21:45 -0500 Subject: [Cuis-dev] LayoutMorph color Message-ID: I defined a subclass of LayoutMorph and added this initialize method: initialize super initialize. self color: Color yellow. When I create an instance and open it in the world it has a pink background. If I change the superclass from LayoutMorph to BoxedMorph then it has a yellow background. What is the reason why I can't set the color (of the background) of a LayoutMorph? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfern at free.fr Sun Aug 4 10:53:04 2024 From: hfern at free.fr (H. Fernandes) Date: Sun, 4 Aug 2024 19:53:04 +0200 (CEST) Subject: [Cuis-dev] =?utf-8?q?Re=C2=A0=3A__LayoutMorph_color?= In-Reply-To: Message-ID: <353307737.51610477.1722793984840.JavaMail.root@zimbra87-e15.priv.proxad.net> Execute the statement, including the open in World, with Ctrl-D to discover what is going on. Then take also a look at drawOn: Dr. Geo -- http://gnu.org/s/dr-geo ----- Mark Volkmann via Cuis-dev <cuis-dev at lists.cuis.st> a ?crit?: > I defined a subclass of LayoutMorph and added this initialize method: > > initialize > super initialize. > self color: Color yellow. > > When I create an instance and open it in the world it has a pink background. > If I change the superclass from LayoutMorph to BoxedMorph then it has a > yellow background. > What is the reason why I can't set the color (of the background) of a > LayoutMorph? > > -- > R. Mark Volkmann > Object Computing, Inc. From r.mark.volkmann at gmail.com Sun Aug 4 13:13:27 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sun, 4 Aug 2024 15:13:27 -0500 Subject: [Cuis-dev] LayoutMorph color In-Reply-To: <353307737.51610477.1722793984840.JavaMail.root@zimbra87-e15.priv.proxad.net> References: <353307737.51610477.1722793984840.JavaMail.root@zimbra87-e15.priv.proxad.net> Message-ID: When I run the code in the debugger I see this in the class method "new" of LayoutMorph: new ^self newRow color: `(Color red alpha: 0.2)` So that explains why the color is a shade of pink. It sends the message `#color:` to the instance AFTER sending the message `#newRow`. The `newRow` method calls `initialize` which I override to also send the message `#color` with my preferred color. So my color gets replaced by pink due to the order of the calls. Now I need to find a place other than `initialize` to set the color AFTER `new` is called. I suppose one option is to override the `drawOn:` method like this: drawOn: aCanvas self color: Color green. super drawOn: aCanvas. Is that what you recommend? -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Sun Aug 4 14:16:49 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sun, 4 Aug 2024 16:16:49 -0500 Subject: [Cuis-dev] LayoutMorph and offAxisEdgeWeight Message-ID: I ran this code in a Workspace: lm := LayoutMorph newColumn. lm separation: 10. lm layoutSpec offAxisEdgeWeight: 0. lm addMorph: (LabelMorph new contents: 'short'; color: Color white). lm addMorph: (LabelMorph new contents: 'very long'; color: Color white). lm openInWorld. The attached screenshot shows what I get and includes the LayoutSpec. It looks like I successfully set the `offAxisEdgeWeight` to zero, so I expected the two `LabelMorph` instances to be left-aligned inside the `LayoutMorph`, but they are centered. I must be misunderstanding how `offAxisEdgeWeight` works. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot 2024-08-04 at 4.14.00?PM.png Type: image/png Size: 71401 bytes Desc: not available URL: From ken.dickey at whidbey.com Sun Aug 4 15:35:23 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Sun, 04 Aug 2024 15:35:23 -0700 Subject: [Cuis-dev] LayoutMorph and offAxisEdgeWeight In-Reply-To: References: Message-ID: On 2024-08-04 14:16, Mark Volkmann via Cuis-dev wrote: > I ran this code in a Workspace: > > lm := LayoutMorph newColumn. > lm separation: 10. > lm layoutSpec offAxisEdgeWeight: 0. > lm addMorph: (LabelMorph new contents: 'short'; color: Color white). > lm addMorph: (LabelMorph new contents: 'very long'; color: Color > white). > lm openInWorld. > > The attached screenshot shows what I get and includes the LayoutSpec. > It looks like I successfully set the `offAxisEdgeWeight` to zero, so I > expected the two `LabelMorph` instances to be left-aligned inside the > `LayoutMorph`, but they are centered. > I must be misunderstanding how `offAxisEdgeWeight` works. Each submorph of a LayoutMorph can have a LayoutSpec that informs their containing LayoutMorph where they want to be on the off/cross axis. Set LayoutSpecs for the Morphs you are adding to the LayoutMorph to see this. Setting the LayoutSpec of the containing LayoutMorph is only significant if it is contained within another LayoutMorph. https://github.com/Cuis-Smalltalk/Learning-Cuis/blob/master/LayoutTour.md HTH, -KenD -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot 2024-08-04 at 4.14.00?PM.png Type: image/png Size: 71401 bytes Desc: not available URL: From ken.dickey at whidbey.com Sun Aug 4 15:52:51 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Sun, 04 Aug 2024 15:52:51 -0700 Subject: [Cuis-dev] LayoutMorph color In-Reply-To: References: <353307737.51610477.1722793984840.JavaMail.root@zimbra87-e15.priv.proxad.net> Message-ID: <6d10a6ed45945ec38e65a3d33726c8e2@whidbey.com> On 2024-08-04 13:13, Mark Volkmann via Cuis-dev wrote: > When I run the code in the debugger I see this in the class method > "new" of LayoutMorph: > > new > ^self newRow color: `(Color red alpha: 0.2)` > > So that explains why the color is a shade of pink. It sends the message > `#color:` to the instance AFTER sending the message `#newRow`. > The `newRow` method calls `initialize` which I override to also send > the message `#color` with my preferred color. > So my color gets replaced by pink due to the order of the calls. > Now I need to find a place other than `initialize` to set the color > AFTER `new` is called. Then again, you could override the method that is giving you grief.. YourLayoutMorph class>>new ^super newRow color: Color yellow From r.mark.volkmann at gmail.com Sun Aug 4 18:38:20 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sun, 4 Aug 2024 20:38:20 -0500 Subject: [Cuis-dev] TextEntryMorph vertical alignment Message-ID: If I create a TextEntryMorph like this: todoEntry := TextEntryMorph contents: ''. and don't send any other messages to it, it renders like the attached screenshot. Note how the text I enter is pushed up to the top rather than being centered vertically inside the border. It seems like it should be centered vertically by default. I can get it to be centered with this: myTextEntryMorph morphExtent: 200 @ 0 The zero for the y causes it to compute the height. But then there is no "padding" above or below the entered text. Is there an easy way to keep the default height, but get it to center vertically? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot 2024-08-04 at 8.28.36?PM.png Type: image/png Size: 1589 bytes Desc: not available URL: From shingarov at labware.com Mon Aug 5 05:54:30 2024 From: shingarov at labware.com (Boris Shingarov) Date: Mon, 5 Aug 2024 08:54:30 -0400 Subject: [Cuis-dev] new YouTube video on Cuis Smalltalk In-Reply-To: References: <3a0584e16b495a4d3c9fff30b9e6668d@mail.msen.com> <6678A008.8000504@cuis.st> Message-ID: > The basic idea is to exploit the duality between 'functions and tables (or > processes and memory). English has nouns which refer to "objects", and > verbs which refer to "actors" and "relators". This is a Newtonian > epistemology. Modern physics and philosophy tend towards the idea that > both "objects" and "actors" are just different aspects of the notion of > process. After decades of re-reading and re-reading "Children of All Ages", this paragraph never ceases to astound me, by how explicit it is about the nonclassical character of Smalltalk. The 20th-century "New Science" ? the physics of Einstein/Bohr/Heisenberg, the logic of Brouwer/G?del, etc ? is *essential* to it: if we restrict ourselves to the "Newtonian epistemology" (classical physics, classical logic, classical calculus), then, (paraphrasing Schweitzer) "nothing remains of it, beyond that there was a teacher from California named Alan Kay". The duality of object's state and behavior, is just the categorial duality of algebra (data) and coalgebra (functions), perhaps along the lines of Boehm?Berarducci encoding [1], or Vassili Bykov's "How to get rid of Objects in Smalltalk" [2]. Of course this all is just another name for the topological duality between open/closed sets, or the quantum duality between adjoint bra/ket, etc etc ? these are manifestations of the same phenomenon discovered around the first decades of the 20th century. When I first bumped into Kay's writings, I was struck by the magic how Kay was able to write the above paragraph so much earlier before systems like CLOS (in which the connection is obvious) were constructed [3?7]. So I became curious, and a little digging led me to Papert, Rosenblatt and Minsky; this was the moment when I became aware that Kay did not operate in a vacuum, that the ideas of biologically- inspired massively-parallel communicating agents were already actively researched; became aware of the fight between the "connectionists" and the "symbolists"; and of how na?ve that fight proved in light of the tremendous progress which was made in the following decades [8]. >> The next major revision of Smalltalk was Smalltalk-80. Kay was no longer >> on the scene to argue that any language should be simple enough for a child >> to use. Smalltalk-80, says Tesler, went too far in the opposite direction >> from the earliest versions of Smalltalk: ?It went to such an extreme to >> make it compilable, uniform, and readable, that it actually became hard to >> read, and you definitely wouldn?t want to teach it to children.? >> >> Kay, looking at Smalltalk-80, said, ?It?s terrible that it can?t be used >> by children, since that?s who Smalltalk was intended for. It fell back into >> data-structure-type programming instead of simulation-type programming.? > > I think that both Tesler and Kay are exaggerating here, Can you explain why you think they are exaggerating? >From my own personal experience (which of course is not universal, this is why I am genuinely interested in learning about others' experiences, hence asking) of trying to advance Smalltalk from the systems in use today towards what Kay appears to say in his writings, I find the above quote quite literally correct. And in this my-own-experience when I describe building a Kay-like Smalltalk, I have in some cases heard fierce criticism of Kay (in a few cases transitioning into ad-hominem arguments against him). When I try to poke harder, in most of such cases the deeper problem turns out to be that the opponent is firmly entrenched in the "Newtonian epistemology", and engages in quantum denialism bordering on Cargo-Cult Science. The real challenge of the situation is *competition*. It's 2024 on the calendar; my competitors have implemented post-quantum (cf. post-intuitionist etc.) algorithms, reconciled the Connectionist and the Symbolist viewpoint, they are engaging in kinds of computing completely unthinkable in the Newtonian context. By saying this, I don't mean to criticize Smalltalk-80 or to say that we should build a "Kay-like (nonclassical) Smalltalk" to *replace* Cuis because the latter is Newtonian. To suggest it, would indicate a lack of understanding of Bohr's correspondence principle. Finkelstein explains this very nicely [9, 10]: "Most of the pioneers of the quantum theory, including Einstein, de Broglie, Schr?dinger, and Wigner, retained more of the ontic classical epistemology than Heisenberg and Bohr, and rejected the quantum project in principle. Einstein's view is clearly stated and frequently quoted: > There is no doubt that quantum mechanics has seized hold of a beautiful > element of truth, and that it will be a test stone for any future > theoretical basis, in that it must be deducible as a limiting case from > that basis, just as electrostatics is deducible from Maxwell's equations > of the electromagnetic field, or as thermodynamics is deducible from > classical mechanics. However, I do not believe that quantum mechanics > will be the starting point in the search for this basis, just as, vice > versa, one could not go from thermodynamics (resp. statistical mechanics) > to the foundations of mechanics. ? Einstein 1936 Bohr believed that quantum mechanics "will be the starting point in the search", as Einstein put it, but proposed nevertheless to give classical concepts a permanent place in its foundations. To be sure, Bohr noted, our "classical" (that is, classical) concepts are "gross and inadequate", and nature "leaks through them like water through a net". At the same time, Bohr explicitly rejected the idea of a "quantum universe" (in the sense of a universe described by a ? vector). When the concept of a "? vector" or ket for the universe was broached to him, he responded vehemently "You might as well say that we are only dreaming that we are here." He held that we must use classical concepts to communicate about our experiments if we wish to be understood. Heisenberg soon accepted Bohr's position on this matter, and it became part of the Copenhagen quantum theory: > The concepts of classical physics form the language by which we > describe the arrangements of our experiments and state the results. > We cannot and should not replace these concepts by others. Still > the application of these concepts is limited by the relations of > uncertainty. ? Heisenberg The insistence of Bohr and Heisenberg that we *cannot* use quantum concepts to describe the episystem seems over-dogmatic today. ? We experiment with a praxic, post-Copenhagen position here. == END OF FINKELSTEIN CITATION So even if one characterization of Smalltalk-80 would be that its designers "rejected Kay's Smalltalk project in principle", they would be just following in Einstein's and Schr?dinger's footsteps. More seriously, though, if we are to build a Kay-like Smalltalk, it does not *replace* Smalltalk-80 just like quantum mechanics does not *replace* Newtonian mechanics. In other words, Bohr's correspondence says that a Kay-like Smalltalk must necessarily be embedded in something like Cuis. ----- Looking back at what I just wrote, I am sorry I am not really *explaining* but merely pointing in the general direction of what kind of thoughts have been occupying my mind in the past dozen years. Also I must warn about my choice of quantum mechanics as the example of "twentieth-century science". It is only because that's what I am familiar with, NOT because it's better. A topologist reading this post, can criticize me like "hey Boris, why don't you talk about the familiar open/closed sets instead of those obscure bra/ket", and it would be perfectly valid. [1] https://okmij.org/ftp/tagless-final/course/Boehm-Berarducci.html [2] https://live.exept.de/doc/online/english/programming/humor.html [3] https://doi.org/10.1017/S0956796800001490 [4] https://dx.doi.org/10.1017/S0960129500000694 [5] https://doi.org/10.1007/978-1-4613-1437-0_5 [6] https://doi.org/10.1007/BFb0053063 [7] https://www.cs.ru.nl/B.Jacobs/PAPERS/JR.pdf [8] M.L.Minsky, S.A.Papert. Perceptrons. (Make sure you have the 1988 edition, not the 1969 original). [9] D.R.Finkelstein. Quantum Relativity. [10] S.A.Selesnick. Quanta, Logic and Spacetime: Variations on Finkelstein's Quantum Relativity. On Thu, Jun 27, 2024 at 06:32:39PM +0100, Ezequiel Birman via Cuis-dev wrote: > Sorry in advance for the scattered replies > > Joseph Turco wrote: > > > When Alan Kay and Adele Goldberg were testing smalltalk-80, they were > > using kids in school to play with it (...) > > > Children didn't use Smalltalk-80. For all that I know, children used > Smalltalk-72 through Smalltalk-76. A good summary is provided in the > article by Perry and Wallich, Inside the PARC: the `information architects' > from which I quote: > > > The first compiled version of Smalltalk, written in 1976, marked the end > > of the emphasis on a language that children could use. The language was now > > ?a mature programming environment,? Ingalls said. ?We got interested in > > exporting it and making it widely available.? > > > > The next major revision of Smalltalk was Smalltalk-80. Kay was no longer > > on the scene to argue that any language should be simple enough for a child > > to use. Smalltalk-80, says Tesler, went too far in the opposite direction > > from the earliest versions of Smalltalk: ?It went to such an extreme to > > make it compilable, uniform, and readable, that it actually became hard to > > read, and you definitely wouldn?t want to teach it to children.? > > > > Kay, looking at Smalltalk-80, said, ?It?s terrible that it can?t be used > > by children, since that?s who Smalltalk was intended for. It fell back into > > data-structure-type programming instead of simulation-type programming.? > > > I think that both Tesler and Kay are exaggerating here, but the push by > Xerox to create ?the office of the future? was real. > > Jaromir Matas wrote: > > > Your Youtube talk and especially your answers allowed me to read the > > articles with a whole new level of understanding. Especially Alan Kay's "A > > Personal Computer for Children of All Ages" has so much to say [...] > > > I wonder what percentage of people understand ?children of all ages? the > same way I do. Cyril Connolly said that Imprisoned in every fat man, a thin > one is wildly signalling to be let out. I want to believe that I don't have > much difficulty in letting my inner-child out. For good or ill, this view > of children as unprejudiced, unspoiled, playful, curious little people > (childlike) can coexist with the reality of their capricious and demanding > nature (childish). One of the things we like about computers is the almost > instant gratification they can provide. > > [...] I have a problem with documenting though. You know I've tried to > > write as thorough comments as possible documenting intentions, explaining > > sticking points etc. (even if just to help myself understand it again a few > > months/weeks later) but IMHO it's still woefully insufficient - in addition > > to the more or less terse in-method comments I'd like to be able to add > > somewhere really close (even in-image Help files are too far away) more > > detailed descriptions, reasons for tradoffs, motivations, future plans, > > examples, etc. - but in a way that wouldn't clutter the environment. > > and > > > I'm not sure I understand the part about "knowledge" though: "Write, > > describe, communicate knowledge" - what does it mean exactly? Is it about > > Smalltalk as a language? The language itself is not that different from > > other (high-level) languages. A good language certainly is a great help to > > formulate things but it's still a "programming language". I guess there > > more to it I didn't get :) > > > > Or is it about the whole concept including the live "OS-like" environment? > > But where the "writing knowledge" fits in? > > > Maybe the misunderstanding is due to the fact that you are taking > ?documentation? at face value. In my mind, *every* program, at least every > program written in something higher level than assembly language, can be > regarded as ?documentation?. And in a way, it is the best sort of > documentation because it must execute. This is also different from Knuth's > idea and realization of literate programming. I like his point of view only > because I like reading for reading's sake, and I like books, and I like how > *he* writes; but code is not literature > . What I am talking about is more > like a deliberate confusion between the map and the territory. > > ?For the people that want a system that is fully malleable, even if > limited, Smalltalk is still the best thing that has been built? said Juan > in the interview, because all of the things you mentioned combined together > with thoughtful design evolved during decades (if you also take into > account Self, Morphic and other developments). If this is not a qualitative > jump, I don't know what it is. I cannot avoid thinking about the balloon > ; it conveys such an adequate picture. > > Jaromir Matas wrote: > > > I've played a bit with Javascript and Python recently and my impression is > > they try to follow basically the same goal [...] > > > I disagree. Their original goal was to be ?scripting? languages and thus, > they favored scripting over robustness, comprehensibility, design, clarity, > simplicity, and consistency. Of course you can still write beautiful Python > or JavaScript as you can write ugly Smalltalk. Kay has used the Ford-T > metaphor; Ingalls compared Smalltalk to a musical instrument. I don't know > about you but I prefer to play or learn to play a keyboard instrument in a > beautifully crafted Steinway rather than in a cheap electronic Casio > keyboard. > > Ken Dickey wrote: > > > The Squeak folks noted Scheme48, which is/was a Scheme written in Scheme > > which compiled to C and had decent performance on computers of the day > > -- so they knew it could be done. > > > Thanks for reminding us! Scheme 48 was my scheme of > choice back in the day. > > Juan Vuletich wrote: > > > There are several links at > > https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/blob/master/Documentation/AboutCuis.md#the-philosophy-behind-cuis > > . Have you read them? Please do. > > I'd also urge everyone to read Programming as Theory Building > by > Peter Naur > > -- > Eze > > > A quarta, 26/06/2024, 23:47, Jaromir Matas via Cuis-dev < > cuis-dev at lists.cuis.st> escreveu: > > > Hi Juan, > > > > > > On 24-Jun-24 12:22:00 AM, "Juan Vuletich via Cuis-dev" < > > cuis-dev at lists.cuis.st> wrote: > > > > On 6/23/2024 5:19 AM, Jaromir Matas via Cuis-dev wrote: > > > > I'm not sure I understand the part about "knowledge" though: "Write, > > describe, communicate knowledge" - what does it mean exactly? Is it about > > Smalltalk as a language? The language itself is not that different from > > other (high-level) languages. A good language certainly is a great help to > > formulate things but it's still a "programming language". I guess there > > more to it I didn't get :) > > > > Or is it about the whole concept including the live "OS-like" environment? > > But where the "writing knowledge" fits in? > > > > > > There are only some many things that can be said in an hour. > > > > There are several links at > > https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/blob/master/Documentation/AboutCuis.md#the-philosophy-behind-cuis > > . Have you read them? Please do. > > > > I'm so glad you nudged me to read them. Your Youtube talk and especially > > your answers allowed me to read the articles with a whole new level of > > understanding. Especially Alan Kay's "A Personal Computer for Children of > > All Ages" has so much to say; here's what caught my attention (re objects > > vs. processes): > > quote > > > > The following principles should be used in the design of the Dynabook > > language. > > > > 1. We need a uniform notion as to what objects are, how they may be > > referred to, and how they can manipulate other objects. > > > > 2. If each object can have its own control path, then there must be a > > concise way to coordinate and "control" these paths when more than one is > > active. > > > > 3. The evaluation of a control path should follow simple rules which show > > how objects are passed messages and return results. > > > > 4. Every object in a system should be redefinable in terms of other > > objects. > > > > The basic idea is to exploit the duality between 'functions and tables (or > > processes and memory). English has nouns which refer to "objects", and > > verbs which refer to "actors" and "relators". This is a Newtonian > > epistemology. Modern physics and philosophy tend towards the idea that both > > "objects" and "actors" are just different aspects of the notion of > > *process*. A process has *state* (a set of relations having only to do > > with it) which changes as time (defined as interactions with other objects) > > passes. Using this view "data" is a process which changes "slowly", > > "function" is a process which changes more rapidly. Each process has the > > logical attributes of a complete "micro" computer: they can have inputs, > > give back outputs, act as a memory on file system, perform computations, be > > interrupted, etc. [?] Since multiple control paths are allowed, many > > processes can be in various stages of evaluation and debugging. > > > > unquote > > > > Do I understand correctly that Alan Kay suggests in (2) that each object > > should have its own control path (i.e. a thread, aka a process in Smalltalk > > vocabulary)? Is he somehow placing an equal sign between objects and actors > > (like e.g. Squeak Actors by Tony Garnock-Jones, > > https://tonyg.github.io/squeak-actors) where actors are implemented as > > processes. Would that implicate that the idea was that objects should do > > their jobs in parallel, each in its own process (control path), i.e. > > asynchronously, rather than synchronously and on a single control path > > unless explicitely forked? > > > > This part really confused me; it's quite a difference whether you do: > > car driveTo: aPlace > > and assume the car just does it (asynchronously) until it arrives there > > while the current control path continues or: > > [car driveTo: aPlace] fork > > where you explicitly give the car it's own control path. > > > > Or have I misunderstood it completely? :))) > > > > > > > > And, as I said at the start of the podcast, Smalltalk is an attitude. If > > you are a programmer, wanting to solve some problem with code, then > > Smalltalk is a good programming language. But if you want to explore a > > field, understand, and document your journey of discovery and invention, > > you could use pencil and paper. Or perhaps Jupyter Notebooks. Or Smalltalk. > > If you use Smalltalk this way, it is way more than a programming system. > > > > Yup, that's what I use Smalltalk for - exploring, seeking active > > understanding. I have a problem with documenting though. You know I've > > tried to write as thorough comments as possible documenting intentions, > > explaining sticking points etc. (even if just to help myself understand it > > again a few months/weeks later) but IMHO it's still woefully insufficient - > > in addition to the more or less terse in-method comments I'd like to be > > able to add somewhere really close (even in-image Help files are too far > > away) more detailed descriptions, reasons for tradoffs, motivations, future > > plans, examples, etc. - but in a way that wouldn't clutter the > > environment. > > > > Now that you mentioned Jupyter Notebooks - I was wondering why Cuis Text > > Editor won't allow running code fragments - like the Workspace; whether it > > could serve as a richer documentation medium and "active" - able to run the > > examples just like Jupyter Notebooks. Or maybe I just missed something that > > already works that way... > > > > A note about exploration: I like to use Smalltalk to explore exceptions > > and e.g. tried to use them just as another workflow control mechanism. > > Recently, however, I've attended an OOP lecture where this type of use of > > exceptions was strongly discouraged. But this has nothing to do with OOP - > > maybe in Python or Java is doesn't make much sense due to their particular > > implementation but in Smalltalk - why not? :) And besides that Smalltalk is > > the only language I'm aware of that implements exceptions that can resume > > the computation - all other mainstream ones can only make return. > > > > > > > > Other question - Smalltalk was originally supposed to be the universal > > environment above the hardware level. Everything below the VM is the > > hardware (a machine language), everything above the VM is Smalltalk (the > > UI, apps...). Even the VM is written in a simplified Smalltalk (Slang); > > what was supposed to be the role of C - to stay as an intermediary between > > the Smalltalk level and the hardware or was (is?) it supposed to be > > eliminated somehow eventually? > > > > > > In my opinion, "Design Principles Behind Smalltalk" is the canon here. C > > had no role originally, only much later. And its only role is to be a > > useful implementation language for VMs. Nothing special. > > > > > > And one more note about "easy to use, intuitive, for children" - this > > refers to the DynaBook concept, right? Smalltalk as a language is a lot of > > things but certainly not those things :) Simple syntax doesn't mean > > simplicity but it thank god it saves me from remembering tons of syntactic > > rules :) Anyway, many thanks for explaining the DynaBook concept! > > > > Thanks again for the great talk! > > best, > > Jaromir > > > > > > Yes. Smalltalk was started as the "software half" of a Dynabook. You'd > > read about the history, starting from Smalltalk-72, its objectives and the > > experiences done by the Parc Learning Research Group. And what happened > > after that, how they did Smalltalk-80, and to what extent focus was > > changed. Same with the developments described in the Green Book, and later > > commercial Smalltalks. How / why focus changed? What happened with "for > > children"? Out of where did Etoys, Scratch, and the whole world of tile > > programming came to be? > > > > I think it is best to read what the people who did all this wrote. For > > instance, start with > > https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/blob/master/Documentation/Philosophical/OnMakingDynabooksReal.md > > . Yes, the stuff in the Cuis repo is there for a reason. > > > > Alan Kay writes: > > "we'll know if we have the first Dynabook if we can make the end-user > > experience one of "reading and writing" about "powerful ideas" in a dynamic > > form, and to do this in such a way that large percentages of the bell-curve > > can learn how to do this." > > > > Q: Would an AI count as a UI? I'm thinking supplying an AI intermediary > > between the user and the system (replacing or rather complementing a > > keyboard) would make the system accessible to a wider range of users. It > > would help using the system, facilitate the user's learning, you name it. I > > hope this fantasy doesn't contradict somehow the Dynabook's idea :) > > > > Thanks again, > > Jaromir > > > > > > > > Cheers, > > > > -- > > Juan http://Vuletichcuis.stgithub.com/jvuletichresearchgate.net/profile/Juan-Vuletichindependent.academia.edu/JuanVuletichpatents.justia.com/inventor/juan-manuel-vuletichlinkedin.com/in/juan-vuletich-75611b3twitter.com/JuanVuletich > > > > -- > > Cuis-dev mailing list > > Cuis-dev at lists.cuis.st > > https://lists.cuis.st/mailman/listinfo/cuis-dev > > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev From ken.dickey at whidbey.com Mon Aug 5 07:00:54 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Mon, 05 Aug 2024 07:00:54 -0700 Subject: [Cuis-dev] TextEntryMorph vertical alignment In-Reply-To: References: Message-ID: <5af0389279dc5bf92fcd39bce09ead80@whidbey.com> On 2024-08-04 18:38, Mark Volkmann via Cuis-dev wrote: > Note how the text I enter is pushed up to the top rather than being > centered vertically inside the border. It seems like it should be > centered vertically by default. If you open any text editor and start typing, where do you expect the text to appear? -KenD -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot 2024-08-04 at 8.28.36?PM.png Type: image/png Size: 1589 bytes Desc: not available URL: From r.mark.volkmann at gmail.com Mon Aug 5 07:08:46 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Mon, 5 Aug 2024 09:08:46 -0500 Subject: [Cuis-dev] TextEntryMorph vertical alignment In-Reply-To: <5af0389279dc5bf92fcd39bce09ead80@whidbey.com> References: <5af0389279dc5bf92fcd39bce09ead80@whidbey.com> Message-ID: I expect it to appear at the top if it allows multiple lines to be entered, but I expect it to be centered vertically if it only allows a single line like TextEntryMorph does. On Mon, Aug 5, 2024 at 9:01?AM wrote: > On 2024-08-04 18:38, Mark Volkmann via Cuis-dev wrote: > > > Note how the text I enter is pushed up to the top rather than being > > centered vertically inside the border. It seems like it should be > > centered vertically by default. > > If you open any text editor and start typing, where do you expect the > text to appear? > > -KenD > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfern at free.fr Mon Aug 5 13:15:42 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Mon, 5 Aug 2024 22:15:42 +0200 Subject: [Cuis-dev] starting an image with a script In-Reply-To: References: Message-ID: Indeed, we rationalized the protocol. I pushed the changes along your PR. Thanks Le 02/08/2024 ? 22:20, Mark Volkmann via Cuis-dev a ?crit?: > Perhaps some method names have changed since that was written. > > To open a System Browser, > instead of BrowserWindow openBrowser > I think I need Browseropen. > > To open a Workspace, > instead ofWorkspace openWorkspace > I think I needWorkspaceopen. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cuis.01 at klix.ch Tue Aug 6 07:02:34 2024 From: cuis.01 at klix.ch (Gerald Klix) Date: Tue, 06 Aug 2024 14:02:34 -0000 Subject: [Cuis-dev] Community tutorial meeting In-Reply-To: References: Message-ID: <6ec178fe8e94365e2c747a10bb6c551273c66c4c.camel@klix.ch> Hi Hilaire, I would love to participate in such a meeting! Especially I want to learn about Dr. Geo. Best Regards, Gerald On Thu, 27 Jan 2022 10:44:34 +0100 Hilaire Fernandes via Cuis-dev wrote: > Hi! > > I fell so enthusiastic about Cuis. It gave me back enthusiasm > regarding > programming with Smalltalk. > > With Cuis, the limits are your creativity and the energy you put in > the > balance; Cuis is very rarely an obstacle. For a casual programmer as > me > it is critical, my time is precious and every minutes spend on Cuis > must > be productive. > > Thanks Juan. > > Thanks too to its capable, friendly and warm community. > > Because of that enthusiasm, I want to propose to the community the > idea > of recurring online meetings. Something in a short format, like 30 > min > once a month, with a given topic proposed and presented by a > volunteer > chair. It will be like: "Ok, I, Paul, will present for 15 min one > topic > of interest of me with Cuis, then we, the audience will share > questions > and ideas." > > Short in its duration, it will prove to be effective and focused, and > a > light constraint. With long meeting, people fall asleep and get > bored, > and the focus gets loose. > > Moreoever, new users or curious about Cuis could join. Short enough, > the > meeting could be recorded for reference and documentation. > > It will be a great opportunity to learn and to discover, with a I > think > a quite good ratio of efficiency, new facets of Cuis and its > community. > > What do you think? > > I volunteer to propose topic on my current areas of interest: > "Writing > book (for Cuis)", "Widget", "DrGeo". I am sure the spectrum of > personnel > areas of interest is diverse in the community, and I will be > interested > to learn new things. > > Hilaire > > -- > GNU Dr. Geo > http://drgeo.eu > http://blog.drgeo.eu From r.mark.volkmann at gmail.com Tue Aug 6 07:04:27 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Tue, 6 Aug 2024 09:04:27 -0500 Subject: [Cuis-dev] Community tutorial meeting In-Reply-To: <6ec178fe8e94365e2c747a10bb6c551273c66c4c.camel@klix.ch> References: <6ec178fe8e94365e2c747a10bb6c551273c66c4c.camel@klix.ch> Message-ID: I would also enjoy this! On Tue, Aug 6, 2024 at 9:02?AM Gerald Klix via Cuis-dev < cuis-dev at lists.cuis.st> wrote: > Hi Hilaire, > > I would love to participate in such a meeting! > Especially I want to learn about Dr. Geo. > > > Best Regards, > > Gerald > > > > On Thu, 27 Jan 2022 10:44:34 +0100 > Hilaire Fernandes via Cuis-dev wrote: > > > Hi! > > > > I fell so enthusiastic about Cuis. It gave me back enthusiasm > > regarding > > programming with Smalltalk. > > > > With Cuis, the limits are your creativity and the energy you put in > > the > > balance; Cuis is very rarely an obstacle. For a casual programmer as > > me > > it is critical, my time is precious and every minutes spend on Cuis > > must > > be productive. > > > > Thanks Juan. > > > > Thanks too to its capable, friendly and warm community. > > > > Because of that enthusiasm, I want to propose to the community the > > idea > > of recurring online meetings. Something in a short format, like 30 > > min > > once a month, with a given topic proposed and presented by a > > volunteer > > chair. It will be like: "Ok, I, Paul, will present for 15 min one > > topic > > of interest of me with Cuis, then we, the audience will share > > questions > > and ideas." > > > > Short in its duration, it will prove to be effective and focused, and > > a > > light constraint. With long meeting, people fall asleep and get > > bored, > > and the focus gets loose. > > > > Moreoever, new users or curious about Cuis could join. Short enough, > > the > > meeting could be recorded for reference and documentation. > > > > It will be a great opportunity to learn and to discover, with a I > > think > > a quite good ratio of efficiency, new facets of Cuis and its > > community. > > > > What do you think? > > > > I volunteer to propose topic on my current areas of interest: > > "Writing > > book (for Cuis)", "Widget", "DrGeo". I am sure the spectrum of > > personnel > > areas of interest is diverse in the community, and I will be > > interested > > to learn new things. > > > > Hilaire > > > > -- > > GNU Dr. Geo > > http://drgeo.eu > > http://blog.drgeo.eu > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From raiford at labware.com Tue Aug 6 07:43:33 2024 From: raiford at labware.com (Jon Raiford) Date: Tue, 6 Aug 2024 14:43:33 +0000 Subject: [Cuis-dev] Unavailable SUnit TestResource stops test runner Message-ID: I have a question for the SUnit experts out there. Have a look at this simple test case that demonstrates an unavailable test resource. I don?t understand why an unavailable test resource causes the test runner itself to stop. Wouldn?t it be more correct to flag all test cases that rely on it as failed instead? Ideally we should be able to run automated tests without having to worry about this stopping the testing framework, Thanks, jon -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SUnitBadResourceExample.st Type: application/octet-stream Size: 1190 bytes Desc: SUnitBadResourceExample.st URL: From ebirman77 at gmail.com Tue Aug 6 08:42:40 2024 From: ebirman77 at gmail.com (Ezequiel Birman) Date: Tue, 6 Aug 2024 16:42:40 +0100 Subject: [Cuis-dev] Community tutorial meeting In-Reply-To: <6ec178fe8e94365e2c747a10bb6c551273c66c4c.camel@klix.ch> References: <6ec178fe8e94365e2c747a10bb6c551273c66c4c.camel@klix.ch> Message-ID: XD I see you're catching up with old mail! I too, would love to hear Hillaire talk about Cassowary and 1Dollar On Tue, 6 Aug 2024 at 15:02, Gerald Klix via Cuis-dev < cuis-dev at lists.cuis.st> wrote: > Hi Hilaire, > > I would love to participate in such a meeting! > Especially I want to learn about Dr. Geo. > > > Best Regards, > > Gerald > > > > On Thu, 27 Jan 2022 10:44:34 +0100 > Hilaire Fernandes via Cuis-dev wrote: > > > Hi! > > > > I fell so enthusiastic about Cuis. It gave me back enthusiasm > > regarding > > programming with Smalltalk. > > > > With Cuis, the limits are your creativity and the energy you put in > > the > > balance; Cuis is very rarely an obstacle. For a casual programmer as > > me > > it is critical, my time is precious and every minutes spend on Cuis > > must > > be productive. > > > > Thanks Juan. > > > > Thanks too to its capable, friendly and warm community. > > > > Because of that enthusiasm, I want to propose to the community the > > idea > > of recurring online meetings. Something in a short format, like 30 > > min > > once a month, with a given topic proposed and presented by a > > volunteer > > chair. It will be like: "Ok, I, Paul, will present for 15 min one > > topic > > of interest of me with Cuis, then we, the audience will share > > questions > > and ideas." > > > > Short in its duration, it will prove to be effective and focused, and > > a > > light constraint. With long meeting, people fall asleep and get > > bored, > > and the focus gets loose. > > > > Moreoever, new users or curious about Cuis could join. Short enough, > > the > > meeting could be recorded for reference and documentation. > > > > It will be a great opportunity to learn and to discover, with a I > > think > > a quite good ratio of efficiency, new facets of Cuis and its > > community. > > > > What do you think? > > > > I volunteer to propose topic on my current areas of interest: > > "Writing > > book (for Cuis)", "Widget", "DrGeo". I am sure the spectrum of > > personnel > > areas of interest is diverse in the community, and I will be > > interested > > to learn new things. > > > > Hilaire > > > > -- > > GNU Dr. Geo > > http://drgeo.eu > > http://blog.drgeo.eu > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ebirman77 at gmail.com Tue Aug 6 10:00:49 2024 From: ebirman77 at gmail.com (Ezequiel Birman) Date: Tue, 6 Aug 2024 18:00:49 +0100 Subject: [Cuis-dev] new YouTube video on Cuis Smalltalk In-Reply-To: References: <3a0584e16b495a4d3c9fff30b9e6668d@mail.msen.com> <6678A008.8000504@cuis.st> Message-ID: Thank you for such a thoughtful reply! I will be thinking about it. I'll delimit more precisely where I think they were exaggerating (I agree with the rest): ...that it actually became hard to read. Did it? Are Smalltalk-80 predecessors easier to read? And by the way, is reading the hardest part? ...It fell back into data-structure-type programming instead of > simulation-type programming. > Again, were Smalltalk-80 predecessors, ?with the exception of Smalltalk-72?, so much different? It is true that it requires some imagination. We must enter willingly into a world of make believe. Thanks again for all the references and detailed footnotes, I hope to be able to understand what you are up to, some day... :) On Mon, 5 Aug 2024 at 14:01, Boris Shingarov via Cuis-dev < cuis-dev at lists.cuis.st> wrote: > > The basic idea is to exploit the duality between 'functions and tables > (or > > processes and memory). English has nouns which refer to "objects", and > > verbs which refer to "actors" and "relators". This is a Newtonian > > epistemology. Modern physics and philosophy tend towards the idea that > > both "objects" and "actors" are just different aspects of the notion of > > process. > > After decades of re-reading and re-reading "Children of All Ages", this > paragraph never ceases to astound me, by how explicit it is about the > nonclassical character of Smalltalk. The 20th-century "New Science" ? > the physics of Einstein/Bohr/Heisenberg, the logic of Brouwer/G?del, etc > ? is *essential* to it: if we restrict ourselves to the "Newtonian > epistemology" (classical physics, classical logic, classical calculus), > then, (paraphrasing Schweitzer) "nothing remains of it, beyond that there > was a teacher from California named Alan Kay". > > The duality of object's state and behavior, is just the categorial > duality of algebra (data) and coalgebra (functions), perhaps along the > lines of Boehm?Berarducci encoding [1], or Vassili Bykov's "How to get > rid of Objects in Smalltalk" [2]. Of course this all is just another > name for the topological duality between open/closed sets, or the quantum > duality between adjoint bra/ket, etc etc ? these are manifestations of > the same phenomenon discovered around the first decades of the 20th > century. When I first bumped into Kay's writings, I was struck by the > magic how Kay was able to write the above paragraph so much earlier > before systems like CLOS (in which the connection is obvious) were > constructed [3?7]. So I became curious, and a little digging led me to > Papert, Rosenblatt and Minsky; this was the moment when I became aware > that Kay did not operate in a vacuum, that the ideas of biologically- > inspired massively-parallel communicating agents were already actively > researched; became aware of the fight between the "connectionists" and > the "symbolists"; and of how na?ve that fight proved in light of the > tremendous progress which was made in the following decades [8]. > > >> The next major revision of Smalltalk was Smalltalk-80. Kay was no longer > >> on the scene to argue that any language should be simple enough for a > child > >> to use. Smalltalk-80, says Tesler, went too far in the opposite > direction > >> from the earliest versions of Smalltalk: ?It went to such an extreme to > >> make it compilable, uniform, and readable, that it actually became hard > to > >> read, and you definitely wouldn?t want to teach it to children.? > >> > >> Kay, looking at Smalltalk-80, said, ?It?s terrible that it can?t be used > >> by children, since that?s who Smalltalk was intended for. It fell back > into > >> data-structure-type programming instead of simulation-type programming.? > > > > I think that both Tesler and Kay are exaggerating here, > > Can you explain why you think they are exaggerating? > From my own personal experience (which of course is not universal, this > is why I am genuinely interested in learning about others' experiences, > hence asking) of trying to advance Smalltalk from the systems in use > today towards what Kay appears to say in his writings, I find the above > quote quite literally correct. And in this my-own-experience when I > describe building a Kay-like Smalltalk, I have in some cases heard > fierce criticism of Kay (in a few cases transitioning into ad-hominem > arguments against him). When I try to poke harder, in most of such > cases the deeper problem turns out to be that the opponent is firmly > entrenched in the "Newtonian epistemology", and engages in quantum > denialism bordering on Cargo-Cult Science. The real challenge of the > situation is *competition*. It's 2024 on the calendar; my competitors > have implemented post-quantum (cf. post-intuitionist etc.) algorithms, > reconciled the Connectionist and the Symbolist viewpoint, they are > engaging in kinds of computing completely unthinkable in the Newtonian > context. > > By saying this, I don't mean to criticize Smalltalk-80 or to say that > we should build a "Kay-like (nonclassical) Smalltalk" to *replace* Cuis > because the latter is Newtonian. To suggest it, would indicate a lack > of understanding of Bohr's correspondence principle. > > Finkelstein explains this very nicely [9, 10]: > > "Most of the pioneers of the quantum theory, including Einstein, de > Broglie, > Schr?dinger, and Wigner, retained more of the ontic classical epistemology > than Heisenberg and Bohr, and rejected the quantum project in principle. > Einstein's view is clearly stated and frequently quoted: > > > There is no doubt that quantum mechanics has seized hold of a beautiful > > element of truth, and that it will be a test stone for any future > > theoretical basis, in that it must be deducible as a limiting case from > > that basis, just as electrostatics is deducible from Maxwell's equations > > of the electromagnetic field, or as thermodynamics is deducible from > > classical mechanics. However, I do not believe that quantum mechanics > > will be the starting point in the search for this basis, just as, vice > > versa, one could not go from thermodynamics (resp. statistical mechanics) > > to the foundations of mechanics. > ? Einstein 1936 > > Bohr believed that quantum mechanics "will be the starting point in the > search", as Einstein put it, but proposed nevertheless to give classical > concepts a permanent place in its foundations. To be sure, Bohr noted, > our "classical" (that is, classical) concepts are "gross and inadequate", > and nature "leaks through them like water through a net". At the same > time, Bohr explicitly rejected the idea of a "quantum universe" (in the > sense of a universe described by a ? vector). > > When the concept of a "? vector" or ket for the universe was broached > to him, he responded vehemently "You might as well say that we are only > dreaming that we are here." He held that we must use classical concepts > to communicate about our experiments if we wish to be understood. > Heisenberg soon accepted Bohr's position on this matter, and it became > part of the Copenhagen quantum theory: > > > The concepts of classical physics form the language by which we > > describe the arrangements of our experiments and state the results. > > We cannot and should not replace these concepts by others. Still > > the application of these concepts is limited by the relations of > > uncertainty. > ? Heisenberg > > The insistence of Bohr and Heisenberg that we *cannot* use quantum > concepts to describe the episystem seems over-dogmatic today. ? We > experiment with a praxic, post-Copenhagen position here. > > == END OF FINKELSTEIN CITATION > > So even if one characterization of Smalltalk-80 would be that its > designers "rejected Kay's Smalltalk project in principle", they would > be just following in Einstein's and Schr?dinger's footsteps. > More seriously, though, if we are to build a Kay-like Smalltalk, it does > not *replace* Smalltalk-80 just like quantum mechanics does not *replace* > Newtonian mechanics. In other words, Bohr's correspondence says that > a Kay-like Smalltalk must necessarily be embedded in something like Cuis. > > ----- > > Looking back at what I just wrote, I am sorry I am not really *explaining* > but merely pointing in the general direction of what kind of thoughts > have been occupying my mind in the past dozen years. > > Also I must warn about my choice of quantum mechanics as the example of > "twentieth-century science". It is only because that's what I am familiar > with, NOT because it's better. A topologist reading this post, can > criticize me like "hey Boris, why don't you talk about the familiar > open/closed sets instead of those obscure bra/ket", and it would be > perfectly valid. > > [1] https://okmij.org/ftp/tagless-final/course/Boehm-Berarducci.html > [2] https://live.exept.de/doc/online/english/programming/humor.html > [3] https://doi.org/10.1017/S0956796800001490 > [4] https://dx.doi.org/10.1017/S0960129500000694 > [5] https://doi.org/10.1007/978-1-4613-1437-0_5 > [6] https://doi.org/10.1007/BFb0053063 > [7] https://www.cs.ru.nl/B.Jacobs/PAPERS/JR.pdf > [8] M.L.Minsky, S.A.Papert. Perceptrons. (Make sure you have the 1988 > edition, not the 1969 original). > [9] D.R.Finkelstein. Quantum Relativity. > [10] S.A.Selesnick. Quanta, Logic and Spacetime: Variations on > Finkelstein's Quantum Relativity. > > > > On Thu, Jun 27, 2024 at 06:32:39PM +0100, Ezequiel Birman via Cuis-dev > wrote: > > Sorry in advance for the scattered replies > > > > Joseph Turco wrote: > > > > > When Alan Kay and Adele Goldberg were testing smalltalk-80, they were > > > using kids in school to play with it (...) > > > > > Children didn't use Smalltalk-80. For all that I know, children used > > Smalltalk-72 through Smalltalk-76. A good summary is provided in the > > article by Perry and Wallich, Inside the PARC: the `information > architects' > > from which I > quote: > > > > > The first compiled version of Smalltalk, written in 1976, marked the > end > > > of the emphasis on a language that children could use. The language > was now > > > ?a mature programming environment,? Ingalls said. ?We got interested in > > > exporting it and making it widely available.? > > > > > > The next major revision of Smalltalk was Smalltalk-80. Kay was no > longer > > > on the scene to argue that any language should be simple enough for a > child > > > to use. Smalltalk-80, says Tesler, went too far in the opposite > direction > > > from the earliest versions of Smalltalk: ?It went to such an extreme to > > > make it compilable, uniform, and readable, that it actually became > hard to > > > read, and you definitely wouldn?t want to teach it to children.? > > > > > > Kay, looking at Smalltalk-80, said, ?It?s terrible that it can?t be > used > > > by children, since that?s who Smalltalk was intended for. It fell back > into > > > data-structure-type programming instead of simulation-type > programming.? > > > > > I think that both Tesler and Kay are exaggerating here, but the push by > > Xerox to create ?the office of the future? was real. > > > > Jaromir Matas wrote: > > > > > Your Youtube talk and especially your answers allowed me to read the > > > articles with a whole new level of understanding. Especially Alan > Kay's "A > > > Personal Computer for Children of All Ages" has so much to say [...] > > > > > I wonder what percentage of people understand ?children of all ages? the > > same way I do. Cyril Connolly said that Imprisoned in every fat man, a > thin > > one is wildly signalling to be let out. I want to believe that I don't > have > > much difficulty in letting my inner-child out. For good or ill, this view > > of children as unprejudiced, unspoiled, playful, curious little people > > (childlike) can coexist with the reality of their capricious and > demanding > > nature (childish). One of the things we like about computers is the > almost > > instant gratification they can provide. > > > > [...] I have a problem with documenting though. You know I've tried to > > > write as thorough comments as possible documenting intentions, > explaining > > > sticking points etc. (even if just to help myself understand it again > a few > > > months/weeks later) but IMHO it's still woefully insufficient - in > addition > > > to the more or less terse in-method comments I'd like to be able to add > > > somewhere really close (even in-image Help files are too far away) more > > > detailed descriptions, reasons for tradoffs, motivations, future plans, > > > examples, etc. - but in a way that wouldn't clutter the environment. > > > > and > > > > > I'm not sure I understand the part about "knowledge" though: "Write, > > > describe, communicate knowledge" - what does it mean exactly? Is it > about > > > Smalltalk as a language? The language itself is not that different from > > > other (high-level) languages. A good language certainly is a great > help to > > > formulate things but it's still a "programming language". I guess > there > > > more to it I didn't get :) > > > > > > Or is it about the whole concept including the live "OS-like" > environment? > > > But where the "writing knowledge" fits in? > > > > > Maybe the misunderstanding is due to the fact that you are taking > > ?documentation? at face value. In my mind, *every* program, at least > every > > program written in something higher level than assembly language, can be > > regarded as ?documentation?. And in a way, it is the best sort of > > documentation because it must execute. This is also different from > Knuth's > > idea and realization of literate programming. I like his point of view > only > > because I like reading for reading's sake, and I like books, and I like > how > > *he* writes; but code is not literature > > . What I am talking about is more > > like a deliberate confusion between the map and the territory. > > > > ?For the people that want a system that is fully malleable, even if > > limited, Smalltalk is still the best thing that has been built? said Juan > > in the interview, because all of the things you mentioned combined > together > > with thoughtful design evolved during decades (if you also take into > > account Self, Morphic and other developments). If this is not a > qualitative > > jump, I don't know what it is. I cannot avoid thinking about the balloon > > ; it conveys such an adequate > picture. > > > > Jaromir Matas wrote: > > > > > I've played a bit with Javascript and Python recently and my > impression is > > > they try to follow basically the same goal [...] > > > > > I disagree. Their original goal was to be ?scripting? languages and thus, > > they favored scripting over robustness, comprehensibility, design, > clarity, > > simplicity, and consistency. Of course you can still write beautiful > Python > > or JavaScript as you can write ugly Smalltalk. Kay has used the Ford-T > > metaphor; Ingalls compared Smalltalk to a musical instrument. I don't > know > > about you but I prefer to play or learn to play a keyboard instrument in > a > > beautifully crafted Steinway rather than in a cheap electronic Casio > > keyboard. > > > > Ken Dickey wrote: > > > > > The Squeak folks noted Scheme48, which is/was a Scheme written in > Scheme > > > which compiled to C and had decent performance on computers of the day > > > -- so they knew it could be done. > > > > > Thanks for reminding us! Scheme 48 was my scheme of > > choice back in the day. > > > > Juan Vuletich wrote: > > > > > There are several links at > > > > https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/blob/master/Documentation/AboutCuis.md#the-philosophy-behind-cuis > > > . Have you read them? Please do. > > > > I'd also urge everyone to read Programming as Theory Building > > > by > > Peter Naur > > > > -- > > Eze > > > > > > A quarta, 26/06/2024, 23:47, Jaromir Matas via Cuis-dev < > > cuis-dev at lists.cuis.st> escreveu: > > > > > Hi Juan, > > > > > > > > > On 24-Jun-24 12:22:00 AM, "Juan Vuletich via Cuis-dev" < > > > cuis-dev at lists.cuis.st> wrote: > > > > > > On 6/23/2024 5:19 AM, Jaromir Matas via Cuis-dev wrote: > > > > > > I'm not sure I understand the part about "knowledge" though: "Write, > > > describe, communicate knowledge" - what does it mean exactly? Is it > about > > > Smalltalk as a language? The language itself is not that different from > > > other (high-level) languages. A good language certainly is a great > help to > > > formulate things but it's still a "programming language". I guess > there > > > more to it I didn't get :) > > > > > > Or is it about the whole concept including the live "OS-like" > environment? > > > But where the "writing knowledge" fits in? > > > > > > > > > There are only some many things that can be said in an hour. > > > > > > There are several links at > > > > https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/blob/master/Documentation/AboutCuis.md#the-philosophy-behind-cuis > > > . Have you read them? Please do. > > > > > > I'm so glad you nudged me to read them. Your Youtube talk and > especially > > > your answers allowed me to read the articles with a whole new level of > > > understanding. Especially Alan Kay's "A Personal Computer for Children > of > > > All Ages" has so much to say; here's what caught my attention (re > objects > > > vs. processes): > > > quote > > > > > > The following principles should be used in the design of the Dynabook > > > language. > > > > > > 1. We need a uniform notion as to what objects are, how they may be > > > referred to, and how they can manipulate other objects. > > > > > > 2. If each object can have its own control path, then there must be a > > > concise way to coordinate and "control" these paths when more than one > is > > > active. > > > > > > 3. The evaluation of a control path should follow simple rules which > show > > > how objects are passed messages and return results. > > > > > > 4. Every object in a system should be redefinable in terms of other > > > objects. > > > > > > The basic idea is to exploit the duality between 'functions and tables > (or > > > processes and memory). English has nouns which refer to "objects", and > > > verbs which refer to "actors" and "relators". This is a Newtonian > > > epistemology. Modern physics and philosophy tend towards the idea that > both > > > "objects" and "actors" are just different aspects of the notion of > > > *process*. A process has *state* (a set of relations having only to do > > > with it) which changes as time (defined as interactions with other > objects) > > > passes. Using this view "data" is a process which changes "slowly", > > > "function" is a process which changes more rapidly. Each process has > the > > > logical attributes of a complete "micro" computer: they can have > inputs, > > > give back outputs, act as a memory on file system, perform > computations, be > > > interrupted, etc. [?] Since multiple control paths are allowed, many > > > processes can be in various stages of evaluation and debugging. > > > > > > unquote > > > > > > Do I understand correctly that Alan Kay suggests in (2) that each > object > > > should have its own control path (i.e. a thread, aka a process in > Smalltalk > > > vocabulary)? Is he somehow placing an equal sign between objects and > actors > > > (like e.g. Squeak Actors by Tony Garnock-Jones, > > > https://tonyg.github.io/squeak-actors) where actors are implemented as > > > processes. Would that implicate that the idea was that objects should > do > > > their jobs in parallel, each in its own process (control path), i.e. > > > asynchronously, rather than synchronously and on a single control path > > > unless explicitely forked? > > > > > > This part really confused me; it's quite a difference whether you do: > > > car driveTo: aPlace > > > and assume the car just does it (asynchronously) until it arrives there > > > while the current control path continues or: > > > [car driveTo: aPlace] fork > > > where you explicitly give the car it's own control path. > > > > > > Or have I misunderstood it completely? :))) > > > > > > > > > > > > And, as I said at the start of the podcast, Smalltalk is an attitude. > If > > > you are a programmer, wanting to solve some problem with code, then > > > Smalltalk is a good programming language. But if you want to explore a > > > field, understand, and document your journey of discovery and > invention, > > > you could use pencil and paper. Or perhaps Jupyter Notebooks. Or > Smalltalk. > > > If you use Smalltalk this way, it is way more than a programming > system. > > > > > > Yup, that's what I use Smalltalk for - exploring, seeking active > > > understanding. I have a problem with documenting though. You know I've > > > tried to write as thorough comments as possible documenting intentions, > > > explaining sticking points etc. (even if just to help myself > understand it > > > again a few months/weeks later) but IMHO it's still woefully > insufficient - > > > in addition to the more or less terse in-method comments I'd like to be > > > able to add somewhere really close (even in-image Help files are too > far > > > away) more detailed descriptions, reasons for tradoffs, motivations, > future > > > plans, examples, etc. - but in a way that wouldn't clutter the > > > environment. > > > > > > Now that you mentioned Jupyter Notebooks - I was wondering why Cuis > Text > > > Editor won't allow running code fragments - like the Workspace; > whether it > > > could serve as a richer documentation medium and "active" - able to > run the > > > examples just like Jupyter Notebooks. Or maybe I just missed something > that > > > already works that way... > > > > > > A note about exploration: I like to use Smalltalk to explore exceptions > > > and e.g. tried to use them just as another workflow control mechanism. > > > Recently, however, I've attended an OOP lecture where this type of use > of > > > exceptions was strongly discouraged. But this has nothing to do with > OOP - > > > maybe in Python or Java is doesn't make much sense due to their > particular > > > implementation but in Smalltalk - why not? :) And besides that > Smalltalk is > > > the only language I'm aware of that implements exceptions that can > resume > > > the computation - all other mainstream ones can only make return. > > > > > > > > > > > > Other question - Smalltalk was originally supposed to be the universal > > > environment above the hardware level. Everything below the VM is the > > > hardware (a machine language), everything above the VM is Smalltalk > (the > > > UI, apps...). Even the VM is written in a simplified Smalltalk (Slang); > > > what was supposed to be the role of C - to stay as an intermediary > between > > > the Smalltalk level and the hardware or was (is?) it supposed to be > > > eliminated somehow eventually? > > > > > > > > > In my opinion, "Design Principles Behind Smalltalk" is the canon here. > C > > > had no role originally, only much later. And its only role is to be a > > > useful implementation language for VMs. Nothing special. > > > > > > > > > And one more note about "easy to use, intuitive, for children" - this > > > refers to the DynaBook concept, right? Smalltalk as a language is a > lot of > > > things but certainly not those things :) Simple syntax doesn't mean > > > simplicity but it thank god it saves me from remembering tons of > syntactic > > > rules :) Anyway, many thanks for explaining the DynaBook concept! > > > > > > Thanks again for the great talk! > > > best, > > > Jaromir > > > > > > > > > Yes. Smalltalk was started as the "software half" of a Dynabook. You'd > > > read about the history, starting from Smalltalk-72, its objectives and > the > > > experiences done by the Parc Learning Research Group. And what happened > > > after that, how they did Smalltalk-80, and to what extent focus was > > > changed. Same with the developments described in the Green Book, and > later > > > commercial Smalltalks. How / why focus changed? What happened with "for > > > children"? Out of where did Etoys, Scratch, and the whole world of tile > > > programming came to be? > > > > > > I think it is best to read what the people who did all this wrote. For > > > instance, start with > > > > https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/blob/master/Documentation/Philosophical/OnMakingDynabooksReal.md > > > . Yes, the stuff in the Cuis repo is there for a reason. > > > > > > Alan Kay writes: > > > "we'll know if we have the first Dynabook if we can make the end-user > > > experience one of "reading and writing" about "powerful ideas" in a > dynamic > > > form, and to do this in such a way that large percentages of the > bell-curve > > > can learn how to do this." > > > > > > Q: Would an AI count as a UI? I'm thinking supplying an AI intermediary > > > between the user and the system (replacing or rather complementing a > > > keyboard) would make the system accessible to a wider range of users. > It > > > would help using the system, facilitate the user's learning, you name > it. I > > > hope this fantasy doesn't contradict somehow the Dynabook's idea :) > > > > > > Thanks again, > > > Jaromir > > > > > > > > > > > > Cheers, > > > > > > -- > > > Juan > http://Vuletichcuis.stgithub.com/jvuletichresearchgate.net/profile/Juan-Vuletichindependent.academia.edu/JuanVuletichpatents.justia.com/inventor/juan-manuel-vuletichlinkedin.com/in/juan-vuletich-75611b3twitter.com/JuanVuletich > > > > > > -- > > > Cuis-dev mailing list > > > Cuis-dev at lists.cuis.st > > > https://lists.cuis.st/mailman/listinfo/cuis-dev > > > > > > -- > > Cuis-dev mailing list > > Cuis-dev at lists.cuis.st > > https://lists.cuis.st/mailman/listinfo/cuis-dev > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at ianjeffries.net Tue Aug 6 18:47:53 2024 From: mail at ianjeffries.net (Ian Jeffries) Date: Tue, 6 Aug 2024 21:47:53 -0400 Subject: [Cuis-dev] Community tutorial meeting In-Reply-To: References: <6ec178fe8e94365e2c747a10bb6c551273c66c4c.camel@klix.ch> Message-ID: I'm definitely interested as well! On Tue, Aug 6, 2024 at 11:43?AM Ezequiel Birman via Cuis-dev < cuis-dev at lists.cuis.st> wrote: > XD I see you're catching up with old mail! > > I too, would love to hear Hillaire talk about Cassowary and 1Dollar > > On Tue, 6 Aug 2024 at 15:02, Gerald Klix via Cuis-dev < > cuis-dev at lists.cuis.st> wrote: > >> Hi Hilaire, >> >> I would love to participate in such a meeting! >> Especially I want to learn about Dr. Geo. >> >> >> Best Regards, >> >> Gerald >> >> >> >> On Thu, 27 Jan 2022 10:44:34 +0100 >> Hilaire Fernandes via Cuis-dev wrote: >> >> > Hi! >> > >> > I fell so enthusiastic about Cuis. It gave me back enthusiasm >> > regarding >> > programming with Smalltalk. >> > >> > With Cuis, the limits are your creativity and the energy you put in >> > the >> > balance; Cuis is very rarely an obstacle. For a casual programmer as >> > me >> > it is critical, my time is precious and every minutes spend on Cuis >> > must >> > be productive. >> > >> > Thanks Juan. >> > >> > Thanks too to its capable, friendly and warm community. >> > >> > Because of that enthusiasm, I want to propose to the community the >> > idea >> > of recurring online meetings. Something in a short format, like 30 >> > min >> > once a month, with a given topic proposed and presented by a >> > volunteer >> > chair. It will be like: "Ok, I, Paul, will present for 15 min one >> > topic >> > of interest of me with Cuis, then we, the audience will share >> > questions >> > and ideas." >> > >> > Short in its duration, it will prove to be effective and focused, and >> > a >> > light constraint. With long meeting, people fall asleep and get >> > bored, >> > and the focus gets loose. >> > >> > Moreoever, new users or curious about Cuis could join. Short enough, >> > the >> > meeting could be recorded for reference and documentation. >> > >> > It will be a great opportunity to learn and to discover, with a I >> > think >> > a quite good ratio of efficiency, new facets of Cuis and its >> > community. >> > >> > What do you think? >> > >> > I volunteer to propose topic on my current areas of interest: >> > "Writing >> > book (for Cuis)", "Widget", "DrGeo". I am sure the spectrum of >> > personnel >> > areas of interest is diverse in the community, and I will be >> > interested >> > to learn new things. >> > >> > Hilaire >> > >> > -- >> > GNU Dr. Geo >> > http://drgeo.eu >> > http://blog.drgeo.eu >> -- >> Cuis-dev mailing list >> Cuis-dev at lists.cuis.st >> https://lists.cuis.st/mailman/listinfo/cuis-dev >> > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Tue Aug 6 19:23:04 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Tue, 6 Aug 2024 21:23:04 -0500 Subject: [Cuis-dev] scrollable lists Message-ID: <3131C416-ECFA-4862-9166-E2EDF929CC65@gmail.com> What is a good way to implement a vertical scrolling list of Morphs? Should I create LayoutMorph that use a column direction and put that inside a Pluggable ScrollPane? R. Mark Volkmann Object Computing, Inc. From ken.dickey at whidbey.com Wed Aug 7 06:28:53 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Wed, 07 Aug 2024 06:28:53 -0700 Subject: [Cuis-dev] scrollable lists In-Reply-To: <3131C416-ECFA-4862-9166-E2EDF929CC65@gmail.com> References: <3131C416-ECFA-4862-9166-E2EDF929CC65@gmail.com> Message-ID: <66f84c95703aed660dbe185623c045c7@whidbey.com> On 2024-08-06 19:23, Mark Volkmann via Cuis-dev wrote: > What is a good way to implement a vertical scrolling list of Morphs? > Should I create LayoutMorph that use a column direction and put that > inside a Pluggable ScrollPane? It depends on your usage. In 'UI-Palette' you will see the code for PickAColorPalette, PickAnIconPalette and so on which place their submorphs directly. See ImagePickerPanel class >> privateBuildPanelLabel:collection:transducer: You should play around with various ways of doing things. Experiment! ==== Experiment Make it your motto day and night Experiment And it will lead you to the light The apple on the top of the tree Is never too high to achieve So take an example from Eve Experiment Be curious Though interfering friends may frown Get furious At each attempt to hold you down If this advice you'll only employ The future can offer you infinite joy And merriment Experiment And you'll see ==== Cole Porter ==== HTH, -KenD From marianomontone at gmail.com Wed Aug 7 06:30:42 2024 From: marianomontone at gmail.com (Mariano Montone) Date: Wed, 7 Aug 2024 10:30:42 -0300 Subject: [Cuis-dev] scrollable lists In-Reply-To: <3131C416-ECFA-4862-9166-E2EDF929CC65@gmail.com> References: <3131C416-ECFA-4862-9166-E2EDF929CC65@gmail.com> Message-ID: <4743ab37-7ee5-4731-b7fc-158c3dd06692@gmail.com> El 6/8/24 a las 23:23, Mark Volkmann via Cuis-dev escribi?: > What is a good way to implement a vertical scrolling list of Morphs? Should I create LayoutMorph that use a column direction and put that inside a Pluggable ScrollPane? > > R. Mark Volkmann > Object Computing, Inc. Yes. If I translate your words to code: |p| p := PluggableScrollPane new. p scroller: LayoutMorph newColumn. Color indexedColors do: [:color | p addToScroller: (BoxedMorph new color: color; yourself)]. p openInWorld -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at christianhaider.de Wed Aug 7 09:23:35 2024 From: mail at christianhaider.de (Christian Haider) Date: Wed, 7 Aug 2024 18:23:35 +0200 Subject: [Cuis-dev] Community tutorial meeting In-Reply-To: <6ec178fe8e94365e2c747a10bb6c551273c66c4c.camel@klix.ch> References: <6ec178fe8e94365e2c747a10bb6c551273c66c4c.camel@klix.ch> Message-ID: <0b2c01dae8e6$276a4910$763edb30$@christianhaider.de> No meeting today? > -----Urspr?ngliche Nachricht----- > Von: Cuis-dev Im Auftrag von Gerald Klix via > Cuis-dev > Gesendet: Donnerstag, 27. Januar 2022 14:47 > An: cuis-dev at lists.cuis.st > Cc: Gerald Klix ; Hilaire Fernandes > Betreff: Re: [Cuis-dev] Community tutorial meeting > > Hi Hilaire, > > I would love to participate in such a meeting! > Especially I want to learn about Dr. Geo. > > > Best Regards, > > Gerald > > > > On Thu, 27 Jan 2022 10:44:34 +0100 > Hilaire Fernandes via Cuis-dev wrote: > > > Hi! > > > > I fell so enthusiastic about Cuis. It gave me back enthusiasm > > regarding programming with Smalltalk. > > > > With Cuis, the limits are your creativity and the energy you put in > > the balance; Cuis is very rarely an obstacle. For a casual programmer > > as me it is critical, my time is precious and every minutes spend on > > Cuis must be productive. > > > > Thanks Juan. > > > > Thanks too to its capable, friendly and warm community. > > > > Because of that enthusiasm, I want to propose to the community the > > idea of recurring online meetings. Something in a short format, like > > 30 min once a month, with a given topic proposed and presented by a > > volunteer chair. It will be like: "Ok, I, Paul, will present for 15 > > min one topic of interest of me with Cuis, then we, the audience will > > share questions and ideas." > > > > Short in its duration, it will prove to be effective and focused, and > > a light constraint. With long meeting, people fall asleep and get > > bored, and the focus gets loose. > > > > Moreoever, new users or curious about Cuis could join. Short enough, > > the meeting could be recorded for reference and documentation. > > > > It will be a great opportunity to learn and to discover, with a I > > think a quite good ratio of efficiency, new facets of Cuis and its > > community. > > > > What do you think? > > > > I volunteer to propose topic on my current areas of interest: > > "Writing > > book (for Cuis)", "Widget", "DrGeo". I am sure the spectrum of > > personnel areas of interest is diverse in the community, and I will be > > interested to learn new things. > > > > Hilaire > > > > -- > > GNU Dr. Geo > > http://drgeo.eu > > http://blog.drgeo.eu > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev From ken.dickey at whidbey.com Wed Aug 7 09:29:42 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Wed, 07 Aug 2024 09:29:42 -0700 Subject: [Cuis-dev] Community tutorial meeting In-Reply-To: <0b2c01dae8e6$276a4910$763edb30$@christianhaider.de> References: <6ec178fe8e94365e2c747a10bb6c551273c66c4c.camel@klix.ch> <0b2c01dae8e6$276a4910$763edb30$@christianhaider.de> Message-ID: <74bafd7aa07460bee02879b54d1e906c@whidbey.com> On 2024-08-07 09:23, Christian Haider via Cuis-dev wrote: > No meeting today? Must be August break. I waited for 15 minutes but no moderator. Back on 4 September ? -KenD From juan at cuis.st Wed Aug 7 12:39:25 2024 From: juan at cuis.st (Juan Vuletich) Date: Wed, 07 Aug 2024 16:39:25 -0300 Subject: [Cuis-dev] Unavailable SUnit TestResource stops test runner In-Reply-To: References: Message-ID: <66B3CD6D.90609@cuis.st> On 8/6/2024 11:43 AM, Jon Raiford via Cuis-dev wrote: > > I have a question for the SUnit experts out there. Have a look at this > simple test case that demonstrates an unavailable test resource. I > don?t understand why an unavailable test resource causes the test > runner itself to stop. Wouldn?t it be more correct to flag all test > cases that rely on it as failed instead? Ideally we should be able to > run automated tests without having to worry about this stopping the > testing framework, > > Thanks, > jon > I agree. I think an unavailable test resource is quite like a test failure, or an error (DNU for instance). These don't stop the test run, and they are counted for the suite result. Does anybody have a good reason to open a debugger? Thanks, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Wed Aug 7 12:57:00 2024 From: juan at cuis.st (Juan Vuletich) Date: Wed, 07 Aug 2024 16:57:00 -0300 Subject: [Cuis-dev] LayoutMorph color In-Reply-To: References: <353307737.51610477.1722793984840.JavaMail.root@zimbra87-e15.priv.proxad.net> Message-ID: <66B3D18C.6030301@cuis.st> On 8/4/2024 5:13 PM, Mark Volkmann via Cuis-dev wrote: > When I run the code in the debugger I see this in the class method > "new" of LayoutMorph: > > new > ^self newRow color: `(Color red alpha: 0.2)` > > So that explains why the color is a shade of pink. It sends the > message `#color:` to the instance AFTER sending the message `#newRow`. > The `newRow` method calls `initialize` which I override to also send > the message `#color` with my preferred color. > So my color gets replaced by pink due to the order of the calls. Yes. Not helpful, and annoying. Just pushed an update to remove that. > Now I need to find a place other than `initialize` to set the color > AFTER `new` is called. > I suppose one option is to override the `drawOn:` method like this: > > drawOn: aCanvas > self color: Color green. > super drawOn: aCanvas. > > Is that what you recommend? No, just use the update I just pushed. Thanks, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Wed Aug 7 13:08:31 2024 From: juan at cuis.st (Juan Vuletich) Date: Wed, 07 Aug 2024 17:08:31 -0300 Subject: [Cuis-dev] Space is low In-Reply-To: References: <1b5f7119-478a-4ee2-8db7-029e23f790b3@smallinteger.com> <7d0568f9-b16d-4724-a7a2-f0af0028562c@smallinteger.com> <17f2edd8-7890-4ada-9bad-0ec71908ccdf@smallinteger.com> <66980F3D.6090804@cuis.st> <31BAF037-4ED8-4EF1-9CD8-45E689078F16@gmail.com> Message-ID: <66B3D43F.70409@cuis.st> Hi Folks, Yesterday Jon Raiford saved an image that did something similar to what you Mark describe when starting it, moving it to a 5k display, and setting it full screen. We spent several hours debugging together. The result is updates #6569 and #6570, pushed today to GitHub. These updates do fix the issue as experienced by Jon. I'm pretty confident they'd fix what you Mark saw too. Thank you Jon for finding a case we could reproduce, and for debugging it together! Cheers, On 7/25/2024 10:38 AM, Mark Volkmann via Cuis-dev wrote: > It finally happened again. I have attached two screenshots, one > showing the exception and one showing Transcript output that Juan > requested. > > On Thu, Jul 18, 2024 at 9:08?AM Mark Volkmann > > wrote: > > The "Space is low" issue hasn't repeated itself for me in the past > couple of days, but I'll report back if it does happen again. I > did pull down the latest updates to Cuis a couple of days ago, so > I suppose it's possible there was a recent change that fixed this. > > On Thu, Jul 18, 2024 at 2:48?AM Barry Perryman > > wrote: > > What happens when you minimise cuis before letting it go to sleep? > > I'm asking because this is what happens on my Mac - M2 Mini > running Sonoma with LG 4K screen. > > I usually run Cuis as a window - so not full screen. When the > system goes to sleep, or the display sleeps, it quite often, > although not always, will resize the window to a smaller size. > Cuis isn't the only application that this happens to; citrix > client will also have the same issue, again not every time, > even though that is run as full screen. I've always figured > this is some mac sleep quirk that I have to live with. > > I haven't had the issue occur when I minimise the cuis window > - although I have had the icon on the dock look like it's been > resized - so instead of a 128x128 icon it's shrunk to say a > 80x60 icon (guess). > > Next time few times it happens I'll grab the size because now > I think about it I'm fairly sure the resize looks to be about > the same size every time. > > I've not reported this before because I've never been able to > consistently reproduce it. > > Barry > > >> On 18 Jul 2024, at 01:16, Mark Volkmann via Cuis-dev >> > wrote: >> >> A sleep of the Mac was involved. >> I didn't move the window myself after it woke up, but I do >> have it on a second monitor, so when it wakes up I suppose >> macOS "moves it". >> My Mac has slept several times today and did not result in a >> low memory exception on waking. >> I inserted the logging code that Juan requested. >> Perhap it will happen again tomorrow morning. I'll report >> back if it does. >> >> On Wed, Jul 17, 2024 at 2:02?PM Nicol?s Papagna Maldonado via >> Cuis-dev > > wrote: >> >> Just thinking out loud here. >> >> Based on what Juan mentioned, did you move the Cuis >> window between monitors (assuming that triggers a resize)? >> >> >> On Wed, Jul 17, 2024 at 3:45?PM Andres Valloud via >> Cuis-dev > > wrote: >> >> Did the machine (partially) go to sleep in those 2 >> hours? Does the >> problem manifest when the machine transitions between >> sleep and awake? >> >> On 7/17/24 11:36, Juan Vuletich via Cuis-dev wrote: >> > This is not normal at all. >> > >> > The allocation that shows in the walkback you >> posted happens at the >> > start of #mainLoop. This method is only called when >> the Morphic system >> > needs to be reinitialized, usually because the main >> Cuis window was >> > resized and a new Canvas needs to be created. It >> should not happen if >> > you just let the machine idle for a couple of >> hours. And it is not >> > possible to know what's going on without further >> information. So, please: >> > >> > - Keep the Transcript open and visible >> > - Add this line at the start of >> #spawnNewMorphicProcessFor:, after the >> > temp declaration. >> > thisContext printStack: 10. >> > >> > #spawnNewMorphicProcessFor: should only be called >> when the main Cuis >> > window is resized. So keep the Transcript visible >> and see if a stack >> > trace gets printed even if you're not resizing the >> Display. If this >> > happens, please post the result. >> > >> > Thanks, >> > >> > On 7/16/2024 10:44 PM, Mark Volkmann via Cuis-dev >> wrote: >> >> See my replies inline below. Could this be related >> to the fact that I >> >> have the tiger SVG displayed on the desktop with this? >> >> >> >> SVGMainMorph exampleTiger openInWorld. >> >> >> >> On Tue, Jul 16, 2024 at 8:29?PM Andres Valloud via >> Cuis-dev >> >> > >> > >> wrote: >> >> >> >> And, what are the arguments to setExtent:depth:? >> >> >> >> >> >> extent: 3456.0 at 1440.0 >> >> bitsPerPixel: 32 >> >> >> >> On 7/16/24 18:27, Andres Valloud via Cuis-dev >> wrote: >> >> > Interesting. What's the argument to basicNew:? >> >> >> >> >> >> sizeRequested is 4976640 >> >> >> >> > On 7/16/24 18:25, Mark Volkmann via Cuis-dev wrote: >> >> >> Here's a screenshot of the stack trace. >> >> >> >> >> >> On Tue, Jul 16, 2024 at 8:19?PM Andres Valloud >> via Cuis-dev >> >> >> > >> > > >> >> > >> > >>> >> >> wrote: >> >> >> >> >> >> No, that's not normal. Can you paste the >> debugger's stack >> >> here? >> >> >> >> >> >> On 7/16/24 18:11, Mark Volkmann via >> Cuis-dev wrote: >> >> >> > Usually when I leave Cuis Smalltalk running >> and walk >> >> away from my >> >> >> > computer (macOS) for a couple of hours, when >> I come back >> >> there >> >> >> is a >> >> >> > Debugger window open with the message "Space >> is low". I >> >> can just >> >> >> close >> >> >> > it and keep working. Everything seems fine. >> Is this normal? >> >> >> > >> >> >> > -- >> >> >> > R. Mark Volkmann >> >> >> > Object Computing, Inc. >> >> >> > >> >> >> -- Cuis-dev mailing list >> >> >> Cuis-dev at lists.cuis.st >> >> > > >> >> > >> > >> >> >> >> https://lists.cuis.st/mailman/listinfo/cuis-dev >> >> >> >> >> > >> > >> >> >> >> >> >> >> >> >> >> >> >> -- >> >> >> R. Mark Volkmann >> >> >> Object Computing, Inc. >> >> >> >> >> -- >> >> Cuis-dev mailing list >> >> Cuis-dev at lists.cuis.st >> >> > > >> >> https://lists.cuis.st/mailman/listinfo/cuis-dev >> >> >> >> >> >> >> >> >> >> -- >> >> R. Mark Volkmann >> >> Object Computing, Inc. >> > >> > >> > -- >> > Juan Vuletich >> > cuis.st >> > github.com/jvuletich >> > researchgate.net/profile/Juan-Vuletich >> >> > independent.academia.edu/JuanVuletich >> >> > patents.justia.com/inventor/juan-manuel-vuletich >> >> > linkedin.com/in/juan-vuletich-75611b3 >> >> > twitter.com/JuanVuletich >> >> > >> > >> -- >> Cuis-dev mailing list >> Cuis-dev at lists.cuis.st >> https://lists.cuis.st/mailman/listinfo/cuis-dev >> >> >> >> -- >> >> Nicol?s Papagna >> -- >> Cuis-dev mailing list >> Cuis-dev at lists.cuis.st >> https://lists.cuis.st/mailman/listinfo/cuis-dev >> >> >> >> -- >> R. Mark Volkmann >> Object Computing, Inc. >> -- >> Cuis-dev mailing list >> Cuis-dev at lists.cuis.st >> https://lists.cuis.st/mailman/listinfo/cuis-dev > > > > -- > R. Mark Volkmann > Object Computing, Inc. > > > > -- > R. Mark Volkmann > Object Computing, Inc. -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From raiford at labware.com Wed Aug 7 14:00:09 2024 From: raiford at labware.com (Jon Raiford) Date: Wed, 7 Aug 2024 21:00:09 +0000 Subject: [Cuis-dev] Space is low In-Reply-To: <66B3D43F.70409@cuis.st> References: <1b5f7119-478a-4ee2-8db7-029e23f790b3@smallinteger.com> <7d0568f9-b16d-4724-a7a2-f0af0028562c@smallinteger.com> <17f2edd8-7890-4ada-9bad-0ec71908ccdf@smallinteger.com> <66980F3D.6090804@cuis.st> <31BAF037-4ED8-4EF1-9CD8-45E689078F16@gmail.com> <66B3D43F.70409@cuis.st> Message-ID: I?m not exactly sure how I got it into that state, but this may be related? I had saved the image while it was full screen on my 5K external monitor. I also had left the image running and the next time I woke the machine up and plugged in the monitors I found the image had hung. As Juan mentioned, if I opened the image, moved it to the 5K, and immediately set it to full screen then it would hang. I didn?t get the same space is low message, but what we tracked down was an allocation for the new screen that was failing. Jon From: Juan Vuletich Date: Wednesday, August 7, 2024 at 4:08?PM To: Discussion of Cuis Smalltalk Cc: Mark Volkmann , Jon Raiford Subject: Re: [Cuis-dev] Space is low Hi Folks, Yesterday Jon Raiford saved an image that did something similar to what you Mark describe when starting it, moving it to a 5k display, and setting it full screen. We spent several hours debugging together. The result is updates #6569 and #6570, pushed today to GitHub. These updates do fix the issue as experienced by Jon. I'm pretty confident they'd fix what you Mark saw too. Thank you Jon for finding a case we could reproduce, and for debugging it together! Cheers, On 7/25/2024 10:38 AM, Mark Volkmann via Cuis-dev wrote: It finally happened again. I have attached two screenshots, one showing the exception and one showing Transcript output that Juan requested. On Thu, Jul 18, 2024 at 9:08?AM Mark Volkmann > wrote: The "Space is low" issue hasn't repeated itself for me in the past couple of days, but I'll report back if it does happen again. I did pull down the latest updates to Cuis a couple of days ago, so I suppose it's possible there was a recent change that fixed this. On Thu, Jul 18, 2024 at 2:48?AM Barry Perryman > wrote: What happens when you minimise cuis before letting it go to sleep? I'm asking because this is what happens on my Mac - M2 Mini running Sonoma with LG 4K screen. I usually run Cuis as a window - so not full screen. When the system goes to sleep, or the display sleeps, it quite often, although not always, will resize the window to a smaller size. Cuis isn't the only application that this happens to; citrix client will also have the same issue, again not every time, even though that is run as full screen. I've always figured this is some mac sleep quirk that I have to live with. I haven't had the issue occur when I minimise the cuis window - although I have had the icon on the dock look like it's been resized - so instead of a 128x128 icon it's shrunk to say a 80x60 icon (guess). Next time few times it happens I'll grab the size because now I think about it I'm fairly sure the resize looks to be about the same size every time. I've not reported this before because I've never been able to consistently reproduce it. Barry On 18 Jul 2024, at 01:16, Mark Volkmann via Cuis-dev > wrote: A sleep of the Mac was involved. I didn't move the window myself after it woke up, but I do have it on a second monitor, so when it wakes up I suppose macOS "moves it". My Mac has slept several times today and did not result in a low memory exception on waking. I inserted the logging code that Juan requested. Perhap it will happen again tomorrow morning. I'll report back if it does. On Wed, Jul 17, 2024 at 2:02?PM Nicol?s Papagna Maldonado via Cuis-dev > wrote: Just thinking out loud here. Based on what Juan mentioned, did you move the Cuis window between monitors (assuming that triggers a resize)? On Wed, Jul 17, 2024 at 3:45?PM Andres Valloud via Cuis-dev > wrote: Did the machine (partially) go to sleep in those 2 hours? Does the problem manifest when the machine transitions between sleep and awake? On 7/17/24 11:36, Juan Vuletich via Cuis-dev wrote: > This is not normal at all. > > The allocation that shows in the walkback you posted happens at the > start of #mainLoop. This method is only called when the Morphic system > needs to be reinitialized, usually because the main Cuis window was > resized and a new Canvas needs to be created. It should not happen if > you just let the machine idle for a couple of hours. And it is not > possible to know what's going on without further information. So, please: > > - Keep the Transcript open and visible > - Add this line at the start of #spawnNewMorphicProcessFor:, after the > temp declaration. > thisContext printStack: 10. > > #spawnNewMorphicProcessFor: should only be called when the main Cuis > window is resized. So keep the Transcript visible and see if a stack > trace gets printed even if you're not resizing the Display. If this > happens, please post the result. > > Thanks, > > On 7/16/2024 10:44 PM, Mark Volkmann via Cuis-dev wrote: >> See my replies inline below. Could this be related to the fact that I >> have the tiger SVG displayed on the desktop with this? >> >> SVGMainMorph exampleTiger openInWorld. >> >> On Tue, Jul 16, 2024 at 8:29?PM Andres Valloud via Cuis-dev >> >> wrote: >> >> And, what are the arguments to setExtent:depth:? >> >> >> extent: 3456.0 at 1440.0 >> bitsPerPixel: 32 >> >> On 7/16/24 18:27, Andres Valloud via Cuis-dev wrote: >> > Interesting. What's the argument to basicNew:? >> >> >> sizeRequested is 4976640 >> >> > On 7/16/24 18:25, Mark Volkmann via Cuis-dev wrote: >> >> Here's a screenshot of the stack trace. >> >> >> >> On Tue, Jul 16, 2024 at 8:19?PM Andres Valloud via Cuis-dev >> >> > >> >>> >> wrote: >> >> >> >> No, that's not normal. Can you paste the debugger's stack >> here? >> >> >> >> On 7/16/24 18:11, Mark Volkmann via Cuis-dev wrote: >> >> > Usually when I leave Cuis Smalltalk running and walk >> away from my >> >> > computer (macOS) for a couple of hours, when I come back >> there >> >> is a >> >> > Debugger window open with the message "Space is low". I >> can just >> >> close >> >> > it and keep working. Everything seems fine. Is this normal? >> >> > >> >> > -- >> >> > R. Mark Volkmann >> >> > Object Computing, Inc. >> >> > >> >> -- Cuis-dev mailing list >> >> Cuis-dev at lists.cuis.st > >> >> >> >> https://lists.cuis.st/mailman/listinfo/cuis-dev >> > >> >> >> >> >> >> >> >> >> >> >> >> -- >> >> R. Mark Volkmann >> >> Object Computing, Inc. >> >> >> -- >> Cuis-dev mailing list >> Cuis-dev at lists.cuis.st > >> https://lists.cuis.st/mailman/listinfo/cuis-dev >> > >> >> >> >> -- >> R. Mark Volkmann >> Object Computing, Inc. > > > -- > Juan Vuletich > cuis.st > github.com/jvuletich > researchgate.net/profile/Juan-Vuletich > independent.academia.edu/JuanVuletich > patents.justia.com/inventor/juan-manuel-vuletich > linkedin.com/in/juan-vuletich-75611b3 > twitter.com/JuanVuletich > > -- Cuis-dev mailing list Cuis-dev at lists.cuis.st https://lists.cuis.st/mailman/listinfo/cuis-dev -- Nicol?s Papagna -- Cuis-dev mailing list Cuis-dev at lists.cuis.st https://lists.cuis.st/mailman/listinfo/cuis-dev -- R. Mark Volkmann Object Computing, Inc. -- Cuis-dev mailing list Cuis-dev at lists.cuis.st https://lists.cuis.st/mailman/listinfo/cuis-dev -- R. Mark Volkmann Object Computing, Inc. -- R. Mark Volkmann Object Computing, Inc. -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Wed Aug 7 16:42:28 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Wed, 7 Aug 2024 18:42:28 -0500 Subject: [Cuis-dev] LayoutMorph color In-Reply-To: <66B3D18C.6030301@cuis.st> References: <353307737.51610477.1722793984840.JavaMail.root@zimbra87-e15.priv.proxad.net> <66B3D18C.6030301@cuis.st> Message-ID: Thanks so much for this fix! I have a related question. I have a class that is a subclass of LayoutMorph. Where is the best place to configure the direction to be #vertical? My initialize instance methods creates and adds a bunch of submorphs. I added this immediately after "super initialize" in my initialize method: self direction: #vertical. I also tried adding this: self beColumn. I execute this in a Workspace: TodoApp new openAtCursor. But the direction used is still #horizontal, so my change to the direction didn't take effect for some reason. On Wed, Aug 7, 2024 at 2:57?PM Juan Vuletich wrote: > On 8/4/2024 5:13 PM, Mark Volkmann via Cuis-dev wrote: > > When I run the code in the debugger I see this in the class method "new" > of LayoutMorph: > > new > ^self newRow color: `(Color red alpha: 0.2)` > > So that explains why the color is a shade of pink. It sends the message > `#color:` to the instance AFTER sending the message `#newRow`. > The `newRow` method calls `initialize` which I override to also send the > message `#color` with my preferred color. > So my color gets replaced by pink due to the order of the calls. > > > Yes. Not helpful, and annoying. Just pushed an update to remove that. > > Now I need to find a place other than `initialize` to set the color AFTER > `new` is called. > I suppose one option is to override the `drawOn:` method like this: > > drawOn: aCanvas > self color: Color green. > super drawOn: aCanvas. > > Is that what you recommend? > > > No, just use the update I just pushed. > > Thanks, > > -- > Juan Vuletichcuis.stgithub.com/jvuletichresearchgate.net/profile/Juan-Vuletichindependent.academia.edu/JuanVuletichpatents.justia.com/inventor/juan-manuel-vuletichlinkedin.com/in/juan-vuletich-75611b3twitter.com/JuanVuletich > > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Wed Aug 7 16:46:11 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Wed, 7 Aug 2024 18:46:11 -0500 Subject: [Cuis-dev] Space is low In-Reply-To: References: <1b5f7119-478a-4ee2-8db7-029e23f790b3@smallinteger.com> <7d0568f9-b16d-4724-a7a2-f0af0028562c@smallinteger.com> <17f2edd8-7890-4ada-9bad-0ec71908ccdf@smallinteger.com> <66980F3D.6090804@cuis.st> <31BAF037-4ED8-4EF1-9CD8-45E689078F16@gmail.com> <66B3D43F.70409@cuis.st> Message-ID: Thanks so much for working on this issue! I do the same thing as Jon. I launch the image on my laptop and it always opens on that screen. Then I move it to my 49" monitor and make it full-screen. I do all my Cuis work there and save the image there. I'm using the updated image now. I'll report back if I see the issue again. Hopefully it's fixed now. On Wed, Aug 7, 2024 at 4:00?PM Jon Raiford wrote: > I?m not exactly sure how I got it into that state, but this may be > related? I had saved the image while it was full screen on my 5K external > monitor. I also had left the image running and the next time I woke the > machine up and plugged in the monitors I found the image had hung. As Juan > mentioned, if I opened the image, moved it to the 5K, and immediately set > it to full screen then it would hang. I didn?t get the same space is low > message, but what we tracked down was an allocation for the new screen that > was failing. > > > > Jon > > > > *From: *Juan Vuletich > *Date: *Wednesday, August 7, 2024 at 4:08?PM > *To: *Discussion of Cuis Smalltalk > *Cc: *Mark Volkmann , Jon Raiford < > raiford at labware.com> > *Subject: *Re: [Cuis-dev] Space is low > > Hi Folks, > > Yesterday Jon Raiford saved an image that did something similar to what > you Mark describe when starting it, moving it to a 5k display, and setting > it full screen. We spent several hours debugging together. The result is > updates #6569 and #6570, pushed today to GitHub. These updates do fix the > issue as experienced by Jon. I'm pretty confident they'd fix what you Mark > saw too. > > Thank you Jon for finding a case we could reproduce, and for debugging it > together! > > Cheers, > > On 7/25/2024 10:38 AM, Mark Volkmann via Cuis-dev wrote: > > It finally happened again. I have attached two screenshots, one showing > the exception and one showing Transcript output that Juan requested. > > > > On Thu, Jul 18, 2024 at 9:08?AM Mark Volkmann > wrote: > > The "Space is low" issue hasn't repeated itself for me in the past couple > of days, but I'll report back if it does happen again. I did pull down the > latest updates to Cuis a couple of days ago, so I suppose it's possible > there was a recent change that fixed this. > > > > On Thu, Jul 18, 2024 at 2:48?AM Barry Perryman > wrote: > > What happens when you minimise cuis before letting it go to sleep? > > > > I'm asking because this is what happens on my Mac - M2 Mini running Sonoma > with LG 4K screen. > > > > I usually run Cuis as a window - so not full screen. When the system goes > to sleep, or the display sleeps, it quite often, although not always, will > resize the window to a smaller size. Cuis isn't the only application that > this happens to; citrix client will also have the same issue, again not > every time, even though that is run as full screen. I've always figured > this is some mac sleep quirk that I have to live with. > > > > I haven't had the issue occur when I minimise the cuis window - although I > have had the icon on the dock look like it's been resized - so instead of a > 128x128 icon it's shrunk to say a 80x60 icon (guess). > > > > Next time few times it happens I'll grab the size because now I think > about it I'm fairly sure the resize looks to be about the same size every > time. > > > > I've not reported this before because I've never been able to consistently > reproduce it. > > > > Barry > > > > > > On 18 Jul 2024, at 01:16, Mark Volkmann via Cuis-dev < > cuis-dev at lists.cuis.st> wrote: > > > > A sleep of the Mac was involved. > > I didn't move the window myself after it woke up, but I do have it on a > second monitor, so when it wakes up I suppose macOS "moves it". > > My Mac has slept several times today and did not result in a low memory > exception on waking. > > I inserted the logging code that Juan requested. > > Perhap it will happen again tomorrow morning. I'll report back if it does. > > > > On Wed, Jul 17, 2024 at 2:02?PM Nicol?s Papagna Maldonado via Cuis-dev < > cuis-dev at lists.cuis.st> wrote: > > Just thinking out loud here. > > > > Based on what Juan mentioned, did you move the Cuis window between > monitors (assuming that triggers a resize)? > > > > > > On Wed, Jul 17, 2024 at 3:45?PM Andres Valloud via Cuis-dev < > cuis-dev at lists.cuis.st> wrote: > > Did the machine (partially) go to sleep in those 2 hours? Does the > problem manifest when the machine transitions between sleep and awake? > > On 7/17/24 11:36, Juan Vuletich via Cuis-dev wrote: > > This is not normal at all. > > > > The allocation that shows in the walkback you posted happens at the > > start of #mainLoop. This method is only called when the Morphic system > > needs to be reinitialized, usually because the main Cuis window was > > resized and a new Canvas needs to be created. It should not happen if > > you just let the machine idle for a couple of hours. And it is not > > possible to know what's going on without further information. So, please: > > > > - Keep the Transcript open and visible > > - Add this line at the start of #spawnNewMorphicProcessFor:, after the > > temp declaration. > > thisContext printStack: 10. > > > > #spawnNewMorphicProcessFor: should only be called when the main Cuis > > window is resized. So keep the Transcript visible and see if a stack > > trace gets printed even if you're not resizing the Display. If this > > happens, please post the result. > > > > Thanks, > > > > On 7/16/2024 10:44 PM, Mark Volkmann via Cuis-dev wrote: > >> See my replies inline below. Could this be related to the fact that I > >> have the tiger SVG displayed on the desktop with this? > >> > >> SVGMainMorph exampleTiger openInWorld. > >> > >> On Tue, Jul 16, 2024 at 8:29?PM Andres Valloud via Cuis-dev > >> > wrote: > >> > >> And, what are the arguments to setExtent:depth:? > >> > >> > >> extent: 3456.0 at 1440.0 > >> bitsPerPixel: 32 > >> > >> On 7/16/24 18:27, Andres Valloud via Cuis-dev wrote: > >> > Interesting. What's the argument to basicNew:? > >> > >> > >> sizeRequested is 4976640 > >> > >> > On 7/16/24 18:25, Mark Volkmann via Cuis-dev wrote: > >> >> Here's a screenshot of the stack trace. > >> >> > >> >> On Tue, Jul 16, 2024 at 8:19?PM Andres Valloud via Cuis-dev > >> >> > >> >> > >> wrote: > >> >> > >> >> No, that's not normal. Can you paste the debugger's stack > >> here? > >> >> > >> >> On 7/16/24 18:11, Mark Volkmann via Cuis-dev wrote: > >> >> > Usually when I leave Cuis Smalltalk running and walk > >> away from my > >> >> > computer (macOS) for a couple of hours, when I come back > >> there > >> >> is a > >> >> > Debugger window open with the message "Space is low". I > >> can just > >> >> close > >> >> > it and keep working. Everything seems fine. Is this > normal? > >> >> > > >> >> > -- > >> >> > R. Mark Volkmann > >> >> > Object Computing, Inc. > >> >> > > >> >> -- Cuis-dev mailing list > >> >> Cuis-dev at lists.cuis.st > >> > > >> >> https://lists.cuis.st/mailman/listinfo/cuis-dev > >> > >> >> >> > > >> >> > >> >> > >> >> > >> >> -- > >> >> R. Mark Volkmann > >> >> Object Computing, Inc. > >> >> > >> -- > >> Cuis-dev mailing list > >> Cuis-dev at lists.cuis.st > >> https://lists.cuis.st/mailman/listinfo/cuis-dev > >> > >> > >> > >> > >> -- > >> R. Mark Volkmann > >> Object Computing, Inc. > > > > > > -- > > Juan Vuletich > > cuis.st > > github.com/jvuletich > > researchgate.net/profile/Juan-Vuletich > > independent.academia.edu/JuanVuletich > > patents.justia.com/inventor/juan-manuel-vuletich > > linkedin.com/in/juan-vuletich-75611b3 > > twitter.com/JuanVuletich > > > > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > > > > > -- > > > Nicol?s Papagna > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > > > > > -- > > R. Mark Volkmann > > Object Computing, Inc. > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > > > > > > > -- > > R. Mark Volkmann > > Object Computing, Inc. > > > > > -- > > R. Mark Volkmann > > Object Computing, Inc. > > > > > -- > > Juan Vuletich > > cuis.st > > github.com/jvuletich > > researchgate.net/profile/Juan-Vuletich > > independent.academia.edu/JuanVuletich > > patents.justia.com/inventor/juan-manuel-vuletich > > linkedin.com/in/juan-vuletich-75611b3 > > twitter.com/JuanVuletich > > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hernan.wilkinson at 10pines.com Wed Aug 7 16:51:09 2024 From: hernan.wilkinson at 10pines.com (=?UTF-8?Q?Hern=C3=A1n_Wilkinson?=) Date: Wed, 7 Aug 2024 20:51:09 -0300 Subject: [Cuis-dev] Unavailable SUnit TestResource stops test runner In-Reply-To: <66B3CD6D.90609@cuis.st> References: <66B3CD6D.90609@cuis.st> Message-ID: Hi, I agree, it is better to do that. Attached is a change set that implements that behavior. BTW, there was an error when a resource was not available because it was trying to debug an UnhandledError without an unhandled exception. I fixed that by making the not availability of a resource to fail and not to error. I'll send another change set soon because #debugAsFailureIfCanNot: does not make sense anymore because quick methods can be debugged. Cheers! Hernan. On Wed, Aug 7, 2024 at 4:39?PM Juan Vuletich via Cuis-dev < cuis-dev at lists.cuis.st> wrote: > On 8/6/2024 11:43 AM, Jon Raiford via Cuis-dev wrote: > > I have a question for the SUnit experts out there. Have a look at this > simple test case that demonstrates an unavailable test resource. I don?t > understand why an unavailable test resource causes the test runner itself > to stop. Wouldn?t it be more correct to flag all test cases that rely on it > as failed instead? Ideally we should be able to run automated tests without > having to worry about this stopping the testing framework, > > > > Thanks, > jon > > > I agree. I think an unavailable test resource is quite like a test > failure, or an error (DNU for instance). These don't stop the test run, and > they are counted for the suite result. > > Does anybody have a good reason to open a debugger? > > Thanks, > > -- > Juan Vuletichcuis.stgithub.com/jvuletichresearchgate.net/profile/Juan-Vuletichindependent.academia.edu/JuanVuletichpatents.justia.com/inventor/juan-manuel-vuletichlinkedin.com/in/juan-vuletich-75611b3twitter.com/JuanVuletich > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -- *Hern?n WilkinsonAgile Software Development, Teaching & Coaching* *Phone: +54-011*-4893-2057 *Twitter: @HernanWilkinson* *site: http://www.10Pines.com * Address: Alem 896, Floor 6, Buenos Aires, Argentina -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 6428-FailWhenResourceNotAvailable-HernanWilkinson-2024Aug07-20h39m-HAW.001.cs.st Type: application/octet-stream Size: 863 bytes Desc: not available URL: From ken.dickey at whidbey.com Wed Aug 7 19:16:55 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Wed, 07 Aug 2024 19:16:55 -0700 Subject: [Cuis-dev] LayoutMorph newColumn In-Reply-To: References: <353307737.51610477.1722793984840.JavaMail.root@zimbra87-e15.priv.proxad.net> <66B3D18C.6030301@cuis.st> Message-ID: <3201c50d62bc08af077348f6dca376ae@whidbey.com> On 2024-08-07 16:42, Mark Volkmann via Cuis-dev wrote: > I have a related question. I have a class that is a subclass of > LayoutMorph. > Where is the best place to configure the direction to be #vertical? Why does LayoutMorph newColumn not work for you? What does stepping through with the debugger suggest? -KenD From r.mark.volkmann at gmail.com Thu Aug 8 04:06:52 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Thu, 8 Aug 2024 06:06:52 -0500 Subject: [Cuis-dev] LayoutMorph newColumn In-Reply-To: <3201c50d62bc08af077348f6dca376ae@whidbey.com> References: <353307737.51610477.1722793984840.JavaMail.root@zimbra87-e15.priv.proxad.net> <66B3D18C.6030301@cuis.st> <3201c50d62bc08af077348f6dca376ae@whidbey.com> Message-ID: On Wed, Aug 7, 2024 at 9:17?PM wrote: > On 2024-08-07 16:42, Mark Volkmann via Cuis-dev wrote: > > > I have a related question. I have a class that is a subclass of > > LayoutMorph. > > Where is the best place to configure the direction to be #vertical? > > Why does > LayoutMorph newColumn > not work for you? > My class is a subclass of LayoutMorph, so I'm not sending a #new* message to LayoutMorph directly. I'm sending #new to my own class. What does stepping through with the debugger suggest? > I see what's happening now. "LayoutMorph new" (invoked by sending #new to my subclass) sends #newRow which sends #initialize AND THEN #beRow. So changes I make to direction in my subclass initialize method get overridden by beRow. This seems similar to the color: issue I had. I can fix this by overriding new in my subclass like this: new ^ super new beColumn But the width of my subclass instance gets calculated based on laying out the submorphs as a row and does not get adjusted down when it switches to a column. See the attached screenshot. What can I do to force it to recalculate the width? I tried the following in my new method, but this didn't fix it: new | instance | instance := super new beColumn. instance refreshExtent. instance layoutSubmorphs. instance layoutNeeded: true. ^ instance Side note: I see that the direction: method in LayoutMorph contains the following: self flag: #jmvVer. "Move to category #accessing" Is there a reason not to do that now and remove that line? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot 2024-08-08 at 5.58.00?AM.png Type: image/png Size: 15321 bytes Desc: not available URL: From raiford at labware.com Thu Aug 8 06:25:35 2024 From: raiford at labware.com (Jon Raiford) Date: Thu, 8 Aug 2024 13:25:35 +0000 Subject: [Cuis-dev] Unavailable SUnit TestResource stops test runner In-Reply-To: References: <66B3CD6D.90609@cuis.st> Message-ID: Hi Hern?n, Thank you! I will give this a try. Also, good catch on the exception problem. I forgot that I worked around this by changing the reference to UnhandledException back to Error, which is how other SUnit implementations seem to work. I agree that UnhandledException is more appropriate so it is nice that you took care of that. Jon From: Hern?n Wilkinson Date: Wednesday, August 7, 2024 at 7:51?PM To: Discussion of Cuis Smalltalk Cc: Juan Vuletich , Jon Raiford Subject: Re: [Cuis-dev] Unavailable SUnit TestResource stops test runner Hi, I agree, it is better to do that. Attached is a change set that implements that behavior. BTW, there was an error when a resource was not available because it was trying to debug an UnhandledError without an unhandled exception. I fixed that by making the not availability of a resource to fail and not to error. I'll send another change set soon because #debugAsFailureIfCanNot: does not make sense anymore because quick methods can be debugged. Cheers! Hernan. On Wed, Aug 7, 2024 at 4:39?PM Juan Vuletich via Cuis-dev > wrote: On 8/6/2024 11:43 AM, Jon Raiford via Cuis-dev wrote: I have a question for the SUnit experts out there. Have a look at this simple test case that demonstrates an unavailable test resource. I don?t understand why an unavailable test resource causes the test runner itself to stop. Wouldn?t it be more correct to flag all test cases that rely on it as failed instead? Ideally we should be able to run automated tests without having to worry about this stopping the testing framework, Thanks, jon I agree. I think an unavailable test resource is quite like a test failure, or an error (DNU for instance). These don't stop the test run, and they are counted for the suite result. Does anybody have a good reason to open a debugger? Thanks, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -- Cuis-dev mailing list Cuis-dev at lists.cuis.st https://lists.cuis.st/mailman/listinfo/cuis-dev -- Hern?n Wilkinson Agile Software Development, Teaching & Coaching Phone: +54-011-4893-2057 Twitter: @HernanWilkinson site: http://www.10Pines.com Address: Alem 896, Floor 6, Buenos Aires, Argentina -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Thu Aug 8 06:35:21 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Thu, 8 Aug 2024 08:35:21 -0500 Subject: [Cuis-dev] possible TextEntryMorph bug Message-ID: Enter this in a Workspace and "Do it": TextEntryMorph new openInWorld Then click in it and type a character. I get the attached error. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot 2024-08-08 at 8.32.53?AM.png Type: image/png Size: 106311 bytes Desc: not available URL: From raiford at labware.com Thu Aug 8 06:39:04 2024 From: raiford at labware.com (Jon Raiford) Date: Thu, 8 Aug 2024 13:39:04 +0000 Subject: [Cuis-dev] Unavailable SUnit TestResource stops test runner In-Reply-To: References: <66B3CD6D.90609@cuis.st> Message-ID: Hi Hern?n, I can confirm that this patch works great for me. Thank you again. (Fwiw, I meant UnhandledError before, not UnhandledException ? in SUnitNameResolver class>>errorObject) Jon From: Cuis-dev on behalf of Jon Raiford via Cuis-dev Date: Thursday, August 8, 2024 at 9:26?AM To: Hern?n Wilkinson , Discussion of Cuis Smalltalk Cc: Jon Raiford , Juan Vuletich Subject: Re: [Cuis-dev] Unavailable SUnit TestResource stops test runner Hi Hern?n, Thank you! I will give this a try. Also, good catch on the exception problem. I forgot that I worked around this by changing the reference to UnhandledException back to Error, which is how other SUnit implementations seem to work. I agree that UnhandledException is more appropriate so it is nice that you took care of that. Jon From: Hern?n Wilkinson Date: Wednesday, August 7, 2024 at 7:51?PM To: Discussion of Cuis Smalltalk Cc: Juan Vuletich , Jon Raiford Subject: Re: [Cuis-dev] Unavailable SUnit TestResource stops test runner Hi, I agree, it is better to do that. Attached is a change set that implements that behavior. BTW, there was an error when a resource was not available because it was trying to debug an UnhandledError without an unhandled exception. I fixed that by making the not availability of a resource to fail and not to error. I'll send another change set soon because #debugAsFailureIfCanNot: does not make sense anymore because quick methods can be debugged. Cheers! Hernan. On Wed, Aug 7, 2024 at 4:39?PM Juan Vuletich via Cuis-dev > wrote: On 8/6/2024 11:43 AM, Jon Raiford via Cuis-dev wrote: I have a question for the SUnit experts out there. Have a look at this simple test case that demonstrates an unavailable test resource. I don?t understand why an unavailable test resource causes the test runner itself to stop. Wouldn?t it be more correct to flag all test cases that rely on it as failed instead? Ideally we should be able to run automated tests without having to worry about this stopping the testing framework, Thanks, jon I agree. I think an unavailable test resource is quite like a test failure, or an error (DNU for instance). These don't stop the test run, and they are counted for the suite result. Does anybody have a good reason to open a debugger? Thanks, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -- Cuis-dev mailing list Cuis-dev at lists.cuis.st https://lists.cuis.st/mailman/listinfo/cuis-dev -- Hern?n Wilkinson Agile Software Development, Teaching & Coaching Phone: +54-011-4893-2057 Twitter: @HernanWilkinson site: http://www.10Pines.com Address: Alem 896, Floor 6, Buenos Aires, Argentina -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Thu Aug 8 06:43:37 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Thu, 08 Aug 2024 06:43:37 -0700 Subject: [Cuis-dev] LayoutMorph newColumn In-Reply-To: References: <353307737.51610477.1722793984840.JavaMail.root@zimbra87-e15.priv.proxad.net> <66B3D18C.6030301@cuis.st> <3201c50d62bc08af077348f6dca376ae@whidbey.com> Message-ID: <06ab0137e229d74a89501b12f478c1bd@whidbey.com> On 2024-08-08 04:06, Mark Volkmann via Cuis-dev wrote: > On Wed, Aug 7, 2024 at 9:17?PM wrote: > >> On 2024-08-07 16:42, Mark Volkmann via Cuis-dev wrote: >> >>> I have a related question. I have a class that is a subclass of >>> LayoutMorph. >>> Where is the best place to configure the direction to be #vertical? >> >> Why does >> LayoutMorph newColumn >> not work for you? > > My class is a subclass of LayoutMorph, so I'm not sending a #new* > message to LayoutMorph directly. I'm sending #new to my own class. So don't send #new to your subclass, send #newColumn. Why are you not asking for what you want? HTH, -KenD -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot 2024-08-08 at 5.58.00?AM.png Type: image/png Size: 15321 bytes Desc: not available URL: From ken.dickey at whidbey.com Thu Aug 8 06:59:52 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Thu, 08 Aug 2024 06:59:52 -0700 Subject: [Cuis-dev] LayoutMorph newColumn In-Reply-To: <06ab0137e229d74a89501b12f478c1bd@whidbey.com> References: <353307737.51610477.1722793984840.JavaMail.root@zimbra87-e15.priv.proxad.net> <66B3D18C.6030301@cuis.st> <3201c50d62bc08af077348f6dca376ae@whidbey.com> <06ab0137e229d74a89501b12f478c1bd@whidbey.com> Message-ID: Mark, See if the attached does not fix your problem. Just open in FileList and #fileIn. On 2024-08-08 06:43, ken.dickey--- via Cuis-dev wrote: > So don't send #new to your subclass, send #newColumn. -------------- next part -------------- 'From Cuis7.1 [latest update: #6566] on 8 August 2024 at 6:55:45 am'! !LayoutMorph class methodsFor: 'instance creation' stamp: 'KenD 8/8/2024 06:52:13'! initializedInstance ^self newRow! ! !LayoutMorph class methodsFor: 'instance creation' stamp: 'KenD 8/8/2024 06:53:03'! new "Answer a row by default so the 'new morph' menu doesn't fail..." ^self error: 'Use LayoutMorph newRow or LayoutMorph newColumn'.! ! !LayoutMorph class methodsFor: 'instance creation' stamp: 'jmv 3/9/2011 13:53'! newColumn ^self basicNew initialize beColumn! ! !LayoutMorph class methodsFor: 'instance creation' stamp: 'jmv 3/9/2011 13:53'! newRow ^self basicNew initialize beRow! ! From ken.dickey at whidbey.com Thu Aug 8 07:02:47 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Thu, 08 Aug 2024 07:02:47 -0700 Subject: [Cuis-dev] possible TextEntryMorph bug In-Reply-To: References: Message-ID: On 2024-08-08 06:35, Mark Volkmann via Cuis-dev wrote: > TextEntryMorph new openInWorld > > Then click in it and type a character. > I get the attached error. Hmm.. works fine for me. Perhaps you have been bitten by code changes to current. cd Cuis-Smalltalk-Dev and ./pullAllRepos.sh then update changes in a fresh image and test again. Do you still see a problem? -KenD From hernan.wilkinson at 10pines.com Thu Aug 8 07:13:19 2024 From: hernan.wilkinson at 10pines.com (=?UTF-8?Q?Hern=C3=A1n_Wilkinson?=) Date: Thu, 8 Aug 2024 11:13:19 -0300 Subject: [Cuis-dev] Unavailable SUnit TestResource stops test runner In-Reply-To: References: <66B3CD6D.90609@cuis.st> Message-ID: Cool! Thank you for taking the time to try it :-) Juan is going to change the UnhandledError stuff, we talked about it today. Hernan. On Thu, Aug 8, 2024 at 10:39?AM Jon Raiford wrote: > Hi Hern?n, > > > > I can confirm that this patch works great for me. Thank you again. > > > > (Fwiw, I meant UnhandledError before, not UnhandledException ? in > SUnitNameResolver class>>errorObject) > > > > Jon > > > > *From: *Cuis-dev on behalf of Jon > Raiford via Cuis-dev > *Date: *Thursday, August 8, 2024 at 9:26?AM > *To: *Hern?n Wilkinson , Discussion of Cuis > Smalltalk > *Cc: *Jon Raiford , Juan Vuletich > *Subject: *Re: [Cuis-dev] Unavailable SUnit TestResource stops test runner > > Hi Hern?n, > > > > Thank you! I will give this a try. Also, good catch on the exception > problem. I forgot that I worked around this by changing the reference to > UnhandledException back to Error, which is how other SUnit implementations > seem to work. I agree that UnhandledException is more appropriate so it is > nice that you took care of that. > > > > Jon > > > > *From: *Hern?n Wilkinson > *Date: *Wednesday, August 7, 2024 at 7:51?PM > *To: *Discussion of Cuis Smalltalk > *Cc: *Juan Vuletich , Jon Raiford > *Subject: *Re: [Cuis-dev] Unavailable SUnit TestResource stops test runner > > Hi, > > I agree, it is better to do that. > > Attached is a change set that implements that behavior. > > BTW, there was an error when a resource was not available because it was > trying to debug an UnhandledError without an unhandled exception. I fixed > that by making the not availability of a resource to fail and not to error. > > > > I'll send another change set soon because #debugAsFailureIfCanNot: does > not make sense anymore because quick methods can be debugged. > > > > Cheers! > > Hernan. > > > > On Wed, Aug 7, 2024 at 4:39?PM Juan Vuletich via Cuis-dev < > cuis-dev at lists.cuis.st> wrote: > > On 8/6/2024 11:43 AM, Jon Raiford via Cuis-dev wrote: > > I have a question for the SUnit experts out there. Have a look at this > simple test case that demonstrates an unavailable test resource. I don?t > understand why an unavailable test resource causes the test runner itself > to stop. Wouldn?t it be more correct to flag all test cases that rely on it > as failed instead? Ideally we should be able to run automated tests without > having to worry about this stopping the testing framework, > > > > Thanks, > jon > > > I agree. I think an unavailable test resource is quite like a test > failure, or an error (DNU for instance). These don't stop the test run, and > they are counted for the suite result. > > Does anybody have a good reason to open a debugger? > > Thanks, > > -- > > Juan Vuletich > > cuis.st > > github.com/jvuletich > > researchgate.net/profile/Juan-Vuletich > > independent.academia.edu/JuanVuletich > > patents.justia.com/inventor/juan-manuel-vuletich > > linkedin.com/in/juan-vuletich-75611b3 > > twitter.com/JuanVuletich > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > > > > > -- > > *Hern?n Wilkinson* > *Agile Software Development, Teaching & Coaching* > > *Phone: +54-011*-4893-2057 > > *Twitter: @HernanWilkinson* > > *site: http://www.10Pines.com * > > Address: Alem 896, Floor 6, Buenos Aires, Argentina > -- *Hern?n WilkinsonAgile Software Development, Teaching & Coaching* *Phone: +54-011*-4893-2057 *Twitter: @HernanWilkinson* *site: http://www.10Pines.com * Address: Alem 896, Floor 6, Buenos Aires, Argentina -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Thu Aug 8 07:26:13 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Thu, 8 Aug 2024 09:26:13 -0500 Subject: [Cuis-dev] possible TextEntryMorph bug In-Reply-To: References: Message-ID: I do not see the problem when I start with a fresh image. I'll dig into what I might have changed in my image that broke it. On Thu, Aug 8, 2024 at 9:02?AM wrote: > On 2024-08-08 06:35, Mark Volkmann via Cuis-dev wrote: > > > TextEntryMorph new openInWorld > > > > Then click in it and type a character. > > I get the attached error. > > Hmm.. works fine for me. Perhaps you have been bitten by code changes > to current. > > cd Cuis-Smalltalk-Dev and ./pullAllRepos.sh then update changes in a > fresh image and test again. > > Do you still see a problem? > > -KenD > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ten at smallinteger.com Thu Aug 8 07:29:35 2024 From: ten at smallinteger.com (Andres Valloud) Date: Thu, 8 Aug 2024 07:29:35 -0700 Subject: [Cuis-dev] Unavailable SUnit TestResource stops test runner In-Reply-To: References: <66B3CD6D.90609@cuis.st> Message-ID: Correct --- *seem* to work. On 8/8/24 6:25 AM, Jon Raiford via Cuis-dev wrote: > I forgot that I worked around this by changing the reference to > UnhandledException back to Error, which is how other SUnit > implementations seem to work. From juan at cuis.st Thu Aug 8 11:20:27 2024 From: juan at cuis.st (Juan Vuletich) Date: Thu, 08 Aug 2024 15:20:27 -0300 Subject: [Cuis-dev] Unavailable SUnit TestResource stops test runner In-Reply-To: References: <66B3CD6D.90609@cuis.st> Message-ID: <66B50C6B.5000606@cuis.st> Thanks Folks. This is now integrated at GitHub. Cheers, On 8/8/2024 10:39 AM, Jon Raiford via Cuis-dev wrote: > > Hi Hern?n, > > I can confirm that this patch works great for me. Thank you again. > > (Fwiw, I meant UnhandledError before, not UnhandledException ? in > SUnitNameResolver class>>errorObject) > > Jon > > *From: *Cuis-dev on behalf of Jon > Raiford via Cuis-dev > *Date: *Thursday, August 8, 2024 at 9:26?AM > *To: *Hern?n Wilkinson , Discussion of > Cuis Smalltalk > *Cc: *Jon Raiford , Juan Vuletich > *Subject: *Re: [Cuis-dev] Unavailable SUnit TestResource stops test runner > > Hi Hern?n, > > Thank you! I will give this a try. Also, good catch on the exception > problem. I forgot that I worked around this by changing the reference > to UnhandledException back to Error, which is how other SUnit > implementations seem to work. I agree that UnhandledException is more > appropriate so it is nice that you took care of that. > > Jon > > *From: *Hern?n Wilkinson > *Date: *Wednesday, August 7, 2024 at 7:51?PM > *To: *Discussion of Cuis Smalltalk > *Cc: *Juan Vuletich , Jon Raiford > *Subject: *Re: [Cuis-dev] Unavailable SUnit TestResource stops test runner > > Hi, > > I agree, it is better to do that. > > Attached is a change set that implements that behavior. > > BTW, there was an error when a resource was not available because it > was trying to debug an UnhandledError without an unhandled exception. > I fixed that by making the not availability of a resource to fail and > not to error. > > I'll send another change set soon because #debugAsFailureIfCanNot: > does not make sense anymore because quick methods can be debugged. > > Cheers! > > Hernan. > > On Wed, Aug 7, 2024 at 4:39?PM Juan Vuletich via Cuis-dev > > wrote: > > On 8/6/2024 11:43 AM, Jon Raiford via Cuis-dev wrote: > > I have a question for the SUnit experts out there. Have a look > at this simple test case that demonstrates an unavailable test > resource. I don?t understand why an unavailable test resource > causes the test runner itself to stop. Wouldn?t it be more > correct to flag all test cases that rely on it as failed > instead? Ideally we should be able to run automated tests > without having to worry about this stopping the testing framework, > > Thanks, > jon > > > I agree. I think an unavailable test resource is quite like a test > failure, or an error (DNU for instance). These don't stop the test > run, and they are counted for the suite result. > > Does anybody have a good reason to open a debugger? > > Thanks, > > -- > > Juan Vuletich > > cuis.st > > github.com/jvuletich > > researchgate.net/profile/Juan-Vuletich > > independent.academia.edu/JuanVuletich > > patents.justia.com/inventor/juan-manuel-vuletich > > linkedin.com/in/juan-vuletich-75611b3 > > twitter.com/JuanVuletich > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > > > -- > > *Hern?n Wilkinson* > *Agile Software Development, Teaching & Coaching* > > *Phone: +54-011*-4893-2057 > > *Twitter: @HernanWilkinson* > > *site: http://www.10Pines.com * > > Address: Alem 896, Floor 6, Buenos Aires, Argentina > -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Thu Aug 8 11:22:06 2024 From: juan at cuis.st (Juan Vuletich) Date: Thu, 08 Aug 2024 15:22:06 -0300 Subject: [Cuis-dev] LayoutMorph newColumn In-Reply-To: References: <353307737.51610477.1722793984840.JavaMail.root@zimbra87-e15.priv.proxad.net> <66B3D18C.6030301@cuis.st> <3201c50d62bc08af077348f6dca376ae@whidbey.com> <06ab0137e229d74a89501b12f478c1bd@whidbey.com> Message-ID: <66B50CCE.7020909@cuis.st> On 8/8/2024 10:59 AM, ken.dickey--- via Cuis-dev wrote: > Mark, > > See if the attached does not fix your problem. Just open in FileList > and #fileIn. > > On 2024-08-08 06:43, ken.dickey--- via Cuis-dev wrote: > >> So don't send #new to your subclass, send #newColumn. Just integrated and pushed to GitHub. Thanks, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich From juan at cuis.st Thu Aug 8 12:00:54 2024 From: juan at cuis.st (Juan Vuletich) Date: Thu, 08 Aug 2024 16:00:54 -0300 Subject: [Cuis-dev] new YouTube video on Cuis Smalltalk In-Reply-To: References: <3a0584e16b495a4d3c9fff30b9e6668d@mail.msen.com> <6678A008.8000504@cuis.st> Message-ID: <66B515E6.30100@cuis.st> Hi Boris, On 8/5/2024 9:54 AM, Boris Shingarov via Cuis-dev wrote: >> The basic idea is to exploit the duality between 'functions and tables (or >> processes and memory). English has nouns which refer to "objects", and >> verbs which refer to "actors" and "relators". This is a Newtonian >> epistemology. Modern physics and philosophy tend towards the idea that >> both "objects" and "actors" are just different aspects of the notion of >> process. > After decades of re-reading and re-reading "Children of All Ages", this > paragraph never ceases to astound me, by how explicit it is about the > nonclassical character of Smalltalk. The 20th-century "New Science" ? > the physics of Einstein/Bohr/Heisenberg, the logic of Brouwer/G?del, etc > ? is *essential* to it: if we restrict ourselves to the "Newtonian > epistemology" (classical physics, classical logic, classical calculus), > then, (paraphrasing Schweitzer) "nothing remains of it, beyond that there > was a teacher from California named Alan Kay". Of course the consequences of the full realization of this have not been explored in the more limited Smalltalk-80. > The duality of object's state and behavior, is just the categorial > duality of algebra (data) and coalgebra (functions), perhaps along the > lines of Boehm?Berarducci encoding [1], or Vassili Bykov's "How to get > rid of Objects in Smalltalk" [2]. Haven't read this before. It was fun. Thanks. > Of course this all is just another > name for the topological duality between open/closed sets, or the quantum > duality between adjoint bra/ket, etc etc ? these are manifestations of > the same phenomenon discovered around the first decades of the 20th > century. When I first bumped into Kay's writings, I was struck by the > magic how Kay was able to write the above paragraph so much earlier > before systems like CLOS (in which the connection is obvious) were > constructed [3?7]. So I became curious, and a little digging led me to > Papert, Rosenblatt and Minsky; this was the moment when I became aware > that Kay did not operate in a vacuum, that the ideas of biologically- > inspired massively-parallel communicating agents were already actively > researched; became aware of the fight between the "connectionists" and > the "symbolists"; and of how na?ve that fight proved in light of the > tremendous progress which was made in the following decades [8]. > >>> The next major revision of Smalltalk was Smalltalk-80. Kay was no longer >>> on the scene to argue that any language should be simple enough for a child >>> to use. Smalltalk-80, says Tesler, went too far in the opposite direction >>> from the earliest versions of Smalltalk: ?It went to such an extreme to >>> make it compilable, uniform, and readable, that it actually became hard to >>> read, and you definitely wouldn?t want to teach it to children.? >>> >>> Kay, looking at Smalltalk-80, said, ?It?s terrible that it can?t be used >>> by children, since that?s who Smalltalk was intended for. It fell back into >>> data-structure-type programming instead of simulation-type programming.? >> I think that both Tesler and Kay are exaggerating here, > Can you explain why you think they are exaggerating? > From my own personal experience (which of course is not universal, this > is why I am genuinely interested in learning about others' experiences, > hence asking) of trying to advance Smalltalk from the systems in use > today towards what Kay appears to say in his writings, I find the above > quote quite literally correct. And in this my-own-experience when I > describe building a Kay-like Smalltalk, I have in some cases heard > fierce criticism of Kay (in a few cases transitioning into ad-hominem > arguments against him). When I try to poke harder, in most of such > cases the deeper problem turns out to be that the opponent is firmly > entrenched in the "Newtonian epistemology", and engages in quantum > denialism bordering on Cargo-Cult Science. The real challenge of the > situation is *competition*. It's 2024 on the calendar; my competitors > have implemented post-quantum (cf. post-intuitionist etc.) algorithms, > reconciled the Connectionist and the Symbolist viewpoint, they are > engaging in kinds of computing completely unthinkable in the Newtonian > context. This is intriguing. I'd really like to know howsuch Kay-like Smalltalk would result. I'm sure it is a trip in uncharted territory. People rejecting that maybe are afraid of it turning out not to be practical. That's irrelevant. The important part is that it is interesting! > By saying this, I don't mean to criticize Smalltalk-80 or to say that > we should build a "Kay-like (nonclassical) Smalltalk" to *replace* Cuis > because the latter is Newtonian. To suggest it, would indicate a lack > of understanding of Bohr's correspondence principle. He he. Of course. > Finkelstein explains this very nicely [9, 10]: > > "Most of the pioneers of the quantum theory, including Einstein, de Broglie, > Schr?dinger, and Wigner, retained more of the ontic classical epistemology > than Heisenberg and Bohr, and rejected the quantum project in principle. > Einstein's view is clearly stated and frequently quoted: > >> There is no doubt that quantum mechanics has seized hold of a beautiful >> element of truth, and that it will be a test stone for any future >> theoretical basis, in that it must be deducible as a limiting case from >> that basis, just as electrostatics is deducible from Maxwell's equations >> of the electromagnetic field, or as thermodynamics is deducible from >> classical mechanics. However, I do not believe that quantum mechanics >> will be the starting point in the search for this basis, just as, vice >> versa, one could not go from thermodynamics (resp. statistical mechanics) >> to the foundations of mechanics. > ? Einstein 1936 > > Bohr believed that quantum mechanics "will be the starting point in the > search", as Einstein put it, but proposed nevertheless to give classical > concepts a permanent place in its foundations. To be sure, Bohr noted, > our "classical" (that is, classical) concepts are "gross and inadequate", > and nature "leaks through them like water through a net". At the same > time, Bohr explicitly rejected the idea of a "quantum universe" (in the > sense of a universe described by a ? vector). > > When the concept of a "? vector" or ket for the universe was broached > to him, he responded vehemently "You might as well say that we are only > dreaming that we are here." He held that we must use classical concepts > to communicate about our experiments if we wish to be understood. > Heisenberg soon accepted Bohr's position on this matter, and it became > part of the Copenhagen quantum theory: > >> The concepts of classical physics form the language by which we >> describe the arrangements of our experiments and state the results. >> We cannot and should not replace these concepts by others. Still >> the application of these concepts is limited by the relations of >> uncertainty. > ? Heisenberg > > The insistence of Bohr and Heisenberg that we *cannot* use quantum > concepts to describe the episystem seems over-dogmatic today. ? We > experiment with a praxic, post-Copenhagen position here. > > == END OF FINKELSTEIN CITATION Nice. > So even if one characterization of Smalltalk-80 would be that its > designers "rejected Kay's Smalltalk project in principle", they would > be just following in Einstein's and Schr?dinger's footsteps. > More seriously, though, if we are to build a Kay-like Smalltalk, it does > not *replace* Smalltalk-80 just like quantum mechanics does not *replace* > Newtonian mechanics. In other words, Bohr's correspondence says that > a Kay-like Smalltalk must necessarily be embedded in something like Cuis. I thought you were going to say that a Smalltalk-80/Cuis like system is a trivial consequence of a the existance of a Kay-like Smalltalk. May be both assertions are true. > ----- > > Looking back at what I just wrote, I am sorry I am not really *explaining* > but merely pointing in the general direction of what kind of thoughts > have been occupying my mind in the past dozen years. I take that as meaning "Work in Progress". The current state of this is a bit like Greek Philosophy: It is not that you have all the answers, but that making the right questions is already a lot. > Also I must warn about my choice of quantum mechanics as the example of > "twentieth-century science". It is only because that's what I am familiar > with, NOT because it's better. A topologist reading this post, can > criticize me like "hey Boris, why don't you talk about the familiar > open/closed sets instead of those obscure bra/ket", and it would be > perfectly valid. > > [1] https://okmij.org/ftp/tagless-final/course/Boehm-Berarducci.html > [2] https://live.exept.de/doc/online/english/programming/humor.html > [3] https://doi.org/10.1017/S0956796800001490 > [4] https://dx.doi.org/10.1017/S0960129500000694 > [5] https://doi.org/10.1007/978-1-4613-1437-0_5 > [6] https://doi.org/10.1007/BFb0053063 > [7] https://www.cs.ru.nl/B.Jacobs/PAPERS/JR.pdf > [8] M.L.Minsky, S.A.Papert. Perceptrons. (Make sure you have the 1988 > edition, not the 1969 original). > [9] D.R.Finkelstein. Quantum Relativity. > [10] S.A.Selesnick. Quanta, Logic and Spacetime: Variations on > Finkelstein's Quantum Relativity. Thanks Boris. I really enjoyed reading this. FWIW, even if my own efforts are directed to exploring the potential of the Smalltalk-80 approach, it makes me happy you're exploring the much wider potential of Kay's original Smalltalk vision. Cheers, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich From r.mark.volkmann at gmail.com Thu Aug 8 15:05:22 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Thu, 8 Aug 2024 17:05:22 -0500 Subject: [Cuis-dev] UI-Metaproperties issue Message-ID: I pulled the latest from the Cuis-Smalltalk-Dev repository just now. When I enter Feature require: 'UI-MetaProperties' in a Workspace and "Do it", it runs fine. But when I open the World menu and select Changes ... Install New Updates, I get "UI-MetaProperties.pck.st does not exist". I haven't run into that before today. Any idea what I'm doing wrong? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hernan.wilkinson at 10pines.com Thu Aug 8 16:12:42 2024 From: hernan.wilkinson at 10pines.com (=?UTF-8?Q?Hern=C3=A1n_Wilkinson?=) Date: Thu, 8 Aug 2024 20:12:42 -0300 Subject: [Cuis-dev] Remove #ifCanNotDebugDo: Message-ID: Hi, due to the fact that now we can debug quick methods, there is no need to check that a test method is quick to show that it cannot be debugged. Attached is the change set. Cheers! Hernan. -- *Hern?n WilkinsonAgile Software Development, Teaching & Coaching* *Phone: +54-011*-4893-2057 *Twitter: @HernanWilkinson* *site: http://www.10Pines.com * Address: Alem 896, Floor 6, Buenos Aires, Argentina -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 6428-RemoveCannotDebugTest-HernanWilkinson-2024Aug08-20h03m-HAW.001.cs.st Type: application/octet-stream Size: 1917 bytes Desc: not available URL: From ken.dickey at whidbey.com Thu Aug 8 17:43:53 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Thu, 08 Aug 2024 17:43:53 -0700 Subject: [Cuis-dev] UI-Metaproperties issue In-Reply-To: References: Message-ID: The first idea is to open the Package Browser and look at the load paths. I have seen similar when I had the "same" package, by name, in multiple paths then deleted the wrong one. But you know that pullAllRepos, staring again from a fresh image, updating changes, then requiring what you want will usually avoid such problems. There is always the debugger, but check what paths are being used. HTH, -KenD On 2024-08-08 15:05, Mark Volkmann via Cuis-dev wrote: > I pulled the latest from the Cuis-Smalltalk-Dev repository just now. > When I enter > > Feature require: 'UI-MetaProperties' > > in a Workspace and "Do it", it runs fine. > > But when I open the World menu and select Changes ... Install New > Updates, I get "UI-MetaProperties.pck.st does not exist". I haven't run > into that before today. Any idea what I'm doing wrong? > -- > > R. Mark Volkmann > Object Computing, Inc. From ken.dickey at whidbey.com Thu Aug 8 17:55:12 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Thu, 08 Aug 2024 17:55:12 -0700 Subject: [Cuis-dev] UI-Metaproperties issue In-Reply-To: References: Message-ID: <5e709c2169b407132278e1329ef0a8ab@whidbey.com> One other thought. The VM knows what directory it has been invoked from. Did you invoke the Cuis image in a different directory the 2nd time? This changes the search root. Just a thought.. -KenD From r.mark.volkmann at gmail.com Thu Aug 8 17:56:53 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Thu, 8 Aug 2024 19:56:53 -0500 Subject: [Cuis-dev] initial size of SystemWindow subclass Message-ID: I'm working on a small demo app ... a todo app. Initially the main class was a subclass of LayoutMorph. I changed it to be a subclass of SystemWindow so I would get a title, a close button, and the ability to resize it for free. Is there any reason to avoid creating subclasses of SystemWindow for things that are not development tools? I suppose not. When I first open it, it isn't sized correctly to hold all the contents I add. See the first screenshot. When I click on an edge of the window, it automatically resizes to look like the second screenshot. Is there a message I could send to my subclass that would cause it to size correctly immediately? I did a lot of searching, but couldn't find anything to do that. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot 2024-08-08 at 7.51.09?PM.png Type: image/png Size: 23916 bytes Desc: not available URL: From r.mark.volkmann at gmail.com Thu Aug 8 18:01:29 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Thu, 8 Aug 2024 20:01:29 -0500 Subject: [Cuis-dev] UI-Metaproperties issue In-Reply-To: References: Message-ID: On Thu, Aug 8, 2024 at 7:44?PM wrote: > The first idea is to open the Package Browser and look at the load > paths. > This was the issue. It was looking in Cuis-Smalltalk-UI/tools, but the file UI-MetaProperties.pck.st is now in Cuis-Smalltalk-UI/metaproperties. Could it have moved recently? In any case I created a new image and that resolved the problem. > On 2024-08-08 15:05, Mark Volkmann via Cuis-dev wrote: > > > I pulled the latest from the Cuis-Smalltalk-Dev repository just now. > > When I enter > > > > Feature require: 'UI-MetaProperties' > > > > in a Workspace and "Do it", it runs fine. > > > > But when I open the World menu and select Changes ... Install New > > Updates, I get "UI-MetaProperties.pck.st does not exist". I haven't run > > into that before today. Any idea what I'm doing wrong? > > -- > > > > R. Mark Volkmann > > Object Computing, Inc. > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From barry.perryman at gmail.com Thu Aug 8 22:58:56 2024 From: barry.perryman at gmail.com (Barry Perryman) Date: Fri, 9 Aug 2024 06:58:56 +0100 Subject: [Cuis-dev] Bouncing Atoms - couple of small bugs Message-ID: While playing with the bouncing atoms morph I came across a couple of small issues: 1. I couldn't adjust the number of atoms due to an asInteger method being called. 2. The InfectionGraph would fall over when drawing due to a missing StrikeFont. I've attached an update for both these that seems to work. Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: UnsavedChangesTo-BouncingAtoms-BAP.001.cs.st Type: application/octet-stream Size: 2056 bytes Desc: not available URL: From hernan.wilkinson at 10pines.com Fri Aug 9 06:45:58 2024 From: hernan.wilkinson at 10pines.com (=?UTF-8?Q?Hern=C3=A1n_Wilkinson?=) Date: Fri, 9 Aug 2024 10:45:58 -0300 Subject: [Cuis-dev] Community tutorial meeting In-Reply-To: <74bafd7aa07460bee02879b54d1e906c@whidbey.com> References: <6ec178fe8e94365e2c747a10bb6c551273c66c4c.camel@klix.ch> <0b2c01dae8e6$276a4910$763edb30$@christianhaider.de> <74bafd7aa07460bee02879b54d1e906c@whidbey.com> Message-ID: yeah, that was the idea :-) On Wed, Aug 7, 2024 at 1:29?PM ken.dickey--- via Cuis-dev < cuis-dev at lists.cuis.st> wrote: > On 2024-08-07 09:23, Christian Haider via Cuis-dev wrote: > > No meeting today? > > Must be August break. I waited for 15 minutes but no moderator. > > Back on 4 September ? > > -KenD > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -- *Hern?n WilkinsonAgile Software Development, Teaching & Coaching* *Phone: +54-011*-4893-2057 *Twitter: @HernanWilkinson* *site: http://www.10Pines.com * Address: Alem 896, Floor 6, Buenos Aires, Argentina -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhylands at gmail.com Fri Aug 9 11:02:24 2024 From: jhylands at gmail.com (Jon Hylands) Date: Fri, 9 Aug 2024 14:02:24 -0400 Subject: [Cuis-dev] initial size of SystemWindow subclass In-Reply-To: References: Message-ID: In general, when I make an app like that, it holds onto a SystemWindow in an instance variable - there's no reason to subclass from that class unless you're changing how the parts of a window that it provides work. - Jon On Thu, 8 Aug 2024 at 20:57, Mark Volkmann via Cuis-dev < cuis-dev at lists.cuis.st> wrote: > I'm working on a small demo app ... a todo app. Initially the main class > was a subclass of LayoutMorph. I changed it to be a subclass of > SystemWindow so I would get a title, a close button, and the ability to > resize it for free. > > Is there any reason to avoid creating subclasses of SystemWindow for > things that are not development tools? I suppose not. > > When I first open it, it isn't sized correctly to hold all the contents I > add. See the first screenshot. When I click on an edge of the window, it > automatically resizes to look like the second screenshot. Is there a > message I could send to my subclass that would cause it to size correctly > immediately? I did a lot of searching, but couldn't find anything to do > that. > > -- > R. Mark Volkmann > Object Computing, Inc. > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Fri Aug 9 13:19:53 2024 From: juan at cuis.st (Juan Vuletich) Date: Fri, 09 Aug 2024 17:19:53 -0300 Subject: [Cuis-dev] Remove #ifCanNotDebugDo: In-Reply-To: References: Message-ID: <66B679E9.4060207@cuis.st> On 8/8/2024 8:12 PM, Hern?n Wilkinson via Cuis-dev wrote: > Hi, > due to the fact that now we can debug quick methods, there is no need > to check that a test method is quick to show that it cannot be debugged. > Attached is the change set. > > Cheers! > Hernan. > > -- > *Hern?n Wilkinson > Agile Software Development, Teaching & Coaching* > *Phone: +54-011*-4893-2057 > *Twitter: @HernanWilkinson* > *site: http://www.10Pines.com * > Address: Alem 896, Floor 6, Buenos Aires, Argentina Integrated and @ GitHub. Thanks! Cheers, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Fri Aug 9 17:19:05 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Fri, 9 Aug 2024 19:19:05 -0500 Subject: [Cuis-dev] initial size of SystemWindow subclass In-Reply-To: References: Message-ID: Thanks for that tip Jon! I made that change, but the issue with sizing the window to hold its contents still remains. Clicking an edge of the window fixes it. I'm thinking there must be a method I need to call on the SystemWindow after adding content to it so it will recalculate its size. On Fri, Aug 9, 2024 at 1:02?PM Jon Hylands via Cuis-dev < cuis-dev at lists.cuis.st> wrote: > In general, when I make an app like that, it holds onto a SystemWindow in > an instance variable - there's no reason to subclass from that class unless > you're changing how the parts of a window that it provides work. > > - Jon > > > On Thu, 8 Aug 2024 at 20:57, Mark Volkmann via Cuis-dev < > cuis-dev at lists.cuis.st> wrote: > >> I'm working on a small demo app ... a todo app. Initially the main class >> was a subclass of LayoutMorph. I changed it to be a subclass of >> SystemWindow so I would get a title, a close button, and the ability to >> resize it for free. >> >> Is there any reason to avoid creating subclasses of SystemWindow for >> things that are not development tools? I suppose not. >> >> When I first open it, it isn't sized correctly to hold all the contents I >> add. See the first screenshot. When I click on an edge of the window, it >> automatically resizes to look like the second screenshot. Is there a >> message I could send to my subclass that would cause it to size correctly >> immediately? I did a lot of searching, but couldn't find anything to do >> that. >> >> -- >> R. Mark Volkmann >> Object Computing, Inc. >> -- >> Cuis-dev mailing list >> Cuis-dev at lists.cuis.st >> https://lists.cuis.st/mailman/listinfo/cuis-dev >> > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Fri Aug 9 17:54:48 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Fri, 9 Aug 2024 19:54:48 -0500 Subject: [Cuis-dev] adding a morph to start of LayoutMorph Message-ID: I want to add a morph as the first submorph in a LayoutMorph that already has submorphs. I thought the addMorphFront: method would do that, but it doesn't. This code seems surprising: lm := LayoutMorph newColumn openInWorld. lm addMorph: (LabelMorph new contents: 'one'). lm addMorph: (LabelMorph new contents: 'two'). first := lm submorphs first. first will be set to the LabelMorph whose content is 'two', not 'one'. Is there a way to add a morph to the beginning of a LayoutMorph? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cuis.01 at klix.ch Sat Aug 10 03:07:13 2024 From: cuis.01 at klix.ch (Gerald Klix) Date: Sat, 10 Aug 2024 12:07:13 +0200 Subject: [Cuis-dev] Space is low In-Reply-To: <66B3D43F.70409@cuis.st> References: <1b5f7119-478a-4ee2-8db7-029e23f790b3@smallinteger.com> <7d0568f9-b16d-4724-a7a2-f0af0028562c@smallinteger.com> <17f2edd8-7890-4ada-9bad-0ec71908ccdf@smallinteger.com> <66980F3D.6090804@cuis.st> <31BAF037-4ED8-4EF1-9CD8-45E689078F16@gmail.com> <66B3D43F.70409@cuis.st> Message-ID: I have similar issues with my Haver images, when I use my two UHD monitors together (Display extent:? 4320 at 3840). Funny enough it never happens with a pristine Cuis image, there for I was convinced that I introduced that bug and did not report it. Best Regards, Gerald On 8/7/24 10:08 PM, Juan Vuletich via Cuis-dev wrote: > Hi Folks, > > Yesterday Jon Raiford saved an image that did something similar to > what you Mark describe when starting it, moving it to a 5k display, > and setting it full screen. We spent several hours debugging together. > The result is updates #6569 and #6570, pushed today to GitHub. These > updates do fix the issue as experienced by Jon. I'm pretty confident > they'd fix what you Mark saw too. > > Thank you Jon for finding a case we could reproduce, and for debugging > it together! > > Cheers, > > On 7/25/2024 10:38 AM, Mark Volkmann via Cuis-dev wrote: >> It finally happened again. I have attached two screenshots, one >> showing the exception and one showing Transcript output that Juan >> requested. >> >> On Thu, Jul 18, 2024 at 9:08?AM Mark Volkmann >> > wrote: >> >> ??? The "Space is low" issue hasn't repeated itself for me in the past >> ??? couple of days, but I'll report back if it does happen again. I >> ??? did pull down the latest updates to Cuis a couple of days ago, so >> ??? I suppose it's possible there was a recent change that fixed this. >> >> ??? On Thu, Jul 18, 2024 at 2:48?AM Barry Perryman >> ??? > wrote: >> >> ??????? What happens when you minimise cuis before letting it go to >> sleep? >> >> ??????? I'm asking because this is what happens on my Mac - M2 Mini >> ??????? running Sonoma with LG 4K screen. >> >> ??????? I usually run Cuis as a window - so not full screen. When the >> ??????? system goes to sleep, or the display sleeps, it quite often, >> ??????? although not always, will resize the window to a smaller size. >> ??????? Cuis isn't the only application that this happens to; citrix >> ??????? client will also have the same issue, again not every time, >> ??????? even though that is run as full screen. I've always figured >> ??????? this is some mac sleep quirk that I have to live with. >> >> ??????? I haven't had the issue occur when I minimise the cuis window >> ??????? - although I have had the icon on the dock look like it's been >> ??????? resized - so instead of a 128x128 icon it's shrunk to say a >> ??????? 80x60 icon (guess). >> >> ??????? Next time few times it happens I'll grab the size because now >> ??????? I think about it I'm fairly sure the resize looks to be about >> ??????? the same size every time. >> >> ??????? I've not reported this before because I've never been able to >> ??????? consistently reproduce it. >> >> ??????? Barry >> >> >>> ??????? On 18 Jul 2024, at 01:16, Mark Volkmann via Cuis-dev >>> ??????? > wrote: >>> >>> ??????? A sleep of the Mac was involved. >>> ??????? I didn't move the window myself after it woke up, but I do >>> ??????? have it on a second monitor, so when it wakes up I suppose >>> ??????? macOS "moves it". >>> ??????? My Mac has slept several times today and did not result in a >>> ??????? low memory exception on waking. >>> ??????? I inserted the logging code that Juan requested. >>> ??????? Perhap it will happen again tomorrow morning. I'll report >>> ??????? back if it does. >>> >>> ??????? On Wed, Jul 17, 2024 at 2:02?PM Nicol?s Papagna Maldonado via >>> ??????? Cuis-dev >> ??????? > wrote: >>> >>> ??????????? Just thinking out loud here. >>> >>> ??????????? Based on what Juan mentioned, did you move the Cuis >>> ??????????? window between monitors (assuming that triggers a resize)? >>> >>> >>> ??????????? On Wed, Jul 17, 2024 at 3:45?PM Andres Valloud via >>> ??????????? Cuis-dev >> ??????????? > wrote: >>> >>> ??????????????? Did the machine (partially) go to sleep in those 2 >>> ??????????????? hours?? Does the >>> ??????????????? problem manifest when the machine transitions between >>> ??????????????? sleep and awake? >>> >>> ??????????????? On 7/17/24 11:36, Juan Vuletich via Cuis-dev wrote: >>> ??????????????? > This is not normal at all. >>> ??????????????? > >>> ??????????????? > The allocation that shows in the walkback you >>> ??????????????? posted happens at the >>> ??????????????? > start of #mainLoop. This method is only called when >>> ??????????????? the Morphic system >>> ??????????????? > needs to be reinitialized, usually because the main >>> ??????????????? Cuis window was >>> ??????????????? > resized and a new Canvas needs to be created. It >>> ??????????????? should not happen if >>> ??????????????? > you just let the machine idle for a couple of >>> ??????????????? hours. And it is not >>> ??????????????? > possible to know what's going on without further >>> ??????????????? information. So, please: >>> ??????????????? > >>> ??????????????? > - Keep the Transcript open and visible >>> ??????????????? > - Add this line at the start of >>> ??????????????? #spawnNewMorphicProcessFor:, after the >>> ??????????????? > temp declaration. >>> ??????????????? >????? thisContext printStack: 10. >>> ??????????????? > >>> ??????????????? > #spawnNewMorphicProcessFor: should only be called >>> ??????????????? when the main Cuis >>> ??????????????? > window is resized. So keep the Transcript visible >>> ??????????????? and see if a stack >>> ??????????????? > trace gets printed even if you're not resizing the >>> ??????????????? Display. If this >>> ??????????????? > happens, please post the result. >>> ??????????????? > >>> ??????????????? > Thanks, >>> ??????????????? > >>> ??????????????? > On 7/16/2024 10:44 PM, Mark Volkmann via Cuis-dev >>> ??????????????? wrote: >>> ??????????????? >> See my replies inline below. Could this be related >>> ??????????????? to the fact that I >>> ??????????????? >> have the tiger SVG displayed on the desktop with >>> this? >>> ??????????????? >> >>> ??????????????? >> SVGMainMorph exampleTiger openInWorld. >>> ??????????????? >> >>> ??????????????? >> On Tue, Jul 16, 2024 at 8:29?PM Andres Valloud via >>> ??????????????? Cuis-dev >>> ??????????????? >> >> ??????????????? >>> ??????????????? >> ??????????????? >> wrote: >>> ??????????????? >> >>> ??????????????? >>???? And, what are the arguments to setExtent:depth:? >>> ??????????????? >> >>> ??????????????? >> >>> ??????????????? >> extent: 3456.0 at 1440.0 >>> ??????????????? >> bitsPerPixel: 32 >>> ??????????????? >> >>> ??????????????? >>???? On 7/16/24 18:27, Andres Valloud via Cuis-dev >>> ??????????????? wrote: >>> ??????????????? >> > Interesting.? What's the argument to basicNew:? >>> ??????????????? >> >>> ??????????????? >> >>> ??????????????? >> sizeRequested is 4976640 >>> ??????????????? >> >>> ??????????????? >> > On 7/16/24 18:25, Mark Volkmann via Cuis-dev >>> wrote: >>> ??????????????? >> >> Here's a screenshot of the stack trace. >>> ??????????????? >> >> >>> ??????????????? >> >> On Tue, Jul 16, 2024 at 8:19?PM Andres Valloud >>> ??????????????? via Cuis-dev >>> ??????????????? >> >> >> ??????????????? >>> ??????????????? >> ??????????????? > >>> ??????????????? >> >> ??????????????? >>> ??????????????? >> >>> >>> ??????????????? >>???? wrote: >>> ??????????????? >> >> >>> ??????????????? >> >>???? No, that's not normal. Can you paste the >>> ??????????????? debugger's stack >>> ??????????????? >>???? here? >>> ??????????????? >> >> >>> ??????????????? >> >>???? On 7/16/24 18:11, Mark Volkmann via >>> ??????????????? Cuis-dev wrote: >>> ??????????????? >> >> > Usually when I leave Cuis Smalltalk running >>> ??????????????? and walk >>> ??????????????? >>???? away from my >>> ??????????????? >> >> > computer (macOS) for a couple of hours, when >>> ??????????????? I come back >>> ??????????????? >>???? there >>> ??????????????? >> >> is a >>> ??????????????? >> >> > Debugger window open with the message "Space >>> ??????????????? is low". I >>> ??????????????? >>???? can just >>> ??????????????? >> >>???? close >>> ??????????????? >> >> > it and keep working. Everything seems fine. >>> ??????????????? Is this normal? >>> ??????????????? >> >> > >>> ??????????????? >> >> > -- >>> ??????????????? >> >> > R. Mark Volkmann >>> ??????????????? >> >> > Object Computing, Inc. >>> ??????????????? >> >> > >>> ??????????????? >> >>???? --???? Cuis-dev mailing list >>> ??????????????? >> >> Cuis-dev at lists.cuis.st >>> ??????????????? >>> ??????????????? >> ??????????????? > >>> ??????????????? >> >> ??????????????? >>> ??????????????? >> ??????????????? >> >>> ??????????????? >> >> https://lists.cuis.st/mailman/listinfo/cuis-dev >>> ??????????????? >> >>> ??????????????? >> >> >> ??????????????? >> > >>> ??????????????? >> >> >>> ??????????????? >> >> >>> ??????????????? >> >> >>> ??????????????? >> >> -- >>> ??????????????? >> >> R. Mark Volkmann >>> ??????????????? >> >> Object Computing, Inc. >>> ??????????????? >> >> >>> ??????????????? >>???? -- >>> ??????????????? >>???? Cuis-dev mailing list >>> ??????????????? >> Cuis-dev at lists.cuis.st >>> ??????????????? >>> ??????????????? >> ??????????????? > >>> ??????????????? >> https://lists.cuis.st/mailman/listinfo/cuis-dev >>> ??????????????? >> >>> ??????????????? >> >>> ??????????????? >> >>> ??????????????? >> >>> ??????????????? >> -- >>> ??????????????? >> R. Mark Volkmann >>> ??????????????? >> Object Computing, Inc. >>> ??????????????? > >>> ??????????????? > >>> ??????????????? > -- >>> ??????????????? > Juan Vuletich >>> ??????????????? > cuis.st >>> ??????????????? > github.com/jvuletich >>> ??????????????? > researchgate.net/profile/Juan-Vuletich >>> >>> ??????????????? > independent.academia.edu/JuanVuletich >>> >>> ??????????????? > patents.justia.com/inventor/juan-manuel-vuletich >>> >>> ??????????????? > linkedin.com/in/juan-vuletich-75611b3 >>> >>> ??????????????? > twitter.com/JuanVuletich >>> ??????????????? >>> ??????????????? > >>> ??????????????? > >>> ??????????????? -- ??????????????? Cuis-dev mailing list >>> ??????????????? Cuis-dev at lists.cuis.st >>> https://lists.cuis.st/mailman/listinfo/cuis-dev >>> >>> >>> >>> ??????????? -- >>> ??????????? Nicol?s Papagna >>> ??????????? -- ??????????? Cuis-dev mailing list >>> ??????????? Cuis-dev at lists.cuis.st >>> ??????????? https://lists.cuis.st/mailman/listinfo/cuis-dev >>> >>> >>> >>> ??????? -- ??????? R. Mark Volkmann >>> ??????? Object Computing, Inc. >>> ??????? -- ??????? Cuis-dev mailing list >>> ??????? Cuis-dev at lists.cuis.st >>> ??????? https://lists.cuis.st/mailman/listinfo/cuis-dev >> >> >> >> ??? -- ??? R. Mark Volkmann >> ??? Object Computing, Inc. >> >> >> >> -- >> R. Mark Volkmann >> Object Computing, Inc. > > > From r.mark.volkmann at gmail.com Sat Aug 10 04:40:37 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sat, 10 Aug 2024 06:40:37 -0500 Subject: [Cuis-dev] adding a morph to start of LayoutMorph In-Reply-To: References: Message-ID: On Fri, Aug 9, 2024 at 7:54?PM Mark Volkmann wrote: > I want to add a morph as the first submorph in a LayoutMorph that already > has submorphs. > I thought the addMorphFront: method would do that, but it doesn't. > This code seems surprising: > > lm := LayoutMorph newColumn openInWorld. > lm addMorph: (LabelMorph new contents: 'one'). > lm addMorph: (LabelMorph new contents: 'two'). > first := lm submorphs first. > > first will be set to the LabelMorph whose content is 'two', not 'one'. > > Is there a way to add a morph to the beginning of a LayoutMorph? > I see now that sending #addMorphFront: does add a morph to the beginning of the submorphs array, but the parent morph does not automatically redraw itself. Sending #redrawNeeded to the parent does not force it to redraw using the updated submorphs array. What can I do to force that? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marianomontone at gmail.com Sat Aug 10 05:13:40 2024 From: marianomontone at gmail.com (Mariano Montone) Date: Sat, 10 Aug 2024 09:13:40 -0300 Subject: [Cuis-dev] adding a morph to start of LayoutMorph In-Reply-To: References: Message-ID: <0066ab93-ff82-4c9e-b75b-f3432fe308c9@gmail.com> I think you may have spotted a bug. From what I observe, LayoutMorph does not layout its children properly after a submorph is added at front position (the added submorph is layed out as if it were the last submorph). El 10/8/24 a las 08:40, Mark Volkmann via Cuis-dev escribi?: > On Fri, Aug 9, 2024 at 7:54?PM Mark Volkmann > wrote: > > I want to add a morph as the first submorph?in a LayoutMorph that > already has submorphs. > I thought the addMorphFront: method would do that, but it doesn't. > This code seems surprising: > > lm := LayoutMorph newColumn openInWorld. > lm addMorph: (LabelMorph new contents: 'one'). > lm addMorph: (LabelMorph new contents: 'two'). > first := lm submorphs first. > > first will be set to the LabelMorph whose content is 'two', not 'one'. > > Is there a way to add a morph to the beginning of a LayoutMorph? > > > I see now that sending #addMorphFront: does add a morph to the > beginning of the submorphs array, but the parent morph does not > automatically redraw itself. Sending #redrawNeeded to the parent does > not force it to redraw using the updated submorphs?array. What can I > do to force that? > > -- > R. Mark Volkmann > Object Computing, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfern at free.fr Sat Aug 10 07:17:55 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Sat, 10 Aug 2024 16:17:55 +0200 Subject: [Cuis-dev] LayoutMorph newColumn In-Reply-To: References: <353307737.51610477.1722793984840.JavaMail.root@zimbra87-e15.priv.proxad.net> <66B3D18C.6030301@cuis.st> <3201c50d62bc08af077348f6dca376ae@whidbey.com> Message-ID: Hi Mark, Often, we subclass more than necessary. Your TODO exercise app could be written without the need to subclass. I will use a SystemWindow instance where there is already a LayoutMorph instance installed, ready to receive your widget installments. I will make the TodoApp a subclass of Object. It will be your Presenter object knowing about the Model and the View (your SystemWindows instance) and it will handle the events of the widget you have installed in the SystemWindow instance. You will subclass LayoutMoprh if you need to add some special behavior and make a new kind of widget of it. Otherwise it is wise to not do it, it adds unnecessary complexity. Hilaire Le 08/08/2024 ? 13:06, Mark Volkmann via Cuis-dev a ?crit?: > My class is a subclass of LayoutMorph, so I'm not sending a #new* > message to LayoutMorph directly. I'm sending #new to my own class. -- GNU Dr. Geo http://gnu.org/s/dr-geo/ http://gnu-drgeo.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfern at free.fr Sat Aug 10 07:23:14 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Sat, 10 Aug 2024 16:23:14 +0200 Subject: [Cuis-dev] Remove #ifCanNotDebugDo: In-Reply-To: References: Message-ID: <09e4c7a4-018d-4ca4-89b4-4568ca4ad31f@free.fr> Hi Hern?n, I may have miss something, but what is a quick method? Thanks Hilaire Le 09/08/2024 ? 01:12, Hern?n Wilkinson via Cuis-dev a ?crit?: > ?due to the fact that now we can debug quick methods, -- GNU Dr. Geo http://gnu.org/s/dr-geo/ http://gnu-drgeo.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfern at free.fr Sat Aug 10 07:34:34 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Sat, 10 Aug 2024 16:34:34 +0200 Subject: [Cuis-dev] adding a morph to start of LayoutMorph In-Reply-To: References: Message-ID: Use the source, Mark! You will discover that addMorph: and addMorphFront: are identical in the context of LayoutMorph. Indeed, there can't be a notion of Z-ordering in a LayoutMorph. LayoutMorph>>addMorph: aMorph "Add a submorph, at the bottom or right, with a default LayoutSpec if none was provided." aMorph isPlacedMorph ifFalse: [self error: 'Only PlacedMorphs can be used in Layouts' ]. aMorph layoutSpec. super addMorphFront: aMorph By the way Juan, addMorph: and addMorphFront are perfect twins. Any reason to not let addMorph: send the message addMorphFront: to self? Le 10/08/2024 ? 13:40, Mark Volkmann via Cuis-dev a ?crit?: > I see now that sending #addMorphFront: does add a morph to the > beginning of the submorphs array, but the parent morph does not > automatically redraw itself. Sending #redrawNeeded to the parent does > not force it to redraw using the updated submorphs?array. What can I > do to force that? -- GNU Dr. Geo http://gnu.org/s/dr-geo/ http://gnu-drgeo.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfern at free.fr Sat Aug 10 07:36:14 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Sat, 10 Aug 2024 16:36:14 +0200 Subject: [Cuis-dev] initial size of SystemWindow subclass In-Reply-To: References: Message-ID: Are you sending the #openInWorld message once you finished packing the widgets in the Window? Le 10/08/2024 ? 02:19, Mark Volkmann via Cuis-dev a ?crit?: > Thanks for that tip Jon! I made that change, but the issue with sizing > the window to hold its contents still remains. Clicking an edge?of the > window fixes it. I'm thinking there must be a method I need to call on > the SystemWindow after adding content to it so it will recalculate?its > size. -- GNU Dr. Geo http://gnu.org/s/dr-geo/ http://gnu-drgeo.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfern at free.fr Sat Aug 10 07:39:22 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Sat, 10 Aug 2024 16:39:22 +0200 Subject: [Cuis-dev] Community tutorial meeting In-Reply-To: References: <6ec178fe8e94365e2c747a10bb6c551273c66c4c.camel@klix.ch> Message-ID: <0150079b-efdd-4756-a1b1-1c26e23709e2@free.fr> For the record, we have this collaborative list of suggested topics we can discuss during the meeting. Add any ideas there. https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/wiki/How%E2%80%90to-topics Thanks -- GNU Dr. Geo http://gnu.org/s/dr-geo/ http://gnu-drgeo.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfern at free.fr Sat Aug 10 08:06:17 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Sat, 10 Aug 2024 17:06:17 +0200 Subject: [Cuis-dev] UI-Metaproperties issue In-Reply-To: References: Message-ID: <436f5194-b377-4285-9f07-44d68f57646e@free.fr> Indeed, I reorganized the files and folders several weeks ago. Le 09/08/2024 ? 03:01, Mark Volkmann via Cuis-dev a ?crit?: > > This was the issue. It was looking in Cuis-Smalltalk-UI/tools, but the > file UI-MetaProperties.pck.st is now > in Cuis-Smalltalk-UI/metaproperties. > Could it have moved recently? > In any case I created a new image and that resolved the problem. -- GNU Dr. Geo http://gnu.org/s/dr-geo/ http://gnu-drgeo.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From cuis.01 at klix.ch Sat Aug 10 08:14:23 2024 From: cuis.01 at klix.ch (Gerald Klix) Date: Sat, 10 Aug 2024 17:14:23 +0200 Subject: [Cuis-dev] Space is low In-Reply-To: References: <1b5f7119-478a-4ee2-8db7-029e23f790b3@smallinteger.com> <7d0568f9-b16d-4724-a7a2-f0af0028562c@smallinteger.com> <17f2edd8-7890-4ada-9bad-0ec71908ccdf@smallinteger.com> <66980F3D.6090804@cuis.st> <31BAF037-4ED8-4EF1-9CD8-45E689078F16@gmail.com> <66B3D43F.70409@cuis.st> Message-ID: Hi Juan, I just tried version 6578: Once save the (Cuis) image with a display extent of 4320 at 3840 and restart it, I get a huge memory consumption some X11 errors and some VM errors. As with Haver I have to set a resource limit on the available memory otherwise my machine will become unresponsive. Is there anything ? logs, sys-traces, what ever ? I can provide to help? Best Regards, Gerald --- snip --- bear at speedy ~/H/Cuis7XBased> squeak --version 5.0-202312181441-HVR_MVP_ALPHA5_WINKEY_2024-01-24? Wed Jan 24 10:28:30 CET 2024 clang-13 [Production Spur 64-bit x86_64 VM] CoInterpreter VMMaker.oscog-eem.3339 uuid: b1c834e2-5de7-464c-aeb5-4f2a7b8812d6 Jan 24 2024 StackToRegisterMappingCogit VMMaker.oscog-eem.3339 uuid: b1c834e2-5de7-464c-aeb5-4f2a7b8812d6 Jan 24 2024 VM: 202312181441-HVR_MVP_ALPHA5_WINKEY_2024-01-24 bear at speedy:gitwork/opensmalltalk-vm Date: Mon Dec 18 15:41:18 2023 CommitHash: 72a81c50c Plugins: 202312181441-HVR_MVP_ALPHA5_WINKEY_2024-01-24 bear at speedy:gitwork/opensmalltalk-vm Linux speedy 5.10.0-27-amd64 #1 SMP Debian 5.10.205-2 (2023-12-31) x86_64 GNU/ --- snip --- bear at speedy ~/H/Cuis7XBased> squeak Cuis7.1-6578-w1.image -v X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 132 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 161 System information: Cuis7.1 latest update: #6578 Running at :/home/bear/HaverWorks/Cuis7XBased/Cuis7.1-6578-w1.image --- snap --- bear at speedy ~/H/Cuis7XBased> ulimit -a Maximum size of core files created????????????????????????????? (kB, -c) 0 Maximum size of a process?s data segment??????????????????????? (kB, -d) unlimited Control of maximum nice priority (-e) 0 Maximum size of files created by the shell????????????????????? (kB, -f) unlimited Maximum number of pending signals (-i) 127799 Maximum size that may be locked into memory???????????????????? (kB, -l) 64 Maximum resident set size?????????????????????????????????????? (kB, -m) unlimited Maximum number of open file descriptors (-n) 1024 Maximum bytes in POSIX message queues?????????????????????????? (kB, -q) 800 Maximum realtime scheduling priority (-r) 2 Maximum stack size????????????????????????????????????????????? (kB, -s) 8192 Maximum amount of CPU time in seconds????????????????????? (seconds, -t) unlimited Maximum number of processes available to current user (-u) 127799 Maximum amount of virtual memory available to each process????? (kB, -v) 20000000 Maximum contiguous realtime CPU time (-y) unlimited bear at speedy ~/H/Cuis7XBased> ulimit -v 20000000 --- Schnipsel --- bear at speedy ~/H/Cuis7XBased> squeak Cuis7.1-6578-w1.image X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 132 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 162 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 183 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 212 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 238 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 289 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 340 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 369 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 420 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 449 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 500 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 529 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 580 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 609 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 660 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 689 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 740 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 769 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 820 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 849 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 901 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 926 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 977 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 1006 sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto mmap: Cannot allocate memory sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto mmap: Cannot allocate memory X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 1059 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 1088 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 1139 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 1168 shmat: Cannot allocate memory X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 1343 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 1495 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 1669 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 1948 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 2122 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 2403 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 2582 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 2861 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 3050 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 3331 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 3530 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 3813 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 4248 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 4400 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 4836 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 4928 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 4959 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 4999 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 5437 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 5589 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 6025 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 6050 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 6101 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 6126 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 6177 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 6202 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 6253 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 6278 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 6330 X Error: BadWindow (invalid Window parameter) ? Major opcode of failed request:? 3 ? Minor opcode of failed request:? 0 ? Serial number of failed request: 6482 ^C? On 8/10/24 12:07 PM, Gerald Klix via Cuis-dev wrote: > I have similar issues with my Haver images, > when I use my two UHD monitors together > (Display extent:? 4320 at 3840). > > Funny enough it never happens with a pristine Cuis image, > there for I was convinced that I introduced that bug > and did not report it. > > > Best Regards, > > Gerald > > > > On 8/7/24 10:08 PM, Juan Vuletich via Cuis-dev wrote: >> Hi Folks, >> >> Yesterday Jon Raiford saved an image that did something similar to >> what you Mark describe when starting it, moving it to a 5k display, >> and setting it full screen. We spent several hours debugging >> together. The result is updates #6569 and #6570, pushed today to >> GitHub. These updates do fix the issue as experienced by Jon. I'm >> pretty confident they'd fix what you Mark saw too. >> >> Thank you Jon for finding a case we could reproduce, and for >> debugging it together! >> >> Cheers, >> >> On 7/25/2024 10:38 AM, Mark Volkmann via Cuis-dev wrote: >>> It finally happened again. I have attached two screenshots, one >>> showing the exception and one showing Transcript output that Juan >>> requested. >>> >>> On Thu, Jul 18, 2024 at 9:08?AM Mark Volkmann >>> > wrote: >>> >>> ??? The "Space is low" issue hasn't repeated itself for me in the past >>> ??? couple of days, but I'll report back if it does happen again. I >>> ??? did pull down the latest updates to Cuis a couple of days ago, so >>> ??? I suppose it's possible there was a recent change that fixed this. >>> >>> ??? On Thu, Jul 18, 2024 at 2:48?AM Barry Perryman >>> ??? > wrote: >>> >>> ??????? What happens when you minimise cuis before letting it go to >>> sleep? >>> >>> ??????? I'm asking because this is what happens on my Mac - M2 Mini >>> ??????? running Sonoma with LG 4K screen. >>> >>> ??????? I usually run Cuis as a window - so not full screen. When the >>> ??????? system goes to sleep, or the display sleeps, it quite often, >>> ??????? although not always, will resize the window to a smaller size. >>> ??????? Cuis isn't the only application that this happens to; citrix >>> ??????? client will also have the same issue, again not every time, >>> ??????? even though that is run as full screen. I've always figured >>> ??????? this is some mac sleep quirk that I have to live with. >>> >>> ??????? I haven't had the issue occur when I minimise the cuis window >>> ??????? - although I have had the icon on the dock look like it's been >>> ??????? resized - so instead of a 128x128 icon it's shrunk to say a >>> ??????? 80x60 icon (guess). >>> >>> ??????? Next time few times it happens I'll grab the size because now >>> ??????? I think about it I'm fairly sure the resize looks to be about >>> ??????? the same size every time. >>> >>> ??????? I've not reported this before because I've never been able to >>> ??????? consistently reproduce it. >>> >>> ??????? Barry >>> >>> >>>> ??????? On 18 Jul 2024, at 01:16, Mark Volkmann via Cuis-dev >>>> ??????? > >>>> wrote: >>>> >>>> ??????? A sleep of the Mac was involved. >>>> ??????? I didn't move the window myself after it woke up, but I do >>>> ??????? have it on a second monitor, so when it wakes up I suppose >>>> ??????? macOS "moves it". >>>> ??????? My Mac has slept several times today and did not result in a >>>> ??????? low memory exception on waking. >>>> ??????? I inserted the logging code that Juan requested. >>>> ??????? Perhap it will happen again tomorrow morning. I'll report >>>> ??????? back if it does. >>>> >>>> ??????? On Wed, Jul 17, 2024 at 2:02?PM Nicol?s Papagna Maldonado via >>>> ??????? Cuis-dev >>> ??????? > wrote: >>>> >>>> ??????????? Just thinking out loud here. >>>> >>>> ??????????? Based on what Juan mentioned, did you move the Cuis >>>> ??????????? window between monitors (assuming that triggers a resize)? >>>> >>>> >>>> ??????????? On Wed, Jul 17, 2024 at 3:45?PM Andres Valloud via >>>> ??????????? Cuis-dev >>> ??????????? > wrote: >>>> >>>> ??????????????? Did the machine (partially) go to sleep in those 2 >>>> ??????????????? hours?? Does the >>>> ??????????????? problem manifest when the machine transitions between >>>> ??????????????? sleep and awake? >>>> >>>> ??????????????? On 7/17/24 11:36, Juan Vuletich via Cuis-dev wrote: >>>> ??????????????? > This is not normal at all. >>>> ??????????????? > >>>> ??????????????? > The allocation that shows in the walkback you >>>> ??????????????? posted happens at the >>>> ??????????????? > start of #mainLoop. This method is only called when >>>> ??????????????? the Morphic system >>>> ??????????????? > needs to be reinitialized, usually because the main >>>> ??????????????? Cuis window was >>>> ??????????????? > resized and a new Canvas needs to be created. It >>>> ??????????????? should not happen if >>>> ??????????????? > you just let the machine idle for a couple of >>>> ??????????????? hours. And it is not >>>> ??????????????? > possible to know what's going on without further >>>> ??????????????? information. So, please: >>>> ??????????????? > >>>> ??????????????? > - Keep the Transcript open and visible >>>> ??????????????? > - Add this line at the start of >>>> ??????????????? #spawnNewMorphicProcessFor:, after the >>>> ??????????????? > temp declaration. >>>> ??????????????? >????? thisContext printStack: 10. >>>> ??????????????? > >>>> ??????????????? > #spawnNewMorphicProcessFor: should only be called >>>> ??????????????? when the main Cuis >>>> ??????????????? > window is resized. So keep the Transcript visible >>>> ??????????????? and see if a stack >>>> ??????????????? > trace gets printed even if you're not resizing the >>>> ??????????????? Display. If this >>>> ??????????????? > happens, please post the result. >>>> ??????????????? > >>>> ??????????????? > Thanks, >>>> ??????????????? > >>>> ??????????????? > On 7/16/2024 10:44 PM, Mark Volkmann via Cuis-dev >>>> ??????????????? wrote: >>>> ??????????????? >> See my replies inline below. Could this be related >>>> ??????????????? to the fact that I >>>> ??????????????? >> have the tiger SVG displayed on the desktop with >>>> this? >>>> ??????????????? >> >>>> ??????????????? >> SVGMainMorph exampleTiger openInWorld. >>>> ??????????????? >> >>>> ??????????????? >> On Tue, Jul 16, 2024 at 8:29?PM Andres Valloud via >>>> ??????????????? Cuis-dev >>>> ??????????????? >> >>> ??????????????? >>>> ??????????????? >>> >> wrote: >>>> ??????????????? >> >>>> ??????????????? >>???? And, what are the arguments to >>>> setExtent:depth:? >>>> ??????????????? >> >>>> ??????????????? >> >>>> ??????????????? >> extent: 3456.0 at 1440.0 >>>> ??????????????? >> bitsPerPixel: 32 >>>> ??????????????? >> >>>> ??????????????? >>???? On 7/16/24 18:27, Andres Valloud via Cuis-dev >>>> ??????????????? wrote: >>>> ??????????????? >> > Interesting.? What's the argument to basicNew:? >>>> ??????????????? >> >>>> ??????????????? >> >>>> ??????????????? >> sizeRequested is 4976640 >>>> ??????????????? >> >>>> ??????????????? >> > On 7/16/24 18:25, Mark Volkmann via Cuis-dev >>>> wrote: >>>> ??????????????? >> >> Here's a screenshot of the stack trace. >>>> ??????????????? >> >> >>>> ??????????????? >> >> On Tue, Jul 16, 2024 at 8:19?PM Andres Valloud >>>> ??????????????? via Cuis-dev >>>> ??????????????? >> >> >>> ??????????????? >>>> ??????????????? >>> ??????????????? > >>>> ??????????????? >> >>> ??????????????? >>>> ??????????????? >>> >>> >>>> ??????????????? >>???? wrote: >>>> ??????????????? >> >> >>>> ??????????????? >> >>???? No, that's not normal. Can you paste the >>>> ??????????????? debugger's stack >>>> ??????????????? >>???? here? >>>> ??????????????? >> >> >>>> ??????????????? >> >>???? On 7/16/24 18:11, Mark Volkmann via >>>> ??????????????? Cuis-dev wrote: >>>> ??????????????? >> >> > Usually when I leave Cuis Smalltalk running >>>> ??????????????? and walk >>>> ??????????????? >>???? away from my >>>> ??????????????? >> >> > computer (macOS) for a couple of hours, when >>>> ??????????????? I come back >>>> ??????????????? >>???? there >>>> ??????????????? >> >> is a >>>> ??????????????? >> >> > Debugger window open with the message "Space >>>> ??????????????? is low". I >>>> ??????????????? >>???? can just >>>> ??????????????? >> >>???? close >>>> ??????????????? >> >> > it and keep working. Everything seems fine. >>>> ??????????????? Is this normal? >>>> ??????????????? >> >> > >>>> ??????????????? >> >> > -- >>>> ??????????????? >> >> > R. Mark Volkmann >>>> ??????????????? >> >> > Object Computing, Inc. >>>> ??????????????? >> >> > >>>> ??????????????? >> >>???? --???? Cuis-dev mailing list >>>> ??????????????? >> >> Cuis-dev at lists.cuis.st >>>> ??????????????? >>>> ??????????????? >>> ??????????????? > >>>> ??????????????? >> >>> ??????????????? >>>> ??????????????? >>> >> >>>> ??????????????? >> >> https://lists.cuis.st/mailman/listinfo/cuis-dev >>>> ??????????????? >> >>>> ??????????????? >> >> >>> ??????????????? >> > >>>> ??????????????? >> >> >>>> ??????????????? >> >> >>>> ??????????????? >> >> >>>> ??????????????? >> >> -- >>>> ??????????????? >> >> R. Mark Volkmann >>>> ??????????????? >> >> Object Computing, Inc. >>>> ??????????????? >> >> >>>> ??????????????? >>???? -- >>>> ??????????????? >>???? Cuis-dev mailing list >>>> ??????????????? >> Cuis-dev at lists.cuis.st >>>> ??????????????? >>>> ??????????????? >>> ??????????????? > >>>> ??????????????? >> https://lists.cuis.st/mailman/listinfo/cuis-dev >>>> ??????????????? >> >>>> ??????????????? >> >>>> ??????????????? >> >>>> ??????????????? >> >>>> ??????????????? >> -- >>>> ??????????????? >> R. Mark Volkmann >>>> ??????????????? >> Object Computing, Inc. >>>> ??????????????? > >>>> ??????????????? > >>>> ??????????????? > -- >>>> ??????????????? > Juan Vuletich >>>> ??????????????? > cuis.st >>>> ??????????????? > github.com/jvuletich >>>> ??????????????? > researchgate.net/profile/Juan-Vuletich >>>> >>>> ??????????????? > independent.academia.edu/JuanVuletich >>>> >>>> ??????????????? > patents.justia.com/inventor/juan-manuel-vuletich >>>> >>>> ??????????????? > linkedin.com/in/juan-vuletich-75611b3 >>>> >>>> ??????????????? > twitter.com/JuanVuletich >>>> ??????????????? >>>> ??????????????? > >>>> ??????????????? > >>>> ??????????????? -- ??????????????? Cuis-dev mailing list >>>> ??????????????? Cuis-dev at lists.cuis.st >>>> https://lists.cuis.st/mailman/listinfo/cuis-dev >>>> >>>> >>>> >>>> ??????????? -- >>>> ??????????? Nicol?s Papagna >>>> ??????????? -- ??????????? Cuis-dev mailing list >>>> ??????????? Cuis-dev at lists.cuis.st >>>> ??????????? https://lists.cuis.st/mailman/listinfo/cuis-dev >>>> >>>> >>>> >>>> ??????? -- ??????? R. Mark Volkmann >>>> ??????? Object Computing, Inc. >>>> ??????? -- ??????? Cuis-dev mailing list >>>> ??????? Cuis-dev at lists.cuis.st >>>> ??????? https://lists.cuis.st/mailman/listinfo/cuis-dev >>> >>> >>> >>> ??? -- ??? R. Mark Volkmann >>> ??? Object Computing, Inc. >>> >>> >>> >>> -- >>> R. Mark Volkmann >>> Object Computing, Inc. >> >> >> > From r.mark.volkmann at gmail.com Sat Aug 10 08:23:25 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sat, 10 Aug 2024 10:23:25 -0500 Subject: [Cuis-dev] initial size of SystemWindow subclass In-Reply-To: References: Message-ID: I am calling openInWorld after creating my morph where all submorphs are added to it in its initialize method. Is there something I need to do to tell my morph to ?pack? its submorphs? --- R. Mark Volkmann Object Computing, Inc. > On Aug 10, 2024, at 9:36?AM, Hilaire Fernandes via Cuis-dev wrote: > Are you sending the #openInWorld message once you finished packing the widgets in the Window? > > Le 10/08/2024 ? 02:19, Mark Volkmann via Cuis-dev a ?crit : >> Thanks for that tip Jon! I made that change, but the issue with sizing the window to hold its contents still remains. Clicking an edge of the window fixes it. I'm thinking there must be a method I need to call on the SystemWindow after adding content to it so it will recalculate its size. > -- > GNU Dr. Geo > http://gnu.org/s/dr-geo/ > http://gnu-drgeo.blogspot.com/ > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From hernan.wilkinson at 10pines.com Sat Aug 10 08:34:17 2024 From: hernan.wilkinson at 10pines.com (=?UTF-8?Q?Hern=C3=A1n_Wilkinson?=) Date: Sat, 10 Aug 2024 12:34:17 -0300 Subject: [Cuis-dev] Remove #ifCanNotDebugDo: In-Reply-To: <09e4c7a4-018d-4ca4-89b4-4568ca4ad31f@free.fr> References: <09e4c7a4-018d-4ca4-89b4-4568ca4ad31f@free.fr> Message-ID: A quick method is a method that just returns self, true, false, an instance variable and, if my memory does not fail, -1, 0 and 1 Those methods are very common (around 1900 in the cuis image) so they are optimized, again if my memory serves me correctly, for the VM to run them faster. I do not remember if they are optimized in memory too. Cheers! Hernan. On Sat, Aug 10, 2024 at 11:23?AM Hilaire Fernandes via Cuis-dev < cuis-dev at lists.cuis.st> wrote: > Hi Hern?n, > > I may have miss something, but what is a quick method? > > Thanks > > Hilaire > Le 09/08/2024 ? 01:12, Hern?n Wilkinson via Cuis-dev a ?crit : > > due to the fact that now we can debug quick methods, > > -- > GNU Dr. Geohttp://gnu.org/s/dr-geo/http://gnu-drgeo.blogspot.com/ > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -- *Hern?n WilkinsonAgile Software Development, Teaching & Coaching* *Phone: +54-011*-4893-2057 *Twitter: @HernanWilkinson* *site: http://www.10Pines.com * Address: Alem 896, Floor 6, Buenos Aires, Argentina -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Sat Aug 10 10:18:00 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Sat, 10 Aug 2024 10:18:00 -0700 Subject: [Cuis-dev] adding a morph to start of LayoutMorph In-Reply-To: References: Message-ID: On 2024-08-09 17:54, Mark Volkmann via Cuis-dev wrote: > I want to add a morph as the first submorph in a LayoutMorph that > already has submorphs. > I thought the addMorphFront: method would do that, but it doesn't. No. addMorph{,Front,Back}: work with Z-Order (drawn back to front), not morphPosition. Comments in the code indicate morphs are always added to the right/bottom. As LayoutMorphs are typically setup in code when a window/panel is initialized, no one has asked for a convenience function to specify where you want a submorph in left-to-right/top-to-bottom spatial order. In writing code to do this you should learn about how submorphs are managed. HTH, -KenD From ken.dickey at whidbey.com Sat Aug 10 10:22:01 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Sat, 10 Aug 2024 10:22:01 -0700 Subject: [Cuis-dev] initial size of SystemWindow subclass In-Reply-To: References: Message-ID: On 2024-08-10 08:23, Mark Volkmann via Cuis-dev wrote: > I am calling openInWorld after creating my morph where all submorphs > are added to it in its initialize method. Is there something I need to > do to tell my morph to "pack" its submorphs? Note implementers of #layoutSubmorphs. Morph is different than, say, SystemWindow or LayoutMorph. What does the code say? HTH, -KenD From juan at cuis.st Sat Aug 10 11:34:55 2024 From: juan at cuis.st (Juan Vuletich) Date: Sat, 10 Aug 2024 15:34:55 -0300 Subject: [Cuis-dev] Space is low In-Reply-To: References: <1b5f7119-478a-4ee2-8db7-029e23f790b3@smallinteger.com> <7d0568f9-b16d-4724-a7a2-f0af0028562c@smallinteger.com> <17f2edd8-7890-4ada-9bad-0ec71908ccdf@smallinteger.com> <66980F3D.6090804@cuis.st> <31BAF037-4ED8-4EF1-9CD8-45E689078F16@gmail.com> <66B3D43F.70409@cuis.st> Message-ID: <66B7B2CF.4010408@cuis.st> Hi Gerald, I assume you can reproduce this consistently. If so, there is hope. Some reasonable questions are: 1) does this happen only if you save in full screen, but not if you save while in a regular OS window taking all the display? 2) Did this happen with previous update level of Cuis? 3) If so, is it related to updates #6569 and #6570? 4) What happens if you take them back? 5) Did you have Transcript open? If not, try again with Transcript open, and see if you get something there. I can't reproduce the problem, as it seems specific to your setup. I use a MacBook with an externa 3840 at 2160 display. I can't reproduce the problem, so now you can start debugging. See the code in #6569 and #6570. Print stuff to Transcript, including `DateAndTime now print` to see what's going on. You can also turn on "Transcript to file". It may turn up that this is a VM issue. I don't know. In any case, VM maintainers will need a better report than "huge memory consumption, some X11 errors and some VM errors". Hope this helps. On 8/10/2024 12:14 PM, Gerald Klix via Cuis-dev wrote: > Hi Juan, > > I just tried version 6578: > Once save the (Cuis) image with a display extent of 4320 at 3840 > and restart it, I get a huge memory consumption > some X11 errors and some VM errors. > > As with Haver I have to set a resource limit on the available > memory otherwise my machine will become unresponsive. > > Is there anything ? logs, sys-traces, what ever ? I can provide to help? > > > Best Regards, > > Gerald > > > --- snip --- > bear at speedy ~/H/Cuis7XBased> squeak --version > 5.0-202312181441-HVR_MVP_ALPHA5_WINKEY_2024-01-24 Wed Jan 24 10:28:30 > CET 2024 clang-13 [Production Spur 64-bit x86_64 VM] > CoInterpreter VMMaker.oscog-eem.3339 uuid: > b1c834e2-5de7-464c-aeb5-4f2a7b8812d6 Jan 24 2024 > StackToRegisterMappingCogit VMMaker.oscog-eem.3339 uuid: > b1c834e2-5de7-464c-aeb5-4f2a7b8812d6 Jan 24 2024 > VM: 202312181441-HVR_MVP_ALPHA5_WINKEY_2024-01-24 > bear at speedy:gitwork/opensmalltalk-vm > Date: Mon Dec 18 15:41:18 2023 CommitHash: 72a81c50c > Plugins: 202312181441-HVR_MVP_ALPHA5_WINKEY_2024-01-24 > bear at speedy:gitwork/opensmalltalk-vm > Linux speedy 5.10.0-27-amd64 #1 SMP Debian 5.10.205-2 (2023-12-31) > x86_64 GNU/ > > --- snip --- > bear at speedy ~/H/Cuis7XBased> squeak Cuis7.1-6578-w1.image -v > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 132 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 161 > System information: > Cuis7.1 > latest update: #6578 > Running at :/home/bear/HaverWorks/Cuis7XBased/Cuis7.1-6578-w1.image > > --- snap --- > bear at speedy ~/H/Cuis7XBased> ulimit -a > Maximum size of core files created (kB, > -c) 0 > Maximum size of a process?s data segment (kB, > -d) unlimited > Control of maximum nice priority (-e) 0 > Maximum size of files created by the shell (kB, > -f) unlimited > Maximum number of pending signals (-i) 127799 > Maximum size that may be locked into memory (kB, > -l) 64 > Maximum resident set size (kB, > -m) unlimited > Maximum number of open file descriptors (-n) 1024 > Maximum bytes in POSIX message queues (kB, > -q) 800 > Maximum realtime scheduling priority (-r) 2 > Maximum stack size (kB, > -s) 8192 > Maximum amount of CPU time in seconds (seconds, > -t) unlimited > Maximum number of processes available to current user (-u) 127799 > Maximum amount of virtual memory available to each process (kB, > -v) 20000000 > Maximum contiguous realtime CPU time (-y) unlimited > bear at speedy ~/H/Cuis7XBased> ulimit -v > 20000000 > > --- Schnipsel --- > bear at speedy ~/H/Cuis7XBased> squeak Cuis7.1-6578-w1.image > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 132 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 162 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 183 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 212 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 238 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 289 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 340 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 369 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 420 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 449 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 500 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 529 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 580 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 609 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 660 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 689 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 740 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 769 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 820 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 849 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 901 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 926 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 977 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 1006 > sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto mmap: Cannot > allocate memory > sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto mmap: Cannot > allocate memory > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 1059 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 1088 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 1139 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 1168 > shmat: Cannot allocate memory > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 1343 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 1495 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 1669 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 1948 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 2122 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 2403 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 2582 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 2861 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 3050 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 3331 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 3530 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 3813 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 4248 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 4400 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 4836 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 4928 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 4959 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 4999 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 5437 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 5589 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 6025 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 6050 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 6101 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 6126 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 6177 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 6202 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 6253 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 6278 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 6330 > X Error: BadWindow (invalid Window parameter) > Major opcode of failed request: 3 > Minor opcode of failed request: 0 > Serial number of failed request: 6482 > > ^C? > > On 8/10/24 12:07 PM, Gerald Klix via Cuis-dev wrote: >> I have similar issues with my Haver images, >> when I use my two UHD monitors together >> (Display extent: 4320 at 3840). >> >> Funny enough it never happens with a pristine Cuis image, >> there for I was convinced that I introduced that bug >> and did not report it. >> >> >> Best Regards, >> >> Gerald >> -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich From r.mark.volkmann at gmail.com Sat Aug 10 13:32:36 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sat, 10 Aug 2024 15:32:36 -0500 Subject: [Cuis-dev] initial size of SystemWindow subclass In-Reply-To: References: Message-ID: On Sat, Aug 10, 2024 at 12:22?PM wrote: > On 2024-08-10 08:23, Mark Volkmann via Cuis-dev wrote: > > > I am calling openInWorld after creating my morph where all submorphs > > are added to it in its initialize method. Is there something I need to > > do to tell my morph to "pack" its submorphs? > > Note implementers of #layoutSubmorphs. Morph is different than, say, > SystemWindow or LayoutMorph. What does the code say? > Let's take a very simple example: window := SystemWindow new. window addMorph: (LabelMorph new contents: 'Hello World'). window layoutSubmorphs. window openInWorld. The window will be much larger than what is required to hold the LabelMorph. Sending #layoutSubmorphs doesn't seem to affect the window size in this case. What can I do to tell the SystemWindow that I want its extent to be the minimum required to display its submorphs. Side note: I have spent hours digging through the source code trying to figure it out on my own. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cuis.01 at klix.ch Sat Aug 10 14:10:07 2024 From: cuis.01 at klix.ch (Gerald Klix) Date: Sat, 10 Aug 2024 23:10:07 +0200 Subject: [Cuis-dev] Space is low In-Reply-To: <66B7B2CF.4010408@cuis.st> References: <1b5f7119-478a-4ee2-8db7-029e23f790b3@smallinteger.com> <7d0568f9-b16d-4724-a7a2-f0af0028562c@smallinteger.com> <17f2edd8-7890-4ada-9bad-0ec71908ccdf@smallinteger.com> <66980F3D.6090804@cuis.st> <31BAF037-4ED8-4EF1-9CD8-45E689078F16@gmail.com> <66B3D43F.70409@cuis.st> <66B7B2CF.4010408@cuis.st> Message-ID: <4bdf2f72-cfb8-33fd-d677-9b4b5f04d8ff@klix.ch> Hi Juan, Yes it is consistent, hence the limited virtual memory. ad 1) This is not full-screen, it's exactly twice as much as your test machine, two 3840 at 2160 monitors in portrait mode side by side. If I safe Cuis/Haver in full-screen mode, this would be 2160 at 3840, which works fine. I also can use squeak -vm-display-X11 -fullscreenDirect corresponding to a display extent of 6240 at 3840. Sure enough the fault happens as described with this huge display. I tested it with the latest official squeak-vm, sure enough same problem, which is no surprise; my vm is derived from that one. Now comes the funny/sad part: In order to be helpful, I tried a setup with a virtual X-server (Xephyr). I wanted to provide some means to reproduce that bug on machines without a big screen. I can run it like this: Start Xephyr like Xephyr -screen 10000x10000 :1&, start a window manager in it (openbox), fire up the image save it in full-screen mode and it starts nicely in non-fullscreen-mode giving me a Display extent of 9992 at 9962. When I start this image with the saved big display using my normal X-Server the old heisenbug shows up again. It's now 22:40, tomorrow I will try this with FreeBSD on the same machine and on Linux using one of my two reserve development machines. Alas It also has an AMD-GPU, but an older one. ad 2) It did never happen with Cuis 7.0. It happens with Cuis 7.1 version 6541. It always happens with Haver. ad 3) Did not test yet, but I suspect: No, I have this this issue with Haver for over an year now. ad 4) N/A ad 5) When I activate transcript to file in the image with 9992 at 9962 running under Xephyr save it and restart it on my normal X server, the memory allocation loop finally terminates and I get the following transcript output: ----QUIT----(10 August 2024 22:47:31) Cuis7.1-6578-Xephyr.image priorSource: 1040586 Not enough memory to run VectorEngine. Using BitBltCanvas instead. Display allocation failed AFAIR it normally fails in Form>>#setExtent:depth: line: newBits := Bitmap new: (self bitsSizeForWidth: newWidth height: newHeight depth: newDepth abs). but my memory might be wrong. I am aware that DisplayScreen>>#getMainCanvas is responsible for that transcript message. HTH, Gerald On 8/10/24 8:34 PM, Juan Vuletich wrote: > Hi Gerald, > > I assume you can reproduce this consistently. If so, there is hope. > > Some reasonable questions are: 1) does this happen only if you save in > full screen, but not if you save while in a regular OS window taking > all the display? 2) Did this happen with previous update level of > Cuis? 3) If so, is it related to updates #6569 and #6570? 4) What > happens if you take them back? 5) Did you have Transcript open? If > not, try again with Transcript open, and see if you get something there. > > I can't reproduce the problem, as it seems specific to your setup. I > use a MacBook with an externa 3840 at 2160 display. I can't reproduce the > problem, so now you can start debugging. See the code in #6569 and > #6570. Print stuff to Transcript, including `DateAndTime now print` to > see what's going on. You can also turn on "Transcript to file". > > It may turn up that this is a VM issue. I don't know. In any case, VM > maintainers will need a better report than "huge memory consumption, > some X11 errors and some VM errors". > > Hope this helps. > > On 8/10/2024 12:14 PM, Gerald Klix via Cuis-dev wrote: >> Hi Juan, >> >> I just tried version 6578: >> Once save the (Cuis) image with a display extent of 4320 at 3840 >> and restart it, I get a huge memory consumption >> some X11 errors and some VM errors. >> >> As with Haver I have to set a resource limit on the available >> memory otherwise my machine will become unresponsive. >> >> Is there anything ? logs, sys-traces, what ever ? I can provide to help? >> >> >> Best Regards, >> >> Gerald >> >> >> --- snip --- >> bear at speedy ~/H/Cuis7XBased> squeak --version >> 5.0-202312181441-HVR_MVP_ALPHA5_WINKEY_2024-01-24? Wed Jan 24 >> 10:28:30 CET 2024 clang-13 [Production Spur 64-bit x86_64 VM] >> CoInterpreter VMMaker.oscog-eem.3339 uuid: >> b1c834e2-5de7-464c-aeb5-4f2a7b8812d6 Jan 24 2024 >> StackToRegisterMappingCogit VMMaker.oscog-eem.3339 uuid: >> b1c834e2-5de7-464c-aeb5-4f2a7b8812d6 Jan 24 2024 >> VM: 202312181441-HVR_MVP_ALPHA5_WINKEY_2024-01-24 >> bear at speedy:gitwork/opensmalltalk-vm >> Date: Mon Dec 18 15:41:18 2023 CommitHash: 72a81c50c >> Plugins: 202312181441-HVR_MVP_ALPHA5_WINKEY_2024-01-24 >> bear at speedy:gitwork/opensmalltalk-vm >> Linux speedy 5.10.0-27-amd64 #1 SMP Debian 5.10.205-2 (2023-12-31) >> x86_64 GNU/ >> >> --- snip --- >> bear at speedy ~/H/Cuis7XBased> squeak Cuis7.1-6578-w1.image -v >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 132 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 161 >> System information: >> Cuis7.1 >> latest update: #6578 >> Running at :/home/bear/HaverWorks/Cuis7XBased/Cuis7.1-6578-w1.image >> >> --- snap --- >> bear at speedy ~/H/Cuis7XBased> ulimit -a >> Maximum size of core files created (kB, -c) 0 >> Maximum size of a process?s data segment (kB, -d) unlimited >> Control of maximum nice priority (-e) 0 >> Maximum size of files created by the shell (kB, -f) unlimited >> Maximum number of pending signals (-i) 127799 >> Maximum size that may be locked into memory (kB, -l) 64 >> Maximum resident set size (kB, -m) unlimited >> Maximum number of open file descriptors (-n) 1024 >> Maximum bytes in POSIX message queues (kB, -q) 800 >> Maximum realtime scheduling priority (-r) 2 >> Maximum stack size (kB, -s) 8192 >> Maximum amount of CPU time in seconds (seconds, -t) unlimited >> Maximum number of processes available to current user (-u) 127799 >> Maximum amount of virtual memory available to each process (kB, -v) >> 20000000 >> Maximum contiguous realtime CPU time (-y) unlimited >> bear at speedy ~/H/Cuis7XBased> ulimit -v >> 20000000 >> >> --- Schnipsel --- >> bear at speedy ~/H/Cuis7XBased> squeak Cuis7.1-6578-w1.image >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 132 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 162 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 183 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 212 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 238 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 289 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 340 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 369 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 420 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 449 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 500 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 529 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 580 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 609 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 660 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 689 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 740 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 769 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 820 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 849 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 901 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 926 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 977 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 1006 >> sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto mmap: Cannot >> allocate memory >> sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto mmap: Cannot >> allocate memory >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 1059 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 1088 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 1139 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 1168 >> shmat: Cannot allocate memory >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 1343 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 1495 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 1669 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 1948 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 2122 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 2403 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 2582 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 2861 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 3050 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 3331 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 3530 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 3813 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 4248 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 4400 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 4836 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 4928 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 4959 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 4999 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 5437 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 5589 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 6025 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 6050 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 6101 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 6126 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 6177 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 6202 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 6253 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 6278 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 6330 >> X Error: BadWindow (invalid Window parameter) >> ? Major opcode of failed request:? 3 >> ? Minor opcode of failed request:? 0 >> ? Serial number of failed request: 6482 >> >> ^C? >> >> On 8/10/24 12:07 PM, Gerald Klix via Cuis-dev wrote: >>> I have similar issues with my Haver images, >>> when I use my two UHD monitors together >>> (Display extent:? 4320 at 3840). >>> >>> Funny enough it never happens with a pristine Cuis image, >>> there for I was convinced that I introduced that bug >>> and did not report it. >>> >>> >>> Best Regards, >>> >>> Gerald >>> > From ken.dickey at whidbey.com Sat Aug 10 14:35:48 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Sat, 10 Aug 2024 14:35:48 -0700 Subject: [Cuis-dev] initial size of SystemWindow subclass In-Reply-To: References: Message-ID: On 2024-08-10 13:32, Mark Volkmann via Cuis-dev wrote: > Sending #layoutSubmorphs doesn't seem to affect the window size in this > case. Nope. > What can I do to tell the SystemWindow that I want its extent to be the > minimum required to display its submorphs. The following works for me. Note that the last line must be sent _after_ openInWOrld. window := SystemWindow new. window addMorph: (LabelMorph new contents: 'Hello World'). window openInWorld. window morphExtent: window minimumExtent. > Side note: I have spent hours digging through the source code trying to > figure it out on my own. That is what I do. Sometimes I even learn things! Good on ya, -KenD From r.mark.volkmann at gmail.com Sat Aug 10 16:03:20 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sat, 10 Aug 2024 18:03:20 -0500 Subject: [Cuis-dev] initial size of SystemWindow subclass In-Reply-To: References: Message-ID: On Sat, Aug 10, 2024 at 4:35?PM wrote: > On 2024-08-10 13:32, Mark Volkmann via Cuis-dev wrote: > > > What can I do to tell the SystemWindow that I want its extent to be the > > minimum required to display its submorphs. > > The following works for me. Note that the last line must be sent > _after_ openInWOrld. > > window := SystemWindow new. > window addMorph: (LabelMorph new contents: 'Hello World'). > window openInWorld. > > window morphExtent: window minimumExtent. > THIS is the key thing I was looking for! -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Sat Aug 10 16:43:25 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Sat, 10 Aug 2024 16:43:25 -0700 Subject: [Cuis-dev] initial size of SystemWindow subclass In-Reply-To: References: Message-ID: <866cb967f22a1a1f0c5d00f0bf158add@whidbey.com> On 2024-08-10 16:03, Mark Volkmann via Cuis-dev wrote: > On Sat, Aug 10, 2024 at 4:35?PM wrote: .. >> window morphExtent: window minimumExtent. > > THIS is the key thing I was looking for! Great! Remember: World Menu > Open > Message Names .. name search (e.g. 'extent') is your friend. -KenD From r.mark.volkmann at gmail.com Sat Aug 10 16:45:59 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sat, 10 Aug 2024 18:45:59 -0500 Subject: [Cuis-dev] adding a morph to start of LayoutMorph In-Reply-To: References: Message-ID: On Sat, Aug 10, 2024 at 12:18?PM wrote: > On 2024-08-09 17:54, Mark Volkmann via Cuis-dev wrote: > > > I want to add a morph as the first submorph in a LayoutMorph that > > already has submorphs. > > I thought the addMorphFront: method would do that, but it doesn't. > > No. addMorph{,Front,Back}: work with Z-Order (drawn back to front), not > morphPosition. > > Comments in the code indicate morphs are always added to the > right/bottom. > > As LayoutMorphs are typically setup in code when a window/panel is > initialized, no one has asked for a convenience function to specify > where you want a submorph in left-to-right/top-to-bottom spatial order. > > In writing code to do this you should learn about how submorphs are > managed. > Okay, I did a deeper dive into the code and discovered the following: LayoutMorph addMorph: calls LayoutMorph addMorphFront: which calls Morph addMorphFront: which calls Morph privateAddMorph:atIndex: (with 1 for atIndex:) which calls Morph privateAddMorph:atIndex:position: (with nil for position:) This replaces the submorphs array with a new array where the morph being added is added at the beginning of the new array. It's not clear to me yet when adding it there is better than adding it at the end. For a vertical LayoutMorph, LayoutMorph layoutSubmorphs calls LayoutMorph layoutSubmorphsVerticallyIn:. That iterates over the visible morphs in reverse order (from first added to last added) and assigns a position to each visible submorph. Here is where I don't get the claim that addMorphFront and addMorphBack are all about Z-order. >From this code, for a vertical LayoutMorph, those methods seem to be all about Y-order since they control the order of the submorphs array and that is used to assign y coordinates to each of the submorphs. The main thing I learned is that if you want to add a morph to a vertical LayoutMorph and you want it to appear at the beginning of the vertical list of morphs, you need to use addMorphBack:. That last bit is what I was looking for all along. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Sat Aug 10 16:57:25 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sat, 10 Aug 2024 18:57:25 -0500 Subject: [Cuis-dev] TextEntryMorph content: method Message-ID: In my app I display a TextEntryMorph whose morphExtent is set to a specific width. The user enters text and clicks a button that adds the text to a list. The code then clears the TextEntryMorph by setting its content to an empty string. The TextEntryMorph contents: methods ends when these lines: self fitContents. self redrawNeeded This discards the width I set initially. I can fix this with the following: ext := todoEntry morphExtent. todoEntry contents: ''. todoEntry morphExtent: ext. Does it seem desirable for a text input to change its width based on its contents? I know that wouldn't normally happen in an HTML input element seen in a web-based form. I realize that I can add a new method to TextEntryMorph that does what contents: does and excludes those lines. I'm just surprised by the current default behavior. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hernan.wilkinson at 10pines.com Sat Aug 10 18:35:22 2024 From: hernan.wilkinson at 10pines.com (=?UTF-8?Q?Hern=C3=A1n_Wilkinson?=) Date: Sat, 10 Aug 2024 22:35:22 -0300 Subject: [Cuis-dev] Class>>#superclass: fix Message-ID: Hi, the #superclass: message was implemented in Class lately... that revealed an error that appears when running some refactorings that are not included in Cuis, in fact the refactoring is the IntroduceNullObject that is part of CuisUniversity. That refactoring changes the superclass of a class using the message #superclass: That message was only implemented in Behavior before and it did not change the subclasses of the old and new superclass, leaving inconsistent the hierarchy. Recently #superclass: was overwritten in Class removing the class from the old superclass subclasses but not adding it to the new superclass subclasses. This also leaves the hierarchy inconsistent, producing errors when removing a class category for example. Attached is a fix for that. It adds the class whose superclass is changed to the new superclass subclasses leaving the hierarchy cosistent. Cheers! Hernan. -- *Hern?n WilkinsonAgile Software Development, Teaching & Coaching* *Phone: +54-011*-4893-2057 *Twitter: @HernanWilkinson* *site: http://www.10Pines.com * Address: Alem 896, Floor 6, Buenos Aires, Argentina -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 6579-ChangeSuperclassFix-HernanWilkinson-2024Aug10-22h19m-HAW.001.cs.st Type: application/octet-stream Size: 558 bytes Desc: not available URL: From hfern at free.fr Sun Aug 11 00:57:47 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Sun, 11 Aug 2024 09:57:47 +0200 Subject: [Cuis-dev] Bouncing Atoms - couple of small bugs In-Reply-To: References: Message-ID: <332ae537-d701-45a6-a583-3215fa74cc43@free.fr> Thanks Barry, Changes committed -- GNU Dr. Geo http://gnu.org/s/dr-geo/ http://gnu-drgeo.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfern at free.fr Sun Aug 11 01:07:28 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Sun, 11 Aug 2024 10:07:28 +0200 Subject: [Cuis-dev] adding a morph to start of LayoutMorph In-Reply-To: References: Message-ID: <24fb15fa-8036-42ba-a49a-7a6e964c2742@free.fr> In a LayoutMorph, Z-order does not matter because as the submorphs are layout in column or row, they never overlap. In the LayoutMorph protocol, it would be better if all alternatives to addMorph: as addMorphBack, addMorphFront, etc be be marked as #shouldNoBeImplemented. It will clarify the protocol for the users. Opinion? Le 11/08/2024 ? 01:45, Mark Volkmann via Cuis-dev a ?crit?: > Here is where I don't get the claim that addMorphFront and > addMorphBack are all about Z-order. > From this code, for a vertical LayoutMorph, those methods seem to be > all about Y-order > since they control the order of the submorphs array -- GNU Dr. Geo http://gnu.org/s/dr-geo/ http://gnu-drgeo.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfern at free.fr Sun Aug 11 01:11:10 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Sun, 11 Aug 2024 10:11:10 +0200 Subject: [Cuis-dev] adding a morph to start of LayoutMorph In-Reply-To: References: Message-ID: I will not rely on that understanding, because the meaning of addMorphBack: is really about z-ordering which does not apply to LayoutMoprh and the behavior may change unpredictably in the future Le 11/08/2024 ? 01:45, Mark Volkmann via Cuis-dev a ?crit?: > The main thing I learned is that if you want to add a morph to a > vertical LayoutMorph > and you want it to appear at the beginning of the vertical list of morphs, > you need to use addMorphBack:. > That last bit is what I was looking for all along. -- GNU Dr. Geo http://gnu.org/s/dr-geo/ http://gnu-drgeo.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Sun Aug 11 06:39:51 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sun, 11 Aug 2024 08:39:51 -0500 Subject: [Cuis-dev] adding a morph to start of LayoutMorph In-Reply-To: References: Message-ID: I feel like there must be some way to add a submorph to a LayoutMorph so that it appears at the beginning of a row or column. It doesn't matter to me what that method is called, but I think it needs to exist. On Sun, Aug 11, 2024 at 3:11?AM Hilaire Fernandes via Cuis-dev < cuis-dev at lists.cuis.st> wrote: > I will not rely on that understanding, because the meaning of > addMorphBack: is really about z-ordering which does not apply to > LayoutMoprh and the behavior may change unpredictably in the future > Le 11/08/2024 ? 01:45, Mark Volkmann via Cuis-dev a ?crit : > > The main thing I learned is that if you want to add a morph to a vertical > LayoutMorph > and you want it to appear at the beginning of the vertical list of morphs, > you need to use addMorphBack:. > That last bit is what I was looking for all along. > > -- > GNU Dr. Geohttp://gnu.org/s/dr-geo/http://gnu-drgeo.blogspot.com/ > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Sun Aug 11 06:42:03 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sun, 11 Aug 2024 08:42:03 -0500 Subject: [Cuis-dev] adding a morph to start of LayoutMorph In-Reply-To: References: Message-ID: My current use case is that I have a list of todo items. When a new todo is added, I want it to appear at the beginning of the list. On Sun, Aug 11, 2024 at 8:39?AM Mark Volkmann wrote: > I feel like there must be some way to add a submorph to a LayoutMorph > so that it appears at the beginning of a row or column. It doesn't matter > to me what that method is called, but I think it needs to exist. > > On Sun, Aug 11, 2024 at 3:11?AM Hilaire Fernandes via Cuis-dev < > cuis-dev at lists.cuis.st> wrote: > >> I will not rely on that understanding, because the meaning of >> addMorphBack: is really about z-ordering which does not apply to >> LayoutMoprh and the behavior may change unpredictably in the future >> Le 11/08/2024 ? 01:45, Mark Volkmann via Cuis-dev a ?crit : >> >> The main thing I learned is that if you want to add a morph to a vertical >> LayoutMorph >> and you want it to appear at the beginning of the vertical list of morphs, >> you need to use addMorphBack:. >> That last bit is what I was looking for all along. >> >> -- >> GNU Dr. Geohttp://gnu.org/s/dr-geo/http://gnu-drgeo.blogspot.com/ >> >> -- >> Cuis-dev mailing list >> Cuis-dev at lists.cuis.st >> https://lists.cuis.st/mailman/listinfo/cuis-dev >> > > > -- > R. Mark Volkmann > Object Computing, Inc. > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Sun Aug 11 07:10:08 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Sun, 11 Aug 2024 07:10:08 -0700 Subject: [Cuis-dev] TextEntryMorph content: method In-Reply-To: References: Message-ID: <8d87bf93eb7049300e4f862d9720d7d1@whidbey.com> On 2024-08-10 16:57, Mark Volkmann via Cuis-dev wrote: > Does it seem desirable for a text input to change its width based on > its contents? When you increase font size or add significant text, would you prefer it be drawn "off the end" or truncated? I prefer that the TextEntryMorph grow to contain its contents. Yes, alternate this behavior is a good case for subclassing. HTH, -KenD From ken.dickey at whidbey.com Sun Aug 11 07:26:17 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Sun, 11 Aug 2024 07:26:17 -0700 Subject: [Cuis-dev] adding a morph to start of LayoutMorph In-Reply-To: References: Message-ID: <0059d175996929f2c4d0c955dc3ce238@whidbey.com> On 2024-08-11 06:42, Mark Volkmann via Cuis-dev wrote: > My current use case is that I have a list of todo items. When a new > todo is added, I want it to appear at the beginning of the list. Hey, how hard can it be? ;^) -KenD vvv===vvv===vvv addMorphTopOrLeft: aMorph "Add a submorph, at the top or left, with a default LayoutSpec if none was provided." aMorph isPlacedMorph ifFalse: [ self error: 'Only PlacedMorphs can be used in Layouts' ]. aMorph layoutSpec. super addMorphBack: aMorph. self layoutSubmorphs ^^^===^^^===^^^ -------------- next part -------------- 'From Cuis7.1 [latest update: #6566] on 11 August 2024 at 7:23:18 am'! !LayoutMorph methodsFor: 'submorphs-add/remove' stamp: 'KenD 8/11/2024 07:22:55'! addMorphTopOrLeft: aMorph "Add a submorph, at the top or left, with a default LayoutSpec if none was provided." aMorph isPlacedMorph ifFalse: [ self error: 'Only PlacedMorphs can be used in Layouts' ]. aMorph layoutSpec. super addMorphBack: aMorph. self layoutSubmorphs! ! From r.mark.volkmann at gmail.com Sun Aug 11 12:05:38 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sun, 11 Aug 2024 14:05:38 -0500 Subject: [Cuis-dev] TextEntryMorph content: method In-Reply-To: <8d87bf93eb7049300e4f862d9720d7d1@whidbey.com> References: <8d87bf93eb7049300e4f862d9720d7d1@whidbey.com> Message-ID: I see now that what I really want is this: todoEntry layoutSpec fixedWidth: 200 With that in place, setting the content to an empty string to clear it does not collapse the width of the TextEntryMorph. On Sun, Aug 11, 2024 at 9:10?AM wrote: > On 2024-08-10 16:57, Mark Volkmann via Cuis-dev wrote: > > > Does it seem desirable for a text input to change its width based on > > its contents? > > When you increase font size or add significant text, would you prefer it > be drawn "off the end" or truncated? > > I prefer that the TextEntryMorph grow to contain its contents. > > Yes, alternate this behavior is a good case for subclassing. > > HTH, > -KenD > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Sun Aug 11 12:12:59 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Sun, 11 Aug 2024 12:12:59 -0700 Subject: [Cuis-dev] TextEntryMorph content: method In-Reply-To: References: <8d87bf93eb7049300e4f862d9720d7d1@whidbey.com> Message-ID: <01a8f70b6530c4fdb3b5d42469da9257@whidbey.com> On 2024-08-11 12:05, Mark Volkmann wrote: > I see now that what I really want is this: > > todoEntry layoutSpec fixedWidth: 200 > > With that in place, setting the content to an empty string to clear it > does not collapse the width of the TextEntryMorph. Good solution! -KenD From r.mark.volkmann at gmail.com Sun Aug 11 12:54:43 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sun, 11 Aug 2024 14:54:43 -0500 Subject: [Cuis-dev] CheckButtonMoprh and fillColor Message-ID: I'm struggling to understand the use of fillColor in CheckButtonMorph after studying the code for an hour. For example: cb := CheckButtonMorph new. cb fillColor: Color white. cb openInWorld. This will display a checkbox with a black, rounded border filled with white. If you hover over it, the fill color will change to gray. I see where that happens in the code. It is the border color with 50% opacity. If you move the mouse outside the checkbox, it will change to be filled with black. Is this intended? I'm trying to find a way to get it to return to the fill color I specified which is white. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Sun Aug 11 13:26:27 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sun, 11 Aug 2024 15:26:27 -0500 Subject: [Cuis-dev] CheckButtonMoprh and fillColor In-Reply-To: References: Message-ID: I suspect the issue is that there are methods CheckButtonMorph that use borderColor when they should use fillColor. On Sun, Aug 11, 2024 at 2:54?PM Mark Volkmann wrote: > I'm struggling to understand the use of fillColor in CheckButtonMorph > after studying the code for an hour. For example: > > cb := CheckButtonMorph new. > cb fillColor: Color white. > cb openInWorld. > > This will display a checkbox with a black, rounded border filled with > white. > If you hover over it, the fill color will change to gray. > I see where that happens in the code. It is the border color with 50% > opacity. > > If you move the mouse outside the checkbox, it will change to be filled > with black. > Is this intended? I'm trying to find a way to get it to return to the fill > color I specified which is white. > > -- > R. Mark Volkmann > Object Computing, Inc. > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Sun Aug 11 13:57:28 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Sun, 11 Aug 2024 13:57:28 -0700 Subject: [Cuis-dev] CheckButtonMoprh and fillColor In-Reply-To: References: Message-ID: On 2024-08-11 12:54, Mark Volkmann via Cuis-dev wrote: > I'm struggling to understand the use of fillColor in CheckButtonMorph > after studying the code for an hour. For example: > > cb := CheckButtonMorph new. > cb fillColor: Color white. > cb openInWorld. > > This will display a checkbox with a black, rounded border filled with > white. > If you hover over it, the fill color will change to gray. > I see where that happens in the code. It is the border color with 50% > opacity. > > If you move the mouse outside the checkbox, it will change to be filled > with black. > Is this intended? I'm trying to find a way to get it to return to the > fill color I specified which is white. Looking at the code, I see that fillColor is transitory -- it changes with the state of the CheckButtonMorph. Perhaps try: Feature require: 'UI-MetaProperties'. CheckButtonMorph example1 openInWorld. Use the "Change Scale" construction handle to make it bigger. Then open the checkButtonMorph's menu and click the pushpin. As you move the mouse in and out over the checkButton and click it to change its state, you will see the fillColor change. Use the menu to change the #color and #borderColor to get what you want (e.g. color yellow, borderColor lime green). Play with it a bit more to see how the checkButton is expected to work with mouseover & mouseup/click. HTH, -KenD From r.mark.volkmann at gmail.com Sun Aug 11 14:24:58 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sun, 11 Aug 2024 16:24:58 -0500 Subject: [Cuis-dev] CheckButtonMoprh and fillColor In-Reply-To: References: Message-ID: On Sun, Aug 11, 2024 at 3:57?PM wrote: > On 2024-08-11 12:54, Mark Volkmann via Cuis-dev wrote: > > > I'm struggling to understand the use of fillColor in CheckButtonMorph > > after studying the code for an hour. For example: > > > > cb := CheckButtonMorph new. > > cb fillColor: Color white. > > cb openInWorld. > > > > This will display a checkbox with a black, rounded border filled with > > white. > > If you hover over it, the fill color will change to gray. > > I see where that happens in the code. It is the border color with 50% > > opacity. > > > > If you move the mouse outside the checkbox, it will change to be filled > > with black. > > Is this intended? I'm trying to find a way to get it to return to the > > fill color I specified which is white. > > Looking at the code, I see that fillColor is transitory -- it changes > with the state of the CheckButtonMorph. > > Perhaps try: > > Feature require: 'UI-MetaProperties'. > CheckButtonMorph example1 openInWorld. > > Use the "Change Scale" construction handle to make it bigger. > Then open the checkButtonMorph's menu and click the pushpin. > As you move the mouse in and out over the checkButton and click it to > change its state, you will see the fillColor change. > Use the menu to change the #color and #borderColor to get what you want > (e.g. color yellow, borderColor lime green). > Play with it a bit more to see how the checkButton is expected to work > with mouseover & mouseup/click. > That was helpful! I see now that by default: - It is initially filled with the border color and that represents being unchecked. - Hovering over it changes the fill to be the border color with 50% opacity. - Clicking it causes the fill to change to the value of the color instance variable (defaults to white) and display a checkmark that is always black. - There is no point in setting the fillColor instance variable because it will just get changed as soon as you hover over the morph. I think I want something that behaves more like a browser checkbox or like the checkboxes in the morph menu items "resist being picked up" and "be locked". Just an opinion, but having a checkbox that is filled when not checked might make some users think it is checked. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hernan.wilkinson at 10pines.com Sun Aug 11 17:06:19 2024 From: hernan.wilkinson at 10pines.com (=?UTF-8?Q?Hern=C3=A1n_Wilkinson?=) Date: Sun, 11 Aug 2024 21:06:19 -0300 Subject: [Cuis-dev] Rename class menu Message-ID: Hi, attached is a change set that puts the rename class menu option into the refactoring menu. Cheers! Hernan. -- *Hern?n WilkinsonAgile Software Development, Teaching & Coaching* *Phone: +54-011*-4893-2057 *Twitter: @HernanWilkinson* *site: http://www.10Pines.com * Address: Alem 896, Floor 6, Buenos Aires, Argentina -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 6581-RenameClassToRefactoringMenu-HernanWilkinson-2024Aug11-21h01m-HAW.001.cs.st Type: application/octet-stream Size: 4448 bytes Desc: not available URL: From juan at cuis.st Mon Aug 12 05:32:25 2024 From: juan at cuis.st (Juan Vuletich) Date: Mon, 12 Aug 2024 09:32:25 -0300 Subject: [Cuis-dev] adding a morph to start of LayoutMorph In-Reply-To: References: Message-ID: <66BA00D9.3050308@cuis.st> On 8/10/2024 11:34 AM, Hilaire Fernandes via Cuis-dev wrote: > > By the way Juan, addMorph: and addMorphFront are perfect twins. Any > reason to not let addMorph: send the message addMorphFront: to self? Yep. Right. Just pushed the update. Thanks! -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich From cuis.01 at klix.ch Mon Aug 12 05:40:52 2024 From: cuis.01 at klix.ch (Gerald Klix) Date: Mon, 12 Aug 2024 14:40:52 +0200 Subject: [Cuis-dev] Space is low In-Reply-To: <4bdf2f72-cfb8-33fd-d677-9b4b5f04d8ff@klix.ch> References: <7d0568f9-b16d-4724-a7a2-f0af0028562c@smallinteger.com> <17f2edd8-7890-4ada-9bad-0ec71908ccdf@smallinteger.com> <66980F3D.6090804@cuis.st> <31BAF037-4ED8-4EF1-9CD8-45E689078F16@gmail.com> <66B3D43F.70409@cuis.st> <66B7B2CF.4010408@cuis.st> <4bdf2f72-cfb8-33fd-d677-9b4b5f04d8ff@klix.ch> Message-ID: <20240812144052.3e0adcf6@speedy.fast.klix.wow> Hi Juan, I tested the this issue with FreeBSD on the same (development) machine and with Devuan Daedalus on another machine. My development machine runs Devuan Chimaera. It works perfectly on the other machine. With FreeBSD 14 the same error occurs. The VM for FreeBSD is essentialy the Linux VM, I only disabled the frame-buffer interface. FreeBSD has the newest X-Server version. I presume this is related to a buggy X11 implementation or some X11 protocoll corner case the VM does not handle correctly. Since I can not provide instructions to reproduce this issue ? after all it works with Xephyr ? I suggest I'll watch this issue and when I'll find some means to reproduce it I'll file an error. HTH, Gerald PS: Just before sending this e-mail, I tried the same stunt with the Squeak 6 version at hand. It works. --- X11 versions --- Hape02 ====== Referred to as ?the other machine?. bear at hape02 ~> sudo Xorg -version X.Org X Server 1.21.1.7 X Protocol Version 11, Revision 0 Current Operating System: Linux hape02 6.1.0-23-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.99-1 (2024-07-15) x86_64 Kernel command line: BOOT_IMAGE=/@rootfs/boot/vmlinuz-6.1.0-23-amd64 root=UUID=9abcba3f-4d1e-43d7-b63d-a132346c8301 ro rootflags=subvol=@rootfs quiet xorg-server 2:21.1.7-3+deb12u7devuan1 (https://www.devuan.org/os/community) Current version of pixman: 0.42.2 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. Speedy ====== My ?development machine?. Linux ----- bear at speedy ~ [127]> sudo Xorg -version [sudo] password for bear: X.Org X Server 1.20.11 X Protocol Version 11, Revision 0 Build Operating System: linux Debian Current Operating System: Linux speedy 5.10.0-31-amd64 #1 SMP Debian 5.10.221-1 (2024-07-14) x86_64 Kernel command line: dozfs=force root=ZFS=zos/root/devuan pcie_aspm=off rw initrd=devuan\initrd.img-5.10.0-31-amd64 Build Date: 10 April 2024 08:59:35AM xorg-server 2:1.20.11-1+deb11u13 (https://www.debian.org/support) Current version of pixman: 0.40.0 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. FreeBSD ------- bear at speedy ~ [1]> sudo Xorg -version X.Org X Server 1.21.1.13 X Protocol Version 11, Revision 0 Current Operating System: FreeBSD speedy 14.1-RELEASE-p3 FreeBSD 14.1-RELEASE-p3 GENERIC amd64 Current version of pixman: 0.42.2 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. On Sat, 10 Aug 2024 23:10:07 +0200 Gerald Klix via Cuis-dev wrote: > Hi Juan, > > Yes it is consistent, hence the limited virtual memory. > > ad 1) This is not full-screen, it's exactly twice as much as your test > machine, > two 3840 at 2160 monitors in portrait mode side by side. > If I safe Cuis/Haver in full-screen mode, this would be 2160 at 3840, > which works fine. I also can use squeak -vm-display-X11 -fullscreenDirect > corresponding to a display extent of 6240 at 3840. Sure enough the fault > happens as described with this huge display. > > I tested it with the latest official squeak-vm, sure enough same problem, > which is no surprise; my vm is derived from that one. > > Now comes the funny/sad part: > In order to be helpful, I tried a setup with a virtual X-server (Xephyr). > I wanted to provide some means to reproduce that bug on machines > without a big screen. > > I can run it like this: > Start Xephyr like Xephyr -screen 10000x10000 :1&, > start a window manager in it (openbox), fire up the image > save it in full-screen mode and it starts nicely in non-fullscreen-mode > giving me a Display extent of 9992 at 9962. > > When I start this image with the saved big display using my normal X-Server > the old heisenbug shows up again. > > It's now 22:40, tomorrow I will try this with FreeBSD on the same machine > and on Linux using one of my two reserve development machines. > Alas It also has an AMD-GPU, but an older one. > > ad 2) It did never happen with Cuis 7.0. It happens with Cuis 7.1 > version 6541. > It always happens with Haver. > > ad 3) Did not test yet, but I suspect: No, I have this this issue with > Haver for over an year now. > > ad 4) N/A > > ad 5) When I activate transcript to file in the image with 9992 at 9962 > running under Xephyr > save it and restart it on my normal X server, the memory allocation loop > finally terminates > and I get the following transcript output: > > ----QUIT----(10 August 2024 22:47:31) Cuis7.1-6578-Xephyr.image > priorSource: 1040586 > Not enough memory to run VectorEngine. Using BitBltCanvas instead. > Display allocation failed > > AFAIR it normally fails in Form>>#setExtent:depth: > line: > newBits := Bitmap new: (self bitsSizeForWidth: newWidth height: > newHeight depth: newDepth abs). > but my memory might be wrong. I am aware that DisplayScreen>>#getMainCanvas > is responsible for that transcript message. > > > HTH, > > Gerald > > > > On 8/10/24 8:34 PM, Juan Vuletich wrote: > > Hi Gerald, > > > > I assume you can reproduce this consistently. If so, there is hope. > > > > Some reasonable questions are: 1) does this happen only if you save in > > full screen, but not if you save while in a regular OS window taking > > all the display? 2) Did this happen with previous update level of > > Cuis? 3) If so, is it related to updates #6569 and #6570? 4) What > > happens if you take them back? 5) Did you have Transcript open? If > > not, try again with Transcript open, and see if you get something there. > > > > I can't reproduce the problem, as it seems specific to your setup. I > > use a MacBook with an externa 3840 at 2160 display. I can't reproduce the > > problem, so now you can start debugging. See the code in #6569 and > > #6570. Print stuff to Transcript, including `DateAndTime now print` to > > see what's going on. You can also turn on "Transcript to file". > > > > It may turn up that this is a VM issue. I don't know. In any case, VM > > maintainers will need a better report than "huge memory consumption, > > some X11 errors and some VM errors". > > > > Hope this helps. > > > > On 8/10/2024 12:14 PM, Gerald Klix via Cuis-dev wrote: > >> Hi Juan, > >> > >> I just tried version 6578: > >> Once save the (Cuis) image with a display extent of 4320 at 3840 > >> and restart it, I get a huge memory consumption > >> some X11 errors and some VM errors. > >> > >> As with Haver I have to set a resource limit on the available > >> memory otherwise my machine will become unresponsive. > >> > >> Is there anything ? logs, sys-traces, what ever ? I can provide to help? > >> > >> > >> Best Regards, > >> > >> Gerald > >> > >> > >> --- snip --- > >> bear at speedy ~/H/Cuis7XBased> squeak --version > >> 5.0-202312181441-HVR_MVP_ALPHA5_WINKEY_2024-01-24? Wed Jan 24 > >> 10:28:30 CET 2024 clang-13 [Production Spur 64-bit x86_64 VM] > >> CoInterpreter VMMaker.oscog-eem.3339 uuid: > >> b1c834e2-5de7-464c-aeb5-4f2a7b8812d6 Jan 24 2024 > >> StackToRegisterMappingCogit VMMaker.oscog-eem.3339 uuid: > >> b1c834e2-5de7-464c-aeb5-4f2a7b8812d6 Jan 24 2024 > >> VM: 202312181441-HVR_MVP_ALPHA5_WINKEY_2024-01-24 > >> bear at speedy:gitwork/opensmalltalk-vm > >> Date: Mon Dec 18 15:41:18 2023 CommitHash: 72a81c50c > >> Plugins: 202312181441-HVR_MVP_ALPHA5_WINKEY_2024-01-24 > >> bear at speedy:gitwork/opensmalltalk-vm > >> Linux speedy 5.10.0-27-amd64 #1 SMP Debian 5.10.205-2 (2023-12-31) > >> x86_64 GNU/ > >> > >> --- snip --- > >> bear at speedy ~/H/Cuis7XBased> squeak Cuis7.1-6578-w1.image -v > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 132 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 161 > >> System information: > >> Cuis7.1 > >> latest update: #6578 > >> Running at :/home/bear/HaverWorks/Cuis7XBased/Cuis7.1-6578-w1.image > >> > >> --- snap --- > >> bear at speedy ~/H/Cuis7XBased> ulimit -a > >> Maximum size of core files created (kB, -c) 0 > >> Maximum size of a process?s data segment (kB, -d) unlimited > >> Control of maximum nice priority (-e) 0 > >> Maximum size of files created by the shell (kB, -f) unlimited > >> Maximum number of pending signals (-i) 127799 > >> Maximum size that may be locked into memory (kB, -l) 64 > >> Maximum resident set size (kB, -m) unlimited > >> Maximum number of open file descriptors (-n) 1024 > >> Maximum bytes in POSIX message queues (kB, -q) 800 > >> Maximum realtime scheduling priority (-r) 2 > >> Maximum stack size (kB, -s) 8192 > >> Maximum amount of CPU time in seconds (seconds, -t) unlimited > >> Maximum number of processes available to current user (-u) 127799 > >> Maximum amount of virtual memory available to each process (kB, -v) > >> 20000000 > >> Maximum contiguous realtime CPU time (-y) unlimited > >> bear at speedy ~/H/Cuis7XBased> ulimit -v > >> 20000000 > >> > >> --- Schnipsel --- > >> bear at speedy ~/H/Cuis7XBased> squeak Cuis7.1-6578-w1.image > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 132 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 162 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 183 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 212 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 238 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 289 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 340 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 369 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 420 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 449 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 500 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 529 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 580 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 609 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 660 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 689 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 740 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 769 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 820 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 849 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 901 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 926 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 977 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 1006 > >> sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto mmap: Cannot > >> allocate memory > >> sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto mmap: Cannot > >> allocate memory > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 1059 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 1088 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 1139 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 1168 > >> shmat: Cannot allocate memory > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 1343 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 1495 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 1669 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 1948 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 2122 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 2403 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 2582 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 2861 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 3050 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 3331 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 3530 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 3813 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 4248 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 4400 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 4836 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 4928 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 4959 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 4999 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 5437 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 5589 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 6025 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 6050 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 6101 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 6126 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 6177 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 6202 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 6253 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 6278 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 6330 > >> X Error: BadWindow (invalid Window parameter) > >> ? Major opcode of failed request:? 3 > >> ? Minor opcode of failed request:? 0 > >> ? Serial number of failed request: 6482 > >> > >> ^C? > >> > >> On 8/10/24 12:07 PM, Gerald Klix via Cuis-dev wrote: > >>> I have similar issues with my Haver images, > >>> when I use my two UHD monitors together > >>> (Display extent:? 4320 at 3840). > >>> > >>> Funny enough it never happens with a pristine Cuis image, > >>> there for I was convinced that I introduced that bug > >>> and did not report it. > >>> > >>> > >>> Best Regards, > >>> > >>> Gerald > >>> > > > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev From juan at cuis.st Mon Aug 12 05:57:31 2024 From: juan at cuis.st (Juan Vuletich) Date: Mon, 12 Aug 2024 09:57:31 -0300 Subject: [Cuis-dev] adding a morph to start of LayoutMorph In-Reply-To: <0059d175996929f2c4d0c955dc3ce238@whidbey.com> References: <0059d175996929f2c4d0c955dc3ce238@whidbey.com> Message-ID: <66BA06BB.3010001@cuis.st> On 8/11/2024 11:26 AM, ken.dickey--- via Cuis-dev wrote: > On 2024-08-11 06:42, Mark Volkmann via Cuis-dev wrote: > >> My current use case is that I have a list of todo items. When a new >> todo is added, I want it to appear at the beginning of the list. > > Hey, how hard can it be? > > ;^) > -KenD > vvv===vvv===vvv > addMorphTopOrLeft: aMorph > "Add a submorph, at the top or left, with a default LayoutSpec if > none was provided." > > aMorph isPlacedMorph ifFalse: [ self error: 'Only PlacedMorphs can > be used in Layouts' ]. > aMorph layoutSpec. > super addMorphBack: aMorph. > self layoutSubmorphs > ^^^===^^^===^^^ Thanks Ken. I pushed this to GitHub, but I preferred to call it #addMorphBack:. It is consistent with the rest of the protocol in LayoutMorph, and the idea that by default #addMorph: adds the new Morph "on top", and "last" (i.e. right/bottom in LayoutMorphs). Thanks, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich From juan at cuis.st Mon Aug 12 06:04:18 2024 From: juan at cuis.st (Juan Vuletich) Date: Mon, 12 Aug 2024 10:04:18 -0300 Subject: [Cuis-dev] Class>>#superclass: fix In-Reply-To: References: Message-ID: <66BA0852.3010208@cuis.st> Thanks Hern?n. This was pushed to GitHub. On 8/10/2024 10:35 PM, Hern?n Wilkinson via Cuis-dev wrote: > Hi, > the #superclass: message was implemented in Class lately... that > revealed an error that appears when running some refactorings that are > not included in Cuis, in fact the refactoring is > the IntroduceNullObject that is part of CuisUniversity. > That refactoring changes the superclass of a class using the message > #superclass: > That message was only implemented in Behavior before and it did not > change the subclasses of the old and new > superclass, leaving inconsistent the hierarchy. > Recently #superclass: was overwritten in Class removing the class > from the old superclass subclasses but not adding it to the new > superclass subclasses. This also leaves the hierarchy inconsistent, > producing errors when removing a class category for example. > Attached is a fix for that. It adds the class whose superclass is > changed to the new superclass subclasses leaving the hierarchy cosistent. > > Cheers! > Hernan. > > -- > *Hern?n Wilkinson > Agile Software Development, Teaching & Coaching* > *Phone: +54-011*-4893-2057 > *Twitter: @HernanWilkinson* > *site: http://www.10Pines.com * > Address: Alem 896, Floor 6, Buenos Aires, Argentina -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Mon Aug 12 06:04:34 2024 From: juan at cuis.st (Juan Vuletich) Date: Mon, 12 Aug 2024 10:04:34 -0300 Subject: [Cuis-dev] Rename class menu In-Reply-To: References: Message-ID: <66BA0862.1000201@cuis.st> Thanks Hern?n. This was pushed to GitHub. On 8/11/2024 9:06 PM, Hern?n Wilkinson via Cuis-dev wrote: > Hi, > attached is a change set that puts the rename class menu option into > the refactoring menu. > > Cheers! > Hernan. > > > -- > *Hern?n Wilkinson > Agile Software Development, Teaching & Coaching* > *Phone: +54-011*-4893-2057 > *Twitter: @HernanWilkinson* > *site: http://www.10Pines.com * > Address: Alem 896, Floor 6, Buenos Aires, Argentina -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Mon Aug 12 06:18:25 2024 From: juan at cuis.st (Juan Vuletich) Date: Mon, 12 Aug 2024 10:18:25 -0300 Subject: [Cuis-dev] initial size of SystemWindow subclass In-Reply-To: References: Message-ID: <66BA0BA1.3030508@cuis.st> On 8/10/2024 5:32 PM, Mark Volkmann via Cuis-dev wrote: > On Sat, Aug 10, 2024 at 12:22?PM > wrote: > > On 2024-08-10 08:23, Mark Volkmann via Cuis-dev wrote: > > > I am calling openInWorld after creating my morph where all > submorphs > > are added to it in its initialize method. Is there something I > need to > > do to tell my morph to "pack" its submorphs? > > Note implementers of #layoutSubmorphs. Morph is different than, say, > SystemWindow or LayoutMorph. What does the code say? > > > Let's take a very simple example: > > window := SystemWindow new. > window addMorph: (LabelMorph new contents: 'Hello World'). > window layoutSubmorphs. > window openInWorld. > > The window will be much larger than what is required to hold the > LabelMorph. > Sending #layoutSubmorphs doesn't seem to affect the window size in > this case. > What can I do to tell the SystemWindow that I want its extent to be > the minimum required to display its submorphs. > Side note: I have spent hours digging through the source code trying > to figure it out on my own. Yes. And as you grow your Smalltalk-fu you'll become more and more effective at this. This is the real power of Smalltalk. > -- > R. Mark Volkmann > Object Computing, Inc. Cheers, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Mon Aug 12 06:29:51 2024 From: juan at cuis.st (Juan Vuletich) Date: Mon, 12 Aug 2024 10:29:51 -0300 Subject: [Cuis-dev] LayoutMorph and offAxisEdgeWeight In-Reply-To: References: Message-ID: <66BA0E4F.30907@cuis.st> On 8/4/2024 6:16 PM, Mark Volkmann via Cuis-dev wrote: > I ran this code in a Workspace: > > lm := LayoutMorph newColumn. > lm separation: 10. > lm layoutSpec offAxisEdgeWeight: 0. > lm addMorph: (LabelMorph new contents: 'short'; color: Color white). > lm addMorph: (LabelMorph new contents: 'very long'; color: Color white). > lm openInWorld. > > The attached screenshot shows what I get and includes the LayoutSpec. > It looks like I successfully set the `offAxisEdgeWeight` to zero, so I > expected the two `LabelMorph` instances to be left-aligned inside the > `LayoutMorph`, but they are centered. > I must be misunderstanding how `offAxisEdgeWeight` works. > > -- > R. Mark Volkmann > Object Computing, Inc. What you want is: lm := LayoutMorph newColumn. lm separation: 10. b1 := LabelMorph new contents: 'short'; color: Color white. b1 layoutSpec offAxisEdgeWeight: 0. lm addMorph: b1. b2 := LabelMorph new contents: 'very long'; color: Color white. b2 layoutSpec offAxisEdgeWeight: 0. lm addMorph: b2. lm openInWorld. The off-axis wheight is a property of the submorph layoutSpec. Not of the outer LayoutMorph. See `LayoutMorph example2`. BTW, play with, read the code, hack the code around. Do this with all the LayoutMorph class side examples. They are there to help you. Cheers, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Mon Aug 12 06:30:41 2024 From: juan at cuis.st (Juan Vuletich) Date: Mon, 12 Aug 2024 10:30:41 -0300 Subject: [Cuis-dev] Dollar1 package In-Reply-To: <2f393495-14e5-410d-a0e2-f170cc2cda04@free.fr> References: <2f393495-14e5-410d-a0e2-f170cc2cda04@free.fr> Message-ID: <66BA0E81.60508@cuis.st> On 8/4/2024 12:14 PM, Hilaire Fernandes via Cuis-dev wrote: > Hi folks, > > I have ported the Dollar1[1] package of Yoshiki[2]. > > I will explore its use in the GUI commands for the Paper Morph in my > Dynabook project. > > [1] https://github.com/hilaire/dynabook/tree/main/src/lib > > [2] https://github.com/yoshikiohshima/Squeak-1Dollar-Recognizer > Nice! Please keep us posted on how it performs. Thanks, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich From juan at cuis.st Mon Aug 12 06:38:14 2024 From: juan at cuis.st (Juan Vuletich) Date: Mon, 12 Aug 2024 10:38:14 -0300 Subject: [Cuis-dev] Space is low In-Reply-To: <20240812144052.3e0adcf6@speedy.fast.klix.wow> References: <7d0568f9-b16d-4724-a7a2-f0af0028562c@smallinteger.com> <17f2edd8-7890-4ada-9bad-0ec71908ccdf@smallinteger.com> <66980F3D.6090804@cuis.st> <31BAF037-4ED8-4EF1-9CD8-45E689078F16@gmail.com> <66B3D43F.70409@cuis.st> <66B7B2CF.4010408@cuis.st> <4bdf2f72-cfb8-33fd-d677-9b4b5f04d8ff@klix.ch> <20240812144052.3e0adcf6@speedy.fast.klix.wow> Message-ID: <66BA1046.8000802@cuis.st> Hi Gerald, On 8/12/2024 9:40 AM, Gerald Klix via Cuis-dev wrote: > Hi Juan, > > I tested the this issue with FreeBSD on the same > (development) machine and with Devuan Daedalus > on another machine. > My development machine runs Devuan Chimaera. > > It works perfectly on the other machine. > With FreeBSD 14 the same error occurs. > The VM for FreeBSD is essentialy the Linux VM, > I only disabled the frame-buffer interface. > FreeBSD has the newest X-Server version. Thanks for the update. > I presume this is related to a buggy X11 implementation > or some X11 protocoll corner case the VM does not handle > correctly. Since I can not provide instructions to reproduce > this issue ? after all it works with Xephyr ? I suggest > I'll watch this issue and when I'll find some means to reproduce it > I'll file an error. Sounds reasonable. > HTH, > > Gerald > > PS: Just before sending this e-mail, > I tried the same stunt with the Squeak 6 version at > hand. It works. Well, there are perhaps two differences between Squeak and Cuis that are relevant: One is that the code that checks for changes in the Screen size, and recreates Display as needed is completely different, possibly resulting in a different call pattern to platform primitives and Display memory allocation. The other difference is that by default, VectorCanvas uses additional buffers of Display extent, so memory stress is larger. Cuis can still go back to BitBltCanvas, but you lose the VectorGraphics stuff, going back to a more basic UI api. > --- X11 versions --- > > Hape02 > ====== > Referred to as ?the other machine?. > > bear at hape02 ~> sudo Xorg -version > > X.Org X Server 1.21.1.7 > X Protocol Version 11, Revision 0 > Current Operating System: Linux hape02 6.1.0-23-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.99-1 (2024-07-15) x86_64 > Kernel command line: BOOT_IMAGE=/@rootfs/boot/vmlinuz-6.1.0-23-amd64 root=UUID=9abcba3f-4d1e-43d7-b63d-a132346c8301 ro rootflags=subvol=@rootfs quiet > xorg-server 2:21.1.7-3+deb12u7devuan1 (https://www.devuan.org/os/community) > Current version of pixman: 0.42.2 > Before reporting problems, check http://wiki.x.org > to make sure that you have the latest version. > > > Speedy > ====== > My ?development machine?. > > Linux > ----- > bear at speedy ~ [127]> sudo Xorg -version > [sudo] password for bear: > > X.Org X Server 1.20.11 > X Protocol Version 11, Revision 0 > Build Operating System: linux Debian > Current Operating System: Linux speedy 5.10.0-31-amd64 #1 SMP Debian 5.10.221-1 (2024-07-14) x86_64 > Kernel command line: dozfs=force root=ZFS=zos/root/devuan pcie_aspm=off rw initrd=devuan\initrd.img-5.10.0-31-amd64 > Build Date: 10 April 2024 08:59:35AM > xorg-server 2:1.20.11-1+deb11u13 (https://www.debian.org/support) > Current version of pixman: 0.40.0 > Before reporting problems, check http://wiki.x.org > to make sure that you have the latest version. > > FreeBSD > ------- > bear at speedy ~ [1]> sudo Xorg -version > > X.Org X Server 1.21.1.13 > X Protocol Version 11, Revision 0 > Current Operating System: FreeBSD speedy 14.1-RELEASE-p3 FreeBSD 14.1-RELEASE-p3 GENERIC amd64 > > Current version of pixman: 0.42.2 > Before reporting problems, check http://wiki.x.org > to make sure that you have the latest version. > Thanks, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich From juan at cuis.st Mon Aug 12 06:41:22 2024 From: juan at cuis.st (Juan Vuletich) Date: Mon, 12 Aug 2024 10:41:22 -0300 Subject: [Cuis-dev] Discarded mouse trail In-Reply-To: References: Message-ID: <66BA1102.9010904@cuis.st> Hi Hilaire, Apologies for the late response. (below) On 8/4/2024 11:32 AM, Hilaire Fernandes via Cuis-dev wrote: > > Hi Juan, > > I have observed you discard trail mouse positions: > > HandMorph>>generateMouseEvent: evtBuf > ... > type == #mouseMove > ifTrue: [ > trail := self mouseTrailFrom: evtBuf. > ^MouseMoveEvent new > setType: type > position: trail last > buttons: buttons > hand: self > stamp: stamp]. > > > In the Squeak implementation, it is still taken in consideration in > the MouseMoveEvent instance. > > I am porting the 1Dollar recognizer from Squeak and I can observed a > far greater amount of mouse positions taken in consideration in the > original package, because of the trail array: > > HandMorph>>generateMouseEvent: evtBuf > ... > type == #mouseMove ifTrue: > [trail := self mouseTrailFrom: evtBuf. > ^MouseMoveEvent new > setType: type > startPoint: self position > endPoint: trail last > * trail: trail* > buttons: buttons > hand: self > stamp: stamp]. > > I have experimented putting back the trail in the MouseMoveEvent, and > indead it provide more information. > > I ma likely need the trail too in my PaperMorph for the Dynabook. > > What do you think? > > Hilaire > I removed it because I saw no good use for it in the base image code base. Maybe we can add it back, controlled by a class variable to turn it on. What is the current status of this, one week later? Thanks, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Mon Aug 12 06:49:28 2024 From: juan at cuis.st (Juan Vuletich) Date: Mon, 12 Aug 2024 10:49:28 -0300 Subject: [Cuis-dev] Character codePoint: and arrow keys In-Reply-To: References: Message-ID: <66BA12E8.9030908@cuis.st> On 8/2/2024 11:42 AM, Mark Volkmann via Cuis-dev wrote: > I have a custom morph that implements the keyStroke: method to capture > keyboard events. > I then use the following get the Character that corresponds to the key > value: > > char := Character codePoint: aKeyboardEvent keyValue. > > When I press the left arrow key, keyValue is 28 and the Character is a > left-pointing arrow. > When I press the down arrow key, keyValue is 31 and the Character is a > down-pointing arrow. > So far, so good. However ... > When I press the right arrow key, keyValue is 29 and the Character is > an up-pointing arrow. > When I press the up arrow key, keyValue is 30 and the Character is a > right-pointing arrow. > Could this be a bug in the Character codePoint: method which uses > ? > > -- > R. Mark Volkmann > Object Computing, Inc. Well, there's no real relation between Characters 28, 29, 30, 31 and #keyValue using those numbers. Those 4 Characters are only used to show Smalltalk code, and are not intended for any other purpose. Usually, the keyboard arrow keys are not used for entering characters but for controlling widget behavior in a way similar to a mouse. So, I don't see this as a bug. We could make these consistent. Not sure of the value, though. Opinions? -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Mon Aug 12 06:54:49 2024 From: juan at cuis.st (Juan Vuletich) Date: Mon, 12 Aug 2024 10:54:49 -0300 Subject: [Cuis-dev] CuisBook tweak request. (was Re: official operator names of ; and ::) In-Reply-To: References: Message-ID: <66BA1429.9040607@cuis.st> Hi Folks, The Appendix B of the CuisBook needs a better, separate explanation of Cascade (;) and Chain (::). Vanessa's example is too good not to include it. Any takers? Thanks, On 8/1/2024 4:24 PM, Vanessa Freudenberg via Cuis-dev wrote: > That's not a great example for :: because it works just as well > without it. This may be a better illustration: > > 3 + 4 squared => 7 > 3 + 4 ; squared => 9 > 3 + 4 :: squared => 49 > > Nessa > > On Thu, Aug 1, 2024 at 7:11?AM Mark Volkmann via Cuis-dev > > wrote: > > Thanks Andres! Interestingly page 178 in the Cuis Book (Appendix > B) says this: > > Transcript show: 'hello'; cr message > cascade (;) > > BoxedMorph new :: color: Color blue; openInWorld message > cascade (::) > > > But surely these can't go by the same name, so I think you are > correct. > > > On Wed, Jul 31, 2024 at 9:37?PM Andres Valloud via Cuis-dev > > wrote: > > The name of this bit of syntax is "chain". > > On 7/31/24 6:17 PM, Mark Volkmann via Cuis-dev wrote: > > What is the official name of the :: operator? > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > > > > -- > R. Mark Volkmann > Object Computing, Inc. > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Mon Aug 12 06:56:47 2024 From: juan at cuis.st (Juan Vuletich) Date: Mon, 12 Aug 2024 10:56:47 -0300 Subject: [Cuis-dev] Cassowary package In-Reply-To: References: Message-ID: <66BA149F.7000301@cuis.st> On 7/30/2024 5:30 PM, Hilaire Fernandes via Cuis-dev wrote: > Hi, > > I have ported the Cassowary package to Cuis. It is a linear constraint > solver. > > https://github.com/hilaire/dynabook/tree/main/resources/thirdparty/cassowary > > > If you don't know about, there is a video demo too. > > Hilaire > Very nice, thanks! Cheers, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich From hfern at free.fr Mon Aug 12 08:56:34 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Mon, 12 Aug 2024 17:56:34 +0200 Subject: [Cuis-dev] CheckButtonMoprh and fillColor In-Reply-To: References: Message-ID: #fillColor:/fillColor should not be part of the protocol, I will remove them. Le 11/08/2024 ? 21:54, Mark Volkmann via Cuis-dev a ?crit?: > I'm struggling to understand the use of fillColor in CheckButtonMorph > after studying?the code for an hour. For example: -- GNU Dr. Geo http://gnu.org/s/dr-geo/ http://gnu-drgeo.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfern at free.fr Mon Aug 12 09:29:17 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Mon, 12 Aug 2024 18:29:17 +0200 Subject: [Cuis-dev] CheckButtonMoprh and fillColor In-Reply-To: References: Message-ID: <4e5bbe82-07bd-4554-809d-a3d0e78372a2@free.fr> I think you are right regarding the behavior, it is not optimal nor coherent with menu item What about something like that : Le 11/08/2024 ? 23:24, Mark Volkmann via Cuis-dev a ?crit?: > That was helpful! > I see now that by default: > - It is initially filled with the border color and that represents > being unchecked. > - Hovering over it changes the fill to be the border color with 50% > opacity. > - Clicking it causes the fill to change to the value of the color > instance variable (defaults to white) and display a checkmark that is > always black. > - There is no point in setting the fillColor instance variable because > it will just get changed as soon as you hover over the morph. > > I think I want something that behaves more like a browser checkbox or > like the checkboxes in the morph menu items "resist being picked up" > and "be locked". > Just an opinion, but having a checkbox that is filled when not checked > might make some users think it is checked. -- GNU Dr. Geo http://gnu.org/s/dr-geo/ http://gnu-drgeo.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0BihzWiy7Aj3yNnh.png Type: image/png Size: 7540 bytes Desc: not available URL: From hfern at free.fr Mon Aug 12 10:28:41 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Mon, 12 Aug 2024 19:28:41 +0200 Subject: [Cuis-dev] CuisBook tweak request. (was Re: official operator names of ; and ::) In-Reply-To: <66BA1429.9040607@cuis.st> References: <66BA1429.9040607@cuis.st> Message-ID: <10675109-cd4c-43dd-b953-51212211d325@free.fr> I added the examples: https://cuis-smalltalk.github.io/TheCuisBook/Summary-of-Syntax.html Thanks Vanessa for the examples Le 12/08/2024 ? 15:54, Juan Vuletich a ?crit?: > Any takers? -- GNU Dr. Geo http://gnu.org/s/dr-geo/ http://gnu-drgeo.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Mon Aug 12 10:46:55 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Mon, 12 Aug 2024 10:46:55 -0700 Subject: [Cuis-dev] CuisBook tweak request. (was Re: official operator names of ; and ::) In-Reply-To: <10675109-cd4c-43dd-b953-51212211d325@free.fr> References: <66BA1429.9040607@cuis.st> <10675109-cd4c-43dd-b953-51212211d325@free.fr> Message-ID: Would a name split/change help clarify? On 7/31/24 6:17 PM, Mark Volkmann via Cuis-dev wrote: >> What is the official name of the :: operator? On Wed Jul 31 19:37:01 PDT, Andres Valloud ten at smallinteger.com wrote: > The name of this bit of syntax is "chain". -KenD From juan at cuis.st Mon Aug 12 11:50:19 2024 From: juan at cuis.st (Juan Vuletich) Date: Mon, 12 Aug 2024 15:50:19 -0300 Subject: [Cuis-dev] CuisBook tweak request. (was Re: official operator names of ; and ::) In-Reply-To: References: <66BA1429.9040607@cuis.st> <10675109-cd4c-43dd-b953-51212211d325@free.fr> Message-ID: <66BA596B.90503@cuis.st> On 8/12/2024 2:46 PM, ken.dickey--- via Cuis-dev wrote: > Would a name split/change help clarify? > > On 7/31/24 6:17 PM, Mark Volkmann via Cuis-dev wrote: >>> What is the official name of the :: operator? > > On Wed Jul 31 19:37:01 PDT, Andres Valloud ten at smallinteger.com wrote: >> The name of this bit of syntax is "chain". > > -KenD > Yes, please! -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich From r.mark.volkmann at gmail.com Mon Aug 12 15:13:22 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Mon, 12 Aug 2024 17:13:22 -0500 Subject: [Cuis-dev] custom morph with fixed size Message-ID: See the attached screenshot. Hard as I try, I haven't been able to figure out why the two red squares are different sizes. They are instances of a custom morph named PlaceholderMorph. Here is the code I run in a Workspace to produce the screenshot: model := Switch new. b1 := (PluggableButtonMorph model: model action: #demo) label: 'X'. b2 := (PluggableButtonMorph model: model action: #demo) label: 'X'. col := LayoutMorph newColumn. row := LayoutMorph newRow. row color: Color white. row addMorph: PlaceholderMorph new. row addMorph: (LabelMorph new contents: 'Short'). row addMorph: b1. col addMorph: row. row := LayoutMorph newRow. row color: Color white. row addMorph: PlaceholderMorph new. row addMorph: (LabelMorph new contents: 'Longer'). row addMorph: b2. col addMorph: row. col openInHand. A fileOut of the very basic PlaceholderMorph class is also attached. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot 2024-08-12 at 5.09.24?PM.png Type: image/png Size: 4767 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PlaceholderMorph.st Type: application/octet-stream Size: 612 bytes Desc: not available URL: From ken.dickey at whidbey.com Mon Aug 12 16:38:04 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Mon, 12 Aug 2024 16:38:04 -0700 Subject: [Cuis-dev] custom morph with fixed size In-Reply-To: References: Message-ID: <6fe884af4cde75fac55ae354d0ac102b@whidbey.com> On 2024-08-12 15:13, Mark Volkmann via Cuis-dev wrote: > See the attached screenshot. Hard as I try, I haven't been able to > figure out why the two red squares are different sizes. They are > instances of a custom morph named PlaceholderMorph. PlaceHolderMorph inherits from PlacedMorph, which supplies a default LayoutSpec which scales to the space available. vvv===vvv layoutSpec "Layout specific. Return the layout spec describing where the receiver should appear in a proportional layout" layoutSpec ifNotNil: [ :ls | ^ ls ]. layoutSpec := LayoutSpec useAll. layoutSpec morph: self. ^ layoutSpec ^^^===^^^ Resizing the outer, containing LayoutMorph demonstrates this. The LabelMorphs and PluggableButtonMorphs have default LayoutSpecs which use the original morphExtent, so they are not scaled. Using UI-MetaProperties to view the LayoutSpecs of various morphs and play with their properties, then dynamically resizing the containing LayoutMorph should sharpen your intuitions about what to expect. HTH, -KenD From r.mark.volkmann at gmail.com Mon Aug 12 16:53:16 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Mon, 12 Aug 2024 18:53:16 -0500 Subject: [Cuis-dev] custom morph with fixed size In-Reply-To: <6fe884af4cde75fac55ae354d0ac102b@whidbey.com> References: <6fe884af4cde75fac55ae354d0ac102b@whidbey.com> Message-ID: On Mon, Aug 12, 2024 at 6:38?PM wrote: > On 2024-08-12 15:13, Mark Volkmann via Cuis-dev wrote: > > > See the attached screenshot. Hard as I try, I haven't been able to > > figure out why the two red squares are different sizes. They are > > instances of a custom morph named PlaceholderMorph. > > PlaceHolderMorph inherits from PlacedMorph, which supplies a default > LayoutSpec which scales to the space available. > > vvv===vvv > layoutSpec > "Layout specific. Return the layout spec describing where the > receiver should appear in a proportional layout" > > layoutSpec ifNotNil: [ :ls | ^ ls ]. > layoutSpec := LayoutSpec useAll. > layoutSpec morph: self. > > ^ layoutSpec > ^^^===^^^ > > Resizing the outer, containing LayoutMorph demonstrates this. > > The LabelMorphs and PluggableButtonMorphs have default LayoutSpecs which > use the original morphExtent, so they are not scaled. > > Using UI-MetaProperties to view the LayoutSpecs of various morphs and > play with their properties, then dynamically resizing the containing > LayoutMorph should sharpen your intuitions about what to expect. > That helps! Now I have to decide how to address this. The only reason I chose to make my PlaceholderMorph be a subclass of PlacedMorph instead of BoxedMorph is that with PlacedMorph the canvas passed to drawOn: is a VectorCanvas and with BoxedMorph the canvas passed to drawOn: is a HybridCanvas. I want to use the polyLine: method in VectorCanvas. Is there a way I can configure my custom morph so that if it is a subclass of BoxedMorph, I can get a VectorCanvas in drawTo: ? Is it a better option to modify the layoutSpec in the initialize method so it keeps a fixed size? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Mon Aug 12 17:01:32 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Mon, 12 Aug 2024 19:01:32 -0500 Subject: [Cuis-dev] LayoutMorph separation Message-ID: I seem to keep running into situations where I want separation in a LayoutMorph to only be added between the submorphs and not before the first and after the last. I see that I can achieve that by modifying the LayoutMorph method layoutSubmorphsHorizontallyIn:. But I don't always want that behavior. I'd like that to be configurable. Is there already a way to do this that I'm missing? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Tue Aug 13 07:15:40 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Tue, 13 Aug 2024 07:15:40 -0700 Subject: [Cuis-dev] custom morph with fixed size In-Reply-To: References: <6fe884af4cde75fac55ae354d0ac102b@whidbey.com> Message-ID: <0b97495c432583cc8d171a8dadd2f388@whidbey.com> On 2024-08-12 16:53, Mark Volkmann wrote: > The only reason I chose to make my PlaceholderMorph be a subclass of PlacedMorph instead of BoxedMorph is that > with PlacedMorph the canvas passed to drawOn: is a VectorCanvas and > with BoxedMorph the canvas passed to drawOn: is a HybridCanvas. > I want to use the polyLine: method in VectorCanvas. > > Is there a way I can configure my custom morph so that if it is a subclass of BoxedMorph, I can get a VectorCanvas in drawTo: ? If you open a World Menu > Open > Message Names and type 'canvas', you might note #requiresVectorCanvas Good writers read a lot. :) > Is it a better option to modify the layoutSpec in the initialize method so it keeps a fixed size? LayoutMorph class has a large number of convenience methods to help out in the 'instance creation' category. E.g. note code in #keepMorphExtent Explore the options and make the code do what you want. 4. M?NG / YOUTHFUL FOLLY above K?N KEEPING STILL, MOUNTAIN below K'AN THE ABYSMAL, WATER In this hexagram we are reminded of youth and folly in two different ways. The image of the upper trigram, K?n, is the mountain, that of the lower, K'an, is water; the spring rising at the foot of the mountain is the image of inexperienced youth. Keeping still is the attribute of the upper trigram; that of the lower is the abyss, danger. Stopping in perplexity on the brink of a dangerous abyss is a symbol of the folly of youth. However, the two trigrams also show the way of overcoming the follies of youth. Water is something that of necessity flows on. When the spring gushes forth, it does not know at first where it will go. But its steady flow fills up the deep place blocking its progress, and success is attained. THE JUDGMENT YOUTHFUL FOLLY has success. It is not I who seek the young fool; The young fool seeks me. At the first oracle I inform him. If he asks two or three times, it is importunity. If he importunes, I give him no information. Perseverance furthers. HTH, -KenD -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Tue Aug 13 07:18:18 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Tue, 13 Aug 2024 07:18:18 -0700 Subject: [Cuis-dev] LayoutMorph separation In-Reply-To: References: Message-ID: On 2024-08-12 17:01, Mark Volkmann via Cuis-dev wrote: > I seem to keep running into situations where I want separation in a > LayoutMorph to only be added between the submorphs and not before the > first and after the last. I see that I can achieve that by modifying > the LayoutMorph method layoutSubmorphsHorizontallyIn:. But I don't > always want that behavior. I'd like that to be configurable. Is there > already a way to do this that I'm missing? No. I already suggested one way to do this. -KenD From r.mark.volkmann at gmail.com Tue Aug 13 17:01:03 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Tue, 13 Aug 2024 19:01:03 -0500 Subject: [Cuis-dev] LayoutMorph separation In-Reply-To: References: Message-ID: On Tue, Aug 13, 2024 at 9:18?AM wrote: > On 2024-08-12 17:01, Mark Volkmann via Cuis-dev wrote: > > > I seem to keep running into situations where I want separation in a > > LayoutMorph to only be added between the submorphs and not before the > > first and after the last. I see that I can achieve that by modifying > > the LayoutMorph method layoutSubmorphsHorizontallyIn:. But I don't > > always want that behavior. I'd like that to be configurable. Is there > > already a way to do this that I'm missing? > > No. > > I already suggested one way to do this. > I'd rather not have to insert spacer morphs, especially if there are a large number of submorphs. I attached my solution which is to create a subclass of LayoutMorph that adds a boolean instance variable "trim". When that is true, it avoids adding separation before the first and after the last submorph. This works for my use cases. It would be great if this was added to LayoutMorph. It wouldn't affect its current behavior. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Layout2Morph.st Type: application/octet-stream Size: 3347 bytes Desc: not available URL: From r.mark.volkmann at gmail.com Tue Aug 13 17:16:58 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Tue, 13 Aug 2024 19:16:58 -0500 Subject: [Cuis-dev] Unicode in morphs Message-ID: Should I be able to use Unicode characters in morphs like this? (LabelMorph contents: '?') openInHand. When I paste the trash can Unicode character into a Workspace, it appears as a rectangle. I believe that means it doesn't recognize the character. It also renders as a rectangle instead of the trash can character. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Wed Aug 14 07:39:25 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Wed, 14 Aug 2024 07:39:25 -0700 Subject: [Cuis-dev] Unicode in morphs In-Reply-To: References: Message-ID: On 2024-08-13 17:16, Mark Volkmann via Cuis-dev wrote: > Should I be able to use Unicode characters in morphs like this? > > (LabelMorph contents: '?') openInHand. > > When I paste the trash can Unicode character into a Workspace, it > appears as a rectangle. > I believe that means it doesn't recognize the character. > It also renders as a rectangle instead of the trash can character. The default font lacks many glyphs -- e.g. for Chinese and apparently for trash cans. Try importing and setting a TrueType Font which has this glyph. HTH, -KenD From ken.dickey at whidbey.com Wed Aug 14 13:59:02 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Wed, 14 Aug 2024 13:59:02 -0700 Subject: [Cuis-dev] LayoutMorph separation In-Reply-To: References: Message-ID: <5efcf669422dee88071a1c587ac9400c@whidbey.com> On 2024-08-13 17:01, Mark Volkmann via Cuis-dev wrote: > On Tue, Aug 13, 2024 at 9:18?AM wrote: > >> On 2024-08-12 17:01, Mark Volkmann via Cuis-dev wrote: >> >>> I seem to keep running into situations where I want separation in a >>> LayoutMorph to only be added between the submorphs and not before the >>> first and after the last. I see that I can achieve that by modifying >>> the LayoutMorph method layoutSubmorphsHorizontallyIn:. But I don't >>> always want that behavior. I'd like that to be configurable. Is there >>> already a way to do this that I'm missing? > No. >>> I'd rather not have to insert spacer morphs, especially if there are >>> a large number of submorphs. >>> I attached my solution which is to create a subclass of LayoutMorph >>> that adds a boolean instance variable "trim". >>> When that is true, it avoids adding separation before the first and >>> after the last submorph. >>> This works for my use cases. >>> It would be great if this was added to LayoutMorph. It wouldn't >>> affect its current behavior. Mark, thanks much for contributing. Two things: [A] I prefer #useEdgeSpace to #trim as 'trim' seems too generic a term to me. ['shrinkWrap' might work as well]. [B] Due to edge cases, the math is a bit difficult to get right. Please check the code and try `Layout2Morph example1` in the attached. I am still testing, but think this may be close to what you want. Thanks again for this! -KenD -------------- next part -------------- 'From Cuis7.1 [latest update: #6579] on 14 August 2024 at 1:47:45 pm'! !classDefinition: #Layout2Morph category: #Volkmann! LayoutMorph subclass: #Layout2Morph instanceVariableNames: 'useEdgeSpace' classVariableNames: '' poolDictionaries: '' category: 'Volkmann'! !Layout2Morph commentStamp: '' prior: 0! This is a subclass of LayoutMorph that adds the instance variable "useEdgeSpace". When true, x and y separation are kept between submorphs and the edge of our extent, othersize no space is kept between submorphs and our outer edge.! !Layout2Morph methodsFor: 'initialization' stamp: 'KenD 8/14/2024 10:22:14'! initialize super initialize. useEdgeSpace := false.! ! !Layout2Morph methodsFor: 'geometry' stamp: 'KenD 8/14/2024 12:08:52'! minimumExtent: cachedValues "Answer size sufficient to frame my submorphs." | width height mle | width := 0. height := 0. (self direction = #vertical) ifTrue: [ "Column" self submorphsToLayout do: [ :sm | mle := sm minimumLayoutExtent: cachedValues. "use maximum width across submorphs" width := width max: mle x. "sum up submorph heights, including separation" height := height + mle y + self ySeparation. ]. useEdgeSpace ifTrue: [ width := width + (2 * self xSeparation). "separation on each side" height := height + self ySeparation. "one side already separated" ] ifFalse: [ height := height - self ySeparation. "remove excess" ] ] ifFalse: [ "Row" self submorphsToLayout do: [ :sm | mle := sm minimumLayoutExtent: cachedValues. "sum up submorphs width" width := width + mle x + self xSeparation. "use maximum height across submorph" height := height max: mle y. ]. useEdgeSpace ifTrue: [ height := height + (2 * self ySeparation). "separation on each side" width := width + self xSeparation. "one side already separated" ] ifFalse: [ width := width - self xSeparation. "remove excess" ] ]. ^ (width @ height) + self extentBorder! ! !Layout2Morph methodsFor: 'layout' stamp: 'KenD 8/14/2024 13:47:24'! layoutSubmorphsHorizontallyIn: boundsForLayout "Compute a new layout based on the given layout bounds." | visibleSubmorphs gap gapCount widths widthToAllocate leftOver x height y cache | "Preconditions: self isRow & morphExtent >= minimumLayoutExtent" (visibleSubmorphs := self submorphsToLayout reversed "Display Order") ifEmpty: [ ^ self. "Nothing to layout, besides `sum` below, would fail" ]. gap := self xSeparation. gapCount := useEdgeSpace ifFalse: [ visibleSubmorphs size - 1 ] ifTrue: [ visibleSubmorphs size + 1]. widthToAllocate := (boundsForLayout width - (gapCount * gap)). cache := IdentityDictionary new. widths := self widthsFor: visibleSubmorphs within: widthToAllocate minLayoutExtentCache: cache. leftOver := widthToAllocate - widths sum. x := boundsForLayout left + (leftOver * self axisEdgeWeight). useEdgeSpace ifTrue: [ x := x + gap ]. visibleSubmorphs with: widths do: [ :sm :smWidth | height := self offAxisHeightFor: sm within: boundsForLayout height minLayoutExtentCache: cache. y := self offAxisYOffsetFor: sm within: boundsForLayout height - height. sm fitInto: (x @ (boundsForLayout top + y) extent: smWidth @ height). x := x + smWidth + gap. ]! ! !Layout2Morph methodsFor: 'layout' stamp: 'KenD 8/14/2024 13:47:30'! layoutSubmorphsVerticallyIn: boundsForLayout "Compute a new layout based on the given layout bounds." | visibleSubmorphs gap gapCount heights heightToAllocate leftOver y width x cache | "Preconditions: self isRow & morphExtent >= minimumLayoutExtent" (visibleSubmorphs := self submorphsToLayout reversed "Display Order") ifEmpty: [ ^ self. "Nothing to layout, besides `sum` below, would fail" ]. gap := self ySeparation. gapCount := useEdgeSpace ifFalse: [ visibleSubmorphs size - 1 ] ifTrue: [ visibleSubmorphs size + 1]. heightToAllocate := (boundsForLayout height - (gapCount * gap)). cache := IdentityDictionary new. heights := self heightsFor: visibleSubmorphs within: heightToAllocate minLayoutExtentCache: cache. leftOver := heightToAllocate - heights sum. y := boundsForLayout top + (leftOver * self axisEdgeWeight). useEdgeSpace ifTrue: [ y := y + gap ]. visibleSubmorphs with: heights do: [ :sm :smHeight | width := self offAxisWidthFor: sm within: boundsForLayout width minLayoutExtentCache: cache. x := self offAxisXOffsetFor: sm within: boundsForLayout width - width. sm fitInto: (boundsForLayout left + x @ y extent: width @ smHeight). y := y + smHeight + gap. ]! ! !Layout2Morph methodsFor: 'layout' stamp: 'KenD 8/14/2024 12:15:37'! offAxisXOffsetFor: aMorph within: availableWidth "Answer x offset for a single morph -- offAxis calculation for a Column" | leftOver offset | leftOver := useEdgeSpace ifTrue: [availableWidth - (2 * self xSeparation)] ifFalse: [availableWidth ]. offset := (leftOver * aMorph layoutSpec offAxisEdgeWeight). useEdgeSpace ifTrue: [ ^ self xSeparation + offset ]. ^ offset! ! !Layout2Morph methodsFor: 'layout' stamp: 'KenD 8/14/2024 12:16:49'! offAxisYOffsetFor: aMorph within: availableHeight "Answer y offset for a single morph -- offAxis calculation for a Row" | leftOver offset | leftOver := useEdgeSpace ifTrue: [availableHeight - (2 * self ySeparation)] ifFalse: [availableHeight ]. offset := leftOver * aMorph layoutSpec offAxisEdgeWeight. useEdgeSpace ifTrue: [ ^ self ySeparation + offset ]. ^offset! ! !Layout2Morph methodsFor: 'layout' stamp: 'KenD 8/14/2024 10:01:57'! useEdgeSpace ^ useEdgeSpace! ! !Layout2Morph methodsFor: 'layout' stamp: 'KenD 8/14/2024 10:02:34'! useEdgeSpace: aBoolean useEdgeSpace := aBoolean! ! "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "! !classDefinition: 'Layout2Morph class' category: #Volkmann! Layout2Morph class instanceVariableNames: ''! !Layout2Morph class methodsFor: 'examples' stamp: 'KenD 8/14/2024 13:46:14'! example1 " self example1 " | withEdge noEdge upSpec downSpec | withEdge := self newRow :: useEdgeSpace: true; separation: 20. noEdge := self newRow :: useEdgeSpace: false; separation: 20. upSpec := LayoutSpec keepMorphExtent :: offAxisEdgeWeight: 0. upSpec proportionalWidth: 0.8 minimum: 100; proportionalHeight: 0.8 minimum: 100. downSpec := LayoutSpec keepMorphExtent :: offAxisEdgeWeight: 1. downSpec proportionalWidth: 0.8 minimum: 100; proportionalHeight: 0.8 minimum: 100. withEdge addMorph: (BoxedMorph new :: color: Color blue; layoutSpec: upSpec). noEdge addMorph: (BoxedMorph new :: color: Color blue; layoutSpec: upSpec). withEdge addMorph: (LabelMorph new :: contents: 'WITH Edge'). noEdge addMorph: (LabelMorph new :: contents: 'withOUT Edge'). withEdge addMorph: (BoxedMorph new :: layoutSpec: downSpec). noEdge addMorph: (BoxedMorph new :: layoutSpec: downSpec). withEdge openInWorld. noEdge openInWorld. ! ! From r.mark.volkmann at gmail.com Wed Aug 14 18:17:38 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Wed, 14 Aug 2024 20:17:38 -0500 Subject: [Cuis-dev] Unicode in morphs In-Reply-To: References: Message-ID: On Wed, Aug 14, 2024 at 9:39?AM wrote: > On 2024-08-13 17:16, Mark Volkmann via Cuis-dev wrote: > > > Should I be able to use Unicode characters in morphs like this? > > > > (LabelMorph contents: '?') openInHand. > > > > When I paste the trash can Unicode character into a Workspace, it > > appears as a rectangle. > > I believe that means it doesn't recognize the character. > > It also renders as a rectangle instead of the trash can character. > > The default font lacks many glyphs -- e.g. for Chinese and apparently > for trash cans. > > Try importing and setting a TrueType Font which has this glyph. > Thanks! I found that the "Kurinto Sans" font contains the wastebasket Unicode character and I installed it. The attached screenshot shows an example. I want to use that font in a PluggableButtonMorph. But here is the font: method in that class: font: someFont PopUpMenu inform: 'You can''t set this' Yikes! I wonder why we're not allowed to set the font for that kind of morph. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot 2024-08-14 at 8.16.02?PM.png Type: image/png Size: 22067 bytes Desc: not available URL: From juan at cuis.st Thu Aug 15 06:26:48 2024 From: juan at cuis.st (Juan Vuletich) Date: Thu, 15 Aug 2024 10:26:48 -0300 Subject: [Cuis-dev] Unicode in morphs In-Reply-To: References: Message-ID: <66BE0218.7070408@cuis.st> On 8/14/2024 10:17 PM, Mark Volkmann via Cuis-dev wrote: > On Wed, Aug 14, 2024 at 9:39?AM > wrote: > > On 2024-08-13 17:16, Mark Volkmann via Cuis-dev wrote: > > > Should I be able to use Unicode characters in morphs like this? > > > > (LabelMorph contents: '?') openInHand. > > > > When I paste the trash can Unicode character into a Workspace, it > > appears as a rectangle. > > I believe that means it doesn't recognize the character. > > It also renders as a rectangle instead of the trash can character. > > The default font lacks many glyphs -- e.g. for Chinese and apparently > for trash cans. > > Try importing and setting a TrueType Font which has this glyph. > > > Thanks! I found that the "Kurinto Sans" font contains the wastebasket > Unicode character and I installed it. > The attached screenshot shows an example. > > I want to use that font in a PluggableButtonMorph. > But here is the font: method in that class: > > font: someFont > PopUpMenu inform: 'You can''t set this' > > Yikes! I wonder why we're not allowed to set the font for that kind of > morph. > > -- > R. Mark Volkmann > Object Computing, Inc. You can. World / New morph... / From Alphabetical List / PluggableButtonMorph. Now open a halo on one of the inner PluggableButtonMorphs. Open an inspector. In the evaluation pane, evaluate: self roundButtonStyle: false. (FontFamily promptUser: self fontToUse familyName) ifNotNil: [ :fontFamily | self label: '?' font: (fontFamily atPointSize: self fontToUse pointSize) ]. and select 'Kurinto Sans'. Works nicely. HTH, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Thu Aug 15 06:34:26 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Thu, 15 Aug 2024 08:34:26 -0500 Subject: [Cuis-dev] hole in my Morphic knowledge Message-ID: I was somewhat surprised to learn that LayoutMorph does not implement a drawOn: method that sends #drawOn: to each of its submorphs. What is it that triggers the submorphs to be drawn? I had assumed that any morph can have submorphs, but most morphs (like LabelMorph) do not draw their submorphs. Now I'm questioning that assumption. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Thu Aug 15 06:39:35 2024 From: juan at cuis.st (Juan Vuletich) Date: Thu, 15 Aug 2024 10:39:35 -0300 Subject: [Cuis-dev] hole in my Morphic knowledge In-Reply-To: References: Message-ID: <66BE0517.904@cuis.st> On 8/15/2024 10:34 AM, Mark Volkmann via Cuis-dev wrote: > I was somewhat surprised to learn that LayoutMorph does not implement > a drawOn: method that sends #drawOn: to each of its submorphs. What is > it that triggers the submorphs to be drawn? I had assumed that any > morph can have submorphs, but most morphs (like LabelMorph) do not > draw their submorphs. Now I'm questioning that assumption. > > -- > R. Mark Volkmann > Object Computing, Inc. If only the system had some tool to show where are the senders of some message... -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From shingarov at labware.com Thu Aug 15 11:49:23 2024 From: shingarov at labware.com (Boris Shingarov) Date: Thu, 15 Aug 2024 14:49:23 -0400 Subject: [Cuis-dev] curried blocks In-Reply-To: References: Message-ID: > I attached my solution as a fileOut. I'd love to get some feedback in > terms of style and better ways to implement it. What would you do > differently? I really really like what you did, for fundamental reasons. Finally someone is looking at Smalltalk with an open mind! I guess an enabling factor, which helps a lot, is not having spent too many years in a particular Smalltalk-80 implementation. As Andr?s says in "DPBS Revisited": > Reading DPBS with Smalltalk familiarity tends to reinforce > a narrow point of view. In this particular case ? currying ? if I am confined in a Smalltalk-80 implementation with broken #value: for 30 years, I lose the ability to imagine anything else. As a side note, even among Smalltalk-80 implementations not every one lacks currying. Smalltalk/X has had currying for decades (albeit it doesn't invoke it by default). And yeah, I would sure-as-hell love to see it fixed in Cuis as well. > Perhaps this has already been done and I just didn't find it. Apart from the timid way how it's done in Smalltalk/X, Jan and I have been using the fix in PreSmalltalks [1] for many years. It enables some seriously cool stuff; in fact we rely on it in all parts of our work (MachineArithmetic, Tinyrossa etc.) At the same time it doesn't break anything in Pharo (i.e. nothing in Pharo demands bug-for-bug compatibility with the old behavior ? or at least we haven't come across anything that does). I guess I would compare the situation with how Squeak got closures progressively fixed (although currying is much simpler). Regarding your implementation, I do have criticisms of some details: > cb := CurriedBlock block: [:a :b | a + b] This is just straightforward wrong. There is no need to distinguish between Block and CurryingBlock. If [ :a :b | body ] is not congruent to [ :a | [ :b | body ] ], which is the same as saying that C raisedTo: A*B is not congruent to (C raisedTo: B) raisedTo: A, then it's an obvious bug, needing a (hopefully-)obvious fix. > The goal is to be able to pass fewer arguments than a block requires You meant "fewer or more arguments", right? Because it's perfectly valid to uncurry a nested block: [ :a | [ :b | a+b ] ] value: 2 value: 3 ">>> 5". Now. This is very nice but in Smalltalk we also have the "named" counterpart to it, #perform:. If we fix currying #value:, why not fix it in #perform: too? This allows stuff like [2] Integer>>factorial ^self unfold inject: 1 into: #* and other "banana programming" [3,4]; in fact this is how the supercompiler in MachineArithmetic [5] is able to reduce Gauss: 0 + ? + n which is n unfold inject: 0 into: #+ to n * (n+1) / 2. --- Are you on the BsAs Smalltalk slack? There are some very interesting discussions around these topics, especially in the #mathematics channel. Best, Boris [1] https://github.com/shingarov/MachineArithmetic/blob/pure-z3/src/PreSmalltalks-Pharo/BlockClosure.extension.st#L98 [2] https://github.com/shingarov/MachineArithmetic/blob/pure-z3/src/MathNotation-Tests/Integer.extension.st#L7 [3] https://maartenfokkinga.github.io/utwente/mmf91m.pdf [4] Gibbons, de Moor. The fun of programming. (Palgrave, 2003) [5] https://doi.org/10.1016/j.cola.2024.101275 On Fri, Aug 02, 2024 at 06:53:52PM -0500, Mark Volkmann via Cuis-dev wrote: > I wanted to see if it was possible to define a class that supports partial > application with blocks. The goal is to be able to pass fewer arguments > than a block requires and get back a new "block" that requires > the remaining arguments. Perhaps this has already been done and I just > didn't find it. > > Here are examples of using my solution: > > cb := CurriedBlock block: [:a :b | a + b]. > cb valueWithArguments: #(2 3). "5" > > cb2 := cb valueWithArguments: #(5). "a new CurriedBlock" > cb2 valueWithArguments: #(7). "12" > > I attached my solution as a fileOut. I'd love to get some feedback in terms > of style and better ways to implement it. What would you do differently? > > -- > R. Mark Volkmann > Object Computing, Inc. > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev From shingarov at labware.com Thu Aug 15 11:56:57 2024 From: shingarov at labware.com (Boris Shingarov) Date: Thu, 15 Aug 2024 14:56:57 -0400 Subject: [Cuis-dev] official operator names of ; and :: In-Reply-To: <66BA1429.9040607@cuis.st> References: <66BA1429.9040607@cuis.st> Message-ID: FWIW, I would also mention that Chaining is not part of the standard Smalltalk-80 syntax, but a (rather nice in practice, I find) extension in Cuis. Having said that, I also admit that going by measuring in millivallouds, I find this "nice-at-the-cost-of-increased-complexity" somewhat disturbing: new/improved functionality is best implemented by *removing* code and complexity, not by *adding*. Also, we've got to stop with our self-complacent attitude of ignoring competition. We've got extremely successful competitor languages with really simple syntax, next to which our Smalltalk-80 syntax looks "too big: barely fits on a postcard" even without the modern extensions. I salivate over Haskell's chaining ("$") being just-another-function while I can't express #:: (and #; and #^ for that matter) as just- another-message. Or can I? Let's look at, say, #^ (just because I find it the most annoying of the bunch, next to how Haskell reifies "notion of computation"). First, we would need prefix selectors, like Leandro-style #? and #- when he wants to write ? (ad]) or - (a+1). (So prefix #^ is like unary #return). Second, we need to reify returning. The (very very old) idea comes from LaLonde and van Gulik [1], they implement Prolog-like backtracking with zero change to VM (nor to bytecode nor to base class-library nor to compiler), by messing with the sender's Context (changing bytecodeCounter and other things WHILE IT'S STILL OUR OWN SENDER, then making it the current context). Ok maybe for return some extra selectors will need to become special, but we already have special selectors like #ifTrue:, so nothing new here. In this way Object>>return will capture the default notion of return; imagine what subclasses could do by redefining it? [1] https://doi.org/10.1145/62083.62094 On Mon, Aug 12, 2024 at 10:54:49AM -0300, Juan Vuletich via Cuis-dev wrote: > Hi Folks, > > The Appendix B of the CuisBook needs a better, separate explanation of > Cascade (;) and Chain (::). Vanessa's example is too good not to include it. > > Any takers? > > Thanks, > > On 8/1/2024 4:24 PM, Vanessa Freudenberg via Cuis-dev wrote: > > That's not a great example for :: because it works just as well without > > it. This may be a better illustration: > > > > 3 + 4 squared => 7 > > 3 + 4 ; squared => 9 > > 3 + 4 :: squared => 49 > > > > Nessa > > > > On Thu, Aug 1, 2024 at 7:11?AM Mark Volkmann via Cuis-dev > > > wrote: > > > > Thanks Andres! Interestingly page 178 in the Cuis Book (Appendix > > B) says this: > > > > Transcript show: 'hello'; cr message > > cascade (;) > > > > BoxedMorph new :: color: Color blue; openInWorld message > > cascade (::) > > > > > > But surely these can't go by the same name, so I think you are > > correct. > > > > > > On Wed, Jul 31, 2024 at 9:37?PM Andres Valloud via Cuis-dev > > > wrote: > > > > The name of this bit of syntax is "chain". > > > > On 7/31/24 6:17 PM, Mark Volkmann via Cuis-dev wrote: > > > What is the official name of the :: operator? > > -- Cuis-dev mailing list > > Cuis-dev at lists.cuis.st > > https://lists.cuis.st/mailman/listinfo/cuis-dev > > > > > > > > -- R. Mark Volkmann > > Object Computing, Inc. > > -- Cuis-dev mailing list > > Cuis-dev at lists.cuis.st > > https://lists.cuis.st/mailman/listinfo/cuis-dev > > > > > -- > Juan Vuletich > cuis.st > http://github.com/jvuletich > http://researchgate.net/profile/Juan-Vuletich > http://independent.academia.edu/JuanVuletich > http://patents.justia.com/inventor/juan-manuel-vuletich > http://linkedin.com/in/juan-vuletich-75611b3 > http://twitter.com/JuanVuletich > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev From r.mark.volkmann at gmail.com Thu Aug 15 13:30:19 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Thu, 15 Aug 2024 15:30:19 -0500 Subject: [Cuis-dev] hole in my Morphic knowledge In-Reply-To: References: Message-ID: On Thu, Aug 15, 2024 at 8:34?AM Mark Volkmann wrote: > I was somewhat surprised to learn that LayoutMorph does not implement a > drawOn: method that sends #drawOn: to each of its submorphs. What is it > that triggers the submorphs to be drawn? I had assumed that any morph can > have submorphs, but most morphs (like LabelMorph) do not draw their > submorphs. Now I'm questioning that assumption. > It's more complicated than I had imagined. Here is my attempt to answer the question ... How does the message `#drawOn:` get sent to each currently visible morph? The abstract class `MorphicCanvas` defines the method `drawCurrentAndSubmorphs` as `subclassResponsibility`. The subclasses of `MorphicCanvas` which include `BitBltCanvas`, `BoundsFinderCanvas`, `HybridCanvas`, and `VectorCanvas`. all implement the `drawCurrentAndSubmorphs` method. The `MorphicCanvas` method `fullDraw:` sends the message `#drawCurrentAndSubmorphs` to an instance of one of these `MorphicCanvas` subclasses. The `drawCurrentAndSubmorphs` method sends the message `#drawOn:` to the current morph and sends the message `#fullDraw` to each submorph. The sequence of message sends that lead to the first call to `fullDraw:` is: - `UISupervisor class newUIProcess` - `UISupervisor class spawnNewMorphicProcessFor:` - `WorldMorph runProcess` - `WorldMorph mainLoop` - `WorldMorph displayWorldOn:` - `MorphicCanvas drawWorld:repair: calls` - `MorphicCanvas drawRoots:rootsDamage:backgroundDamage:` - `MorphicCanvas fullDraw:` -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Fri Aug 16 11:16:27 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Fri, 16 Aug 2024 13:16:27 -0500 Subject: [Cuis-dev] PluggableScrollPane scroller width Message-ID: I have the following Morph containment hierarchy: - PluggableScrollPane - LayoutMorph newColumn - a bunch of LayoutMorph newRow All of these have their layoutSpec proportionalWidth set to 1. When I run my app, the PluggableScrollPane width is stretched to match the width of its parent. But the other morph widths are not stretched to match that width. Is there something extra I need to send to my PlugglableScrollPane to tell it that the width of the assigned "scroller" (my LayoutMorph newColumn) should have its width stretched? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Fri Aug 16 14:50:08 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Fri, 16 Aug 2024 16:50:08 -0500 Subject: [Cuis-dev] font support for "struckThrough" Message-ID: Does the font method "struckThrough" only work for certain fonts? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Fri Aug 16 17:38:23 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Fri, 16 Aug 2024 19:38:23 -0500 Subject: [Cuis-dev] font support for "struckThrough" In-Reply-To: References: Message-ID: On Fri, Aug 16, 2024 at 4:50?PM Mark Volkmann wrote: > Does the font method "struckThrough" only work for certain fonts? > As an example, with the default font, this does not render a label with strikethrough text: label := LabelMorph contents: 'TEST LABEL'. label font struckThrough. label openInWorld. I'm wondering if the only reason it doesn't is that I need to use a different font. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cuis.01 at klix.ch Sat Aug 17 04:09:18 2024 From: cuis.01 at klix.ch (Gerald Klix) Date: Sat, 17 Aug 2024 13:09:18 +0200 Subject: [Cuis-dev] font support for "struckThrough" In-Reply-To: References: Message-ID: <65f2ff4f-2e2a-0bd4-7af9-d7f06e3c93f6@klix.ch> For me this works nicely: LabelMorph contents: 'TEST LABEL' struck :: openInHand but consider the difference between those two morphs: LabelMorph contents: `'TEST', ' LABEL' struck` :: openInHand. TextParagraphMorph contents: `'TEST', ' LABEL' struck` :: openInHand. The reason for this difference is left as an exercise for the reader. HTH, Gerald On 8/17/24 2:38 AM, Mark Volkmann via Cuis-dev wrote: > label := LabelMorph contents: 'TEST LABEL'. > label font struckThrough. > label openInWorld. From cuis.01 at klix.ch Sat Aug 17 04:21:21 2024 From: cuis.01 at klix.ch (Gerald Klix) Date: Sat, 17 Aug 2024 13:21:21 +0200 Subject: [Cuis-dev] font support for "struckThrough" In-Reply-To: <65f2ff4f-2e2a-0bd4-7af9-d7f06e3c93f6@klix.ch> References: <65f2ff4f-2e2a-0bd4-7af9-d7f06e3c93f6@klix.ch> Message-ID: <54ded660-9c7f-6c1c-c64a-d3bebdf66dd6@klix.ch> This works too: label := LabelMorph contents: 'TEST LABEL'. label font: label font struckThrough. label openInHand On 8/17/24 1:09 PM, Gerald Klix via Cuis-dev wrote: > For me this works nicely: > > LabelMorph contents: 'TEST LABEL' struck :: openInHand > > but consider the difference between those two morphs: > > LabelMorph contents: `'TEST', ' LABEL' struck` :: openInHand. > TextParagraphMorph contents: `'TEST', ' LABEL' struck` :: openInHand. > > The reason for this difference is left as an exercise for the reader. > > > HTH, > > Gerald > > On 8/17/24 2:38 AM, Mark Volkmann via Cuis-dev wrote: >> label := LabelMorph contents: 'TEST LABEL'. >> label font struckThrough. >> label openInWorld. > From r.mark.volkmann at gmail.com Sat Aug 17 12:11:00 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sat, 17 Aug 2024 14:11:00 -0500 Subject: [Cuis-dev] PluggableScrollPane scroller width In-Reply-To: References: Message-ID: Added example code at bottom of this email ... On Fri, Aug 16, 2024 at 1:16?PM Mark Volkmann wrote: > I have the following Morph containment hierarchy: > > - PluggableScrollPane > - LayoutMorph newColumn > - a bunch of LayoutMorph newRow > > All of these have their layoutSpec proportionalWidth set to 1. > When I run my app, the PluggableScrollPane width is stretched to match the > width of its parent. > But the other morph widths are not stretched to match that width. > Is there something extra I need to send to my PlugglableScrollPane to tell > it that the width of the assigned "scroller" (my LayoutMorph newColumn) > should have its width stretched? > To demonstrate the issue, I created the class ProportionalWidthIssue. A screenshot of the result and a fileOut are attached. The question is why the width of column doesn't expand to fill the PluggableScrollPane. This class is a subclass of Object and only has the following instance methods. initialize | column psp | column := LayoutMorph newColumn. column layoutSpec proportionalWidth: 1. column addMorph: (self makeRow: #('One' 'Two')). column addMorph: (self makeRow: #('Three' 'Four')). column addMorph: (self makeRow: #('Five' 'Six')). column addMorph: (self makeRow: #('Seven' 'Eight')). column addMorph: (self makeRow: #('Nine' 'Ten')). psp := PluggableScrollPane new. psp morphExtent: 200 @ 70. psp scroller: column. psp openInHand. makeRow: anArray | row | row := LayoutMorph newRow color: Color white. row layoutSpec proportionalWidth: 1. anArray withIndexDo: [ :element :index | | label | label := LabelMorph contents: element. index = 1 ifTrue: [ label layoutSpec proportionalWidth: 1 ]. row addMorph: label. ]. ^ row A fileOut is attached. To see the issue, enter ProportionalWidthIssue new in a Workspace and "Do It". -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ProportionalWidthIssue.st Type: application/octet-stream Size: 1231 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot 2024-08-17 at 2.08.58?PM.png Type: image/png Size: 5393 bytes Desc: not available URL: From ken.dickey at whidbey.com Sat Aug 17 15:07:49 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Sat, 17 Aug 2024 15:07:49 -0700 Subject: [Cuis-dev] PluggableScrollPane scroller width In-Reply-To: References: Message-ID: <722b6ee372ee6b3e4bd966781c9c990b@whidbey.com> Hi Mark, Not quite sure what you are trying to do here. Note that the `scroller` in a PluggableScrollPane is a Morph of fixed extent. It is not contained within a LayoutMorph, so its LayoutSpec is ignored. The interior LabelMorphs use default LayoutSpec's which specify to use the Morph's initial width and height. Remember that a Morph's LayoutSpec is only interpreted when it is a submorph of a LayoutMorph. HTH, -KenD From marianomontone at gmail.com Sat Aug 17 15:59:52 2024 From: marianomontone at gmail.com (Mariano Montone) Date: Sat, 17 Aug 2024 19:59:52 -0300 Subject: [Cuis-dev] PluggableScrollPane scroller width In-Reply-To: References: Message-ID: <8a4380d3-f0a1-4b0d-b3eb-80180a2fddaa@gmail.com> Adjust the width of the scroller morph: psp scroller morphWidth: 180. Note that that width will not adjust dynamically (as you change the morph extent of the whole morph). El 17/8/24 a las 16:11, Mark Volkmann via Cuis-dev escribi?: > Added?example code at bottom of this email ... > > On Fri, Aug 16, 2024 at 1:16?PM Mark Volkmann > wrote: > > I have the following Morph containment hierarchy: > > - PluggableScrollPane > ? - LayoutMorph newColumn > ? ? - a bunch of LayoutMorph newRow > > All of these have their layoutSpec proportionalWidth set to 1. > When I run my app, the PluggableScrollPane width is stretched?to > match the width of its parent. > But the other morph widths are not stretched to match that width. > Is there something extra I need to send to > my?PlugglableScrollPane?to tell it that the width of the assigned > "scroller" (my LayoutMorph newColumn) should have its width stretched? > > > To demonstrate?the issue, I created the class ProportionalWidthIssue. > A screenshot of the result and a fileOut are attached. > The question is why the width of column doesn't expand to fill the > PluggableScrollPane. > > This class is a subclass of Object and only has the following instance > methods. > > initialize > ? ? | column psp | > > column := LayoutMorph newColumn. > column layoutSpec proportionalWidth: 1. > column addMorph: (self makeRow: #('One' 'Two')). > column addMorph: (self makeRow: #('Three' 'Four')). > column addMorph: (self makeRow: #('Five' 'Six')). > column addMorph: (self makeRow: #('Seven' 'Eight')). > column addMorph: (self makeRow: #('Nine' 'Ten')). > > psp := PluggableScrollPane new. > psp morphExtent: 200 @ 70. > psp scroller: column. > psp openInHand. > > makeRow: anArray > | row | > row := LayoutMorph newRow color: Color white. > row layoutSpec proportionalWidth: 1. > anArray withIndexDo: [ :element :index | > | label | > label := LabelMorph contents: element. > index = 1 ifTrue: [ label layoutSpec proportionalWidth: 1 ]. > row addMorph: label. > ]. > ^ row > > A fileOut is attached. To see the issue, enter > ProportionalWidthIssue new > in a Workspace and "Do It". > > -- > R. Mark Volkmann > Object Computing, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marianomontone at gmail.com Sat Aug 17 16:22:31 2024 From: marianomontone at gmail.com (Mariano Montone) Date: Sat, 17 Aug 2024 20:22:31 -0300 Subject: [Cuis-dev] hole in my Morphic knowledge In-Reply-To: References: Message-ID: <6f38b073-311a-410e-8a56-589ba5cbfee5@gmail.com> El 15/8/24 a las 10:34, Mark Volkmann via Cuis-dev escribi?: > I was somewhat surprised to learn that LayoutMorph does not implement > a drawOn: method that sends #drawOn: to each of its submorphs. What is > it that triggers the submorphs to be drawn? I had assumed that any > morph can have submorphs, but most morphs (like LabelMorph) do not > draw their submorphs. Now I'm questioning that assumption. There's an Erudite book which is not up-to-date. Feature require: 'MorphicBook'. It has a section on the UI loop: "The UI Loop At the heart of every interactive user interface framework lies the modern equivalent of the read-evaluate-print loop of the earliest interactive computer systems. However, in this modern version, "read" processes events instead of characters and "print" performs drawing operations to update a graphical display instead of outputting text. Morphic's version of this loop adds two additional steps to provide hooks for liveness and automatic layout: do forever: ??? process inputs ??? send step to all active morphs ??? update morph layouts ??? update the display Sometimes, none of these steps will have anything to do; there are no events to process, no morph that needs to be stepped, no layout updates, and no display updates. In such cases, morphic sleeps for a few milliseconds so that it doesn't hog the CPU when it's idle." So, as you say, morphs dont' redraw their submorphs, the UI loop does it. LayoutMorph doesn't need a drawOn: method, as it has nothing to draw on a canvas, just get its submorphs positions right. Then the UI loop is in charge of triggering re-layout and redisplays of the "dirty" morphs. Also, LabelMorph doesn't have any submorphs, does it? ???? Mariano From r.mark.volkmann at gmail.com Sat Aug 17 17:26:10 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sat, 17 Aug 2024 19:26:10 -0500 Subject: [Cuis-dev] PluggableScrollPane scroller width In-Reply-To: <8a4380d3-f0a1-4b0d-b3eb-80180a2fddaa@gmail.com> References: <8a4380d3-f0a1-4b0d-b3eb-80180a2fddaa@gmail.com> Message-ID: The feedback from Ken and Mariano helped a lot! I did not know that LayoutSpecs are ignored if they are on a Morph that is not owned by a LayoutMorph, so that was great to learn. I came up with a solution. Does this seem acceptable? I created a subclass of PluggableScrollPane that holds an onExtentChanged block instance variable and I overrode the extentChanged: method like this: extentChanged: oldExtent super extentChanged: oldExtent. onExtentChanged ifNotNil: [ onExtentChanged value: self morphExtent ]. This allows me to listen for changes to the extent of my PluggableScrollPane subclass where I can do this: psp onExtentChanged: [ :newExtent | todosPane morphExtent: (psp hScrollBarWidth - 10) @ todosPane morphExtent y. ]. todosPane is the "scroller" set on the PluggableScrollPane. Not sure why I need the minus 10, but without that a horizontal scrollbar appears. This works perfectly! Now the contents of the PluggableScrollPane resizes when its size changes. The attached screenshot shows the current state of my Todo app. This has been a great learning exercise. On Sat, Aug 17, 2024 at 6:00?PM Mariano Montone via Cuis-dev < cuis-dev at lists.cuis.st> wrote: > Adjust the width of the scroller morph: > > psp scroller morphWidth: 180. > > Note that that width will not adjust dynamically (as you change the morph > extent of the whole morph). > > > El 17/8/24 a las 16:11, Mark Volkmann via Cuis-dev escribi?: > > Added example code at bottom of this email ... > > On Fri, Aug 16, 2024 at 1:16?PM Mark Volkmann > wrote: > >> I have the following Morph containment hierarchy: >> >> - PluggableScrollPane >> - LayoutMorph newColumn >> - a bunch of LayoutMorph newRow >> >> All of these have their layoutSpec proportionalWidth set to 1. >> When I run my app, the PluggableScrollPane width is stretched to match >> the width of its parent. >> But the other morph widths are not stretched to match that width. >> Is there something extra I need to send to my PlugglableScrollPane to >> tell it that the width of the assigned "scroller" (my LayoutMorph >> newColumn) should have its width stretched? >> > > To demonstrate the issue, I created the class ProportionalWidthIssue. A > screenshot of the result and a fileOut are attached. > The question is why the width of column doesn't expand to fill the > PluggableScrollPane. > > This class is a subclass of Object and only has the following instance > methods. > > initialize > | column psp | > > column := LayoutMorph newColumn. > column layoutSpec proportionalWidth: 1. > column addMorph: (self makeRow: #('One' 'Two')). > column addMorph: (self makeRow: #('Three' 'Four')). > column addMorph: (self makeRow: #('Five' 'Six')). > column addMorph: (self makeRow: #('Seven' 'Eight')). > column addMorph: (self makeRow: #('Nine' 'Ten')). > > psp := PluggableScrollPane new. > psp morphExtent: 200 @ 70. > psp scroller: column. > psp openInHand. > > makeRow: anArray > | row | > row := LayoutMorph newRow color: Color white. > row layoutSpec proportionalWidth: 1. > anArray withIndexDo: [ :element :index | > | label | > label := LabelMorph contents: element. > index = 1 ifTrue: [ label layoutSpec proportionalWidth: 1 ]. > row addMorph: label. > ]. > ^ row > > A fileOut is attached. To see the issue, enter > ProportionalWidthIssue new > in a Workspace and "Do It". > > -- > R. Mark Volkmann > Object Computing, Inc. > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot 2024-08-17 at 7.25.26?PM.png Type: image/png Size: 26046 bytes Desc: not available URL: From r.mark.volkmann at gmail.com Sat Aug 17 18:51:30 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sat, 17 Aug 2024 20:51:30 -0500 Subject: [Cuis-dev] updating LayoutMorph extent after deleting a sub morph Message-ID: Is there a message I can send to a LayoutMorph to make it recompute its extent after I delete some of its submorphs? I tried sending both #layoutSubmorphs and #refreshExtent, but the value of the extent property remains the same. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marianomontone at gmail.com Sat Aug 17 20:09:04 2024 From: marianomontone at gmail.com (Mariano Montone) Date: Sun, 18 Aug 2024 00:09:04 -0300 Subject: [Cuis-dev] updating LayoutMorph extent after deleting a sub morph In-Reply-To: References: Message-ID: <44b44c1e-87cf-4304-a311-60a24b189c48@gmail.com> You can make a LayoutMorph fits its contents, like this: myLayoutMorph morphExtent: myLayoutMorph minimumExtent. El 17/8/24 a las 22:51, Mark Volkmann via Cuis-dev escribi?: > Is there a message I can send to a LayoutMorph to make it recompute > its extent after I delete some of its submorphs? I tried sending both > #layoutSubmorphs and #refreshExtent, but the value of the extent > property remains the same. > > -- > R. Mark Volkmann > Object Computing, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marianomontone at gmail.com Sat Aug 17 20:26:28 2024 From: marianomontone at gmail.com (Mariano Montone) Date: Sun, 18 Aug 2024 00:26:28 -0300 Subject: [Cuis-dev] PluggableScrollPane scroller width In-Reply-To: References: <8a4380d3-f0a1-4b0d-b3eb-80180a2fddaa@gmail.com> Message-ID: It looks nice! And my opinion is that it is fine to overwrite certain behaviors in Morph classes because Morphic doesnt cover all layout cases. Havent looked closely at your implementation, though. El s?b, 17 de ago de 2024, 21:26, Mark Volkmann escribi?: > The feedback from Ken and Mariano helped a lot! > > I did not know that LayoutSpecs are ignored if they are on a Morph that is > not owned by a LayoutMorph, so that was great to learn. > > I came up with a solution. Does this seem acceptable? > I created a subclass of PluggableScrollPane that holds an onExtentChanged block > instance variable > and I overrode the extentChanged: method like this: > > extentChanged: oldExtent > super extentChanged: oldExtent. > onExtentChanged ifNotNil: [ onExtentChanged value: self morphExtent ]. > > This allows me to listen for changes to the extent of my > PluggableScrollPane subclass where I can do this: > > psp onExtentChanged: [ :newExtent | > todosPane morphExtent: (psp hScrollBarWidth - 10) @ todosPane > morphExtent y. > ]. > > todosPane is the "scroller" set on the PluggableScrollPane. > Not sure why I need the minus 10, but without that a horizontal scrollbar > appears. > This works perfectly! Now the contents of the PluggableScrollPane resizes > when its size changes. > > The attached screenshot shows the current state of my Todo app. > This has been a great learning exercise. > > On Sat, Aug 17, 2024 at 6:00?PM Mariano Montone via Cuis-dev < > cuis-dev at lists.cuis.st> wrote: > >> Adjust the width of the scroller morph: >> >> psp scroller morphWidth: 180. >> >> Note that that width will not adjust dynamically (as you change the morph >> extent of the whole morph). >> >> >> El 17/8/24 a las 16:11, Mark Volkmann via Cuis-dev escribi?: >> >> Added example code at bottom of this email ... >> >> On Fri, Aug 16, 2024 at 1:16?PM Mark Volkmann >> wrote: >> >>> I have the following Morph containment hierarchy: >>> >>> - PluggableScrollPane >>> - LayoutMorph newColumn >>> - a bunch of LayoutMorph newRow >>> >>> All of these have their layoutSpec proportionalWidth set to 1. >>> When I run my app, the PluggableScrollPane width is stretched to match >>> the width of its parent. >>> But the other morph widths are not stretched to match that width. >>> Is there something extra I need to send to my PlugglableScrollPane to >>> tell it that the width of the assigned "scroller" (my LayoutMorph >>> newColumn) should have its width stretched? >>> >> >> To demonstrate the issue, I created the class ProportionalWidthIssue. A >> screenshot of the result and a fileOut are attached. >> The question is why the width of column doesn't expand to fill the >> PluggableScrollPane. >> >> This class is a subclass of Object and only has the following instance >> methods. >> >> initialize >> | column psp | >> >> column := LayoutMorph newColumn. >> column layoutSpec proportionalWidth: 1. >> column addMorph: (self makeRow: #('One' 'Two')). >> column addMorph: (self makeRow: #('Three' 'Four')). >> column addMorph: (self makeRow: #('Five' 'Six')). >> column addMorph: (self makeRow: #('Seven' 'Eight')). >> column addMorph: (self makeRow: #('Nine' 'Ten')). >> >> psp := PluggableScrollPane new. >> psp morphExtent: 200 @ 70. >> psp scroller: column. >> psp openInHand. >> >> makeRow: anArray >> | row | >> row := LayoutMorph newRow color: Color white. >> row layoutSpec proportionalWidth: 1. >> anArray withIndexDo: [ :element :index | >> | label | >> label := LabelMorph contents: element. >> index = 1 ifTrue: [ label layoutSpec proportionalWidth: 1 ]. >> row addMorph: label. >> ]. >> ^ row >> >> A fileOut is attached. To see the issue, enter >> ProportionalWidthIssue new >> in a Workspace and "Do It". >> >> -- >> R. Mark Volkmann >> Object Computing, Inc. >> >> -- >> Cuis-dev mailing list >> Cuis-dev at lists.cuis.st >> https://lists.cuis.st/mailman/listinfo/cuis-dev >> > > > -- > R. Mark Volkmann > Object Computing, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Sun Aug 18 04:11:38 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sun, 18 Aug 2024 06:11:38 -0500 Subject: [Cuis-dev] updating LayoutMorph extent after deleting a sub morph In-Reply-To: <44b44c1e-87cf-4304-a311-60a24b189c48@gmail.com> References: <44b44c1e-87cf-4304-a311-60a24b189c48@gmail.com> Message-ID: Thanks Mariano! This is what worked for me because I don't want the width of the extent to change. todosPane morphExtent: todosPane morphExtent x @ todosPane minimumExtent y. On Sat, Aug 17, 2024 at 10:09?PM Mariano Montone via Cuis-dev < cuis-dev at lists.cuis.st> wrote: > You can make a LayoutMorph fits its contents, like this: > > myLayoutMorph morphExtent: myLayoutMorph minimumExtent. > El 17/8/24 a las 22:51, Mark Volkmann via Cuis-dev escribi?: > > Is there a message I can send to a LayoutMorph to make it recompute its > extent after I delete some of its submorphs? I tried sending both > #layoutSubmorphs and #refreshExtent, but the value of the extent property > remains the same. > > -- > R. Mark Volkmann > Object Computing, Inc. > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Sun Aug 18 12:20:57 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sun, 18 Aug 2024 14:20:57 -0500 Subject: [Cuis-dev] making a font a package requirement Message-ID: I created a package that depends on having the KurintoSans font installed. I can do that by opening the World menu and selecting Preferences ... Load all TrueTypeFonts. But is there a way I can cause that font to be installed automatically when my package is installed? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Sun Aug 18 12:31:13 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sun, 18 Aug 2024 14:31:13 -0500 Subject: [Cuis-dev] learned something interesting about installing packages Message-ID: If a package is installed that defines subclasses of classes that are defined in packages that have not been installed yet, their superclass will be changed to ProtoObject. No warning message about this will be displayed. For example, suppose the UI-Entry package is not installed. That defines the class TextEntryMorph. If I install a package that defines the following class TextEntryMorph subclass: #CenteredTextEntryMorph that will be changed to ProtoObject subclass: #CenteredTextEntryMorph -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Sun Aug 18 13:41:26 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Sun, 18 Aug 2024 13:41:26 -0700 Subject: [Cuis-dev] making a font a package requirement In-Reply-To: References: Message-ID: <46629a9eba5c4fdac8113362c54b68a3@whidbey.com> On 2024-08-18 12:20, Mark Volkmann via Cuis-dev wrote: > I created a package that depends on having the KurintoSans font > installed. > I can do that by opening the World menu and selecting Preferences ... > Load all TrueTypeFonts. > But is there a way I can cause that font to be installed automatically > when my package is installed? Yes. If you look at Cuis-Smalltalk-Dev/Packages/Features/Color-Extras.pck.st you can find class methods #prePackageInstall and #postPackageInstall To use these, you need to subclass CodePackage E.g. CodePackage subclass: #ColorExtrasPackage Look at the code in Color-Extras.pck.st to see how to set this up. In your #prePackageInstall, you will want something like: TrueTypeFontFamily readAllTrueTypeFontsIn: (DirectoryEntry trueTypeFontsDirectory / 'KurintoSans'). HTH, -KenD From ken.dickey at whidbey.com Sun Aug 18 13:44:53 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Sun, 18 Aug 2024 13:44:53 -0700 Subject: [Cuis-dev] learned something interesting about installing packages In-Reply-To: References: Message-ID: On 2024-08-18 12:31, Mark Volkmann via Cuis-dev wrote: > If a package is installed that defines subclasses of classes that are > defined in packages that have not been installed yet, their superclass > will be changed to ProtoObject. No warning message about this will be > displayed. > > For example, suppose the UI-Entry package is not installed. > That defines the class TextEntryMorph. > If I install a package that defines the following class > > TextEntryMorph subclass: #CenteredTextEntryMorph > > that will be changed to > > ProtoObject subclass: #CenteredTextEntryMorph -- As opposed to creating an error.. Good to see you are testing packages before releasing them on an unsuspecting world. ;^) When you see this, it is a reminder to have your shiny new package _require_ the requisite packages. HTH, -KenD From r.mark.volkmann at gmail.com Sun Aug 18 16:51:44 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sun, 18 Aug 2024 18:51:44 -0500 Subject: [Cuis-dev] learned something interesting about installing packages In-Reply-To: References: Message-ID: On Sun, Aug 18, 2024 at 3:44?PM wrote: > On 2024-08-18 12:31, Mark Volkmann via Cuis-dev wrote: > > > If a package is installed that defines subclasses of classes that are > > defined in packages that have not been installed yet, their superclass > > will be changed to ProtoObject. No warning message about this will be > > displayed. > > > > For example, suppose the UI-Entry package is not installed. > > That defines the class TextEntryMorph. > > If I install a package that defines the following class > > > > TextEntryMorph subclass: #CenteredTextEntryMorph > > > > that will be changed to > > > > ProtoObject subclass: #CenteredTextEntryMorph -- > > As opposed to creating an error.. > > Good to see you are testing packages before releasing them on an > unsuspecting world. ;^) > > When you see this, it is a reminder to have your shiny new package > _require_ the requisite packages. > The only way I discovered that the superclass had been changed to ProtoObject is that I ran the app and got a MessageNotUnderstood debug window. The message was for a method that was supposed to be in the superclass and I tried to find out why it wasn't found. It seems to me it would be better to get an error when the package is being installed that its requirements (superclasses existing) are not met. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marianomontone at gmail.com Mon Aug 19 04:27:52 2024 From: marianomontone at gmail.com (Mariano Montone) Date: Mon, 19 Aug 2024 08:27:52 -0300 Subject: [Cuis-dev] learned something interesting about installing packages In-Reply-To: References: Message-ID: <0b948e59-2535-4b2c-82d2-155e2888c7fc@gmail.com> Yes, raising an Error would be better in my opinion. ?? Mariano El 18/8/24 a las 16:31, Mark Volkmann via Cuis-dev escribi?: > If a package is installed that defines subclasses of classes that are > defined in packages that have not been installed yet, their superclass > will be changed to ProtoObject. No warning message about this will be > displayed. > > For example, suppose the UI-Entry package is not installed. > That defines the class TextEntryMorph. > If I install a package that defines the following class > > TextEntryMorph subclass: #CenteredTextEntryMorph > > that will be changed to > > ProtoObject subclass: #CenteredTextEntryMorph > > -- > R. Mark Volkmann > Object Computing, Inc. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Mon Aug 19 07:47:08 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Mon, 19 Aug 2024 07:47:08 -0700 Subject: [Cuis-dev] learned something interesting about installing packages In-Reply-To: References: Message-ID: <79712d76b037a0844b73e43f782f119b@whidbey.com> I also think this should be a warnong or error -KenD On 2024-08-18 16:51, Mark Volkmann via Cuis-dev wrote: > On Sun, Aug 18, 2024 at 3:44?PM wrote: > >> On 2024-08-18 12:31, Mark Volkmann via Cuis-dev wrote: >> >>> If a package is installed that defines subclasses of classes that are >>> defined in packages that have not been installed yet, their >>> superclass >>> will be changed to ProtoObject. No warning message about this will be >>> displayed. >>> >>> For example, suppose the UI-Entry package is not installed. >>> That defines the class TextEntryMorph. >>> If I install a package that defines the following class >>> >>> TextEntryMorph subclass: #CenteredTextEntryMorph >>> >>> that will be changed to >>> >>> ProtoObject subclass: #CenteredTextEntryMorph -- >> >> As opposed to creating an error.. >> >> Good to see you are testing packages before releasing them on an >> unsuspecting world. ;^) >> >> When you see this, it is a reminder to have your shiny new package >> _require_ the requisite packages. > > The only way I discovered that the superclass had been changed to > ProtoObject is that I ran the app and got a MessageNotUnderstood debug > window. The message was for a method that was supposed to be in the > superclass and I tried to find out why it wasn't found. It seems to me > it would be better to get an error when the package is being installed > that its requirements (superclasses existing) are not met. > > -- > > R. Mark Volkmann > Object Computing, Inc. From juan at cuis.st Mon Aug 19 12:11:23 2024 From: juan at cuis.st (Juan Vuletich) Date: Mon, 19 Aug 2024 16:11:23 -0300 Subject: [Cuis-dev] learned something interesting about installing packages In-Reply-To: References: Message-ID: <66C398DB.6000000@cuis.st> On 8/18/2024 4:31 PM, Mark Volkmann via Cuis-dev wrote: > If a package is installed that defines subclasses of classes that are > defined in packages that have not been installed yet, their superclass > will be changed to ProtoObject. No warning message about this will be > displayed. > > For example, suppose the UI-Entry package is not installed. > That defines the class TextEntryMorph. > If I install a package that defines the following class > > TextEntryMorph subclass: #CenteredTextEntryMorph > > that will be changed to > > ProtoObject subclass: #CenteredTextEntryMorph > > -- > R. Mark Volkmann > Object Computing, Inc. Just keep the Transcript open. You are warned about these kinds of issues there. HTH, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Mon Aug 19 12:12:23 2024 From: juan at cuis.st (Juan Vuletich) Date: Mon, 19 Aug 2024 16:12:23 -0300 Subject: [Cuis-dev] making a font a package requirement In-Reply-To: References: Message-ID: <66C39917.70002@cuis.st> On 8/18/2024 4:20 PM, Mark Volkmann via Cuis-dev wrote: > I created a package that depends on having the KurintoSans font > installed. > I can do that by opening the World menu and selecting Preferences ... > Load all TrueTypeFonts. > But is there a way I can cause that font to be installed automatically > when my package is installed? > > -- > R. Mark Volkmann > Object Computing, Inc. On any new class in your package (add a new class if needed), write a class side #initialize method. It will be called after package install. HTH, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Mon Aug 19 13:43:18 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Mon, 19 Aug 2024 15:43:18 -0500 Subject: [Cuis-dev] learned something interesting about installing packages In-Reply-To: <66C398DB.6000000@cuis.st> References: <66C398DB.6000000@cuis.st> Message-ID: On Mon, Aug 19, 2024 at 2:11?PM Juan Vuletich wrote: > On 8/18/2024 4:31 PM, Mark Volkmann via Cuis-dev wrote: > > If a package is installed that defines subclasses of classes that are > defined in packages that have not been installed yet, their superclass will > be changed to ProtoObject. No warning message about this will be > displayed. > > For example, suppose the UI-Entry package is not installed. > That defines the class TextEntryMorph. > If I install a package that defines the following class > > TextEntryMorph subclass: #CenteredTextEntryMorph > > that will be changed to > > ProtoObject subclass: #CenteredTextEntryMorph > > -- > R. Mark Volkmann > Object Computing, Inc. > > > Just keep the Transcript open. You are warned about these kinds of issues > there. > Thanks, I see that now. The message is: "Attempt to create {subclass-name} as a subclass of nil. Possibly a class is being loaded before its superclass." -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Mon Aug 19 14:45:02 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Mon, 19 Aug 2024 16:45:02 -0500 Subject: [Cuis-dev] removing developer tools from a Cuis Smalltalk image Message-ID: Where can I find information on the steps required to remove developer tools from a Cuis Smalltalk image in order to create an image that is suitable for non-developer users to run? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Tue Aug 20 05:54:08 2024 From: juan at cuis.st (Juan Vuletich) Date: Tue, 20 Aug 2024 09:54:08 -0300 Subject: [Cuis-dev] removing developer tools from a Cuis Smalltalk image In-Reply-To: References: Message-ID: <66C491F0.9000303@cuis.st> On 8/19/2024 6:45 PM, Mark Volkmann via Cuis-dev wrote: > Where can I find information on the steps required to remove developer > tools from a Cuis Smalltalk image in order to create an image that is > suitable for non-developer users to run? > > -- > R. Mark Volkmann > Object Computing, Inc. There's not much done wrt that for Cuis. Isn't setting appropriate menus to make them inaccessible enough? -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Tue Aug 20 06:30:36 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Tue, 20 Aug 2024 08:30:36 -0500 Subject: [Cuis-dev] removing developer tools from a Cuis Smalltalk image In-Reply-To: <66C491F0.9000303@cuis.st> References: <66C491F0.9000303@cuis.st> Message-ID: On Tue, Aug 20, 2024 at 7:54?AM Juan Vuletich wrote: > On 8/19/2024 6:45 PM, Mark Volkmann via Cuis-dev wrote: > > Where can I find information on the steps required to remove developer > tools from a Cuis Smalltalk image in order to create an image that is > suitable for non-developer users to run? > > There's not much done wrt that for Cuis. Isn't setting appropriate menus > to make them inaccessible enough? > I was thinking it would be nice to remove classes that a non-developer user won't need just to reduce the image size. Has someone documented the steps to make menus (especially the World menu) inaccessible? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Tue Aug 20 07:39:52 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Tue, 20 Aug 2024 09:39:52 -0500 Subject: [Cuis-dev] removing developer tools from a Cuis Smalltalk image In-Reply-To: References: <66C491F0.9000303@cuis.st> Message-ID: I see that I can remove the Taskbar with UISupervisor runningWorld hideTaskbar. In the WorldMorph instance method getMenu I see this comment: "Put up the world menu, triggered by the passed-in event. Perhaps a good place to disable it if needed (by answering nil)" Is the recommended way to disable the World menu to just modify this method to return nil or is there another way that doesn't involve modifying supplied classes? Another thing that would be nice to do in images for non-developers is to find a way to catch all MessageNotUnderstood errors and display a user-friendly error message. Is there a recommended way to do that? -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Tue Aug 20 10:41:24 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Tue, 20 Aug 2024 10:41:24 -0700 Subject: [Cuis-dev] removing developer tools from a Cuis Smalltalk image In-Reply-To: References: <66C491F0.9000303@cuis.st> Message-ID: On 2024-08-20 07:39, Mark Volkmann via Cuis-dev wrote: > Another thing that would be nice to do in images for non-developers is > to find a way to catch all MessageNotUnderstood errors and display a > user-friendly error message. Is there a recommended way to do that? If you browse the #doesNotUnderstand messages, you should note: vvv===vvv Exception>>noHandler "No one has handled this error, but now give them a chance to decide how to debug it. If none handle this either then open debugger (see UnhandedError-defaultAction)" UnhandledError signalForException: self ^^^===VVV So, look at UnhandledError>>defaultAction HTH, -KenD From r.mark.volkmann at gmail.com Wed Aug 21 06:55:42 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Wed, 21 Aug 2024 08:55:42 -0500 Subject: [Cuis-dev] prevent resizing Message-ID: Is there an easy way to configure a subclass of SystemWindow from being resized by the user by dragging a corner or edge? While looking for a solution to this, I ran across a spelling error in a method name. BoxedMorph defines the method ensureMinimimExtent, but it should be ensureMinimumExtent. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Wed Aug 21 07:10:57 2024 From: juan at cuis.st (Juan Vuletich) Date: Wed, 21 Aug 2024 11:10:57 -0300 Subject: [Cuis-dev] prevent resizing In-Reply-To: References: Message-ID: <66C5F571.1090602@cuis.st> On 8/21/2024 10:55 AM, Mark Volkmann via Cuis-dev wrote: > Is there an easy way to configure a subclass of SystemWindow from > being resized by the user by dragging a corner or edge? Not that I remember. Some hacking is in order. > > While looking for a solution to this, I ran across a spelling error in > a method name. BoxedMorph defines the method ensureMinimimExtent, but > it should be ensureMinimumExtent. Thanks! Just pushed an update (with your initials) to GitHub. > > -- > R. Mark Volkmann > Object Computing, Inc. -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Wed Aug 21 09:03:05 2024 From: juan at cuis.st (Juan Vuletich) Date: Wed, 21 Aug 2024 13:03:05 -0300 Subject: [Cuis-dev] LayoutMorph separation In-Reply-To: <5efcf669422dee88071a1c587ac9400c@whidbey.com> References: <5efcf669422dee88071a1c587ac9400c@whidbey.com> Message-ID: <66C60FB9.5020404@cuis.st> Hi Folks, On 8/14/2024 5:59 PM, ken.dickey--- via Cuis-dev wrote: > On 2024-08-13 17:01, Mark Volkmann via Cuis-dev wrote: > >> On Tue, Aug 13, 2024 at 9:18?AM wrote: >> >>> On 2024-08-12 17:01, Mark Volkmann via Cuis-dev wrote: >>> >>>> I seem to keep running into situations where I want separation in a >>>> LayoutMorph to only be added between the submorphs and not before the >>>> first and after the last. I see that I can achieve that by modifying >>>> the LayoutMorph method layoutSubmorphsHorizontallyIn:. But I don't >>>> always want that behavior. I'd like that to be configurable. Is there >>>> already a way to do this that I'm missing? > >> No. > >>>> I'd rather not have to insert spacer morphs, especially if there >>>> are a large number of submorphs. >>>> I attached my solution which is to create a subclass of LayoutMorph >>>> that adds a boolean instance variable "trim". >>>> When that is true, it avoids adding separation before the first and >>>> after the last submorph. >>>> This works for my use cases. >>>> It would be great if this was added to LayoutMorph. It wouldn't >>>> affect its current behavior. > > Mark, thanks much for contributing. > > Two things: > [A] I prefer #useEdgeSpace to #trim as 'trim' seems too generic a > term to me. ['shrinkWrap' might work as well]. > [B] Due to edge cases, the math is a bit difficult to get right. > > Please check the code and try `Layout2Morph example1` in the attached. > > I am still testing, but think this may be close to what you want. > > Thanks again for this! > -KenD Thank you very much Mark and Ken for working on this! I've just integrated a slightly later version of this code with your latest work. It works nicely. Thanks! -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich From cuis.01 at klix.ch Wed Aug 21 09:12:33 2024 From: cuis.01 at klix.ch (Gerald Klix) Date: Wed, 21 Aug 2024 18:12:33 +0200 Subject: [Cuis-dev] prevent resizing In-Reply-To: <66C5F571.1090602@cuis.st> References: <66C5F571.1090602@cuis.st> Message-ID: <0d74df81-e17b-37a4-f996-8186c1967537@klix.ch> Hi Mark, Hi Juan, It can be done by removing the adjuster morphs. Please see the attached file-out of FixedSizeSystemWindow. You can use this code snippet to test it: FixedSizeSystemWindow editText: (TextModel withText: 'Test')? label: 'Test' wrap: false @Juan; IHMO it makes sense to refactor the adjuster creation, after all the window's buttons are already created in a separate method. Please see the attached change set, for Cuis/Haver 7.0, which should be easily portable to Cuis7.1. HTH, Gerald On 8/21/24 4:10 PM, Juan Vuletich via Cuis-dev wrote: > On 8/21/2024 10:55 AM, Mark Volkmann via Cuis-dev wrote: >> Is there an easy way to configure a subclass of SystemWindow from >> being resized by the user by dragging a corner or edge? > > Not that I remember. Some hacking is in order. > >> >> While looking for a solution to this, I ran across a spelling error >> in a method name. BoxedMorph defines the method ensureMinimimExtent, >> but it should be ensureMinimumExtent. > > Thanks! Just pushed an update (with your initials) to GitHub. > >> >> -- >> R. Mark Volkmann >> Object Computing, Inc. >> -------------- next part -------------- A non-text attachment was scrubbed... Name: FixedSizeSystemWindow.st Type: application/vnd.sailingtracker.track Size: 695 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: [r7.0]-6457-CleanerWindowEdgeAdjusterCreation-GeraldKlix-2024Aug21-18h03m-KLG.001.cs.st Type: application/vnd.sailingtracker.track Size: 1646 bytes Desc: not available URL: From r.mark.volkmann at gmail.com Wed Aug 21 18:08:54 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Wed, 21 Aug 2024 20:08:54 -0500 Subject: [Cuis-dev] adding functionality to morphs Message-ID: For the todo app I built as a learning exercise I ended up defining two classes that are subclasses of morph subclasses. I'm wondering if the approach I took is a recommended approach. I defined the class PluggableScroll2Pane which is a subclass of PluggableScrollPane because I wanted to register a block to be evaluated every time its extent changes. It only adds the instance variable onExtentChanged and these instance methods: onExtentChanged: aBlock onExtentChanged := aBlock extentChanged: oldExtent super extentChanged: oldExtent. onExtentChanged ifNotNil: [ onExtentChanged value: self morphExtent ]. I defined the class TextEntry2Morph which is a subclass of TextEntryMorph because I wanted to register a block to be evaluated every time it has focus and the user presses the escape key. It only adds the instance variable escapeAction and these instance methods: escapeAction: aBlock escapeAction := aBlock escapeAction ^ escapeAction keyStroke: aKeyboardEvent (aKeyboardEvent isEsc and: (escapeAction isNil not)) ifTrue: [ escapeAction value ] ifFalse: [ super keyStroke: aKeyboardEvent ] Is there a way I could have achieved the same goals without creating new subclasses? I welcome any critique of this code. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Wed Aug 21 18:21:06 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Wed, 21 Aug 2024 20:21:06 -0500 Subject: [Cuis-dev] prevent resizing In-Reply-To: <0d74df81-e17b-37a4-f996-8186c1967537@klix.ch> References: <66C5F571.1090602@cuis.st> <0d74df81-e17b-37a4-f996-8186c1967537@klix.ch> Message-ID: Thanks so much Gerald! Is there a reason why you collect the morphs to remove in an OrderedCollection and then iterate over that to delete them versus just removing them in the block passed to submorphsDo? On Wed, Aug 21, 2024 at 11:12?AM Gerald Klix via Cuis-dev < cuis-dev at lists.cuis.st> wrote: > Hi Mark, Hi Juan, > > It can be done by removing the adjuster morphs. > Please see the attached file-out of FixedSizeSystemWindow. > > You can use this code snippet to test it: > FixedSizeSystemWindow editText: (TextModel withText: 'Test') label: > 'Test' wrap: false > > On 8/21/24 4:10 PM, Juan Vuletich via Cuis-dev wrote: > > On 8/21/2024 10:55 AM, Mark Volkmann via Cuis-dev wrote: > >> Is there an easy way to configure a subclass of SystemWindow from > >> being resized by the user by dragging a corner or edge? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfern at free.fr Thu Aug 22 01:16:49 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Thu, 22 Aug 2024 10:16:49 +0200 Subject: [Cuis-dev] adding functionality to morphs In-Reply-To: References: Message-ID: What about listening to key stroke event on TextModelMorph. TextEntryMorph is a bit limited in its features. Code example from DrGeo: ??? tMorph scroller ??????? setProperty: #keyStroke: ??????? toValue: [:event | ??????????? tMorph scroller acceptContents. ??????????? self changed: #isReadyToApply]. Le 22/08/2024 ? 03:08, Mark Volkmann via Cuis-dev a ?crit?: > I defined the class TextEntry2Morph which is a subclass of > TextEntryMorph because I wanted to register a block to be evaluated > every time it has focus and the user presses the escape key. It only > adds the instance variable escapeAction and these instance methods: -- GNU Dr. Geo http://gnu.org/s/dr-geo/ http://gnu-drgeo.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From cuis.01 at klix.ch Thu Aug 22 03:54:43 2024 From: cuis.01 at klix.ch (Gerald Klix) Date: Thu, 22 Aug 2024 12:54:43 +0200 Subject: [Cuis-dev] prevent resizing In-Reply-To: References: <66C5F571.1090602@cuis.st> <0d74df81-e17b-37a4-f996-8186c1967537@klix.ch> Message-ID: Hi Mark, please apologize that I do not send mail to your GMail account. They won't accept my mail, because it's not DKIM-signend, but they send me DKIM-signed spam about once week. Result: I blocked a wide range of IP addresses belonging to them at my firewall; even DNS is blocked, so no mail from or to GMail. Back to your question(s), especially to those you did not ask :] 1) Adding morphs in #initialize and then removing them in a subclass' #initialize method creates some objects that will immediately become garbage, it's a waste of resources. Therefore a better solution is to factor out that creation of the adjuster morphs into a separate method and redefine that method in that subclass to do nothing. 2) The "best" solution is to start with that fixed size window as a superclass and make SystemWindow a subclass containing the resizing logic including the adjusters instance variable. If there are many applications for fixed size windows, this huge change will be well worth it. 3) Your original questions has two answers: a) For reasons unknown to me ? if I had to guess, I would say memory consumption ? when Morphic for Squeak was invented a PC/Mac with 32 *Mega*bytes of main memory was a huge machine ? the submorphs instance variable always holds an array and not, as one might expect, an OrderedCollection. Therefore removing or adding a sub-morph is an operation more costly than you might suspect. If you look at Morph>>#removeAllMorphsIn: you will see that Juan went to great length to make that operation still efficient. b) Iterating over collections while changing them is prone for disaster in most programming languages. For Cuis' sub-morphs you can use `self submorphs do:` instead of `submorphsDo:`, because #submorphs answers a copy of that aforementioned array of sub-morphs. In this particular case you can even get away by using #submorphsDo: and removing the adjuster morphs one by one, because removing a morph boils down to sending #privateRemove: to the SystemWindow instance. #privateRemove: is defined like this. privateRemove: aMorph ??? "Private! Should only be used by methods that maintain the ower/submorph invariant." ??? submorphs := submorphs copyWithout: aMorph. You see that #privateRemove copies the submorphs array, therefor you are safe. So if you do it that way, you create eight copies of that sub-morph array, of which 7 immediately become garbage. HTH and Best Regards, Gerald On 8/22/24 3:21 AM, Mark Volkmann via Cuis-dev wrote: > Thanks so much Gerald! Is there a reason why you collect the morphs to > remove in an OrderedCollection and then iterate over that to delete them > versus just removing them in the block passed to submorphsDo? > > On Wed, Aug 21, 2024 at 11:12?AM Gerald Klix via Cuis-dev < > cuis-dev at lists.cuis.st> wrote: > >> Hi Mark, Hi Juan, >> >> It can be done by removing the adjuster morphs. >> Please see the attached file-out of FixedSizeSystemWindow. >> >> You can use this code snippet to test it: >> FixedSizeSystemWindow editText: (TextModel withText: 'Test') label: >> 'Test' wrap: false >> >> On 8/21/24 4:10 PM, Juan Vuletich via Cuis-dev wrote: >>> On 8/21/2024 10:55 AM, Mark Volkmann via Cuis-dev wrote: >>>> Is there an easy way to configure a subclass of SystemWindow from >>>> being resized by the user by dragging a corner or edge? > > From ten at smallinteger.com Thu Aug 22 08:12:51 2024 From: ten at smallinteger.com (Andres Valloud) Date: Thu, 22 Aug 2024 08:12:51 -0700 Subject: [Cuis-dev] prevent resizing In-Reply-To: References: <66C5F571.1090602@cuis.st> <0d74df81-e17b-37a4-f996-8186c1967537@klix.ch> Message-ID: <4cbcac8b-045a-4182-a6a1-9a9cce3f302e@smallinteger.com> FYI often SPF is enough and it's quite simpler than maintaining DKIM. On 8/22/24 3:54 AM, Gerald Klix via Cuis-dev wrote: > They won't accept my mail, because it's not DKIM-signend, From barry.perryman at gmail.com Thu Aug 22 09:09:22 2024 From: barry.perryman at gmail.com (Barry Perryman) Date: Thu, 22 Aug 2024 17:09:22 +0100 Subject: [Cuis-dev] Bouncing Atoms - couple of small bugs - further adventures... In-Reply-To: <332ae537-d701-45a6-a583-3215fa74cc43@free.fr> References: <332ae537-d701-45a6-a583-3215fa74cc43@free.fr> Message-ID: Actually I found another small thing. With the graph open the display is showing high precision numbers for the graph positions. I have attached a simple fix for this that restricts things to the single decimal place which seems to have been the original intent. Barry > On 11 Aug 2024, at 08:57, Hilaire Fernandes via Cuis-dev wrote: > > Thanks Barry, > > Changes committed > > -- > GNU Dr. Geo > http://gnu.org/s/dr-geo/ > http://gnu-drgeo.blogspot.com/ > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Thu Aug 22 18:30:13 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Thu, 22 Aug 2024 20:30:13 -0500 Subject: [Cuis-dev] prevent resizing In-Reply-To: References: <66C5F571.1090602@cuis.st> <0d74df81-e17b-37a4-f996-8186c1967537@klix.ch> Message-ID: Gerald, thanks so much for explaining that! On Thu, Aug 22, 2024 at 5:55?AM Gerald Klix via Cuis-dev < cuis-dev at lists.cuis.st> wrote: > Hi Mark, > > please apologize that I do not send mail to your GMail account. > They won't accept my mail, because it's not DKIM-signend, > but they send me DKIM-signed spam about once week. > Result: I blocked a wide range of IP addresses belonging to them > at my firewall; even DNS is blocked, so no mail from or to GMail. > > > Back to your question(s), especially to those you did not ask :] > > 1) Adding morphs in #initialize and then removing them in a subclass' > #initialize > method creates some objects that will immediately become garbage, > it's a waste of resources. Therefore a better solution is to factor > out that creation of the adjuster morphs into a separate method > and redefine that method in that subclass to do nothing. > > 2) The "best" solution is to start with that fixed size window > as a superclass and make SystemWindow a subclass containing > the resizing logic including the adjusters instance variable. > If there are many applications for fixed size windows, > this huge change will be well worth it. > > 3) Your original questions has two answers: > > a) For reasons unknown to me ? if I had to guess, > I would say memory consumption ? when Morphic for Squeak > was invented a PC/Mac with 32 *Mega*bytes of main memory > was a huge machine ? the submorphs instance variable always > holds an array and not, as one might expect, an OrderedCollection. > Therefore removing or adding a sub-morph is an operation > more costly than you might suspect. If you look at > Morph>>#removeAllMorphsIn: you will see that > Juan went to great length to make that operation still > efficient. > > b) Iterating over collections while changing them is > prone for disaster in most programming languages. > > For Cuis' sub-morphs you can use `self submorphs do:` > instead of `submorphsDo:`, because #submorphs > answers a copy of that aforementioned array of sub-morphs. > In this particular case you can even get away by using > #submorphsDo: and removing the adjuster morphs one by one, > because removing a morph boils down to sending #privateRemove: > to the SystemWindow instance. #privateRemove: is defined like this. > > privateRemove: aMorph > "Private! Should only be used by methods that maintain the > ower/submorph invariant." > submorphs := submorphs copyWithout: aMorph. > > You see that #privateRemove copies the submorphs array, > therefor you are safe. > So if you do it that way, you create eight copies of that sub-morph array, > of which 7 immediately become garbage. > > > HTH and Best Regards, > > Gerald > > > On 8/22/24 3:21 AM, Mark Volkmann via Cuis-dev wrote: > > Thanks so much Gerald! Is there a reason why you collect the morphs to > > remove in an OrderedCollection and then iterate over that to delete them > > versus just removing them in the block passed to submorphsDo? > > > > On Wed, Aug 21, 2024 at 11:12?AM Gerald Klix via Cuis-dev < > > cuis-dev at lists.cuis.st> wrote: > > > >> Hi Mark, Hi Juan, > >> > >> It can be done by removing the adjuster morphs. > >> Please see the attached file-out of FixedSizeSystemWindow. > >> > >> You can use this code snippet to test it: > >> FixedSizeSystemWindow editText: (TextModel withText: 'Test') label: > >> 'Test' wrap: false > >> > >> On 8/21/24 4:10 PM, Juan Vuletich via Cuis-dev wrote: > >>> On 8/21/2024 10:55 AM, Mark Volkmann via Cuis-dev wrote: > >>>> Is there an easy way to configure a subclass of SystemWindow from > >>>> being resized by the user by dragging a corner or edge? > > > > > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Thu Aug 22 18:34:19 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Thu, 22 Aug 2024 20:34:19 -0500 Subject: [Cuis-dev] adding functionality to morphs In-Reply-To: References: Message-ID: The issue I've run into with TextModelMorph is that it seems to be for multi-line input. Is there a way to configure it to only allow a single line of input like TextEntryMorph does? On Thu, Aug 22, 2024 at 3:17?AM Hilaire Fernandes via Cuis-dev < cuis-dev at lists.cuis.st> wrote: > What about listening to key stroke event on TextModelMorph. TextEntryMorph > is a bit limited in its features. Code example from DrGeo: > > tMorph scroller > setProperty: #keyStroke: > toValue: [:event | > tMorph scroller acceptContents. > self changed: #isReadyToApply]. > Le 22/08/2024 ? 03:08, Mark Volkmann via Cuis-dev a ?crit : > > I defined the class TextEntry2Morph which is a subclass of TextEntryMorph > because I wanted to register a block to be evaluated every time it has > focus and the user presses the escape key. It only adds the instance > variable escapeAction and these instance methods: > > -- > GNU Dr. Geohttp://gnu.org/s/dr-geo/http://gnu-drgeo.blogspot.com/ > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Sat Aug 24 11:22:57 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sat, 24 Aug 2024 13:22:57 -0500 Subject: [Cuis-dev] Morph method prefixes Message-ID: Is there a story behind why the following method names in the Morph class begin with "morph"? morphExtent morphExtentInOwner morphId morphLocalBoundsForError morphPosition morphPosition: morphPositionInWorld morphPositionInWorld: It seems like the "morph" prefix could be removed without any loss in clarity. There are many other methods in the Morph class whose names do not have that prefix. It seems uncommon for method names to begin with their class name. For example, a Dog class might have methods like name and breed, but wouldn't typically have methods like dogName and dogBreed. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Sat Aug 24 12:21:04 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sat, 24 Aug 2024 14:21:04 -0500 Subject: [Cuis-dev] cmd-s to save changes Message-ID: When I make changes to the code of a method and press cmd-s (macOS), it saves the changes. If I press cmd-s again, it inserts the letter s into the code. Is anyone else experiencing this? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Sat Aug 24 13:40:41 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sat, 24 Aug 2024 15:40:41 -0500 Subject: [Cuis-dev] updating a TextModelMorph Message-ID: I have a class whose initialize method creates a TextModelMorph like this: textModelMorph := TextModelMorph textProvider: self textGetter: #text textSetter: #text:. It has the following additional instance methods: text ^ text text: aString text := aString. In addition to displaying the TextModelMorph, it displays a button. When the button is clicked, it does this: self text: 'test'. But the TextModelMorph does not update to show the new value. I thought since I changed the "model", it would update. I tried lots of methods in TextModelMorph, such as updateActualContents, but nothing is working. What do I need to do to cause it to update when the value of the text instance variable changes? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Sun Aug 25 05:56:09 2024 From: juan at cuis.st (Juan Vuletich) Date: Sun, 25 Aug 2024 09:56:09 -0300 Subject: [Cuis-dev] updating a TextModelMorph In-Reply-To: References: Message-ID: <66CB29E9.3080402@cuis.st> On 8/24/2024 5:40 PM, Mark Volkmann via Cuis-dev wrote: > I have a class whose initialize method creates a TextModelMorph like > this: > > textModelMorph := TextModelMorph > textProvider: self > textGetter: #text > textSetter: #text:. > > It has the following additional instance methods: > > text > ^ text > > text: aString > text := aString. > > In addition to displaying the TextModelMorph, it displays a button. > When the button is clicked, it does this: > > self text: 'test'. > > But the TextModelMorph does not update to show the new value. > I thought since I changed the "model", it would update. > I tried lots of methods in TextModelMorph, such as > updateActualContents, but nothing is working. > What do I need to do to cause it to update when the value of the text > instance variable changes? > > -- > R. Mark Volkmann > Object Computing, Inc. Hi Mark, I don't have access to your full example, so I can not try what I'll say. So take it just as a suggestion for further exploration. You need to do `self changed: #text.`. For an example, see senders of #classCommentText, especially in #newClassComment:. This is the changed: /update: dependency mechanism in action. According to MVC and the Observer pattern, models don't know about views, so they can't communicate directly. It is views, when created, that say 'I want to be notified when...'. Hope this helps, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Sun Aug 25 06:13:18 2024 From: juan at cuis.st (Juan Vuletich) Date: Sun, 25 Aug 2024 10:13:18 -0300 Subject: [Cuis-dev] Morph method prefixes In-Reply-To: References: Message-ID: <66CB2DEE.9070305@cuis.st> Hi Mark, On 8/24/2024 3:22 PM, Mark Volkmann via Cuis-dev wrote: > Is there a story behind why the following method names in the Morph > class begin with "morph"? Good question! (See below) > > morphExtent > morphExtentInOwner > morphId > morphLocalBoundsForError > morphPosition > morphPosition: > morphPositionInWorld > morphPositionInWorld: > > It seems like the "morph" prefix could be removed without any loss in > clarity. > There are many other methods in the Morph class whose names do not > have that prefix. > > It seems uncommon for method names to begin with their class name. For > example, a Dog class might have methods like name and breed, but > wouldn't typically have methods like dogName and dogBreed. > > -- > R. Mark Volkmann > Object Computing, Inc. There are, perhaps, 3 different groups of selectors. For very few, like #morphId, #morphBoundsAfterDraw and maybe others are used in other classes, and as they are about the morph they are dealing with, it just seemed right to me. Others, like #morphPositionInWorld and such, were created when I converted the Morphic framework from Squeak's style global coordinates to Morph local coordinates. It was a way to separate the two semantics while they were both there, during that redesign. So, they are no longer needed. I just pushed a few updates to rename them, and to deprecate the old implementations. They will be removed later. Finally, we have others like #morphPosition, #morphExtent and such. The problem with them is that #position and #position: are part of the Stream protocol. #extent and #extent: are part of Form and Rectangle protocol. This looks like polymorphism, but it isn't. In no way a Morph and a Stream can be used in the same code. Same for a Morph and a Form, or a Morph and a Rectangle. In this cases, when using Senders and Implementors in such messages, you need to keep in your mind the fact that they form two distinct subsets of senders and implementors that will never intersect. The lists of senders and implementors become twice as large for no reason, and working in that code is much harder than needed. Yes, I really dislike false polymorphism. So #morphPosition, #morphExtent and a few others have the 'morph' prefix only so they are never confused with Stream, Form and Rectangle protocol. I hope this helps. And thank you for bringing attention to this. I think the resulting cleanup of some of those names improves code readability. Cheers, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Sun Aug 25 06:14:26 2024 From: juan at cuis.st (Juan Vuletich) Date: Sun, 25 Aug 2024 10:14:26 -0300 Subject: [Cuis-dev] cmd-s to save changes In-Reply-To: References: Message-ID: <66CB2E32.4070101@cuis.st> On 8/24/2024 4:21 PM, Mark Volkmann via Cuis-dev wrote: > When I make changes to the code of a method and press cmd-s (macOS), > it saves the changes. > If I press cmd-s again, it inserts the letter s into the code. > Is anyone else experiencing this? > > -- > R. Mark Volkmann > Object Computing, Inc. Yes. This is a bug that I introduced in the redesign of the menu & shortcut specs. Just pushed a fix. Thanks for reporting! Cheers, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Sun Aug 25 06:15:55 2024 From: juan at cuis.st (Juan Vuletich) Date: Sun, 25 Aug 2024 10:15:55 -0300 Subject: [Cuis-dev] Bouncing Atoms - couple of small bugs - further adventures... In-Reply-To: References: <332ae537-d701-45a6-a583-3215fa74cc43@free.fr> Message-ID: <66CB2E8B.8060409@cuis.st> On 8/22/2024 1:09 PM, Barry Perryman via Cuis-dev wrote: > Actually I found another small thing. With the graph open the display > is showing high precision numbers for the graph positions. I have > attached a simple fix for this that restricts things to the single > decimal place which seems to have been the original intent. > > Barry > >> On 11 Aug 2024, at 08:57, Hilaire Fernandes via Cuis-dev >> wrote: >> >> Thanks Barry, >> >> Changes committed >> >> -- >> GNU Dr. Geo >> http://gnu.org/s/dr-geo/ >> http://gnu-drgeo.blogspot.com/ >> -- >> Cuis-dev mailing list >> Cuis-dev at lists.cuis.st >> https://lists.cuis.st/mailman/listinfo/cuis-dev > Hi Barry, It looks like you forgot the attach? Thanks, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan at cuis.st Sun Aug 25 06:25:04 2024 From: juan at cuis.st (Juan Vuletich) Date: Sun, 25 Aug 2024 10:25:04 -0300 Subject: [Cuis-dev] adding functionality to morphs In-Reply-To: References: Message-ID: <66CB30B0.7020602@cuis.st> Hilaire's code should also work on TextEntryMorph. I'd stick to TextEntryMorph if you want a single line. HTH, On 8/22/2024 10:34 PM, Mark Volkmann via Cuis-dev wrote: > The issue I've run into with TextModelMorph is that it seems to be for > multi-line input. > Is there a way to configure it to only allow a single line of input > like TextEntryMorph does? > > On Thu, Aug 22, 2024 at 3:17?AM Hilaire Fernandes via Cuis-dev > > wrote: > > What about listening to key stroke event on TextModelMorph. > TextEntryMorph is a bit limited in its features. Code example from > DrGeo: > > tMorph scroller > setProperty: #keyStroke: > toValue: [:event | > tMorph scroller acceptContents. > self changed: #isReadyToApply]. > > Le 22/08/2024 ? 03:08, Mark Volkmann via Cuis-dev a ?crit : >> I defined the class TextEntry2Morph which is a subclass of >> TextEntryMorph because I wanted to register a block to be >> evaluated every time it has focus and the user presses the escape >> key. It only adds the instance variable escapeAction and these >> instance methods: > -- > GNU Dr. Geo > http://gnu.org/s/dr-geo/ > http://gnu-drgeo.blogspot.com/ > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > > > > -- > R. Mark Volkmann > Object Computing, Inc. -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfern at free.fr Sun Aug 25 07:16:16 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Sun, 25 Aug 2024 16:16:16 +0200 Subject: [Cuis-dev] ActiveModel Message-ID: <3138d83e-c697-4938-8337-eeded3b8a999@free.fr> Hi, When should a model be a subclass of ActiveModel instead of Object? Thanks -- GNU Dr. Geo http://gnu.org/s/dr-geo/ http://gnu-drgeo.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfern at free.fr Sun Aug 25 07:47:44 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Sun, 25 Aug 2024 16:47:44 +0200 Subject: [Cuis-dev] adding functionality to morphs In-Reply-To: <66CB30B0.7020602@cuis.st> References: <66CB30B0.7020602@cuis.st> Message-ID: <06527acd-411b-4c8a-a982-05df5843d24d@free.fr> Indeed, I asked Mark if he can work on a change set to implement it identically in TextEntryMoprh. Le 25/08/2024 ? 15:25, Juan Vuletich via Cuis-dev a ?crit?: > Hilaire's code should also work on TextEntryMorph. I'd stick to > TextEntryMorph if you want a single line. > > HTH, -- GNU Dr. Geo http://gnu.org/s/dr-geo/ http://gnu-drgeo.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From barry.perryman at gmail.com Sun Aug 25 07:57:23 2024 From: barry.perryman at gmail.com (Barry Perryman) Date: Sun, 25 Aug 2024 15:57:23 +0100 Subject: [Cuis-dev] Bouncing Atoms - couple of small bugs - further adventures... In-Reply-To: <66CB2E8B.8060409@cuis.st> References: <332ae537-d701-45a6-a583-3215fa74cc43@free.fr> <66CB2E8B.8060409@cuis.st> Message-ID: Yes, it does doesn't it. Oops. Let's try again. ? > On 25 Aug 2024, at 14:15, Juan Vuletich wrote: > > On 8/22/2024 1:09 PM, Barry Perryman via Cuis-dev wrote: >> >> Actually I found another small thing. With the graph open the display is showing high precision numbers for the graph positions. I have attached a simple fix for this that restricts things to the single decimal place which seems to have been the original intent. >> >> Barry >> >>> On 11 Aug 2024, at 08:57, Hilaire Fernandes via Cuis-dev wrote: >>> >>> Thanks Barry, >>> >>> Changes committed >>> >>> -- >>> GNU Dr. Geo >>> http://gnu.org/s/dr-geo/ >>> http://gnu-drgeo.blogspot.com/ >>> -- >>> Cuis-dev mailing list >>> Cuis-dev at lists.cuis.st >>> https://lists.cuis.st/mailman/listinfo/cuis-dev >> > > Hi Barry, > > It looks like you forgot the attach? > > Thanks, > -- > Juan Vuletich > cuis.st > github.com/jvuletich > researchgate.net/profile/Juan-Vuletich > independent.academia.edu/JuanVuletich > patents.justia.com/inventor/juan-manuel-vuletich > linkedin.com/in/juan-vuletich-75611b3 > twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: UnsavedChangesTo-BouncingAtoms-BAP.001.cs.st Type: application/octet-stream Size: 1703 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Sun Aug 25 08:47:28 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sun, 25 Aug 2024 10:47:28 -0500 Subject: [Cuis-dev] updating a TextModelMorph In-Reply-To: <66CB29E9.3080402@cuis.st> References: <66CB29E9.3080402@cuis.st> Message-ID: On Sun, Aug 25, 2024 at 7:56?AM Juan Vuletich wrote: > On 8/24/2024 5:40 PM, Mark Volkmann via Cuis-dev wrote: > > I have a class whose initialize method creates a TextModelMorph like > this: > > textModelMorph := TextModelMorph > textProvider: self > textGetter: #text > textSetter: #text:. > > It has the following additional instance methods: > > text > ^ text > > text: aString > text := aString. > > In addition to displaying the TextModelMorph, it displays a button. > When the button is clicked, it does this: > > self text: 'test'. > > But the TextModelMorph does not update to show the new value. > I thought since I changed the "model", it would update. > I tried lots of methods in TextModelMorph, such as updateActualContents, > but nothing is working. > What do I need to do to cause it to update when the value of the text > instance variable changes? > > Hi Mark, > > I don't have access to your full example, so I can not try what I'll say. > So take it just as a suggestion for further exploration. > > You need to do `self changed: #text.`. For an example, see senders of > #classCommentText, especially in #newClassComment:. This is the changed: > /update: dependency mechanism in action. According to MVC and the Observer > pattern, models don't know about views, so they can't communicate directly. > It is views, when created, that say 'I want to be notified when...'. > Thanks so much for that tip! That almost does what I need. When I type a new value into the TextModelMorph, I get a popup that says "Caution! Contents were saved elsewhere since you started editing them here. Accept anyway?". I attached a fileOut of my simple demo. To run this, enter 'TextEntryDemo new" and "Do it". It displays a TextEntryMorph, a TextModelMorph, a LabelMorph, and a PluggableButtonMorph. If you change the text in the TextEntryMorph and press the return key, the text in the TextModelMorph will update to match and the LabelMorph will update. If you press the "Reset" button, the TextEntryMorph and TextModelMorph will go back to "World" and the LabelMorph will update. If you change the text in the TextModelMorph by one character, the TextEntryMorph will update to match and the LabelMorph will update. BUT ... if you change it by a second character, that "Caution" popup will appear. Why does that happen? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TextEntryDemo.st Type: application/octet-stream Size: 2237 bytes Desc: not available URL: From bernhard at pieber.com Sun Aug 25 12:10:32 2024 From: bernhard at pieber.com (Bernhard Pieber) Date: Sun, 25 Aug 2024 19:10:32 +0000 Subject: [Cuis-dev] LayoutMorph separation In-Reply-To: <66C60FB9.5020404@cuis.st> References: <5efcf669422dee88071a1c587ac9400c@whidbey.com> <66C60FB9.5020404@cuis.st> Message-ID: <0AEEFBBF-FD88-40C5-9BEA-6074D11903D0@pieber.com> Hi, Sorry for the late reply. I just read this thread after a holiday away from the keyboard. It's great that that functionality got integrated. I had the same need and proposed a change set in May, see the email thread "LayoutMorph separate padding and spacing" [1] and my answer in the thread "morphs padding and margin" [2]. However, instead of an additional boolean instance variable (useEdgeSpace) I chose to split separation into padding (inner distance to the borders) and spacing (distance between elements). I chose the name padding because that's how it's called in the CSS box model [3]. I did keep the instance variable separation in the first step, as it is currently used in UI-Panel and UI-Click-Select in Cuis-Smalltalk-UI. However, I prepared updates for those packages after which the instance variable separation should be deleted. In a third step the instance variable padding could be moved to the superclass BoxedMorph and be supplemented by the property margin (outer distance to the borders), which is also part of the CSS box model [3] and widely used in web design. I would ike this design because LayoutMorph would become simpler again, BoxedMorph would become more flexible and at the same time easier to understand for people with knowledge of CSS. What do you think? Cheers, Bernhard [1] https://lists.cuis.st/mailman/archives/cuis-dev/2024-May/008772.html [2] https://lists.cuis.st/mailman/archives/cuis-dev/2024-June/009021.html [3] https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#margins_padding_and_borders > Am 21.08.2024 um 18:03 schrieb Juan Vuletich via Cuis-dev : > > Hi Folks, > > On 8/14/2024 5:59 PM, ken.dickey--- via Cuis-dev wrote: > >> On 2024-08-13 17:01, Mark Volkmann via Cuis-dev wrote: >> >>> On Tue, Aug 13, 2024 at 9:18?AM wrote: >>> >>>> On 2024-08-12 17:01, Mark Volkmann via Cuis-dev wrote: >>>> >>>>> I seem to keep running into situations where I want separation in a >>>>> LayoutMorph to only be added between the submorphs and not before the >>>>> first and after the last. I see that I can achieve that by modifying >>>>> the LayoutMorph method layoutSubmorphsHorizontallyIn:. But I don't >>>>> always want that behavior. I'd like that to be configurable. Is there >>>>> already a way to do this that I'm missing? >> >>> No. >> >>>>> I'd rather not have to insert spacer morphs, especially if there >>>>> are a large number of submorphs. >>>>> I attached my solution which is to create a subclass of LayoutMorph >>>>> that adds a boolean instance variable "trim". >>>>> When that is true, it avoids adding separation before the first and >>>>> after the last submorph. >>>>> This works for my use cases. >>>>> It would be great if this was added to LayoutMorph. It wouldn't >>>>> affect its current behavior. >> >> Mark, thanks much for contributing. >> >> Two things: >> [A] I prefer #useEdgeSpace to #trim as 'trim' seems too generic a >> term to me. ['shrinkWrap' might work as well]. >> [B] Due to edge cases, the math is a bit difficult to get right. >> >> Please check the code and try `Layout2Morph example1` in the attached. >> >> I am still testing, but think this may be close to what you want. >> >> Thanks again for this! >> -KenD > > Thank you very much Mark and Ken for working on this! > > I've just integrated a slightly later version of this code with your > latest work. It works nicely. > > Thanks! > > -- > Juan Vuletich > cuis.st > github.com/jvuletich > researchgate.net/profile/Juan-Vuletich > independent.academia.edu/JuanVuletich > patents.justia.com/inventor/juan-manuel-vuletich > linkedin.com/in/juan-vuletich-75611b3 > twitter.com/JuanVuletich > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Sun Aug 25 16:30:31 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sun, 25 Aug 2024 18:30:31 -0500 Subject: [Cuis-dev] adding functionality to morphs In-Reply-To: <06527acd-411b-4c8a-a982-05df5843d24d@free.fr> References: <66CB30B0.7020602@cuis.st> <06527acd-411b-4c8a-a982-05df5843d24d@free.fr> Message-ID: I need to learn how to create a change set for Cuis Smalltalk. Are the steps documented somewhere? In the meantime, here's a fileOut for a new class that is a subclass of TextEntryMorph and adds what I think is needed. I think we just need to do three things to TextEntryMorph. 1) Add the instance variable keystrokeAction. 2) Add this instance method: keystrokeAction: aBlock keystrokeAction := aBlock 3) Add this line as the first line in the existing keyStroke: instance method. keystrokeAction ifNotNil: [ keystrokeAction value: aKeyboardEvent ]. On Sun, Aug 25, 2024 at 9:48?AM Hilaire Fernandes via Cuis-dev < cuis-dev at lists.cuis.st> wrote: > Indeed, I asked Mark if he can work on a change set to implement it > identically in TextEntryMoprh. > Le 25/08/2024 ? 15:25, Juan Vuletich via Cuis-dev a ?crit : > > Hilaire's code should also work on TextEntryMorph. I'd stick to > TextEntryMorph if you want a single line. > > HTH, > > -- > GNU Dr. Geohttp://gnu.org/s/dr-geo/http://gnu-drgeo.blogspot.com/ > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: VTextEntryMorph.st Type: application/octet-stream Size: 843 bytes Desc: not available URL: From marianomontone at gmail.com Mon Aug 26 06:17:49 2024 From: marianomontone at gmail.com (Mariano Montone) Date: Mon, 26 Aug 2024 10:17:49 -0300 Subject: [Cuis-dev] updating a TextModelMorph In-Reply-To: References: <66CB29E9.3080402@cuis.st> Message-ID: <661e84d1-368e-4de9-bffa-4c1505e28c4f@gmail.com> El 25/8/24 a las 12:47, Mark Volkmann via Cuis-dev escribi?: > Thanks so much for that tip! That almost does what I need. When I type > a new value into the TextModelMorph, I get a popup that says "Caution! > Contents were saved elsewhere since you started editing them here. > Accept anyway?". I also find TextModelMorph tricky to work with, as it has a concept of "accepted contents" that I believe it makes sense for Smalltalk code panes,etc, but gets in the way when try to use the morph for other more straightforward things. ???? Mariano From juan at cuis.st Mon Aug 26 07:45:06 2024 From: juan at cuis.st (Juan Vuletich) Date: Mon, 26 Aug 2024 11:45:06 -0300 Subject: [Cuis-dev] LayoutMorph separation In-Reply-To: <0AEEFBBF-FD88-40C5-9BEA-6074D11903D0@pieber.com> References: <5efcf669422dee88071a1c587ac9400c@whidbey.com> <66C60FB9.5020404@cuis.st> <0AEEFBBF-FD88-40C5-9BEA-6074D11903D0@pieber.com> Message-ID: <66CC94F2.5060400@cuis.st> Hi Bernhard, On 8/25/2024 4:10 PM, Bernhard Pieber via Cuis-dev wrote: > Hi, > > Sorry for the late reply. I just read this thread after a holiday away > from the keyboard. > > It's great that that functionality got integrated. I had the same need > and proposed a change set in May, see the email thread "LayoutMorph > separate padding and spacing" [1] and my answer in the thread "morphs > padding and margin" [2]. > Apologies. I forgot about your contribution. > However, instead of an additional boolean instance variable > (useEdgeSpace) I chose to split separation into padding (inner > distance to the borders) and spacing (distance between elements). I > chose the name padding because that's how it's called in the CSS box > model [3]. This is good. There's no reason to do it differently if what is well known is perfectly fine, and doing it in our unique way only annoys people without bringing an improvement. > I did keep the instance variable separation in the first step, as it > is currently used in UI-Panel and UI-Click-Select in > Cuis-Smalltalk-UI. However, I prepared updates for those packages > after which the instance variable separation should be deleted. Please post your code for these packages. (see my suggestion below) > In a third step the instance variable padding could be moved to the > superclass BoxedMorph and be supplemented by the property margin > (outer distance to the borders), which is also part of the CSS box > model [3] and widely used in web design. > > I would ike this design because LayoutMorph would become simpler > again, BoxedMorph would become more flexible and at the same time > easier to understand for people with knowledge of CSS. What do you think? I think this should be the first step, actually, as it impacts on the resulting design for LayoutMorph. This is my suggestion: - BoxedMorph would have 2 "Borders": Border and Padding - Padding is drawn the same as background, i.e. using the morph 'color' - Padding behaves as an inner part of the current Border. Any code that needs the boundary between current Border and the "inside" of the morph would now get the boundary between Padding and the area inside it. - Margin is only a property that a morph can be queried about, and is part of its LayoutSpec. It is not considered part of the morph at all. It is only used by the containing LayoutMorph. This design is consistent with [1], that states: "Note: The margin property also affects the total space that the box will take up on the page, but the margin is not included in the actual size of the box. The box's total width and height stops at the border." So, Bernhard, the difference with your design would be: - Margin is moved from LayoutMorph to the inner morphs, but to their LayoutSpec. It is to be used in place of "separation" or "spacing". - Padding is moved up to BorderedMorph as you suggest. LayoutMorphs would inherit it. This means that any BorderedMorph could have a non-zero padding of their contents - LayoutMorph would no longer have 'separation' and 'margin', neither 'useEdgeSpace' nor a specific 'padding'. I think this would cover all the suggested use cases. Opinions? [1] https://www.w3schools.com/css/css_boxmodel.asp > Cheers, > Bernhard > > [1] https://lists.cuis.st/mailman/archives/cuis-dev/2024-May/008772.html > [2] https://lists.cuis.st/mailman/archives/cuis-dev/2024-June/009021.html > [3] > https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model#margins_padding_and_borders > Thanks, -- Juan Vuletich cuis.st github.com/jvuletich researchgate.net/profile/Juan-Vuletich independent.academia.edu/JuanVuletich patents.justia.com/inventor/juan-manuel-vuletich linkedin.com/in/juan-vuletich-75611b3 twitter.com/JuanVuletich -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Mon Aug 26 08:16:54 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Mon, 26 Aug 2024 10:16:54 -0500 Subject: [Cuis-dev] LayoutMorph separation In-Reply-To: <66CC94F2.5060400@cuis.st> References: <5efcf669422dee88071a1c587ac9400c@whidbey.com> <66C60FB9.5020404@cuis.st> <0AEEFBBF-FD88-40C5-9BEA-6074D11903D0@pieber.com> <66CC94F2.5060400@cuis.st> Message-ID: On Mon, Aug 26, 2024 at 9:45?AM Juan Vuletich wrote: > Hi Bernhard, > > On 8/25/2024 4:10 PM, Bernhard Pieber via Cuis-dev wrote: > > Hi, > > Sorry for the late reply. I just read this thread after a holiday away > from the keyboard. > > It's great that that functionality got integrated. I had the same need and > proposed a change set in May, see the email thread "LayoutMorph separate > padding and spacing" [1] and my answer in the thread "morphs padding and > margin" [2]. > > > Apologies. I forgot about your contribution. > > However, instead of an additional boolean instance variable (useEdgeSpace) > I chose to split separation into padding (inner distance to the borders) > and spacing (distance between elements). I chose the name padding because > that's how it's called in the CSS box model [3]. > > > This is good. There's no reason to do it differently if what is well known > is perfectly fine, and doing it in our unique way only annoys people > without bringing an improvement. > > I did keep the instance variable separation in the first step, as it is > currently used in UI-Panel and UI-Click-Select in Cuis-Smalltalk-UI. > However, I prepared updates for those packages after which the instance > variable separation should be deleted. > > > Please post your code for these packages. (see my suggestion below) > > In a third step the instance variable padding could be moved to the > superclass BoxedMorph and be supplemented by the property margin (outer > distance to the borders), which is also part of the CSS box model [3] and > widely used in web design. > > I would ike this design because LayoutMorph would become simpler again, > BoxedMorph would become more flexible and at the same time easier to > understand for people with knowledge of CSS. What do you think? > > > I think this should be the first step, actually, as it impacts on the > resulting design for LayoutMorph. > > This is my suggestion: > - BoxedMorph would have 2 "Borders": Border and Padding > - Padding is drawn the same as background, i.e. using the morph 'color' > - Padding behaves as an inner part of the current Border. Any code that > needs the boundary between current Border and the "inside" of the morph > would now get the boundary between Padding and the area inside it. > - Margin is only a property that a morph can be queried about, and is part > of its LayoutSpec. It is not considered part of the morph at all. It is > only used by the containing LayoutMorph. This design is consistent with > [1], that states: "Note: The margin property also affects the total space > that the box will take up on the page, but the margin is not included in > the actual size of the box. The box's total width and height stops at the > border." > > So, Bernhard, the difference with your design would be: > - Margin is moved from LayoutMorph to the inner morphs, but to their > LayoutSpec. It is to be used in place of "separation" or "spacing". > - Padding is moved up to BorderedMorph as you suggest. LayoutMorphs would > inherit it. This means that any BorderedMorph could have a non-zero padding > of their contents > - LayoutMorph would no longer have 'separation' and 'margin', neither > 'useEdgeSpace' nor a specific 'padding'. > > I think this would cover all the suggested use cases. > > Opinions? > I like the proposal to add padding to BoxedMorph. Do I understand correctly that there is a desire to remove separation from LayoutMorph? I don't think I like that. I think LayoutMorph needs an easy way to specify the gap that should be present between each submorph. But I think the gap should not be applied before the first submorph and after the last submorph. The new padding in BoxedMorph can handle that. Adding a margin to each submorph can achieve the same result, but that seems more tedious to apply. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Mon Aug 26 12:27:38 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Mon, 26 Aug 2024 12:27:38 -0700 Subject: [Cuis-dev] LayoutMorph separation In-Reply-To: References: <5efcf669422dee88071a1c587ac9400c@whidbey.com> <66C60FB9.5020404@cuis.st> <0AEEFBBF-FD88-40C5-9BEA-6074D11903D0@pieber.com> <66CC94F2.5060400@cuis.st> Message-ID: <1ac68c95f10a61e42e8a10f642b99542@whidbey.com> I also would like LayoutMorph's to retain #spacing and not add the complexity of individual #margins, negative margins et al. What use cases in Cuis would offset the added complexity of #margin calculation? I like #padding added to #BoxedMorph. I suspect the #minimumExtent and #morphExtent would continue to refer to the exterior edge of a Morph. Proportional layout also w.r.t. exterior edges. #morphPosition as the upper-left point of the border. Perhaps a new #contentExtent synthesized from #morphExtent less 2 * (#borderWidth + #padding)? $0.02, -KenD > On Mon, Aug 26, 2024 at 9:45?AM Juan Vuletich wrote: .. > This is my suggestion: > - BoxedMorph would have 2 "Borders": Border and Padding > - Padding is drawn the same as background, i.e. using the morph 'color' > - Padding behaves as an inner part of the current Border. Any code that > needs the boundary between current Border and the "inside" of the morph > would now get the boundary between Padding and the area inside it. > - Margin is only a property that a morph can be queried about, and is > part of its LayoutSpec. It is not considered part of the morph at all. > It is only used by the containing LayoutMorph. This design is > consistent with [1], that states: "Note: The margin property also > affects the total space that the box will take up on the page, but the > margin is not included in the actual size of the box. The box's total > width and height stops at the border." > > So, Bernhard, the difference with your design would be: > - Margin is moved from LayoutMorph to the inner morphs, but to their > LayoutSpec. It is to be used in place of "separation" or "spacing". > - Padding is moved up to BorderedMorph as you suggest. LayoutMorphs > would inherit it. This means that any BorderedMorph could have a > non-zero padding of their contents > - LayoutMorph would no longer have 'separation' and 'margin', neither > 'useEdgeSpace' nor a specific 'padding'. > > I think this would cover all the suggested use cases. > > Opinions? On 2024-08-26 08:16, Mark Volkmann via Cuis-dev wrote: I like the proposal to add padding to BoxedMorph. Do I understand correctly that there is a desire to remove separation from LayoutMorph? I don't think I like that. I think LayoutMorph needs an easy way to specify the gap that should be present between each submorph. But I think the gap should not be applied before the first submorph and after the last submorph. The new padding in BoxedMorph can handle that. Adding a margin to each submorph can achieve the same result, but that seems more tedious to apply. Object Computing, Inc. From r.mark.volkmann at gmail.com Mon Aug 26 14:51:29 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Mon, 26 Aug 2024 16:51:29 -0500 Subject: [Cuis-dev] transpiring Smalltalk to another programming language Message-ID: Is anyone aware of efforts to write a Smalltalk program that runs in Cuis and generates code in some other programming language from Smalltalk code? Is there an easy way in Cuis to access an AST generated from Smalltalk code? -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bernhard at pieber.com Tue Aug 27 05:14:02 2024 From: bernhard at pieber.com (Bernhard Pieber) Date: Tue, 27 Aug 2024 12:14:02 +0000 Subject: [Cuis-dev] LayoutMorph separation In-Reply-To: <66CC94F2.5060400@cuis.st> References: <5efcf669422dee88071a1c587ac9400c@whidbey.com> <66C60FB9.5020404@cuis.st> <0AEEFBBF-FD88-40C5-9BEA-6074D11903D0@pieber.com> <66CC94F2.5060400@cuis.st> Message-ID: <82094700-5EE7-4212-B776-B27F480F9DDC@pieber.com> Hi Juan, > Am 26.08.2024 um 16:45 schrieb Juan Vuletich via Cuis-dev : > Apologies. I forgot about your contribution. No worries! I should have followed up on the proposal earlier myself. >> However, instead of an additional boolean instance variable (useEdgeSpace) I chose to split separation into padding (inner distance to the borders) and spacing (distance between elements). I chose the name padding because that's how it's called in the CSS box model [3]. > > This is good. There's no reason to do it differently if what is well known is perfectly fine, and doing it in our unique way only annoys people without bringing an improvement. > >> I did keep the instance variable separation in the first step, as it is currently used in UI-Panel and UI-Click-Select in Cuis-Smalltalk-UI. However, I prepared updates for those packages after which the instance variable separation should be deleted. > > Please post your code for these packages. (see my suggestion below) See the attached Cuis-Smalltalk-UI changes.zip. It removes all references to the instance variable separation and all senders of xSeparation and ySeparation, so the instance variable can be deleted. Here is how I found them: Feature require: 'UI-MetaProperties'. "Print and browse all methods referencing the instance variable separation or sending #xSeparation or #ySeparation in classes other than LayoutMorph." | methods | methods := OrderedCollection new. LayoutMorph allSubclasses do: [:cls | methods addAll: (cls allAccessesTo: 'separation')]. #(xSeparation ySeparation) do: [:selector | methods addAll: (Smalltalk allCallsOn: selector)]. methods := methods reject: [:method | method classSymbol = #LayoutMorph]. methods do: [:method | | package | package := CodePackage packageOfMethod: method ifNone: []. Transcript cr; show: 'Package: '; show: package packageName; show: ': '. method printClassAndSelectorOn: Transcript]. Smalltalk browseMessageListUnsorted: methods name: 'References to separation, Senders of xSeparation and ySeparation' autoHighlight: 'separation'. My change set is a prerequisite for loading the packages. >> In a third step the instance variable padding could be moved to the superclass BoxedMorph and be supplemented by the property margin (outer distance to the borders), which is also part of the CSS box model [3] and widely used in web design. >> >> I would ike this design because LayoutMorph would become simpler again, BoxedMorph would become more flexible and at the same time easier to understand for people with knowledge of CSS. What do you think? > > I think this should be the first step, actually, as it impacts on the resulting design for LayoutMorph. > > This is my suggestion: > - BoxedMorph would have 2 "Borders": Border and Padding > - Padding is drawn the same as background, i.e. using the morph 'color' > - Padding behaves as an inner part of the current Border. Any code that needs the boundary between current Border and the "inside" of the morph would now get the boundary between Padding and the area inside it. I like that! > - Margin is only a property that a morph can be queried about, and is part of its LayoutSpec. It is not considered part of the morph at all. It is only used by the containing LayoutMorph. This design is consistent with [1], that states: "Note: The margin property also affects the total space that the box will take up on the page, but the margin is not included in the actual size of the box. The box's total width and height stops at the border." > > So, Bernhard, the difference with your design would be: > - Margin is moved from LayoutMorph to the inner morphs, but to their LayoutSpec. It is to be used in place of "separation" or "spacing". > - Padding is moved up to BorderedMorph as you suggest. LayoutMorphs would inherit it. This means that any BorderedMorph could have a non-zero padding of their contents > - LayoutMorph would no longer have 'separation' and 'margin', neither 'useEdgeSpace' nor a specific 'padding'. > > I think this would cover all the suggested use cases. > > Opinions? I like your proposal. However, as Mark wrote I also think spacing on the level of LayoutMorph would still be needed. How would you emulate this behavior with only margins in the layouts specs on the level of submorphs? | row | row := (LayoutMorph newRow padding: 0; spacing: 10) name: 'padding & spacing'. row color: Color white; addMorph: (BoxedMorph new noBorder; color: Color random; name: 'A') layoutSpec: (LayoutSpec proportionalWidth: 1 / 3); addMorph: (BoxedMorph new noBorder; color: Color random; name: 'B') layoutSpec: (LayoutSpec proportionalWidth: 1 / 3); addMorph: (BoxedMorph new noBorder; color: Color random; name: 'c') layoutSpec: (LayoutSpec proportionalWidth: 1 / 3). row morphPosition: 150 at 130 extent: 400 at 300. row openInWorld Actually, instead of spacing we should call it gap, as this is the CSS property name for this behavior [1]. As we currently support only one direction in a LayoutMorph a point instead of a number ? as I implemented it ? does not make sense. For even greater flexibility margin, border, and padding could support Rectangles in addition to Numbers and Points. [1] https://developer.mozilla.org/en-US/docs/Web/CSS/gap Cheers, Bernhard -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Cuis-Smalltalk-UI changes.zip Type: application/zip Size: 37166 bytes Desc: not available URL: From r.mark.volkmann at gmail.com Tue Aug 27 07:14:06 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Tue, 27 Aug 2024 09:14:06 -0500 Subject: [Cuis-dev] LayoutMorph separation In-Reply-To: <82094700-5EE7-4212-B776-B27F480F9DDC@pieber.com> References: <5efcf669422dee88071a1c587ac9400c@whidbey.com> <66C60FB9.5020404@cuis.st> <0AEEFBBF-FD88-40C5-9BEA-6074D11903D0@pieber.com> <66CC94F2.5060400@cuis.st> <82094700-5EE7-4212-B776-B27F480F9DDC@pieber.com> Message-ID: On Tue, Aug 27, 2024 at 7:14?AM Bernhard Pieber wrote: > > Actually, instead of spacing we should call it gap, as this is the CSS > property name for this behavior [1]. As we currently support only one > direction in a LayoutMorph a point instead of a number ? as I implemented > it ? does not make sense. > I do like choosing names from CSS when possible to make it more intuitive for web developers coming to Smalltalk. -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Tue Aug 27 07:21:06 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Tue, 27 Aug 2024 07:21:06 -0700 Subject: [Cuis-dev] LayoutMorph separation In-Reply-To: <82094700-5EE7-4212-B776-B27F480F9DDC@pieber.com> References: <5efcf669422dee88071a1c587ac9400c@whidbey.com> <66C60FB9.5020404@cuis.st> <0AEEFBBF-FD88-40C5-9BEA-6074D11903D0@pieber.com> <66CC94F2.5060400@cuis.st> <82094700-5EE7-4212-B776-B27F480F9DDC@pieber.com> Message-ID: <06a04a21f8b8054dd7dc1dd7a8e16727@whidbey.com> On 2024-08-27 05:14, Bernhard Pieber via Cuis-dev wrote: > I like your proposal. However, as Mark wrote I also think spacing on > the level of LayoutMorph would still be needed. Again, I would prefer to keep #separation. .. > Actually, instead of spacing we should call it gap, as this is the CSS > property name for this behavior [1]. As we currently support only one > direction in a LayoutMorph a point instead of a number - as I > implemented it - does not make sense. It may make sense if there is a difference in Layout when changed dynamically between #horizontal and #vertical. E.g. think iPad with portrait vs landscape orientation. $0.02, -KenD From bernhard at pieber.com Tue Aug 27 08:32:55 2024 From: bernhard at pieber.com (Bernhard Pieber) Date: Tue, 27 Aug 2024 15:32:55 +0000 Subject: [Cuis-dev] LayoutMorph separation In-Reply-To: <1ac68c95f10a61e42e8a10f642b99542@whidbey.com> References: <5efcf669422dee88071a1c587ac9400c@whidbey.com> <66C60FB9.5020404@cuis.st> <0AEEFBBF-FD88-40C5-9BEA-6074D11903D0@pieber.com> <66CC94F2.5060400@cuis.st> <1ac68c95f10a61e42e8a10f642b99542@whidbey.com> Message-ID: <83E6BE77-00A6-4623-8EE2-ABA908850689@pieber.com> Hi Ken, I agree that the margin functionality could be introduced in a separate step. Here is an example where a margin is useful, though: [PastedGraphic-1.png] The container has a gap of 30px and a padding of 0px. Only red has a margin of 8px in addition. You can play around with the values here: https://codepen.io/bpieber/pen/PoraLjm Note that only four morphs are needed, neither spacers nor wrappers. Maybe margin could be emulated by a wrapper with transparent border color. Cheers, Bernhard > Am 26.08.2024 um 21:27 schrieb ken.dickey--- via Cuis-dev : > > I also would like LayoutMorph's to retain #spacing and not add the > complexity of individual #margins, negative margins et al. > > What use cases in Cuis would offset the added complexity of #margin > calculation? > > I like #padding added to #BoxedMorph. > > I suspect the #minimumExtent and #morphExtent would continue to refer to > the exterior edge of a Morph. Proportional layout also w.r.t. exterior > edges. #morphPosition as the upper-left point of the border. > > Perhaps a new #contentExtent synthesized from #morphExtent less 2 * > (#borderWidth + #padding)? > > $0.02, > -KenD > >> On Mon, Aug 26, 2024 at 9:45?AM Juan Vuletich wrote: > > .. > >> This is my suggestion: >> - BoxedMorph would have 2 "Borders": Border and Padding >> - Padding is drawn the same as background, i.e. using the morph 'color' >> - Padding behaves as an inner part of the current Border. Any code that >> needs the boundary between current Border and the "inside" of the morph >> would now get the boundary between Padding and the area inside it. >> - Margin is only a property that a morph can be queried about, and is >> part of its LayoutSpec. It is not considered part of the morph at all. >> It is only used by the containing LayoutMorph. This design is >> consistent with [1], that states: "Note: The margin property also >> affects the total space that the box will take up on the page, but the >> margin is not included in the actual size of the box. The box's total >> width and height stops at the border." >> >> So, Bernhard, the difference with your design would be: >> - Margin is moved from LayoutMorph to the inner morphs, but to their >> LayoutSpec. It is to be used in place of "separation" or "spacing". >> - Padding is moved up to BorderedMorph as you suggest. LayoutMorphs >> would inherit it. This means that any BorderedMorph could have a >> non-zero padding of their contents >> - LayoutMorph would no longer have 'separation' and 'margin', neither >> 'useEdgeSpace' nor a specific 'padding'. >> >> I think this would cover all the suggested use cases. >> >> Opinions? > > On 2024-08-26 08:16, Mark Volkmann via Cuis-dev wrote: > > I like the proposal to add padding to BoxedMorph. > > Do I understand correctly that there is a desire to remove separation > from LayoutMorph? I don't think I like that. I think LayoutMorph needs > an easy way to specify the gap that should be present between each > submorph. But I think the gap should not be applied before the first > submorph and after the last submorph. The new padding in BoxedMorph can > handle that. Adding a margin to each submorph can achieve the same > result, but that seems more tedious to apply. > > Object Computing, Inc. > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PastedGraphic-1.png Type: image/png Size: 11467 bytes Desc: not available URL: From ken.dickey at whidbey.com Tue Aug 27 12:14:51 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Tue, 27 Aug 2024 12:14:51 -0700 Subject: [Cuis-dev] LayoutMorph separation In-Reply-To: <83E6BE77-00A6-4623-8EE2-ABA908850689@pieber.com> References: <5efcf669422dee88071a1c587ac9400c@whidbey.com> <66C60FB9.5020404@cuis.st> <0AEEFBBF-FD88-40C5-9BEA-6074D11903D0@pieber.com> <66CC94F2.5060400@cuis.st> <1ac68c95f10a61e42e8a10f642b99542@whidbey.com> <83E6BE77-00A6-4623-8EE2-ABA908850689@pieber.com> Message-ID: <03f64fbc2f99fdb0c649ce5865b95642@whidbey.com> On 2024-08-27 08:32, Bernhard Pieber via Cuis-dev wrote: > Hi Ken, > > I agree that the margin functionality could be introduced in a separate > step. > > Here is an example where a margin is useful, though: > > The container has a gap of 30px and a padding of 0px. Only red has a > margin of 8px in addition. > > You can play around with the values here: > https://codepen.io/bpieber/pen/PoraLjm > > Note that only four morphs are needed, neither spacers nor wrappers. > > Maybe margin could be emulated by a wrapper with transparent border > color. Bernhard, Thanks for the example. I am looking for something both explainable and easy to calculate. What is the simplest thing that will work? I changed the green margin to 30px, result attached. I would not have predicted this result and don't see how it would help me. $0.02, -KenD -------------- next part -------------- A non-text attachment was scrubbed... Name: PastedGraphic-1.png Type: image/png Size: 11467 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot_2024-08-27_12-09-23.png Type: image/png Size: 6109 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PastedGraphic-1.png Type: image/png Size: 11467 bytes Desc: not available URL: From shingarov at labware.com Tue Aug 27 15:26:48 2024 From: shingarov at labware.com (Boris Shingarov) Date: Tue, 27 Aug 2024 18:26:48 -0400 Subject: [Cuis-dev] transpiring Smalltalk to another programming language In-Reply-To: References: Message-ID: The guy you want to talk to about transpiling Smalltalk is @pocho on the slack, he has done a bunch of peer-reviewed work on the subject. None of that is Cuis-specific, though. On Mon, Aug 26, 2024 at 04:51:29PM -0500, Mark Volkmann via Cuis-dev wrote: > Is anyone aware of efforts to write a Smalltalk program that runs in Cuis > and generates code in some other programming language from Smalltalk code? > > Is there an easy way in Cuis to access an AST generated from Smalltalk code? > > -- > R. Mark Volkmann > Object Computing, Inc. > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev From bernhard at pieber.com Tue Aug 27 21:53:47 2024 From: bernhard at pieber.com (Bernhard Pieber) Date: Wed, 28 Aug 2024 04:53:47 +0000 Subject: [Cuis-dev] LayoutMorph separation In-Reply-To: <03f64fbc2f99fdb0c649ce5865b95642@whidbey.com> References: <5efcf669422dee88071a1c587ac9400c@whidbey.com> <66C60FB9.5020404@cuis.st> <0AEEFBBF-FD88-40C5-9BEA-6074D11903D0@pieber.com> <66CC94F2.5060400@cuis.st> <1ac68c95f10a61e42e8a10f642b99542@whidbey.com> <83E6BE77-00A6-4623-8EE2-ABA908850689@pieber.com> <03f64fbc2f99fdb0c649ce5865b95642@whidbey.com> Message-ID: Hi Ken, Sorry for the confusion. The reason for this seemingly strange behavior is that the width of container is fixed. The colored boxes expand to it. In CSS, if they are too big they just overflow. I hate that. For larger margin values the container width needs to be increased: https://codepen.io/bpieber/pen/PoraLjm To summarize: margin would be useful to add additional space around a single morph inside a LayoutMorph without the need of a wrapper morph. The distance between red and green are: red's margin bottom + container's gap + green's margin top. Cheers, Bernhard > Am 27.08.2024 um 21:14 schrieb : > > On 2024-08-27 08:32, Bernhard Pieber via Cuis-dev wrote: > >> Hi Ken, >> >> I agree that the margin functionality could be introduced in a separate >> step. >> >> Here is an example where a margin is useful, though: >> >> The container has a gap of 30px and a padding of 0px. Only red has a >> margin of 8px in addition. >> >> You can play around with the values here: >> https://codepen.io/bpieber/pen/PoraLjm >> >> Note that only four morphs are needed, neither spacers nor wrappers. >> >> Maybe margin could be emulated by a wrapper with transparent border >> color. > > Bernhard, > > Thanks for the example. I am looking for something both explainable and > easy to calculate. What is the simplest thing that will work? > > I changed the green margin to 30px, result attached. > > I would not have predicted this result and don't see how it would help > me. > > $0.02, > -KenD > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.dickey at whidbey.com Wed Aug 28 06:51:07 2024 From: ken.dickey at whidbey.com (ken.dickey at whidbey.com) Date: Wed, 28 Aug 2024 06:51:07 -0700 Subject: [Cuis-dev] LayoutMorph separation In-Reply-To: References: <5efcf669422dee88071a1c587ac9400c@whidbey.com> <66C60FB9.5020404@cuis.st> <0AEEFBBF-FD88-40C5-9BEA-6074D11903D0@pieber.com> <66CC94F2.5060400@cuis.st> <1ac68c95f10a61e42e8a10f642b99542@whidbey.com> <83E6BE77-00A6-4623-8EE2-ABA908850689@pieber.com> <03f64fbc2f99fdb0c649ce5865b95642@whidbey.com> Message-ID: On 2024-08-27 21:53, Bernhard Pieber via Cuis-dev wrote: > Sorry for the confusion. The reason for this seemingly strange behavior > is that the width of container is fixed. The colored boxes expand to > it. In CSS, if they are too big they just overflow. I hate that. Me too. Our LayoutMorphs expand to contain the miminumExtent of their submorphs. > To summarize: margin would be useful to add additional space around a > single morph inside a LayoutMorph without the need of a wrapper morph. IMHO, the simpler solution is to use a containing LayoutMorh, transparent, with a padding. Easy to explain and calculate for. Sophisticated uses can set edgeWeight offsets, I do not think that Margins carry their own weight. I think they are useful in very few cases. IMHO, -KenD From hfern at free.fr Thu Aug 29 00:56:11 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Thu, 29 Aug 2024 09:56:11 +0200 Subject: [Cuis-dev] adding functionality to morphs In-Reply-To: References: <66CB30B0.7020602@cuis.st> <06527acd-411b-4c8a-a982-05df5843d24d@free.fr> Message-ID: <74141ffa-0c51-4893-ae21-61bbbef4c0fd@free.fr> Hi Mark, Le 26/08/2024 ? 01:30, Mark Volkmann a ?crit?: > I need to learn how to create a change set for Cuis Smalltalk. Are the > steps documented somewhere? In the Cuis Book, there is a section, not very detailed but it should cover the essential. However I am realizing you don't need to modify the class, just do: aTextEntry setProperty: #keyStroke: toValue: [:event | ??? " do what you need to be done]. Hilaire -- GNU Dr. Geo http://gnu.org/s/dr-geo/ http://gnu-drgeo.blogspot.com/ From r.mark.volkmann at gmail.com Fri Aug 30 06:33:37 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Fri, 30 Aug 2024 08:33:37 -0500 Subject: [Cuis-dev] adding functionality to morphs In-Reply-To: <74141ffa-0c51-4893-ae21-61bbbef4c0fd@free.fr> References: <66CB30B0.7020602@cuis.st> <06527acd-411b-4c8a-a982-05df5843d24d@free.fr> <74141ffa-0c51-4893-ae21-61bbbef4c0fd@free.fr> Message-ID: That approach works, but in my specific case I need to detect the escape key. Here is what I tried: te := TextEntryMorph contents: 'change me'. te setProperty: #keyStroke: toValue: [ :event | event keyValue print ]. te openInWorld. When I move focus to the TextEntryMorph and press the escape key, 27 is displayed in the Transcript which is great. But it also displays a menu containing the Copy, Cut, and Paste options. For my use case I'd like to find a way to prevent that. I've spent some time searching the code to discover where that happens, but I haven't found it yet. On Thu, Aug 29, 2024 at 2:56?AM Hilaire Fernandes wrote: > Hi Mark, > > Le 26/08/2024 ? 01:30, Mark Volkmann a ?crit : > > I need to learn how to create a change set for Cuis Smalltalk. Are the > > steps documented somewhere? > > In the Cuis Book, there is a section, not very detailed but it should > cover the essential. > > However I am realizing you don't need to modify the class, just do: > > aTextEntry setProperty: #keyStroke: toValue: [:event | > " do what you need to be done]. > > Hilaire > > -- > GNU Dr. Geo > http://gnu.org/s/dr-geo/ > http://gnu-drgeo.blogspot.com/ > > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfern at free.fr Sat Aug 31 01:47:34 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Sat, 31 Aug 2024 10:47:34 +0200 Subject: [Cuis-dev] adding functionality to morphs In-Reply-To: References: <66CB30B0.7020602@cuis.st> <06527acd-411b-4c8a-a982-05df5843d24d@free.fr> <74141ffa-0c51-4893-ae21-61bbbef4c0fd@free.fr> Message-ID: Try searching for the text in the menu item: Le 30/08/2024 ? 15:33, Mark Volkmann a ?crit?: > When I move focus to the TextEntryMorph and press the escape key, 27 > is displayed in the Transcript which is great. But it also displays a > menu containing the Copy, Cut, and Paste options. For my use case I'd > like to find a way to prevent that. I've spent some time searching the > code to discover where that happens, but I haven't found it yet. -- GNU Dr. Geo http://gnu.org/s/dr-geo/ http://gnu-drgeo.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: WNMqVjCbBFmdzPsj.png Type: image/png Size: 39822 bytes Desc: not available URL: From hfern at free.fr Sat Aug 31 06:56:32 2024 From: hfern at free.fr (Hilaire Fernandes) Date: Sat, 31 Aug 2024 15:56:32 +0200 Subject: [Cuis-dev] PlacedMorph vs BoxedMorph Message-ID: <25bbb752-996c-4fb0-a657-2d00746be2a3@free.fr> Hi, Looking at these two classes, it seems BoxedMorph has too much responsibilities and PlacedMorph not enough. Indeed, PlacedMorph has BoxedMorph as its only heir. Moreover, there is no instance of PlacedMorph. *I am wondering if moving the extent attribute of BoxedMorph to PlacedMorph *would be useful. I have many situation where I am interested by a morph with extent and location but without interest to color, border, and friends. But I find myself in the situation I have to subclass BoxedMorph ending with a class with the unnecessary attributes color, border, etc. PlacedMorph is the minimum the user can add to a layout morph, because of that PlacedMorph have method with extent consideration. So it is a bit odd. Hilaire -- GNU Dr. Geo http://gnu.org/s/dr-geo/ http://gnu-drgeo.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.mark.volkmann at gmail.com Sat Aug 31 11:07:28 2024 From: r.mark.volkmann at gmail.com (Mark Volkmann) Date: Sat, 31 Aug 2024 13:07:28 -0500 Subject: [Cuis-dev] adding functionality to morphs In-Reply-To: References: <66CB30B0.7020602@cuis.st> <06527acd-411b-4c8a-a982-05df5843d24d@free.fr> <74141ffa-0c51-4893-ae21-61bbbef4c0fd@free.fr> Message-ID: Using that approach to search for methods that contain "Paste" in their source leads me to TextEditor>>defaultMenuSpec. That is used by TextEntryMorph>>menuNshortcutsSpecsDo:. That is used by Morph>>allMenuNshortcutsSpecs. That is used by Morph>>getMenu. That is used by Morph>>mouseButton2Activity. That is used by Editor>>offerMenuFromEsc:. That is used by Editor class>>initializeKeyboardActions. That is used by Editor class>>initialize. Long story short, I don't see a way to change what happens when the user presses the escape key without creating a subclass of TextEntryMorph. I'm fine with doing that and already have that approach working. But I'm curious if there is an approach I overlooked that would allow me to customize what happens in a TextEntryMorph when the user presses the escape key (like I can for when the user presses the return key). On Sat, Aug 31, 2024 at 3:47?AM Hilaire Fernandes via Cuis-dev < cuis-dev at lists.cuis.st> wrote: > Try searching for the text in the menu item: > > Le 30/08/2024 ? 15:33, Mark Volkmann a ?crit : > > When I move focus to the TextEntryMorph and press the escape key, 27 is > displayed in the Transcript which is great. But it also displays a menu > containing the Copy, Cut, and Paste options. For my use case I'd like to > find a way to prevent that. I've spent some time searching the code to > discover where that happens, but I haven't found it yet. > > -- > GNU Dr. Geohttp://gnu.org/s/dr-geo/http://gnu-drgeo.blogspot.com/ > > -- > Cuis-dev mailing list > Cuis-dev at lists.cuis.st > https://lists.cuis.st/mailman/listinfo/cuis-dev > -- R. Mark Volkmann Object Computing, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: WNMqVjCbBFmdzPsj.png Type: image/png Size: 39822 bytes Desc: not available URL: