librelist archives

« back to archive

Try out Purple Shoes

Try out Purple Shoes

From:
ashbb
Date:
2012-01-26 @ 14:19
Hi all,

I've been studying SWT for a while and tried to develop Purple Shoes.

https://github.com/ashbb/purple_shoes

Today sample1, 3 and 5 have become to work as well as Green Shoes. ;-)

So, if you have time, try it out.

Cheers,
ashbb

Re: [shoes] Try out Purple Shoes

From:
Maximilian Stroh
Date:
2012-01-26 @ 14:26
Looks cool, I'll try this at home!

As it is JRuby based, it will work with linux, right?

(doesn't peter develop shoes with swing / swt ?)

2012/1/26 ashbb <ashbbb@gmail.com>

> Hi all,
>
> I've been studying SWT for a while and tried to develop Purple Shoes.
>
> https://github.com/ashbb/purple_shoes
>
> Today sample1, 3 and 5 have become to work as well as Green Shoes. ;-)
>
> So, if you have time, try it out.
>
> Cheers,
> ashbb
>

Re: [shoes] Try out Purple Shoes

From:
Date:
2012-01-26 @ 17:01
Fantastic ashbb !!

Not alone a beautiful demonstration how to use SWT from jRuby but a 
implementation of Shoes also !

Was already interested in the Swing examples that come with jRuby but now 
I'll certainly have look at it.

Thanks

 

Peter

Re: [shoes] Try out Purple Shoes

From:
ashbb
Date:
2012-01-27 @ 10:29
Hi Maximilian, Peter and folks,

Please let me know if Purple Shoes works or not on Linux or other
platforms. I've never tried except Windows 7 and XP.

> (doesn't peter develop shoes with swing / swt ?)
Yes, he's been developing Brown Shoes with both swing and swt.
But we have different approaches. ;-)

ashbb

Re: [shoes] Try out Purple Shoes

From:
J. Kaiden
Date:
2012-01-27 @ 10:37
hey ash -

  been kinda busy lately - i'll give purple a shot on ubuntu as soon as i
can...  sounds cool!

  - j



On Fri, Jan 27, 2012 at 11:29 AM, ashbb <ashbbb@gmail.com> wrote:

> Hi Maximilian, Peter and folks,
>
> Please let me know if Purple Shoes works or not on Linux or other
> platforms. I've never tried except Windows 7 and XP.
>
>
> > (doesn't peter develop shoes with swing / swt ?)
> Yes, he's been developing Brown Shoes with both swing and swt.
> But we have different approaches. ;-)
>
> ashbb
>

Re: [shoes] Try out Purple Shoes

From:
J. Kaiden
Date:
2012-01-27 @ 13:13
hey ash -

  nice work!  all samples confirmed on ubuntu 10.04 lts with jruby 1.6.5  -
wicked ;)

  i've been interesting in working with jruby for a while, and had been
fooling around some, but haven't been able to do much more than a simple
hello world app, mostly because i can't seem to find resources for
learning...

  have you found any good docs / tutorials for using jruby and swt?  if you
have could you send some links?

  thanks,

  - j




On Fri, Jan 27, 2012 at 11:37 AM, J. Kaiden <jakekaiden@gmail.com> wrote:

> hey ash -
>
>   been kinda busy lately - i'll give purple a shot on ubuntu as soon as i
> can...  sounds cool!
>
>   - j
>
>
>
> On Fri, Jan 27, 2012 at 11:29 AM, ashbb <ashbbb@gmail.com> wrote:
>
>> Hi Maximilian, Peter and folks,
>>
>> Please let me know if Purple Shoes works or not on Linux or other
>> platforms. I've never tried except Windows 7 and XP.
>>
>>
>> > (doesn't peter develop shoes with swing / swt ?)
>> Yes, he's been developing Brown Shoes with both swing and swt.
>> But we have different approaches. ;-)
>>
>> ashbb
>>
>
>

Re: [shoes] Try out Purple Shoes

From:
Peter Fitzgibbons
Date:
2012-01-27 @ 15:29
HI J,

I'd love to have your help with BrownShoes (Swing/SWT).
You're welcome to focus on any of the three frameworks :
WhiteShoes : Text-only "Interface" demo w/ shared RSpec examples for all
other frameworks
SwingShoes : Java Swing
SwtShoes : Eclipse SWT

Here are the links I am using :
*Java Swing Tutorials* :
http://docs.oracle.com/javase/tutorial/uiswing/TOC.html
You can also download from :

http://www.oracle.com/technetwork/java/javase/downloads/java-se-7-tutorial-2011-12-12-1399851.html
Then after following instructions :
file:///.../docs-jdk/tutorial/uiswing/TOC.html
*Java API (including Swing libs)
*http://docs.oracle.com/javase/6/docs/api/index.html
Also downloadable :

http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u30-download-1377139.html
Then after following instructions :
file:///.../docs-jdk/api/index.html?javax/swing/package-summary.html
*Eclipse SWT (no offline docs that I can find)*

http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/package-summary.html


**Peter Fitzgibbons
(847) 859-9550
Email: peter.fitzgibbons@gmail.com
IM GTalk: peter.fitzgibbons
IM AOL: peter.fitzgibbons@gmail.com

Re: [shoes] Try out Purple Shoes

From:
J. Kaiden
Date:
2012-01-27 @ 15:41
hi Peter -

  as i mentioned i'm still clueless about working with jruby and swing or
swt, but if i can get my chops up i'll be happy to help.

  thanks for the links - i'll have a look and start fooling around some to
see if i can figure it out a little better...

  thanks again -

  Shoes on!

  - j



On Fri, Jan 27, 2012 at 4:29 PM, Peter Fitzgibbons <
peter.fitzgibbons@gmail.com> wrote:

> HI J,
>
> I'd love to have your help with BrownShoes (Swing/SWT).
> You're welcome to focus on any of the three frameworks :
> WhiteShoes : Text-only "Interface" demo w/ shared RSpec examples for all
> other frameworks
> SwingShoes : Java Swing
> SwtShoes : Eclipse SWT
>
> Here are the links I am using :
> *Java Swing Tutorials* :
> http://docs.oracle.com/javase/tutorial/uiswing/TOC.html
> You can also download from :
>
> 
http://www.oracle.com/technetwork/java/javase/downloads/java-se-7-tutorial-2011-12-12-1399851.html
> Then after following instructions :
> file:///.../docs-jdk/tutorial/uiswing/TOC.html
> *Java API (including Swing libs)
> *http://docs.oracle.com/javase/6/docs/api/index.html
> Also downloadable :
>
> 
http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u30-download-1377139.html
> Then after following instructions :
> file:///.../docs-jdk/api/index.html?javax/swing/package-summary.html
> *Eclipse SWT (no offline docs that I can find)*
>
> 
http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/package-summary.html
>
>
> **Peter Fitzgibbons
> (847) 859-9550
> Email: peter.fitzgibbons@gmail.com
> IM GTalk: peter.fitzgibbons
> IM AOL: peter.fitzgibbons@gmail.com
>
>

Re: [shoes] Try out Purple Shoes

From:
Maximilian Stroh
Date:
2012-01-27 @ 16:44
Hey ashbb,
On my Ubuntu Linux 11.10 (with unity) the samples work without any problems.
rvm install jruby, gem install swt, and fire it up... easy.

just 1 point: in sample 5, the buttons are too big, or the window is too
small... 4 in a line and 1 in the next line ;)

- Anonyfox

2012/1/26 ashbb <ashbbb@gmail.com>

> Hi all,
>
> I've been studying SWT for a while and tried to develop Purple Shoes.
>
> https://github.com/ashbb/purple_shoes
>
> Today sample1, 3 and 5 have become to work as well as Green Shoes. ;-)
>
> So, if you have time, try it out.
>
> Cheers,
> ashbb
>

Re: [shoes] Try out Purple Shoes

From:
Tobias Pfeiffer
Date:
2012-01-29 @ 20:00
Works nice for me as well (Linux Mint 11 based on Ubuntu 11.04 - but 
with Gnome 2) - great work!

Sorry for being late to the party, damn sinusitis these last 1.5 weeks.

Cheers,
Tobi

On 01/27/2012 05:44 PM, Maximilian Stroh wrote:
> Hey ashbb,
> On my Ubuntu Linux 11.10 (with unity) the samples work without any 
> problems.
> rvm install jruby, gem install swt, and fire it up... easy.
>
> just 1 point: in sample 5, the buttons are too big, or the window is 
> too small... 4 in a line and 1 in the next line ;)
>
> - Anonyfox
>
> 2012/1/26 ashbb <ashbbb@gmail.com <mailto:ashbbb@gmail.com>>
>
>     Hi all,
>
>     I've been studying SWT for a while and tried to develop Purple Shoes.
>
>     https://github.com/ashbb/purple_shoes
>
>     Today sample1, 3 and 5 have become to work as well as Green Shoes. ;-)
>
>     So, if you have time, try it out.
>
>     Cheers,
>     ashbb
>
>

Re: [shoes] Try out Purple Shoes

From:
ashbb
Date:
2012-01-30 @ 12:05
Hi Tobi,

> Works nice for me as well (Linux Mint 11 based on Ubuntu 11.04
> - but with Gnome 2)
Glad to hear that. Thank you for taking the time!

> Sorry for being late to the party, ...
No prob. Let's have fun with colorful Shoes! :-D

ashbb

Re: [shoes] Try out Purple Shoes

From:
ashbb
Date:
2012-01-28 @ 02:27
@Anonyfox,

> On my Ubuntu Linux 11.10 (with unity) the samples work without any
problems.
> rvm install jruby, gem install swt, and fire it up... easy.
Wow, glad to hear that. Thanks for taking the time!

> just 1 point: in sample 5, the buttons are too big, or the window is too
> small... 4 in a line and 1 in the next line ;)
Aha,... there seems to be a difference between Windows and Linux.


@J,

> all samples confirmed on ubuntu 10.04 lts with jruby 1.6.5  - wicked ;)
That's good to know, thanks!

> i can't seem to find resources for learning...
Yeah.
Peter showed us some links. They are good.
And if you do googling `SWT tutorial`, you'll get lots of links.
But almost all tutorials are written in Java, not in Ruby....
I couldn't find any sample snippets in Ruby.

So, I've coding Purple Shoes through a trial and error process.
Look at commits. ;-)


@Peter,

I'd love to run Brown SwtShoes on my Windows 7.
I did the following:

- cd c:\tmp
- git clone git://github.com/shoes/brown_shoes.git
- cd brown_shoes
- .\swing-shoooes.bat

But got the following error...

C:\tmp\brown_shoes>call jruby --1.9 -e "$:<< 'lib'; require 'shoes';
require ''
"
LoadError: no such file to load -- facets/hash
  require at org/jruby/RubyKernel.java:1047
  require at c:/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36
   (root) at C:/tmp/brown_shoes/lib/shoes.rb:4
  require at org/jruby/RubyKernel.java:1047
  require at C:/tmp/brown_shoes/lib/shoes.rb:36
   (root) at -e:1

Umm,... what shall I do?


@OSX users,

Hey, does anyone try to run Purple Shoes on your OSX?

ashbb

Re: [shoes] Try out Purple Shoes

From:
Steve Klabnik
Date:
2012-01-28 @ 13:38
> @OSX users,
>
> Hey, does anyone try to run Purple Shoes on your OSX?
>


I haven't gotten a chance to yet, but next week I will!

Re: [shoes] Try out Purple Shoes

From:
Paul Hinze
Date:
2012-01-28 @ 22:35
On Sat, Jan 28, 2012 at 7:38 AM, Steve Klabnik <steve@steveklabnik.com> wrote:
>> Hey, does anyone try to run Purple Shoes on your OSX?
>
> I haven't gotten a chance to yet, but next week I will!

Hi guys,

I tried out purple_shoes on my OSX 10.7 machine - and it
org.swt.decided.to.BlowUp. :(

I documented all the details and some initial research in a GitHub
Issue, so that hopefully we can get it figured out.

https://github.com/ashbb/purple_shoes/issues/1

Hope this helps!

--phinze

Re: [shoes] Try out Purple Shoes

From:
ashbb
Date:
2012-01-29 @ 05:55
Hi all,

Paul found a solution. He could run Purple Shoes on his OSX. Awesome!

https://github.com/ashbb/purple_shoes/issues/1

ashbb

Re: [shoes] Try out Purple Shoes

From:
Peter Fitzgibbons
Date:
2012-01-29 @ 13:07
Paul & Ash,

You are doing great work with unwinding the x-platform startup issues.

The JNLP and SWT-web-start-deployment links look promising.
2 questions :
1. Could you get PurpleShoes packaged into java-web-start ?   (btw: can
java-web--start packages be launched from the command line?)
2. It looks like one JNLP conifg file can handle all the platforms (as
example in the SWT-web-start page).  Do you concur?

Thanks for your work!

Peter Fitzgibbons
(847) 859-9550
Email: peter.fitzgibbons@gmail.com
IM GTalk: peter.fitzgibbons
IM AOL: peter.fitzgibbons@gmail.com

Re: [shoes] Try out Purple Shoes

From:
ashbb
Date:
2012-01-30 @ 12:03
Hi Peter,

I'd never heard of JNLP and java-web-start before. I don't know anything
about Java.
So, I tried googling and found an article: How to deploy SWT Applications
using Java Web Start (http://www.eclipse.org/swt/jws/)

Looks great. But,... umm,... I'm not using Eclipse. :-P

ashbb

Re: [shoes] Try out Purple Shoes

From:
Peter Fitzgibbons
Date:
2012-01-30 @ 12:46
That's the one!
Eclipse is not required.  SWT is "an Eclipse Project", kind of like the
Apache Projects.
Although maintained by the Eclipse Org, SWT is a stand-alone Java lib.

Peter Fitzgibbons
(847) 859-9550
Email: peter.fitzgibbons@gmail.com
IM GTalk: peter.fitzgibbons
IM AOL: peter.fitzgibbons@gmail.com


On Mon, Jan 30, 2012 at 6:03 AM, ashbb <ashbbb@gmail.com> wrote:

> Hi Peter,
>
> I'd never heard of JNLP and java-web-start before. I don't know anything
> about Java.
> So, I tried googling and found an article: How to deploy SWT Applications
> using Java Web Start (http://www.eclipse.org/swt/jws/)
>
> Looks great. But,... umm,... I'm not using Eclipse. :-P
>
> ashbb

Re: [shoes] Try out Purple Shoes

From:
ashbb
Date:
2012-01-30 @ 13:17
Hi Peter,

> SWT is "an Eclipse Project", kind of like the Apache Projects.
> Although maintained by the Eclipse Org, SWT is a stand-alone Java lib.
Yeah, I know.
But, I read the following in this site: http://www.eclipse.org/swt/jws/

"Second, create a jar archive with your application:
 In Eclipse, select your application's project(s) and invoke the
File->Export... menu item."

Umm,... can I create a jar archive without Eclipse?

ashbb

Re: [shoes] Try out Purple Shoes

From:
Maximilian Stroh
Date:
2012-01-30 @ 13:20
Have heard of "rawr"? It should bundle together your script and jruby to a
jar ... As far as i know.
Am 30.01.2012 14:17 schrieb "ashbb" <ashbbb@gmail.com>:

> Hi Peter,
>
> > SWT is "an Eclipse Project", kind of like the Apache Projects.
> > Although maintained by the Eclipse Org, SWT is a stand-alone Java lib.
> Yeah, I know.
> But, I read the following in this site: http://www.eclipse.org/swt/jws/
>
> "Second, create a jar archive with your application:
>  In Eclipse, select your application's project(s) and invoke the
> File->Export... menu item."
>
> Umm,... can I create a jar archive without Eclipse?
>
> ashbb
>

Re: [shoes] Try out Purple Shoes

From:
Peter Fitzgibbons
Date:
2012-01-30 @ 15:33
'jar' is included as part of the JDK.
It functions (crudely) as a replacement for 'tar', with a few more bells &
whistles for java-esqueness.

My recommendation is don't be scared away by the "you must have this and
that" speak on these articles.  Most of the how-to is the command-line
utilities, and if a specific walkthrough is IDE-centric, there is another
out there that has the command-line incantation.

Anyway, if any of you (Lurkers, calling you now! )  find yourself taking
the Red pill, please do tell us your experiences and difficulties.

Shoes on.

Peter Fitzgibbons
(847) 859-9550
Email: peter.fitzgibbons@gmail.com
IM GTalk: peter.fitzgibbons
IM AOL: peter.fitzgibbons@gmail.com

Re: [shoes] Try out Purple Shoes

From:
Eric Watson
Date:
2012-01-30 @ 17:48
On Jan 30, 2012, at 9:35 AM, Peter Fitzgibbons
<peter.fitzgibbons@gmail.com> wrote

> Anyway, if any of you (Lurkers, calling you now! )  find yourself taking
the Red pill

Wait...red pill or brown pill? Or purple pill?

I think I took it, whatever it was.

Re: [shoes] Try out Purple Shoes

From:
Peter Fitzgibbons
Date:
2012-01-30 @ 17:55
Better drink a glass of water then.

When the phone rings, you'll become a Java Window.

:)

Peter Fitzgibbons
(847) 859-9550
Email: peter.fitzgibbons@gmail.com
IM GTalk: peter.fitzgibbons
IM AOL: peter.fitzgibbons@gmail.com

Re: [shoes] Try out Purple Shoes

From:
ashbb
Date:
2012-01-28 @ 03:46
Hi Peter,

I installed two gems, facets and log4jruby, into JRuby.
Then fixed LoadError. But I got another following error...

C:\tmp\brown_shoes>.\swing-shoooes.bat

C:\tmp\brown_shoes>call jruby --1.9 -e "$:<< 'lib'; require 'shoes';
require ''
"
DEBUG sun.reflect.NativeMethodAccessorImpl (invoke0) - Shoooes!
BaseUTF8Encoding.java:205:in `leftAdjustCharHead':
java.lang.ArrayIndexOutOfBoun
dsException: 24
        from RubyString.java:4921:in `end_with_pCommon'
        from RubyString.java:4901:in `end_with_p'
        from RubyString$i$end_with_p.gen:65535:in `call'
        from CachingCallSite.java:312:in `cacheAndCall'
        from CachingCallSite.java:169:in `call'
        from
c:/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:58:in `c
hained_1_rescue_line_56'
        from
c:/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in `c
hained_0_rescue_1$RUBY$SYNTHETIC__file__'
        from
c:/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:-1:in `_
_file__'
        from
c:/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:-1:in `_
_file__'
        from JittedMethod.java:167:in `call'
        from CachingCallSite.java:312:in `cacheAndCall'
        from CachingCallSite.java:169:in `call'
        from -e:1:in `__file__'
        from -e:-1:in `load'
        from Ruby.java:695:in `runScript'
        from Ruby.java:688:in `runScript'
        from Ruby.java:595:in `runNormally'
        from Ruby.java:444:in `runFromMain'
        from Main.java:321:in `doRunFromMain'
        from Main.java:241:in `internalRun'
        from Main.java:207:in `run'
        from Main.java:191:in `run'
        from Main.java:171:in `main'

Umm,...
ashbb

Re: [shoes] Try out Purple Shoes

From:
Peter Fitzgibbons
Date:
2012-01-28 @ 03:58
HI Ash,

Two things,

You apparently didn't "bundle install"

For that matter, on windows you don't have the benefit of RVM, so have you
somehow switched to Jruby ok?

Second, the runners (./swing-shoooes, ./swing-shoooes.bat) have no
auto-start, so you have to run a file.

Try ./swing-shoooes.bat testing/blank-window.rb

Peter Fitzgibbons
(847) 859-9550
Email: peter.fitzgibbons@gmail.com
IM GTalk: peter.fitzgibbons
IM AOL: peter.fitzgibbons@gmail.com

Re: [shoes] Try out Purple Shoes

From:
ashbb
Date:
2012-01-28 @ 04:10
Hi Peter,

I installed bundle, too.
Then did:

C:\tmp\brown_shoes>.\swing-shoooes.bat testing/blank-window.rb

And got the following:

C:\tmp\brown_shoes>call jruby --1.9 -e "$:<< 'lib'; require 'shoes';
require 'te
sting/blank-window.rb' "
DEBUG sun.reflect.NativeMethodAccessorImpl (invoke0) - Shoooes!
NameError: undefined local variable or method `gui_init' for
#<Shoes::App:0xa2d3
04>
  initialize at C:/tmp/brown_shoes/lib/shoes/app.rb:36
         app at C:/tmp/brown_shoes/lib/shoes/app.rb:12
      (root) at /C:/tmp/brown_shoes/testing/blank-window.rb:1
     require at org/jruby/RubyKernel.java:1047
     require at
c:/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36
      (root) at -e:1

Ah, still got an error, but have a good feeling to fix soon... :)

ashbb

Re: [shoes] Try out Purple Shoes

From:
ashbb
Date:
2012-01-28 @ 08:57
OMG! It's all my fault. xx-P

C:\tmp\brown_shoes>.\swt-shoooes.bat testing\blank-window.rb

worked well on my Windows 7. I got a blank window! :-D

ashbb

Re: [shoes] Try out Purple Shoes

From:
Peter Fitzgibbons
Date:
2012-01-28 @ 11:58
So, I think now ./swing-shoooes.bat is missing the require for the
framework.

This ./swing-shoooes.bat might work (can't test right now) (the below is
all one line)
call jruby --1.9 -e "$:<< 'lib'; require 'shoes'; require
'shoes/configuration'; Shoes.configuration.framework = 'swing_shoes';
require '%1' "

I'll have to remember to update those... the new framework refactor does
things differently.
Thanks for testing out.
Do you have any other questions?  I love helping you all learn!

Peter Fitzgibbons
(847) 859-9550
Email: peter.fitzgibbons@gmail.com
IM GTalk: peter.fitzgibbons
IM AOL: peter.fitzgibbons@gmail.com