librelist archives

« back to archive

trouble with swt specs

trouble with swt specs

From:
Kc Erb
Date:
2014-03-17 @ 19:38
Hi all,

running rspec spec/swt_shoes/any_spec.rb gives me the following error:

>>>
/Users/KC/.rvm/gems/jruby-1.7.11@shoes/gems/simplecov-0.8.2/lib/simplecov.rb:31
warning: tracing (e.g. set_trace_func) will not capture all events without
--debug flag

***WARNING: Display must be created on main thread due to Cocoa
restrictions.

LoadError: load error: shoes/swt -- org.eclipse.swt.SWTException: Invalid
thread access

>>>

After  fiddling around it seems like rspec is looking for swt.rb in
spec/shoes instead of lib/shoes.

The build is passing so it must be a local error right?

So I did something dramatic - I deleted my local repository and fork, and
did a completely fresh install. But I'm still getting the same error.




By the way, whenever I run an app lately I get this warning:

>>>

*** WARNING: Method userSpaceScaleFactor in class NSWindow is deprecated on
10.7 and later. It should not be used in new applications. Use
convertRectToBacking: instead.

>>>

Any suggestions?

-KC

Re: [shoes] trouble with swt specs

From:
Eric Watson
Date:
2014-03-17 @ 20:14
On Mar 17, 2014, at 2:38 PM, KC Erb <iamkcerb@gmail.com> wrote:

> Hi all,
> 
> running rspec spec/swt_shoes/any_spec.rb gives me the following error:
> 
> >>>
> 
/Users/KC/.rvm/gems/jruby-1.7.11@shoes/gems/simplecov-0.8.2/lib/simplecov.rb:31
warning: tracing (e.g. set_trace_func) will not capture all events without
--debug flag
> ***WARNING: Display must be created on main thread due to Cocoa restrictions.
> 
> LoadError: load error: shoes/swt -- org.eclipse.swt.SWTException: 
Invalid thread access

On OS X, you have to pass a special flag to jruby in order to run an SWT 
app (this isn’t Shoes-specific). It looks like this:

  $ jruby -J-XstartOnFirstThread [whatever]

You can see the correct invocation for running a spec if you run

  $ rake spec:swt

That will run all the specs, but it will also display the command it is 
using to run them. Just copy the first part of that command, adding the 
specs you want to run. For example, to run the swt arc specs:

  $ jruby --debug --1.9 -Ispec -J-XstartOnFirstThread -S rspec --tty 
-rswt_shoes/spec_helper spec/swt_shoes/arc_spec.rb

Hope that helps!

Eric

Re: [shoes] trouble with swt specs

From:
ashadul shak
Date:
2014-03-17 @ 20:19
ok

Date: Mon, 17 Mar 2014 13:38:33 -0600
From: iamkcerb@gmail.com
Subject: [shoes] trouble with swt specs
To: shoes@librelist.com

Hi all,
running rspec spec/swt_shoes/any_spec.rb gives me the following error:

>>>/Users/KC/.rvm/gems/jruby-1.7.11@shoes/gems/simplecov-0.8.2/lib/simplecov.rb:31
warning: tracing (e.g. set_trace_func) will not capture all events without
--debug flag


***WARNING: Display must be created on main thread due to Cocoa restrictions.

LoadError: load error: shoes/swt -- org.eclipse.swt.SWTException: Invalid 
thread access
>>>
After  fiddling around it seems like rspec is looking for swt.rb in 
spec/shoes instead of lib/shoes.


The build is passing so it must be a local error right?
So I did something dramatic - I deleted my local repository and fork, and 
did a completely fresh install. But I'm still getting the same error.








By the way, whenever I run an app lately I get this warning:
>>>









*** WARNING: Method userSpaceScaleFactor in class NSWindow is deprecated 
on 10.7 and later. It should not be used in new applications. Use 
convertRectToBacking: instead. 
>>>



Any suggestions?
-KC


 		 	   		  

Re: [shoes] trouble with swt specs

From:
Kc Erb
Date:
2014-03-17 @ 21:37
Thanks!


On Mon, Mar 17, 2014 at 2:19 PM, ashadul shak <ashadulshak@hotmail.com>wrote:

> ok
>
> ------------------------------
> Date: Mon, 17 Mar 2014 13:38:33 -0600
> From: iamkcerb@gmail.com
> Subject: [shoes] trouble with swt specs
> To: shoes@librelist.com
>
>
> Hi all,
>
> running rspec spec/swt_shoes/any_spec.rb gives me the following error:
>
> >>>
> /Users/KC/.rvm/gems/jruby-1.7.11@shoes/gems/simplecov-0.8.2/lib/simplecov.rb:31
> warning: tracing (e.g. set_trace_func) will not capture all events without
> --debug flag
>  ***WARNING: Display must be created on main thread due to Cocoa
> restrictions.
> LoadError: load error: shoes/swt -- org.eclipse.swt.SWTException: Invalid
> thread access
> >>>
> After  fiddling around it seems like rspec is looking for swt.rb in
> spec/shoes instead of lib/shoes.
> The build is passing so it must be a local error right?
> So I did something dramatic - I deleted my local repository and fork, and
> did a completely fresh install. But I'm still getting the same error.
>
>
>
>
>
>
> By the way, whenever I run an app lately I get this warning:
> >>>
>
> *** WARNING: Method userSpaceScaleFactor in class NSWindow is deprecated
> on 10.7 and later. It should not be used in new applications. Use
> convertRectToBacking: instead.
> >>>
>
> Any suggestions?
>
> -KC
>
>
>


-- 
 "If there is an exception to every rule, then every rule must have at
least one exception; the exception to this one being that it has no
exception."