Re: Autolayout error with NSSplitView When Divider Programmatically Moved

2013-11-10 Thread Darren Wheatley
changes. Thanks for taking the time to look into this for me. Regards Darren. On 10/11/2013 02:54, Kyle Sluder wrote: On Nov 9, 2013, at 4:04 PM, Darren Wheatley wrote: I have a 10.7 app built on 10.9. I'm debugging on 10.9. My main view has a splitView with two panes: a webview in one

Autolayout error with NSSplitView When Divider Programmatically Moved

2013-11-09 Thread Darren Wheatley
I have a 10.7 app built on 10.9. I'm debugging on 10.9. My main view has a splitView with two panes: a webview in one, and an NSScrollView in the other. When the app starts I programmatically move the divider to the right to hide the right-hand pane and the enclosed NSScrollView. When this hap

Re: How to change highlight colour on NSTableView row

2013-10-27 Thread Darren Wheatley
new subclass Was that the correct approach? Regards Darren. On 22/10/2013 21:06, Corbin Dunn wrote: On Oct 22, 2013, at 5:36 AM, Darren Wheatley wrote: Hi, Thanks for the reply. I tried the code sample you suggested but can't get it to work. When running the default highlightin

Re: How to change highlight colour on NSTableView row

2013-10-22 Thread Darren Wheatley
10.7. Regards Darren. On 21 Oct 2013, at 17:23, wrote: > On 21 Oct 2013, at 16:19, Darren Wheatley > wrote: > >> Hi, >> >> I have a custom subclass of NSTableView in my app. >> >> Can anyone suggest a method that will allow me to set a custom highlight

Re: How to change highlight colour on NSTableView row

2013-10-22 Thread Darren Wheatley
10.7. Regards Darren. On 21 Oct 2013, at 17:23, wrote: > On 21 Oct 2013, at 16:19, Darren Wheatley > wrote: > >> Hi, >> >> I have a custom subclass of NSTableView in my app. >> >> Can anyone suggest a method that will allow me to set a custom highlight

How to change highlight colour on NSTableView row

2013-10-21 Thread Darren Wheatley
Hi, I have a custom subclass of NSTableView in my app. I would like to change the highlight colour displayed when the user clicks on a row, and have the colour maintained when the NSTableView subclass loses focus. I have changed the subclass to ensure that the table is never first responder, a

Screen capture on OS X

2013-07-29 Thread Darren Wheatley
Hi, I have a Mac app that loads a Leaflet.js map into a web view. I've written a screenshot method to grab the map for inclusion in a print view. This is largely based on the examples here: http://stackoverflow.com/questions/11948241/cocoa-how-to-render-view-to-image I'm writing my app on 10.8

Query core data store based on a transient calculated value

2011-10-28 Thread Darren Wheatley
Hi, I'm fairly new to the more complex parts of Core Data. My application has a core data store with 15K rows. There is a single entity. I need to display a subset of those rows in a table view filtered on a calculated search criteria, and for each row displayed add a value that I calculate in re

Duplicate records adding to an NSTableView + NSArrayController

2011-05-26 Thread Darren Wheatley
Hi, I have an NSTableView bound to an NSArrayController, itself bound to a Core Data store. The app is working as expected, with two exceptions: 1. Duplicate records: I have an "add" button bound to arraycontroller.insert I have created a newObject method to allow me to define default values,

TableView / ArrayController sorting not updating the tableview

2011-03-19 Thread Darren Wheatley
Hi, I have an NSTableView bound to a core-data-backed NSArrayController by binding individual columns to arraycontroller.arrangedObjects. I have the default out-of-the-box sorting working, but when I click one of the column headers to sort the table I have problems. Basically the display of the

Sorting NSTableView + CoreData - odd behaviour

2011-03-17 Thread Darren Wheatley
Hi, I have an NSTableView bound to a core data-backed NSArrayController. The columns are numbers, strings, and BOOLs. The application works fine, but sorting is broken. I assumed that sorting worked "out of the box" but when I click a column header in the table the rows are reorganised but in

Count of records in an NSArrayController when associated NSTableView is filtered

2011-03-15 Thread Darren Wheatley
Hi, I have an NSTableView bound to an NSArrayController. I would like to have a dashboard onscreen that shows counts of the data based on field values in the entity, e.g.: all records records with active = Y records with updated = Y records with updated = N Is it possible to bind these values i

Re: could not locate an NSManagedObjectModel

2011-02-20 Thread Darren Wheatley
Hi, Just to ask the obvious question, but you've created the persistentStoreCoordinator and the managedObjectModel and hooked them all up right? I've been having similar problems this weekend, and running Instruments with Zombies enable has been a great help. It help me pin point the problem area

WebKit - javascript / DOM listeners only fire once

2011-02-13 Thread Darren Wheatley
Hi, I have a Mac client application written in Cocoa / Objective-C that presents the user with a list of html documents in a table (master view), and when the user clicks on a row it loads the selected HTML page into a WebView (detail view). Every HTML page has a listener on "click" that calls

Core Data, NSTableView, Bindings, in code update problem

2011-02-09 Thread Darren Wheatley
Hi, I have a simple Core Data app with one entity. I display the content of the core data store (SQL) in an NSTableView, binding the columns to fields in an NSArrayController, which is itself bound to the core data stack. I then have a "data inspector" panel, which is populated when the user cli

Core Data bindings question

2011-02-07 Thread Darren Wheatley
Hi, I have a Core Data app that displays data in a tableView with each column bound to a field in a core data entity. One field is called "active", and is of type BOOL I box the BOOL for insertion into the Core Data store using [NSNumber numberWithBool]; In the TableView I would like to bind th

Re: Disable (grey out) main menu when displaying modal window?

2011-01-25 Thread Darren Wheatley
Hi, The answer is to implement the NSUserInterfaceValidations protocol. The one method I needed to implement was: - (BOOL)valildateUserInterfaceItem: Returning NO disables the referenced menu item. All works fine now. Darren. On 25/01/2011 08:45, "Darren Wheatley" wrote: >

Disable (grey out) main menu when displaying modal window?

2011-01-25 Thread Darren Wheatley
Hi, I load a custom file import window in my Cocoa app using: [NSApp runModalForWindow:window]; The window displays just fine, and is modal. However, the application main menu is still active (e.g. File menu and items), which is making the modal display redundant. I've googled this and searche

Re: Mapping APIs for use in Cocoa app

2010-10-28 Thread Darren Wheatley
se for iOS applications. Again, this is just my interpretation and should not be taken as legal advice. I'm going to switch to a Cloud Made solution. Regards Darren. On 26/10/2010 18:51, Darren Wheatley wrote: Hi, Since my original posting I have found (as you note) that there are two sets of

Re: Mapping APIs for use in Cocoa app

2010-10-26 Thread Darren Wheatley
o show a house you have purchased. Such would not charge for access, but use is contingent on having paid an unrelated fee. But this is now quite far afield from cocoa-dev. -- Conrad Shultz www.synthetiqsolutions.com <http://www.synthetiqsolutions.com> On Oct 26, 2010, at 3:10, Darren Whea

Mapping APIs for use in Cocoa app

2010-10-26 Thread Darren Wheatley
Hi, I'm building a Mac / iPad app that displays simple maps to the user (map with location pin, allowing the user to pan and zoom). This is pretty easy to do with Google Maps, but AFAIK the API Ts&Cs prevent use in a commercial application unless a Google Premier API licence is purchased (£Ks)

Re: Encrypting data in a Core Data SQL store for a Mac desktop app

2010-07-18 Thread Darren Wheatley
Hi, I'd assumed (possibly incorrectly?) that the iPhone encryption was hardware and/or iOS4 dependent. Is that not the case? Cheers Darren. On 18/07/2010 19:25, Jerry Krinock wrote: On 2010 Jul 18, at 03:42, Darren Wheatley wrote: Can anyone give me a pointer on how to encrypt (an

Encrypting data in a Core Data SQL store for a Mac desktop app

2010-07-18 Thread Darren Wheatley
Hi, Can anyone give me a pointer on how to encrypt (and use) the data in the Core Data sql store of my Mac desktop app? My application has a data store that on its own has a value, and I would like to provide at least a basic level of protection / deterrent before I release it. I've Googled

NSExpressionForFunction - only works with NSSQLiteStoreType?

2009-12-19 Thread Darren Wheatley
Hi, I've been following the example NSExpression + core data code in the "Fetching Managed Objects" section of the "Core Data Programming Gudie" on the Apple Developer site: http://developer.apple.com/mac/library/documentation/cocoa/Conceptual/CoreData/Articles/cdFetching.html The sample cod

Calculating the max value for a core data attribute

2009-12-17 Thread Darren Wheatley
Hi, I need to find out the maximum value of an attribute of a core data entity. I'm still in the Cocoa learning curve, and this is a simple test app that I'm using to learn. The app imports fortunes from a text file and displays a table on the screen. The imports are done in a separate, back

Re: EXC_BAD_ACCESS when calling NSOpenPanel

2009-11-23 Thread Darren Wheatley
dialog to add functionality such as favourite folders)? Cheers Darren. On 24/11/2009 00:51, Darren Wheatley wrote: Hi, I have the following code as the action from a button click: - (IBAction)chooseFile:(id)sender; { NSOpenPanel *openPanel = [NSOpenPanel openPanel]; [openPanel

EXC_BAD_ACCESS when calling NSOpenPanel

2009-11-23 Thread Darren Wheatley
Hi, I have the following code as the action from a button click: - (IBAction)chooseFile:(id)sender; { NSOpenPanel *openPanel = [NSOpenPanel openPanel]; [openPanel setCanChooseDirectories:NO]; [openPanel setCanCreateDirectories:NO]; [openPanel beginSheetForDirectory:nil

Examples of MVC pattern with Core Data

2009-10-14 Thread Darren Wheatley
Hi, I've been Googling and searching the XCode docs for good examples of using the MVC pattern with Core Data, but not had a lot of success. Can anyone suggest some good examples? I'm learning Cocoa at the moment, and while I'm happy with the MVC pattern (and design patterns in general), I

Newbie question - core data

2009-09-14 Thread Darren Wheatley
Hi, I'm learning Cocoa / Objective-C. Right now I'm trying to build a simple Core Data application. I've built a helper app to read in CSV and populate an XML core data store. That works fine. I have seen lots of examples of binding a view to core data entities so that the contents of t

How can I get data from a javascript function in a WebView into the enclosing Cocoa App?

2009-04-04 Thread Darren Wheatley
Hi, I'm writing an application that renders a web page in a web view. The web page contains an image that the user can click on. There are Javascript events that get called when the user clicks on the image. These events contain the coordinates of the point the user clicked on. I need to be