Re: [MacRuby-devel] FYI - Update on NSView printing problem
Hi Robert,
Interesting. Do you reproduce the crash when you use this code into a new Xcode
project?
If it only crashes in your app, maybe it's related to your view. How complex is
the view?
Laurent
On Sep 10, 2010, at 9:30 AM, Robert Rice wrote:
> I tracked down my NSView printing problem to the NSPrintPanel preview view.
> My view printing now works again by overriding the default option to display
> the small preview view:
>
> def print
> po = NSPrintOperation.printOperationWithView( @printableView )
> po.printPanel.setOptions( 0 )
> po.setShowsPrintPanel( true )
> po.runOperationModalForWindow( @printableView.window, delegate:self,
> didRunSelector:"printOperationDidRun:success:contextInfo:",
> contextInfo:nil )
> end
>
> def printOperationDidRun( printOperation, success:success,
> contextInfo:contextInfo )
> puts "printOperationDidRun #{ success }"
> end
>
> or I can bypass the printPanel entirely.
>
> It will take more experimenting to find out why NSPrintPanel is not creating
> a graphics context for my NSView or why it would call my drawRect with an
> invalid context; it works with my PDFView. But now
> it's a low priority for me since I don't really need the NSPrintPanel preview.
>
> Bob Rice
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] dylib hell
Hi Steven, I see, that's a problem indeed. I'm not even sure loading the sqlite3 macports version first is a good idea, since CFNetwork might not work with that version. Did you try renaming the sqlite3 macports library name, or toggle the options passed to the linker when creating the library? Laurent On Sep 12, 2010, at 3:49 PM, Steven Parkes wrote: > Ugh. The sqlite that ships with OS X doesn't have the full text search module > enabled. This isn't usually a problem: just install a custom version, e.g., > via macports, and then (re)install the sqlite3 gem. Works great for 1.8/1.9. > > Fails miserably for macruby. > > I think the problem is that while macruby doesn't link to any sqlite, > CFNetwork does, and it links against the the system version. That link gets > resolved before the gem extension is loaded, so the system version is used. > > I don't have much experience with dylibs on OS X, so I'm not sure if there's > a good workaround for this. > > I can hack a workaround by actually calling out sqlite3 on the macruby link > line and telling it to look at the maports version. That gets loaded before > the framework stuff and everything seems happy. > > But, it's gross, of course. > > Ugh. > ___ > MacRuby-devel mailing list > [email protected] > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel ___ MacRuby-devel mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
