Merci Laurent. That's progress. I generated a BridgeSupport file.
Now, I'm getting this: >> theme = CPTheme.themeNamed(KCPDarkGradientTheme) => #<CPDarkGradientTheme:0x200621300> But now: >> z = CPDecimalFromFloat(4.1) Assertion failed: (size > 0), function convert_type, file compiler.cpp, line 5803. Abort trap CPDecimalFromFloat and friends are not inline functions so I don't need to generate a dylib file, as far as I can tell. And: >> xLow = 0.0 => 0.0 >> xLow = NSNumber.numberWithFloat(xLow.to_f).decimalValue => #<NSDecimal:0x20055fc60> >> fDays = 398.0 => 398.0 >> fDays = NSNumber.numberWithFloat(fDays.to_f).decimalValue => #<NSDecimal:0x2005ebe60> >> xrange = CPPlotRange.plotRangeWithLocation(xLow, length:fDays) Assertion failed: (size > 0), function convert_type, file compiler.cpp, line 5803. Abort trap Cheers, russ On Nov 10, 2010, at 12:03 PM, Laurent Sansonetti wrote: > 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 with a > uppercase letter). > > You can try to generate a BridgeSupport file using gen_bridge_metadata(1). > Check out the end of the man page for examples. The generated file should be > installed within the framework. > > Laurent > > On Nov 10, 2010, at 11:49 AM, Russ McBride wrote: > >> >> 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)) >> => #<CPXYGraph:0x20054cb00> >> >> plotSpace = graph.defaultPlotSpace; >> => #<CPXYPlotSpace:0x20051d360> >> >> axisSet = graph.axisSet >> => #<CPXYAxisSet:0x2005229c0> >> >> >> >> >> So good, so far, but... >> >> >> >> x = 4.2 >> => 4.2 >> >> x.class >> => Float >> >> z = CPDecimalFromFloat(x) >> NoMethodError: undefined method `CPDecimalFromFloat' for main:TopLevel >> >> >> >> theme = CPTheme.themeNamed(kCPDarkGradientTheme) >> NameError: undefined local variable or method `kCPDarkGradientTheme' for >> main:TopLevel >> >> CPTheme.method_defined?(:themeNamed) >> => false >> >> >> >> >> On Nov 10, 2010, at 12:50 AM, Eloy Duran wrote: >> >>> 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 and have had limited >>>> success, but I'm currently stuck with problems surrounding: >>>> >>>> CPPlotRange.plotRangeWithLocation >>>> >>>> and >>>> CPDecimalFromFloat >>>> >>>> Cheers, >>>> russ >>>> >>>> _______________________________________________ >>>> MacRuby-devel mailing list >>>> MacRuby-devel@lists.macosforge.org >>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel >>> >>> _______________________________________________ >>> MacRuby-devel mailing list >>> MacRuby-devel@lists.macosforge.org >>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel >> >> _______________________________________________ >> MacRuby-devel mailing list >> MacRuby-devel@lists.macosforge.org >> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > _______________________________________________ > MacRuby-devel mailing list > MacRuby-devel@lists.macosforge.org > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel