[Glass] Newbie on GLASS - Hello world fail

Mariano Martinez Peck via Glass glass at lists.gemtalksystems.com
Sun Sep 20 07:13:48 PDT 2015


On Sun, Sep 20, 2015 at 9:48 AM, Ezequiel Tolnay via Glass <
glass at lists.gemtalksystems.com> wrote:

> Hi all!
>
> I've installed the DevKit [dev branch, thanks Dale for your guidence so
> far] in both my server (Debian Wheezy) and my desktop (OSX), and connect
> via SSH port forwarding. The seaside gem is now working, the "counter"
> examples work well, and I tested introducing a divide by zero error to
> debug via continuation and all went well there. So far so good (with a few
> hiccups that I managed to resolve on the way).
>
> I'm now attempting the same Seaside tutorial that I did a while ago on
> Pharo (boquitas). I'm stuck now in the simplest Hello World. I get an error
> in *WAInitialRenderLoopContinuation>>createRoot*:
>
> *(error 2010), a Symbol does not understand #'new'".*
>
> In the freshly installed devKit, the error raises by doing the following:
>
>
>    1. In tODE workspace:
>    -      WAComponent subclass: #HelloWorld
>                instanceVariableNames: '' classVariableNames: ''
>                poolDictionaries: '' category: 'GLASS'.
>       2. Browse to HelloWorld in tODE, and add for it a new protocol
>    called "test" (without protocols, adding a new method fails, is this a
>    bug?).
>    3. Add new method:
>    -      renderContentOn: html
>                html heading: 'Hello world!'.
>    4. Register the class running this in the tODE workspace:
>    -      WAAdmin register: HelloWorld asApplicationAt: 'hello'.
>       5. Open seaside on the Internet browser (http://localhost:8383),
>    "hello" application is there.
>    6. Click on "hello" raises a "does not understand #new" error.
>
>
You may want to copy the stack of the error? (CMD+Shift+P from the tODE
debugger will open the stack in a printable way so that you can copy paste)
Also..which version of Seaside did you install?



> A couple more questions:
>
>    1. after installing via "./installServer devKit 3.2.8.1" netLDI
>    listens in different random ports each time it starts. How do I get it to
>    listen on the one in the default gs64ldi port 50377 always instead?
>
>
I am not sure if  the script startNetldi allows you to do that. But, what I
can tell you for sure is that dealing directly to netldi, DOES allow you to
choose ports. For example, this is how I start netldi in my scripts:

GEMSTONE_USER -n -P $NETLDI_PORT -p`expr $NETLDI_PORT + 1`:`expr
$NETLDI_PORT + 2` -l $APPLICATION_LOG_DIR/netldi$APPLICATION_NAME.log
netldi$APPLICATION_NAME > $GEMSTONE_LOGDIR/netldiStartup.log 2>&1'

Note the arguments -P and -p .. so you maybe need to have you custom script
to start/stop netldi (based on startNetldi script)
https://github.com/GsDevKit/gsDevKitHome/blob/master/bin/startNetldi

Or you can convince Dale to add some arguments to #startNetldi   :)

>
>    1. I managed to get GemStone and netLDI to listen in localhost
>
>
Uhhhh this is a very good idea!!! This is for security reasons right?


>
>    1. only via the config option "STN_LISTENING_ADDRESSES = "::1";" on
>    $GS_HOME/gemstone/stones/devKit/extents/system.conf, but couldn't figure
>    out how to configure zinc to listen only on localhost. I modified
>    *WAGemStoneRunSeasideGems>>startOn:* to "*self adaptorClass startOn:
>    port bindingAddressOn: '127.0.0.1'*", and created *WAServerAdaptor
>    class>>startOn:bindingAddressOn:* as a copy of *>>startOn:*, but with "*adaptor
>    server bindingAddress: aBindingAddress.*" right before "adaptor
>    start". Is there a more appropriate way to do this?
>
>
Good idea. Which kind of socket address object are you instantiating and
how do you get an instance out of a string like 'localhost'?


>
>    1. The standard Seaside landing page on this installation goes
>    straight to the "browse" page, and does not include several of the examples
>    that I remember from the default Seaside installation in Pharo, like the
>    ones that use make use of JQuery. Is this expected in Gemstone's version or
>    is indicative of a partial/failed install?
>
>
This is very likely because you installed a newer Seaside version whose
"ConfigurationOfSeaside" brings different packages by default than what it
used to load default. You should simply install the packages/groups you
want (like jQuery for example) that are not in the default load.

For example, this is what I load:

 #('Core' 'Zinc-Seaside' 'Javascript' 'JQuery' 'JSON' 'FastCGI' 'Email')


>
>    1.
>
> Thanks!
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
>
>


-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20150920/585d1d46/attachment.html>


More information about the Glass mailing list