Re: [Newbies] error loading .pr file
El 3/31/07 10:01 PM, Andrew Dabrowski [EMAIL PROTECTED] escribió: (RenamedClassSourceReader is Undeclared). RenamedClassSourceReader don't exist in 3.9 final, that't why you have problems. Is this a problem with 3.9? Maybe more as one, so we start 3.10 and you could try at http://ftp.squeak.org/3.10alpha/Squeak3.10alpha.7073.zip And if some was wrong, you could complain direct to me. As several things is changing, if you first Squeak experience , better learn with it. As sharing code, I like to send me via private mail your .pr and only you .cs. In general , .pr files works fine, but not always. And old release .pr could not work on newer images. Exist another ways of sharing code, I prefer using .sar what let's pack all needed files in one auto loading file. As example , in my Rompecabezas (puzzle) http://wiki.squeak.org/squeak/5861 I have versions what let's guess image and load the necessary , if some is not in the target one. From install/preamble of version what could load into normal 3.9 and SqueakLight | misFotos listaArchivos member form str | Smalltalk version = 'SqueakLight' ifTrue:[ self fileInMemberNamed: 'MixedCurves.2.cs'. self fileInMemberNamed: 'MinimalSound.2.cs']. self fileInMemberNamed: 'Morphic-Puzzle.47.cs'. member _ self memberNamed: 'CatClubBallooning.jpg'. PuzzleMorph foto: (Form fromBinaryStream: member contentStream binary). member _ self memberNamed: 'Taunt011.wav'. PuzzleMorph sonido: (member contentStream binary). PuzzleMorph allPieces And you have code, picts, sound, any what was necessary. Guessing version is a bonus track :=) Edgar ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
[Newbies] Re: Re: A Question of Style
+ 1 and I couldn't have worded it better :) IHMO (and perhaps only there) an object is allowed to pretend to *also* be something else (aVendor pretends to be aPricebook, in the #priceAt:put: example) *only if* it could effectively take that role. If not or in doubt: delegate to someone who lives that role [talk small and create great things]. /Klaus On Sun, 01 Apr 2007 12:05:35 +0200, Stuart Herring wrote: On 4/1/07, Klaus D. Witzel [EMAIL PROTECTED] wrote: Smalltalk With Style makes this very clear. It definitely prefers that I communicate with Vendor in the language of a Vendor, and not in the language of a Dictionary. The #at:put: vocabulary is part of the language of Smalltalk, which is universal and independent of Vendor language. You do not implement Smalltalk in the labguage of Vendor but, the opposite direction is the case. This is inevitable and the language direction is irreversable. If I were examining the methods of Vendor, and I saw priceAt: put: then yes, I'd realise that I was witnessing some sort of Dictionary like API, but my two questions would be at what? and what am I putting?. You could probably guess that it wanted an item and a price, but the wording seems to imply it wants the price as the key, and the item as the value. I'd probably have to end up looking at the implementation to make sure which way round it wanted it. If I saw #priceOf:is: or #setPriceOf:to:,it'd be far more obvious what was going on. To insist on #at:put simply because it's what's used by a Dictionary seems wrong, because it's not the interface to the price book that's in question, it's the interface to the Vendor, and in this case creates an awkward feeling API - much like dogmatic adherence to some English style guides creates awkward sentences (as in the apocryphal Churchill quote: This is the sort of English up with which I will not put). Maybe this discussion is a sign that it would make more sense to expose the price book separately, rather than put the price setting messages on the vendor itself? The pricebook would then have #at:put, because it certainly is a collection, and by being a pricebook it's obvious what the key and value should be. so rather than aVendor priceOf: #foo is: price or aVendor priceAt: #foo put: price, you'd have: aVendor pricebook at: #foo put: price This seems to satisfy both the condition of using the language of the domain, and provides the familiarity of the dictionary interface. Regards, Stuart ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
Morph Window - Class? (was: [Newbies] error loading .pr file)
Thanks for your reply to my last message. Now I have a follow-up question. If I want to save my project as a .cs file, then I will have to convert my gui window (just a systemWindow with some buttons and textMorphs) into a proper class that shows up in the browser, correct? That is, my window was not coded, but put together interactively by dragging supplies out and using the viewer to attach scripts. Is there a way to convert the final product into a code format that can be exported in the .cs file? In VisualWorks (which I am also looking at but have not worked with at all) there seems to be a way to do this: the InstallOnClass utility. Is there something comparable in Squeak? El 3/31/07 10:01 PM, Andrew Dabrowski [EMAIL PROTECTED] escribió: (RenamedClassSourceReader is Undeclared). RenamedClassSourceReader don't exist in 3.9 final, that't why you have problems. Is this a problem with 3.9? Maybe more as one, so we start 3.10 and you could try at http://ftp.squeak.org/3.10alpha/Squeak3.10alpha.7073.zip And if some was wrong, you could complain direct to me. As several things is changing, if you first Squeak experience , better learn with it. As sharing code, I like to send me via private mail your .pr and only you .cs. In general , .pr files works fine, but not always. And old release .pr could not work on newer images. Exist another ways of sharing code, I prefer using .sar what let's pack all needed files in one auto loading file. As example , in my Rompecabezas (puzzle) http://wiki.squeak.org/squeak/5861 I have versions what let's guess image and load the necessary , if some is not in the target one. From install/preamble of version what could load into normal 3.9 and SqueakLight | misFotos listaArchivos member form str | Smalltalk version = 'SqueakLight' ifTrue:[ self fileInMemberNamed: 'MixedCurves.2.cs'. self fileInMemberNamed: 'MinimalSound.2.cs']. self fileInMemberNamed: 'Morphic-Puzzle.47.cs'. member _ self memberNamed: 'CatClubBallooning.jpg'. PuzzleMorph foto: (Form fromBinaryStream: member contentStream binary). member _ self memberNamed: 'Taunt011.wav'. PuzzleMorph sonido: (member contentStream binary). PuzzleMorph allPieces And you have code, picts, sound, any what was necessary. Guessing version is a bonus track :=) Edgar begin:vcard fn:Andrew Dabrowski n:Dabrowski;Andrew email;internet:[EMAIL PROTECTED] tel;work:812 855-5470 x-mozilla-html:FALSE version:2.1 end:vcard ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners