invoking Java class

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

invoking Java class

Gérard Bunel
Hi All,

Following the rules given on redline web site I tried the Greeting example which works well when running exactly the example.
Thus seeing that the Greeting class also implements a "void say( String message)". I expected the adaptor able to adapt for a say: 'Hello" invocation.
But this does not work. Is there something I missed ?

Also I can find a way to setup an execution environment under eclipse.
How should I configure the "run configuration (tried may -r and -s options but still unable to resolve st.redline.core.Symbo.

Thanks for you answers

Gerard

--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: invoking Java class

James Ladd
Hi Gérard,

The Java adaptor still has some rough edges and I'm pushing the creator to work more on it.
The bug you point out (not being able to call say: 'hello') is an issue I have raised with him.
No eta on that - sorry.

I will setup Eclipse and run the examples and post here and on http://redline.st on how to do
this. BTW we have an IntelliJ plugin in the works that should be available soon.

We are still on the lookout for Eclipse plugin developers to do same with Redline.

- James.


On Tue, Apr 16, 2013 at 6:34 PM, Gérard Bunel <[hidden email]> wrote:
Hi All,

Following the rules given on redline web site I tried the Greeting example which works well when running exactly the example.
Thus seeing that the Greeting class also implements a "void say( String message)". I expected the adaptor able to adapt for a say: 'Hello" invocation.
But this does not work. Is there something I missed ?

Also I can find a way to setup an execution environment under eclipse.
How should I configure the "run configuration (tried may -r and -s options but still unable to resolve st.redline.core.Symbo.

Thanks for you answers

Gerard

--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: invoking Java class

Gérard Bunel
Thank you James,

I'm really interested in working on redline. But at this time I still feel difficult to understand the design.
Do you have some document that explains theway it (should) work ?

I don't know IntelliJ and I work with Eclipse. To better understand I try some examples I write by myself.
One of the thing I don't understand is the way some ST classes are bound to java classes.
For example I tried simply the st expression '1 printString' which fails with a ' WriteStream doesNotUnderstand on: with argument: 1'
So I looked at WriteStream class and its ancestors and saw that finally we have: 

PositionableStream < #WriteStream.
then
Stream < #PositionableStream.
and then
Object < #Stream.

So my understanding is that finally there's a kind of binding between the ST Stream and the java Stream
But I can't see how this binding is done.
Am I correct ?

Gerard

--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: invoking Java class

James Ladd

The Redline Smalltalk Web Site has information on getting started:
http://www.redline.st/discover/getting-started.html
And it also has blog posts on how things work under the covers:
http://www.redline.st/blog/

I'm trying to find someone to develop the Eclipse plugin, and when I get a few minutes
I'll setup a project in Eclipse and describe the process.

The reason that 1 can't handle the 'printString' message is because the Runtime is not
complete. This is the work in progress that I am doing. Would you like to help?

It is possible to bind to Java object automatically and manually, there are blog posts about
this on the link above. The manual approach is detailed here:
http://www.redline.st/blog/2012/05/01/emitting-jvm-bytecodes.html

Thank you for the questions and sorry you had to wait for the Eclipse support.

- James.


On Wed, Apr 17, 2013 at 4:47 PM, Gérard Bunel <[hidden email]> wrote:
Thank you James,

I'm really interested in working on redline. But at this time I still feel difficult to understand the design.
Do you have some document that explains theway it (should) work ?

I don't know IntelliJ and I work with Eclipse. To better understand I try some examples I write by myself.
One of the thing I don't understand is the way some ST classes are bound to java classes.
For example I tried simply the st expression '1 printString' which fails with a ' WriteStream doesNotUnderstand on: with argument: 1'
So I looked at WriteStream class and its ancestors and saw that finally we have: 

PositionableStream < #WriteStream.
then
Stream < #PositionableStream.
and then
Object < #Stream.

So my understanding is that finally there's a kind of binding between the ST Stream and the java Stream
But I can't see how this binding is done.
Am I correct ?

Gerard

--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: invoking Java class

Gérard Bunel


Le mercredi 17 avril 2013 08:55:59 UTC+2, jamesl a écrit :

The Redline Smalltalk Web Site has information on getting started:
http://www.redline.st/discover/getting-started.html
And it also has blog posts on how things work under the covers:
http://www.redline.st/blog/

I've already read these posts 


I'm trying to find someone to develop the Eclipse plugin, and when I get a few minutes
I'll setup a project in Eclipse and describe the process.

The reason that 1 can't handle the 'printString' message is because the Runtime is not
complete. This is the work in progress that I am doing. Would you like to help?

Sure. But I think my understanding is not clear enough to begin this work. 

It is possible to bind to Java object automatically and manually, there are blog posts about
this on the link above. The manual approach is detailed here:
http://www.redline.st/blog/2012/05/01/emitting-jvm-bytecodes.html

I Think I'll dive in this part as I'm not familiar with bytecode. 


Thank you for the questions and sorry you had to wait for the Eclipse support.

Thanks to you. That's a really interesting project
 

- James.


On Wed, Apr 17, 2013 at 4:47 PM, Gérard Bunel <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="qmWDrUrPJ4wJ">gerard...@...> wrote:
Thank you James,

I'm really interested in working on redline. But at this time I still feel difficult to understand the design.
Do you have some document that explains theway it (should) work ?

I don't know IntelliJ and I work with Eclipse. To better understand I try some examples I write by myself.
One of the thing I don't understand is the way some ST classes are bound to java classes.
For example I tried simply the st expression '1 printString' which fails with a ' WriteStream doesNotUnderstand on: with argument: 1'
So I looked at WriteStream class and its ancestors and saw that finally we have: 

PositionableStream < #WriteStream.
then
Stream < #PositionableStream.
and then
Object < #Stream.

So my understanding is that finally there's a kind of binding between the ST Stream and the java Stream
But I can't see how this binding is done.
Am I correct ?

Gerard

--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="qmWDrUrPJ4wJ">redline-smallt...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: invoking Java class

Gérard Bunel

Hi,

James, you can think I should before talking. And you should be right.
I finally don't consider "Greeting say: 'Hello' " not working as a bug.
This is due to the dynamic invocation mechanism.
I tried, for confirmation, "Greetin say: #( 'hello' ) " And it works.


--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: invoking Java class

James Ladd
It is all good.

I'm glad you are trying things and working through it.
I had forgotten the #('hello') approach which is available, however I'll still look into
a simple 1 argument approach.

The #() is because java methods don't support keywords, so when we adapt them
into Smalltalk we can't easily tell if say: is supposed to take 1 argument or 100.
Hence we pack them into #().

Going to try and get the Eclipse info to you tonight.

- James.


On Wed, Apr 17, 2013 at 11:13 PM, Gérard Bunel <[hidden email]> wrote:

Hi,

James, you can think I should before talking. And you should be right.
I finally don't consider "Greeting say: 'Hello' " not working as a bug.
This is due to the dynamic invocation mechanism.
I tried, for confirmation, "Greetin say: #( 'hello' ) " And it works.


--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Loading...