Seaside 2.8.4 behavior

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Seaside 2.8.4 behavior

Timothy James Ziebart
Hello all. I downloaded 2.8.4 and loaded my application.  The application was
functioning as expected under 2.8.3 but under 2.8.4

1. I receive an Internal Error Message "Error: subscript is out of bounds: 6".  
reload the page it renders properly -- well almost see next item.  Stack
suggests problem with context, WAWAlkback, Block Closure and so on.

2. Tables rendered using MAReport do not list the column entries.  The row is
blank.

3. Form rendered using Magritte no longer displays -- no errors.  Example
below that did work under 2.8.3.
 
^(aModel descriptionAdminEdit asComponentOn: aModel)
                addMessage: 'View record for: ', (self returnIdentifier: aModel);
                addValidatedSwitch;
                yourself.

Down loaded the latest VM and tried the code with the one-click -- same
results.  Are these issues related to closures?  Any suggestions?
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside 2.8.4 behavior

Philippe Marschall
2009/7/3 Timothy James Ziebart <[hidden email]>:
> Hello all. I downloaded 2.8.4 and loaded my application.  The application was
> functioning as expected under 2.8.3 but under 2.8.4
>
> 1. I receive an Internal Error Message "Error: subscript is out of bounds: 6".
> reload the page it renders properly -- well almost see next item.  Stack
> suggests problem with context, WAWAlkback, Block Closure and so on.

Can you provide more information like Smalltalk dialect and version,
vm version, and the stack trace?

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside 2.8.4 behavior

Lukas Renggli
>> 1. I receive an Internal Error Message "Error: subscript is out of bounds: 6".
>> reload the page it renders properly -- well almost see next item.  Stack
>> suggests problem with context, WAWAlkback, Block Closure and so on.
>
> Can you provide more information like Smalltalk dialect and version,
> vm version, and the stack trace?

This problem has already been fixed a while ago in
Seaside2.8a1-lr.591. Please update your existing image or download the
latest pre-packaged one-click image.

> 2. Tables rendered using MAReport do not list the column entries.  The row is
> blank.
>
> 3. Form rendered using Magritte no longer displays -- no errors.  Example
> below that did work under 2.8.3.

These problems, for example, I cannot reproduce at
<http://localhost:8080/seaside/magritte/editor> in the one-click
image. What versions of Magritte are you using?

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Subclasses

Robert Sirois
Here's a completely noob Smalltalk question:

Let's say you have a superclass ie.:

WAComponent subclass: #aSuperClass
    instanceVariableNames: 'iVar'.

and a subclass of it:

aSuperClass subclass: #aSubClass
    instanceVariableNames: ''.

Basic super/subclass situation with one iVar... so my question is, when you instantiate an instance of the subclass, it also has iVar (not static), right? Or am I totally confused? Also, if I wanted to create accessors for it, would I put those on the parent or child class?

Thanks,
RS


Hotmail® has ever-growing storage! Don’t worry about storage limits. Check it out.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Subclasses

Sebastian Sastre-2
is ok RS. The ivar in the parert will make all the children to have that ivar (each instance its own value).
Formally you can put the accessors wherever you need but is normal to put them just in the parent. That way siblings of that ivar user can understand the getter and the setter too.
Play some in the workspace it don't bite, you'll see :)
best
sebastian


De: [hidden email] [mailto:[hidden email]] En nombre de Robert Sirois
Enviado el: Friday, July 03, 2009 23:22
Para: [hidden email]
Asunto: [Seaside] Subclasses

Here's a completely noob Smalltalk question:

Let's say you have a superclass ie.:

WAComponent subclass: #aSuperClass
    instanceVariableNames: 'iVar'.

and a subclass of it:

aSuperClass subclass: #aSubClass
    instanceVariableNames: ''.

Basic super/subclass situation with one iVar... so my question is, when you instantiate an instance of the subclass, it also has iVar (not static), right? Or am I totally confused? Also, if I wanted to create accessors for it, would I put those on the parent or child class?

Thanks,
RS


Hotmail® has ever-growing storage! Don’t worry about storage limits. Check it out.

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Subclasses

Randal L. Schwartz
In reply to this post by Robert Sirois
>>>>> "Robert" == Robert Sirois <[hidden email]> writes:

Robert> Basic super/subclass situation with one iVar... so my question is,
Robert> when you instantiate an instance of the subclass, it also has iVar
Robert> (not static), right?

Yes.

Robert> Also, if I wanted to create accessors for it, would I put those on the
Robert> parent or child class?

You could actually do either, but if you create them in the subclass, the
methods of the superclass cannot use them.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[hidden email]> <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
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Subclasses

Benoit St-Jean
In reply to this post by Robert Sirois
And to add to Randall's reply, you usually (well, if not 99.999999999999% of the time!) put the accessors at the same level as where the instance variable was declared...  Can't remember seeing an example when the inst var was declared in a class and the accessors declared in the subclass !
 
-----------------
Benoit St-Jean
Yahoo! Messenger: bstjean
Blog: lamneth.wordpress.com
A standpoint is an intellectual horizon of radius zero.
(Albert Einstein)



From: Robert Sirois <[hidden email]>
To: [hidden email]
Sent: Friday, July 3, 2009 10:21:36 PM
Subject: [Seaside] Subclasses

Here's a completely noob Smalltalk question:

Let's say you have a superclass ie.:

WAComponent subclass: #aSuperClass
    instanceVariableNames: 'iVar'.

and a subclass of it:

aSuperClass subclass: #aSubClass
    instanceVariableNames: ''.

Basic super/subclass situation with one iVar... so my question is, when you instantiate an instance of the subclass, it also has iVar (not static), right? Or am I totally confused? Also, if I wanted to create accessors for it, would I put those on the parent or child class?

Thanks,
RS


Hotmail® has ever-growing storage! Don’t worry about storage limits. Check it out.


Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Subclasses

Colin Putney
In reply to this post by Robert Sirois

On 3-Jul-09, at 7:21 PM, Robert Sirois wrote:

> Here's a completely noob Smalltalk question:
>
> Let's say you have a superclass ie.:
>
> WAComponent subclass: #aSuperClass
>     instanceVariableNames: 'iVar'.
>
> and a subclass of it:
>
> aSuperClass subclass: #aSubClass
>     instanceVariableNames: ''.
>
> Basic super/subclass situation with one iVar... so my question is,  
> when you instantiate an instance of the subclass, it also has iVar  
> (not static), right? Or am I totally confused? Also, if I wanted to  
> create accessors for it, would I put those on the parent or child  
> class?

That's right. Instances of your subclass will have their own values  
for iVar. In Smalltalk, a "static variable"—a single variable that's  
shared between all instances of the class (and all subclasses)—is  
called a "class variable". You can put accessors on either the  
superclass or the subclass, and as long as you only have one subclass  
it makes no difference.

Does that clarify things for you?

Colin _______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Subclasses

Robert Sirois
Ha, I knew it ;) Thanks for the input everyone, really clarified things further.

I.. uh.. forgot to 'super initialize.'. Hehe no wonder I still get called grasshopper :p

RS


Lauren found her dream laptop. Find the PC that’s right for you.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Subclasses part II

Robert Sirois
In reply to this post by Colin Putney
I got my test thingy working, but not the part of my application I was working on.

In my application I have

WAComponent < A < B < C.

C is calling 'initialize', so therefore I have to also call 'super initialize' all the way up? So each class above C need to have:

initialize
    super initialize.

Correct?

Thanks again,
RS


Lauren found her dream laptop. Find the PC that’s right for you.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Subclasses part II

Randal L. Schwartz
>>>>> "Robert" == Robert Sirois <[hidden email]> writes:

Robert> I got my test thingy working, but not the part of my application I was working on.

Robert> In my application I have

Robert> WAComponent < A < B < C.

Robert> C is calling 'initialize', so therefore I have to also call 'super initialize' all the way up? So each class above C need to have:

Robert> initialize
Robert>     super initialize.

No, if you don't define it, it acts automatically as if you said
"super initialize".

The rule is: if you define instance>>#initialize, you need to
include "super initialize" in the method. Otherwise, just ignore it.

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[hidden email]> <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
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Subclasses part II

stephane ducasse
In reply to this post by Robert Sirois
> In my application I have
>
> WAComponent < A < B < C.
>
> C is calling 'initialize', so therefore I have to also call 'super  
> initialize' all the way up? So each class above C need to have:
>
> initialize
>     super initialize.
>
> Correct?

C new
        will call aC initialize (the instance side initialize methods)

if you did not defined on your C class then the one of the  
superclasses (normal lookup of methods) will be applied.

Now if you have

C>>initialize
        myCStuff


you have to define

C>>initialize
        super initialize.
        myCStuff

and recursively on your superclasses too.

If one method initialize does not do a call to super initialize you  
may break WAComponent behavior that
relies on having the WAComponent>>initialize method invoked.

I hope that it is clearer.

Stef
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Subclasses part II

Robert Sirois
Thanks for the help (especially Randal Schwartz) :) I ended up having several silly little problems (as per below) and one other one where one class was referenced in memory several times when they should all have been separate.

RS

> From: [hidden email]
> To: [hidden email]
> Subject: Re: [Seaside] Subclasses part II
> Date: Sat, 4 Jul 2009 09:11:26 +0200
>
> > In my application I have
> >
> > WAComponent < A < B < C.
> >
> > C is calling 'initialize', so therefore I have to also call 'super
> > initialize' all the way up? So each class above C need to have:
> >
> > initialize
> > super initialize.
> >
> > Correct?
>
> C new
> will call aC initialize (the instance side initialize methods)
>
> if you did not defined on your C class then the one of the
> superclasses (normal lookup of methods) will be applied.
>
> Now if you have
>
> C>>initialize
> myCStuff
>
>
> you have to define
>
> C>>initialize
> super initialize.
> myCStuff
>
> and recursively on your superclasses too.
>
> If one method initialize does not do a call to super initialize you
> may break WAComponent behavior that
> relies on having the WAComponent>>initialize method invoked.
>
> I hope that it is clearer.
>
> Stef
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


Insert movie times and more without leaving Hotmail®. See how.
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Subclasses

James Robertson-7
In reply to this post by Robert Sirois
While the screencasts are specific to VisualWorks and ObjectStudio, I cover a lot of introductory stuff like this.  See:


For very beginner stuff, see:


and



James Robertson
Cincom Smalltalk Product Evangelist
Talk Small and Carry a Big Class Library




On Jul 3, 2009, at 10:21 PM, Robert Sirois wrote:

Here's a completely noob Smalltalk question:

Let's say you have a superclass ie.:

WAComponent subclass: #aSuperClass
    instanceVariableNames: 'iVar'.

and a subclass of it:

aSuperClass subclass: #aSubClass
    instanceVariableNames: ''.

Basic super/subclass situation with one iVar... so my question is, when you instantiate an instance of the subclass, it also has iVar (not static), right? Or am I totally confused? Also, if I wanted to create accessors for it, would I put those on the parent or child class?

Thanks,
RS


Hotmail® has ever-growing storage! Don’t worry about storage limits. Check it out._______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside