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 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?



------------------------------

Message: 5
Date: Tue, 05 Aug 2008 07:52:50 -0700
From: [EMAIL PROTECTED] (Randal L. Schwartz)
Subject: Re: [Newbies] true/false defined where?
To: Sean Allen <[EMAIL PROTECTED]>
Cc: "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

"Sean" == Sean Allen <[EMAIL PROTECTED]> writes:

Sean> I have a feeling the secret to unraveling that confusion comes from
this:

Sean> 'true and false and some of the very few objects known to the VM'

Sean> does that mean that I can't go and find these variables anywhere? that Sean> they arent true global variables they are some sort of special global?

If you explore "Smalltalk specialObjectsArray", you'll see a special list of variables that both the VM and the Smalltalk code have to agree on in order
to
run.  For example, if a primitive wants to return "false", it has to
know what the rest of the Smalltalk image considers the sole instance
of the "False" class.

These items are established in
"SystemDictionary>>#recreateSpecialObjectsArray", the first version of which had to be executed essentially "by hand" on the first VM (either the early versions of Smalltalk 76 or 80). Since then, this special array has gotten its initial values by running it in an already running system, so the first few entries there (nil, false, true) are in fact clones of clones of clones
of
the original handcrafted objects.  Of course, there's code on the VM side
that
knows the precise order of this magical array, and this is what allows them
to
communicate, so you can't just add new things here or change the ordering
without building a corresponding new VM.



_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to