Posts

Post marked as solved
2 Replies
0 Views
Thanks I will give this a try!
Post not yet marked as solved
4 Replies
0 Views
I installed 13.2.1 but still don't see any packages in the GitHub source.
Post not yet marked as solved
2 Replies
0 Views
Thanks, for your answer.. I have decided to save the image to a file.
Post marked as solved
5 Replies
0 Views
Thanks Claude for sending me the additional examples. Very useful!
Post marked as solved
5 Replies
0 Views
The following is the correct answer. It was supplied by Claude31 as well as an offline template he sent me. The way I do it is to design the report as a view in code. Schematically, it will be: I create a PrintView and house all the drawing in the draw function class PrintView: NSView { override func draw(_ dirtyRect: NSRect) { super.draw(dirtyRect) // Drawing code here. }} Then, to print, I call (from the handler of Print menu command for instance or from a print button in a view) let aSize = NSSize(width: printInfo.paperSize.width - 20, height: totalHeight) let printView = PrintView(frame: NSRect(origin: NSPoint(x: 1, y: 10), size: aSize)) // a full page, depending on orientation and call the printPanel         let printOp = NSPrintOperation(view: printView, printInfo: printInfo)
Post marked as solved
5 Replies
0 Views
Claude, Makes sense what you posted, I was hoping there was a design tool to create the drawing code. So, does that mean thinks like Font, Font Size, colors, Graphics etc. are created in PrintView Class with code? And I guess the only way to see the report is to print it? Do you have any code of a PrintView class you could share? Thanks
Post marked as solved
3 Replies
0 Views
Thanks Claude.. I got it working like I want using what I suggested above. Very similar to what you had suggested.
Post marked as solved
1 Replies
0 Views
I found the problem, It was in the IB... there was not a connection from the column textField to the table view cell.
Post marked as solved
3 Replies
0 Views
I know how I am going to proceed. I will build an array that I will update from the ComboAction and then use this array for the tableView as opposed to try to update the tableView cells directly.
Post marked as solved
2 Replies
0 Views
Thanks Claude, I used the @IBAction because I needed the contents of the comboBox and I had tried the delegate before and could not see a way to get contents of comboBox.
Post marked as solved
6 Replies
0 Views
Thanks to Claude for getting this working..
Post marked as solved
6 Replies
0 Views
I get an error when I added the following statement NSComboBoxCell.delegate = self The error was no delegate member for NSComboBoxCell.. So, I created a new test project which had a single view and a tableView that I added a comboBox to one of the columns without trying to use a datasource, I expected to see Item 1, Item 2 .. etc. in the column, but again nothing. Also, the comboBox is editable. There must be something basic I am missing. Still looking for an example..
Post marked as solved
6 Replies
0 Views
I changed func numberOfItemsInComboBoxCell(in comboBoxCell: NSComboBoxCell) - Int { to func numberOfItems(in comboBoxCell: NSComboBoxCell) - Int { and the error went away, however it still does not work. Also, I put a breakpoint on the function " func comboBoxCell" and it does not get called. Any Ideas how to resolve?
Post marked as solved
5 Replies
0 Views
It turns out if I use a NSTextView object instead of NSTextField object the spelling and grammar are built in. So, all I had do to was the following: create a scrollable text view object and then connect the TextView as follows:  @IBOutlet var itemDescription: NSTextView! Then turn on continuous spell checking with  itemDescription.isContinuousSpellCheckingEnabled = true
Post marked as solved
5 Replies
0 Views
Thanks Claude, The WWDC video had some other items of interest as well as NSTextCheckingController, however as you said "light overview" but somewhat helpful. I think I will take you suggestion and talk with apple support as I am mainly interested in NSTextCheckingController since it is the newer API.