total internationalisation of Groovy

2017-03-24 Thread frenchy48
I implemented a funny experiment on top of Groovy: using my tool beginners can completely program in their own language (I mean everything is translated). You can take a look of this experiment at: http://scrountch.info the implementation is not extremely efficient (or well written) but I consider

Re: subclassing Console : looks like a bug!

2017-03-04 Thread frenchy48
not a bug: a strange thing that happens when the code is started from inside IntelliJ (was confused because tested subclass of Console inside IntelliJ) sorry - member of Grumpy Old Programmers -- View this message in context:

subclassing Console : looks like a bug!

2017-03-04 Thread frenchy48
if you write a very simple subClass of groovy.ui.Console the output has then a very Strange behavior: - if you create a String with "unusual" chars (I mean chinese or Arabic ) - if you "println" this string then you only get "?" -but when printing the result it's ok very annoying for me

Re: changing dynamically the name of classes in a source code

2017-02-28 Thread frenchy48
well a last response to the initial message. Though many may think it's useless to change the name of classes and methods I succeeded in implementing a framework (for teaching) that just does that ... next step: may be change also the language keywords dynamically (please don't shoot: don't shoot

Re: sudden ClassFormatError

2016-08-05 Thread frenchy48
OK forget it: after careful binary sieve of the code I found a cast (by "as") which failed at runtime! the message is strange but stranger things happen! - member of Grumpy Old Programmers -- View this message in context:

sudden ClassFormatError

2016-08-05 Thread frenchy48
strange: I thought I didn't change anything in my code () and then suddenly I get this: this part of the code being run at load-time I just can't figure what's happening (line 68 has no such deal with Path2D though it appears a lot of time in the code) any idea on how to make changes?

Re: aliasing methods

2016-04-14 Thread frenchy48
by the way doing this by changing the .properties file description with such a protocol - #properties file java.awt.geom.Area#isEmpty() = estVide java.awt.geom.Area#contains = contient - now this code does not work! the key name is parsed

Re: aliasing methods

2016-04-13 Thread frenchy48
missing the code parts ? sorry ok I try again // this part read from a resource so simplifying String className = 'java.awt.Canvas' String originalMethodName = 'repaint' String newMethName = 'repeindre' Class clazz =

Re: aliasing methods

2016-04-13 Thread frenchy48
a code example? well almost everything is in the initial post I read the resource I get the name of a Class, the name of a method and the name for the alias for this method the code will add the alias to the metaclass of the named class (suppose this class to be "java.awt.Frame") later user of the

Re: changing dynamically the name of classes in a source code

2016-03-31 Thread frenchy48
to aseem: I willl publish my codes as open source (because I think it is important to teach in your own language BTW: arabic is a problem to me because I no not know how students could handle bidirectional code text) in the meantime here is the subclass of groovyConsole: I have also a trait

Re: changing dynamically the name of classes in a source code

2016-03-29 Thread frenchy48
answer found Groovy is fantastic! Since I use the groovyConsole for my teaching scripts I created a subclass of groovy console then modified the CompilerConfiguration to accept an importCustomizer that aliases import! fun! - member of Grumpy Old Programmers -- View this message in context:

Re: changing dynamically the name of classes in a source code

2016-03-28 Thread frenchy48
Thanks for replying as a side note OOP appear only in chapter 8 of my book so I have to survive in the meantime A long long time ago I used object logo ... sticking to groovy helps me to provide the additional codes I want to create simplistic graphics. now back to the main point: when I read

changing dynamically the name of classes in a source code

2016-03-27 Thread frenchy48
Before asking a question I'l have first to explain WHY this question. I have been writing a book about programming (for beginners) For the labs I use a small subset of Groovy now my labs are slightly boring so I decided to write a small graphical library to facilitate the design of