Re: [MacRuby-devel] CorePlot success?

2010-11-10 Thread Eloy Duran
Can you provide a code snippet (irb) reproducing the exact problem you are experiencing? On Nov 10, 2010, at 5:59 AM, Russ McBride wrote: > > Has anyone gotten CorePlot working in a MacRuby app? > > http://code.google.com/p/core-plot/ > > I'm working on re-writing the DatePlot app in

[MacRuby-devel] Can I install gems without sudo?

2010-11-10 Thread Zhi-Qiang Lei
Dear All, Can I install gems without sudo? I want them to be installed in .gems under my home folder. Thanks. bogon% macgem install -V data_mapper Fetching http://rubygems.org/latest_specs.4.8.gz OK Fetching http://rubygems.org/specs.4.8.gz OK Installing gem extlib-0.9.15 unknown: warning: ignor

Re: [MacRuby-devel] CorePlot success?

2010-11-10 Thread Russ McBride
Hmm ... I think I've got some linking/import issues, although the framework is found. >> framework 'cocoa' => true >> framework 'coreplot' => true >> graph = CPXYGraph.alloc.initWithFrame(CGRectMake(0,0,0,0)) => # >> plotSpace = graph.defaultPlotSpace; => # >> axisSet = graph.axisSet => # >>

Re: [MacRuby-devel] CorePlot success?

2010-11-10 Thread Laurent Sansonetti
Hi Russ, I suspect this CorePlot framework does not include a BridgeSupport file. This could explain why MacRuby cannot use the CPDecimalFromFloat() C function or the kCPDarkGradientTheme C constant (note that it must be called KCPDarkGradientTheme from MacRuby, as constants must always start w

Re: [MacRuby-devel] CorePlot success?

2010-11-10 Thread Russ McBride
Merci Laurent. That's progress. I generated a BridgeSupport file. Now, I'm getting this: >> theme = CPTheme.themeNamed(KCPDarkGradientTheme) => # But now: >> z = CPDecimalFromFloat(4.1) Assertion failed: (size > 0), function convert_type, file compiler.cpp, line 5803. Abort trap CPDecimalF

Re: [MacRuby-devel] CorePlot success?

2010-11-10 Thread Matt Aimonetti
I have restricted Internet access so I can't check the API to verify the method signature but at least I can help with the constant issue. It should read KCPDarkGradientTheme and not kCPDarkGradientTheme. This is because in Ruby all constants have to start by a capital letter. - Matt Sent from

Re: [MacRuby-devel] CorePlot success?

2010-11-10 Thread Laurent Sansonetti
Hi Russ, Could you try MacRuby trunk? (Try the latest nightly build: http://www.macruby.org/files/nightlies/) I changed the compiler to recognize C-style arrays in structs and I'm believe it's the problem you're hitting. Also, I believe that gen_bridge_metadata will generate 32-bit metadata by

Re: [MacRuby-devel] CorePlot success?

2010-11-10 Thread Jordan Hubbard
On 11/10/10 4:39 PM, Laurent Sansonetti wrote: Also, I believe that gen_bridge_metadata will generate 32-bit metadata by default, and I suppose you run MacRuby in 64-bit mode (as it is the default on 64-bit hardware). You may want to pass the --64-bit argument to the generator. That default see

Re: [MacRuby-devel] CorePlot success?

2010-11-10 Thread Laurent Sansonetti
On Nov 10, 2010, at 5:50 PM, Jordan Hubbard wrote: > On 11/10/10 4:39 PM, Laurent Sansonetti wrote: >> Also, I believe that gen_bridge_metadata will generate 32-bit metadata by >> default, and I suppose you run MacRuby in 64-bit mode (as it is the default >> on 64-bit hardware). You may want to

Re: [MacRuby-devel] Can I install gems without sudo?

2010-11-10 Thread Laurent Sansonetti
Hi, I guess you can still pass --install-dir, butI wonder why we don't fall back on the ~/.gems repository in case the system one isn't writable. Could you file a ticket about this? I will have a look. Thanks, Laurent On Nov 10, 2010, at 12:57 AM, Zhi-Qiang Lei wrote: > Dear All, > > Can I i

Re: [MacRuby-devel] CorePlot success?

2010-11-10 Thread Russ McBride
Thanks for the suggestions, Laurent. I re-generated the BridgeSupport version with a 64-bit-specific version, then ran a diff on the old version and new version and the content appears the same. The file is in /Library/Frameworks/CorePlot.framework/Resources/BridgeSupport/CorePlot.bridgesup

Re: [MacRuby-devel] CorePlot success?

2010-11-10 Thread Laurent Sansonetti
Hi Russ, After a quick look, I suspect a problem with NSDecimal, as both CPDecimalFromFloat and +plotRangeWithLocation:length: use it. However I'm unable to reproduce a similar error just playing with NSDecimal directly in MacRuby. $ ./miniruby -e "framework 'Foundation'; p NSDecimalString(42

Re: [MacRuby-devel] Can I install gems without sudo?

2010-11-10 Thread Zhi-Qiang Lei
Dear All, Can MacRuby install gems in this way which is feasible on ruby 1.8.7? Thanks. On Nov 10, 2010, at 4:57 PM, Zhi-Qiang Lei wrote: > Dear All, > > Can I install gems without sudo? I want them to be installed in .gems under > my home folder. Thanks. > > bogon% macgem install -V data_map

Re: [MacRuby-devel] Can I install gems without sudo?

2010-11-10 Thread James Harton
I've had quite a lot of success integrating both bundler and isolate into my Xcode build process. bundler --deployment worked particularly well if you make sure it puts them in the finished app bundle path. James Harton @jamesotron On 11/11/2010, at 19:18, Zhi-Qiang Lei wrote: > Dear All, >