[Pharo-project] non-interactive compiling with feedback

Hernán Morales Durand hernan.morales at gmail.com
Mon Mar 19 02:13:25 EDT 2012


If you have Grease loaded:

Gofer new
    squeaksource: 'CodeGenerator';
    package: 'CodeGenerator';
    load.

[CGSmalltalk new
    setSourceAsCode;
    targetClass: Object;
    compile: 'testMethod
    ^ 42. ^ 32' ]
on: SyntaxErrorNotification " or Notification "
do: [: ex | ^ ex errorMessage ]

2012/3/17 Milan Mimica <milan.mimica at gmail.com>

> Hello,
>
> i want to add some scripting capabilities to my app, and I wand to use
> plain smalltalk for that. The only problem is that I still haven't found a
> way to generate a compiled which would return a string describing a problem
> in case a syntax errors. Can I get some help?
>
>
> --
> Milan Mimica
>



-- 
Hernán Morales
Institute of Veterinary Genetics.
National Scientific and Technical Research Council (CONICET).
La Plata (1900), Buenos Aires, Argentina.
Telephone: +54 (0221) 421-1799.
Internal: 422
Fax: 425-7980 or 421-1799.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20120319/f81495c0/attachment-0001.html>


More information about the Pharo-dev mailing list