[Newbies] if absent put nil (Riaan)
I have the following code renderAttendeesOn: html self workSession attendees do: [:each | html text: each person displayString] separatedBy: [html text:'; '.] if there is no attendees for my worksession, it needs to display : NO ABSENTEES. Please assist. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 05 August 2008 07:33 PM To: beginners@lists.squeakfoundation.org Subject: Beginners Digest, Vol 28, Issue 6 Send Beginners mailing list submissions to beginners@lists.squeakfoundation.org To subscribe or unsubscribe via the World Wide Web, visit http://lists.squeakfoundation.org/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than Re: Contents of Beginners digest... Today's Topics: 1. true/false defined where? (Sean Allen) 2. Re: true/false defined where? (Derek O'Connell) 3. Re: true/false defined where? (Michael Rueger) 4. Re: true/false defined where? (Sean Allen) 5. Re: true/false defined where? (Randal L. Schwartz) 6. Re: true/false defined where? (Sean Allen) 7. Re: Problems getting started with OpenGL in Squeak (Ken G. Brown) 8. Fighting again with MC (Giuseppe Luigi Punzi) -- Message: 1 Date: Tue, 5 Aug 2008 08:48:24 -0400 From: Sean Allen [EMAIL PROTECTED] Subject: [Newbies] true/false defined where? To: A friendly place to get answers to even the most basic questions about Squeak. beginners@lists.squeakfoundation.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=US-ASCII; format=flowed where do true and false spring into existence? i've been poking around and cant figure it out. -- Message: 2 Date: Tue, 5 Aug 2008 13:53:18 +0100 From: Derek O'Connell [EMAIL PROTECTED] Subject: Re: [Newbies] true/false defined where? To: A friendly place to get answers to even the most basic questions about Squeak. beginners@lists.squeakfoundation.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 Have a look in Kernel-Objects On Tue, Aug 5, 2008 at 1:48 PM, Sean Allen [EMAIL PROTECTED] wrote: where do true and false spring into existence? i've been poking around and cant figure it out. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners -- Message: 3 Date: Tue, 05 Aug 2008 14:54:45 +0200 From: Michael Rueger [EMAIL PROTECTED] Subject: Re: [Newbies] true/false defined where? To: A friendly place to get answers to even the most basic questions about Squeak. beginners@lists.squeakfoundation.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1; format=flowed Sean Allen wrote: where do true and false spring into existence? They have been around longer than some people on this mailing list ;-) i've been poking around and cant figure it out. true and false and some of the very few objects known to the VM and they where instantiated when the parent of all current images was created. All images are basically cloned and not re-created from source, and that's why you don't see any initialization code for them, they just are. Hope this doesn't add to any confusion... Michael -- Message: 4 Date: Tue, 5 Aug 2008 09:09:01 -0400 From: Sean Allen [EMAIL PROTECTED] Subject: Re: [Newbies] true/false defined where? To: A friendly place to get answers to even the most basic questions about Squeak. beginners@lists.squeakfoundation.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes On Aug 5, 2008, at 8:54 AM, Michael Rueger wrote: Sean Allen wrote: where do true and false spring into existence? They have been around longer than some people on this mailing list ;-) i've been poking around and cant figure it out. true and false and some of the very few objects known to the VM and they where instantiated when the parent of all current images was created. All images are basically cloned and not re-created from source, and that's why you don't see any initialization code for them, they just are. Hope this doesn't add to any confusion... How is this for a confusing answer... it both does and doesnt. I have a feeling the secret to unraveling that confusion comes from this: 'true and false and some of the very few objects known to the VM' does that mean that I can't go and find these variables anywhere? that they arent true global variables they are some sort of special global?
[Newbies] Re: if absent put nil (Riaan)
On Wed, 06 Aug 2008 13:47:39 +0200, Riaan van Aarde wrote: I have the following code renderAttendeesOn: html self workSession attendees do: [:each | html text: each person displayString] separatedBy: [html text:'; '.] if there is no attendees for my worksession, it needs to display : NO ABSENTEES. You can assign subexpression (self workSession attendees) to a temporary variable wsa and after the statement (wsa #do: ...) have another statement like this wsa ifEmpty ifTrue: [what you would like to do if there is no attendees]. HTH. /Klaus Please assist. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 05 August 2008 07:33 PM To: beginners@lists.squeakfoundation.org Subject: Beginners Digest, Vol 28, Issue 6 Send Beginners mailing list submissions to beginners@lists.squeakfoundation.org To subscribe or unsubscribe via the World Wide Web, visit http://lists.squeakfoundation.org/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than Re: Contents of Beginners digest... Today's Topics: 1. true/false defined where? (Sean Allen) 2. Re: true/false defined where? (Derek O'Connell) 3. Re: true/false defined where? (Michael Rueger) 4. Re: true/false defined where? (Sean Allen) 5. Re: true/false defined where? (Randal L. Schwartz) 6. Re: true/false defined where? (Sean Allen) 7. Re: Problems getting started with OpenGL in Squeak (Ken G. Brown) 8. Fighting again with MC (Giuseppe Luigi Punzi) -- Message: 1 Date: Tue, 5 Aug 2008 08:48:24 -0400 From: Sean Allen [EMAIL PROTECTED] Subject: [Newbies] true/false defined where? To: A friendly place to get answers to even the most basic questions about Squeak. beginners@lists.squeakfoundation.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=US-ASCII; format=flowed where do true and false spring into existence? i've been poking around and cant figure it out. -- Message: 2 Date: Tue, 5 Aug 2008 13:53:18 +0100 From: Derek O'Connell [EMAIL PROTECTED] Subject: Re: [Newbies] true/false defined where? To: A friendly place to get answers to even the most basic questions about Squeak. beginners@lists.squeakfoundation.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 Have a look in Kernel-Objects On Tue, Aug 5, 2008 at 1:48 PM, Sean Allen [EMAIL PROTECTED] wrote: where do true and false spring into existence? i've been poking around and cant figure it out. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners -- Message: 3 Date: Tue, 05 Aug 2008 14:54:45 +0200 From: Michael Rueger [EMAIL PROTECTED] Subject: Re: [Newbies] true/false defined where? To: A friendly place to get answers to even the most basic questions about Squeak. beginners@lists.squeakfoundation.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1; format=flowed Sean Allen wrote: where do true and false spring into existence? They have been around longer than some people on this mailing list ;-) i've been poking around and cant figure it out. true and false and some of the very few objects known to the VM and they where instantiated when the parent of all current images was created. All images are basically cloned and not re-created from source, and that's why you don't see any initialization code for them, they just are. Hope this doesn't add to any confusion... Michael -- Message: 4 Date: Tue, 5 Aug 2008 09:09:01 -0400 From: Sean Allen [EMAIL PROTECTED] Subject: Re: [Newbies] true/false defined where? To: A friendly place to get answers to even the most basic questions about Squeak. beginners@lists.squeakfoundation.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes On Aug 5, 2008, at 8:54 AM, Michael Rueger wrote: Sean Allen wrote: where do true and false spring into existence? They have been around longer than some people on this mailing list ;-) i've been poking around and cant figure it out. true and false and some of the very few objects known to the VM and they where instantiated when the parent of all current images was created. All images are basically cloned and not re-created from source, and that's why you don't see any initialization code for them, they just are. Hope this doesn't add to any confusion... How is this for a confusing answer... it both
[Newbies] Re: if absent put nil (Riaan)
I would probably do as Klaus suggests but you could also use a cascade and then #ifEmpty:. For example: self workSession attendees do: [:each | html text: each person displayString] separatedBy: [html text: '; '] ; ifEmpty: [html text: 'NO ATTENDEES'] Note the cascade ; at the end of the third line. This sends #do:seperatedBy: and then sends #ifEmpty: to the collection returned by #attendees. Of course, #ifEmpty: and #do:separatedBy: will only do something if the collection is either empty or not. Regards, Zulq. Riaan van Aarde (SpeCon Eng.) wrote: I have the following code renderAttendeesOn: html self workSession attendees do: [:each | html text: each person displayString] separatedBy: [html text:'; '.] if there is no attendees for my worksession, it needs to display : NO ABSENTEES. Please assist. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
[Newbies] Can Seaside applications support REST style calls?
I imagine the answer is yes, so the problem should probably be how can I get seaside to support rest calls? I am thinking of building some components, of a site, in Flash. Ideally, I would like the user to be able to submit form data through the Flash object. So, I need to provide some URL handling on the server side. Is there a object I should use for this? It is possible that this relates to my other query. In the Seaside tutorial image there is Lightbox test. The Dispatcher doesn't seem to have a registered RootObject for this entry, and yet it still works. As far as I can tell, it just calls the SULightBoxTest. However, I can't work out how to register an object in that way. Cheers AB ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
Re: [Newbies] Can Seaside applications support REST style calls?
Andy == Andy Burnett [EMAIL PROTECTED] writes: Andy So, I need to provide some URL handling on the server side. Is there a Andy object I should use for this? This is a FAQ. The beginnings of the answer are at http://seaside.st/documentation/naming-urls. If you read that, then do some googling of those particular method names, you'll get a lot of examples of how to use them. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
[Newbies] Is it generally considered better practice for an object to access its own variables via its getter methods?
I noticed that the Seaside tutorial has code such as: html div class: 'menu'; with: self menuComponent. Whereas the Scriptaculous demo code does things like this: html paragraph id: 'position'; with: position. I.e. they didn't bother adding (or using) a getter for position. Who is right, or doesn't it matter, or is there another reason why it would be written differently? cheers AB ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
Re: [Newbies] Is it generally considered better practice for an object to access its own variables via its getter methods?
Andy == Andy Burnett [EMAIL PROTECTED] writes: Andy I noticed that the Seaside tutorial has code such as: Andy html div class: 'menu'; with: self menuComponent. Andy Whereas the Scriptaculous demo code does things like this: Andy html paragraph id: 'position'; with: position. Andy I.e. they didn't bother adding (or using) a getter for position. Who is Andy right, or doesn't it matter, or is there another reason why it would be Andy written differently? Clearly, position is an instance var, or perhaps a temporary. An instance var may or may not have accessors, depending on whether it is meant to be tweaked from the outside. #menuComponent, on the other hand, may be just an accessor, or it may be a whole pile of code to generate that menu on the fly. At this point, it doesn't matter. Whether internal accesses to instance vars should use accessors instead of direct access is a subject to debate (read: religious war). I hope you haven't accidentally triggered that thread here. I tend to do the simplest thing that works, and leave it at that. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
Re: [Newbies] Is it generally considered better practice for an object to access its own variables via its getter methods?
Andy I noticed that the Seaside tutorial has code such as: Andy html div class: 'menu'; with: self menuComponent. Andy Whereas the Scriptaculous demo code does things like this: Andy html paragraph id: 'position'; with: position. Andy I.e. they didn't bother adding (or using) a getter for position. Who is Andy right, or doesn't it matter, or is there another reason why it would be Andy written differently? Clearly, position is an instance var, or perhaps a temporary. An instance var may or may not have accessors, depending on whether it is meant to be tweaked from the outside. #menuComponent, on the other hand, may be just an accessor, or it may be a whole pile of code to generate that menu on the fly. At this point, it doesn't matter. Whether internal accesses to instance vars should use accessors instead of direct access is a subject to debate (read: religious war). I hope you haven't accidentally triggered that thread here. I tend to do the simplest thing that works, and leave it at that. Great, I am all in favour of pragmatism. Thanks. ___ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners