Re: migrating CoreData data model doesn't work

2010-05-21 Thread Hal Mueller
MOGenerator (from Wolf Rentzsch) is one solution to this problem. It uses one 
file for human-written custom code, another file for machine-generated 
boilerplate code.

http://github.com/rentzsch/mogenerator

Hal

On May 21, 2010, at 4:53 AM, Gustavo Pizano wrote:

 Now if you have custom methods in your MO's then what I do is that I don't 
 delete, or create a new one, but simply add by had the new(s) attributes I 
 set in the new model version. Im pretty sure there i another way to do this,

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Creating temporary NSManagedObjects

2010-04-28 Thread Hal Mueller

On Apr 27, 2010, at 10:42 AM, vincent habchi wrote:

 There is a simple reason: the objects in the Managed object context get 
 represented on a third window, whose contents are drawn from an Entity mode 
 NSArrayController that prepares its contents automatically. If I add my 
 temporary object to the MOC, it automatically gets fetched and displayed in 
 that window the very moment it is inserted; that's what I wanted to avoid 
 because it is confusing and thus undesirable.

Use a separate MOC for your transient NSMO's. When you're finished, kill the 
MOC, without ever saving the changed (temporary, undesired) NSMO's to the PSC. 
Your scenario is a classic use case for multiple MOC's.

NSMO's are designed to live in MOC's. Seems like a very bad idea to try to get 
CD to do otherwise.

Hal

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Revolving scoreboard

2010-01-07 Thread Hal Mueller
Quartz Composer is very well suited for this sort of problem. Take a look at 
the sample code and Xcode templates.

Hal

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Code Signing

2009-09-06 Thread Hal Mueller
On Sep 6, 2009, at 14:37, Charles Srstka cocoa...@charlessoft.com  
wrote:


Why are you wanting to go around deleting files from the insides of  
app bundles?


Maybe to see what happens if the bad guys try the same trick. 
___


Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: persisting user credentials -- how?

2009-03-09 Thread Hal Mueller
Buzz Andersen has a nice sample that works for iPhone simulator and  
device without code changes:

Blog post: http://log.scifihifi.com/post/55837387/simple-iphone-keychain-code
Source code: http://github.com/ldandersen/scifihifi-iphone/tree/master/security

Hal


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Update an existing Core Data store when the model changes?

2009-02-04 Thread Hal Mueller

http://developer.apple.com/documentation/Cocoa/Conceptual/CoreDataVersioning/Introduction/Introduction.html

Hal

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Making a Window Class Invocable from Any Thread

2008-11-05 Thread Hal Mueller
The Late Night Cocoa podcast episode on concurrent programming is  
very helpful too--especially if you have seen the concepts in  
operating system theory, but want a reminder of which Cocoa classes  
correspond to those concepts.


http://www.mac-developer-network.com/podcasts/latenightcocoa/episode25/index.html

Hal

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Object is not reachable from this managed object context

2008-10-16 Thread Hal Mueller
It looks to me like you are sharing one MOC between two threads (the  
web service update worker thread and the main thread). You need two  
MOC's.  Write from the worker thread to the worker thread's MOC, then  
tell the main thread to refresh.


Hal

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: referencing XML Data

2008-09-15 Thread Hal Mueller

Working from the simple NSXMLParser example from
http://weblog.bignerdranch.com/?p=48
I suggest you use parser:didStartElement:... to look for customer  
and begin accumulating fields, and use parser:didEndElement:... to  
note completion of first_name, last_name, etc and react accordingly.


In the simplest case you can just use NSLog to spit out the contents  
of the fields, to get yourself started.


It took me less than an hour to plug in the samples and get stub  
methods going.


Hal


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: User Defaults - tables and arrays

2008-08-21 Thread Hal Mueller
It's possible to save arrays using NSUserDefaults--technique is in the  
archives, but it looked pretty daunting to me with a lot of chances  
for me to screw things up.  I chose to use a very simple CoreData  
model for my array instead.  It might be a bit of overkill, but  
CoreData saved me a bunch of time on a task I didn't really want to  
spend time on.  My datastore for this part of the preferences lives in  
Library/ApplicationSupport/appname.


I still use NSUserDefaults for the simple stuff.

Hal

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Working if Cocoa Core Data

2008-06-18 Thread Hal Mueller
1. You really need to master the basics of Cocoa before you tackle  
Core Data.


2. I would move amount over on the Account entity, and rename it  
balance.


3.  See #1.

Hal

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: CoreData Statement Still Active (CoreData Multithreading)

2008-05-22 Thread Hal Mueller
Those libraries don't work with 10.5.2 at the current patch level.   
Installer throws 93C1 Required: The Debug and Profile Libraries for  
Mac OS X 10.5 requires the specified build. Please check your build  
number in About This Mac.


rdar://5904950

Hal

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Cocoa Training....

2008-05-21 Thread Hal Mueller
I had extremely good results from both the Cocoa Boot Camp and the  
OpenGL Boot Camp.  In both cases I arrived with very little experience  
in the area and left with a couple of solid prototypes and having a  
good, functional, but slow command of the material--I could function  
on my own, find what I needed, apply it correctly.


I had tried twice to get through Aaron's book on my own.  Having a top  
developer at your elbow for a week, someone whose main focus is  
helping you learn, is what made the difference.  In both sessions, the  
instructor was putting in 14 hour days, between in-class time and  
evenings helping students on projects.  The classroom atmosphere was  
very supportive.  There were some very sharp folks there, maybe 1/3 to  
1/2 of them independent developers.


Both of my classes were at the Serenbe conference center outside  
Atlanta.  In August '06 they were A+ terrific.  In October '07 you  
could see they were having a bit of trouble coping with their success;  
there were a few minor cleanliness/maintenance issues, but still A-  
quality.  The food is quite good, a modern take on traditional  
southern cooking, but they don't yet have a good idea of how to cook  
for vegetarians.  My favorite part of the facility is just being able  
to walk around among the gardens and animals (chickens, llamas,  
miniature donkeys, and more), and enjoying the very dark night skies  
and the freedom from traffic noise.  The guest rooms are huge.


You should take a BNR class if you're pretty green in the area and  
want to get up to productivity quickly.  If you're fairly comfortable  
with Xcode and with Cocoa constructs already, the Cocoa Boot Camp  
would not be a good choice.  I'm personally on the fence about the  
Advanced Mac OS class offered later this year: I feel comfortable with  
about half the topics offered and have no experience with the other  
half.  I think any of the Boot Camp level classes would be a great  
investment of time and money in an area where you would personally  
have a steep learning curve.  You'll save yourself many weeks of  
independent study.


Hal

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: fundamental question: how do I call controller methods from other classes?

2008-05-21 Thread Hal Mueller
Make sure you understand nil-targeted actions/File's Owner/responder  
chain. That idiom might or might not be useful in this case.  I can  
picture sending various messages to nil that only the POSSocket class  
will respond to, and have the POSSocket instance be the delegate of  
your controller.


How is the controller being created?  Right after creation might be  
the time to tell it about objects it needs to know about.


Hal

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: validateMenuItem() not always being called

2008-05-18 Thread Hal Mueller
-validateMenuItem: is deprecated; you should probably be using - 
validateUserInterfaceItem: (these are both methods, not functions as  
you wrote).  Where to implement it depends on what functionality  
you're trying to control/limit.  If I'm only allowing one document  
open for read/write at a time, then I want to implement it in one  
place.  If I want to restrict a window's maximum zoom level and I have  
multiple windows, I'll implement it in a different place.


Hal

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: validateMenuItem() not always being called

2008-05-18 Thread Hal Mueller

Correction: deprecated on NSDocument.

http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSDocument_Class/Reference/Reference.html#/ 
/apple_ref/doc/uid/2008-BBCDBJEF


Hal

On May 18, 2008, at 3:55 PM, j o a r wrote:



On May 18, 2008, at 3:46 PM, Hal Mueller wrote:


-validateMenuItem: is deprecated



Really? Where is this documented?

j o a r




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: [MODERATOR] Re: WWDC ticket needed

2008-05-16 Thread Hal Mueller
Just for the record--not mine, no idea who the seller is.  Mine ain't  
for sale!


Hal


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: WWDC ticket needed

2008-05-15 Thread Hal Mueller
eBay item 220234875066 is at $1525 already, and not closing for  
another 5 days!


Hal

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Converting XML to NSDictionary

2008-05-03 Thread Hal Mueller
Also see this sample code using libxml2, should there be some reason  
you can't use NSXMLDocument:


http://inessential.com/?comments=1postid=3489

Hal

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Cocoa support for serial port access?

2008-04-21 Thread Hal Mueller
AMSerialPort is nice.  I use it with USB-serial converters and with  
Bluetooth serial devices.


http://www.harmless.de/cocoa.php

Hal

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Unregistering KVO observers

2008-04-18 Thread Hal Mueller

Maybe try
[[NSNotificationCenter defaultCenter] removeObserver:nil name:nil  
object:self]
in your dealloc method?  I think that will patch the symptom, but I  
still don't understand why you're getting the original error.


This bit looks important though.  Makes me wonder if you've got things  
wired up in IB the way they should be, or some other similar hard-to- 
notice glitch.


On Apr 17, 2008, at 10:05 PM, Steve Nicholson wrote:
When my app was simply an NSDocument, it worked fine: when the  
window closed, the bindings were automatically broken. But now that  
I'm using NSDocument and NSWindowController, they aren't.


The section on Window Closing Behavior in the Document-Based  
Application Overview might help:


file:///Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.docset/Contents/Resources/Documents/documentation/Cocoa/Conceptual/Documents/Concepts/WindowClosingBehav.html

Hal

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Unregistering KVO observers

2008-04-17 Thread Hal Mueller
Look at Malcolm Crawford's Graphics Bindings example, which contains  
among other things two methods on GraphicsView to start and stop  
observation when an object of that class is created or destroyed.

http://homepage.mac.com/mmalc/CocoaExamples/controllers.html

I use -removeObserver:forKeyPath: for each of the keypath  
notifications I have requested, and then I count on the superclass's  
dealloc method to take care of its own keypath notifications.  You can  
also use -removeObserver: but that seems like a blunt instrument to  
me, especially since I don't know what the superclass is counting on.


It would help to see your dealloc and close methods, especially if you  
think you're having trouble with a notification that you didn't  
register for.


Hal

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


missing (some) window names in Window menu

2008-04-08 Thread Hal Mueller
My NSPersistentDocument app has two kinds of windows that can be shown  
for a given document.


A few revisions back (I just noticed it last night, though), Type2  
windows stopped showing up in the Window menu.  I can create them, and  
they respond to the Bring All To Front menu item.  Type1 windows  
still appear.  Type1 and Type2 window controllers are distinct classes  
with their own nibs.  This was working fine once; I'm looking for  
ideas on what sorts of errors might be causing this change in behavior.


Any suggestions on what I should be looking for?  How does the Window  
menu get populated?


Hal

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: missing (some) window names in Window menu

2008-04-08 Thread Hal Mueller


On Apr 8, 2008, at 2:31 PM, Michael Vannorsdel wrote:
 Also make sure your windows don't have isExcludedFromWindowsMenu  
set to YES.


Thanks, that was the clue to the fix.  In IB I had accidentally  
changed the class of the window to something that had that set to NO  
by default.


Hal

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]