From joseph.alotta at gmail.com Tue Aug 2 15:03:06 2016 From: joseph.alotta at gmail.com (Joseph Alotta) Date: Tue Aug 2 15:03:10 2016 Subject: [Newbies] mix ins Message-ID: <8F9C9B16-AA2E-4926-A04B-4805D00FB759@gmail.com> Greetings, I want to add a method to the Array class. #(?abc? ?def?) join => ?abcdef? #(?abc? ?def?) join: $/ => ?abc/def? I am afraid that if I add it to Array directly, it will get lost in a new update. I want to keep it in my project area. In ruby, this is called a ?mix in?. How can I do this? Sincerely, Joe. From bert at freudenbergs.de Tue Aug 2 15:23:00 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Aug 2 15:23:02 2016 Subject: [Newbies] mix ins In-Reply-To: <8F9C9B16-AA2E-4926-A04B-4805D00FB759@gmail.com> References: <8F9C9B16-AA2E-4926-A04B-4805D00FB759@gmail.com> Message-ID: On Tue, Aug 2, 2016 at 5:03 PM, Joseph Alotta wrote: > Greetings, > > I want to add a method to the Array class. > > #(?abc? ?def?) join => ?abcdef? > > #(?abc? ?def?) join: $/ => ?abc/def? > > I am afraid that if I add it to Array directly, it will get lost in a new > update. I want to keep it in my project area. > > In ruby, this is called a ?mix in?. > > How can I do this? > Firstly, these methods exist already. They are defined in SequencableCollection, a superclass of Array, so Array inherits them: #('abc' 'def') join => 'abcdef' #('abc' 'def') joinSeparatedBy: '/' => 'abc/def' Secondly, if you wanted to add these (or other methods), they would not be lost by updating. That is, unless the update specifically includes a method of the same name in the same class. Updating only adds and removes methods, it doesn't "reset" the whole class. Thirdly, to keep these "extension methods" in your own package, put them in a method category that starts with an asterisk followed by your package name. That is, if your Monticello package is named "Foo-Bar", then put your "mix in" Array methods into the category "*foo-bar" which will mark them as belonging to your package, not the package the Array class is in. The extension methods will be stored and loaded with your package. Have fun! - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160802/2b154da1/attachment.htm From joseph.alotta at gmail.com Tue Aug 2 15:39:59 2016 From: joseph.alotta at gmail.com (Joseph Alotta) Date: Tue Aug 2 16:24:56 2016 Subject: [Newbies] Re: mix ins In-Reply-To: References: <8F9C9B16-AA2E-4926-A04B-4805D00FB759@gmail.com> Message-ID: <1FA7349D-B9B6-411D-85F0-80E40A04C5E8@gmail.com> > On Aug 2, 2016, at 9:38 AM, Bert Freudenberg [via Smalltalk] wrote: > > Thirdly, to keep these "extension methods" in your own package, put them in a method category that starts with an asterisk followed by your package name. That is, if your Monticello package is named "Foo-Bar", then put your "mix in" Array methods into the category "*foo-bar" which will mark them as belonging to your package, not the package the Array class is in. The extension methods will be stored and loaded with your package. Bert, I am not sure how to do this. My project is called Books. Is this what you mean? Object subclass: #Array instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: ?*Books? Sincerely, Joe. PS. Thanks for the bit about the join methods and the changes. :-) -- View this message in context: http://forum.world.st/mix-ins-tp4909171p4909179.html Sent from the Squeak - Beginners mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160802/d637bda5/attachment.htm From joseph.alotta at gmail.com Tue Aug 2 15:48:21 2016 From: joseph.alotta at gmail.com (Joseph Alotta) Date: Tue Aug 2 16:33:18 2016 Subject: [Newbies] Re: mix ins In-Reply-To: References: <8F9C9B16-AA2E-4926-A04B-4805D00FB759@gmail.com> Message-ID: <88FD1F48-7E22-4675-AAC3-649D1C760C9E@gmail.com> Bert, I don?t have these methods. I get an error. See attached: Sincerely, Joe. > On Aug 2, 2016, at 9:38 AM, Bert Freudenberg [via Smalltalk] wrote: > > Firstly, these methods exist already. They are defined in SequencableCollection, a superclass of Array, so Array inherits them: > > #('abc' 'def') join => 'abcdef' > > #('abc' 'def') joinSeparatedBy: '/' => 'abc/def' > Screen Shot 2016-08-02 at 11.29.27 AM.png (68K) -- View this message in context: http://forum.world.st/mix-ins-tp4909171p4909182.html Sent from the Squeak - Beginners mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160802/2a2dfb48/attachment.htm From bert at freudenbergs.de Tue Aug 2 19:15:33 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Aug 2 19:15:36 2016 Subject: [Newbies] Re: mix ins In-Reply-To: <88FD1F48-7E22-4675-AAC3-649D1C760C9E@gmail.com> References: <8F9C9B16-AA2E-4926-A04B-4805D00FB759@gmail.com> <88FD1F48-7E22-4675-AAC3-649D1C760C9E@gmail.com> Message-ID: On Tue, Aug 2, 2016 at 5:48 PM, Joseph Alotta wrote: > Bert, > > I don?t have these methods. I get an error. See attached: > Are you using Squeak 5.0? - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160802/52d95452/attachment.htm From bert at freudenbergs.de Tue Aug 2 19:26:25 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Aug 2 19:26:29 2016 Subject: [Newbies] Re: mix ins In-Reply-To: <1FA7349D-B9B6-411D-85F0-80E40A04C5E8@gmail.com> References: <8F9C9B16-AA2E-4926-A04B-4805D00FB759@gmail.com> <1FA7349D-B9B6-411D-85F0-80E40A04C5E8@gmail.com> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: unnamed.png Type: image/png Size: 16663 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160802/e96dbaea/unnamed-0001.png From joseph.alotta at gmail.com Tue Aug 2 18:55:42 2016 From: joseph.alotta at gmail.com (Joseph Alotta) Date: Tue Aug 2 19:40:40 2016 Subject: [Newbies] Re: mix ins In-Reply-To: References: <8F9C9B16-AA2E-4926-A04B-4805D00FB759@gmail.com> <88FD1F48-7E22-4675-AAC3-649D1C760C9E@gmail.com> Message-ID: 4.3 What is the procedure for upgrading? Should I file-out the classes, download the new version and then file-in? Sincerely, Joe. > On Aug 2, 2016, at 1:31 PM, Bert Freudenberg [via Smalltalk] wrote: > > On Tue, Aug 2, 2016 at 5:48 PM, Joseph Alotta <[hidden email]> wrote: > Bert, > > I don?t have these methods. I get an error. See attached: > > > Are you using Squeak 5.0? > > - Bert - > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > If you reply to this email, your message will be added to the discussion below: > http://forum.world.st/mix-ins-tp4909171p4909199.html > To start a new topic under Squeak - Beginners, email ml-node+s1294792n107673h12@n4.nabble.com > To unsubscribe from Squeak - Beginners, click here. > NAML -- View this message in context: http://forum.world.st/mix-ins-tp4909171p4909203.html Sent from the Squeak - Beginners mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160802/8289f40c/attachment.htm From bert at freudenbergs.de Tue Aug 2 20:13:00 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Aug 2 20:13:03 2016 Subject: [Newbies] Re: mix ins In-Reply-To: References: <8F9C9B16-AA2E-4926-A04B-4805D00FB759@gmail.com> <88FD1F48-7E22-4675-AAC3-649D1C760C9E@gmail.com> Message-ID: On Tue, Aug 2, 2016 at 8:55 PM, Joseph Alotta wrote: > 4.3 > > What is the procedure for upgrading? Should I file-out the classes, > download the new version and then file-in? > That would be one simple way to do it, yes. OTOH if you're happy with 4.3 there is no need to upgrade - just add the methods you need to your image. - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160802/679eac0a/attachment.htm From joseph.alotta at gmail.com Wed Aug 3 00:23:00 2016 From: joseph.alotta at gmail.com (Joseph Alotta) Date: Wed Aug 3 01:07:59 2016 Subject: [Newbies] Re: mix ins In-Reply-To: References: <8F9C9B16-AA2E-4926-A04B-4805D00FB759@gmail.com> <88FD1F48-7E22-4675-AAC3-649D1C760C9E@gmail.com> Message-ID: Hi Bert, I downloaded Squeak 5.0. Seems to work well. But I have a few issues: 1. How do I make the system font bigger? 2. How do I make the flaps disappear? Sincerely, Joe. -- View this message in context: http://forum.world.st/mix-ins-tp4909171p4909225.html Sent from the Squeak - Beginners mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160802/64642c83/attachment.htm From joseph.alotta at gmail.com Wed Aug 3 15:00:59 2016 From: joseph.alotta at gmail.com (Joseph Alotta) Date: Wed Aug 3 15:46:02 2016 Subject: [Newbies] Re: General Questions to the Squeak Community In-Reply-To: <1470224664666-4909374.post@n4.nabble.com> References: <1470224664666-4909374.post@n4.nabble.com> Message-ID: <8D4311CF-094B-4273-BCCB-A8221A7753AD@gmail.com> > > 1. The community seems TINY for such a cool project. At this point it seems to mainly consist of people in academics and "old-timers" that have stuck around since a time when Squeak was more popular. Is this correct or am I maybe not looking in the right places? > > It seems a shame if such an amazing project were to die out because of lack of popularity, considering all the possibilities that this level of intractability with the programming environment enables. I?m trying to change that. I?ve started a meetup group in the Chicago area for learning Squeak. I am hoping to have a lot of young people get interested in it. I have programmed in many languages and I find smalltalk to be the easiest to read and understand. I?ve written code in come languages, that 6 months later was completely foreign to me. I couldn?t remember what I was thinking when I wrote it, nor even if I wrote it. With smalltalk, I don?t find that. I actually enjoy programming. Sincerely, Joe. -- View this message in context: http://forum.world.st/General-Questions-to-the-Squeak-Community-tp4909374p4909447.html Sent from the Squeak - Beginners mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160803/96281fff/attachment.htm From limitcase at gmail.com Wed Aug 3 18:54:52 2016 From: limitcase at gmail.com (Michael Rice) Date: Wed Aug 3 18:54:55 2016 Subject: [Newbies] Re: General Questions to the Squeak Community In-Reply-To: <8D4311CF-094B-4273-BCCB-A8221A7753AD@gmail.com> References: <1470224664666-4909374.post@n4.nabble.com> <8D4311CF-094B-4273-BCCB-A8221A7753AD@gmail.com> Message-ID: Back in the late '80 everyone was waiting for Smalltalk, the exemplar object-programming language. If you want to know "what happened to Smalltalk" then google the preceding quoted text. But that was then This is now: the programming community has moved on to yet another panacea -- functional programming, one that can take advantage of modern multi-core processors, something for which Smalltalk, with its multitude of state variables, was ill-suited. That's the short story. Functional is interesting. But having to rethink/restructure every problem for it might have you asking, "I have to do all THAT to do what I want to do?" I wonder if anyone is working on a Smalltalk based functional programming language as Richard Hickey was working on a Lisp based functional programming language. https://en.wikipedia.org/wiki/Clojure Just the other day I was wishing for a Clojure with mutable collections. On Wed, Aug 3, 2016 at 11:00 AM, Joseph Alotta wrote: > > > > 1. The community seems TINY for such a cool project. At this point it > seems to mainly consist of people in academics and "old-timers" that have > stuck around since a time when Squeak was more popular. Is this correct or > am I maybe not looking in the right places? > > > > It seems a shame if such an amazing project were to die out because of > lack of popularity, considering all the possibilities that this level of > intractability with the programming environment enables. > > I?m trying to change that. I?ve started a meetup group in the Chicago > area for learning Squeak. I am hoping to have a lot of young people get > interested in it. > > I have programmed in many languages and I find smalltalk to be the easiest > to read and understand. I?ve written code in come languages, that 6 months > later was completely foreign to me. I couldn?t remember what I was > thinking when I wrote it, nor even if I wrote it. > > With smalltalk, I don?t find that. I actually enjoy programming. > > Sincerely, > > Joe. > > > > > ------------------------------ > View this message in context: Re: General Questions to the Squeak > Community > > Sent from the Squeak - Beginners mailing list archive > at Nabble.com. > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160803/80bc1d55/attachment.htm From joseph.alotta at gmail.com Wed Aug 3 18:22:57 2016 From: joseph.alotta at gmail.com (Joseph Alotta) Date: Wed Aug 3 19:08:01 2016 Subject: [Newbies] Re: mix ins In-Reply-To: References: <8F9C9B16-AA2E-4926-A04B-4805D00FB759@gmail.com> <88FD1F48-7E22-4675-AAC3-649D1C760C9E@gmail.com> Message-ID: I was able to get everything working fine on 5.0. I like it better than 4.3. I think you guys have done a great job!! Thank you. Joe. > On Aug 2, 2016, at 8:07 PM, Joseph Alotta wrote: > > Hi Bert, > > I downloaded Squeak 5.0. Seems to work well. But I have a few issues: > > 1. How do I make the system font bigger? > > 2. How do I make the flaps disappear? > > Sincerely, > > Joe. > > > -- View this message in context: http://forum.world.st/mix-ins-tp4909171p4909485.html Sent from the Squeak - Beginners mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160803/d94b3f02/attachment-0001.htm From offray at riseup.net Wed Aug 3 19:29:20 2016 From: offray at riseup.net (=?UTF-8?Q?Offray_Vladimir_Luna_C=c3=a1rdenas?=) Date: Wed Aug 3 19:29:26 2016 Subject: [Newbies] Re: General Questions to the Squeak Community In-Reply-To: <8D4311CF-094B-4273-BCCB-A8221A7753AD@gmail.com> References: <1470224664666-4909374.post@n4.nabble.com> <8D4311CF-094B-4273-BCCB-A8221A7753AD@gmail.com> Message-ID: Hi, I think that Smalltalk community is larger that the Squeak one. Some healthy forks like Cuis or Pharo have small but dynamic communities behind to serve different interests and community dynamics. So I think that people interested mostly in education for children gravitated towards Squeak, others about minimal design surround Cuis and the more focused on software and data visualization are around Pharo. I don't think that all the people is trying to go the next big thing/trend (i.e. functional, multicore, whatever) and there is a lot of good vibra acroos Smalltalk communities, as you can see on the Smalltalks (South America, Argentina) or ESUG (Europe, itinerant). Just last week we were doing a workshop on data activism and visualization using moldable tools in Medell?n, Colombia, that is more related with young and adults "data literacy" and critical education (details and galleries on [1]). [1] http://mutabit.com/offray/blog/en/entry/ds-twitter-mockup So is not like forking as a Holy War between dialects, but forking as a way to explore interconnected diversities with Smalltalk and its legacy. I don't know what is happening in the United States, closely since 2007, but I think that Smalltalk is pretty alive and diverse if you know where to look. Cheers, Offray On 03/08/16 10:00, Joseph Alotta wrote: > > > > 1. The community seems TINY for such a cool project. At this point > it seems to mainly consist of people in academics and "old-timers" > that have stuck around since a time when Squeak was more popular. Is > this correct or am I maybe not looking in the right places? > > > > It seems a shame if such an amazing project were to die out because > of lack of popularity, considering all the possibilities that this > level of intractability with the programming environment enables. > > I?m trying to change that. I?ve started a meetup group in the Chicago > area for learning Squeak. I am hoping to have a lot of young people > get interested in it. > > I have programmed in many languages and I find smalltalk to be the > easiest to read and understand. I?ve written code in come languages, > that 6 months later was completely foreign to me. I couldn?t remember > what I was thinking when I wrote it, nor even if I wrote it. > > With smalltalk, I don?t find that. I actually enjoy programming. > > Sincerely, > > Joe. > > > > > ------------------------------------------------------------------------ > View this message in context: Re: General Questions to the Squeak > Community > > Sent from the Squeak - Beginners mailing list archive > at Nabble.com. > > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160803/8f4052ef/attachment.htm From offray at riseup.net Wed Aug 3 20:08:51 2016 From: offray at riseup.net (=?UTF-8?Q?Offray_Vladimir_Luna_C=c3=a1rdenas?=) Date: Wed Aug 3 20:08:56 2016 Subject: [Newbies] Re: General Questions to the Squeak Community In-Reply-To: References: <1470224664666-4909374.post@n4.nabble.com> <8D4311CF-094B-4273-BCCB-A8221A7753AD@gmail.com> Message-ID: <29c4339e-1630-67f5-eb68-e86c7df95794@riseup.net> On 03/08/16 14:29, Offray Vladimir Luna C?rdenas wrote: > > Hi, > > I think that Smalltalk community is larger that the Squeak one. Some > healthy forks like Cuis or Pharo have small but dynamic communities > behind to serve different interests and community dynamics. > Woops that sound a little weird. The first part I meant active communities and the second one more related with politics. Cheers, Offray From joseph.alotta at gmail.com Wed Aug 10 16:18:31 2016 From: joseph.alotta at gmail.com (Joseph Alotta) Date: Wed Aug 10 16:18:36 2016 Subject: [Newbies] printf not working on 5.0 Message-ID: Greetings, I was using printf extensively, but when I migrated to 5.0 printf does not work. I filed out the package and filed it back in, but the compiler can?t find it. '%8.1f' class ==> ByteString '%6.2e' printf: 412.343434 >> MessageNotUnderstood: ByteString>>printf: Help! Sincerely, Joe. From ron at usmedrec.com Wed Aug 10 19:18:48 2016 From: ron at usmedrec.com (Ron Teitelbaum) Date: Wed Aug 10 19:18:52 2016 Subject: [Newbies] printf not working on 5.0 In-Reply-To: References: Message-ID: <064001d1f33c$05af0ac0$110d2040$@usmedrec.com> Hi Joe, I'm not aware of printf is it this: http://www.squeaksource.com/Printf/ Ron -----Original Message----- From: beginners-bounces@lists.squeakfoundation.org [mailto:beginners-bounces@lists.squeakfoundation.org] On Behalf Of Joseph Alotta Sent: Wednesday, August 10, 2016 12:19 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] printf not working on 5.0 Greetings, I was using printf extensively, but when I migrated to 5.0 printf does not work. I filed out the package and filed it back in, but the compiler can?t find it. '%8.1f' class ==> ByteString '%6.2e' printf: 412.343434 >> MessageNotUnderstood: ByteString>>printf: Help! Sincerely, Joe. _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners From joseph.alotta at gmail.com Wed Aug 10 21:21:51 2016 From: joseph.alotta at gmail.com (Joseph Alotta) Date: Wed Aug 10 21:21:55 2016 Subject: [Newbies] Re: printf not working on 5.0 In-Reply-To: <064001d1f33c$05af0ac0$110d2040$@usmedrec.com> References: <064001d1f33c$05af0ac0$110d2040$@usmedrec.com> Message-ID: <7D74C19D-B72E-4118-9D21-7BF240F3CAA3@gmail.com> yes, that is the one. > On Aug 10, 2016, at 2:19 PM, Ron Teitelbaum [via Smalltalk] wrote: > > Hi Joe, > > I'm not aware of printf is it this: http://www.squeaksource.com/Printf/ > > Ron > > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] On Behalf Of Joseph Alotta > Sent: Wednesday, August 10, 2016 12:19 PM > To: [hidden email] > Subject: [Newbies] printf not working on 5.0 > > Greetings, > > I was using printf extensively, but when I migrated to 5.0 printf does not work. I filed out the package and filed it back in, but the compiler can?t find it. > > '%8.1f' class ==> ByteString > > > '%6.2e' printf: 412.343434 >> MessageNotUnderstood: ByteString>>printf: > > > Help! > > > Sincerely, > > Joe. > > > > > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > If you reply to this email, your message will be added to the discussion below: > http://forum.world.st/printf-not-working-on-5-0-tp4910343p4910362.html > To start a new topic under Squeak - Beginners, email ml-node+s1294792n107673h12@n4.nabble.com > To unsubscribe from Squeak - Beginners, click here. > NAML -- View this message in context: http://forum.world.st/printf-not-working-on-5-0-tp4910343p4910374.html Sent from the Squeak - Beginners mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160810/a8dea54d/attachment.htm From ron at usmedrec.com Wed Aug 10 21:37:57 2016 From: ron at usmedrec.com (Ron Teitelbaum) Date: Wed Aug 10 21:38:02 2016 Subject: [Newbies] Re: printf not working on 5.0 In-Reply-To: <7D74C19D-B72E-4118-9D21-7BF240F3CAA3@gmail.com> References: <064001d1f33c$05af0ac0$110d2040$@usmedrec.com> <7D74C19D-B72E-4118-9D21-7BF240F3CAA3@gmail.com> Message-ID: <06c501d1f34f$766d8530$63488f90$@usmedrec.com> So you are all set now? Ron yes, that is the one. > On Aug 10, 2016, at 2:19 PM, Ron Teitelbaum [via Smalltalk] <[hidden email]> wrote: > > Hi Joe, > > I'm not aware of printf is it this: http://www.squeaksource.com/Printf/ > > Ron > > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] On Behalf Of Joseph Alotta > Sent: Wednesday, August 10, 2016 12:19 PM > To: [hidden email] > Subject: [Newbies] printf not working on 5.0 > > Greetings, > > I was using printf extensively, but when I migrated to 5.0 printf does not work. I filed out the package and filed it back in, but the compiler can?t find it. > > '%8.1f' class ==> ByteString > > > '%6.2e' printf: 412.343434 >> MessageNotUnderstood: ByteString>>printf: > > > Help! > > > Sincerely, > > Joe. > > > > > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > If you reply to this email, your message will be added to the discussion below: > http://forum.world.st/printf-not-working-on-5-0-tp4910343p4910362.html > To start a new topic under Squeak - Beginners, email [hidden email] > To unsubscribe from Squeak - Beginners, click here. > NAML _____ View this message in context: Re: printf not working on 5.0 Sent from the Squeak - Beginners mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160810/6efc9a73/attachment-0001.htm From joseph.alotta at gmail.com Wed Aug 10 21:56:24 2016 From: joseph.alotta at gmail.com (Joseph Alotta) Date: Wed Aug 10 21:56:25 2016 Subject: [Newbies] Re: printf not working on 5.0 In-Reply-To: <06c501d1f34f$766d8530$63488f90$@usmedrec.com> References: <064001d1f33c$05af0ac0$110d2040$@usmedrec.com> <7D74C19D-B72E-4118-9D21-7BF240F3CAA3@gmail.com> <06c501d1f34f$766d8530$63488f90$@usmedrec.com> Message-ID: No. I already have the code. But the system can't find the method. Sent from my iPhone > On Aug 10, 2016, at 4:38 PM, Ron Teitelbaum [via Smalltalk] wrote: > > So you are all set now? > > > > Ron > > > > yes, that is the one. > > > > On Aug 10, 2016, at 2:19 PM, Ron Teitelbaum [via Smalltalk] <[hidden email]> wrote: > > > > Hi Joe, > > > > I'm not aware of printf is it this: http://www.squeaksource.com/Printf/ > > > > Ron > > > > -----Original Message----- > > From: [hidden email] [mailto:[hidden email]] On Behalf Of Joseph Alotta > > Sent: Wednesday, August 10, 2016 12:19 PM > > To: [hidden email] > > Subject: [Newbies] printf not working on 5.0 > > > > Greetings, > > > > I was using printf extensively, but when I migrated to 5.0 printf does not work. I filed out the package and filed it back in, but the compiler can?t find it. > > > > '%8.1f' class ==> ByteString > > > > > > '%6.2e' printf: 412.343434 >> MessageNotUnderstood: ByteString>>printf: > > > > > > Help! > > > > > > Sincerely, > > > > Joe. > > > > > > > > > > > > _______________________________________________ > > Beginners mailing list > > [hidden email] > > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > _______________________________________________ > > Beginners mailing list > > [hidden email] > > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > > If you reply to this email, your message will be added to the discussion below: > > http://forum.world.st/printf-not-working-on-5-0-tp4910343p4910362.html > > To start a new topic under Squeak - Beginners, email [hidden email] > > To unsubscribe from Squeak - Beginners, click here. > > NAML > > > View this message in context: Re: printf not working on 5.0 > > Sent from the Squeak - Beginners mailing list archive at Nabble.com. > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > If you reply to this email, your message will be added to the discussion below: > http://forum.world.st/printf-not-working-on-5-0-tp4910343p4910376.html > To start a new topic under Squeak - Beginners, email ml-node+s1294792n107673h12@n4.nabble.com > To unsubscribe from Squeak - Beginners, click here. > NAML -- View this message in context: http://forum.world.st/printf-not-working-on-5-0-tp4910343p4910379.html Sent from the Squeak - Beginners mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160810/8148eb7c/attachment.htm From joseph.alotta at gmail.com Wed Aug 10 23:44:34 2016 From: joseph.alotta at gmail.com (Joseph Alotta) Date: Wed Aug 10 23:44:40 2016 Subject: [Newbies] Re: printf not working on 5.0 In-Reply-To: <06c501d1f34f$766d8530$63488f90$@usmedrec.com> References: <064001d1f33c$05af0ac0$110d2040$@usmedrec.com> <7D74C19D-B72E-4118-9D21-7BF240F3CAA3@gmail.com> <06c501d1f34f$766d8530$63488f90$@usmedrec.com> Message-ID: Somehow the code was hooked into ByteString, but I can?t see where or how. Maybe there is a part that I forgot to copy. Is it possible that the package makes modification to ByteString somewhere? Sincerely, Joe. > On Aug 10, 2016, at 4:38 PM, Ron Teitelbaum [via Smalltalk] wrote: > > So you are all set now? > > > > Ron > > > > yes, that is the one. > > > > > On Aug 10, 2016, at 2:19 PM, Ron Teitelbaum [via Smalltalk] <[hidden email]> wrote: > > > > Hi Joe, > > > > I'm not aware of printf is it this: http://www.squeaksource.com/Printf/ > > > > Ron > > > > -----Original Message----- > > From: [hidden email] [mailto:[hidden email]] On Behalf Of Joseph Alotta > > Sent: Wednesday, August 10, 2016 12:19 PM > > To: [hidden email] > > Subject: [Newbies] printf not working on 5.0 > > > > Greetings, > > > > I was using printf extensively, but when I migrated to 5.0 printf does not work. I filed out the package and filed it back in, but the compiler can?t find it. > > > > '%8.1f' class ==> ByteString > > > > > > '%6.2e' printf: 412.343434 >> MessageNotUnderstood: ByteString>>printf: > > > > > > Help! > > > > > > Sincerely, > > > > Joe. > > > > > > > > > > > > _______________________________________________ > > Beginners mailing list > > [hidden email] > > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > _______________________________________________ > > Beginners mailing list > > [hidden email] > > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > > If you reply to this email, your message will be added to the discussion below: > > http://forum.world.st/printf-not-working-on-5-0-tp4910343p4910362.html > > To start a new topic under Squeak - Beginners, email [hidden email] > > To unsubscribe from Squeak - Beginners, click here. > > NAML > > > > View this message in context: Re: printf not working on 5.0 > > Sent from the Squeak - Beginners mailing list archive at Nabble.com. > > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > If you reply to this email, your message will be added to the discussion below: > http://forum.world.st/printf-not-working-on-5-0-tp4910343p4910376.html > To start a new topic under Squeak - Beginners, email ml-node+s1294792n107673h12@n4.nabble.com > To unsubscribe from Squeak - Beginners, click here. > NAML From bert at freudenbergs.de Thu Aug 11 09:20:44 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Aug 11 09:20:46 2016 Subject: [Newbies] Re: printf not working on 5.0 In-Reply-To: References: <064001d1f33c$05af0ac0$110d2040$@usmedrec.com> <7D74C19D-B72E-4118-9D21-7BF240F3CAA3@gmail.com> <06c501d1f34f$766d8530$63488f90$@usmedrec.com> Message-ID: On Thu, Aug 11, 2016 at 1:44 AM, Joseph Alotta wrote: > Somehow the code was hooked into ByteString, but I can?t see where or how. > > Maybe there is a part that I forgot to copy. Is it possible that the > package makes modification to ByteString somewhere? > Yes, of course. The package defines various extension methods. This is probably the easiest way to install it: Installer ss project: 'Printf'; install: 'Printf' - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160811/4cfa6ee4/attachment.htm From joseph.alotta at gmail.com Thu Aug 11 15:07:28 2016 From: joseph.alotta at gmail.com (Joseph Alotta) Date: Thu Aug 11 15:07:34 2016 Subject: [Newbies] Version 5.0 running hot Message-ID: I just switched from version 4.3 to 5.0. I like the new features, thank you. But I have 5.0 running, hidden from my desktop, and I am reading my mail. I notice the laptop is getting very warm on the bottom. I look at the Activity Monitor and find that Squeak 5.0 accounts for 50% of my processing load. (I have 4 cores, so I think it is 50% of all 4.) When I save and quit Squeak, it immediately starts to cool off. Again, Squeak 4.3 could run hidden in a window and never affect my power consumption. What is 5.0 doing that 4.3 is not? Sincerely, Joe. From joseph.alotta at gmail.com Thu Aug 11 15:16:50 2016 From: joseph.alotta at gmail.com (Joseph Alotta) Date: Thu Aug 11 15:16:54 2016 Subject: [Newbies] Re: printf not working on 5.0 In-Reply-To: References: <064001d1f33c$05af0ac0$110d2040$@usmedrec.com> <7D74C19D-B72E-4118-9D21-7BF240F3CAA3@gmail.com> <06c501d1f34f$766d8530$63488f90$@usmedrec.com> Message-ID: <699EDB51-3E0A-4023-A1A6-C07604494BCA@gmail.com> Hi Bert, Thank you for the magic incantation. It worked. What will I do when I don?t have someone to tell me what the magic words are? I filed out the code from 4.3 and filed in the same code into 5.0. Did it miss a part? It is all in one project area or is there parts in other places in the image? How would I debug something like this going forward? Sincerely, Joe. > On Aug 11, 2016, at 4:20 AM, Bert Freudenberg [via Smalltalk] wrote: > > On Thu, Aug 11, 2016 at 1:44 AM, Joseph Alotta <[hidden email]> wrote: > Somehow the code was hooked into ByteString, but I can?t see where or how. > > Maybe there is a part that I forgot to copy. Is it possible that the package makes modification to ByteString somewhere? > > Yes, of course. The package defines various extension methods. > > This is probably the easiest way to install it: > > Installer ss project: 'Printf'; install: 'Printf' > > - Bert - > > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > If you reply to this email, your message will be added to the discussion below: > http://forum.world.st/printf-not-working-on-5-0-tp4910343p4910433.html > To start a new topic under Squeak - Beginners, email ml-node+s1294792n107673h12@n4.nabble.com > To unsubscribe from Squeak - Beginners, click here. > NAML -- View this message in context: http://forum.world.st/printf-not-working-on-5-0-tp4910343p4910533.html Sent from the Squeak - Beginners mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160811/73c29adc/attachment-0001.htm From asqueaker at gmail.com Thu Aug 11 16:20:55 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Aug 11 16:21:38 2016 Subject: [Newbies] Version 5.0 running hot In-Reply-To: References: Message-ID: Hi Joseph, nothing in the base Squeak 5 should make your image that busy. You might be able to get a list of things your image is doing by executing this code in a workspace: MessageTally spyAllOn: [ (Delay forSeconds: 10) wait ] Wait 10 seconds for the window to appear. On Thu, Aug 11, 2016 at 10:07 AM, Joseph Alotta wrote: > I just switched from version 4.3 to 5.0. I like the new features, thank you. > > But I have 5.0 running, hidden from my desktop, and I am reading my mail. I notice the laptop is getting very warm on the > bottom. I look at the Activity Monitor and find that Squeak 5.0 accounts for 50% of my processing load. (I have 4 cores, so > I think it is 50% of all 4.) > > When I save and quit Squeak, it immediately starts to cool off. > > Again, Squeak 4.3 could run hidden in a window and never affect my power consumption. > > What is 5.0 doing that 4.3 is not? > > Sincerely, > > Joe. > > > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners From joseph.alotta at gmail.com Thu Aug 11 22:23:43 2016 From: joseph.alotta at gmail.com (Joseph Alotta) Date: Thu Aug 11 22:23:47 2016 Subject: [Newbies] Re: Version 5.0 running hot In-Reply-To: References: Message-ID: Thanks Chris. I will keep this in an open window and let you know if I see something. > On Aug 11, 2016, at 11:21 AM, Chris Muller-3 [via Smalltalk] wrote: > > Hi Joseph, nothing in the base Squeak 5 should make your image that busy. > > You might be able to get a list of things your image is doing by > executing this code in a workspace: > > MessageTally spyAllOn: [ (Delay forSeconds: 10) wait ] > > Wait 10 seconds for the window to appear. > > On Thu, Aug 11, 2016 at 10:07 AM, Joseph Alotta <[hidden email]> wrote: > > > I just switched from version 4.3 to 5.0. I like the new features, thank you. > > > > But I have 5.0 running, hidden from my desktop, and I am reading my mail. I notice the laptop is getting very warm on the > > bottom. I look at the Activity Monitor and find that Squeak 5.0 accounts for 50% of my processing load. (I have 4 cores, so > > I think it is 50% of all 4.) > > > > When I save and quit Squeak, it immediately starts to cool off. > > > > Again, Squeak 4.3 could run hidden in a window and never affect my power consumption. > > > > What is 5.0 doing that 4.3 is not? > > > > Sincerely, > > > > Joe. > > > > > > > > _______________________________________________ > > Beginners mailing list > > [hidden email] > > http://lists.squeakfoundation.org/mailman/listinfo/beginners > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > If you reply to this email, your message will be added to the discussion below: > http://forum.world.st/Version-5-0-running-hot-tp4910523p4910554.html > To start a new topic under Squeak - Beginners, email ml-node+s1294792n107673h12@n4.nabble.com > To unsubscribe from Squeak - Beginners, click here. > NAML -- View this message in context: http://forum.world.st/Version-5-0-running-hot-tp4910523p4910599.html Sent from the Squeak - Beginners mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160811/cec82cb6/attachment.htm From bert at freudenbergs.de Fri Aug 12 08:57:39 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri Aug 12 08:57:42 2016 Subject: [Newbies] Re: printf not working on 5.0 In-Reply-To: <699EDB51-3E0A-4023-A1A6-C07604494BCA@gmail.com> References: <064001d1f33c$05af0ac0$110d2040$@usmedrec.com> <7D74C19D-B72E-4118-9D21-7BF240F3CAA3@gmail.com> <06c501d1f34f$766d8530$63488f90$@usmedrec.com> <699EDB51-3E0A-4023-A1A6-C07604494BCA@gmail.com> Message-ID: On Thu, Aug 11, 2016 at 5:16 PM, Joseph Alotta wrote: > Hi Bert, > > Thank you for the magic incantation. It worked. What will I do when I > don?t have someone to tell me what the magic words are? > > I filed out the code from 4.3 and filed in the same code into 5.0. Did it > miss a part? It is all in one project area or is there parts in other > places in the image? > > How would I debug something like this going forward? > No need to debug, you simply need to learn how to use Monticello, our preferred source code versioning system. Changesets have pretty much fallen out of style. Maybe someone else can supply better pointers to tutorials, but here are some: http://www.wiresong.ca/monticello/v1/docs/ http://squeakbyexample.org/ https://www.hpi.uni-potsdam.de/hirschfeld/trac/SqueakCommunityProjects/wiki/ squeak_screencasts https://www.youtube.com/watch?v=LMlzD5LSBx4 - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160812/0c74a8b4/attachment.htm From joseph.alotta at gmail.com Fri Aug 12 20:34:44 2016 From: joseph.alotta at gmail.com (Joseph Alotta) Date: Fri Aug 12 20:34:55 2016 Subject: [Newbies] Re: printf not working on 5.0 In-Reply-To: References: <064001d1f33c$05af0ac0$110d2040$@usmedrec.com> <7D74C19D-B72E-4118-9D21-7BF240F3CAA3@gmail.com> <06c501d1f34f$766d8530$63488f90$@usmedrec.com> <699EDB51-3E0A-4023-A1A6-C07604494BCA@gmail.com> Message-ID: <334773A1-B1A2-4CBA-BBA2-90E621962A38@gmail.com> okay, thanks. i will watch them. > On Aug 12, 2016, at 3:57 AM, Bert Freudenberg [via Smalltalk] wrote: > > On Thu, Aug 11, 2016 at 5:16 PM, Joseph Alotta <[hidden email]> wrote: > Hi Bert, > > Thank you for the magic incantation. It worked. What will I do when I don?t have someone to tell me what the magic words are? > > I filed out the code from 4.3 and filed in the same code into 5.0. Did it miss a part? It is all in one project area or is there parts in other places in the image? > > How would I debug something like this going forward? > > No need to debug, you simply need to learn how to use Monticello, our preferred source code versioning system. Changesets have pretty much fallen out of style. > > Maybe someone else can supply better pointers to tutorials, but here are some: > > http://www.wiresong.ca/monticello/v1/docs/ > http://squeakbyexample.org/ > https://www.hpi.uni-potsdam.de/hirschfeld/trac/SqueakCommunityProjects/wiki/squeak_screencasts > https://www.youtube.com/watch?v=LMlzD5LSBx4 > > - Bert - > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > If you reply to this email, your message will be added to the discussion below: > http://forum.world.st/printf-not-working-on-5-0-tp4910343p4910663.html > To start a new topic under Squeak - Beginners, email ml-node+s1294792n107673h12@n4.nabble.com > To unsubscribe from Squeak - Beginners, click here. > NAML -- View this message in context: http://forum.world.st/printf-not-working-on-5-0-tp4910343p4910810.html Sent from the Squeak - Beginners mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160812/59c14e7e/attachment.htm From rmpouma at gmail.com Sat Aug 20 08:59:49 2016 From: rmpouma at gmail.com (roger mpouma) Date: Sat Aug 20 08:59:54 2016 Subject: [Newbies] Project on squeak language Message-ID: Hello, I need help for a drawing project on Squeak. I'd like implement a canvas on which we draw with the possibility of drawing with brush changing the color and size of the brush. Is it possibile to have help ? Thank you in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160820/6570c710/attachment.htm From bert at freudenbergs.de Sat Aug 20 16:47:45 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Sat Aug 20 16:47:47 2016 Subject: [Newbies] Project on squeak language In-Reply-To: References: Message-ID: Sure. Just ask some specific questions - e.g. what you tried, what worked, what didn't etc. - Bert - On Sat, Aug 20, 2016 at 10:59 AM, roger mpouma wrote: > Hello, > I need help for a drawing project on Squeak. I'd like implement a canvas > on which we draw with the possibility of drawing with brush changing the > color and size of the brush. Is it possibile to have help ? > > Thank you in advance. > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160820/1af4a0c4/attachment-0001.htm From rmpouma at gmail.com Sat Aug 20 17:51:26 2016 From: rmpouma at gmail.com (roger mpouma) Date: Sat Aug 20 17:51:28 2016 Subject: [Newbies] Project on squeak language In-Reply-To: References: Message-ID: I have already implemented the canvas on which we draw, the possibility of drawing with the brush but with only a single color and a single size, a capacity to erase what we have already drawn with the "Clear" command on the custom menu code. So, i'd like to add the possibility of changing the color and the size of the brush presenting the choices of color and brush size. The differents methods are: "Methods" extent: aPoint | newForm | super extent: aPoint. newForm := Form extent: self extent depth: 16. newForm fillColor: Color veryLightGray. form ifNotNil: [form displayOn: newForm]. form := newForm. initialize super initialize. self extent: 500@350. drawOn: aCanvas aCanvas image: form at: bounds origin. handlesMouseDown: evt ^ true mouseDown: evt brush := Pen newOnForm: form. brush roundNib: 3. brush color: Color red. lastMouse := evt cursorPoint - bounds origin. brush drawFrom: lastMouse to: lastMouse. self invalidRect: ((lastMouse - brush sourceForm extent corner: lastMouse + brush sourceForm extent) translateBy: bounds origin). mouseMove: evt | p | p := evt cursorPoint - bounds origin. p = lastMouse ifTrue: [^ self]. brush drawFrom: lastMouse to: p. self invalidRect: (( ((lastMouse min: p) - brush sourceForm extent) corner: ((lastMouse max: p) + brush sourceForm extent)) translateBy: bounds origin). lastMouse := p. addCustomMenuItems: aCustomMenu hand: aHandMorph super addCustomMenuItems: aCustomMenu hand: aHandMorph. aCustomMenu add: 'clear' action: #clear. clear form fillColor: Color veryLightGray. self changed. "Class PaintMorph" Morph subclass: #PaintMorph instanceVariableNames: 'form brush lastMouse' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Fun' "Workspace" PaintMorph new openInWorld. Thank you in advance. 2016-08-20 18:47 GMT+02:00 Bert Freudenberg : > Sure. Just ask some specific questions - e.g. what you tried, what worked, > what didn't etc. > > - Bert - > > On Sat, Aug 20, 2016 at 10:59 AM, roger mpouma wrote: > >> Hello, >> I need help for a drawing project on Squeak. I'd like implement a canvas >> on which we draw with the possibility of drawing with brush changing the >> color and size of the brush. Is it possibile to have help ? >> >> Thank you in advance. >> _______________________________________________ >> Beginners mailing list >> Beginners@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/mailman/listinfo/beginners >> >> > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160820/4a94b015/attachment.htm From ron at usmedrec.com Sat Aug 20 18:26:13 2016 From: ron at usmedrec.com (Ron Teitelbaum) Date: Sat Aug 20 18:26:19 2016 Subject: [Newbies] Project on squeak language In-Reply-To: References: Message-ID: <018c01d1fb10$55751500$005f3f00$@usmedrec.com> Have you considered having a menu bar with colors and line sizes. The users can select the color and line size which will change your program to use those settings. All the best, Ron Teitelbaum From: beginners-bounces@lists.squeakfoundation.org [mailto:beginners-bounces@lists.squeakfoundation.org] On Behalf Of roger mpouma Sent: Saturday, August 20, 2016 1:51 PM To: A friendly place to get answers to even the most basic questions about Squeak. Subject: Re: [Newbies] Project on squeak language I have already implemented the canvas on which we draw, the possibility of drawing with the brush but with only a single color and a single size, a capacity to erase what we have already drawn with the "Clear" command on the custom menu code. So, i'd like to add the possibility of changing the color and the size of the brush presenting the choices of color and brush size. The differents methods are: "Methods" extent: aPoint | newForm | super extent: aPoint. newForm := Form extent: self extent depth: 16. newForm fillColor: Color veryLightGray. form ifNotNil: [form displayOn: newForm]. form := newForm. initialize super initialize. self extent: 500@350. drawOn: aCanvas aCanvas image: form at: bounds origin. handlesMouseDown: evt ^ true mouseDown: evt brush := Pen newOnForm: form. brush roundNib: 3. brush color: Color red. lastMouse := evt cursorPoint - bounds origin. brush drawFrom: lastMouse to: lastMouse. self invalidRect: ((lastMouse - brush sourceForm extent corner: lastMouse + brush sourceForm extent) translateBy: bounds origin). mouseMove: evt | p | p := evt cursorPoint - bounds origin. p = lastMouse ifTrue: [^ self]. brush drawFrom: lastMouse to: p. self invalidRect: (( ((lastMouse min: p) - brush sourceForm extent) corner: ((lastMouse max: p) + brush sourceForm extent)) translateBy: bounds origin). lastMouse := p. addCustomMenuItems: aCustomMenu hand: aHandMorph super addCustomMenuItems: aCustomMenu hand: aHandMorph. aCustomMenu add: 'clear' action: #clear. clear form fillColor: Color veryLightGray. self changed. "Class PaintMorph" Morph subclass: #PaintMorph instanceVariableNames: 'form brush lastMouse' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Fun' "Workspace" PaintMorph new openInWorld. Thank you in advance. 2016-08-20 18:47 GMT+02:00 Bert Freudenberg : Sure. Just ask some specific questions - e.g. what you tried, what worked, what didn't etc. - Bert - On Sat, Aug 20, 2016 at 10:59 AM, roger mpouma wrote: Hello, I need help for a drawing project on Squeak. I'd like implement a canvas on which we draw with the possibility of drawing with brush changing the color and size of the brush. Is it possibile to have help ? Thank you in advance. _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160820/a706a62f/attachment.htm From rmpouma at gmail.com Sat Aug 20 18:42:06 2016 From: rmpouma at gmail.com (roger mpouma) Date: Sat Aug 20 18:42:08 2016 Subject: [Newbies] Project on squeak language In-Reply-To: <018c01d1fb10$55751500$005f3f00$@usmedrec.com> References: <018c01d1fb10$55751500$005f3f00$@usmedrec.com> Message-ID: How can i make this please ? I thought to add "color" and "size" commands as "clear" command in the custom menu code. After that, add "color" and "size" methods... 2016-08-20 20:26 GMT+02:00 Ron Teitelbaum : > Have you considered having a menu bar with colors and line sizes. The > users can select the color and line size which will change your program to > use those settings. > > > > All the best, > > > > Ron Teitelbaum > > > > *From:* beginners-bounces@lists.squeakfoundation.org [mailto: > beginners-bounces@lists.squeakfoundation.org] *On Behalf Of *roger mpouma > *Sent:* Saturday, August 20, 2016 1:51 PM > *To:* A friendly place to get answers to even the most basic questions > about Squeak. > *Subject:* Re: [Newbies] Project on squeak language > > > > I have already implemented the canvas on which we draw, the possibility of > drawing with the brush but with only a single color and a single size, a > capacity to erase what we have already drawn with the "Clear" command on > the custom menu code. > So, i'd like to add the possibility of changing the color and the size of > the brush presenting the choices of color and brush size. > > The differents methods are: > > "Methods" > > extent: aPoint > | newForm | > super extent: aPoint. > newForm := Form extent: self extent depth: 16. > newForm fillColor: Color veryLightGray. > form ifNotNil: [form displayOn: newForm]. > form := newForm. > > > initialize > super initialize. > self extent: 500@350. > > drawOn: aCanvas > aCanvas image: form at: bounds origin. > > handlesMouseDown: evt > ^ true > > mouseDown: evt > brush := Pen newOnForm: form. > brush roundNib: 3. > brush color: Color red. > lastMouse := evt cursorPoint - bounds origin. > brush drawFrom: lastMouse to: lastMouse. > self invalidRect: > ((lastMouse - brush sourceForm extent corner: > lastMouse + brush sourceForm extent) > translateBy: bounds origin). > > > mouseMove: evt > | p | > p := evt cursorPoint - bounds origin. > p = lastMouse ifTrue: [^ self]. > brush drawFrom: lastMouse to: p. > self invalidRect: (( > ((lastMouse min: p) - brush sourceForm extent) corner: > ((lastMouse max: p) + brush sourceForm extent)) > translateBy: bounds origin). > lastMouse := p. > > > addCustomMenuItems: aCustomMenu hand: aHandMorph > super addCustomMenuItems: aCustomMenu hand: aHandMorph. > aCustomMenu add: 'clear' action: #clear. > > > clear > form fillColor: Color veryLightGray. > self changed. > > "Class PaintMorph" > > Morph subclass: #PaintMorph > instanceVariableNames: 'form brush lastMouse' > classVariableNames: '' > poolDictionaries: '' > category: 'Morphic-Fun' > > "Workspace" > PaintMorph new openInWorld. > > > > Thank you in advance. > > > > 2016-08-20 18:47 GMT+02:00 Bert Freudenberg : > > Sure. Just ask some specific questions - e.g. what you tried, what worked, > what didn't etc. > > > > - Bert - > > > > On Sat, Aug 20, 2016 at 10:59 AM, roger mpouma wrote: > > Hello, > I need help for a drawing project on Squeak. I'd like implement a canvas > on which we draw with the possibility of drawing with brush changing the > color and size of the brush. Is it possibile to have help ? > > Thank you in advance. > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160820/32d848b3/attachment-0001.htm From ron at usmedrec.com Sun Aug 21 01:14:56 2016 From: ron at usmedrec.com (Ron Teitelbaum) Date: Sun Aug 21 01:15:03 2016 Subject: [Newbies] Project on squeak language In-Reply-To: References: <018c01d1fb10$55751500$005f3f00$@usmedrec.com> Message-ID: <023801d1fb49$6e7b6520$4b722f60$@usmedrec.com> From: roger mpouma Sent: Saturday, August 20, 2016 2:42 PM How can i make this please ? I thought to add "color" and "size" commands as "clear" command in the custom menu code. After that, add "color" and "size" methods... [Ron Teitelbaum] What I was thinking is making buttons on the panel. Color buttons with a highlight around it so you can see what is selected. You could instead add something like Red or Blue to the menu. On your class add some instance variable called drawColor or something like that. When the menu item Red is called you would do drawColor := Color red. Then in mouseDown: brush color: drawColor. Initialize your color to something like black Initialize drawColor := Color black. So that the user is not required to use the menu to get the default color (black). Hope that helps, Ron 2016-08-20 20:26 GMT+02:00 Ron Teitelbaum : Have you considered having a menu bar with colors and line sizes. The users can select the color and line size which will change your program to use those settings. All the best, Ron Teitelbaum From: beginners-bounces@lists.squeakfoundation.org [mailto:beginners-bounces@lists.squeakfoundation.org] On Behalf Of roger mpouma Sent: Saturday, August 20, 2016 1:51 PM To: A friendly place to get answers to even the most basic questions about Squeak. Subject: Re: [Newbies] Project on squeak language I have already implemented the canvas on which we draw, the possibility of drawing with the brush but with only a single color and a single size, a capacity to erase what we have already drawn with the "Clear" command on the custom menu code. So, i'd like to add the possibility of changing the color and the size of the brush presenting the choices of color and brush size. The differents methods are: "Methods" extent: aPoint | newForm | super extent: aPoint. newForm := Form extent: self extent depth: 16. newForm fillColor: Color veryLightGray. form ifNotNil: [form displayOn: newForm]. form := newForm. initialize super initialize. self extent: 500@350. drawOn: aCanvas aCanvas image: form at: bounds origin. handlesMouseDown: evt ^ true mouseDown: evt brush := Pen newOnForm: form. brush roundNib: 3. brush color: Color red. lastMouse := evt cursorPoint - bounds origin. brush drawFrom: lastMouse to: lastMouse. self invalidRect: ((lastMouse - brush sourceForm extent corner: lastMouse + brush sourceForm extent) translateBy: bounds origin). mouseMove: evt | p | p := evt cursorPoint - bounds origin. p = lastMouse ifTrue: [^ self]. brush drawFrom: lastMouse to: p. self invalidRect: (( ((lastMouse min: p) - brush sourceForm extent) corner: ((lastMouse max: p) + brush sourceForm extent)) translateBy: bounds origin). lastMouse := p. addCustomMenuItems: aCustomMenu hand: aHandMorph super addCustomMenuItems: aCustomMenu hand: aHandMorph. aCustomMenu add: 'clear' action: #clear. clear form fillColor: Color veryLightGray. self changed. "Class PaintMorph" Morph subclass: #PaintMorph instanceVariableNames: 'form brush lastMouse' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Fun' "Workspace" PaintMorph new openInWorld. Thank you in advance. 2016-08-20 18:47 GMT+02:00 Bert Freudenberg : Sure. Just ask some specific questions - e.g. what you tried, what worked, what didn't etc. - Bert - On Sat, Aug 20, 2016 at 10:59 AM, roger mpouma wrote: Hello, I need help for a drawing project on Squeak. I'd like implement a canvas on which we draw with the possibility of drawing with brush changing the color and size of the brush. Is it possibile to have help ? Thank you in advance. _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160820/e8d8a6b0/attachment.htm From rmpouma at gmail.com Mon Aug 22 16:23:40 2016 From: rmpouma at gmail.com (roger mpouma) Date: Mon Aug 22 16:23:42 2016 Subject: [Newbies] Project on squeak language In-Reply-To: <023801d1fb49$6e7b6520$4b722f60$@usmedrec.com> References: <018c01d1fb10$55751500$005f3f00$@usmedrec.com> <023801d1fb49$6e7b6520$4b722f60$@usmedrec.com> Message-ID: I modified methods: addCustomMenuItems: aCustomMenu hand: aHandMorph super addCustomMenuItems: aCustomMenu hand: aHandMorph. aCustomMenu add: 'clear' action: #clear. drawColor := Color red. //modification drawColor := Color yellow. //modification drawColor := Color green. //modification drawColor := Color blue. //modification initialize super initialize. self extent: 500@700. drawColor := Color black. mouseDown: evt brush := Pen newOnForm: form. brush roundNib: 2. brush color: drawColor. //modification lastMouse := evt cursorPoint - bounds origin. brush drawFrom: lastMouse to: lastMouse. self invalidRect: ((lastMouse - brush sourceForm extent corner: lastMouse + brush sourceForm extent) translateBy: bounds origin). The initial color is black. When i click the command "change color" on the menu and i chose for example the green color, the result is the blue color. I don't understand why ? And after the first choice, i must restart the program with the Workspace for change another color. So i can't make several choices at the same time. How can I solve these problems ? and to change size of the brush ? Thank you in advance. 2016-08-21 3:14 GMT+02:00 Ron Teitelbaum : > > > > > *From:* roger mpouma > *Sent:* Saturday, August 20, 2016 2:42 PM > > > > How can i make this please ? > > I thought to add "color" and "size" commands as "clear" command in the > custom menu code. After that, add "color" and "size" methods... > > *[Ron Teitelbaum] * > > *What I was thinking is making buttons on the panel. Color buttons with a > highlight around it so you can see what is selected. You could instead add > something like Red or Blue to the menu.* > > > > *On your class add some instance variable called drawColor or something > like that.* > > > > *When the menu item Red is called you would do * > > > > *drawColor := Color red.* > > > > *Then in mouseDown:* > > > > brush color: drawColor. > > > > Initialize your color to something like black > > > > Initialize > > > > drawColor := Color black. > > > > So that the user is not required to use the menu to get the default color > (black). > > > > Hope that helps, > > > Ron > > > > 2016-08-20 20:26 GMT+02:00 Ron Teitelbaum : > > Have you considered having a menu bar with colors and line sizes. The > users can select the color and line size which will change your program to > use those settings. > > > > All the best, > > > > Ron Teitelbaum > > > > *From:* beginners-bounces@lists.squeakfoundation.org [mailto: > beginners-bounces@lists.squeakfoundation.org] *On Behalf Of *roger mpouma > *Sent:* Saturday, August 20, 2016 1:51 PM > *To:* A friendly place to get answers to even the most basic questions > about Squeak. > *Subject:* Re: [Newbies] Project on squeak language > > > > I have already implemented the canvas on which we draw, the possibility of > drawing with the brush but with only a single color and a single size, a > capacity to erase what we have already drawn with the "Clear" command on > the custom menu code. > So, i'd like to add the possibility of changing the color and the size of > the brush presenting the choices of color and brush size. > > The differents methods are: > > "Methods" > > extent: aPoint > | newForm | > super extent: aPoint. > newForm := Form extent: self extent depth: 16. > newForm fillColor: Color veryLightGray. > form ifNotNil: [form displayOn: newForm]. > form := newForm. > > > initialize > super initialize. > self extent: 500@350. > > drawOn: aCanvas > aCanvas image: form at: bounds origin. > > handlesMouseDown: evt > ^ true > > mouseDown: evt > brush := Pen newOnForm: form. > brush roundNib: 3. > brush color: Color red. > lastMouse := evt cursorPoint - bounds origin. > brush drawFrom: lastMouse to: lastMouse. > self invalidRect: > ((lastMouse - brush sourceForm extent corner: > lastMouse + brush sourceForm extent) > translateBy: bounds origin). > > > mouseMove: evt > | p | > p := evt cursorPoint - bounds origin. > p = lastMouse ifTrue: [^ self]. > brush drawFrom: lastMouse to: p. > self invalidRect: (( > ((lastMouse min: p) - brush sourceForm extent) corner: > ((lastMouse max: p) + brush sourceForm extent)) > translateBy: bounds origin). > lastMouse := p. > > > addCustomMenuItems: aCustomMenu hand: aHandMorph > super addCustomMenuItems: aCustomMenu hand: aHandMorph. > aCustomMenu add: 'clear' action: #clear. > > > clear > form fillColor: Color veryLightGray. > self changed. > > "Class PaintMorph" > > Morph subclass: #PaintMorph > instanceVariableNames: 'form brush lastMouse' > classVariableNames: '' > poolDictionaries: '' > category: 'Morphic-Fun' > > "Workspace" > PaintMorph new openInWorld. > > > > Thank you in advance. > > > > 2016-08-20 18:47 GMT+02:00 Bert Freudenberg : > > Sure. Just ask some specific questions - e.g. what you tried, what worked, > what didn't etc. > > > > - Bert - > > > > On Sat, Aug 20, 2016 at 10:59 AM, roger mpouma wrote: > > Hello, > I need help for a drawing project on Squeak. I'd like implement a canvas > on which we draw with the possibility of drawing with brush changing the > color and size of the brush. Is it possibile to have help ? > > Thank you in advance. > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160822/479f2c31/attachment-0001.htm From ron at usmedrec.com Mon Aug 22 16:45:02 2016 From: ron at usmedrec.com (Ron Teitelbaum) Date: Mon Aug 22 16:45:09 2016 Subject: [Newbies] Project on squeak language In-Reply-To: References: <018c01d1fb10$55751500$005f3f00$@usmedrec.com> <023801d1fb49$6e7b6520$4b722f60$@usmedrec.com> Message-ID: <01aa01d1fc94$87fb5590$97f200b0$@usmedrec.com> Hi Roger! That was a nice try! I modified methods: addCustomMenuItems: aCustomMenu hand: aHandMorph super addCustomMenuItems: aCustomMenu hand: aHandMorph. aCustomMenu add: 'clear' action: #clear. drawColor := Color red. //modification drawColor := Color yellow. //modification drawColor := Color green. //modification drawColor := Color blue. //modification [Ron Teitelbaum] What this does is create a menu with one item clear and then it sets the drawColor to red yellow green and then blue. Since blue is the last color you end up with blue. Try creating drawRed, drawYellow, drawGreen, and drawBlue methods For example drawRed drawColor := Color red. Now add to your menu properly. aCustomMenu add: 'clear' action: #clear. aCustomMenu add: 'red' action: #drawRed. Where add is what you see in your menu and action is what happens when you select the menu item. (it calls: self drawRed) Do that with all your colors and you should be all set! You can also add menu items to adjust the size of the brush. Maybe make small brush, medium brush and large brush menu items? Works the same way as changing color. You need a brushSize instance variable. And initialize brushSize := 2. All the best, Ron Teitelbaum initialize super initialize. self extent: 500@700. drawColor := Color black. mouseDown: evt brush := Pen newOnForm: form. brush roundNib: 2. brush color: drawColor. //modification lastMouse := evt cursorPoint - bounds origin. brush drawFrom: lastMouse to: lastMouse. self invalidRect: ((lastMouse - brush sourceForm extent corner: lastMouse + brush sourceForm extent) translateBy: bounds origin). The initial color is black. When i click the command "change color" on the menu and i chose for example the green color, the result is the blue color. I don't understand why ? And after the first choice, i must restart the program with the Workspace for change another color. So i can't make several choices at the same time. How can I solve these problems ? and to change size of the brush ? Thank you in advance. 2016-08-21 3:14 GMT+02:00 Ron Teitelbaum : From: roger mpouma Sent: Saturday, August 20, 2016 2:42 PM How can i make this please ? I thought to add "color" and "size" commands as "clear" command in the custom menu code. After that, add "color" and "size" methods... [Ron Teitelbaum] What I was thinking is making buttons on the panel. Color buttons with a highlight around it so you can see what is selected. You could instead add something like Red or Blue to the menu. On your class add some instance variable called drawColor or something like that. When the menu item Red is called you would do drawColor := Color red. Then in mouseDown: brush color: drawColor. Initialize your color to something like black Initialize drawColor := Color black. So that the user is not required to use the menu to get the default color (black). Hope that helps, Ron 2016-08-20 20:26 GMT+02:00 Ron Teitelbaum : Have you considered having a menu bar with colors and line sizes. The users can select the color and line size which will change your program to use those settings. All the best, Ron Teitelbaum From: beginners-bounces@lists.squeakfoundation.org [mailto:beginners-bounces@lists.squeakfoundation.org] On Behalf Of roger mpouma Sent: Saturday, August 20, 2016 1:51 PM To: A friendly place to get answers to even the most basic questions about Squeak. Subject: Re: [Newbies] Project on squeak language I have already implemented the canvas on which we draw, the possibility of drawing with the brush but with only a single color and a single size, a capacity to erase what we have already drawn with the "Clear" command on the custom menu code. So, i'd like to add the possibility of changing the color and the size of the brush presenting the choices of color and brush size. The differents methods are: "Methods" extent: aPoint | newForm | super extent: aPoint. newForm := Form extent: self extent depth: 16. newForm fillColor: Color veryLightGray. form ifNotNil: [form displayOn: newForm]. form := newForm. initialize super initialize. self extent: 500@350. drawOn: aCanvas aCanvas image: form at: bounds origin. handlesMouseDown: evt ^ true mouseDown: evt brush := Pen newOnForm: form. brush roundNib: 3. brush color: Color red. lastMouse := evt cursorPoint - bounds origin. brush drawFrom: lastMouse to: lastMouse. self invalidRect: ((lastMouse - brush sourceForm extent corner: lastMouse + brush sourceForm extent) translateBy: bounds origin). mouseMove: evt | p | p := evt cursorPoint - bounds origin. p = lastMouse ifTrue: [^ self]. brush drawFrom: lastMouse to: p. self invalidRect: (( ((lastMouse min: p) - brush sourceForm extent) corner: ((lastMouse max: p) + brush sourceForm extent)) translateBy: bounds origin). lastMouse := p. addCustomMenuItems: aCustomMenu hand: aHandMorph super addCustomMenuItems: aCustomMenu hand: aHandMorph. aCustomMenu add: 'clear' action: #clear. clear form fillColor: Color veryLightGray. self changed. "Class PaintMorph" Morph subclass: #PaintMorph instanceVariableNames: 'form brush lastMouse' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Fun' "Workspace" PaintMorph new openInWorld. Thank you in advance. 2016-08-20 18:47 GMT+02:00 Bert Freudenberg : Sure. Just ask some specific questions - e.g. what you tried, what worked, what didn't etc. - Bert - On Sat, Aug 20, 2016 at 10:59 AM, roger mpouma wrote: Hello, I need help for a drawing project on Squeak. I'd like implement a canvas on which we draw with the possibility of drawing with brush changing the color and size of the brush. Is it possibile to have help ? Thank you in advance. _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160822/606352a5/attachment-0001.htm From joseph.alotta at gmail.com Mon Aug 22 17:50:23 2016 From: joseph.alotta at gmail.com (Joseph Alotta) Date: Mon Aug 22 17:51:42 2016 Subject: [Newbies] Re: Project on squeak language In-Reply-To: <01aa01d1fc94$87fb5590$97f200b0$@usmedrec.com> References: <018c01d1fb10$55751500$005f3f00$@usmedrec.com> <023801d1fb49$6e7b6520$4b722f60$@usmedrec.com> <01aa01d1fc94$87fb5590$97f200b0$@usmedrec.com> Message-ID: <533D8DAC-48EE-4A24-AD27-96781B3493B3@gmail.com> Is //modification a new way of doing comments? Sent from my iPhone > On Aug 22, 2016, at 11:45 AM, Ron Teitelbaum [via Smalltalk] wrote: > > Hi Roger! > > > > That was a nice try! > > > > I modified methods: > > addCustomMenuItems: aCustomMenu hand: aHandMorph > super addCustomMenuItems: aCustomMenu hand: aHandMorph. > aCustomMenu add: 'clear' action: #clear. > drawColor := Color red. //modification > drawColor := Color yellow. //modification > drawColor := Color green. //modification > drawColor := Color blue. //modification > > [Ron Teitelbaum] > > What this does is create a menu with one item clear and then it sets the drawColor to red yellow green and then blue. Since blue is the last color you end up with blue. > > Try creating drawRed, drawYellow, drawGreen, and drawBlue methods > > For example > > drawRed > > drawColor := Color red. > > Now add to your menu properly. > > aCustomMenu add: 'clear' action: #clear. > aCustomMenu add: 'red' action: #drawRed. > > Where add is what you see in your menu and action is what happens when you select the menu item. (it calls: self drawRed) > > Do that with all your colors and you should be all set! > > You can also add menu items to adjust the size of the brush. Maybe make small brush, medium brush and large brush menu items? Works the same way as changing color. You need a brushSize instance variable. And initialize brushSize := 2. > > All the best, > > Ron Teitelbaum > > initialize > super initialize. > self extent: 500@700. > drawColor := Color black. > > mouseDown: evt > brush := Pen newOnForm: form. > brush roundNib: 2. > brush color: drawColor. //modification > lastMouse := evt cursorPoint - bounds origin. > brush drawFrom: lastMouse to: lastMouse. > self invalidRect: > ((lastMouse - brush sourceForm extent corner: > lastMouse + brush sourceForm extent) > translateBy: bounds origin). > > > The initial color is black. > > When i click the command "change color" on the menu and i chose for example the green color, the result is the blue color. I don't understand why ? > > And after the first choice, i must restart the program with the Workspace for change another color. So i can't make several choices at the same time. > > How can I solve these problems ? and to change size of the brush ? > > Thank you in advance. > > > > 2016-08-21 3:14 GMT+02:00 Ron Teitelbaum <[hidden email]>: > > > > > > From: roger mpouma > Sent: Saturday, August 20, 2016 2:42 PM > > > > How can i make this please ? > > I thought to add "color" and "size" commands as "clear" command in the custom menu code. After that, add "color" and "size" methods... > > [Ron Teitelbaum] > > What I was thinking is making buttons on the panel. Color buttons with a highlight around it so you can see what is selected. You could instead add something like Red or Blue to the menu. > > > > On your class add some instance variable called drawColor or something like that. > > > > When the menu item Red is called you would do > > > > drawColor := Color red. > > > > Then in mouseDown: > > > > brush color: drawColor. > > > > Initialize your color to something like black > > > > Initialize > > > > drawColor := Color black. > > > > So that the user is not required to use the menu to get the default color (black). > > > > Hope that helps, > > > Ron > > > > 2016-08-20 20:26 GMT+02:00 Ron Teitelbaum <[hidden email]>: > > Have you considered having a menu bar with colors and line sizes. The users can select the color and line size which will change your program to use those settings. > > > > All the best, > > > > Ron Teitelbaum > > > > From: [hidden email] [mailto:[hidden email]] On Behalf Of roger mpouma > Sent: Saturday, August 20, 2016 1:51 PM > To: A friendly place to get answers to even the most basic questions about Squeak. > Subject: Re: [Newbies] Project on squeak language > > > > I have already implemented the canvas on which we draw, the possibility of drawing with the brush but with only a single color and a single size, a capacity to erase what we have already drawn with the "Clear" command on the custom menu code. > So, i'd like to add the possibility of changing the color and the size of the brush presenting the choices of color and brush size. > > The differents methods are: > > "Methods" > > extent: aPoint > | newForm | > super extent: aPoint. > newForm := Form extent: self extent depth: 16. > newForm fillColor: Color veryLightGray. > form ifNotNil: [form displayOn: newForm]. > form := newForm. > > > initialize > super initialize. > self extent: 500@350. > > drawOn: aCanvas > aCanvas image: form at: bounds origin. > > handlesMouseDown: evt > ^ true > > mouseDown: evt > brush := Pen newOnForm: form. > brush roundNib: 3. > brush color: Color red. > lastMouse := evt cursorPoint - bounds origin. > brush drawFrom: lastMouse to: lastMouse. > self invalidRect: > ((lastMouse - brush sourceForm extent corner: > lastMouse + brush sourceForm extent) > translateBy: bounds origin). > > > mouseMove: evt > | p | > p := evt cursorPoint - bounds origin. > p = lastMouse ifTrue: [^ self]. > brush drawFrom: lastMouse to: p. > self invalidRect: (( > ((lastMouse min: p) - brush sourceForm extent) corner: > ((lastMouse max: p) + brush sourceForm extent)) > translateBy: bounds origin). > lastMouse := p. > > > addCustomMenuItems: aCustomMenu hand: aHandMorph > super addCustomMenuItems: aCustomMenu hand: aHandMorph. > aCustomMenu add: 'clear' action: #clear. > > > clear > form fillColor: Color veryLightGray. > self changed. > > "Class PaintMorph" > > Morph subclass: #PaintMorph > instanceVariableNames: 'form brush lastMouse' > classVariableNames: '' > poolDictionaries: '' > category: 'Morphic-Fun' > > "Workspace" > PaintMorph new openInWorld. > > > > Thank you in advance. > > > > 2016-08-20 18:47 GMT+02:00 Bert Freudenberg <[hidden email]>: > > Sure. Just ask some specific questions - e.g. what you tried, what worked, what didn't etc. > > > > - Bert - > > > > On Sat, Aug 20, 2016 at 10:59 AM, roger mpouma <[hidden email]> wrote: > > Hello, > I need help for a drawing project on Squeak. I'd like implement a canvas on which we draw with the possibility of drawing with brush changing the color and size of the brush. Is it possibile to have help ? > > Thank you in advance. > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > If you reply to this email, your message will be added to the discussion below: > http://forum.world.st/Project-on-squeak-language-tp4912035p4912223.html > To start a new topic under Squeak - Beginners, email ml-node+s1294792n107673h12@n4.nabble.com > To unsubscribe from Squeak - Beginners, click here. > NAML -- View this message in context: http://forum.world.st/Project-on-squeak-language-tp4912035p4912226.html Sent from the Squeak - Beginners mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160822/a59a29c3/attachment-0001.htm From ron at usmedrec.com Mon Aug 22 17:57:45 2016 From: ron at usmedrec.com (Ron Teitelbaum) Date: Mon Aug 22 17:57:50 2016 Subject: [Newbies] Re: Project on squeak language In-Reply-To: <533D8DAC-48EE-4A24-AD27-96781B3493B3@gmail.com> References: <018c01d1fb10$55751500$005f3f00$@usmedrec.com> <023801d1fb49$6e7b6520$4b722f60$@usmedrec.com> <01aa01d1fc94$87fb5590$97f200b0$@usmedrec.com> <533D8DAC-48EE-4A24-AD27-96781B3493B3@gmail.com> Message-ID: <021901d1fc9e$b0a041e0$11e0c5a0$@usmedrec.com> From: Joseph Alotta Sent: Monday, August 22, 2016 1:50 PM Is //modification a new way of doing comments? [Ron Teitelbaum] Good question Joe, I assumed it was added to the email and not to code. The comments would require quotes: " this is a comment " All the best, Ron Teitelbaum Sent from my iPhone On Aug 22, 2016, at 11:45 AM, Ron Teitelbaum [via Smalltalk] <[hidden email]> wrote: Hi Roger! That was a nice try! I modified methods: addCustomMenuItems: aCustomMenu hand: aHandMorph super addCustomMenuItems: aCustomMenu hand: aHandMorph. aCustomMenu add: 'clear' action: #clear. drawColor := Color red. //modification drawColor := Color yellow. //modification drawColor := Color green. //modification drawColor := Color blue. //modification [Ron Teitelbaum] What this does is create a menu with one item clear and then it sets the drawColor to red yellow green and then blue. Since blue is the last color you end up with blue. Try creating drawRed, drawYellow, drawGreen, and drawBlue methods For example drawRed drawColor := Color red. Now add to your menu properly. aCustomMenu add: 'clear' action: #clear. aCustomMenu add: 'red' action: #drawRed. Where add is what you see in your menu and action is what happens when you select the menu item. (it calls: self drawRed) Do that with all your colors and you should be all set! You can also add menu items to adjust the size of the brush. Maybe make small brush, medium brush and large brush menu items? Works the same way as changing color. You need a brushSize instance variable. And initialize brushSize := 2. All the best, Ron Teitelbaum initialize super initialize. self extent: 500@700. drawColor := Color black. mouseDown: evt brush := Pen newOnForm: form. brush roundNib: 2. brush color: drawColor. //modification lastMouse := evt cursorPoint - bounds origin. brush drawFrom: lastMouse to: lastMouse. self invalidRect: ((lastMouse - brush sourceForm extent corner: lastMouse + brush sourceForm extent) translateBy: bounds origin). The initial color is black. When i click the command "change color" on the menu and i chose for example the green color, the result is the blue color. I don't understand why ? And after the first choice, i must restart the program with the Workspace for change another color. So i can't make several choices at the same time. How can I solve these problems ? and to change size of the brush ? Thank you in advance. 2016-08-21 3:14 GMT+02:00 Ron Teitelbaum <[hidden email]>: From: roger mpouma Sent: Saturday, August 20, 2016 2:42 PM How can i make this please ? I thought to add "color" and "size" commands as "clear" command in the custom menu code. After that, add "color" and "size" methods... [Ron Teitelbaum] What I was thinking is making buttons on the panel. Color buttons with a highlight around it so you can see what is selected. You could instead add something like Red or Blue to the menu. On your class add some instance variable called drawColor or something like that. When the menu item Red is called you would do drawColor := Color red. Then in mouseDown: brush color: drawColor. Initialize your color to something like black Initialize drawColor := Color black. So that the user is not required to use the menu to get the default color (black). Hope that helps, Ron 2016-08-20 20:26 GMT+02:00 Ron Teitelbaum <[hidden email]>: Have you considered having a menu bar with colors and line sizes. The users can select the color and line size which will change your program to use those settings. All the best, Ron Teitelbaum From: [hidden email] [mailto:[hidden email]] On Behalf Of roger mpouma Sent: Saturday, August 20, 2016 1:51 PM To: A friendly place to get answers to even the most basic questions about Squeak. Subject: Re: [Newbies] Project on squeak language I have already implemented the canvas on which we draw, the possibility of drawing with the brush but with only a single color and a single size, a capacity to erase what we have already drawn with the "Clear" command on the custom menu code. So, i'd like to add the possibility of changing the color and the size of the brush presenting the choices of color and brush size. The differents methods are: "Methods" extent: aPoint | newForm | super extent: aPoint. newForm := Form extent: self extent depth: 16. newForm fillColor: Color veryLightGray. form ifNotNil: [form displayOn: newForm]. form := newForm. initialize super initialize. self extent: 500@350. drawOn: aCanvas aCanvas image: form at: bounds origin. handlesMouseDown: evt ^ true mouseDown: evt brush := Pen newOnForm: form. brush roundNib: 3. brush color: Color red. lastMouse := evt cursorPoint - bounds origin. brush drawFrom: lastMouse to: lastMouse. self invalidRect: ((lastMouse - brush sourceForm extent corner: lastMouse + brush sourceForm extent) translateBy: bounds origin). mouseMove: evt | p | p := evt cursorPoint - bounds origin. p = lastMouse ifTrue: [^ self]. brush drawFrom: lastMouse to: p. self invalidRect: (( ((lastMouse min: p) - brush sourceForm extent) corner: ((lastMouse max: p) + brush sourceForm extent)) translateBy: bounds origin). lastMouse := p. addCustomMenuItems: aCustomMenu hand: aHandMorph super addCustomMenuItems: aCustomMenu hand: aHandMorph. aCustomMenu add: 'clear' action: #clear. clear form fillColor: Color veryLightGray. self changed. "Class PaintMorph" Morph subclass: #PaintMorph instanceVariableNames: 'form brush lastMouse' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Fun' "Workspace" PaintMorph new openInWorld. Thank you in advance. 2016-08-20 18:47 GMT+02:00 Bert Freudenberg <[hidden email]>: Sure. Just ask some specific questions - e.g. what you tried, what worked, what didn't etc. - Bert - On Sat, Aug 20, 2016 at 10:59 AM, roger mpouma <[hidden email]> wrote: Hello, I need help for a drawing project on Squeak. I'd like implement a canvas on which we draw with the possibility of drawing with brush changing the color and size of the brush. Is it possibile to have help ? Thank you in advance. _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners _____ If you reply to this email, your message will be added to the discussion below: http://forum.world.st/Project-on-squeak-language-tp4912035p4912223.html To start a new topic under Squeak - Beginners, email [hidden email] To unsubscribe from Squeak - Beginners, click here. NAML _____ View this message in context: Re: Project on squeak language Sent from the Squeak - Beginners mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160822/5c787150/attachment-0001.htm From rmpouma at gmail.com Mon Aug 22 18:41:41 2016 From: rmpouma at gmail.com (roger mpouma) Date: Mon Aug 22 18:41:44 2016 Subject: [Newbies] Project on squeak language In-Reply-To: <01aa01d1fc94$87fb5590$97f200b0$@usmedrec.com> References: <018c01d1fb10$55751500$005f3f00$@usmedrec.com> <023801d1fb49$6e7b6520$4b722f60$@usmedrec.com> <01aa01d1fc94$87fb5590$97f200b0$@usmedrec.com> Message-ID: Hi Ron, I solved my problem, thank you for your help. I got one more question, how can i add the possibility to erase parts of what i have already drawn as item "clear" but just parts of the drawing ? 2016-08-22 18:45 GMT+02:00 Ron Teitelbaum : > Hi Roger! > > > > That was a nice try! > > > > I modified methods: > > addCustomMenuItems: aCustomMenu hand: aHandMorph > super addCustomMenuItems: aCustomMenu hand: aHandMorph. > aCustomMenu add: 'clear' action: #clear. > drawColor := Color red. //modification > drawColor := Color yellow. //modification > drawColor := Color green. //modification > drawColor := Color blue. //modification > > *[Ron Teitelbaum]* > > *What this does is create a menu with one item clear and then it sets the > drawColor to red yellow green and then blue. Since blue is the last color > you end up with blue.* > > *Try creating drawRed, drawYellow, drawGreen, and drawBlue methods* > > *For example* > > *drawRed* > > * drawColor := Color red.* > > *Now add to your menu properly.* > > aCustomMenu add: 'clear' action: #clear. > aCustomMenu add: 'red' action: #drawRed. > > *Where add is what you see in your menu and action is what happens when > you select the menu item. (it calls: self drawRed)* > > *Do that with all your colors and you should be all set!* > > *You can also add menu items to adjust the size of the brush. Maybe make > small brush, medium brush and large brush menu items? Works the same way > as changing color. You need a brushSize instance variable. And initialize > brushSize := 2.* > > *All the best,* > > > *Ron Teitelbaum* > initialize > super initialize. > self extent: 500@700. > drawColor := Color black. > > mouseDown: evt > brush := Pen newOnForm: form. > brush roundNib: 2. > brush color: drawColor. > //modification > lastMouse := evt cursorPoint - bounds origin. > brush drawFrom: lastMouse to: lastMouse. > self invalidRect: > ((lastMouse - brush sourceForm extent corner: > lastMouse + brush sourceForm extent) > translateBy: bounds origin). > > The initial color is black. > > When i click the command "change color" on the menu and i chose for > example the green color, the result is the blue color. I don't understand > why ? > > And after the first choice, i must restart the program with the Workspace > for change another color. So i can't make several choices at the same time. > > How can I solve these problems ? and to change size of the brush ? > > Thank you in advance. > > > > 2016-08-21 3:14 GMT+02:00 Ron Teitelbaum : > > > > > > *From:* roger mpouma > *Sent:* Saturday, August 20, 2016 2:42 PM > > > > How can i make this please ? > > I thought to add "color" and "size" commands as "clear" command in the > custom menu code. After that, add "color" and "size" methods... > > *[Ron Teitelbaum] * > > *What I was thinking is making buttons on the panel. Color buttons with a > highlight around it so you can see what is selected. You could instead add > something like Red or Blue to the menu.* > > > > *On your class add some instance variable called drawColor or something > like that.* > > > > *When the menu item Red is called you would do * > > > > *drawColor := Color red.* > > > > *Then in mouseDown:* > > > > brush color: drawColor. > > > > Initialize your color to something like black > > > > Initialize > > > > drawColor := Color black. > > > > So that the user is not required to use the menu to get the default color > (black). > > > > Hope that helps, > > > Ron > > > > 2016-08-20 20:26 GMT+02:00 Ron Teitelbaum : > > Have you considered having a menu bar with colors and line sizes. The > users can select the color and line size which will change your program to > use those settings. > > > > All the best, > > > > Ron Teitelbaum > > > > *From:* beginners-bounces@lists.squeakfoundation.org [mailto: > beginners-bounces@lists.squeakfoundation.org] *On Behalf Of *roger mpouma > *Sent:* Saturday, August 20, 2016 1:51 PM > *To:* A friendly place to get answers to even the most basic questions > about Squeak. > *Subject:* Re: [Newbies] Project on squeak language > > > > I have already implemented the canvas on which we draw, the possibility of > drawing with the brush but with only a single color and a single size, a > capacity to erase what we have already drawn with the "Clear" command on > the custom menu code. > So, i'd like to add the possibility of changing the color and the size of > the brush presenting the choices of color and brush size. > > The differents methods are: > > "Methods" > > extent: aPoint > | newForm | > super extent: aPoint. > newForm := Form extent: self extent depth: 16. > newForm fillColor: Color veryLightGray. > form ifNotNil: [form displayOn: newForm]. > form := newForm. > > > initialize > super initialize. > self extent: 500@350. > > drawOn: aCanvas > aCanvas image: form at: bounds origin. > > handlesMouseDown: evt > ^ true > > mouseDown: evt > brush := Pen newOnForm: form. > brush roundNib: 3. > brush color: Color red. > lastMouse := evt cursorPoint - bounds origin. > brush drawFrom: lastMouse to: lastMouse. > self invalidRect: > ((lastMouse - brush sourceForm extent corner: > lastMouse + brush sourceForm extent) > translateBy: bounds origin). > > > mouseMove: evt > | p | > p := evt cursorPoint - bounds origin. > p = lastMouse ifTrue: [^ self]. > brush drawFrom: lastMouse to: p. > self invalidRect: (( > ((lastMouse min: p) - brush sourceForm extent) corner: > ((lastMouse max: p) + brush sourceForm extent)) > translateBy: bounds origin). > lastMouse := p. > > > addCustomMenuItems: aCustomMenu hand: aHandMorph > super addCustomMenuItems: aCustomMenu hand: aHandMorph. > aCustomMenu add: 'clear' action: #clear. > > > clear > form fillColor: Color veryLightGray. > self changed. > > "Class PaintMorph" > > Morph subclass: #PaintMorph > instanceVariableNames: 'form brush lastMouse' > classVariableNames: '' > poolDictionaries: '' > category: 'Morphic-Fun' > > "Workspace" > PaintMorph new openInWorld. > > > > Thank you in advance. > > > > 2016-08-20 18:47 GMT+02:00 Bert Freudenberg : > > Sure. Just ask some specific questions - e.g. what you tried, what worked, > what didn't etc. > > > > - Bert - > > > > On Sat, Aug 20, 2016 at 10:59 AM, roger mpouma wrote: > > Hello, > I need help for a drawing project on Squeak. I'd like implement a canvas > on which we draw with the possibility of drawing with brush changing the > color and size of the brush. Is it possibile to have help ? > > Thank you in advance. > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160822/02ee8095/attachment-0001.htm From rmpouma at gmail.com Mon Aug 22 18:48:44 2016 From: rmpouma at gmail.com (roger mpouma) Date: Mon Aug 22 18:48:47 2016 Subject: [Newbies] Re: Project on squeak language In-Reply-To: <533D8DAC-48EE-4A24-AD27-96781B3493B3@gmail.com> References: <018c01d1fb10$55751500$005f3f00$@usmedrec.com> <023801d1fb49$6e7b6520$4b722f60$@usmedrec.com> <01aa01d1fc94$87fb5590$97f200b0$@usmedrec.com> <533D8DAC-48EE-4A24-AD27-96781B3493B3@gmail.com> Message-ID: Sorry it's an error from me, it's rather " " 2016-08-22 19:50 GMT+02:00 Joseph Alotta : > Is //modification a new way of doing comments? > > Sent from my iPhone > > On Aug 22, 2016, at 11:45 AM, Ron Teitelbaum [via Smalltalk] <[hidden > email] > wrote: > > Hi Roger! > > > > That was a nice try! > > > > I modified methods: > > addCustomMenuItems: aCustomMenu hand: aHandMorph > super addCustomMenuItems: aCustomMenu hand: aHandMorph. > aCustomMenu add: 'clear' action: #clear. > drawColor := Color red. //modification > drawColor := Color yellow. //modification > drawColor := Color green. //modification > drawColor := Color blue. //modification > > *[Ron Teitelbaum]* > > *What this does is create a menu with one item clear and then it sets the > drawColor to red yellow green and then blue. Since blue is the last color > you end up with blue.* > > *Try creating drawRed, drawYellow, drawGreen, and drawBlue methods* > > *For example* > > *drawRed* > > * drawColor := Color red.* > > *Now add to your menu properly.* > > aCustomMenu add: 'clear' action: #clear. > aCustomMenu add: 'red' action: #drawRed. > > *Where add is what you see in your menu and action is what happens when > you select the menu item. (it calls: self drawRed)* > > *Do that with all your colors and you should be all set!* > > *You can also add menu items to adjust the size of the brush. Maybe make > small brush, medium brush and large brush menu items? Works the same way > as changing color. You need a brushSize instance variable. And initialize > brushSize := 2.* > > *All the best,* > > > *Ron Teitelbaum* > initialize > super initialize. > self extent: 500@700. > drawColor := Color black. > > mouseDown: evt > brush := Pen newOnForm: form. > brush roundNib: 2. > brush color: drawColor. > //modification > lastMouse := evt cursorPoint - bounds origin. > brush drawFrom: lastMouse to: lastMouse. > self invalidRect: > ((lastMouse - brush sourceForm extent corner: > lastMouse + brush sourceForm extent) > translateBy: bounds origin). > > The initial color is black. > > When i click the command "change color" on the menu and i chose for > example the green color, the result is the blue color. I don't understand > why ? > > And after the first choice, i must restart the program with the Workspace > for change another color. So i can't make several choices at the same time. > > How can I solve these problems ? and to change size of the brush ? > > Thank you in advance. > > > > 2016-08-21 3:14 GMT+02:00 Ron Teitelbaum <[hidden email] > >: > > > > > > *From:* roger mpouma > *Sent:* Saturday, August 20, 2016 2:42 PM > > > > How can i make this please ? > > I thought to add "color" and "size" commands as "clear" command in the > custom menu code. After that, add "color" and "size" methods... > > *[Ron Teitelbaum] * > > *What I was thinking is making buttons on the panel. Color buttons with a > highlight around it so you can see what is selected. You could instead add > something like Red or Blue to the menu.* > > > > *On your class add some instance variable called drawColor or something > like that.* > > > > *When the menu item Red is called you would do * > > > > *drawColor := Color red.* > > > > *Then in mouseDown:* > > > > brush color: drawColor. > > > > Initialize your color to something like black > > > > Initialize > > > > drawColor := Color black. > > > > So that the user is not required to use the menu to get the default color > (black). > > > > Hope that helps, > > > Ron > > > > 2016-08-20 20:26 GMT+02:00 Ron Teitelbaum <[hidden email] > >: > > Have you considered having a menu bar with colors and line sizes. The > users can select the color and line size which will change your program to > use those settings. > > > > All the best, > > > > Ron Teitelbaum > > > > *From:* [hidden email] > [mailto:[hidden > email] ] *On > Behalf Of *roger mpouma > > *Sent:* Saturday, August 20, 2016 1:51 PM > *To:* A friendly place to get answers to even the most basic questions > about Squeak. > *Subject:* Re: [Newbies] Project on squeak language > > > > I have already implemented the canvas on which we draw, the possibility of > drawing with the brush but with only a single color and a single size, a > capacity to erase what we have already drawn with the "Clear" command on > the custom menu code. > So, i'd like to add the possibility of changing the color and the size of > the brush presenting the choices of color and brush size. > > The differents methods are: > > "Methods" > > extent: aPoint > | newForm | > super extent: aPoint. > newForm := Form extent: self extent depth: 16. > newForm fillColor: Color veryLightGray. > form ifNotNil: [form displayOn: newForm]. > form := newForm. > > > initialize > super initialize. > self extent: 500@350. > > drawOn: aCanvas > aCanvas image: form at: bounds origin. > > handlesMouseDown: evt > ^ true > > mouseDown: evt > brush := Pen newOnForm: form. > brush roundNib: 3. > brush color: Color red. > lastMouse := evt cursorPoint - bounds origin. > brush drawFrom: lastMouse to: lastMouse. > self invalidRect: > ((lastMouse - brush sourceForm extent corner: > lastMouse + brush sourceForm extent) > translateBy: bounds origin). > > > mouseMove: evt > | p | > p := evt cursorPoint - bounds origin. > p = lastMouse ifTrue: [^ self]. > brush drawFrom: lastMouse to: p. > self invalidRect: (( > ((lastMouse min: p) - brush sourceForm extent) corner: > ((lastMouse max: p) + brush sourceForm extent)) > translateBy: bounds origin). > lastMouse := p. > > > addCustomMenuItems: aCustomMenu hand: aHandMorph > super addCustomMenuItems: aCustomMenu hand: aHandMorph. > aCustomMenu add: 'clear' action: #clear. > > > clear > form fillColor: Color veryLightGray. > self changed. > > "Class PaintMorph" > > Morph subclass: #PaintMorph > instanceVariableNames: 'form brush lastMouse' > classVariableNames: '' > poolDictionaries: '' > category: 'Morphic-Fun' > > "Workspace" > PaintMorph new openInWorld. > > > > Thank you in advance. > > > > 2016-08-20 18:47 GMT+02:00 Bert Freudenberg <[hidden email] > >: > > Sure. Just ask some specific questions - e.g. what you tried, what worked, > what didn't etc. > > > > - Bert - > > > > On Sat, Aug 20, 2016 at 10:59 AM, roger mpouma <[hidden email] > > wrote: > > Hello, > I need help for a drawing project on Squeak. I'd like implement a canvas > on which we draw with the possibility of drawing with brush changing the > color and size of the brush. Is it possibile to have help ? > > Thank you in advance. > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://forum.world.st/Project-on-squeak-language-tp4912035p4912223.html > To start a new topic under Squeak - Beginners, email [hidden email] > > To unsubscribe from Squeak - Beginners, click here. > NAML > > > > ------------------------------ > View this message in context: Re: Project on squeak language > > Sent from the Squeak - Beginners mailing list archive > at Nabble.com. > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160822/41c6356b/attachment-0001.htm From ron at usmedrec.com Mon Aug 22 18:54:22 2016 From: ron at usmedrec.com (Ron Teitelbaum) Date: Mon Aug 22 18:54:27 2016 Subject: [Newbies] Project on squeak language In-Reply-To: References: <018c01d1fb10$55751500$005f3f00$@usmedrec.com> <023801d1fb49$6e7b6520$4b722f60$@usmedrec.com> <01aa01d1fc94$87fb5590$97f200b0$@usmedrec.com> Message-ID: <026c01d1fca6$994ff5a0$cbefe0e0$@usmedrec.com> From: roger mpouma Sent: Monday, August 22, 2016 2:42 PM Hi Ron, I solved my problem, thank you for your help. I got one more question, how can i add the possibility to erase parts of what i have already drawn as item "clear" but just parts of the drawing ? [Ron Teitelbaum] Of course everything is possible. Your clear is doing just that, it?s filling in the canvas area with your background color. There are number of ways to accomplish this. A number of programs hold onto the results of each drawing collection (clicking and moving until you let go of the mouse) as a single element of the drawing. Then you can ctrl ?z to remove them in order. To do something like that you need an instance of a class, something like Drawing, which holds a collection of brush strokes, colors and line widths, and a collection on your canvas to apply the drawings in order to your canvas. An instance variable called drawings would work. You could also calculate the intersection of a line and the position of the mouse pointer in the drawing to find each draw element and remove them when clicked. You could also erase by simply overlaying the background color as another draw element, in other words, drawing a line with the background color on top of everything else is similar to erasing. Everything is possible! All the best, Ron Teitelbaum 2016-08-22 18:45 GMT+02:00 Ron Teitelbaum : Hi Roger! That was a nice try! I modified methods: addCustomMenuItems: aCustomMenu hand: aHandMorph super addCustomMenuItems: aCustomMenu hand: aHandMorph. aCustomMenu add: 'clear' action: #clear. drawColor := Color red. //modification drawColor := Color yellow. //modification drawColor := Color green. //modification drawColor := Color blue. //modification [Ron Teitelbaum] What this does is create a menu with one item clear and then it sets the drawColor to red yellow green and then blue. Since blue is the last color you end up with blue. Try creating drawRed, drawYellow, drawGreen, and drawBlue methods For example drawRed drawColor := Color red. Now add to your menu properly. aCustomMenu add: 'clear' action: #clear. aCustomMenu add: 'red' action: #drawRed. Where add is what you see in your menu and action is what happens when you select the menu item. (it calls: self drawRed) Do that with all your colors and you should be all set! You can also add menu items to adjust the size of the brush. Maybe make small brush, medium brush and large brush menu items? Works the same way as changing color. You need a brushSize instance variable. And initialize brushSize := 2. All the best, Ron Teitelbaum initialize super initialize. self extent: 500@700. drawColor := Color black. mouseDown: evt brush := Pen newOnForm: form. brush roundNib: 2. brush color: drawColor. //modification lastMouse := evt cursorPoint - bounds origin. brush drawFrom: lastMouse to: lastMouse. self invalidRect: ((lastMouse - brush sourceForm extent corner: lastMouse + brush sourceForm extent) translateBy: bounds origin). The initial color is black. When i click the command "change color" on the menu and i chose for example the green color, the result is the blue color. I don't understand why ? And after the first choice, i must restart the program with the Workspace for change another color. So i can't make several choices at the same time. How can I solve these problems ? and to change size of the brush ? Thank you in advance. 2016-08-21 3:14 GMT+02:00 Ron Teitelbaum : From: roger mpouma Sent: Saturday, August 20, 2016 2:42 PM How can i make this please ? I thought to add "color" and "size" commands as "clear" command in the custom menu code. After that, add "color" and "size" methods... [Ron Teitelbaum] What I was thinking is making buttons on the panel. Color buttons with a highlight around it so you can see what is selected. You could instead add something like Red or Blue to the menu. On your class add some instance variable called drawColor or something like that. When the menu item Red is called you would do drawColor := Color red. Then in mouseDown: brush color: drawColor. Initialize your color to something like black Initialize drawColor := Color black. So that the user is not required to use the menu to get the default color (black). Hope that helps, Ron 2016-08-20 20:26 GMT+02:00 Ron Teitelbaum : Have you considered having a menu bar with colors and line sizes. The users can select the color and line size which will change your program to use those settings. All the best, Ron Teitelbaum From: beginners-bounces@lists.squeakfoundation.org [mailto:beginners-bounces@lists.squeakfoundation.org] On Behalf Of roger mpouma Sent: Saturday, August 20, 2016 1:51 PM To: A friendly place to get answers to even the most basic questions about Squeak. Subject: Re: [Newbies] Project on squeak language I have already implemented the canvas on which we draw, the possibility of drawing with the brush but with only a single color and a single size, a capacity to erase what we have already drawn with the "Clear" command on the custom menu code. So, i'd like to add the possibility of changing the color and the size of the brush presenting the choices of color and brush size. The differents methods are: "Methods" extent: aPoint | newForm | super extent: aPoint. newForm := Form extent: self extent depth: 16. newForm fillColor: Color veryLightGray. form ifNotNil: [form displayOn: newForm]. form := newForm. initialize super initialize. self extent: 500@350. drawOn: aCanvas aCanvas image: form at: bounds origin. handlesMouseDown: evt ^ true mouseDown: evt brush := Pen newOnForm: form. brush roundNib: 3. brush color: Color red. lastMouse := evt cursorPoint - bounds origin. brush drawFrom: lastMouse to: lastMouse. self invalidRect: ((lastMouse - brush sourceForm extent corner: lastMouse + brush sourceForm extent) translateBy: bounds origin). mouseMove: evt | p | p := evt cursorPoint - bounds origin. p = lastMouse ifTrue: [^ self]. brush drawFrom: lastMouse to: p. self invalidRect: (( ((lastMouse min: p) - brush sourceForm extent) corner: ((lastMouse max: p) + brush sourceForm extent)) translateBy: bounds origin). lastMouse := p. addCustomMenuItems: aCustomMenu hand: aHandMorph super addCustomMenuItems: aCustomMenu hand: aHandMorph. aCustomMenu add: 'clear' action: #clear. clear form fillColor: Color veryLightGray. self changed. "Class PaintMorph" Morph subclass: #PaintMorph instanceVariableNames: 'form brush lastMouse' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Fun' "Workspace" PaintMorph new openInWorld. Thank you in advance. 2016-08-20 18:47 GMT+02:00 Bert Freudenberg : Sure. Just ask some specific questions - e.g. what you tried, what worked, what didn't etc. - Bert - On Sat, Aug 20, 2016 at 10:59 AM, roger mpouma wrote: Hello, I need help for a drawing project on Squeak. I'd like implement a canvas on which we draw with the possibility of drawing with brush changing the color and size of the brush. Is it possibile to have help ? Thank you in advance. _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160822/de17e070/attachment-0001.htm From marcel.taeumel at hpi.de Tue Aug 23 14:30:24 2016 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Tue Aug 23 14:31:40 2016 Subject: [Newbies] [ANN] Squeak 5.1 released; www.squeak.org; Trunk open again Message-ID: <29d9ad39-70ad-40b5-bfbb-30e0d5c83bb1@getmailbird.com> We are happy to announce the release of Squeak 5.1! Visit the Website [1], read the release notes in the image or outside [2], and try it out for yourself [3][4]! Thank you all for the contributions! :-) Happy birthday Squeak! It has been?(almost)?20 years!!! [5] Best, Marcel [1] http://www.squeak.org/ [2] https://github.com/squeak-smalltalk/squeak-app/blob/master/release-notes/5.1 [3] http://files.squeak.org/5.1/ [4] http://try.squeak.org/ (to be updated soonish) [5] http://files.squeak.org/docs/OOPSLA.Squeak.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160823/409d5f4b/attachment.htm From rmpouma at gmail.com Tue Aug 23 14:35:33 2016 From: rmpouma at gmail.com (roger mpouma) Date: Tue Aug 23 14:35:39 2016 Subject: [Newbies] Project on squeak language In-Reply-To: <026c01d1fca6$994ff5a0$cbefe0e0$@usmedrec.com> References: <018c01d1fb10$55751500$005f3f00$@usmedrec.com> <023801d1fb49$6e7b6520$4b722f60$@usmedrec.com> <01aa01d1fc94$87fb5590$97f200b0$@usmedrec.com> <026c01d1fca6$994ff5a0$cbefe0e0$@usmedrec.com> Message-ID: Thank you Ron, thank you very much for your help. 2016-08-22 20:54 GMT+02:00 Ron Teitelbaum : > > > > > *From:* roger mpouma > *Sent:* Monday, August 22, 2016 2:42 PM > > > > Hi Ron, > > I solved my problem, thank you for your help. > > I got one more question, how can i add the possibility to erase parts of > what i have already drawn as item "clear" but just parts of the drawing ? > > > > *[Ron Teitelbaum] Of course everything is possible. Your clear is doing > just that, it?s filling in the canvas area with your background color. > There are number of ways to accomplish this. A number of programs hold > onto the results of each drawing collection (clicking and moving until you > let go of the mouse) as a single element of the drawing. Then you can ctrl > ?z to remove them in order. To do something like that you need an instance > of a class, something like Drawing, which holds a collection of brush > strokes, colors and line widths, and a collection on your canvas to apply > the drawings in order to your canvas. An instance variable called drawings > would work. You could also calculate the intersection of a line and the > position of the mouse pointer in the drawing to find each draw element and > remove them when clicked. You could also erase by simply overlaying the > background color as another draw element, in other words, drawing a line > with the background color on top of everything else is similar to erasing. * > > > > *Everything is possible!* > > > > All the best, > > > > Ron Teitelbaum > > > > 2016-08-22 18:45 GMT+02:00 Ron Teitelbaum : > > Hi Roger! > > > > That was a nice try! > > > > I modified methods: > > addCustomMenuItems: aCustomMenu hand: aHandMorph > super addCustomMenuItems: aCustomMenu hand: aHandMorph. > aCustomMenu add: 'clear' action: #clear. > drawColor := Color red. //modification > drawColor := Color yellow. //modification > drawColor := Color green. //modification > drawColor := Color blue. //modification > > *[Ron Teitelbaum]* > > *What this does is create a menu with one item clear and then it sets the > drawColor to red yellow green and then blue. Since blue is the last color > you end up with blue.* > > *Try creating drawRed, drawYellow, drawGreen, and drawBlue methods* > > *For example* > > *drawRed* > > * drawColor := Color red.* > > *Now add to your menu properly.* > > aCustomMenu add: 'clear' action: #clear. > aCustomMenu add: 'red' action: #drawRed. > > *Where add is what you see in your menu and action is what happens when > you select the menu item. (it calls: self drawRed)* > > *Do that with all your colors and you should be all set!* > > *You can also add menu items to adjust the size of the brush. Maybe make > small brush, medium brush and large brush menu items? Works the same way > as changing color. You need a brushSize instance variable. And initialize > brushSize := 2.* > > *All the best,* > > > *Ron Teitelbaum* > initialize > super initialize. > self extent: 500@700. > drawColor := Color black. > > mouseDown: evt > brush := Pen newOnForm: form. > brush roundNib: 2. > brush color: drawColor. > //modification > lastMouse := evt cursorPoint - bounds origin. > brush drawFrom: lastMouse to: lastMouse. > self invalidRect: > ((lastMouse - brush sourceForm extent corner: > lastMouse + brush sourceForm extent) > translateBy: bounds origin). > > The initial color is black. > > When i click the command "change color" on the menu and i chose for > example the green color, the result is the blue color. I don't understand > why ? > > And after the first choice, i must restart the program with the Workspace > for change another color. So i can't make several choices at the same time. > > How can I solve these problems ? and to change size of the brush ? > > Thank you in advance. > > > > 2016-08-21 3:14 GMT+02:00 Ron Teitelbaum : > > > > > > *From:* roger mpouma > *Sent:* Saturday, August 20, 2016 2:42 PM > > > > How can i make this please ? > > I thought to add "color" and "size" commands as "clear" command in the > custom menu code. After that, add "color" and "size" methods... > > *[Ron Teitelbaum] * > > *What I was thinking is making buttons on the panel. Color buttons with a > highlight around it so you can see what is selected. You could instead add > something like Red or Blue to the menu.* > > > > *On your class add some instance variable called drawColor or something > like that.* > > > > *When the menu item Red is called you would do * > > > > *drawColor := Color red.* > > > > *Then in mouseDown:* > > > > brush color: drawColor. > > > > Initialize your color to something like black > > > > Initialize > > > > drawColor := Color black. > > > > So that the user is not required to use the menu to get the default color > (black). > > > > Hope that helps, > > > Ron > > > > 2016-08-20 20:26 GMT+02:00 Ron Teitelbaum : > > Have you considered having a menu bar with colors and line sizes. The > users can select the color and line size which will change your program to > use those settings. > > > > All the best, > > > > Ron Teitelbaum > > > > *From:* beginners-bounces@lists.squeakfoundation.org [mailto: > beginners-bounces@lists.squeakfoundation.org] *On Behalf Of *roger mpouma > *Sent:* Saturday, August 20, 2016 1:51 PM > *To:* A friendly place to get answers to even the most basic questions > about Squeak. > *Subject:* Re: [Newbies] Project on squeak language > > > > I have already implemented the canvas on which we draw, the possibility of > drawing with the brush but with only a single color and a single size, a > capacity to erase what we have already drawn with the "Clear" command on > the custom menu code. > So, i'd like to add the possibility of changing the color and the size of > the brush presenting the choices of color and brush size. > > The differents methods are: > > "Methods" > > extent: aPoint > | newForm | > super extent: aPoint. > newForm := Form extent: self extent depth: 16. > newForm fillColor: Color veryLightGray. > form ifNotNil: [form displayOn: newForm]. > form := newForm. > > > initialize > super initialize. > self extent: 500@350. > > drawOn: aCanvas > aCanvas image: form at: bounds origin. > > handlesMouseDown: evt > ^ true > > mouseDown: evt > brush := Pen newOnForm: form. > brush roundNib: 3. > brush color: Color red. > lastMouse := evt cursorPoint - bounds origin. > brush drawFrom: lastMouse to: lastMouse. > self invalidRect: > ((lastMouse - brush sourceForm extent corner: > lastMouse + brush sourceForm extent) > translateBy: bounds origin). > > > mouseMove: evt > | p | > p := evt cursorPoint - bounds origin. > p = lastMouse ifTrue: [^ self]. > brush drawFrom: lastMouse to: p. > self invalidRect: (( > ((lastMouse min: p) - brush sourceForm extent) corner: > ((lastMouse max: p) + brush sourceForm extent)) > translateBy: bounds origin). > lastMouse := p. > > > addCustomMenuItems: aCustomMenu hand: aHandMorph > super addCustomMenuItems: aCustomMenu hand: aHandMorph. > aCustomMenu add: 'clear' action: #clear. > > > clear > form fillColor: Color veryLightGray. > self changed. > > "Class PaintMorph" > > Morph subclass: #PaintMorph > instanceVariableNames: 'form brush lastMouse' > classVariableNames: '' > poolDictionaries: '' > category: 'Morphic-Fun' > > "Workspace" > PaintMorph new openInWorld. > > > > Thank you in advance. > > > > 2016-08-20 18:47 GMT+02:00 Bert Freudenberg : > > Sure. Just ask some specific questions - e.g. what you tried, what worked, > what didn't etc. > > > > - Bert - > > > > On Sat, Aug 20, 2016 at 10:59 AM, roger mpouma wrote: > > Hello, > I need help for a drawing project on Squeak. I'd like implement a canvas > on which we draw with the possibility of drawing with brush changing the > color and size of the brush. Is it possibile to have help ? > > Thank you in advance. > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160823/a02762fd/attachment-0001.htm From asqueaker at gmail.com Tue Aug 23 17:48:54 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Aug 23 17:49:39 2016 Subject: [Newbies] Re: [Vm-dev] [ANN] Squeak 5.1 released; www.squeak.org; Trunk open again In-Reply-To: <29d9ad39-70ad-40b5-bfbb-30e0d5c83bb1@getmailbird.com> References: <29d9ad39-70ad-40b5-bfbb-30e0d5c83bb1@getmailbird.com> Message-ID: Someone please get this man a beer! On Tue, Aug 23, 2016 at 9:30 AM, Marcel Taeumel wrote: > > We are happy to announce the release of Squeak 5.1! > > Visit the Website [1], read the release notes in the image or outside [2], and try it out for yourself [3][4]! > > Thank you all for the contributions! :-) > > Happy birthday Squeak! It has been (almost) 20 years!!! [5] > > Best, > Marcel > > [1] http://www.squeak.org/ > [2] https://github.com/squeak-smalltalk/squeak-app/blob/master/release-notes/5.1 > [3] http://files.squeak.org/5.1/ > [4] http://try.squeak.org/ (to be updated soonish) > [5] http://files.squeak.org/docs/OOPSLA.Squeak.html > From joseph.alotta at gmail.com Tue Aug 23 19:38:42 2016 From: joseph.alotta at gmail.com (Joseph Alotta) Date: Tue Aug 23 19:40:08 2016 Subject: [Newbies] Re: [Vm-dev] [ANN] Squeak 5.1 released; www.squeak.org; Trunk open again In-Reply-To: References: <29d9ad39-70ad-40b5-bfbb-30e0d5c83bb1@getmailbird.com> Message-ID: > On Aug 23, 2016, at 12:48 PM, Chris Muller-3 [via Smalltalk] wrote: > > Someone please get this man a beer! > > On Tue, Aug 23, 2016 at 9:30 AM, Marcel Taeumel <[hidden email]> wrote: > > > > > We are happy to announce the release of Squeak 5.1! > > > > Visit the Website [1], read the release notes in the image or outside [2], and try it out for yourself [3][4]! > > > > Thank you all for the contributions! :-) > > > > Happy birthday Squeak! It has been (almost) 20 years!!! [5] > > > > Best, > > Marcel > > > > [1] http://www.squeak.org/ > > [2] https://github.com/squeak-smalltalk/squeak-app/blob/master/release-notes/5.1 > > [3] http://files.squeak.org/5.1/ > > [4] http://try.squeak.org/ (to be updated soonish) > > [5] http://files.squeak.org/docs/OOPSLA.Squeak.html > > > _______________________________________________ > Beginners mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/beginners > > > If you reply to this email, your message will be added to the discussion below: > http://forum.world.st/ANN-Squeak-5-1-released-www-squeak-org-Trunk-open-again-tp4912329p4912361.html > To start a new topic under Squeak - Beginners, email ml-node+s1294792n107673h12@n4.nabble.com > To unsubscribe from Squeak - Beginners, click here. > NAML Screen Shot 2016-08-23 at 2.39.14 PM.png (474K) -- View this message in context: http://forum.world.st/ANN-Squeak-5-1-released-www-squeak-org-Trunk-open-again-tp4912329p4912376.html Sent from the Squeak - Beginners mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160823/2012c05a/attachment.htm From Marcel.Taeumel at hpi.de Wed Aug 24 05:08:37 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Aug 24 05:10:06 2016 Subject: [Newbies] Re: [Vm-dev] [ANN] Squeak 5.1 released; www.squeak.org; Trunk open again In-Reply-To: References: <29d9ad39-70ad-40b5-bfbb-30e0d5c83bb1@getmailbird.com> Message-ID: <1472015317757-4912404.post@n4.nabble.com> Joseph Alotta wrote >> On Aug 23, 2016, at 12:48 PM, Chris Muller-3 [via Smalltalk] < > ml-node+s1294792n4912361h40@.nabble > > wrote: >> >> Someone please get this man a beer! >> >> On Tue, Aug 23, 2016 at 9:30 AM, Marcel Taeumel <[hidden email]> wrote: >> >> > >> > We are happy to announce the release of Squeak 5.1! >> > >> > Visit the Website [1], read the release notes in the image or outside >> [2], and try it out for yourself [3][4]! >> > >> > Thank you all for the contributions! :-) >> > >> > Happy birthday Squeak! It has been (almost) 20 years!!! [5] >> > >> > Best, >> > Marcel >> > >> > [1] http://www.squeak.org/ >> > [2] >> https://github.com/squeak-smalltalk/squeak-app/blob/master/release-notes/5.1 >> > [3] http://files.squeak.org/5.1/ >> > [4] http://try.squeak.org/ (to be updated soonish) >> > [5] http://files.squeak.org/docs/OOPSLA.Squeak.html >> > >> _______________________________________________ >> Beginners mailing list >> [hidden email] >> http://lists.squeakfoundation.org/mailman/listinfo/beginners >> >> >> If you reply to this email, your message will be added to the discussion >> below: >> http://forum.world.st/ANN-Squeak-5-1-released-www-squeak-org-Trunk-open-again-tp4912329p4912361.html >> To start a new topic under Squeak - Beginners, email > ml-node+s1294792n107673h12@.nabble > >> To unsubscribe from Squeak - Beginners, click here. >> NAML > > > > Screen Shot 2016-08-23 at 2.39.14 PM.png (474K) > <http://forum.world.st/attachment/4912376/0/Screen%20Shot%202016-08-23%20at%202.39.14%20PM.png> Hehe, thanks! :) -- View this message in context: http://forum.world.st/ANN-Squeak-5-1-released-www-squeak-org-Trunk-open-again-tp4912329p4912404.html Sent from the Squeak - Beginners mailing list archive at Nabble.com. From craig at blackpagedigital.com Wed Aug 24 09:09:31 2016 From: craig at blackpagedigital.com (Craig Latta) Date: Wed Aug 24 09:09:46 2016 Subject: [Newbies] re: Squeak 5.1 released; www.squeak.org; Trunk open again In-Reply-To: References: <29d9ad39-70ad-40b5-bfbb-30e0d5c83bb1@getmailbird.com> Message-ID: > Someone please get this man a beer! We did! :) -C -- Craig Latta Black Page Digital Amsterdam | San Francisco craig@blackpagedigital.com +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From offray at riseup.net Wed Aug 24 10:10:43 2016 From: offray at riseup.net (=?UTF-8?Q?Offray_Vladimir_Luna_C=c3=a1rdenas?=) Date: Wed Aug 24 10:10:51 2016 Subject: [Newbies] [ANN] Squeak 5.1 released; www.squeak.org; Trunk open again In-Reply-To: <29d9ad39-70ad-40b5-bfbb-30e0d5c83bb1@getmailbird.com> References: <29d9ad39-70ad-40b5-bfbb-30e0d5c83bb1@getmailbird.com> Message-ID: <5b3f8b5b-31a1-483b-bf86-41538db95548@riseup.net> Thanks a lot! Seeing Kedama, where I did my master thesis simulation, working on the release announcement yesterday at ESUG 2016 bring me happy memories and a sense of continuity and change at the same time. Congrats, Offray On 23/08/16 16:30, Marcel Taeumel wrote: > *We are happy to announce the release of Squeak 5.1!* > > Visit the Website [1], read the release notes in the image or outside > [2], and try it out for yourself [3][4]! > > Thank you all for the contributions! :-) > > Happy birthday Squeak! It has been (almost) 20 years!!! [5] > > Best, > Marcel > > [1] http://www.squeak.org/ > [2] > https://github.com/squeak-smalltalk/squeak-app/blob/master/release-notes/5.1 > [3] http://files.squeak.org/5.1/ > [4] http://try.squeak.org/ (to be updated soonish) > [5] http://files.squeak.org/docs/OOPSLA.Squeak.html > > > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160824/29ad6cb9/attachment.htm From joseph.alotta at gmail.com Wed Aug 24 14:16:05 2016 From: joseph.alotta at gmail.com (Joseph Alotta) Date: Wed Aug 24 14:17:36 2016 Subject: [Newbies] Re: [ANN] Squeak 5.1 released; www.squeak.org; Trunk open again In-Reply-To: <5b3f8b5b-31a1-483b-bf86-41538db95548@riseup.net> References: <29d9ad39-70ad-40b5-bfbb-30e0d5c83bb1@getmailbird.com> <5b3f8b5b-31a1-483b-bf86-41538db95548@riseup.net> Message-ID: <9AC1D83A-E3A2-4347-867F-D30A5FAFFB79@gmail.com> Did you notice the beer? I gave you two hearts :-) PS. It is the same beer Dr. Who drinks! -- View this message in context: http://forum.world.st/ANN-Squeak-5-1-released-www-squeak-org-Trunk-open-again-tp4912329p4912503.html Sent from the Squeak - Beginners mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160824/e1475d37/attachment.htm From hannes.hirzel at gmail.com Wed Aug 24 17:19:17 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Wed Aug 24 17:19:19 2016 Subject: [Newbies] [ANN] Squeak 5.1 released; www.squeak.org; Trunk open again In-Reply-To: <5b3f8b5b-31a1-483b-bf86-41538db95548@riseup.net> References: <29d9ad39-70ad-40b5-bfbb-30e0d5c83bb1@getmailbird.com> <5b3f8b5b-31a1-483b-bf86-41538db95548@riseup.net> Message-ID: On 8/24/16, Offray Vladimir Luna C?rdenas wrote: > Thanks a lot! Seeing Kedama, Hello Offray The object tool offers a 'Kedama World' in the category 'Kedama'. But no other tools / menus to start building simulations. It seems that the more code needs to be loaded .... Do you have any hints how to get started? --Hannes where I did my master thesis simulation, > working on the release announcement yesterday at ESUG 2016 bring me > happy memories and a sense of continuity and change at the same time. > > Congrats, > > Offray > > > On 23/08/16 16:30, Marcel Taeumel wrote: >> *We are happy to announce the release of Squeak 5.1!* >> >> Visit the Website [1], read the release notes in the image or outside >> [2], and try it out for yourself [3][4]! >> >> Thank you all for the contributions! :-) >> >> Happy birthday Squeak! It has been (almost) 20 years!!! [5] >> >> Best, >> Marcel >> >> [1] http://www.squeak.org/ >> [2] >> https://github.com/squeak-smalltalk/squeak-app/blob/master/release-notes/5.1 >> [3] http://files.squeak.org/5.1/ >> [4] http://try.squeak.org/ (to be updated soonish) >> [5] http://files.squeak.org/docs/OOPSLA.Squeak.html >> >> >> _______________________________________________ >> Beginners mailing list >> Beginners@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/mailman/listinfo/beginners > > From offray at riseup.net Wed Aug 24 21:47:20 2016 From: offray at riseup.net (=?UTF-8?Q?Offray_Vladimir_Luna_C=c3=a1rdenas?=) Date: Wed Aug 24 21:47:29 2016 Subject: [Newbies] [ANN] Squeak 5.1 released; www.squeak.org; Trunk open again In-Reply-To: References: <29d9ad39-70ad-40b5-bfbb-30e0d5c83bb1@getmailbird.com> <5b3f8b5b-31a1-483b-bf86-41538db95548@riseup.net> Message-ID: In fact I don't. I do only Pharo these days, but is nice to see the community diverse and healthy. Cheers, Offray On 24/08/16 19:19, H. Hirzel wrote: > On 8/24/16, Offray Vladimir Luna C?rdenas wrote: >> Thanks a lot! Seeing Kedama, > Hello Offray > > The object tool offers a 'Kedama World' in the category 'Kedama'. > > But no other tools / menus to start building simulations. > > It seems that the more code needs to be loaded .... > > Do you have any hints how to get started? > > --Hannes > > > where I did my master thesis simulation, >> working on the release announcement yesterday at ESUG 2016 bring me >> happy memories and a sense of continuity and change at the same time. >> >> Congrats, >> >> Offray >> >> >> On 23/08/16 16:30, Marcel Taeumel wrote: >>> *We are happy to announce the release of Squeak 5.1!* >>> >>> Visit the Website [1], read the release notes in the image or outside >>> [2], and try it out for yourself [3][4]! >>> >>> Thank you all for the contributions! :-) >>> >>> Happy birthday Squeak! It has been (almost) 20 years!!! [5] >>> >>> Best, >>> Marcel >>> >>> [1] http://www.squeak.org/ >>> [2] >>> https://github.com/squeak-smalltalk/squeak-app/blob/master/release-notes/5.1 >>> [3] http://files.squeak.org/5.1/ >>> [4] http://try.squeak.org/ (to be updated soonish) >>> [5] http://files.squeak.org/docs/OOPSLA.Squeak.html >>> >>> >>> _______________________________________________ >>> Beginners mailing list >>> Beginners@lists.squeakfoundation.org >>> http://lists.squeakfoundation.org/mailman/listinfo/beginners >> > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > From bert at freudenbergs.de Thu Aug 25 10:20:52 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Aug 25 10:20:54 2016 Subject: [Newbies] [ANN] Squeak 5.1 released; www.squeak.org; Trunk open again In-Reply-To: References: <29d9ad39-70ad-40b5-bfbb-30e0d5c83bb1@getmailbird.com> <5b3f8b5b-31a1-483b-bf86-41538db95548@riseup.net> Message-ID: On Wed, Aug 24, 2016 at 7:19 PM, H. Hirzel wrote: > On 8/24/16, Offray Vladimir Luna C?rdenas wrote: > > Thanks a lot! Seeing Kedama, > > Hello Offray > > The object tool offers a 'Kedama World' in the category 'Kedama'. > > But no other tools / menus to start building simulations. > > It seems that the more code needs to be loaded .... > > Do you have any hints how to get started? > It doesn't work right in 5.1 yet. But Tim Felgentreff just (at ESUG in Prague) demonstrated a 5.1-based Etoys image that has pretty much all the Etoys code of the Squeakland image, and Kedama works in there. Running on the Spur VM it's even fast enough without the Kedama plugin (which was needed in the interpreter VM). We intend to release this later this year, but for now I'd recommend the Squeakland version to play with Kedama. - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160825/a3d84d7d/attachment.htm From dennis.groves at gmail.com Fri Aug 26 05:33:53 2016 From: dennis.groves at gmail.com (Dennis Groves) Date: Fri Aug 26 05:34:22 2016 Subject: [Newbies] New Introductory Tutorial In-Reply-To: References: Message-ID: I would like to do network traffic analysis with Squeak, however All I can find are socket and http objects is there an object for looking at all the traffic on a given interface? Cheers, Dennis -- Dennis Groves , MSc dennis.groves@gmail.com On Fri, Nov 13, 2015 at 10:02 PM, EuanM wrote: > I've created Yet Another Smalltalk First > Steps tutorial. > > This is intended as one of a series. > > It is designed to be cross-platform across > > Squeak 5 > Pharo 4 > Seaside 3.1 > Cuis > Dolphin 6 > > If you have experience running any of these systems on Windows, Linux > or MacOS, please check to see if I have the instructions correct for > your chosen pairing of Smalltalk and OS platform. > > (As you'll see when you look, I do not have detailed instructions for > aspects of MacOS). > > The document is at: > http://smalltalkinsmallsteps.blogspot.co.uk/2015/11/get- > smalltalk-up-and-running.html > > (It's intended to move to a different blog after this review process). > > I feel the need to do this as cross-Smalltalks tutorial because of > findings and 4 charts I've placed at: > http://smalltalkinsmallsteps.blogspot.co.uk/2015/11/ > mindshare-of-smalltalk-in-development.html > > Essentially, Smalltalk mindshare and use is incredibly tiny, compared > to other languages in the same space. (We all know this, but seeing > it represented graphically has a more visceral effect, IMO) > > Aggregating interest in all the Smalltalks still does not bring more > than a tiny proportion of the interest in, and use of, Ruby. > > In turn, Ruby is (quite understandably) small in comparison to JavaScript. > > Comparing interest in any specific Smalltalk is, predictably, smaller > than the aggregate interest in Smalltalk. > > Our community seems determined to split itself into smaller and > smaller sub-communities. I think we do ourselves a disservice this > way. > > My initial contribution will be to try to provide some explicitly > pan-Smalltalk beginners' tutorials, like this one. > > Cheers, and happy Smalltalking, > EuanM > _______________________________________________ > Beginners mailing list > Beginners@lists.squeakfoundation.org > http://lists.squeakfoundation.org/mailman/listinfo/beginners > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160825/3a2eea97/attachment.htm From hannes.hirzel at gmail.com Fri Aug 26 13:32:32 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Fri Aug 26 13:32:35 2016 Subject: Kedama (Re: [Newbies] [ANN] Squeak 5.1 released; www.squeak.org; Trunk open again) Message-ID: On 8/25/16, Bert Freudenberg wrote: > On Wed, Aug 24, 2016 at 7:19 PM, H. Hirzel wrote: > >> On 8/24/16, Offray Vladimir Luna C?rdenas wrote: >> > Thanks a lot! Seeing Kedama, >> >> Hello Offray >> >> The object tool offers a 'Kedama World' in the category 'Kedama'. >> >> But no other tools / menus to start building simulations. >> >> It seems that the more code needs to be loaded .... >> >> Do you have any hints how to get started? >> > > It doesn't work right in 5.1 yet. But Tim Felgentreff just (at ESUG in > Prague) demonstrated a 5.1-based Etoys image that has pretty much all the > Etoys code of the Squeakland image, and Kedama works in there. Running on > the Spur VM it's even fast enough without the Kedama plugin (which was > needed in the interpreter VM). > > We intend to release this later this year, but for now I'd recommend the > Squeakland version to play with Kedama. > > - Bert - http://www.squeakland.org/download/ 500 Servlet Exception java.lang.NullPointerException at _jsp._download._index__jsp._jspService(/download/index.jsp:39) :-( --Hannes From bert at freudenbergs.de Mon Aug 29 14:46:23 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Mon Aug 29 14:46:26 2016 Subject: Kedama (Re: [Newbies] [ANN] Squeak 5.1 released; www.squeak.org; Trunk open again) In-Reply-To: References: Message-ID: On Fri, Aug 26, 2016 at 3:32 PM, H. Hirzel wrote: > On 8/25/16, Bert Freudenberg wrote: > > On Wed, Aug 24, 2016 at 7:19 PM, H. Hirzel > wrote: > > > >> On 8/24/16, Offray Vladimir Luna C?rdenas wrote: > >> > Thanks a lot! Seeing Kedama, > >> > >> Hello Offray > >> > >> The object tool offers a 'Kedama World' in the category 'Kedama'. > >> > >> But no other tools / menus to start building simulations. > >> > >> It seems that the more code needs to be loaded .... > >> > >> Do you have any hints how to get started? > >> > > > > It doesn't work right in 5.1 yet. But Tim Felgentreff just (at ESUG in > > Prague) demonstrated a 5.1-based Etoys image that has pretty much all the > > Etoys code of the Squeakland image, and Kedama works in there. Running on > > the Spur VM it's even fast enough without the Kedama plugin (which was > > needed in the interpreter VM). > > > > We intend to release this later this year, but for now I'd recommend the > > Squeakland version to play with Kedama. > > > > - Bert - > > > http://www.squeakland.org/download/ > > 500 Servlet Exception > > java.lang.NullPointerException > at _jsp._download._index__jsp._jspService(/download/index.jsp:39) > Fixed. - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160829/d8caef54/attachment-0001.htm From bert at freudenbergs.de Mon Aug 29 16:11:17 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Mon Aug 29 16:11:21 2016 Subject: [Newbies] Raw sockets (was: New Introductory Tutorial) Message-ID: To look at all traffic you need a "raw socket". Our SocketAddressInformation class only specifies socketTypeDGram and socketTypeStream, but not socketTypeRaw. However, there is a "primitiveSocketCreateRAW" in the VM's SocketPlugin. In the image, I only see references to "primitiveSocketCreate". So there might be a way to do it, but the code appears to not be in the image. - Bert - On Fri, Aug 26, 2016 at 7:33 AM, Dennis Groves wrote: > I would like to do network traffic analysis with Squeak, however All I can > find are socket and http objects is there an object for looking at all the > traffic on a given interface? > > Cheers, > > Dennis > > -- > Dennis Groves , MSc > dennis.groves@gmail.com > >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20160829/e16c92c7/attachment.htm