Christian

I tried this but it sticks where indicated:

  //create a new view
  dim v as new NSViewMBS (0,0, 400, 600)
  
  //create the graphics associated with the view
  dim nsg as NSGraphicsMBS = NSGraphicsMBS.graphicsContextWithNSView(v) //<< 
Routine stops here and returns
  
  if nsg = nil then break //<< routine doesn’t get this far.
  
  //get the text
  dim t as NSTextStorageMBS = textView.textStorage
  
  //put the text into the graphics
  nsg.drawInRect( t, new NSRectMBS(0,0, 200, 100) )
  
  //print out
  dim o as NSPrintOperationMBS = NSPrintOperationMBS.printOperationWithView(v)
  
  o.showsPrintPanel = true
  o.runOperationModalForWindow(self)
  o = nil

Am I missing something in creating the NSView or NSGraphics?

Regards

Jim


On 16 Jun 2014, at 11:07, Christian Schmitz <[email protected]> 
wrote:

> 
> Am 16.06.2014 um 17:44 schrieb Jim Pitchford <[email protected]>:
> 
>> Christian
>> 
>> Thank you for this.
>> 
>> I don’t fully understand it all yet but I note the following things from 
>> testing inside your NSTextViewMBS example.
>> 
> 
> Sorry. Maybe better let the view print itself.
> 
> Sincerely
> Christian
> 
> -- 
> Read our blog about news on our plugins:
> 
> http://www.mbsplugins.de/
> 

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to