Re: Cocoa-dev Digest, Vol 8, Issue 597

2011-08-05 Thread Martin Stanley
I agree with Greg. Class variables would/should participate fully in the objC inheritance mechanisms. This would be a natural extension to the language since it already has Class methods (and also encourages the use of properties). From a modelling point of view the distinction between a method

Re: Cocoa-dev Digest, Vol 8, Issue 565

2011-07-27 Thread Martin Stanley
(oops, corrected response below; sorry) I also have implemented a UITextField for numeric (currency and percentage) input. Here is my experience: 1- I found the Number Pad keyboard fatally lacking due to omission of a decimal point character and a "Done" key. So use a Numbers and Punctuation key

Re: Cocoa-dev Digest, Vol 8, Issue 565

2011-07-27 Thread Martin Stanley
I also have implemented a UITextField for numeric (currency and percentage) input. Here is my experience: 1- I found the Number Pad keyboard fatally lacking due to omission of a decimal point character and a "Done" key. So use a Numbers and Punctuation keyboard. 2- I did not use a UIPickerView be

Re: Using MAPM with Cocoa/ObjectiveC

2010-12-03 Thread Martin Stanley
Duh!!! (Insert forehead slap here) Thanks for the very quick response. Martin On 2010-12-02, at 11:47 PM, Stephen J. Butler wrote: > Not at all familiar with this library but... > > On Thu, Dec 2, 2010 at 10:36 PM, Martin Stanley > wrote: >>int digits3 = m_apm_

Using MAPM with Cocoa/ObjectiveC

2010-12-02 Thread Martin Stanley
I am in need of an arbitrary precision library for use in an iPhone app. I downloaded MAPM (http://www.tc.umn.edu/~ringx004/mapm-main.html) and compiled it successfully, but am now running into some very strange errors. Things like commenting out a line of debugging code cause an "EXC_BAD_ACCES

Re: Store NSPredicate in Core Data

2010-10-17 Thread Martin Stanley
You may have already figured this out, but just to be complete, here is what I did to save NSPredicates in a Core Data store: I created a transformable attribute to hold the predicate. When I selected this in the model editor, the transformer defaulted to: NSKeyedUnarchiveFromData. That's it, a

Re: Intercepting deletion of NSManagedObjects or how to handle deletion in non-explicit relationships?

2010-07-31 Thread Martin Stanley
On 2010-07-31, at 12:54 AM, Kyle Sluder wrote: > >> However, my subclass of NSPredicateEditor overrides the objectValue method >> (to catch errors such as the one I described earlier). It would be possible >> to parse the predicate and create back-pointers at this point. This is >> called ever

Re: Intercepting deletion of NSManagedObjects or how to handle deletion in non-explicit relationships?

2010-07-30 Thread Martin Stanley
be a better approach? Martin On 2010-07-30, at 5:51 PM, Kyle Sluder wrote: > On Fri, Jul 30, 2010 at 2:11 PM, Martin Stanley > wrote: >> 2- the invalid predicate breaks the NSPredicateEditor. My >> NSPredicateEditorRowTemplate subclass populates its popup button dynamically

Re: Intercepting deletion of NSManagedObjects or how to handle deletion in non-explicit relationships?

2010-07-30 Thread Martin Stanley
ence the object before asking Core Data to delete the object. Martin Stanley Thinking Ventures m...@thinkingventures.com On 2010-07-30, at 10:13 AM, Keary Suska wrote: > On Jul 29, 2010, at 5:59 PM, Martin Stanley wrote: > >>> Even if you could capture a proposed deletion

Re: Cocoa-dev Digest, Vol 7, Issue 777

2010-07-29 Thread Martin Stanley
Thanks for the response, >> With SmartGroups the situation is different. The relationship is not >> explicit; it is due to the fact that the entity's name is used in the >> predicate. If the user deletes the referenced entity the predicate will no >> longer be valid. This is possibly okay in t

Intercepting deletion of NSManagedObjects or how to handle deletion in non-explicit relationships?

2010-07-28 Thread Martin Stanley
I have what I hope is an interesting modelling/technical problem. I have a NSPersistentDocument application that implements the concept of smart groups. The user can create arbitrarily complex predicates to specify the conditions for group membership. I have modelled this with a SmartGroup ent

Re: How to enforce a single NSDocument ... or should I do something else?

2010-01-06 Thread Martin Stanley
Bill Cheeseman wrote: > > On Jan 5, 2010, at 11:45 AM, Martin Stanley wrote: > >> I searched extensively and came up with the recommendation that I subclass >> NSDocumentController and override: >> - (id)openDocumentWithContentsOfURL:display:error: >> This wa

Re: How to enforce a single NSDocument ... or should I do something else?

2010-01-05 Thread Martin Stanley
k info > > 2. Either: > A) Return nil and an NSUserCancelled error. > B) Return the existing document. > > 3. When you get the callback from -canCloseDocument… call super's > implementation of -openDocumentWithContentsOfURL: > > On 5 Jan 2010, at 16:45,

How to enforce a single NSDocument ... or should I do something else?

2010-01-05 Thread Martin Stanley
I have a Core-Date application that uses the Cocoa Document architecture (NSPersistentDocument) and would like to ensure that the user only can have 1 document open at a time. Think of this application as similar to Mail.app or Addressbook.app, etc. except that I would like the user to be able t

Re: NSPredicateEditorRowTemplate, NSPopupButton and bindings

2009-05-25 Thread Martin Stanley
has current values. Can you please confirm my understanding? Thanks, Martin On 22-May-09, at 10:55 PM, Peter Ammon wrote: On May 22, 2009, at 9:37 AM, Martin Stanley wrote: I've finally got the hang of NSPredicateEditor and custom NSPredicateEditorRowTemplates. (It sure took a whil

NSPredicateEditorRowTemplate, NSPopupButton and bindings

2009-05-22 Thread Martin Stanley
I've finally got the hang of NSPredicateEditor and custom NSPredicateEditorRowTemplates. (It sure took a while and many, many searches and head-scratchings). However, I am stuck on one thing and I suspect that the problem might lie in the NSPredicateEditor code itself; hence this post. He

Re: Autosaving the selection in an NSTableView

2009-04-14 Thread Martin Stanley
ay of 0.0 (to get it executed in the next run loop). Works like charm. Volker Am 13.04.2009 um 05:32 schrieb Martin Stanley: I have a core-data document-based application that uses a NSTableView with an NSArrayController as its data source. I have managed to figure out the magic IB incantati

Autosaving the selection in an NSTableView

2009-04-13 Thread Martin Stanley
I have a core-data document-based application that uses a NSTableView with an NSArrayController as its data source. I have managed to figure out the magic IB incantations required to save the column sort, order and hidden data to the shared NSDeafulsController. What I would like to do is to