Re: Cocoa-dev Digest, Vol 13, Issue 82

2016-02-12 Thread Michael Swan
Right before you call reload data log the current thread [NSThread currentThread]; If it says anything other than main that's the issue. It happens all the time since it's easy to forget that whatever callback tells you about the added data ends up coming in on the background. Hope that helps,

Re: Core Data sync between iOS and Mac apps

2015-05-07 Thread Michael Swan
Dave, Unfortunately on the OS X side with iCloud, Core Data, and documents it is pretty much a pick any two situation. The iOS side can be done but there are some gotchas not really covered in the documentation. I've actually just started work on my own custom subclasses of UIManagedDocument

Re: Programmatic Core Data Migration

2013-02-25 Thread Michael Swan
Tom, The data store doesn't have a copy of the model in it, it just has hashes that are used to quickly compare the store to the data model trying to open it. In order for migration to work you will need to have both the old and new data models. In lightweight migrations Core Data uses the two

Re: Very basic table binding blind spot

2012-08-03 Thread Michael Swan
Erik, I've only made a custom subclass of NSArrayController once and that was a long time a go to do some custom thing that I don't remember now. Normally I add an array to the appropriate view controller that has the table data in it and then bind the NSArrayController's content to that array.

Re: A question about core data.

2012-04-12 Thread Michael Swan
mparchet, Let Core Data do the heavy lifting for you, that is what it is there for. If you use an array controller with your UI and set up bindings you can get away with out writing any code to make the base of your UI work. If I remember correctly you can send your own SQL queries but you can

issues using encodeWithCoder: with NSAttributedString for iOS

2012-02-26 Thread Michael Swan
I have a UIDocument with a single property, an NSAttributedString, that I am trying to save. The documentation says that NSAttributedString conforms to the NSCoding protocol so I'm using NSData *docData = [NSKeyedArchiver archivedDataWithRootObject:self.contents]; where self.contents is the

Re: iCloud On OSX - Cannot save changes

2012-01-31 Thread Michael Swan
April, You should try saving a non-iCloud document and see if you still have issues. If so try going through a couple of Apple's basic Mac OS X tutorials to see if they fill in the holes for you. If you are working with Core Data you can check out some tutorials I've written for a document

Re: Does anyone else dislike Xcode 4?

2011-07-24 Thread Michael Swan
First off I will echo what a few others have said already and I'm sure a moderator will say fairly soon; this list is for the discussion of the Cocoa and Cocoa Touch APIs not the tools commonly used to develop using said APIs. There are forums and an Xcode users list that are appropriate for

Re: KVO and Core data

2010-08-09 Thread Michael Swan
Gideon, It looks like you have an NSManagedObject that is observing itself. If this is in fact the case what is the objective? There may be a better way to accomplish your goal if you let us know what it is. Mike Swan ETCP Certified Entertainment Electrician http://www.michaelsswan.com As

[announce] printing tabular data

2010-07-31 Thread Michael Swan
It seems there are questions periodically about printing table data that pop up, so here is a class that takes care of a lot of the grunt work, MSTablePrint. http://themikeswan.wordpress.com/2010/07/31/printing-tabular-data/ Mike Swan ETCP Certified Entertainment Electrician

Re: Array controllers in code?

2010-07-23 Thread Michael Swan
Amy, A few things with what you are trying to do. First off, using IBOutlet for array controllers is totally correct, basically any element you add in IB you should access through an IBOutlet. As for the calculation of the a value based on other values in Core Data you have a few problems. The

Core Data: strange keypath problem

2009-09-17 Thread Michael Swan
So I am working on a simple Core Data app that can track how much I have made from various apps I sell (right now I just have two iPhone ones I charge for). This is also the app that my Expenses tutorial is based on. I am working on the monthly totals portion again and trying to use

[Announce] Expense: A Core Data Tutorial part 3 posted.

2009-06-23 Thread Michael Swan
I just posted the third part of my Core Data tutorial dealing with user preferences. The series also deals with bindings a good deal. http://themikeswan.wordpress.com/2009/06/23/expenses-a-core-data-tutorial-part-3/ Mike Swan ETCP Certified Entertainment Electrician http://www.michaelsswan.com

Re: Cocoa-dev Digest, Vol 6, Issue 811

2009-05-31 Thread Michael Swan
Strange, this originally was a link A Core Data Tutorial Part 2: Polishing the Basics Guess it got stripped, here is the real link. http://themikeswan.wordpress.com/2009/05/30/a-core-data-tutorial-part-2-polishing-the-basics/ Mike Swan ETCP Certified Entertainment Electrician

[Announce] A Core Data Tutorial Part 2: Polishing the Basics

2009-05-30 Thread Michael Swan
Part 2 of my tutorial is up for anyone that is interested. A Core Data Tutorial Part 2: Polishing the Basics Mike Swan ETCP Certified Entertainment Electrician http://www.michaelsswan.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

[announce] A Core Data tutorial

2009-05-22 Thread Michael Swan
Just finished the first in a series of tutorials that takes a Core Data app from beginning to end including things like icons, and serial numbers. http://themikeswan.wordpress.com/2009/05/22/7/ Feel free to let me know what you think. Also there is one feature I want to add later that I

NSPasteboard issue

2009-03-26 Thread Michael Swan
Hello all, I am working on copy/paste in Core Data and have been following the NSPersistentDocument Core Data Tutorial tutorial from http://developer.apple.com/documentation/Cocoa/Conceptual/NSPersistentDocumentTutorial/05_CopyAndPaste/copyAndPaste.html I am having a problem with the

Core Data entity fetching by date

2008-11-08 Thread Michael Swan
So I am looking for a better way to fetch all entities from each month of the year so that I can get a total for each month. Each entity has a date, amount, type (which is a to one relationship to a type entity, the reverse is to-many). In the end I want to break things down so that the

passing argument 1 of 'stringWithFormat:' makes pointer from integer without a cast

2008-07-21 Thread Michael Swan
So I have done the standard Google search and clean all targets but neither has helped. I have the following two lines of code: NSLog(@array count = %i,[array count]); // This works just fine NSString *string = [NSString stringWithFormat:(@array count = %i, [array

Re: passing argument 1 of 'stringWithFormat:' makes pointer from integer without a cast [SOLVED]

2008-07-21 Thread Michael Swan
Aron Ken, Yes thank you both that has been driving me crazy mostly because I knew it was something stupid like that. Thank you, Mike Swan Change itself is not painful it is resistance to change that causes pain. ___ Cocoa-dev mailing list

How is an NSDecimalNumber an incompatible type for argument 1 of 'decimalNumberWithDecimal:'?

2008-06-20 Thread Michael Swan
Perhaps someone else has seen this before but it makes no sense to me. The included code is from a NSManagedObject subclass and is part of a method to return a readonly property that is based on the value of two attributes (amount frequency). With the this code: (I removed irrelevant code