initializer methods

2009-11-19 Thread Lynn Barton
After many years of using procedural programming languages, I am trying to learn Cocoa. Today I am reading the Apple document "The Objective-C Programming Language" dated 2009-10-19. On page 46 I read the following: This is an example of what not to do: + (Rectangle *)rectangleOfColor:(NSColor *

Multiple validation errors. Why?

2010-03-17 Thread Lynn Barton
ause validation errors. Can anyone help? Lynn Barton ___ 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/Unsubsc

Re: [solved] Multiple validation errors. Why?

2010-03-18 Thread Lynn Barton
On Mar 18, 2010, at 7:51 AM, Sean McBride wrote: > On Wed, 17 Mar 2010 21:05:06 -0700, Lynn Barton said: > >> the app quits, I get a "multiple validation errors occured" message. The >> console has no error messages. > > Stick this in your app dele

Selecting an object based on the value of one of its attributes

2010-04-27 Thread Lynn Barton
to write code to examine all of the objects one by one? I have searched the documentation without finding such a method. Lynn Barton ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Re: Selecting an object based on the value of one of its attributes

2010-04-27 Thread Lynn Barton
On Apr 27, 2010, at 8:06 PM, Roland King wrote: > Graham Cox wrote: >> On 28/04/2010, at 12:37 PM, Lynn Barton wrote: >>> Newbie question: Consider an array of dictionary objects, all of the same >>> class. One of the ivars of that class is an NSString which is un

Re: Selecting an object based on the value of one of its attributes

2010-05-03 Thread Lynn Barton
immediately (without any user action) that the content has finished loading? I can't use awakeFromNib, as the content has not yet been loaded when that method is called. --Lynn On Apr 27, 2010, at 8:06 PM, Roland King wrote: > Graham Cox wrote: >> On 28/04/2010, at 12:37 PM, Lyn

TableView sorts and then it doesn't

2011-03-20 Thread Lynn Barton
I have a document based application. The document window has an NSTableView with six columns. Four columns are bound to four text properties of an entity in my model; one column is bound to a decimal property, and one column has check boxes bound to a boolean property. When I run the application

Re: TableView sorts and then it doesn't--SOLVED

2011-03-23 Thread Lynn Barton
; reload the data? > > > On Mar 20, 2011, at 8:44 PM, Lynn Barton wrote: > >> I have a document based application. The document window has an NSTableView >> with six columns. Four columns are bound to four text properties of an >> entity in my model; one colu

Core Data relationship fault

2011-04-11 Thread Lynn Barton
Can someone point me to an example or tutorial that shows how to get the value of a to-many relationship attribute of a Core Data entity? My application is simple and comparable to the Departments and Employees example in Apple's documents. When I select a "department" object I have no trouble a

Re: Core Data relationship fault

2011-04-11 Thread Lynn Barton
Thanks, that helps. I need to study the Core Data Programming Guide again, and this time pay more attention to the FAQs. Lynn On 2011 Apr 11, at 09:54, Lynn Barton wrote: >> Can someone point me to an example or tutorial that shows how to get the >> value of a to-many relationship

Validation error after setting the value of a boolean attribute

2010-02-16 Thread Lynn Barton
Why does my Core Data app give me a validation error message, when quitting the app, if the following code is used? I am importing some legacy data to set 5 string attributes of an object, but using this code to set the one BOOL attribute. In my model, myBooleanAttribute has a default value of N

Re: Validation error after setting the value of a boolean attribute

2010-02-16 Thread Lynn Barton
r]; > > Steven Degutis > Software Engineer > Big Nerd Ranch, Inc. > http://www.bignerdranch.com/ > > On Tue, Feb 16, 2010 at 5:35 PM, Lynn Barton wrote: > Why does my Core Data app give me a validation error message, when quitting > the app, if the following code is used?

Re: Private ivars, not marked as IBOutlet, visible in IB

2010-03-04 Thread Lynn Barton
Buck and Yacktman's book Cocoa Design Patterns says on page 208, "Any instance variable with type id and a name that doesn't start with an underscore character is automatically considered an outlet." Lynn ___ Cocoa-dev mailing list (Cocoa-dev@lists.ap

PopupButtonCell in a TableView column

2010-03-04 Thread Lynn Barton
ges the selected item in the popup menu, will that be automatically reflected in the value of myIntProperty? (4) Why does the error persist after I reverse the changes to the tableview? (5) Am I not providing the menu's array of strings in a correct way? This has me stumped, so any help will

[SOLVED] Re: PopupButtonCell in a TableView column

2010-03-05 Thread Lynn Barton
not pursue. If anyone wants to know more, just send me a private email. Lynn Barton ___ 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

Incompatible managed object model versions

2009-06-18 Thread Lynn Barton
I am programming a Core Data application, and testing it from time to time by importing a small amount of data. This was going well for a while, but after the latest changes to the data model the application produces the error message "The managed object model version used to open the persi

Re: Incompatible managed object model versions

2009-06-18 Thread Lynn Barton
On Jun 18, 2009, at 6:27 PM, Kyle Sluder wrote: On Thu, Jun 18, 2009 at 6:19 PM, Lynn Barton wrote: I don't think that I saved any data while testing the app, but perhaps I did. Please help me rescue this application. This message means that the managed object model changed. R

[solved] Re: Incompatible managed object model versions

2009-06-19 Thread Lynn Barton
, the boilerplate code puts it in a folder inside the Application Support folder.) Thanks. I found the persistent store and deleted it. That of course removed the error message. Now I can continue developing my app. Lynn Barton ___ Cocoa-dev mailing list (

Responding to mouseDown in an NSImageView

2009-07-21 Thread Lynn Barton
-(void)mouseDown: (NSEvent *)theEvent method in the subclass. That allowed me to get and process the event, but the image did not appear in the view. Can anyone help? Lynn Barton ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Pop up button in a tableview cell

2009-08-18 Thread Lynn Barton
and never change. I found no documentation for how to put a popup menu into a tableview in IB or programmatically. My Mac OS is Leopard, and my Xcode is version 3.1.2. TIA. Lynn Barton ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Can't get file type code using [fileAttr valueForKey:NSFileHFSTypeCode]

2008-05-21 Thread Lynn Barton
I am trying to build a list of files found on my hard disk that pass a certain filter (predicate). Mostly my code works, but I want to get the modification date and the type code of each file. I am getting the date OK, but not the type code, which should be ³TEXT² for text files and might be ³WBBN²

Re: Can't get file type code using [fileAttr valueForKey:NSFileHFSTypeCode]

2008-05-22 Thread Lynn Barton
The replies to my original question are appreciated, but they do not answer the question. Once my NSFileManager object has found a file of interest, why can I get the modification date with the key NSFileModificationDate (using objectForKey or valueForKey doesn't matter) but I can't get the OSType

SOLVED: Can't get file type code using [fileAttr valueForKey:NSFileHFSTypeCode]

2008-05-22 Thread Lynn Barton
Thanks, Quincy Morris, for pointing out that I needed to get the value of the NSNumber returned by the objectForKey method. It all works now, except that I will use unsignedLongValue, not intValue. Lynn Barton ___ Cocoa-dev mailing list (Cocoa-dev

Understanding error and warning messages

2008-05-22 Thread Lynn Barton
Being new to Cocoa and Xcode, I get a lot of error and warning messages. Is there a document that explains them in some detail? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. C

Re: NSTableView

2008-05-23 Thread Lynn Barton
By a coincidence, I am working right now on an application using a NSTableView. Did your controller call [ directoryTable reloadData] to let the NSTableView that it needs to update the table? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Pleas