[Newbies] perform withArguments
Hi, I've read the sparse documentation on 'dynamic message' calls and I've experimented a lot and still cannot figure out how to do something that should be simple: I want to build a message like this: cellObject cellLock: aBoolean where cellObject is to look like: cell1, cell2, cell3 ..., or cell9 I can build up cellObject like this: self perform: ('cell', cellNumber asString) asSymbol but I can't figure out how to build the full message with the key selector cellLock:, and the value 'aBoolean'. I've tried everything I can think of based on the terse documentation, and anything I can find on the internet, which isn't much (including this forum). Any help would be appreciated. Thanks - --- Under the age of 15 so don't want to post my name :D -- View this message in context: http://forum.world.st/perform-withArguments-tp4580670p4580670.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
[Newbies] Re: SqueakMap catalog Help
:D Thanks It worked :D thanks so much again :D On Mon, Apr 23, 2012 at 8:31 PM, John McKeon [via Smalltalk] ml-node+s1294792n4580985...@n4.nabble.com wrote: On Windows (I don't know the key combination on other platforms) I right-click the pane showing the packages and unckeck the checked filter. By default, SqueakMap only shows the packages that are marked safe (tested) in 4.2. Unchecking the filter shows you all the packages available. On Mon, Apr 23, 2012 at 9:40 AM, OrgmiGeek [hidden email]http://user/SendEmail.jtp?type=nodenode=4580985i=0 wrote: I am trying to find out how to use the SqueakMap catalog in squeak 4.2. I am trying to download a package called PDFReader But I can only download 6 out of the 780 packages hear is an image. I tried the Search packages thing it didn't work and I clicked update it didn't work ether. so can anyone tell me how to download any package using the SqueakMap thing? Edit: sorry for the big picture I just don't know how else I can show what I am doing. -- View this message in context: SqueakMap catalog Helphttp://forum.world.st/SqueakMap-catalog-Help-tp4580438p4580438.html Sent from the Squeak - Beginners mailing list archivehttp://forum.world.st/Squeak-Beginners-f107673.htmlat Nabble.com. ___ Beginners mailing list [hidden email] http://user/SendEmail.jtp?type=nodenode=4580985i=1 http://lists.squeakfoundation.org/mailman/listinfo/beginners ___ Beginners mailing list [hidden email] http://user/SendEmail.jtp?type=nodenode=4580985i=2 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/SqueakMap-catalog-Help-tp4580438p4580985.html To unsubscribe from SqueakMap catalog Help, click herehttp://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4580438code=Y29vbC5vcmlnYW1pLjFAZ21haWwuY29tfDQ1ODA0Mzh8MTcxNzMxOTAyNQ== . NAMLhttp://forum.world.st/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- __ Origamigeek - --- Under the age of 15 so don't want to post my name :D -- View this message in context: http://forum.world.st/SqueakMap-catalog-Help-tp4580438p4581077.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
[Newbies] perform withArguments
Hi, For your example: cellObject cellLock: aBoolean where cellObject is to look like: cell1, cell2, cell3 ..., or cell9 I don't think you want or need to use #perform:. You use #perform: when you want to construct the message name and sent the constructed message name to an object. In your case you know the message you want to send, it is #cellLock:. What you don't know (or have easily available) is the object you want to send the message to. What I think you need to do is save your cell objects in an array or collection (I will let you look up collections, but ask again if you need help). With something like: cellObjects := OrderedCollection new. cellObjects add: YourCellClass new. Once you have a collection of your cells, you can access one or more of them and sent the #cellLock: message to it like so: (cellObjects at: cellNumber) cellLock: aBoolean Good luck and keep posting if you need help. Lou On Mon, 23 Apr 2012 07:58:47 -0700 (PDT), OrgmiGeek cool.origam...@gmail.com wrote: Hi, I've read the sparse documentation on 'dynamic message' calls and I've experimented a lot and still cannot figure out how to do something that should be simple: I want to build a message like this: cellObject cellLock: aBoolean where cellObject is to look like: cell1, cell2, cell3 ..., or cell9 I can build up cellObject like this: self perform: ('cell', cellNumber asString) asSymbol but I can't figure out how to build the full message with the key selector cellLock:, and the value 'aBoolean'. I've tried everything I can think of based on the terse documentation, and anything I can find on the internet, which isn't much (including this forum). Any help would be appreciated. Thanks - --- Under the age of 15 so don't want to post my name :D --- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon mailto:l...@keystone-software.com http://www.Keystone-Software.com ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
Re: [Newbies] comparing to an exact class storing class association relationships
Randal L. Schwartz wrote: "Ben" == Ben Coman b...@openinworld.com writes: Ben doh! smacks-head funny how it works itself out when you step away for a Ben while - this works fine... Ben B class relations Ben (self == B) Ben ifTrue: [ ^ { E- #addE. } ] Ben ifFalse: [ ^ {} ] Ben but I still wonder if it is the right approach Without further analysis, or description of the problem you're trying to solve, this already looks far too fragile for me. For one, it fails the "null subclass" test. You should always be able to subclass a class, putting no methods in the subclass, and the subclass and superclass objects would be completely interchangeable. I've been taking my time to wrap my head around your comment. It makes complete sense when thinking about the use of the object model. However (if you can refer to the attached diagram showing one association and one inheritance relationship) what I am trying to work out is whether that applies as strongly one level up at the meta / class description. If ConductingEquipment is a null-subclass then at the instance/model level it could be completely interchanged with Equipment because the association is inherited. However at the meta / class-description level (ie storing the data to be able to redraw that diagram) ConductingEquipment and Equipment seem not interchangable since no direct line exists between ConductingEquipment to EquipmentContainer. I'll continue to muse on that. Thanks for you reply. cheers -ben inline: aRelation.png___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
Re: [Newbies] Squeak on a BeagleBone
On 21.04.2012, at 13:25, David Graham wrote: On 4/21/12 2:16 PM, Bert Freudenberg wrote: On 20.04.2012, at 22:14, David Graham wrote: It took me almost 20 years, but I finally thought of something interesting to put on the Internet. ;) I've been experimenting with a BeagleBone (embedded ARM V7 platform) and was able to get Squeak 4.2 running without a problem. I put together a simple demo with a blog post and video, and thought the Squeak list may be interested (also, please let me know if I have any technical errors in my smalltalk code explanation). http://blog.unthinkable.org/ -David Very nice! There is one flaw in your code. You should never run Morphic code outside the UI process. But your appendValue: message does that. The correct way would be to write WorldState addDeferredUIMessage: [graph1 appendValue: lightValue] That will cause the block to be evaluated at the next display cycle. Of course, the proper way to make an updating Morph is to write a new Morph class. Then you could use Morphic's stepping mechanism to read the data and display it. Thanks Bert! I just started playing with Morphic and didn't know this. ( also, I just started learning smalltalk last year and mostly working with Zinc on Pharo). I was targeting my post at non-smalltalk arduino / BeagleBone devs and wanted to keep the syntax as simple as possible, but should I update the post? Well, people learn from examples, and it's better if the examples do not teach bad style. Here is a way to use Morphic's stepping properly from a workspace. This uses the Etoys mechanism of adding methods to an object directly (without having to make a new class in the browser): graph1 := GraphMorph new. graph1 assureUniClass. graph1 class compile: 'step self appendValue: 50 atRandom. super step'. graph1 class compile: 'stepTime ^50'. graph1 openInWorld. graph1 extent: 700@500. graph1 clear. This avoids having to create a background process, but I'm not sure if that makes it more clear to your audience. - Bert - But for a 10 line hack your code is not bad :) I hear this a lot. ;) ___ 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] perform withArguments
Ah that's curious - your reply did not have a Re: and was not threaded with the original message. Would have saved me to write a message very similar to yours ;) - Bert - On 23.04.2012, at 10:44, Louis LaBrunda wrote: Hi, For your example: cellObject cellLock: aBoolean where cellObject is to look like: cell1, cell2, cell3 ..., or cell9 I don't think you want or need to use #perform:. You use #perform: when you want to construct the message name and sent the constructed message name to an object. In your case you know the message you want to send, it is #cellLock:. What you don't know (or have easily available) is the object you want to send the message to. What I think you need to do is save your cell objects in an array or collection (I will let you look up collections, but ask again if you need help). With something like: cellObjects := OrderedCollection new. cellObjects add: YourCellClass new. Once you have a collection of your cells, you can access one or more of them and sent the #cellLock: message to it like so: (cellObjects at: cellNumber) cellLock: aBoolean Good luck and keep posting if you need help. Lou On Mon, 23 Apr 2012 07:58:47 -0700 (PDT), OrgmiGeek cool.origam...@gmail.com wrote: Hi, I've read the sparse documentation on 'dynamic message' calls and I've experimented a lot and still cannot figure out how to do something that should be simple: I want to build a message like this: cellObject cellLock: aBoolean where cellObject is to look like: cell1, cell2, cell3 ..., or cell9 I can build up cellObject like this: self perform: ('cell', cellNumber asString) asSymbol but I can't figure out how to build the full message with the key selector cellLock:, and the value 'aBoolean'. I've tried everything I can think of based on the terse documentation, and anything I can find on the internet, which isn't much (including this forum). Any help would be appreciated. Thanks - --- Under the age of 15 so don't want to post my name :D --- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon mailto:l...@keystone-software.com http://www.Keystone-Software.com ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners