[Newbies] if absent put nil (Riaan)

Riaan van Aarde (SpeCon Eng.) riaan at specon.co.za
Wed Aug 6 11:47:39 UTC 2008


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: beginners-bounces at lists.squeakfoundation.org
[mailto:beginners-bounces at lists.squeakfoundation.org] On Behalf Of
beginners-request at lists.squeakfoundation.org
Sent: 05 August 2008 07:33 PM
To: beginners at lists.squeakfoundation.org
Subject: Beginners Digest, Vol 28, Issue 6

Send Beginners mailing list submissions to
	beginners at 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
	beginners-request at lists.squeakfoundation.org

You can reach the person managing the list at
	beginners-owner at lists.squeakfoundation.org

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 <sean at monkeysnatchbanana.com>
Subject: [Newbies] true/false defined where?
To: "A friendly place to get answers to even the most basic questions
	about	Squeak." <beginners at lists.squeakfoundation.org>
Message-ID:
	<D11C3226-D6E5-4E84-A536-91AF90B689DC at monkeysnatchbanana.com>
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" <doconnel at gmail.com>
Subject: Re: [Newbies] true/false defined where?
To: "A friendly place to get answers to even the most basic questions
	about	Squeak." <beginners at lists.squeakfoundation.org>
Message-ID:
	<1091398f0808050553o68e1afe8ybcc70c4083dc7429 at mail.gmail.com>
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 <sean at monkeysnatchbanana.com>
wrote:
> where do true and false spring into existence?
>
> i've been poking around and cant figure it out.
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>


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

Message: 3
Date: Tue, 05 Aug 2008 14:54:45 +0200
From: Michael Rueger <m.rueger at acm.org>
Subject: Re: [Newbies] true/false defined where?
To: "A friendly place to get answers to even the most basic questions
	about	Squeak." <beginners at lists.squeakfoundation.org>
Message-ID: <48984D95.10509 at acm.org>
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 <sean at monkeysnatchbanana.com>
Subject: Re: [Newbies] true/false defined where?
To: "A friendly place to get answers to even the most basic questions
	about	Squeak." <beginners at lists.squeakfoundation.org>
Message-ID:
	<FA50326D-974B-48E4-A940-835C0664C75B at monkeysnatchbanana.com>
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: merlyn at stonehenge.com (Randal L. Schwartz)
Subject: Re: [Newbies] true/false defined where?
To: Sean Allen <sean at monkeysnatchbanana.com>
Cc: "A friendly place to get answers to even the most basic questions
	about	Squeak." <beginners at lists.squeakfoundation.org>
Message-ID: <86pron3459.fsf at blue.stonehenge.com>
Content-Type: text/plain; charset=us-ascii

>>>>> "Sean" == Sean Allen <sean at monkeysnatchbanana.com> 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.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <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


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

Message: 6
Date: Tue, 5 Aug 2008 11:20:46 -0400
From: Sean Allen <sean at monkeysnatchbanana.com>
Subject: Re: [Newbies] true/false defined where?
To: Randal L. Schwartz <merlyn at stonehenge.com>
Cc: "A friendly place to get answers to even the most basic questions
	about	Squeak." <beginners at lists.squeakfoundation.org>
Message-ID:
	<E74A1274-5E03-45A9-A674-31B05C202363 at monkeysnatchbanana.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes


On Aug 5, 2008, at 10:52 AM, Randal L. Schwartz wrote:

>>>>>> "Sean" == Sean Allen <sean at monkeysnatchbanana.com> 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.

Thanks for the pointer of where to explore and the background info.
In a couple days when I've had time to review and digest hopefully it  
will all make sense.



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

Message: 7
Date: Tue, 5 Aug 2008 10:39:19 -0600
From: "Ken G. Brown" <kbrown at mac.com>
Subject: Re: [Newbies] Problems getting started with OpenGL in Squeak
To: beginners at lists.squeakfoundation.org
Message-ID: <p06240402c4be2f7ab3a6@[10.0.1.200]>
Content-Type: text/plain; charset="us-ascii"

At 5:00 AM -0700 8/5/08, beginners-request at lists.squeakfoundation.org
apparently wrote:
>Date: Mon, 4 Aug 2008 14:48:26 -0700 (PDT)
>From: Nick Ager <nick.ager at gmail.com>
>Subject: Re: [Newbies] Problems getting started with OpenGL in Squeak
>To: beginners at lists.squeakfoundation.org
>Message-ID: <18820572.post at talk.nabble.com>
>Content-Type: text/plain; charset=us-ascii
>
>
> >> Not sure this will help in your case, but just for information, there
are
>some plugin naming convention i>> ssues, the generated name does not always
>match the plugin name.
>
>>> internal plugin B3DEnginePlugin generated as Squeak3D
>
>the list produced by executing: "SmalltalkImage current listBuiltinModules"
>includes B3DAcceleratorPlugin. Could that be a synonym for "Squeak3D"?
Where
>is the mapping between the names?
>
>Looking again at the Croquet image, when showing a 3D window,
>"SmalltalkImage current listLoadedModules" includes B3DAcceleratorPlugin
and
>opengl32.dll
>
>Although I'm not sure this gets me closer to solving my problem...
>--
>View this message in context:
http://www.nabble.com/Problems-getting-started-with-OpenGL-in-Squeak-tp18752
922p18820572.html
>Sent from the Squeak - Beginners mailing list archive at Nabble.com.

If you load VMMaker and look in the 'VMMaker' category (package?), you will
see InterpreterPlugin class. The plugins are subclasses of this or
SmartSyntaxInterpreterPlugin.

The #InterpreterPlugin class has the moduleName instance variable. Some of
the plugins have class methods that return their name eg.
B3DAcceleratorPlugin has moduleName
	^'B3DAcceleratorPlugin'

Not exactly sure where the moduleName gets set in other plugins.

Maybe someone else can tell how this works in more detail.

Ken G. Brown


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

Message: 8
Date: Tue, 05 Aug 2008 19:23:16 +0200
From: Giuseppe Luigi Punzi <glpunzi at lordzealon.com>
Subject: [Newbies] Fighting again with MC
To: "A friendly place to get answers to even the most basic questions
	about	Squeak." <beginners at lists.squeakfoundation.org>
Message-ID: <48988C84.10506 at lordzealon.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi all,

Is the second time I'm having  troubles with simple changes to my 
package :S, and I can't figure out what I'm doing bad.

I'm working in a little app. I did it 2 minor changes writing some 
comments on Doc side of a class, one line on a method commented and so on.

Now, I'm trying to commit to my MC repository, and I get an:
Error: Subscript Out Of Bounds: 1

Following the debugger, seems the error is in:
foreignExtensionMethodsForClass: aClass
    ^ (self foreignExtensionCategoriesForClass: aClass)
        gather: [:cat | (aClass organization listAtCategoryNamed: cat)
                          collect: [:sel | self referenceForMethod: sel 
ofClass: aClass]]

where 'cat' is nil. But I don't know wich Category is this.

Some advice?

Note: Debug Report attached. <cid:part1.02090207.00060503 at lordzealon.com>
-------------- next part --------------
Error: subscript is out of bounds: 1
5 August 2008 7:07:25 pm

VM: Win32 - a SmalltalkImage
Image: Squeak3.10.2 [latest update: #7179]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir E:\Desarrollo\Squeak3.10.2-7179-glp
Trusted Dir E:\Desarrollo\Squeak3.10.2-7179-glp\Giuseppe
Untrusted Dir C:\My Squeak\Giuseppe

ByteSymbol(Object)>>error:
	Receiver: #''
	Arguments and temporary variables: 
		aString: 	'subscript is out of bounds: 1'
	Receiver's instance variables: 
#''

ByteSymbol(Object)>>errorSubscriptBounds:
	Receiver: #''
	Arguments and temporary variables: 
		index: 	1
	Receiver's instance variables: 
#''

ByteSymbol(Object)>>at:
	Receiver: #''
	Arguments and temporary variables: 
		index: 	1
	Receiver's instance variables: 
#''

ByteSymbol>>at:
	Receiver: #''
	Arguments and temporary variables: 
		index: 	1
	Receiver's instance variables: 
#''


--- The full stack ---
ByteSymbol(Object)>>error:
ByteSymbol(Object)>>errorSubscriptBounds:
ByteSymbol(Object)>>at:
ByteSymbol>>at:
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ByteSymbol(SequenceableCollection)>>first
PackageInfo>>isForeignClassExtension:
[] in PackageInfo>>foreignExtensionCategoriesForClass: {[:cat | self
isForeignClassExtension: cat]}
Array(SequenceableCollection)>>select:
PackageInfo>>foreignExtensionCategoriesForClass:
PackageInfo>>foreignExtensionMethodsForClass:
PackageInfo>>coreMethodsForClass:
[] in PackageInfo>>coreMethods {[:class | self coreMethodsForClass: class]}
[] in OrderedCollection(Collection)>>gather: {[:ea | stream   nextPutAll:
(aBlock value: ea)]}
OrderedCollection>>do:
[] in OrderedCollection(Collection)>>gather: {[:stream | self   do: [:ea |
stream     nextPutAll: (aBlock value: ea)]]}
Array class(SequenceableCollection class)>>streamContents:
OrderedCollection(Collection)>>gather:
PackageInfo>>coreMethods
PackageInfo>>methods
MCPackage>>snapshot
MCWorkingCopy>>newVersionWithName:message:
[] in MCWorkingCopy>>newVersion {[:pair | self newVersionWithName: pair
first message: pair last]}
Array(Object)>>ifNotNilDo:
MCWorkingCopy>>newVersion
MCWorkingCopyBrowser>>saveVersion
PluggableButtonMorphPlus(PluggableButtonMorph)>>performAction
PluggableButtonMorphPlus>>performAction
[] in PluggableButtonMorphPlus(PluggableButtonMorph)>>mouseUp: {[:m | (m
containsPoint: evt cursorPoint)   ifTrue: [m performAction]]}
Array(SequenceableCollection)>>do:
PluggableButtonMorphPlus(PluggableButtonMorph)>>mouseUp:
PluggableButtonMorphPlus>>mouseUp:
PluggableButtonMorphPlus(Morph)>>handleMouseUp:
MouseButtonEvent>>sentTo:
PluggableButtonMorphPlus(Morph)>>handleEvent:
PluggableButtonMorphPlus(Morph)>>handleFocusEvent:
[] in HandMorph>>sendFocusEvent:to:clear: {[ActiveHand := self.  ActiveEvent
:= anEvent.  e := anEvent     transformedB...]}
[] in PasteUpMorph>>becomeActiveDuring: {[aBlock value]}
BlockContext>>on:do:
PasteUpMorph>>becomeActiveDuring:
HandMorph>>sendFocusEvent:to:clear:
HandMorph>>sendEvent:focus:clear:
HandMorph>>sendMouseEvent:
HandMorph>>handleEvent:
HandMorph>>processEvents
[] in WorldState>>doOneCycleNowFor: {[:h |  ActiveHand := h.  h
processEvents.  capturingGesture := capturingGest...]}
Array(SequenceableCollection)>>do:
WorldState>>handsDo:
WorldState>>doOneCycleNowFor:
WorldState>>doOneCycleFor:
PasteUpMorph>>doOneCycle
[] in Project class>>spawnNewProcess {[[World doOneCycle.  Processor yield.
false] whileFalse.  nil]}
[] in BlockContext>>newProcess {[self value.  Processor terminateActive]}

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

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


End of Beginners Digest, Vol 28, Issue 6
****************************************



More information about the Beginners mailing list