[Seaside] html & css basics and tutorial

r00t uk r00tuk at gmail.com
Wed Nov 26 11:04:37 UTC 2008


Thanks

That is helpful and the class is WAHtmlCanvas.


2008/11/26 Steve Aldred <aldreds at velocitynet.com.au>

> r00t uk wrote:
>
>> Thanks for the response and I completely agree with you that it is not
>> Seaside's place to teach HTML.  What I am looking for is the Smalltalk
>> expressions used to create the HTML, i.e. the "receiver, message selector
>> and arguments".  For example, to display a url in HTML you would type:
>> <a href="http://www.w3schools.com/">Visit W3Schools!</a>
>>
>>
>> but in Smalltalk you would type the following in a "rendering" method:
>>
>> html anchor url: 'www.3schools.com <http://www.3schools.com>'; with:
>> 'Visit W3Schools!'.
>>
>>
>> Now, without using CSS, you are able to change font, font-size, style etc.
>> of the link above, but how is it done using Smalltalk expressions?
>> How, or where can I find information that will give me valid "receiver,
>> message selector and arguments"?  I assume that the "receiver" will always
>>
>> be "html".
>>
>> I hope that clarifies my question(s)?  If it is a matter of just working
>> your way through class libraries and comments (which ones?) then that
>> is what I will do.  Just feels like there must be an easier way for
>> finding the information.
>>
>
> Sorry but I'm still not sure what you are asking. Do you mean what methods
> do you send to generate the various HTML tags? If so look for the
> implementor of #anchor (I think its WACanvas but haven't an image in front
> of me). That will give you all of the messages for components/tags. The
> implementor will site the tag brush class.
>
> To find what you can send to a tag it is pretty much examine the tag brush
> class and its hierarchy. As always in Smalltalk the code is the most up to
> date documentation. Luckily it doesn't take long to learn the common methods
> you need.
>
> As for CSS, there mostly won't be methods for controlling style on a
> component/tag. The code is for the structure and behaviour, CSS is for the
> look/style. You can implement a #style method on your components to define
> the CSS. If the tag or tag path is not sufficient, set id and class on your
> components. Just make sure if you use ids they are unique, we only tend to
> use those for singletons on a page. In our development we tend to have few
> style methods, mostly its defined on a Look&Feel class we use as a container
> for everything else.
>
> cheers
> Steve A
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20081126/b2de4de8/attachment.htm


More information about the seaside mailing list