[MacRuby-devel] printing

John Shea johnmacshea at gmail.com
Wed Dec 3 08:45:13 PST 2008


Hello all,

has anyone done any printing in MacRuby?

I can get it to print ok - if I select the page range, otherwise the  
print routine wants to print thousands (or more - i got scared and  
stopped it) pages.

The rectForPage and the drawRect get called those thousands of times -  
even though the range should be 1 page.

I suspect that the issue is in the knowsRangePage - it is passed a  
pointer.

I de reference the pointer with range = range_pointer[0]  (which does  
give me a range) and then set values with range.location = etc, etc
(rather than range_pointer->location  =  1 , in Objective C)

My suspicion is that although i set the range length and location that  
in fact it is not changing the original pointer appropriately, but  
perhaps inappropriately ;-) with a very large number (a memory address  
perhaps?).

Anyone else had this issue?

cheers and thanks,
John




More information about the MacRuby-devel mailing list