RE: [Newbies] Re: remove allInstances?
Woop woop, alarm alarm, error error. Sorry my alarm just went off. If Squeak quit after a become and you are seeing differences after not saving things, something is wrong. Be afraid, be very afraid. All the best, Ron Teitelbaum From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta Sent: Friday, September 23, 2016 10:15 AM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Re: remove allInstances? Nice. That causes Squeak 5.0 to unexpectedly quit. But when I start again, there are no instances of Books. Sincerely, Joseph > On Sep 23, 2016, at 7:59 AM, Louis LaBrunda [via Smalltalk] <[hidden email]> wrote: > > Books allInstances do: [:b | b become: nil]. _ View this message in context: Re: remove allInstances? <http://forum.world.st/remove-allInstances-tp4916693p4916813.html> Sent from the Squeak - Beginners mailing list archive <http://forum.world.st/Squeak-Beginners-f107673.html> at Nabble.com. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] generating animations
And Etoys! http://www.squeakland.org/ All the best, Ron Teitelbaum -Original Message- From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Ron Teitelbaum Sent: Wednesday, September 21, 2016 9:57 PM To: 'A friendly place to get answers to even the most basic questions about Squeak.' Subject: RE: [Newbies] generating animations Hi Ralph, Have you seen scratch? https://scratch.mit.edu/ All the best, Ron Teitelbaum -Original Message- From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Ralph Boland Sent: Wednesday, September 21, 2016 9:34 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] generating animations I am creating an educational computer game in Squeak in which I need to have animals (cats, dogs, birds, possibly other animals) move mostly horizontally across the screen. (Vertical motion is also possible but this would just be a bonus.) An animal will be in a square box (not sure if boxes will have a visible boundary) of sizes varying according to screen size. For a 1024x768 screen the boxes would be 13x13 pixels. For a 1920x1080 screen the boxes would be 24x24 pixesl. etc. The animations don't need to be great; adequate to entertain a child of age 4-10 yrs. I am not interested in animation per say and want to be able to write this code with a minimal amount of effort. Can anyone suggest where I can learn how to do this? If there is code that I can copy and modify that would be great. P.S. In the case of cats I am also in an animation of the cat turning itself right side up from upside down as it falls. P.P.S. Also neat would be of cats/dogs jumping up onto a ledge but this would just be a bonus. I am planning for the code to be open source and free. And pointers to code or documentation on how to write such code much appreciated. If any animators out there are interested in doing the animation part of my game please contact me. Thanks Ralph Boland rpbol...@gmail.com ___ 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
RE: [Newbies] generating animations
Hi Ralph, Have you seen scratch? https://scratch.mit.edu/ All the best, Ron Teitelbaum -Original Message- From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Ralph Boland Sent: Wednesday, September 21, 2016 9:34 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] generating animations I am creating an educational computer game in Squeak in which I need to have animals (cats, dogs, birds, possibly other animals) move mostly horizontally across the screen. (Vertical motion is also possible but this would just be a bonus.) An animal will be in a square box (not sure if boxes will have a visible boundary) of sizes varying according to screen size. For a 1024x768 screen the boxes would be 13x13 pixels. For a 1920x1080 screen the boxes would be 24x24 pixesl. etc. The animations don't need to be great; adequate to entertain a child of age 4-10 yrs. I am not interested in animation per say and want to be able to write this code with a minimal amount of effort. Can anyone suggest where I can learn how to do this? If there is code that I can copy and modify that would be great. P.S. In the case of cats I am also in an animation of the cat turning itself right side up from upside down as it falls. P.P.S. Also neat would be of cats/dogs jumping up onto a ledge but this would just be a bonus. I am planning for the code to be open source and free. And pointers to code or documentation on how to write such code much appreciated. If any animators out there are interested in doing the animation part of my game please contact me. Thanks Ralph Boland rpbol...@gmail.com ___ 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
RE: [Newbies] Expand TextMorph to encompass entire string?
From: John-Reed Maffeo Sent: Wednesday, September 7, 2016 10:37 PM Ron / Dan, Thanks. I have resolved the issue, by trying a lot of different, minor modifications to my methods; 59 versions of the most problematic one! [Ron Teitelbaum] Excellent I’m glad you figured it out! The answer to my question seems to be rooted in my choice of a #layoutPolicy: ( btw, what is the appropriate use of the # sign when talking about Smalltalk code? [Ron Teitelbaum] # followed by some string literal indicates a symbol which are great for things like parameters (#spaceFill) which are easy to compare. In the context of discussing code in an email I will sometimes use #foo to indicate a method name but I’m also likely to use Object >> foo or anObject >> foo because of how the debugger shows messages. Had you not asked the question “my choice of a #layoutPolicy: “ was perfectly understandable. ) and specifying the height of containing morph based on the height of the largest contained morph. Comment to anyone reading this in search of information, be patient and confident of finding a solution. Keep searching for answers and asking questions. begin createEditMorphFor: dataItem title: string "Use a standard definition of the data entry elements in the form. The changes I make here will propagate to all the items in the form and keep the calling method cleaner" | container contents title | container := BorderedMorph new. container color: Color tan. container layoutPolicy: ProportionalLayout new. container borderColor: Color tan. container hResizing: #spaceFill; hResizing: #spaceFill. title := StringMorph contents: string. title emphasis: 1. contents :=TextMorph new contents: dataItem. contents wrapFlag: true. container height: contents height. container addMorph: title fullFrame:((LayoutFrame fractions: (0.0 @ 0.0 corner: 0.3@ 1))). ^ container addMorph: contents fullFrame:((LayoutFrame fractions: (0.3 @ 0.0 corner: 1.0 @ 1.0))). --- end On Mon, Sep 5, 2016 at 5:58 PM, Dan Norton <dnor...@mindspring.com> wrote: Hi John, It might be better to separate the labels from the text morph. Each of your current panes would contain two morphs: a list morph with the labels and beside it a text pane with the text associated with the selected label. Text panes wrap text well, but list panes do not. - Dan Norton ___ 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
RE: [Newbies] Expand TextMorph to encompass entire string?
From: John-Reed Maffeo Sent: Monday, September 5, 2016 3:49 PM Total Morphic newbie here - I am trying to build a simple app with two panes (BorderedRectangles), each pane contains a column of rows. Each row contains a String for a label and a TextMorph to contain data that I want to display and possibly edit. Some of the TextMorphs contain long strings which cause the parent pane to expand out past the boundaries of the SystemWindow which contains it. I can't figure out how to limit the width of the row and let the height of the TextMorph vary based on the size of its contents. Any suggestions? [Ron Teitelbaum] Hi John-Reed, There are a number of method available to you on TextMorph. Browse TextMorph and press the instVars button. Select wrapFlag to see Accesses to that. In general the TextMorph has methods that should update the text to wrap the contents when you update or add text. You can also probably wrap the text manually (calling the wrap method yourself) as you add it depending on the width of the string you are adding. Also look for how to set the height of the row, and set that based on the results of the number of lines returned from the wrapping times the font height + some bounds between lines. It may do that already in some cases (not reading the code so not sure). In general you need some sort of compose method that looks for all the variables. The length of the string, the width of the column, the font size, and it should trim the strings based on width to rows (possibly in something like a paragraph), and set the height of the row to accommodate the string, and possibly add a scroll bar if it doesn’t fit. (remember to add the width of the scroll bar in your compose method). That method needs to be called whenever something changes, like when the component is resized or new text is added or removed. I would think that there is already a method that does all this so start with the wrap flag method and see how others are doing the same thing. Not sure if that is much help but you never know! All the best, Ron Teitelbaum jrm ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Project on squeak language
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 <r...@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 <r...@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 <r...@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 progr
RE: [Newbies] Re: Project on squeak language
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. han
RE: [Newbies] Project on squeak language
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 <r...@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 <r...@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-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@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:
RE: [Newbies] Project on squeak language
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 <r...@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-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@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 <b...@freudenbergs.de>: 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 <rmpo...@gmail.com> 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
RE: [Newbies] Project on squeak language
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-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@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 <b...@freudenbergs.de>: 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 <rmpo...@gmail.com> 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
RE: [Newbies] Re: printf not working on 5.0
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 <http://forum.world.st/printf-not-working-on-5-0-tp4910343p4910374.html> Sent from the Squeak - Beginners mailing list archive <http://forum.world.st/Squeak-Beginners-f107673.html> at Nabble.com. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] printf not working on 5.0
Hi Joe, I'm not aware of printf is it this: http://www.squeaksource.com/Printf/ Ron -Original Message- From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@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 ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] indexing into a collection
Hi Joe, If the orderedCollection contains your object DrivingDays then select should give you the object and not a copy. You don't need to add it back to the collection just update the object. Check your code for anything that might be making a copy. All the best, Ron Teitelbaum -Original Message- From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta Sent: Tuesday, July 26, 2016 3:04 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] indexing into a collection Greetings, I have a OrderedCollection of DrivingDays. an OrderedCollection(2016-01-02| quigley s| nil|18§ 2016-01-03| marianos fresh| nil|5§ 2016-01-04| fresh thyme| nil|5§ 2016-01-05| panda express| nil|3§ 2016-01-06| peets| nil|7§ 2016-01-07| starbucks| nil|3§) I want to select aDrivingDay object from the list by date, update it by adding mileage and places visited and put it back into the list. If I #select the OrderedCollection, I get a copy of the item, not the same one in the OrderedCollection. How do I select an item in the list for update? Sincerely, Joe. ___ 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
RE: [Newbies] Transcript
Hi Joe, It's probably not the transcript but everything else that is happening on your image. I'm not sure at what priority the transcript runs but if you have threads at higher priority running they have to finish first and then yield so that a lower priority thread can take over. That's when your transcript messages will show up. The transcript can also get you in trouble with threading, having multiple threads trying to write to the transcript. Make sure you are controlling access to the transcript if you are using it with multiple threads. All the best, Ron Teitelbaum -Original Message- From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta Sent: Monday, July 18, 2016 11:47 AM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Transcript Why is it slow to write on the Transcript. I thought with a powerful computer like this, it would be fast. Is it really doing that much or is there something in the code sleeping to a clock? Sincerely, Joe. ___ 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
RE: [Newbies] evaluating strings as blocks
Hi Joe, Have a look at Complier. Then try Complier evaluate: '1+1' All the best, Ron Teitelbaum From: Joseph Alotta Sent: Monday, July 11, 2016 12:14 PM Greetings, For debuting purposes, I want to build a string with calculations and then evaluate it. Something like: string := ‘2 + 2 - 5’; and then do: string asBlock value => -1 How can I get this to work? Sincerely, Joe. ___ 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
RE: [Newbies] Re: '($1,925.46)' asNumber
From: Joseph Alotta Sent: Friday, July 01, 2016 2:59 PM Thanks, Ron. I needed to preserve the negative, so I append a minus sign, then use your snippet. [Ron Teitelbaum] Excellent! Well done! , str := '($1,925.46)' . ('(*)' match: str ) ifTrue: [str := '-', str]. str := str reject: [:e | '($,)' includes: e]. num := str asNumber => -1925.46 Sincerely, Joe. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] '($1,925.46)' asNumber
Hi Joe, If you know the format is consistent and you don't really need much error handling then something like this would work ('($1,925.46)' reject: [:e | '($),' includes: e]) asNumber All the best, Ron Teitelbaum > -Original Message- > From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- > boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta > Sent: Friday, July 01, 2016 12:41 PM > To: beginners@lists.squeakfoundation.org > Subject: [Newbies] '($1,925.46)' asNumber > > Greetings, > > I want to convert a String with parenthesis and dollar sign to a Number or > Float. > > '($1,925.46)’ asNumber > > Is there something out of the box that does this, or do I have to write it > myself, character by character? > > Should I use a ReadStream? > > > Sincerely, > > Joe. > > > ___ > 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
RE: [Newbies] How does one create an array of points?
From: Michael Rice Sent: Monday, June 20, 2016 11:44 AM Weird, but what do I know. I see that this (a period separating each from the next) also works: {1@1. 2@2. 3@3} => {1@1 . 2@2 . 3@3} [Ron Teitelbaum] Ahh Yes. Even better. Thanks, all. On Mon, Jun 20, 2016 at 11:29 AM, Ron Teitelbaum <r...@usmedrec.com> wrote: Hi Michael, Good question! {Point x:1 y:1. Point x:2 y:2.} It’s not obvious! Notice the periods after the end of each element. All the best, Ron Teitelbaum From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Michael Rice Sent: Monday, June 20, 2016 11:21 AM To: SqueakList Subject: [Newbies] How does one create an array of points? I've been trying to create an array of points (in Squeak 5) but am failing badly. See below: first part => what I get when I exec "print it" on the first part. Guidance please. #(1@1 2@2) => #(1 #@ 1 2 #@ 2) #((Point x: 1 y: 1) (Point x: 2 y: 2)) => #(#(#Point #x: 1 #y: 1) #(#Point #x: 2 #y: 2)) #(12 'b' $c) => #(12 'b' $c) #(12 'b' $c 1@1) => #(12 'b' $c 1 #@ 1) #(12 'b' $c (1@1)) => #(12 'b' $c #(1 #@ 1)) #(12 'b' $c (Point x: 1 y: 1)) => #(12 'b' $c #(#Point #x: 1 #y: 1)) Point x:1 y: 1 => 1@1 (Point x:1 y: 1) => 1@1 #((Point x: 1 y: 1)) => #(#(#Point #x: 1 #y: 1)) #(1@1) => #(1 #@ 1) ___ 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
RE: [Newbies] How does one create an array of points?
Hi Michael, Good question! {Point x:1 y:1. Point x:2 y:2.} It’s not obvious! Notice the periods after the end of each element. All the best, Ron Teitelbaum From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Michael Rice Sent: Monday, June 20, 2016 11:21 AM To: SqueakList Subject: [Newbies] How does one create an array of points? I've been trying to create an array of points (in Squeak 5) but am failing badly. See below: first part => what I get when I exec "print it" on the first part. Guidance please. #(1@1 2@2) => #(1 #@ 1 2 #@ 2) #((Point x: 1 y: 1) (Point x: 2 y: 2)) => #(#(#Point #x: 1 #y: 1) #(#Point #x: 2 #y: 2)) #(12 'b' $c) => #(12 'b' $c) #(12 'b' $c 1@1) => #(12 'b' $c 1 #@ 1) #(12 'b' $c (1@1)) => #(12 'b' $c #(1 #@ 1)) #(12 'b' $c (Point x: 1 y: 1)) => #(12 'b' $c #(#Point #x: 1 #y: 1)) Point x:1 y: 1 => 1@1 (Point x:1 y: 1) => 1@1 #((Point x: 1 y: 1)) => #(#(#Point #x: 1 #y: 1)) #(1@1) => #(1 #@ 1) ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: CSV file help
Hi Joe, World menu> open… > Monticello Browser. Press the +Repository button and select HTTP. Paste in the Repository location MCHttpRepository location: 'http://www.squeaksource.com/CSV' user: '' password: ‘' accept and then select open. Select the latest version and press load. Monticello is a key component to managing an image. You should definitely read up on it. http://wiki.squeak.org/squeak/43 All the best, Ron Teitelbaum From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta Sent: Friday, June 17, 2016 4:54 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Re: CSV file help > On Jun 17, 2016, at 3:45 PM, Ron Teitelbaum [via Smalltalk] <[hidden email]> > wrote: > > Hi Joe, > > I haven't tried it but I would probably start with Avi's CSV Parser > http://www.squeaksource.com/CSV.html I tried to download it, but the .mcz file could not be read. I also tried pasting MCHttpRepository location: 'http://www.squeaksource.com/CSV' user: '' password: ‘' Into a workspace and evaluating it and it does nothing. Can you provide instructions, please? Sincerely, Joe. _ View this message in context: Re: CSV file help <http://forum.world.st/CSV-file-help-tp4901546p4901563.html> Sent from the Squeak - Beginners mailing list archive <http://forum.world.st/Squeak-Beginners-f107673.html> at Nabble.com. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] CSV file help
Hi Joe, I haven't tried it but I would probably start with Avi's CSV Parser http://www.squeaksource.com/CSV.html But in general you want to parse all of your lines, then for each line parse quoted values, then you can parse commas. All the best, Ron Teitelbaum > -Original Message- > From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- > boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta > Sent: Friday, June 17, 2016 4:42 PM > To: beginners@lists.squeakfoundation.org > Subject: [Newbies] CSV file help > > Greetings, > > I am needing conceptual help with parsing these troublesome CSV files. I > was breaking the lines using String >> findToken: > but I found lines where extra deliminators were added. Notice the three > following lines, the first and third line have extra commas from Oak Brook, IL > and the second line does not have the comma. > > > 02/04/2016 Thu,,"COSTCO WHSE #0388 0990388 - OAK BROOK, > IL",37.00 > 02/05/2016 Fri,,"ELECTRONIC PAYMENT RECEIVED-THANK",-443.52 > 02/06/2016 Sat,,"COSTCO WHSE #1088 0991088 - BOLINGBROOK, > IL",50.86 > > I think I need to parse with the double quotes in mind, but I don’t know > where to break it. > > Also, I was reading in the squeak pages that someone had already written > code for this, but I couldn’t find anything. > > http://wiki.squeak.org/squeak/3260 has two methods, CSVSubstrings and > SequenceableCollection-asCSVLine.st > > Does anyone know where these are now? > > Sincerely, > > Joe. > > > > ___ > 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
RE: [Newbies] Subclassing Dictionary Redux
> From: avalmez > Sent: Monday, June 13, 2016 6:42 PM > > Hello! > > Yep I'm having a problem similar to that previously posted about here but > the circumstances aren't quite the same and the suggested solutions don't > work anyway. The situation... > > I am subclassing Dictionary because i want to code to an "interface" rather > than the Dictionary class as I want the flexibility of changing the parent class > to some other collection if that seems appropriate. So, I did something like > this: > > Dictionary subclass: #MySubclass... [Ron Teitelbaum] I tried this and it worked fine. Dictionary subclass: #MyDictionary instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Collections-RonTest' (MyDictionary new) at: 'hello' put: 'world'; yourself Returns: a MyDictionary('hello'->'world' ) Not sure what problem you are having but it seems like some of the other details may be causing the trouble you are seeing. What functionality could you possibly be adding to Dictionary that MyClass with an instance variable #myDictionary can't solve? All the best, Ron Teitelbaum > > All other details of the subclass definition are left to "asis" in the subclass > template. However, when is send > Myclass>>at:put: the method fails with error message "only integers > Myclass>>should > be used as indices". > > The proposed solutions to other similar issues reported by others were: > > - overide MyClass class>>new as follows: ^super new initialize (actually, > override the parent's new) > - add to the body of the class > > I tried the former expecting no change (why should it work?) and my > expectation was realized. The latter doesn't specify where in the class body > to add but tried each of the following individually: > > - Revised: Dictionary subclass: #MySubclass >shape: #inherit... > - Added MySubclass>>shape > ^#inherit > -Added MySubclass class>>shape > ^#inherit. > > Doubtless someone out there knows what I should have done, but what I > did do failed in each case with the same error message. > > So, I'm stumped at this point. I know that adding "index: #object" to the > subclass definition works in another implementation of Smalltalk, but > Squeak doesn't seem to recognize index:. Still stumped. > > One last thing I found while hunting and pecking for a clue that I don't > understand. Squeak documentation states that Dictionary is a subclass of > Set, and in other implementations of ST that is indeed the case (I believe the > ST standard specifies the same). However, the system browser shows that > Dictionary is a subclass of HashedCollection...??? > > Enough verbiage. Any suggestions/fixes folks? All responses will be greatly > appreciated. > > Andres > > > > -- > View this message in context: http://forum.world.st/Subclassing-Dictionary- > Redux-tp4900765.html > 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 ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] set variables before initialize and write out files before exit
Hi Joe, I'm not sure in what context you mean. Why wouldn't you run this in the #initialize method? JoeAccountingParser class>>configure InPath := '/Users/jja/Desktop/accountingfiles/'. OutPath := '/Users/jja/Desktop/accountingfiles processed/'. JoeAccountingParser >>initialize self class configure. fileParser := FileParser new. fileParser inPath: self class InPath. fileParser outPath: self class OutPath. JoeAccountingParser class >> process: aFile ^(self new) process: aFile; yourself. JoeAccountingParser process: aFile fileParser readThis: aFile. fileParser process. fileParser write. This is a bit refactored and it uses the configure method I recommend to you earlier. This configure method could be anything including a method to read an external file for details. Solutions like a factory method pattern come to mind if you don't want to use #initialize. JoeAccountingParser class >> process: aFile from: inPath to: outPath There is also Behavior #startUp and #shutDown on the class side. See Smalltalk #addToStartUpList: #addToShutDownList: These fire when an image is started or shutdown. I think a bit more explanation of what problem you are having is needed. All the best, Ron Teitelbaum > From: Joseph Alotta > Sent: Friday, June 10, 2016 12:23 PM > > Greetings, > > My object needs to have some variables set before it can run the initialize > method and also it needs to have run an exit method. > > f := FileParser new. > f inPath: '/Users/jja/Desktop/accountingfiles/'. > f readThis: 'rei mastercard.csv'. > f process > f outPath: '/Users/jja/Desktop/accountingfiles processed/'. > f write. > > > Is there a better way to do this? > > Sincerely, > > Joe. > > > ___ > 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
RE: [Newbies] Re: run to here
From: Joseph Alotta Sent: Friday, June 03, 2016 10:54 AM Thank you. If I am in a loop, and I want to back around, it doesn’t seem to work. For example, my loop is at count := 1. I want to look at count := 3. So I go to the top of the loop and click “run to here” and count should be 2. [Ron Teitelbaum] Yeah I know it. There are two tricks you can use here. First is go to the bottom of the loop and do “run to here”. Then use Through a few times to get back to the top of the method. Anything selected above the execution point even in a loop is the past J. The other trick is to just change count J. It is Smalltalk so just select the count ivar in the debugger on the right bottom windows. Just select count and next to it change the value and accept it. It’s a hack but it works fine J. All the best, Ron Sincerely, Joe. > On Jun 3, 2016, at 9:03 AM, Ron Teitelbaum [via Smalltalk] <[hidden email]> > wrote: > > Hi Joe, > > "run to here" only goes forward not back. It works like continue with a > future break point (your cursor location). For it to work you need to place > the cursor somewhere ahead of where you are and then select "run to here". > It should in most cases take you to where you are trying to go. > > If you are trying to go backwards, and it is safe to do so, select the method > you want to debug in the stack. Then press the restart button. This will > restart the execution to the beginning of the method you have selected. You > can then use the "run to here" method to get to the right location in your > method to start debugging. > > All the best, > > Ron Teitelbaum > > > From: Joseph Alotta > > Sent: Friday, June 03, 2016 10:33 AM > > > > Greetings, > > > > I am using the debugger and wondering how to use the “run to here” > > function. > > > > I think you have to be in the top of a debugger pane to go down to the spot > > where the cursor is. > > > > But how does it work if you’re many layers into a program. > > > > I want to debug the message just before the one that bombs. > > > > Are there any usage tips? > > > > 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/run-to-here-tp4899055p4899057.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: run to here <http://forum.world.st/run-to-here-tp4899055p4899072.html> Sent from the Squeak - Beginners mailing list archive <http://forum.world.st/Squeak-Beginners-f107673.html> at Nabble.com. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] run to here
Hi Joe, "run to here" only goes forward not back. It works like continue with a future break point (your cursor location). For it to work you need to place the cursor somewhere ahead of where you are and then select "run to here". It should in most cases take you to where you are trying to go. If you are trying to go backwards, and it is safe to do so, select the method you want to debug in the stack. Then press the restart button. This will restart the execution to the beginning of the method you have selected. You can then use the "run to here" method to get to the right location in your method to start debugging. All the best, Ron Teitelbaum > From: Joseph Alotta > Sent: Friday, June 03, 2016 10:33 AM > > Greetings, > > I am using the debugger and wondering how to use the “run to here” > function. > > I think you have to be in the top of a debugger pane to go down to the spot > where the cursor is. > > But how does it work if you’re many layers into a program. > > I want to debug the message just before the one that bombs. > > Are there any usage tips? > > Sincerely, > > Joe. > > > > ___ > 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
RE: [Newbies] Re: FileDirectory
Hi Joe, There are a number of different types of resource names. One of them is a URI the other is URL (I=Indenter L=Locator). They are ways for locating and identifying resources so that computers can find and work with them. I would recommend googling a bit about URI and URL to understand better what they are used for. The section I pointed out was a method that gave you the protocol (scheme) for the URL. URL class >> urlClassForScheme: scheme (scheme isNil or: [scheme = 'http']) ifTrue: [^HttpUrl]. scheme = 'https' ifTrue: [^HttpUrl]. scheme = 'ftp' ifTrue: [^FtpUrl]. scheme = 'file' ifTrue: [^FileUrl]. scheme = 'mailto' ifTrue: [^MailtoUrl]. scheme = 'browser' ifTrue: [^BrowserUrl]. ^GenericUrl This is a class side method that returns the class you should use to work with the resource. You asked why there were url methods on FileDirectory. The answer is that a url instead of starting with http as in http://mydomain.com/somefilename can start with file:// as in file://somefilename and this is how we get to FileDirectory (well eventually through FileUrl), that's what I was trying to point out. All the best, Ron From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta Sent: Tuesday, May 31, 2016 2:16 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Re: FileDirectory > On May 26, 2016, at 5:50 PM, Ron Teitelbaum [via Smalltalk] <[hidden email]> wrote: > > Have a look at the Hierarchy for the class Url > > > > Notice the class method: #urlClassForScheme: > > > > That should give you a better understanding of why url methods are in FileDirectory. > > > > For browser like methods see HTTPClient. Sorry, Ron, all I got from this email after a day of trying to understand it, is that I do not have the background to grasp what you are trying to tell me. It seems you need to know all of this already before you know how to use it. I thought the purpose of encapsulation is that you do not need to know the inner workings of an object to use it. Is there something more basic about urls and httpclients that I can start with? Sincerely, Joe. _ View this message in context: Re: FileDirectory <http://forum.world.st/FileDirectory-tp4897377p4898427.html> Sent from the Squeak - Beginners mailing list archive <http://forum.world.st/Squeak-Beginners-f107673.html> at Nabble.com. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: FileDirectory
Have a look at the Hierarchy for the class Url Notice the class method: #urlClassForScheme: That should give you a better understanding of why url methods are in FileDirectory. For browser like methods see HTTPClient. All the best, Ron Teitelbaum From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta Sent: Thursday, May 26, 2016 4:53 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Re: FileDirectory I saw a lot of code in FileDirectory for urls. What’s that all about? Can I use FileDirectory to browse the web? If not, is there another web browser object? Sincerely, Joe. _ View this message in context: Re: FileDirectory <http://forum.world.st/FileDirectory-tp4897377p4897636.html> Sent from the Squeak - Beginners mailing list archive <http://forum.world.st/Squeak-Beginners-f107673.html> at Nabble.com. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: FileDirectory
From: Joseph Alotta Sent: Thursday, May 26, 2016 4:32 PM > Extra credit: Why would you use a class variable? We know that an instance variable is used to store data within the context of an instance. Why would you want to store data in the context of a class? Window closeAllWindows needs to have a list of all the windows, and sends each one the close message. Or if a instance of a class needed to communicate with other members of its class. For example, a class of helicopter bots that fly together as a group. They would need talk to each other to avoid collisions. [Ron Teitelbaum] Exactly! Well done. Any dynamic information that is related to all or a collection of instances should be held on a class variable. You could of course create a framework by adding another object whose job it is to manage all these instances. Then your class variable becomes an instance variable on your manager class. It could also be used for a class with just one instance. Create it and store it so that it's reused when asked for a second time. You will see that a lot, ^Instance ifNil: [Instance := self new. Instance]. Nice job! Ron Sincerely, Joe. _ View this message in context: Re: FileDirectory <http://forum.world.st/FileDirectory-tp4897377p4897633.html> Sent from the Squeak - Beginners mailing list archive <http://forum.world.st/Squeak-Beginners-f107673.html> at Nabble.com. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: FileDirectory
From: Joseph Alotta Sent: Thursday, May 26, 2016 3:02 PM > On May 26, 2016, at 8:29 AM, Ron Teitelbaum [via Smalltalk] <[hidden email]> > wrote: > > One more question for you. I mentioned returning a newly created instance or > a specific class from a class side method. Can you name another reason why > you would write a method on the class side? When you want the class as a whole to do something. When there is only one instance of an object and other is not desirable or logical. For example, one compiler: two is not practical. One instance of the number Pi. One instance of Nil. Why would you need another? [Ron Teitelbaum] if there is one instance you would still write methods on the instance side. But yes having a class side method that provides your single instance makes sense. > Why would it be a good idea to put a method on the class side instead of the > instance side? (a hint for you, I’m thinking of something where nothing is > returned. (of course in Smalltalk if nothing is returned you get back self, > what I mean is that nothing useful is returned)) Bonus points for 2 or more > answers with or without returning > something J. You would put a method on the class side when the method applies to all instances of the class. For example, Window closeAllWindows. Or Process stopAllProcesses. Or Smalltalk saveImage. I don’t think this is what you had in mind, though. [Ron Teitelbaum] This was exactly what I had in mind. When you have a method that does something to all instances or is needed to find a specific instance it makes sense to implement that as a class side method. Extra credit: Why would you use a class variable? We know that an instance variable is used to store data within the context of an instance. Why would you want to store data in the context of a class? All the best, Ron Teitelbaum Sincerely, Joe. _ View this message in context: Re: FileDirectory <http://forum.world.st/FileDirectory-tp4897377p4897621.html> Sent from the Squeak - Beginners mailing list archive <http://forum.world.st/Squeak-Beginners-f107673.html> at Nabble.com. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: FileDirectory
From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta Sent: Wednesday, May 25, 2016 7:47 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Re: FileDirectory Hi Ron, > Excellent. Remember that you should also look at the super classes for > methods. UnixFileDirectory is the instance of “FileDirectory default” but > it’s also a subclass of FileDirectory so the methods you can call include > UnixFileDirectory and all the methods on the class hierarchy including the > methods on FileDirectory. Please see the method categories on FileDirectory > that I mentioned. Okay, thanks. I tried to do something with that, but I got an error. I think I was trying to use a class method on the instance. > The question I asked was a bit different. When you ask for the #entries of > the instance “FileDirectory default” what class is each file? It is an Array of DirectoryEntry objects. > By the way, based on the question you asked there is a method on > FileDirectory to determine if the file exists before you read it (it’s in the > method categories I pointed out to you). What is that method? fileExists: I see what is happening. I thought the on: method changes the path, like cding a directory. But it gives a new instance. dir := FileDirectory default. dir on: '/Users/jja/Desktop’ ==> UnixFileDirectory on '/Users/jja/Desktop' dir fileExists: 'categories.CSV’ ==>false dir pathName ==>'/Users/jja/Desktop/Squeak-4.3-All-in-One.app/Contents/Resources' dir := FileDirectory on: '/Users/jja/Desktop’ ==> UnixFileDirectory on '/Users/jja/Desktop' dir pathName ==> '/Users/jja/Desktop' dir fileExists: 'categories.CSV’ ==> true So on: is the equivalent of new, in that it gives a new instance. [Ron Teitelbaum] Exactly right. Notice the on: method on the class side, then look at #on: on the instance side. This is one of those “ah ha” moments. Classes create instances so when you see something like: “Class on:” you should automatically notice that the method is being sent to the class side since you are sending the message to the class directly. This can get confusing if there is a method that results in something like myClass := Class, or when a method calls “self class on:”. But again when it’s done the variable holds the class itself and you are still sending messages to a class when you use “myClass on:”. So when you are talking directly to a class the method is on the class side. Class side method (unless they are like the method above returning a class) usually return instances of the class, so method are now instance side methods. Returning instances is one of the main uses of class side methods. Lookup factory methods, abstract factory, and prototype, for a good example of software patterns that creates instances from the class side. Understanding polymorphism is now very important since all methods on the hierarchy are callable (on both the class and instance side). Even methods that are overridden on a subclass can still be called using “super method”. This is a fundamental piece of learning Smalltalk and not simple to understand, but it is also one of those things that is really easy to learn, and once you do you really don’t think about it anymore. It just seems natural. (and when it’s missing in other languages you go yuck! Why is this so difficult!). It also means that people that understand it think that it’s simple and natural and may not spend enough time talking about it. J One more question for you. I mentioned returning a newly created instance or a specific class from a class side method. Can you name another reason why you would write a method on the class side? Why would it be a good idea to put a method on the class side instead of the instance side? (a hint for you, I’m thinking of something where nothing is returned. (of course in Smalltalk if nothing is returned you get back self, what I mean is that nothing useful is returned)) Bonus points for 2 or more answers with or without returning something J. All the best, Ron Teitelbaum Thank you, Sincerely, Joe. _ View this message in context: Re: FileDirectory <http://forum.world.st/FileDirectory-tp4897377p4897418.html> Sent from the Squeak - Beginners mailing list archive <http://forum.world.st/Squeak-Beginners-f107673.html> at Nabble.com. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: FileDirectory
Hi Joe, Excellent. Remember that you should also look at the super classes for methods. UnixFileDirectory is the instance of "FileDirectory default" but it's also a subclass of FileDirectory so the methods you can call include UnixFileDirectory and all the methods on the class hierarchy including the methods on FileDirectory. Please see the method categories on FileDirectory that I mentioned. The question I asked was a bit different. When you ask for the #entries of the instance "FileDirectory default" what class is each file? By the way, based on the question you asked there is a method on FileDirectory to determine if the file exists before you read it (it's in the method categories I pointed out to you). What is that method? All the best, Ron Teitelbaum From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta Sent: Wednesday, May 25, 2016 4:15 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Re: FileDirectory Hi Ron, I get an instance of UnixFileDirectory. And there are only 6 methods for UnixFileDirectory, none of them doing what I want. Sincerely, Joe. > On May 25, 2016, at 2:43 PM, Ron Teitelbaum [via Smalltalk] <[hidden email]> wrote: > > Hi Joe, > > The hardest part of FileDirectory is understanding default. > > So start with: FileDirectory default. > > Note that default is on the class side. Once you inspect that you are now > on the instance side. Have a look at the categories #enumeration, #'file > status', and #'file operations', and #'file name utilities' > > when you get a file from that instance you are no longer on FileDirectory. > What class are the file entries? > > Let me know if that helps. > > All the best, > > Ron Teitelbaum > > > > > -Original Message- > > From: [hidden email] [mailto:beginners- > > [hidden email]] On Behalf Of Joseph Alotta > > Sent: Wednesday, May 25, 2016 3:22 PM > > To: [hidden email] > > Subject: [Newbies] FileDirectory > > > > Greetings, > > > > I am looking for some documentation or snippets of code for using the > > FileDirectory class. > > > > I want to check if a file exists before I try to read it. > > > > I also want to look at a list of files in the directory. > > > > I did search SBE and google but found nothing. > > > > 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/FileDirectory-tp4897377p4897389.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: FileDirectory <http://forum.world.st/FileDirectory-tp4897377p4897398.html> Sent from the Squeak - Beginners mailing list archive <http://forum.world.st/Squeak-Beginners-f107673.html> at Nabble.com. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] FileDirectory
Hi Joe, The hardest part of FileDirectory is understanding default. So start with: FileDirectory default. Note that default is on the class side. Once you inspect that you are now on the instance side. Have a look at the categories #enumeration, #'file status', and #'file operations', and #'file name utilities' when you get a file from that instance you are no longer on FileDirectory. What class are the file entries? Let me know if that helps. All the best, Ron Teitelbaum > -Original Message- > From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- > boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta > Sent: Wednesday, May 25, 2016 3:22 PM > To: beginners@lists.squeakfoundation.org > Subject: [Newbies] FileDirectory > > Greetings, > > I am looking for some documentation or snippets of code for using the > FileDirectory class. > > I want to check if a file exists before I try to read it. > > I also want to look at a list of files in the directory. > > I did search SBE and google but found nothing. > > Sincerely, > > Joe. > > > > ___ > 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
RE: [Newbies] whats the difference between over and through
Nice description Herbert! That reminded me of one extra thing. It's kind of hidden but very useful. If you need to get out of a loop but don't want to restart and add a halt, you can click on some place in your code then select "Run To Here" from the pop up menu (right click on windows). That will continue your code until it gets to where the cursor is currently located and resume debugging from that location. That's pretty useful too. All the best, Ron > From: Herbert König > Sent: Tuesday, May 17, 2016 4:33 PM > > Hi Joe, > > a practical tip if you debug loops: > > myCollection collect: [:each| "You need 'through' to get into the loop" > > self doThis. "Through or over are ok here" > > self doThatWhichTakesLongToRun. "use over to go over this long running > method" > > somethingElse doMore "here you need to press through again or you'll > learn about the inner workings of collect :-))"] > > I want to mention three things: > > 1- if you are inside a loop with no other block inside you can always > continue with pressing 'Through'. This will then go through the next iteration > of the loop but step over the method sends inside the loop. > Methods inside the loop seem to take much longer if you go over them via > 'through' than if you go over them via 'over'. Especially on slow hardware. > > 2- if by accident you press 'over' while debugging the last send inside a loop > you get to the outer context of your loop which is very confusing at the > beginning. To get back into your loop you have to step 'into' the block you'll > see there. > > 3- if you've seen enough after being 'through' three iterations of of a > 1000 iteration loop you continue one level above (top pane of the > debugger) and debug 'over' that loop. > > Most important : experiment. > > I have no Squeak at hand so take the above just as a coarse description on > what you may encounter on your debugging journey. > > I usually debug my code into life and I still manage to press the wrong > buttons while debugging :-)) > > > Cheers, > > > Herbert > > Am 17.05.2016 um 19:36 schrieb Ron Teitelbaum: > > Hi Joe, > > > > This is a very good question. It's something that if you been using the > debugger for a long time comes naturally but when you are new it seems > strange. > > > > Take this code for example: > > > > | lock | > > lock := Mutex new. > > lock critical: [Transcript show: 'I am here'] > > > > debug this code and play with the different options to see how this works. > In general there are a number of times where what you want to debug is > inside a block. Getting into that block can be a real pain. In many cases > you > really just want to say take me through this outer code and into that block > so I can debug what is inside it. (in this case Transcript show: ) > > > > "Over" will skip it and "Into" will take you down the rabbit hole of code > that surrounds it. > > > > In this case try debugging that code using the different options and see > how much easier getting inside that block is when you use Through. > > > > I think the accepted description is: > > Through: if the debugger is going to execute a block, with this button you > can step though this block. > > > > and it makes sense when you think I want to step through what is inside > the block. "Take me through the inside of this block". > > > > Does that make sense? > > > > All the best, > > > > Ron Teitelbaum > > > >> -Original Message- > >> From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- > >> boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta > >> Sent: Tuesday, May 17, 2016 1:07 PM > >> To: beginners@lists.squeakfoundation.org > >> Subject: [Newbies] whats the difference between over and through > >> > >> Greetings, > >> > >> What’s the difference between over and through in the debugger? > >> > >> Is there something that goes to the next line of code? > >> > >> > >> Sincerely, > >> > >> Joe. > >> > >> > >> ___ > >> 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
RE: [Newbies] whats the difference between over and through
Hi Joe, This is a very good question. It's something that if you been using the debugger for a long time comes naturally but when you are new it seems strange. Take this code for example: | lock | lock := Mutex new. lock critical: [Transcript show: 'I am here'] debug this code and play with the different options to see how this works. In general there are a number of times where what you want to debug is inside a block. Getting into that block can be a real pain. In many cases you really just want to say take me through this outer code and into that block so I can debug what is inside it. (in this case Transcript show: ) "Over" will skip it and "Into" will take you down the rabbit hole of code that surrounds it. In this case try debugging that code using the different options and see how much easier getting inside that block is when you use Through. I think the accepted description is: Through: if the debugger is going to execute a block, with this button you can step though this block. and it makes sense when you think I want to step through what is inside the block. "Take me through the inside of this block". Does that make sense? All the best, Ron Teitelbaum > -Original Message- > From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- > boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta > Sent: Tuesday, May 17, 2016 1:07 PM > To: beginners@lists.squeakfoundation.org > Subject: [Newbies] whats the difference between over and through > > Greetings, > > What’s the difference between over and through in the debugger? > > Is there something that goes to the next line of code? > > > Sincerely, > > Joe. > > > ___ > 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
RE: [Newbies] Re: Need a local tutor for Squeak
> -Original Message- > From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- > boun...@lists.squeakfoundation.org] On Behalf Of askoh > > In MeetUp, I go to a real place to meet real people. Great for popular > activities. > > But I would like to meet Smalltalkers once a month or a week for realtime > conversations. There are too few or no one nearby who are interested. A > virtual meeting place would be a great substitute. Is there such a website or > app? > > Perhaps, in the future we can combine physical with virtual meetings > simultaneously. A remote user can see the real meeting room and identify > the person he wants to talk to. He then calls that person to start a > conversation. Does such a capability exist? > [Ron Teitelbaum] Right now I think your options are Facebook or google hangouts. There is also second life which used to have a lot of areas dedicated for different activities like science and academia but it turned into a ghost town for most of the useful areas. I like the idea but need to really think it through. The real problem with 3d as I see it is that there is a certain amount of investment required of users to learn and understand the platform. The activity needs to pay back that investment with something useful. We do well in education, training, counseling, and collaboration. Places where the software provides sufficient benefits to the users to pay back that investment. MeetUp is a calendaring and coordination application. It has a very low cost to users to use and understand and a minimal cost to organizers, and a benefit that organizers can charge more than the cost to members that participate. I'm not sure that the same is true of a virtual world. We tried having google hangouts for Squeak people! That was fun, but difficult to coordinate. It also quickly dropped off in attendance after the first few meetings. If someone would like to use Terf for Squeak meetings, and we can organize something that would be useful to pay back participants, I would be very interested. Please feel free to contact me. r...@3dicc.com. What I would suggest is an agenda, speakers, training, sprints, documentation days, programming contests, something like that. All the best, Ron Teitelbaum > All the best, > Aik-Siong Koh > > > > -- > View this message in context: http://forum.world.st/Need-a-local-tutor-for- > Squeak-tp4888503p4895183.html > 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 ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: Need a local tutor for Squeak
Odd that I never got Aik-Siong Koh email! Checked junk mail also but nothing. Did everyone else get it or am I missing something? Ahh maybe the email didn't go to beginn...@list.squeakfoundation.org? I have been thinking about something along those lines, something where users could purchase a single license and then connect to various organizations, events and activities. This is the opposite of having an organizer pay. Either way it does seem like a good idea! Thanks for suggesting it. All the best, Ron Teitelbaum From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta Sent: Monday, May 16, 2016 10:46 AM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Re: Need a local tutor for Squeak It would be very hard to compete with meetup. They have a moat because they were first. I run a meetup group and I have 1000 members, just because they are on meetup and not somewhere else. Same thing for eBay. Everyone hates it. But it is where the buyers and the sellers are. Sincerely, Joe. > On May 16, 2016, at 12:39 AM, askoh [via Smalltalk] <[hidden email]> wrote: > > Ron: > > Have you thought about a virtual equivalent to meetup.com? Is there something available already? > > All the best, > Aik-Siong Koh > > If you reply to this email, your message will be added to the discussion below: > http://forum.world.st/Need-a-local-tutor-for-Squeak-tp4888503p4895074.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: Need a local tutor for Squeak <http://forum.world.st/Need-a-local-tutor-for-Squeak-tp4888503p4895149.html> Sent from the Squeak - Beginners mailing list archive <http://forum.world.st/Squeak-Beginners-f107673.html> at Nabble.com. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: '1921' romanNumber
Thanks Nicolas. Jecel pointed it out too. I figured it had to be there but yeah I didn't see it either. Ron > -Original Message- > From: nicolas cellier > Sent: Friday, May 13, 2016 4:33 PM > > Ron Teitelbaum usmedrec.com> writes: > > > > > Hi Joe! > > > > Try this: > > > > 'MCMXXI' romanNumber > > > > I would think that 1921 asRomanNumerals (or asRomanNumber) would be > a cool > method to write! > > > > I checked but don't see one :). > > > > Ron > > > > 1921 printStringRoman. > > It's not referenced in MethodFinder, so it can't be found that easily. > > Nicolas > > > ___ > 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
RE: [Newbies] '1921' romanNumber
Hi Jecel, HAHAHA! I figured it was there somewhere. I looked for omanNumber :). Well done Jecel! All the best, Ron > From: Jecel Assumpcao Jr. > Sent: Friday, May 13, 2016 3:33 PM > > Ron, > > > I would think that 1921 asRomanNumerals (or > > asRomanNumber) would be a cool method to write! > > > > I checked but don't see one :). > > 1921 printStringRoman > > I found that out by trying "roman" in the search field. The method finder > said that no single method could go from 1921 to 'MCMXXI' but since it also > didn't find #romanNumber I decided I had to look for method names > instead. > > -- Jecel > ___ > 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
RE: [Newbies] '1921' romanNumber
Hi Joe! Try this: 'MCMXXI' romanNumber I would think that 1921 asRomanNumerals (or asRomanNumber) would be a cool method to write! I checked but don't see one :). Ron > -Original Message- > From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- > boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta > Sent: Friday, May 13, 2016 12:51 PM > To: beginners@lists.squeakfoundation.org > Subject: [Newbies] '1921' romanNumber > > Shouldn’t this work? > > > '1921’ romanNumber > > > I get an error index out of bounds. > > Sincerely, > > Joe.___ > 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
RE: [Newbies] Re: Need a local tutor for Squeak
Hi Joe, Terf is a virtual world used for collaboration. We provide VOIP, webcams, video, document sharing (doc, xls, ppt, pdf, txt), web browsing, sticky notes, 3d objects and more. It’s like being in the same room together. You can even sit at a table with virtual coffee! www.3dicc.com All the best, Ron Teitelbaum From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta Sent: Friday, May 13, 2016 9:27 AM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Re: Need a local tutor for Squeak what’s a terf space? > On May 13, 2016, at 8:24 AM, Ron Teitelbaum [via Smalltalk] <[hidden email]> > wrote: > > Hi Joe and Craig, > > > > Not sure if it will help but I’ll donate a Terf space for you to use for > lessons. You can drink virtual coffee while learning Squeak in Squeak! J > > > > All the best, > > > > Ron Teitelbaum > > Chief Executive Officer > > 3D Immersive Collaboration Consulting > > [hidden email] > > Follow Me On Twitter: @RonTeitelbaum > > www.3Dicc.com > > https://www.google.com/+3Dicc > > > > > > From: [hidden email] [mailto:[hidden email]] On Behalf Of Joseph Alotta > Sent: Friday, May 13, 2016 9:14 AM > To: [hidden email] > Subject: [Newbies] Re: Need a local tutor for Squeak > > > > Thanks Stephan and Craig, > > I will keep it in mind. I haven’t given up on a local tutor yet. > > Sincerely. > > Joe. > > > > > > On May 13, 2016, at 1:44 AM, Stephan Eggermont [via Smalltalk] <[hidden > > email]> wrote: > > > > On 12/05/16 15:23, Craig Latta wrote: > > > If you decide you'd be willing to do remote lessons, I'd be happy > > > to help online live from Amsterdam. > > > > As I've observed in several smalltalk workshops given at the yearly > > FOSDEM conference, Craig is very patient and clear in explaining, and > > has an enormous experience in all things smalltalk. He'd make an > > excellent tutor. > > > > Stephan Eggermont > > > > > > ___ > > 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/Need-a-local-tutor-for-Squeak-tp4888503p4894581.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: Need a local tutor for Squeak > > 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/Need-a-local-tutor-for-Squeak-tp4888503p4894649.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: Need a local tutor for Squeak <http://forum.world.st/Need-a-local-tutor-for-Squeak-tp4888503p4894650.html> Sent from the Squeak - Beginners mailing list archive <http://forum.world.st/Squeak-Beginners-f107673.html> at Nabble.com. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: Need a local tutor for Squeak
Hi Joe and Craig, Not sure if it will help but I’ll donate a Terf space for you to use for lessons. You can drink virtual coffee while learning Squeak in Squeak! J All the best, Ron Teitelbaum Chief Executive Officer 3D Immersive Collaboration Consulting r...@3dicc.com Follow Me On Twitter: @RonTeitelbaum <https://twitter.com/RonTeitelbaum> www.3Dicc.com <http://www.3dicc.com/> https://www.google.com/+3Dicc From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta Sent: Friday, May 13, 2016 9:14 AM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Re: Need a local tutor for Squeak Thanks Stephan and Craig, I will keep it in mind. I haven’t given up on a local tutor yet. Sincerely. Joe. > On May 13, 2016, at 1:44 AM, Stephan Eggermont [via Smalltalk] <[hidden > email]> wrote: > > On 12/05/16 15:23, Craig Latta wrote: > > If you decide you'd be willing to do remote lessons, I'd be happy > > to help online live from Amsterdam. > > As I've observed in several smalltalk workshops given at the yearly > FOSDEM conference, Craig is very patient and clear in explaining, and > has an enormous experience in all things smalltalk. He'd make an > excellent tutor. > > Stephan Eggermont > > > ___ > 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/Need-a-local-tutor-for-Squeak-tp4888503p4894581.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: Need a local tutor for Squeak <http://forum.world.st/Need-a-local-tutor-for-Squeak-tp4888503p4894645.html> Sent from the Squeak - Beginners mailing list archive <http://forum.world.st/Squeak-Beginners-f107673.html> at Nabble.com. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: new and initialize
From: Joseph Alotta Sent: Tuesday, May 10, 2016 3:38 PM > On May 10, 2016, at 12:45 PM, Ron Teitelbaum [via Smalltalk] <[hidden email]> > wrote: > > Hi Joe, > > Excellent question. Try this. > > Object new. > > Highlight it and do debug it. Click "Into" to go into the #new method. > > Notice the implementation of #new. > > You should be able to see there that #initialize is called automatically. > > Also for extra points notice what class new is implemented on. Behavior [Ron Teitelbaum] Exactly! > What method should you call to skip initialize? basicNew [Ron Teitelbaum] Excellent! More questions: why isn’t there a command key for debug it? [Ron Teitelbaum] No clue. why isn’t my initialize method not running or running without setting variables? [Ron Teitelbaum] put a halt in your method and run it. See if the initialize is being called at all. If it is then check the content of your method for errors. If not then your initialize method is spelled wrong, is not on the instance side, or there is a new method implemented in your class or a superclass that is bypassing the default implementation of #new which is a bad thing. The system gives you a warning to let you know that!! J All the best, Ron Thank you. Sincerely, Joe. _ View this message in context: Re: new and initialize <http://forum.world.st/new-and-initialize-tp4894227p4894237.html> Sent from the Squeak - Beginners mailing list archive <http://forum.world.st/Squeak-Beginners-f107673.html> at Nabble.com. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] new and initialize
Hi Joe, Excellent question. Try this. Object new. Highlight it and do debug it. Click "Into" to go into the #new method. Notice the implementation of #new. You should be able to see there that #initialize is called automatically. Also for extra points notice what class new is implemented on. What method should you call to skip initialize? All the best, Ron Teitelbaum > -Original Message- > From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- > boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta > Sent: Tuesday, May 10, 2016 2:07 PM > To: beginners@lists.squeakfoundation.org > Subject: [Newbies] new and initialize > > Greetings, > > I have an instance method called ‘initialize’ that defines instance variables. > > I want it to run whenever a new instance is created. How do I accomplish > that? > > I tried to add a class method ‘new’ that contained ^(super new) initialize. > But it warned me about adding the message saying it would have serious > effects. > > So where do I put it? > > Sincerely, > > Joe. > > > > ___ > 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
RE: [Newbies] conceptual design help
Hi Joe, Depending on how many different structures you have you may want to consider having some external configuration object. My first thought when reading your description was that there are only so many ways to parse, and so many different types of data. Having a collection of parser objects that handle specific translations seems clean. Once you have an idea of what types of translations you need you could trigger those operations by building your collection of parser objects from an external config file. In that way you read the parameters in (could be a file in the JPMorgan directory) conf.xml or parse.conf something like that, and then use that to set up your parser. The parser is then written to be generic and reusable. It would allow you to write methods once and then reuse them for files you haven't seen yet by creating a new config file for your format. You could even have a config file generator that asks you questions and shows you the results from a current sample data file. :) fieldSeperator: #comma. fieldDelimited: #doubleQuote. nameSeperator: #comma. nameFormat: 'title, first, [mi], last, [suffix]'. balance: #USD. fieldOrder: 'id, name, balance'. ... One other thought is if there is a way for the system to determine what format to use (this is a JPMorgan file) then instead of an external config file you could just store the different configs internally and match for the right config collection and error if one doesn't exist (asking the user to create one using your config builder method). if you can't match then having a file in a JPMorgan directory seems simple enough. In general thinking of the setup step as a collection of generic parser configuration objects instead of a different parsing method for each file, simplifies everything. Of course back to my original point, writing 3 parser methods will go faster if there are not that many formats. There is always a trade off when you consider building a framework or just hacking some code that works :). All the best, Ron Teitelbaum > From: Joseph Alotta > Sent: Thursday, April 28, 2016 6:15 PM > > Greetings, > > I am writing a program to consolidate all my personal finances for tax time > next year. (This is not a school project.) > > There are transaction files from several banks and credit card companies. > Each has a similar format, CSV, but they vary in many ways, order of items, > extra notes, pipe delimited or tabs, etc. I want to read them and load them > into a collection of transaction objects. > > 1. Should I have a FileReader object? > > 2. Should it have subclasses like FileReaderAmericanExpress, > FileReaderJPMorgan ? > > 3. Or should it have different methods like loadAmericanExpresFile, > loadJPMorganFile ? > > 4. Is a Collection of Transaction objects, the structure that you would load > the files into? > > The rest of the project would be to do data checking on the files, to make > sure there are no duplicates or missing dates. Then write reports that I can > give to my accountant. > > I would appreciate some design help? > > Sincerely, > > Joe.___ > 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
RE: [Newbies] f(x, y) or Table
Hi Joseph, | aPoint aDictionary | aPoint := Point x: 1 y: 2. aDictionary := Dictionary new. aDictionary at: aPoint put: 'Success!'. ^aDictionary at: aPoint Everything in Smalltalk is an object. You can use a number or string as your dictionary key but you can also use more complex objects like a Point. The object matching is implemented in #=. If the objects match then the value will be returned. All the best, Ron Teitelbaum > -Original Message- > From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- > boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta > Sent: Wednesday, April 13, 2016 9:46 PM > To: beginners@lists.squeakfoundation.org > Subject: [Newbies] f(x, y) or Table > > Greetings, > > I find a lot of my data needs two indices, f(x,y) instead of one, f(x). > > f(x) would be implemented easily with a Dictionary, > > but how do you implement f(x,y)? > > > I guess this is another way of asking is there a Table object or a Tuple object, > > of even a graphics object Screen that has x,y coordinates with a value? > > > Sincerely, > > Joe. > > > > > > > ___ > 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
RE: [Newbies] How to test a String if it is a valid date?
Hi Joe, You could just handle the error. ['1/22/2016' asDate class = Date ] on: Error do: [:ex | ^false] returns true ['15/22/2016' asDate class = Date ] on: Error do: [:ex | ^false] returns false Or even [myDate := '1/22/2016' asDate] on: Error do: [:ex | ^nil]. Then you can just check if myDate isNil. All the best, Ron Teitelbaum Head Of Engineering 3D Immersive Collaboration Consulting r...@3dicc.com Follow Me On Twitter: @RonTeitelbaum www.3Dicc.com https://www.google.com/+3Dicc > -Original Message- > From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- > boun...@lists.squeakfoundation.org] On Behalf Of Joseph Alotta > Sent: Tuesday, March 29, 2016 8:07 PM > To: beginners@lists.squeakfoundation.org > Subject: [Newbies] How to test a String if it is a valid date? > > Greetings, > > I want to test a String to see if it can be a Date using mm/dd/ format. I > want something that won’t cause a walkback window. Is there a String > method isValidAsADate? > > Sincerely, > > Joe. > > > > ___ > 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
RE: [Newbies] RE: How to reopen a collapsed Morph from another Morph?
From: Fredrik Alink Sent: Saturday, August 15, 2015 6:22 AM Ron Teitelbaum wrote Could you post more details like example code that shows the error, and maybe a picture of what you are seeing? http://forum.world.st/file/n4843032/SQ.png [Ron Teitelbaum] Thanks that is much more clear. Try replacing collapse with collapseOrExpand. Then self mainConsole currentWorld removeMorph: (self mainConsole). self mainConsole openInWorld. With self mainConsole collapseOrExpand. I think the issue here is that the console changed from a SystemWindow to a CollapsedMorph. To close the CollapsedMorph you need to call getCollapsedFrame and close that. collapseOrExpand toggles the state between collapsed and expanded and takes care of that for you. All the best, Ron Code: *Class hierarchy:* Morph BaseInterface MainConsole ModelConsole *step 1:* MainConsole new super initialize ( initialisations self initScreenItemStates. self openWindow. self openInWorld. owner := self currentWorld) The MainConsole shows up. *Step 2:* (MainConsole) demoButtonClicked self modelConsole: ((ModelConsole new) “init as in MainConsole” mainConsole: self; yourself); collapse. The ModelConsole shows up, the MainConsole collapses. *Step 3:* (ModelConsole) xButtonClicked close own Modelprocessor self mainConsole isNil ifFalse: [ uncollapse MainConsole: remove and then reactivate self mainConsole currentWorld removeMorph: (self mainConsole). self mainConsole openInWorld. disconnect MainConsole self mainConsole modelConsole: nil. self mainConsole: nil]. close ModelConsole ^self currentWorld removeMorph: self The MainConsole shows up, the ModelConsole disppears, but the collapsed MainConsole stays visible on screen. *Step 4:* (MainConsole) exitButtonClicked self modelConsole isNil ifFalse: [self modelConsole exitButtonClickedInMainConsole]. ^self currentWorld removeMorph: self The MainConsole disappears, but the collapsed MainConsole stays visible on screen. Deopending of the order you do the abov, it is still 1 time active, otherwise it is dead. When deaad, it just disappears from the screen when clicking on x, v, + or –. -- View this message in context: http://forum.world.st/How-to-reopen-a- collapsed-Morph-from-another-Morph-tp4842627p4843032.html 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 ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] How to reopen a collapsed Morph from another Morph?
From: Fredrik Alink Sent: Thursday, August 13, 2015 2:16 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] How to reopen a collapsed Morph from another Morph? Hi, Let me shortly introduce myself. I'm new in this Forum, but not at all with Smalltalk. I did a private Smalltalk project under IBM VisualAge Smalltalk 6.0 (see http://imarch.free.fr/), but at a HD crash 10 years ago I lost both VisualAge and the project, except for the documentation. Recently I decided to rebuild my former private project and I installed Squeak on my iMac. Essentially, main differences between the two are VisualAge's Widgets against Squeak's Morphs. The Morph problem that I met: I create a Morph and from that I create another one and collapse the original one: (morphA := )MorphA new morphA: (statements) morphB := MorphB new. self collapse. When I close morphB, I want morphA to reopen, but I did not find any methods for that: morphB: (statements) morphA “uncollapse …... how?” self currentWorld removeMorph: self. See implementors of collapseOrExpand on a workspace type in collapseOrExpand and press Alt-b. All the best, Ron Teitelbaum I found a sort of “solution”, but is leaves a residu collapsed morph on the screen: morphB: (statements) morphA currentWorld removeMorph: morphA. morphA openInWorld. self currentWorld removeMorph: self. morphA reappears opened but the collapsed morphA is still visible on the display. “restore display (r)” does nothing, but clicking on any of the collapsed morph's actions x, v, + or – let it disappear. Remarks: Update Squeak ends up in an error message. Monticello Browser can't get over 30 versions and ends up in an error message. -- View this message in context: http://forum.world.st/How-to-reopen-a- collapsed-Morph-from-another-Morph-tp4842627.html 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 ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] RE: How to reopen a collapsed Morph from another Morph?
Hi Fredrik, Could you post more details like example code that shows the error, and maybe a picture of what you are seeing? Ron -Original Message- From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- boun...@lists.squeakfoundation.org] On Behalf Of Fredrik Alink Sent: Friday, August 14, 2015 4:59 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] RE: How to reopen a collapsed Morph from another Morph? Ron Teitelbaum wrote . Didn't get that from your email sorry. Have a look at Morphchanged. Calling changed on the container should redraw the morph to remove the residue. . No change, still having the residue. Sorry. -- View this message in context: http://forum.world.st/How-to-reopen-a- collapsed-Morph-from-another-Morph-tp4842627p4842944.html 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 ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] RE: How to reopen a collapsed Morph from another Morph?
From: Fredrik Alink Sent: Friday, August 14, 2015 3:22 PM Ron Teitelbaum wrote . See implementors of collapseOrExpand on a workspace type in collapseOrExpand and press Alt-b. . Sorry,I didn't get a reasonable clue out of that. The thing is when I click a button *inside of* the morph, it vanishes. But when I address the same selector from the outside, the residue stays on the screen. Didn't get that from your email sorry. Have a look at Morphchanged. Calling changed on the container should redraw the morph to remove the residue. All the best, Ron Teitelbaum -- View this message in context: http://forum.world.st/How-to-reopen-a- collapsed-Morph-from-another-Morph-tp4842627p4842922.html 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 ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] How to Double Squeak?
Hi Kirk, You are correct that you need to copy the files, I would just copy the entire directory, as you did previously. The error you saw was about the changes file. The image will still run but since the changes file is already open in the first instance it cannot be used for the second. You could actually delete the changes file and run from the same directory but I wouldn't recommend that either. On windows you can set the affinity to a particular CPU. Use your task manager to set the affinity for each instance. They should then run on different CPUs. You may need to change the name to get it to stick for the next launch. All the best, Ron From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Kirk Fraser Sent: Tuesday, May 26, 2015 1:13 AM To: A friendly place to get answers to even the most basic questions about Squeak. Subject: [Newbies] How to Double Squeak? I want to run 2 Squeaks on a 2 core computer. The first time I tried two instances, one complained that it couldn't save changes or something but ran anyway, enabling me to open both the internal webcam and a USB webcam at the same time and enjoy the same display speed on each. To avoid the file conflict I later copied the entire Squeak directory to a copy to run separately. I brought up the Task Manager to set the priorities high and affinity to each core separately. Oddly the task manager showed two Squeak.exe's but only one had a description Squeak Cog Virtual Machine. They both started but soon one gave a VM error message and quit. What is the correct way to run a Squeak on each core? I've seen a recommendation to use 4 cores for machine vision and i hope to do it in Squeak instead of C++ to better modify the perception code. Thanks. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Can You Hear Me Now?
Excellent! Ron -Original Message- From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- boun...@lists.squeakfoundation.org] On Behalf Of summae3...@mypacks.net Sent: Saturday, November 15, 2014 9:46 PM To: A friendly place to get answers to even the most basic questions about Squeak. Subject: RE: [Newbies] Can You Hear Me Now? Hello Levente, The jam seems to be opening now. I received the confirmation email, have successfully logged on, and am getting email. Thank you. - Dan -Original Message- From: Levente Uzonyi le...@elte.hu Sent: Nov 15, 2014 2:29 PM To: A friendly place to get answers to even the most basic questions about Squeak. beginners@lists.squeakfoundation.org Subject: RE: [Newbies] Can You Hear Me Now? Hello Dan, There are various network errors blocking your confirmation email, but hopefully you'll receive it in a few hours. Levente On Fri, 14 Nov 2014, summae3...@mypacks.net wrote: More than half an hour has passed since your post and nothing has shown up in the spam filter or inbox. This is at dnor...@mindspring.com and the ISP is EarthLink. Anything I can do from this end? Thanks for your help. - Dan -Original Message- From: Ron Teitelbaum Sent: Nov 14, 2014 11:45 AM To: 'A friendly place to get answers to even the most basic questions about Squeak.' Subject: RE: [Newbies] Can You Hear Me Now? Hi Dan, You should have received a confirmation email with a link. When you click on the link you will see a button that says subscribe to email list. Make sure you press that button to subscribe. Then you can set your password. Check your spam folder to see if the email showed up. Sorry about the problem but a bit of persistence I’m sure will pay off. Ron From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of summae3...@mypacks.net Sent: Friday, November 14, 2014 10:31 AM To: A friendly place to get answers to even the most basic questions about Squeak. Subject: Re: [Newbies] Can You Hear Me Now? After going through the subscribe on the Squeak-dev info page and waiting overnight, I have received no confirmation email. Entering the email address and password to visit the subscribers list is met with authentication failed Looks like I still need some assistance. - Dan -Original Message- From: summae3...@mypacks.net Sent: Nov 13, 2014 7:39 PM To: A friendly place to get answers to even the most basic questions about Squeak. Subject: Re: [Newbies] Can You Hear Me Now? Thanks Ron and Dave. I read the page too literally. I will subscribe. - Dan ___ 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
RE: [Newbies] Can You Hear Me Now?
Hey Dan, I don’t see that email. Did you sign up for that mailing list. If not the emails may be waiting for someone to moderate it. Make sure you are signed up, and use the same email that you signed up with and it should show up. All the best, Ron Teitelbaum From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of summae3...@mypacks.net Sent: Thursday, November 13, 2014 6:09 PM To: beginners Subject: [Newbies] Can You Hear Me Now? Recently I tried to post to Squeak-dev and explain what I had put in the inbox: [squeak-dev] The Inbox: Morphic-dhn.723.mcz http://lists.squeakfoundation.org/pipermail/squeak-dev/2014-November/180593.html The Monticello file was uploaded but I don't see my post. Was it something I said? :-) It was from: dnor...@mindspring.com to: squeak-...@lists.squeakfoundation.org Dan Norton ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] hi
From: Herbert König Just think of your reply. He won't bother to read the mailing list. :-)) I thought the same thing but figured, this is a friendly group that encourages people to write in with newbie questions. Someone else might read it and say, Hey cool group. :) Ron Cheers Herbert Am 31.10.2014 um 11:38 schrieb Casey Ransberger: Hi Hans. Hello world:) On Oct 30, 2014, at 10:51 AM, Hans Schueren werbung@hans- schueren.de wrote: hi fellows. Let x = 100 ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] hi
Hahahah! Ok that was funny! Ron -Original Message- From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- boun...@lists.squeakfoundation.org] On Behalf Of Casey Ransberger Sent: Friday, October 31, 2014 3:49 PM To: A friendly place to get answers to even the most basic questions about Squeak. Subject: Re: [Newbies] hi So uh... what kinda stuff are you into. Do you like parsing things? I enjoy parsing. Among other things. And some friends have put me onto some fantastic tea. Hi? Are you a robot? It's okay if you are, I definitely won't judge you for it. Your pal, Casey On Oct 30, 2014, at 10:51 AM, Hans Schueren werbung@hans- schueren.de wrote: hi fellows. Let x = 100 ___ 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
RE: [Newbies] hi
Hi Hans, |x| x := 100. |x| defines a temp x. | x y | defines both x and y as temps. The assignment operator is := If you use = or == you are asking for a comparison of x and 100. All the best, Ron Teitelbaum -Original Message- From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- boun...@lists.squeakfoundation.org] On Behalf Of Hans Schueren Sent: Thursday, October 30, 2014 1:52 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] hi hi fellows. Let x = 100 ___ 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
RE: [Newbies] status of the 'mvc' environment?
hirzel, thanks for the note. btw, what do you mean by _late_ andreas raab? has he passed away or something? hope that's not true. Very sad. Yes it is true he passed away early last year. http://en.wikipedia.org/wiki/Andreas_Raab Ron i will be going for an earlier version, thanks for reminding me about that approach. ~mayuresh On 2014-09-06 10:10, H. Hirzel wrote: Mayuresh, There is a thread in the mail archive Subject: All MVC image Date: Fri, Jul 6, 2012 at 5:02 PM It mentions an MVC image done by Sungjin Chun which the late Andreas Raab considered very fine. The MVC implementation in the current squeak still has problems. So if you are interested in MVC I suggest that you go for an earlier version. (Or you try Cuis which is Morphic only -- reworked by Juan Vuletich -- but is fast https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev -- only 600 classes in the image) --Hannes On 9/6/14, Casey Ransberger casey.obrie...@gmail.com wrote: Woot! I can't answer your question, but I do have a strong interest in being able to unload the Morphic environment. In something like a web server, Morphic just wastes a lot of CPU cycles, and MVC is much less expensive (as we've seen on lower end machines like the Raspberry Pi,) so it would be fantastic to elevate it to its former glory as a complete solution to the user interface of applications which do not require the flexibility of the Morphic environment, like the system browser. Unfortunately, while I have plenty of experience with the MVC pattern, I have only really just sat in awe of how fast Squeak runs inside an MVC project. Having someone around who's returning after 14 years of wandering might be just what I need to make myself useful in this regard. I know that David Lewis is also interested in seeing the MVC system a viable option for development again (IIRC he fixed some serious problems with the debugger,) and I imagine that at least some of the Seaside folks would love to drop the overhead of Morphic from their servers. I'm moving this conversation to squeak-dev, as it's more about remodelling and redecorating a part of the core of Squeak and less about using it in general. If you aren't subscribed there, you should be, or you'll end up in the moderator's queue, which can take a (relatively) longish time to turn around. If the community doesn't take the bait, feel free to contact me offline. Maybe there's a common point of interest and we can team up. --Casey Ransberger On Fri, Sep 5, 2014 at 8:39 PM, Mayuresh Kathe mayur...@kathe.in wrote: hello, i am returning to squeak after a gap of 14 years. back then, i used to work only within the 'mvc' environment as morphic hadn't taken off the way it has now. i still prefer the simplicity and lightness of the 'mvc' environment. at last use, the 'mvc' environment felt quite sluggish and crashed my squeak session multiple times. hope all is well! ~mayuresh ps: if boris gaertner is still around, could he please mail me off-list! ___ 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
RE: [Newbies] debugging over loops
Hi Joe, There are a few ways to get out of a loop. The best way is to just let the loop run. To do that select the space on your code you want to jump to right click and select: run to here That will take you to the place you clicked on in your code. There is another trick, loops usually have an index. This is Smalltalk after all. In the case above I just selected this code and selected Debug it 1 to: 100 do: [:i | Transcript show: i asString]. Transcript show: 'done'. While in the outer content evaluating the loop, select i change the value to 100 hit accept and bobs your uncle the loop is done. Ok so a bit of a hack but I've used it to skip over some processing and since you are debugging and know what you are doing it should be fine. Proceed is just continue and stop debugging. Restart will stop debugging at the selected method and restart that method from the beginning. Into goes into the execution of the next method and shows you what it does Over executes the next message and moves over it to the next message Through steps you through a block of code, so if you are about to execute a block, this steps you through that block Full Stack increases the number of levels you see in the upper panel. That normally shows you a subset of the execution stack. Full stack will show you the rest of the stack that called this method. Where is useful if you click around a method during debugging. It will highlight the code at its execution point. You can also just select the stack method again to do the same thing. Tally well is supposed to Tally selected code. Ignore Tally. If you want to tally something do it outside a debugger. Hope that helps! All the best, Ron Teitelbaum Head Of Engineering 3d Immersive Collaboration Consulting r...@3dicc.com Follow Me On Twitter: @RonTeitelbaum https://twitter.com/RonTeitelbaum www.3dicc.com http://www.3dicc.com/ https://www.google.com/+3dicc -Original Message- From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- boun...@lists.squeakfoundation.org] On Behalf Of Joseph J Alotta Sent: Friday, May 30, 2014 11:55 AM To: beginners@lists.squeakfoundation.org Subject: [Newbies] debugging over loops Greetings, How do I debug over loops? I tried using the over step and the through step, but that just keeps me inside the loop. I don't know what the other buttons do, like tally. Is there somewhere that explains this? Sincerely, Joe. ___ Beginners mailing list mailto:Beginners@lists.squeakfoundation.org Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] List still active?
Yes the list is active. Ron Teitelbaum From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Ben Coman Sent: Saturday, April 05, 2014 12:52 PM To: A friendly place to get answers to even the most basic questions about Squeak. Cc: markdy...@gmail.com Subject: Re: [Newbies] List still active? Mark Dymek wrote: I tried to subscribe to this list but it appears I already am. Is the list no longer active? I have not been getting messages from it. _ ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners Hi Mark, The last post I received prior to yours was 22 March 2014. There is not always a lot of activity, but there are a lot of people observing and responses are pretty quick. cheers -ben ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: Read a filestream (named pipe) with a timeout
Hi David, Go back to sockets. The pain you are experiencing is not worth saving the user from answering a firewall warning that nobody pays attention to. FWIW, Ron From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of dsl101 Sent: Monday, January 13, 2014 11:16 AM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Re: Read a filestream (named pipe) with a timeout Levente, I gave it a try with the AsyncFile method you outlined, and I hit 2 problems: 1. The named pipe is created in Message mode, but repeated calls to writeBuffer:atFilePosition:onCompletionDo: seem to concatenate all the messages together - I couldn't see the equivalent of 'flush' for FileStream which separates out the messages at the pipe server end. 2. I couldn't find the equivalent of 'size' from FileStream to find out how much data was available in the next message when reading - readByteCount:fromFilePosition:onCompletionDo: seems to want me to pass this value in. Given that the messages vary in size, this is a little awkward (although I guess I could make it send a fixed 256-byte message each time, that is bound to bite me later (640kb is enough for anyone, etc.)). Anyway, if you have any other thoughts on using AsyncFile, or an alternative, I'd be most grateful. Many thanks, David. On Fri, Jan 10, 2014 at 3:37 PM, Levente Uzonyi-2 [via Smalltalk] [hidden email] wrote: On Fri, 10 Jan 2014, dsl101 wrote: Hi Ron, Thanks for that - but I can only see #dataAvailable for Sockets, not for FileStream (named pipes). I think the same kind of thing is available for pipes (you can do `pipe size` to see how much data is there), but it still doesn't wait. I'm trying to avoid a busy loop waiting for the data - like this: FileStreams don't have semaphores, so you can only use busy waiting with them. However there's AsyncFile, which can do what you want. But its interface is a bit cumbersome, and it's hardly tested/used at all. Here's how it could work: | syncSemaphore file message | syncSemaphore := Semaphore new. file := AsyncFile new. file open: 'your_pipe' forWrite: true. message := 'Here''s Johnny'. file writeBuffer: message atFilePosition: 0 onCompletionDo: [  syncSemaphore signal ]. (syncSemaphore waitTimeoutMSecs: 3000) ifTrue: [  handle timeout ]. file readByteCount: 32 fromFilePosition: 0 onCompletionDo: [ :response |  message := response.  syncSemaphore signal ]. (syncSemaphore waitTimeoutMSecs: 3000) ifTrue: [  handle timeout ]. Transcript show: 'Received: ', message; cr. file close. Using syncSemaphore is a must, because the callbacks are evaluated from another process. Levente P.S.: If you want to communicate with another program from Squeak, then you should use Sockets if possible, since those are versatile and well tested. start := DateAndTime millisecondClockValue. (pipe size 32) (DateAndTime millisecondClockValue - start 3000) ifTrue: [ (Delay forMilliseconds 50) wait. ] pipe size = 32 ifTrue: [ Get data ] ifFalse: [ Deal with timeout ] The shorter the 'wait', the more responsive the code is to data arriving on the pipe, but the more CPU it will use as it spins round the loop. The longer the 'wait', the more lag it has for data coming back. That's what I'm trying to avoid by blocking on the read, but with a way to escape after some timeout. I'm guessing the call to 'pipe next:' is a primitive, and blocks there, which is why valueWithin:onTimeout: doesn't return after the timeout, but does eventually return the correct answer. So, I'm guessing I'll have to do something like this:  *  Set up a semaphore  *  Fork the blocking read process, which will signal the semaphore if it ever returns its 32 bytes  *  In the main thread, wait for up to 3 seconds for the semaphore to be signalled  *  If the semaphore times out, kill the forked process Obviously there's a potential race at the end there, but the worst case is we throw away data which was returned at the last moment. Is there anything else you can see wrong with this approach? Thanks, Dave On Thu, Jan 9, 2014 at 9:16 PM, Ron Teitelbaum [via Smalltalk] [hidden email] wrote:    Hi Dave,    See #dataAvailable ??and #recieveAvailableData.    It's never good to call for data if you don't know you have any. ??Better to    setup a wait for data until call instead. ??    All the best,    Ron Teitelbaum    Head Of Engineering    3d Immersive Collaboration Consulting    [hidden email]    Follow Me On Twitter: @RonTeitelbaum    www.3dicc.com    https://www.google.com/+3dicc    -Original Message-    From: [hidden email] [mailto:[hidden email]    [hidden email]] On Behalf Of dsl101    Sent: Thursday
RE: [Newbies] Pool Variables
Hi John, You might want to parse a configuration file but you are not sure where it is used. You could share these values using pool variables. It actually is useful but you can certainly accomplish this may other ways. All the best, Ron Teitelbaum -Original Message- From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- boun...@lists.squeakfoundation.org] On Behalf Of Joseph J Alotta Sent: Monday, July 01, 2013 11:16 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Pool Variables Just curious, can someone give me an real life example of when you would need to use pool variables and no other variable would work? On Jun 29, 2013, at 7:00 AM, beginners-requ...@lists.squeakfoundation.org wrote: Yes, class variables will be visible to subclasses of subclasses and so on. Also, I didn't mention pool variables, but 99.9% of the time you won't want to use those. ___ 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
RE: [Newbies] classes and code snippets to download a web page
From: Joseph J Alotta Sent: Friday, May 24, 2013 1:08 PM Greetings, I am looking for classes and code snippets to download a statement from my mutual fund company. It would have to login, submit the password and then download from a link. Does anyone have code that does this? Hi Joe, Have a look at WebClient httpGet: 'http://yourAddress.com/yourLinkToDownload' It handles everything you need. All the best, Ron Teitelbaum Head Of Engineering 3d Immersive Collaboration Consulting r...@3dicc.com Follow Me On Twitter: @RonTeitelbaum https://twitter.com/RonTeitelbaum www.3dicc.com http://www.3dicc.com/ 3d ICC on G+ https://plus.google.com/u/0/b/108936249366287171125/108936249366287171125/p osts Sincerely, Joe. ___ Beginners mailing list mailto:Beginners@lists.squeakfoundation.org Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Testing = and == in workspace
Hi Ben, Have a look at the method for yourself. Check out the method = on the instance side of String. It should be pretty obvious when you get to the actual string comparison. All the best, Ron Teitelbaum -Original Message- From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- boun...@lists.squeakfoundation.org] On Behalf Of Ben Coman Sent: Saturday, January 07, 2012 12:15 AM To: A friendly place to get answers to even the most basic questions about Squeak. Subject: [Newbies] Testing = and == in workspace I was trying to confirm the operation of = and == in the workspace by executing the following code.. x := 'xxx'. y := 'xxx'. z := x. (OrderedCollection new) add: (x = y) ; add: (x == y) ; add: (x=z); add: (x==z); yourself. I was confused that I was getting anOrderedCollection(true true true true) It was not until I changed to the following code... x := String newFrom: 'xxx'. y := String newFrom: 'xxx'. z := x. (OrderedCollection new) add: (x = y) ; add: (x == y) ; add: (x=z); add: (x==z); yourself. that I got the expected anOrderedCollection(true false true true) I was curious what was going on in the first case. cheers, Ben ___ 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
RE: [Newbies] Anyone knows why Sophie was migrated from Squeak/Smalltalk to Java?
Hi David, Couldnt find johns comment. Any pointers? I like this comment: You'd probably have an easier time finding skilled Amiga users than skilled smalltalk developers. Thats pretty funny. Ron From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of David Mitchell Sent: Wednesday, June 22, 2011 12:44 PM To: A friendly place to get answers to even the most basic questions about Squeak. Subject: Re: [Newbies] Anyone knows why Sophie was migrated from Squeak/Smalltalk to Java? The squeak-dev list archives are great for questions like this, google site:lists.squeakfoundation.org/pipermail/squeak-dev/ sophie java John McIntosh pointed in his reply to this thread on slashdot: http://ask.slashdot.org/story/08/10/03/1547256/How-To-Kill-an-Open-Source-Pr oject-With-New-Funding?art_pos=1 There are some great comments in that thread. On Wed, Jun 22, 2011 at 11:27 AM, Offray Vladimir Luna Cárdenas off...@riseup.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I'm searching for inspiration about my Pharo project (I want to make something like Prezi[1]). So I was revisiting the Sophie project pages and an old question came back: Why Sophie was migrated from Squeak/Smalltalk to Java? Anyone could help me with the answers? [1] http://prezi.com/ Cheers, Offray -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJOAhfmAAoJEGiex2828ICwausH/1BU6G4KBT9XDp4CjH46ONTA kMsWx8i+/sVVA1Q9mJhHLa+Gz5D6/LszfLTuaRZDTBBYNxEN/SQb3ELsdBui+CjV IDkLsLqP7aDK3gG9di+7wESrO54s8klDCAn1NCUhzJ7K1gaUqSDHd506yyzsq0Vx 5XzfIXDqB7UW6dU6cpESTcWaLmv0gSaOtDNOD4NnLWovqKKf0Ucup6Y5zqkt+X0I tHEQbYnAwF6O9bi4hv61sgXq8NdMqrlc47tDswydMiLG31WWlPKGAihdftLvCv3S wHD1tLCWTSf03u8uvvuauLt1cpV8P+CwE1sihhUn91u39ClXcYA3Ya+SQQ350/g= =6WQt -END PGP SIGNATURE- ___ 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
RE: [Newbies] I don't get it
Hi Erlis, Class based language is very difficult for some people to grasp. I've trained a number of programmers. There is this AH moment when people get it. Before that the idea is just so foreign to them that they have a difficult time grasping what is going on. I would often get the question, but where do I put the code. The answer is everywhere. Thinking in terms of objects and programming their behavior makes sense. People get that. Make a Robot and teach it how to walk. If I tell the robot to walk she does. Ok great. Now I have all these objects that do stuff where do I put the code? This is where people stumble. In my opinion the leap to understanding is very short. The answer is simple. (Answer: It depends on how you want to interact with the user). I do not believe that anything is screwed up. It is just a conceptual model that requires AH! All the best, Ron Teitelbaum Immersive Collaboration Expert 3d Immersive Collaboration Consulting r...@3dicc.com Follow me on Twitter http://twitter.com/RonTeitelbaum twitter.com/RonTeitelbaum http://www.3dicc.com/ www.3dicc.com From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Erlis Vidal Sent: Tuesday, June 21, 2011 9:47 AM To: smalltalk Subject: [Newbies] I don't get it Hi guys, I was reading recently Jim Coplien ideas about DCI and I was surprised with the following statement: The Smalltalk people, when they put together Smalltalk originally the computational model was exactly right, in terms of thinking in terms of objects. And then they screwed it up with the language. The language is so class focused! Most languages that we're saddled with today had made this error. you can find it here: http://blog.redtexture.net/2010/06/01/coplien-on-dci-mvc/ Does someone knows what Jim is criticizing? In which sense the computational model was screwed by the language? I see smalltalk as a language that express very well the intended computational model behind. But that's just me, maybe some of you could help me to understand Jim's point. Thanks Erlis ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: You said you'd get back to me
HI all, It is clear from the message that there are issues. Squeak-dev, beginners, and vm-dev are not an appropriate place for a flame war. Could you please take us off your thread. I would also like to suggest to both of you that you find a way to solve the issues and work together. There is no solution between people without finding common ground. Find the common ground and work together or don't. The rest is a waste of your time and talent. Respectfully submitted, Ron Teitelbaum -Original Message- From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners- boun...@lists.squeakfoundation.org] On Behalf Of Casey Ransberger Sent: Wednesday, June 01, 2011 7:02 AM To: Stéphane Ducasse Cc: bo...@esug.org Board; Guillaume Ollivier; The general-purpose Squeak developers list; Marcus Denker; A friendly place to get answers to even the most basic questionsabout Squeak.; Squeak Virtual Machine Development Discussion Subject: [Newbies] Re: You said you'd get back to me Inline On Jun 1, 2011, at 2:35 AM, Stéphane Ducasse stephane.duca...@inria.fr wrote: Dear Casey So, are you done with whatever crap you had to do with the French military? This is not crap. Sorry but this is the security of our institute and its services. Non inria people cannot log on INRIA servers. This is the rule. I forgot to let you know. I paid respect to you and that at the time. You told me to wait, and I did, but I'm done waiting on you. You said you'd get back to me, but clearly I was not important enough to you for you to keep your word. Can I get started on CI for Squeak now? I do not think so because nobody from our team has the time for that. I kind of have to wonder if you didn't think you were posting on the Pharo list when you replied (I imagine, half awake) to my message to squeak-dev. I must have gotten confused and thought I should listen to you. Are you at liberty to explain why you chose to block my work over a local governmental issue that shouldn't concern the Squeak community or any of its efforts in the least? I think that your sentence above is a bit out of concern. I did not block anything. Now why do you think that the squeak community could pretend anything on us? You asked me to wait, and you're the president of ESUG or something, so I waited for you like a good dog. I'm not French and frankly I'm a bit livid that I've been waiting on you and the French government for this long: no government should ever stall open source work. This is not the point. What's the point then, sir? I'm dying to know what it is. I'm a bit confused by the month of silence I've gotten out of you. I have a life too and not doing pharo all the time. I have been promoted and I have a lot more duties. Oh, right you're busy. I think I mentioned quite a lot of respect for the work you're doing in my first messages to you: did you read them? Aren't you the president of ESUG or something? Don't you have an obligation to unblock people in the Smalltalk community or does that responsibility only extend to Pharo in your mind? I really do not like the contents and implication of the sentence above. I did probably more to squeak than you and from that I imagine that people should respect me. I did more to Smalltalk than people over the last 10 years so if you do not realize that, think about it. I am not implying anything. I asked you a few pretty direct questions, and you're avoiding answering them in a very passive-aggressive way, which is kind of difficult to get behind. As far as your illustrious work with Smalltalk, are you referencing the crap traits implementation or the actual act of dividing our community in half? Alan Kay doesn't seem to have a hell of a lot of problems with answering my questions in a timely manner, and he isn't running ESUG, so at this point, after slogging through the harder, more rigorous route to an MIT license, I kind of have to wonder what your real problem actually is. Seriously, man, what the hell? Seriously I strongly suggest you not to insult me because I do not like that. I'm not insulting you. I'm calling you out into the midway, sir. There's a difference. Come out and dance if you know how sir, elsewise get the hell off the stage. Stef ___ 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
RE: [Newbies] Returned values
Hi Gary, This is a good question. The code is probably lazily instantiating the variable so that it can be used somewhere else. If the class variable was private to the class and not intended to be used by another class and you were only planning on calling it from the class side then it kinda works. If not; you plan to have an instance call the class variable, or another class needs access to this Class variable, then you need some sort of accessor. Have a look at SmalltalkImage class variable StartUpList. There is no public accessor for it. There are values in it. Can you find a way to access that list and see what is in it? You can write code on the class side that references StartUpList (press the class variables button to see the methods that do that, or even highlight StartUpList in a class method of that object and select: Inspect.) but can you find another way? In many cases you need to access the class variable to get information that is relevant to all the class instances, or to get a single class instance (MyObject class myDefaultInstnace) from another class so class variable accessors are required. Ron Teitelbaum From: beginners-boun...@lists.squeakfoundation.org [mailto:beginners-boun...@lists.squeakfoundation.org] On Behalf Of Gary Dunn Sent: Monday, February 28, 2011 3:07 PM To: Squeak Beginners Subject: [Newbies] Returned values While studying DBus code I came across a method that appears to set a class variable and return the value. In DBusConnection sessionBus ^SessionBus := self getBus: 0 from: SessionBus and SessionBus is a class variable. Why return the value? Why not have the sender examine the value of SessionBus? Is it only a matter of style or is this more efficient? Gary Dunn Open Slate Project http://openslate.org ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
[Newbies] Obama -- The Judas Goat
Obama -- The Judas Goat 1/25/2009 By David Duke Judas Goat\ A goat that leads other goats or sheep to slaughter. Also, one who entices into danger and betrays others. The name is an allusion to Judas Iscariot, who betrayed Jesus for 30 pieces of slaughter. (From Merriam Websters Dictionary) Barack Hussein Obama is a Judas Goat. Extremist Jews guided Barack Hussein Obamas career from day one, even all the way back to Harvard Law School. Radical Zionist hitman, David Axelrod previously orchestrated the Jewish-financed and organized defeat of perceived anti-Zionist Sen. Charles Percy. He is the man who ran Obamas campaign for President and who is his chief handler. Obamas campaign was overwhelmingly financed by the most powerful Zionist bankers in the world. His campaigns largest contribution source was the Zionist international banking firm of Goldman Sachs. (FEC campaign records). In both Obamas Senate and Presidential campaign he prostrated himself before AIPAC (American Israel Public Affairs Committee) promising even more money and blood for Israels terrorism than even the supine John McCain, and even more money and blood than the previous Shabbez Goy in the White House, George Bush. Before the Israeli terrorism and mass murder in Gaza, he went to Israel and said that he supported Israels planned murderous terrorism against the men, women and children of Gaza. His first act as President-elect was to appoint a rabid Zionist, Israeli dual citizen who served in the Israeli Army as his Chief of Staff, Rahm Emmanuel. As thousands of women and children in Gaza were killed or maimed, Obama remained silent. Within a few days as President Obama supported indiscriminate American missile strikes in villages of our ally Pakistan, a clear continuation of Bushs policies. He completely supports the theft of trillions of American taxpayer dollars to the Zionist international bankers. Eighty percent of American Jews voted for Obama, and all the main leaders of the Jewish Supremacist state of Israel have proclaimed Obama as the perfect man for U.S. President. What better for the Zionists to have their own servant perceived as a clean break from the Jewish extremist-controlled Bush administration? What better than for the Zionists than to have their Shabbez Goy be treated by the worlds press and even by much of the anti-Zionist community as a man of real change? What better for the Zionists than for the world to think that Obama will be a change from the Zionist-controlled policies when he willing to do anything that Israel demands? What better for the Zionist murderers to have their craven puppet be looked at by the whole world as a man of honor and integrity and fairness. In the slaughterhouse, the Judas Goat is often painted with bright colors, adorned with strong, sweet scents to lure the sheep to their pens and to their death. Obama, the Judas Goat of our time, is looked upon by millions of Zionist-propagandized sheep as the man who will lead them to salvation. Instead, he leads America, Palestine and the world to the bloody altar of Jewish Supremacism. Any supposed anti-Zionist who praises Barack Obama is actually aiding this Judas Goat to lead us all to slaughter. Every person who truly opposes Jewish extremism must speak out and expose the Judas Goat named Barack Obama! -- Dr. David Duke Former Member of the House of Representatives State of Louisiana United States of America It is up to you the people of the United States who can still think freely, and up to all of the people of the world who are able to see through the deceptions of the Zionist-influenced Global media -- to get this simple, powerful message to everyone on earth. Email this message to your friends, post it on forums and websites and put links to it on every website, facebook or other media in the world. Go and seek out media and Internet sites not controlled by Zionist power. Make youtube videos of this message, (use the short audio and find good illustrative pictures) and post it untill your fingers are worn and tired, print it and mail it to newspapers or any media outlet that has still not fallen under the propaganda of the Zionists. Let the world know the truth. Person by person, in the USA, Canada, UK, France, Germany, Italy, japan, Russia, China, Africa, Palestine, South America and across the whole world this Judas Goat must be exposed for what he is, so that when begins to do his evil for Israel, the whole world will know exactly what is going on and resist! Source : http://www.davidduke.com/general/obama-the-judas-goat_7317.html Why is the President of Israel, the terrorist who just oversaw the Zionist mass murder and maiming of thousands of Palestinians so happy that Obama is President of the USA? by David Duke Read the excerpt from the Israeli News about how President Perez and Israel think that Obamas becoming U.S.
RE: [Newbies] Obama -- The Judas Goat
Thank you for sending it on. This email was not from my address but from someone that just used my address as the return to address. Please ignore ignorance whenever possible! You can verify that this is not from me by noticing that the header from this email does not match the one from the email you forwarded listed below (see id: 20090125165853.ilsr28583.cdptpa-omta05.mail.rr@ihkmn). Thanks, Ron Received: (qmail 20810 invoked from network); 25 Jan 2009 16:59:06 - Received: from unknown (HELO p3presmtp01-07.prod.phx3.secureserver.net) ([208.109.80.156]) (envelope-sender beginners-boun...@lists.squeakfoundation.org) by smtp23-01.prod.mesa1.secureserver.net (qmail-1.03) with SMTP for r...@usmedrec.com; 25 Jan 2009 16:59:06 - Received: (qmail 25142 invoked from network); 25 Jan 2009 16:59:06 - Received: from box2.squeakfoundation.org ([85.10.195.197]) (envelope-sender beginners-boun...@lists.squeakfoundation.org) by p3presmtp01-07.prod.phx3.secureserver.net (qmail-ldap-1.03) with SMTP for r...@usmedrec.com; 25 Jan 2009 16:59:05 - Received: (qmail 14525 invoked from network); 25 Jan 2009 16:58:59 + Received: from unknown (HELO box2.squeakfoundation.org) (127.0.0.1) by localhost with SMTP; 25 Jan 2009 16:58:59 + Return-Path: r...@usmedrec.com Delivered-To: list-beginn...@lists.squeakfoundation.org Received: (qmail 14507 invoked from network); 25 Jan 2009 16:58:56 + Received: from unknown (HELO cdptpa-omtalb.mail.rr.com) (75.180.132.121) by box2.squeakfoundation.org with SMTP; 25 Jan 2009 16:58:56 + Received: from ihkmn ([74.78.228.234]) by cdptpa-omta05.mail.rr.com with ESMTP id 20090125165853.ilsr28583.cdptpa-omta05.mail.rr@ihkmn for beginners@lists.squeakfoundation.org; Sun, 25 Jan 2009 16:58:53 + From: Ron Teitelbaum r...@usmedrec.com To: beginners@lists.squeakfoundation.org Content-Type: text/plain; charset=US-ASCII Date: Sun, 25 Jan 2009 17:58:53 +0100 X-Priority: 3 Message-Id: 20090125165853.ilsr28583.cdptpa-omta05.mail.rr@ihkmn Subject: [Newbies] Obama -- The Judas Goat X-BeenThere: beginners@lists.squeakfoundation.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: r...@usmedrec.com, A friendly place to get answers to even the most basic questions about Squeak. beginners@lists.squeakfoundation.org List-Id: A friendly place to get answers to even the most basic questions about Squeak. beginners.lists.squeakfoundation.org List-Unsubscribe: http://lists.squeakfoundation.org/mailman/listinfo/beginners, mailto:beginners-requ...@lists.squeakfoundation.org?subject=unsubscribe List-Archive: http://lists.squeakfoundation.org/pipermail/beginners List-Post: mailto:beginners@lists.squeakfoundation.org List-Help: mailto:beginners-requ...@lists.squeakfoundation.org?subject=help List-Subscribe: http://lists.squeakfoundation.org/mailman/listinfo/beginners, mailto:beginners-requ...@lists.squeakfoundation.org?subject=subscribe Sender: beginners-boun...@lists.squeakfoundation.org Errors-To: beginners-boun...@lists.squeakfoundation.org X-Nonspam: None -Original Message- From: William Barnett-Lewis [mailto:wlewis...@gmail.com] Sent: Sunday, January 25, 2009 12:03 PM To: r...@usmedrec.com Subject: Re: [Newbies] Obama -- The Judas Goat Go away baby. Forwarded to the FBI ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Best place to ask Smalltalk questions?
Hi Sean, ok i have another. lets take something that in a sql driven environment would be a lookup table. countries and states. what the the smalltalk way with this? There are a number of patterns for this. Not all of them are strictly object oriented. The easiest way to do this is to use a database to hold and coordinate the data. Then you would query for the data and instantiate objects as needed (and maybe cache some frequently used ones). Your suggestion of using a class variable or a class method that is responsible for creating all of your instances also makes sense. You can either build all the instances and save them in your image or build the instances during startup or lazily when needed. You need to have some root to hold those new instances to keep them from being garbage collected. This can also be done with a class variable. Just set a class variable to a collection of your instances, then use that variable to lookup your instances. Having an external file is also a good way to go. The same issues arise from the file as for putting the data in a method, but benefit of using the file is that your data is not saved in code and can be updated without changing your running image, although your image needs to know when the file changes so that it can refresh your instances. Hope that helps, Ron Teitelbaum ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] SSH server in Squeak
Hi Aditya, I believe that Rob did write an SSH server and/or client but I haven't had time to review it and use it yet. It's in the cryptograpy package available on SqueakSource. http://www.squeaksource.com/Cryptography.html Please feel free to sign up on the cryptography mailing list anyway, and let us know how it works for you. Thanks, Ron Teitelbaum Squeak Cryptography Team Leader _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aditya Siram Sent: Thursday, May 08, 2008 12:24 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] SSH server in Squeak Hi all, I was wondering how to get an SSH server working in Squeak. I was told that this service has been implemented but I can't find any documentation. I originally posted to the Seaside mailing list but this is probably a better forum for it. Thanks ... Deech _ With Windows Live for mobile, your contacts travel with you. Connect on the go. http://www.windowslive.com/mobile/overview.html?ocid=TXT_TAGLM_WL_Refresh_m obile_052008 ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] [ANN] Learn Morphic and have fun
Hi Edgar, I'm sure I'm not the only one that noticed that you did quite well in the election. A hand full more votes and you would have been in. Good luck with your project. Ron -Original Message- From: Edgar J. De Cleene Folks: As I said in my failed campaign for have a place in the Board, could dedicate a 3 hours a day as average to Squeak. I intend to be on #IRC from roughly 7:30 to 10:30 Argentina time (10:30 to 13:30 GMT) I pick as starting project to develop with all wishing to join this http://wiki.squeak.org/squeak/6047. To Jerome Peace in case you read this, I miss your mails and hope you don't mind I take some of you. The project is to be developed in Morphic (no Etoys as soon they go out of basic image) in a official http://ftp.squeak.org/3.10/ Squeak3.10-7159-basic.zip Sources is same as 3.9, VM of 3.9 should work. Collateral I test on FunSqueak and maybe in others versions of Squeak. I just do very rough project and save on swiki, so I hope questions and feedback of any wishing learn (or teach) and have fun. Read you on #irc ! Edgar ___ 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
RE: [Newbies] Re: [Webteam] Suggestion for Squeak Website
I responded to her but did it off list. (Didn't hear back) Ron -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Brad Fuller Sent: Thursday, February 28, 2008 9:20 PM To: Costello, Barbara A (Barbara); [EMAIL PROTECTED]; Beginners@lists.squeakfoundation.org Subject: [Newbies] Re: [Webteam] Suggestion for Squeak Website I really don't know, Barbara, I've never had too! However, there are many people that can help you. I've CC'd the Beginner's forum to this reply. If anyone has an answer for Barbara, please reply and include her personal email address. BTW, you can join the Beginner's forum here: http://lists.squeakfoundation.org/mailman/listinfo/beginners While you're waiting, you can also search our wiki located here: http://wiki.squeak.org/squeak brad more info: http://squeak.org/ On Thu, Feb 28, 2008 at 7:44 AM, Costello, Barbara A (Barbara) [EMAIL PROTECTED] wrote: do you know if there is anyway to print something from squeak long story, but my children made a great drawing in squeak for a school project - but neither the teacher or me can figure out how to print. we spent hours on the picture, there has to be a way...hopefully... Barbara Costello Avaya Government Solutions 703-310-3732 -- Brad Fuller www.bradfuller.com ___ 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
RE: [Newbies] Re: [Webteam] Suggestion for Squeak Website
Wait I take that back I did hear back from her. This is what she wrote: THANK YOU THANK YOUTHANK YOU! YOUR A LIFE SAVER. -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Brad Fuller Sent: Thursday, February 28, 2008 9:20 PM To: Costello, Barbara A (Barbara); [EMAIL PROTECTED]; Beginners@lists.squeakfoundation.org Subject: [Newbies] Re: [Webteam] Suggestion for Squeak Website I really don't know, Barbara, I've never had too! However, there are many people that can help you. I've CC'd the Beginner's forum to this reply. If anyone has an answer for Barbara, please reply and include her personal email address. BTW, you can join the Beginner's forum here: http://lists.squeakfoundation.org/mailman/listinfo/beginners While you're waiting, you can also search our wiki located here: http://wiki.squeak.org/squeak brad more info: http://squeak.org/ On Thu, Feb 28, 2008 at 7:44 AM, Costello, Barbara A (Barbara) [EMAIL PROTECTED] wrote: do you know if there is anyway to print something from squeak long story, but my children made a great drawing in squeak for a school project - but neither the teacher or me can figure out how to print. we spent hours on the picture, there has to be a way...hopefully... Barbara Costello Avaya Government Solutions 703-310-3732 -- Brad Fuller www.bradfuller.com ___ 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
[Newbies] FW: [Webteam] Suggestion for Squeak Website
Here's what I sent. Ron From: Ron Teitelbaum [mailto:[EMAIL PROTECTED] You are quite welcome! Have fun!! Ron From: (Barbara) THANK YOU THANK YOUTHANK YOU! YOUR A LIFE SAVER. From: Ron Teitelbaum [mailto:[EMAIL PROTECTED] It sounds like you had some fun. If you are running on a windows machine then you can just print the screen. To do that, do the following. On a laptop press these three buttons down. So that they are all down at one time. Ctrl Fn Print Scrn the Fn and Print Screen are usually in a different color like blue or green. On a regular keyboard just press Ctrl Print Scrn. The button is usually in a block in the top just right of the regular keys. Now you have your image in memory on your computer. To print it you need to put it into a printable document. If you have Word then you can open word and select Edit-Paste from the menu, or you could press Ctrl v. This will place the picture into the file and you can print it. If you do not have Word, then look for Programs Accessories WordPad. Open WordPad and then paste as above by using either Edit - Paste from the Menu, or pressing Ctrl and v together. I hope you had fun with squeak. Dont forget to check out Scratch. Scratch is the Squeak software written at M.I.T. that allows your kids to make their own games. They can even put their own pictures in. Its really fun, even for old fogies. Hope that helps, Ron Teitelbaum From:(Barbara) do you know if there is anyway to print something from squeak long story, but my children made a great drawing in squeak for a school project - but neither the teacher or me can figure out how to print. we spent hours on the picture, there has to be a way...hopefully... Barbara Costello Avaya Government Solutions ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] How to empty a collection?
Hi Marcin, I'm not a fan of using #become. I will use it for very specific behavior when I need to retain pointers to an object. For example for implementing a proxy. In that case become is a very useful tool. I think that #become is overkill for this situation, but I won't argue that it doesn't work. In most cases you have a well encapsulated collection. That collection is not referenced outside the object so you can just reinitialize your collection without #become. If it is complicated enough to worry about pointers I wouldn't use #become. Someone will get lost and miss your #become hidden inside #removeAll: . I'm not saying this will cause problems but I think I would rather work with the collection directly instead of using the #become. Also if you are working on a collection that is large enough to worry about performance then you are probably missing a database that would significantly improve your performance. Ron Teitelbaum From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marcin Tustin Sent: Monday, February 18, 2008 8:43 PM To: A friendly place to get answers to even the most basic questions aboutSqueak. Subject: Re: [Newbies] How to empty a collection? My own testing suggests that references to the object remain in place. I would guess that that is the whole point of become. On Feb 19, 2008 1:38 AM, cdrick [EMAIL PROTECTED] wrote: Isn't Cedrick's aida solution going to be significantly faster? this is not mine :) butI'd interested to see if it's a good use of #become:... Does it keep references ? is it safe ? Thanks ___ 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
Squeak Board Member Responsibilities (was: [Newbies] Squeak Foundation Election 2008 coming up!)
Hi Richard, I'd be happy to summarize the responsibilities of the Squeak Foundation board members. The board members are elected by the community to help the community address issues. The issues depend on what the community wants done but more specifically what the elected board members are capable of accomplishing, given their abilities some but mostly because of limited time to devote to projects. There are no requirements for any activity or participation, nor are there currently any ways to remove board members, or even to replace board members that resign. We elect new members yearly. We are in the process of making a legal entity for the board. When that happens, the board will be bound by more formal rules relating to not-for-profit entities. But the ultimate responsibilities for that will be the Software Freedom Foundation Conservancy who will have the ultimate say, which protects board members. At that time I believe we do have a way to replace board members that resign. We are also in the process of re-licensing Squeak, with the help of Viewpoints Research Institute www.vpri.org . The board and the community are participating in that to help accomplish this task. If you received an agreement from VPRI and haven't sent it in please take a moment and do it!! We are also in the process of figuring out if a Technical Board should be formed that would have more responsibilities to lead the development of Squeak and be the final arbitrator of where we go technically, but this was only suggested by some current board members but hasn't happened yet. The current board meets on a monthly basis by IRC (so no travel required). They communicate also by a private email list. There was talk about allowing prior board members continued access to that list with no voting rights for advice (a board member emeritus status), but I'm not sure if that suggestion was ever followed up on. The previous board would post the notes of the meetings. This one did not or did not do it very often. There are some other responsibilities to keep the community running, servers, administrators, fund raising, groups responsible for code like network, VM, kernel ... and a number of volunteers that help keep things going. Those groups are semi-autonomous, because they are volunteers and because many of those groups existed before there was a board. I would think that they would consult with and heed the advice of the board if something warranted it. Mostly they keep going because they kept going in the past and because of some very talented, hard working and dedicated individuals. Now some disclaimers; I am not a lawyer, nor am I a board member, so take all this with a gain of salt. If I misstated anything I'm sure others will correct me, and if I left anything out please feel free to add to this summary of responsibilities. I just did this off the top of my head. Don't for get to register with squeak people http://people.squeakfoundation.org get certified and VOTE!! If you are planning to run for the board please announce your candidacy to squeak-dev by Feb 22, 2008. If you need to have your password changed on squeak people email: [EMAIL PROTECTED] . Happy Squeaking! Ron Teitelbaum Squeak Elections Team Member -Original Message- From: Richard Karpinski Maybe everybody knows, but could you summarize the duties and the activities of board members so that people could tell easily whether this would be an honor they would like to carry for a year? For example, does board membership require or encourage international travel or other activities involving serious time and financial commitments? And what effect do board decisions have, anyway? Dick Karpinski, a definite non-candidate On 2008, Feb 5, , at 4:00, beginners- [EMAIL PROTECTED] wrote: A year has passed (oh, so quickly) and it is time to reflect a bit and ramp up your democratic rights here in Squeak country! Every year we elect the Squeakfoundation Board (http://www.squeak.org/Foundation) consisting of seven members from our community. ___ 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
RE: [Newbies] Overriding methods
Hi Blake, There are a number of ways to initialize an object. Overridding #new is an acceptable practice but normally this is done because you do not want a new object created. For example if you wanted to have only one instance of an object you might override #new to lookup your instance and return that instead. Sometimes calling #new on class is a bad idea, either this class shouldn't have instances, or there are other instance creation methods that should be called instead. (We usually don't override new because of other instance creation methods but I can understand the argument if someone did) For example FishTank classnew new should not be called please use instance creations methods instead self error: 'Please use instance creation methods and not #new FishTank classnewForGallons: numberOfGallons Create a fishTank that holds numberOfGallons aTank := super new. call super to bypass error aTank numberOfGallons: numberOfGallons. aTank calculateGlassForGallons. aTank calculateTopSizeForGallons. aTank calculateNumberOfLightsForGallons. ^aTank Ok so this is kinda silly but I hope you get the idea. This is what happens when I make stuff up on the spot! Ok so in most cases you can set your object up in #initalize FishTankinitialize set up default values for aFishTank self glassSides: OrderedCollection new. self numberOfLights: 0 copy. self tankShape: #rectangle but you might want to change that setup during instance creation. Let's move our setup code to the instance side. FishTankcalculateTankProperties use the information provided to create a tank self calculateGlassForGallons. self calculateTopSizeForGallons. self calculateNumberOfLightsForGallons. Now change your original code to this: FishTank classnewForGallons: numberOfGallons Create a fishTank that holds numberOfGallons aTank := super new. call super to bypass error aTank numberOfGallons: numberOfGallons. aTank calculateTankProperties. ^aTank So that you can call FishTank classnewOctagonalTankForGallons: numberOfGallons Create an Octagonal tank that holds numberOfGallons aTank := super new. aTank shape: #octagon. aTank numberOfGallons: numberOfGallons. aTank calculateTankProperties. ^aTank. Ok so now your code that figures out the number of sides and amount of glass to use can reference shape and figure things out. Of course I would not use hardcoded shapes in my code instead on the class side I would create a protocol called Constants Then I'd create a method called in Constants FishTank classoctagonalShape return a symbol that represents an eight sided fishtank ^#octagon Then I'd call aTank shape: self octagonalShape. Instead. You could also extend your class hierarchy to support different tanks. FishTank subclass: RectangleFishTank and FishTank subclass: OctagonalFishTank Now you can use your instance creation method to find out what instance to create. This makes things much easier because now your code for calculating number of sides and amount of glass can just be written in each class and all your self shape = self class octagonalShape ifTrue ... code goes away. RectangleFishTank classshape return the shape of this subclass fishtank ^self rectangleShape OctagonalFishTank classshape return the shape of this subclass fishtank ^self octagonalShape FishTank classnewForShape: aShape numberOfGallons: aNumberOfGallons return a new instance of a subclass matching aShape that holds aNumberOfGallons aClass := self allSubclasses detect: [:aClass | aClass shape = aShape] ifNone: [NotAFishTankShapeThatWeSupportException signal]. ^aClass newForGallons: aNumberOfGallons. And you can simplify your initialize with FishTankinitialize set up default values for aFishTank self glassSides: OrderedCollection new. self numberOfLights: 0 copy. self tankShape: self class shape. Ok so back to someone else point. What are you trying to do? Hope this helps some. Try not to override #basicNew, and only override new if there is something about creating instances you want to change. If you are trying to affect how things are created there are lots of ways to make this happen without changing new. Happy Squeaking! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists -Original Message- From: Blake Hey, all: I figure this is a beginner question. I get a big warning when I override certain methods. (Class methods?) For example, if I want to set up the contractless part of my object, I do so by overriding #basicNew, and then setting the values that allow the instance of the object to function. This seems perfectly
[Newbies] Reminder - Check your Squeak People Email or Sign up to vote
Hi all, I thought I'd send out a reminder about the Squeak Foundation Board Elections. If you would like to vote in the upcoming Squeak Foundation Elections, you should check your email address on Squeak People. http://people.squeakfoundation.org/ . Please make sure you have access to your squeak people account, check that you included your name and that the supplied email is correct. If you need help accessing your account please let me know. You will need access to the email supplied to receive a ballot. If you have not signed up for a squeak people account and you would like to vote in the election please sign up and then encourage people you know to certify you. Only Squeak People members that have a certification of Apprentice or higher have supplied a real name and a valid email will receive a ballot to vote in the election. This is only a reminder about Squeak People. We have not set the voting schedule. Please stay informed, get involved in the upcoming election and remember to please vote. Also I'd like to express our thanks to Ken Causey for helping us get the tools we needed to better run the election this year. Thanks Ken! Happy Squeaking, Ron Teitelbaum Squeak Elections Team Member ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
[Newbies] Give One. Get One. Now!!
Hi All, This is just a reminder that you can now help the OLPC project by purchasing XO laptop's. You will give one to a child in the developing world and get one for yourself. The Give One. Get One. program is only available for a limited time so don't delay. http://news.squeak.org/2007/11/13/give-one-get-one-now/ Or go directly to: http://www.laptopgiving.org/en/index.php Check out a cool review: http://news.squeak.org/2007/10/05/pretty-cool-nytimes-olpc-review/ Thanks, Ron Teitelbaum ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Smalltalk Javascript
Hi Ikem, I believe you are looking for Seaside. Seaside supports Ajax. Have a look at www.seaside.st . You get all the JavaScript you want plus more! Hmm, I was just reading your email more carefully. So to be clear this would give you the ability to use an external browser to access a Squeak Server running Seaside. That browser can then access squeak, render widgets, windows, google maps... You can embed an external browser into squeak by using a RFB window running in Squeak, but this only gives you VNC like capabilities (which means you need to have a browser running on a server for each connection). There is also Dan's work which allows you to run squeak in JavaScript: http://news.squeak.org/2007/10/05/dans-the-man-check-out-dan-ingalls-work-sq ueak-in-javascript/ but again this may be opposite of what you are asking. If indeed you need to control Google maps on a widget in Squeak you might have to write the conversation yourself. Oh and I found this, but I've never used it so your mileage may vary. http://www.squeaksource.com/ST2JS.html Happy Coding! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists www.USMedRec.com -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Ikem Nzeribe Sent: Saturday, November 03, 2007 10:22 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Smalltalk Javascript Hi all ;-) I'm pretty new to Squeak, and am just trying to assess what I can do. I know there's a web browser for Squeak, but I was wondering if there is any way to handle Javascript in this environment at all? It seems not... is there a reason for that? I would love to run GoogleMaps from within the Squeak environment. If it is not implemented, what would it take to get it done? Cheers, ikem.star ___ 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
RE: [Newbies] Ordered Set?
Hi itsme, I see that you have been asked already but, could you please give us a name we can use besides itsme213? You can use SortedCollection. SortedCollection new sortBlock: [:a :b | a index b index]. This provides ordering but does not eliminate duplicates. That can be accomplished pretty simply by checking for uniqueness before adding to the collection. You could also use a Dictionary, if your data is not too large. aDict := Dictionary new. aDict at: anObject index ifAbsentPut: anObject. This provides both sorting and set like operations (again by checking for uniqueness before adding). Otherwise just use OrderedCollection and manage order and uniqueness manually. The class has all the methods you need to do so. Happy Coding! Ron Teitelbaum -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of itsme213 Sent: Saturday, November 03, 2007 11:27 PM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Ordered Set? I have ordered collections of things without duplicates and with an index 1...N for each, ideally with operations like move: anExistingElement to: anExistingPosition What should I use? I could not find an OderedSet? ___ 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
RE: [Newbies] Concrete classes... multiple users
Hi John, Good luck with your project. By the way if you haven't already heard about it you might want to look at Glorp. Glorp is an object to RDBMS mapping system for Smalltalk (written in VW but ported to Squeak). It is possible that it is more complicated then you need but you may find that it is very useful. Reading the documentation may also give you some idea of the types of issues that you may encounter in your system. It does sound like you are having fun. There is nothing like solving real problems for learning. Happy coding!! Ron -Original Message- From: John Almberg Hi Ron, In a nutshell, I have an application that needs to read Items from a database. I recently discovered that in Smalltalk classes are real objects. This struck me as cool, so when I was deciding how to instantiate these Items, I thought, hey I'll use the class object as a factory (actually, I think it's more of an adapter pattern, but...) So I taught the Item class object how to talk to the database, including username/password, and then I was able to do something like: item = Item findById: 2 And items from the database were instantiated as Items, seemingly by magic. This seemed so intuitive and simple, and just 'right'. It encapsulated and hid the whole legacy database messiness and adapted the database fields into the Item attributes I really needed. Best of all, it could later be reprogrammed to talk to a slightly different database and adapt that database's fields into exactly the same Items, so the rest of the program didn't have to know it was talking to a different database. The problem arose when I needed to talk to more than one database *at the same time*, since the Item class was programmed to talk to a specific database. The only way to talk to another database was to update the class variables before asking for the new Item. This was ugly and, worse, the Item users had to know that there were different databases to deal with. Anyway, yesterday I realized I needed multiple objects to connect to multiple databases. I figured I had two choices: - subclass the Item class - refactor entirely and build something like an ItemAdapter class, who's instantiated objects would connect to the database, create Item objects, initialize them from the data records, and hand them to the Item consumers. The second choice seemed the better, so that's what I did. So, I think it was a case of falling in love with a cool feature, and then mis-applying it, just because it was dying to be used. Hope this explains it... I'm afraid I don't always get the jargon right, but that's why I'm a newbie, I guess! -- John On Oct 26, 2007, at 10:48 PM, Ron Teitelbaum wrote: Hi John, I read your question, but had some trouble trying to understand what you did or why you are having trouble now that you have to connect to multiple databases. You say that you have only one Item class. That's good because your domain classes shouldn't be affected by your backend database. You mention a factory to decide on and build your adapter. That's good too because based on some rule you would need to figure out what database to use. Then I get foggy, you say you have to change class variables. Ok so I'm guessing that your factory sets the class variables which hold your adaptors that are used to pull items. I think your question is: how can I keep from having to change database adapter class variables? If this is not your question please let me know. The answer to that question is to modify your model to provide the flexibility you need so that you can supply adaptors to your application. Don't use class variables, use some other object instead. Classes are cheap if you need more functionality. There is some rule that you are modeling that tells you when you need one database versus another database. You already have adapters that handle the different databases, so you only need to build a new object to hold those database sessions, built from your factory, and some session manager that knows when to attach and which adapter to use. So build a session manager, that holds multiple database sessions (adapters), and code the logic for picking a session on the manager. When global behavior stops being global move from class side (and class variables) to a new class instance and model there instead. Let me know if any of that wasn't clear, feel free to provide more specific information about what you are trying to do. Happy Coding!! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists From: John Almberg One of the cool things, I think, about Smalltalk is that Classes are objects... i.e. concrete factories that can be modified at runtime to produce objects
RE: [Newbies] Concrete classes... multiple users
Hi John, I read your question, but had some trouble trying to understand what you did or why you are having trouble now that you have to connect to multiple databases. You say that you have only one Item class. That's good because your domain classes shouldn't be affected by your backend database. You mention a factory to decide on and build your adapter. That's good too because based on some rule you would need to figure out what database to use. Then I get foggy, you say you have to change class variables. Ok so I'm guessing that your factory sets the class variables which hold your adaptors that are used to pull items. I think your question is: how can I keep from having to change database adapter class variables? If this is not your question please let me know. The answer to that question is to modify your model to provide the flexibility you need so that you can supply adaptors to your application. Don't use class variables, use some other object instead. Classes are cheap if you need more functionality. There is some rule that you are modeling that tells you when you need one database versus another database. You already have adapters that handle the different databases, so you only need to build a new object to hold those database sessions, built from your factory, and some session manager that knows when to attach and which adapter to use. So build a session manager, that holds multiple database sessions (adapters), and code the logic for picking a session on the manager. When global behavior stops being global move from class side (and class variables) to a new class instance and model there instead. Let me know if any of that wasn't clear, feel free to provide more specific information about what you are trying to do. Happy Coding!! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists From: John Almberg One of the cool things, I think, about Smalltalk is that Classes are objects... i.e. concrete factories that can be modified at runtime to produce objects in different ways, depending on the runtime situation. I just find this so much more intuitive, compared to how classes are done in other languages... But I think I may have used it in a naive way... For example, I needed an Adapter class that could produce standard Item objects by connecting to a variety of legacy database tables, converting the non-standard item records into standard Item objects. This way, the consumer of those Item objects doesn't care where the items come from. Originally, I thought I would only have to make these connections, one at a time. I.e., I'd program the Item class 'factory' with the legacy database hostname, username, password, and then just start asking for Items. The Item class would then go out to the database, fetch the proper row, create an Item object, initialize the instance variables, and return it to the Item object consumer. This is intuitive, cool, and it works. Then the requirements changed and I needed to connect to multiple database *at the same time*. But there is only one Item class object! This really muddles things up, because I basically have to update the Item class variables every time I need an Item object. No longer cool! Did I just misuse this feature? Should I have built two Adapter Objects, instead? Am I missing something obvious? Is a little knowledge a dangerous thing? :-) TIA... John ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] how do I get Seaside up on my Squeak?
Hi, It's nice that your first post is to help someone else! It's very nice to have you here, welcome!! Ron Teitelbaum From: Prashanth Hebbar Hope this helps. By the way, this was my first posting on this mailing list. Thank you. Cheers, Prashanth Hebbar ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Re: Semaphore problems
Hi Jason, Im not really sure what you are trying to do but this works too. semA := Semaphore forMutualExclusion. semB := Semaphore new. [semA critical: [Transcript show: 'b1'; cr. semB signal. semA wait.]. Transcript show: 'b2'; cr. semB signal. ] fork. [semB critical: [Transcript show: 'a1'; cr. semA signal. semB wait.]. Transcript show: 'a2'; cr. ] fork. Semaphore forMutualExclusion signals the semaphore so that you can get into the first critical block. The critical block is what does the code blocking. SemB signal allows the second thread in while semA wait keeps the block from exiting. Then semA signal allows the first block to continue, but semB wait keeps the second block from exiting. Then semB signal allows the second block to continue, and since both forked blocks complete they disappear. There are a lot of ways to make this easier, but I think its good to look at these constructs closely, if you are planning to work with threads. Check out SharedQueue for thread safe processing. Also have a look at Mutex for other Semaphore behavior. Good luck! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists www.USMedRec.com From: Jason Shoemaker This is probably a safer version. It works for me. semA := Semaphore new. semB := Semaphore new. thread1 := [Transcript cr; nextPutAll: 'b1'. semB signal. semA wait. Transcript cr; nextPutAll: 'b2'. ] fork. thread2 := [Transcript cr; nextPutAll: 'a1'. semA signal. semB wait. Transcript cr; nextPutAll: 'a2'.] fork. [thread1 isTerminated and: [thread2 isTerminated]] whileFalse: [(Delay forMilliseconds: 100) wait]. Transcript flush Now to move on to another pattern. JTS ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] The #squeak IRC Channel is getting crowded
HEHEHE!! That was pretty funny! Ron -Original Message- From: Blake On Fri, 21 Sep 2007 13:56:44 -0700, Janko Mivšek [EMAIL PROTECTED] wrote: Blake wrote: [EMAIL PROTECTED] wrote: #squeak is getting crowded: Perhaps, but there doesn't seem to be much discussion, at least when I've checked in. (Not complaining, just observing.) Maybe we need more dedicated provocateurs on the channel (just kidding :) Namespaces suck! Perl roolz! Starving kids shouldn't have laptops!! Meh. My heart's not in it. ;-) ___ 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
RE: [Newbies] RE: RE: delegation vs inheritance
Hi Darren, Ok I get it now. Consider a stack and a linked list. The stack is a separate entity that understands how to add and remove from the list. If you only used the linked list there would be no single object to talk too. You could have code that says find the top object from any object you are holding but that would be pretty messy and quite difficult if the one item you are holding onto gets removed. In order to wrap your mind around objects you really need to understand the difference between instances and class definitions. Picture your objects as real things that are created from definitions. (Stack is a definition. aStack := Stack new. aStack is an instance of Stack.) For aStack we have an instance that holds onto a linked list. The Stack instance itself receives messages and operates on the linked lists. You could picture holding a linked list like holding a single monkey out of a barrel of monkeys. Which one would you hold, and it gets complicated when some start getting added or dropped. When you drop the last one back into the barrel you have nothing to hold onto. By creating a stack object we build something that is more natural and understandable then extending a linked list to accept stack messages. Say for example you decide that we will just talk to the first link. It seems odd to have to traverse the list to remove an item and it's not really what a linked list is supposed to do. The best advice I can give you is to see your objects as real things. Knowing when to create a new object or extend an existing object is indeed an important skill. There are some rules you can follow. 1) Methods should be short. You know you are doing things properly when your methods are only a few lines long. 2) Most methods take only a few parameters. If you find you are sending in a huge number of parameters then your class or your methods are too complex. You would probably benefit from creating a Method or Model class. You factor your complex method into a model, the instance variables are usually the parameters of your methods. You will find that having a model class greatly simplifies your program flow and significantly simplifies your code. Where you once were passing the world from one method to the next you can now just say: self myPieceOfTheWorld doSomething. 3) Most instance methods refer to #self. If you are passing in an object and working on that object and your method has an identity crisis (no sense of self) then you are writing your code on the wrong class. Look at your parameters and you will notice that the code really belongs on one of those instead. Writing the code on the right class is a skill worth developing. 4) If you created a door that doesn't open, or that pumps water from your well then you are not modeling the real world. Try to keep the behaviors of your objects to the things they should be doing. Don't add functionality to an object that is really the responsibility of a new, or some other existing object. Feel free to code behavior that belongs to the object but stay true to what that object is meant to do. You will find later that when you look for behavior it's much easier to find if the code is on the object that should be responsible for it. 5) Don't be afraid of creating new classes. Use as many objects as you need but no more! Hope that helps!! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists www.USMedRec.com -Original Message- From: Darren Hi Ron Sorry for the confusion. I'm just using Stack as an example, I don't need to use it. I'm just curios of the design choose between delegating (or forwarding) vs inheritance. Couldn't Stack inherit from LinkedList and specialize it. I'm not questioning the design choose but just trying to learn how to make good design decisions. Regards, Darren Ron Teitelbaum wrote: From: Darren from: Ron Teitelbaum Does that help? Ron Thanks Ron, yes that does help but also what would be the thought process (I know you can't read minds) to choose this approach as apposed to specializing StackLink? -Regards Darren I don't understand your question. What are you trying to do or which thought process doesn't make sense? If you are trying to provide a linked list then you should use Link. If you need a stack use Stack. Have a look at the methods on each class and you can see how each class has been specialized. That should give you an idea of which class meets your needs. (If you don't find a method you need on Link, but it's on stack then use Stack) I think it would be easier if you said more about what you would like to do or what you do not understand. I'm sure someone can help explain it. I'm still not sure what piece you are having difficulty with. Welcome Darren! Ron ___ Beginners mailing list
RE: [Newbies] delegation vs inheritance
Hello, I have to ask is Grunt your real name? Do you have a real name? Ok so your question is very vague. I'll try to answer, but I'm not sure my answer will be much help. Stack is a specialization of Object Stack has a linked list Stack normally implements linked list as a collection of StackLinks. StackLink is a specialization of Link Link has a nextLink that normally points to an instance of Link (or it's subclasses) to provide a linked list structure. Does that help? Ron -Original Message- From: gruntfuttuck First of all I must apologise if I get some terminology wrong in this post. I was rummaging around the collection classes earlier today and came across class Stack. I was interested to see that it makes use of class LinkedList through delegation with a instance variable rather than inheritance. I'm tyring to remember my Analysis and Design course here. I have a foggy memory about a is-a and has-a relationship. So a ford is-a type of Car, so that is a inheritance relationship and a Car has an engine so that is a delegation relationship. I also know that delegation is better for loose Coupling. As you can see I'm a bit vague on all this. With class Stack what would the be the likely thinking to delegate as apposed to inherit? I think this is a very impotent subject and I would like to be clearer on it. -- View this message in context: http://www.nabble.com/delegation-vs- inheritance-tf4216781.html#a11996570 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 ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] RE: delegation vs inheritance
From: Darren from: Ron Teitelbaum Does that help? Ron Thanks Ron, yes that does help but also what would be the thought process (I know you can't read minds) to choose this approach as apposed to specializing StackLink? -Regards Darren I don't understand your question. What are you trying to do or which thought process doesn't make sense? If you are trying to provide a linked list then you should use Link. If you need a stack use Stack. Have a look at the methods on each class and you can see how each class has been specialized. That should give you an idea of which class meets your needs. (If you don't find a method you need on Link, but it's on stack then use Stack) I think it would be easier if you said more about what you would like to do or what you do not understand. I'm sure someone can help explain it. I'm still not sure what piece you are having difficulty with. Welcome Darren! Ron ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] Squeak Tutorial
Hi Raoul, Welcome to the list, I hope you have a terrific experience at Impara. SUnit requires that your class be a subclass of TestCase. If you look at your testing object make sure that it is: TestCase subclass: #MyTestClass And not Object subclass: #MyTestClass If this is not the problem please let us know, Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists www.USMedRec.com -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Raoul Zimmermann Sent: Tuesday, July 10, 2007 8:25 AM To: beginners@lists.squeakfoundation.org Subject: [Newbies] Squeak Tutorial Hello everyone, I'm new to Squeak and mailing lists in general. I will be going to Impara for a short internship and am trying to get an overview of Squeak. I'm using the Squeak-Tutorial at http://squeak.preeminent.org/tut2007/html/index.html. However, in Section I, part 9, I'm required to use the testCellOnState method I created. I'm to open the Test Runner and the category Laser- Game-Tests is supposed to appear. The problem is that it doesn't. I double-checked all previous steps and they're okay, but it still doesn't work. Can anyone help me please? :) Greetings, Raoul Zimmermann -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer ___ 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
RE: [Newbies] Some general questions
Hi Darren, Chances are you don't want an object called UserFred. What you want instead is an object with an ivar #name that has the value 'Fred'. Unless Fred is a unique type of object User that can do things that all other Users can not or if Fred is not allowed to do some things that all other users are, you shouldn't think of subclasses as instances of objects. Instances are identified mostly by their content. So Object subclass: #User instanceVariableNames: 'userName' User class newForUserNamed: aUserName create an instance of User and assign aUserName to the userName instance variable ^self new userName: aUserName; yourself now you can go to a workspace and do this. User newForUserNamed: 'Fred'. If you highlight it and inspect it you will get back a user named 'Fred'. (User class means that the method that you write goes on the class you create called User on the class side [press the class button]) Happy coding! Ron Teitelbaum From: Darren White Hello Is there a way to use a string as the name for a object? For example if I have the input string 'fred' from a user input field how do I create a object named userFred or even just fred? What is the difference between the source file and the image? Does the image use the code from the source file? If I create code dose it live in the image or source file? Is there a way to trigger a save prompt when clicking on the window close button? And a question about posting to this list: I notice that the replies to my last post didn't have 'Re' prefixed to them. How do I reply to a thread. For my lat post it seems that I accidentally relayed to the thread I had started by starting a new thread -oops. Darren ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] User interfaces | getting started
Hi Darren, Welcome to the list. I'm glad you have been reading about classes and methods that should help. There is no console type application for Squeak. The closest thing we have to a console app is the Transcript, but the Transcript does not accept input. We also have inspectors, browsers and a workspace with act much like the input side but they too are not really like the console you may be expecting. I agree with your path though, you want to get into the logic and flow of the program without having to worry about GUI itself. Here is how you might do that. You create classes that represent your domain. For a contact list you might create a contact and a contactBook. Something simple like Object subclass: #Contact instanceVariableNames: 'name email phoneNumber' Object subclass: #LittleBlackBook instanceVariableNames: 'contacts' You should create accessors and mutators for the instanceVariables on Contact and LittleBlackBook. LittleBlackBook initialize contacts := OrderedCollection new. Now what you need is a way to add contacts. LittleBlackBook addContactNamed: aName email: anEmail phoneNumber: aPhoneNumber create a contact and add it to the list of contacts self contacts add: (Contact name: aName email: anEmail phoneNumber: aPhoneNumber). Contact class name: aName email: anEmail phoneNumber: aPhoneNumber Return to the sender a new instance of contact with this information ^self new name: aName; email: anEmail; phoneNumber: aPhoneNumber; yourself. Ok so very simply you can create instances of your book by starting from the workspace and then using the inspectors for modifying your instance and getting feedback. This feedback is different from a console but it does give you a good feeling for objects. From a workspace you would do: LittleBlackBook new Now highlight that, right click - inspect it. What you get back is an inspector. This is an instance of your class LittleBlackBook. Notice that you can click on the ivars and see their contents. #contacts is currently empty. On the inspector of LittelBlackBook you can now type: self. #self refers to the instance itself. If you type self, highlight it and inspect it you get the same instance back again. It's not a copy it's the same instance, what ever you do to one will be reflected in the other since they are the same instance. The method we wrote can be called by using #self. Try this by typing this in the inspector window of your instance of LittleBlackBook. (you can close the second inspector). self addContactNamed: 'Darren White' email: '[EMAIL PROTECTED]' phoneNumber: nil. You can just highlight it and do it. Now check out the contacts ivar. It now has a contact in it. If you inspect the contact you will see that you have a collection and if you inspect the first item in the collection you will see that you have an instance of Contact, with your info in it. It's not a console but there is nothing that a console can do that you can not reproduce by adding new methods to your instance. Happy Coding! Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists From: Darren White Hello, This is my first post here. I have been exploring the squeak environment and smalltalk syntax for a few weeks now. Usually when learning a new programming language I create a small programs such as a contacts list. First I may do it with a console front end then play around with a GUI and widgets. I have got to the stage with squeak where I want to do that but I can't see how to proceed. For a console type program how do I proceed and for a GUI program what is the main form/frame/window to hold the components. So the main thing I'm stuck with is the user interface, I have read enough to know how to create classes and their method bodies (though my code may be bad at this stage :-) ). Any advice would be most welcome, I can't wait to get stuck in! Darren ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] regd databases and networking in squeak
Hi Navodit, The easiest thing you can do to attach a database is to use ODBC. If you have on your system an ODBC Driver say like Dbase or Access then you can just use a file. You set up an ODBC connection and then use SQL to access your data. The best part of doing this is that you don't need to have Access or Dbase on your system since ODBC does all the work for you. Review the ODBC packages on SqueakMap for details. For networking it really depends on what you are trying to do. If you are just looking for networking access to a database then you have that with the ODBC package. If you are looking for more advanced Database tools then consider using PostgreSQL and Glorp. This is a much more complicated so if you are new to this I'd stick with ODBC until you get your feet wet. Please feel free to ask questions! Happy coding, Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists www.usmedrec.com -Original Message- From: Navodit Kaushik Hi I am trying to learn more about using databases and using networking in Squeak. Can anyone please suggest some good starting points? For databases, I would be needing to set up a database for my project at squeaksource.com so I am looking for something which would enable that. For networking, I just want to start by learning some basics about how network access works in Squeak. Any pointers would be highly appreciated. Thanks Navodit ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] A Question of Style
I like the second one; it explains your intention much better. Ron From: Tim Johnson Hi, I know the rules for naming accessor and setter methods. But what do I do when the accessor method needs a parameter? I'll try to provide an example. A vendor sells an item called #apple. If I want to get the vendor's price for that #apple, I use a method such as the following: VendorpriceOf: aSymbol Now, to make the setter method, I have followed this pattern: VendorpriceOf: aSymbol is: newPrice Does this follow traditional patterns? I'll admit I have read the first half of Smalltalk with Style but not the second. Should I instead make the setter method look like this: VendorsetPriceOf: aSymbol to: newPrice ? Thanks, Tim [PS - Thanks to everyone who has been helping me on here lately, I have been lax in responding. You all bring up some good ideas and tips.] ___ 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
[Newbies] FW: [Squeakland] SqueakFest '07 - Save the Date!
Hello all, I thought I'd forward this to squeak-dev, beginners and seaside lists. There has been a bit of talk about teaching your kids to squeak, so if you are an Etoy developer or a fan, if you know some teachers, let them know, or if you are a parent of a squeaker, then this event is for you! Plus this would also be a good chance to learn more about OLPC. Spread the word and save the date: August 1, 2 3 for SqueakFest '07. Ron Teitelbaum Squeak News Team Member _ From: Kim Rose Greetings! Thanks to the continued interest and generosity of Columbia College Chicago, we are delighted to announce SqueakFest '07! The dates for this year's gathering are: August 1, 2 3 Hands-on Workshops Wednesday, August 1st Keynotes, presentations panels Thursday and Friday, August 2 3 SqueakFest is open to educators, parents (homeschoolers, other) developers, community technology center leaders, etc., etc. -- anyone interested in working with Squeak Etoys. This year we're planning a special track on the One Laptop Per Child Initiative ($100 laptop) and welcome participation by Etoy content developers for this particular platform in addition to those using or planning to use Squeak Etoys on other computing platforms. (For those who may be unaware, Squeak Etoys is currently one offering provided on the $100 laptop which is being distributed in great quantity this year.) Please save these dates and help spread the word to colleagues and friends you think would be interested in attending. We'll be sending a call for presentations in early April and also launching the official SqueakFest '07 website at that time. Please mark your calendar and plan to join us in Chicago for SqueakFest '07. Please stay tuned for more details! regards, Kim ___ Squeakland mailing list [EMAIL PROTECTED] http://squeakland.org/mailman/listinfo/squeakland ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
RE: [Newbies] ssl support
Hi Norbert, I just had a look at the package to make sure it was working properly. We had an error sneak in and it keeps popping its head up. I just released a new version of Cryptography-Core which should fix the problem. I am using our Squeak-SSL package as a client and a server and it is working very well. The package can also connect and retrieve contents from other SSL sites. Please let me know if you have any other problems or if you would like to give me more information about the problem you are experiencing. Thanks, Ron Teitelbaum Squeak Cryptography Team Leader From: Norbert Hartl Hi, is there a usable ssl support for squeak. I'm trying to use the Cryptography package to access a https monticello URL but I've no luck. Any ideas? Thanks in advance, Norbert ___ 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
RE: [Newbies] Re: Squeak - for a different Summer of Code!
http://code.google.com/soc/ Ron -Original Message- From: [EMAIL PROTECTED] [mailto:beginners- [EMAIL PROTECTED] On Behalf Of Serge Stinckwich Sent: Friday, March 16, 2007 4:12 AM To: beginners@lists.squeakfoundation.org Cc: [EMAIL PROTECTED]; squeak- [EMAIL PROTECTED] Subject: [Newbies] Re: Squeak - for a different Summer of Code! Giovanni Corriga a écrit : Hi all, as you may know, Squeak has been accepted as a mentoring organization for the Google Summer of Code 2007 program. Great work Giovanni !!! You did a better work than me. Last year, i had tried to contact Google, but I had no success. Squeak is an open source dialect of Smalltalk, a pure OO programming language that takes object orientation principles to their limits. Development in Squeak will be quite different from what you may experience in Java, C#, Ruby or Python, yet it will be very fulfilling. So, why not Squeak for the Summer of Code? Squeak will offer you: a productive environment to develop your ideas - a great community a first class mentoring program - appreciation and value for your work Possible project areas include: Virtual Machine - Compiler User Interface - OS Integration Development and End-user Tools The Seaside Web Framework and many more! Is the list of SOC projects close ? I would to propose to work on a better multilingual support for Squeak. At the moment, it's difficult to translate the Squeak interface, because there is several Squeak image (Squeakland, 3.9, OLPC, ...). I think we could improve Yoshiki's work in order to have a central repository for the translations (maybe something like Rosetta : https://launchpad.net/rosetta) and a more modular approach in order to attach messages catalog to packages and not to the whole image. -- Dr. Serge Stinckwich Université de CaenCNRS UMR 6072GREYCMAD OOESUGOO http://purl.org/net/SergeStinckwich oo Smalltalkers do: [:it | All with: Class, (And love: it)] \ / ## ___ 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
RE: [Newbies] Uploading Patches and Enabling Features in CommercialSystems
Hello All, Ok so next point: 2) A system must be able to ensure that only the trusted system can ask it to update itself. The way that I do this is pretty simple. If an external system can only say update, but can not say update from where, then the incentive to break this message is lessoned. You will notice that the next two points make this a circular argument so we need consider this carefully. A system could check a server periodically to see if there is an update available. If you have a trusted server as in 1) then asking that server for updates periodically is safe. A system could accept messages from the server. This is very useful for business production environments. We need to upgrade all of our clients at once. I've solved this problem with a combination of both pushing and pulling. First you upload the patch to the server and set the system patch level that the client checks when it starts up. This ensures that clients that are not connected will update when they finally do connect. Then I send a message to all running clients to update. This basically runs the same code that checks for a patch on start up (and possibly periodically) but since the message doesn't tell the client where to update from this message is mostly harmless. (Although it is important that the message only be accepted n number of times to prevent DOS attacks). It is easy to imagine variations on this process, update when you can, update now, update after next commit, ask user to update, shutdown if not updated by... Another variation of this message is a message that says, report home with your running patch level. Again it does not accept a location to report too. This is very useful for finding dead or disabled clients. Now I didn't really answer the question of how to determine that only a trusted system can ask the client to update. This really depends on your operating environment. If you have access to network facilities where the client is installed then the obvious answer is with a firewall rule. If you can not set the network environment then you can fix the problem by adjusting the message itself. The first way to do this is to encrypt the message. The server can encrypt the message with a random key. The key used to encrypt the message should be itself encrypted with the public key of the client. Then the client can decrypt the key run an HMAC on the message and then decrypt it. Now the public key in this case is not so public. The server knows the key of the client, so if the client receives a message that it can actually read, it can then process the message. Also the message is sent on an encrypted SSL connection so it is actually encrypted twice. This can be done in the opposite direction, you could have the server use it's private key to encrypt the random key, and then have the client decrypt the message with the servers public key. This reduces the number of keys needed, but it decreases the security since every message is readable by every system that knows the servers public key. It also increases the traffic on the server's private key which limits its lifetime. By the way the reason for encrypting a random key using a public key is that it limits the usefulness of the random key (since it changes with each message), it keeps the certificate from being used too often so it extends its life. We need to add another point, and that is how to update client and server certificates (see 14 below). In summary, Make the message safe incase it is received by an unfriendly user. Limit the communication in a networked environment if possible. Make the message content authenticate itself, by requiring decryption. Make the message content verifiable by adding HMAC. Again your comments are welcome; I received a lot of nice comments about the last post offline, thank you. This is a lot of detail so I really want to make sure you actually find it useful. Ron Teitelbaum President / Principal Software Engineer US Medical Record Specialists www.usmedrec.com Squeak Cryptography Team Leader From: Ron Teitelbaum Updated List 1) A system must be able to ensure that it is updating itself from a trusted location. *In Discussion* 2) A system must be able to ensure that only the trusted system can ask it to update itself. *In Discussion* 3) A system must be able to ensure that it can securely store an update location. 4) A system must be able to securely change the update location. 5) All communications must be encrypted. 6) A System must be able to verify patches before applying them. 7) A System must be able to automatically load the patch. 8) A System should be able to update without restarting the application. 9) A System must be able to report back success or failure of patch installation. 10) A System must be able to recover from a failed patch. 11) Security measures have to be spread in many places of the system. 12) Security measures should
[Newbies] The Election Ends TODAY, you have about 12 hours left to vote
Hello everyone, First thank you everyone that has already voted. Your participation is very much appreciated. If you have not voted you still have time. Voting ends today at 10pm EST which is just over 12 hours from now. If you did not receive an email or if you lost it please let me know. We can resend it to you if you are on the list of squeakPeople with an account certification of at least Apprentice. Thank you again, Please Vote. Ron Teitelbaum [EMAIL PROTECTED] Squeak Elections Team Member ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners