Re: File's Owner

2008-05-25 Thread Johnny Lundy
Well, tell that to the guy who wrote the Currency Converter Using Bindings tutorial. See the last sentence here: This concrete example should help you understand what the value binding’s configuration implies: The content of the text field is bound to the value of the exchangeRate key,

Re: File's Owner

2008-05-25 Thread Johnny Lundy
Thanks to everyone who replied and supplied sample code and anecdotes. I will study these carefully and take notes. N.B. My 16 hours a day comment did not imply that I am losing sleep. I really have been reading and adding features to my project, and creating dozens of test projects, and

Re: File's Owner

2008-05-24 Thread Johnny Lundy
I dunno. Your book seems to be one of the few, if not the only, that is not on my bookshelf. If you email me your page on File's Owner, I can give feedback. On May 23, 2008, at 9:59 PM, [EMAIL PROTECTED] wrote: I despair that I am unable to adequately explain the concept and utility of

File's Owner

2008-05-23 Thread Johnny Lundy
I decided to once again go verbatim through Cocoa Fundamentals. So far it has been largely uh-huh, yep, but the File's Owner, my nemesis, comes up again. http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CommunicatingWithObjects/chapter_6_section_3.html You connect

Re: File's Owner

2008-05-23 Thread Johnny Lundy
; delsp=yes On May 23, 2008, at 2:49 PM, Johnny Lundy wrote: I decided to once again go verbatim through Cocoa Fundamentals. So far it has been largely uh-huh, yep, but the File's Owner, my nemesis, comes up again. I tried to answer your File's Owner and NSApp questions last week (copied below

Re: File's Owner

2008-05-23 Thread Johnny Lundy
OK that's the first step towards saying what it is - the controller object that manages the corresponding user interface objects in the nib file. Now to find out what managing them means. This implies that NSApp is a controller object that manages the user interface objects in my nib file.

ObjC Question - labeled arguments

2008-05-22 Thread Johnny Lundy
You're correct - there is no first argument per se: it is part of the method selector, together they are called a keyword. http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/chapter_3_section_3.html A message with a single argument affixes a colon to the

Trying to understand -- please help...

2008-05-21 Thread Johnny Lundy
Here's why the OP was not aware of the behavior of an NSArray class method: Here's the verbatim documentation for +arrayWithObjects: arrayWithObjects: Creates and returns an array containing the objects in the argument list. + (id)arrayWithObjects:(id)firstObj, ... ParametersfirstObj,

Trying to understand -- please help...

2008-05-21 Thread Johnny Lundy
On May 21, 2008, at 3:03 PM, [EMAIL PROTECTED] wrote: It is expected that you have at least looked at the getting started documentation before you attempt to dive much into anything else. You would quickly run across the following... Well, that makes the point that some of us are trying to

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

2008-05-21 Thread Johnny Lundy
These are the exact same 2 questions that I had bugging me a while back. It's amazing. I still don't know how to call one class from another (the reason I always only have one class in my projects), but I was told that to solve the instance has no name issue you have to make an IBOutlet

Conceptual MVC Help

2008-05-20 Thread Johnny Lundy
Greetings I got my NSPopUpButton working, but have been informed that it is done wrong. The last time I submitted this it had a typo and I was chastised and told to read the Objective-C introduction, so the question wasn't addressed. I'd like to submit this bare-bones example for

Cocoa et al as HCI usability problem

2008-05-18 Thread Johnny Lundy
For the record, my comments weren't about it being difficult; it's about the documentation not providing the information needed to use it. It's a beautiful API, as you say with tons of work done to implement these reusable constructs. The documentation is voluminous, but in too many cases

Re: The challenge for Cocoa's on-line documentation

2008-05-17 Thread Johnny Lundy
I never had any problem with a language's documentation since 1970 with the IBM 360 Reference Manual. That is, until I came across Apple's documentation of Cocoa. I have never been so frustrated in my life. - Everything is defined in terms of something else. - Interface Builder User Guide

Re: Bypassing Interface Builder

2008-05-15 Thread Johnny Lundy
On May 15, 2008, at 5:26 AM, [EMAIL PROTECTED] wrote: Message: 6 Date: Thu, 15 May 2008 08:15:41 +0200 From: Uli Kusterer [EMAIL PROTECTED] Subject: Re: Bypassing Interface Builder To: Johnny Lundy [EMAIL PROTECTED] Cc: cocoa-dev@lists.apple.com Message-ID: [EMAIL PROTECTED] Content-Type: text

Re: Bypassing Interface Builder

2008-05-15 Thread Johnny Lundy
OK - I am getting a lot of education here. I am not a total n00b with Cocoa, and have been studying it and coding it for six years, but I realize that a lot of stuff I memorized how to do, I never understood what I was doing. On May 15, 2008, at 3:06 PM, [EMAIL PROTECTED] wrote: Right.

Re: Bypassing Interface Builder

2008-05-15 Thread Johnny Lundy
One final reply and I will have cluttered up this list enough for now. I thank everyone who took the time to help me. On May 15, 2008, at 3:06 PM, [EMAIL PROTECTED] wrote: From: Uli Kusterer [EMAIL PROTECTED] Subject: Re: Bypassing Interface Builder To: Johnny Lundy [EMAIL PROTECTED] Am

Re: Bypassing Interface Builder

2008-05-14 Thread Johnny Lundy
Hi, On this topic, when I drag an object out of the Library and set its class, IB sets the label of the object to the Class Name. Since this is an instance of the class, and not the Class Object itself, why is the name capitalized? And if I want to refer by name to that instance in my

Re: Bypassing Interface Builder

2008-05-14 Thread Johnny Lundy
Actually, I have read that many times. My reason for reading it was that so many example codes and tutorials say to bind an interface item to File's Owner, but don't say why or what that binding accomplishes. So it's the application instance. I don't understand what the application

Re: Bypassing Interface Builder

2008-05-14 Thread Johnny Lundy
Just another note - the reason that I asked this is that I finally added a second class to my project. I had never had 2 classes in a project before because I didn't understand how to have them communicate. Actually, I still don't - I just try everything until something works. I wrote

Controller Cannot Be nil on binding NSTextField

2008-05-13 Thread Johnny Lundy
; charset=US-ASCII on 2008-05-13 12:06 AM, Johnny Lundy at [EMAIL PROTECTED] wrote: I still have to do the crazy self.hoursString = [[NSNumber numberWithInt: self.hours] stringValue]; To get a string from an int for the textField to bind to. If I bind it to the model deadline.hours, which

Controller Cannot Be nil on binding NSTextField

2008-05-12 Thread Johnny Lundy
I am stuck on this error. 2008-05-12 20:58:58.257 TimerTest[65919:10b] An uncaught exception was raised 2008-05-12 20:58:58.259 TimerTest[65919:10b] Controller cannot be nil 2008-05-12 20:58:58.260 TimerTest[65919:10b] *** Terminating app due to uncaught exception

Re: Controller Cannot Be nil on binding NSTextField

2008-05-12 Thread Johnny Lundy
Yeah, a stupid mistake. Thanks for noticing that. I had that as awakeFromNib and changed it but forgot to give it a nonvoid return value. Since the error was about a controller, and only happened when I bound an IB textField, and the app ran perfectly to the console, it never occurred to

Re: NSPopUpButton again

2008-05-09 Thread Johnny Lundy
the model object string value. If you have any more tips I would love to hear them. I have literally read every word I can find about this class and still could not make it work. Thanks again Johnny On May 8, 2008, at 10:05 PM, Ken Thomases wrote: On May 8, 2008, at 8:56 PM, Johnny Lundy

Re: NSPopUpButton again

2008-05-09 Thread Johnny Lundy
On May 9, 2008, at 12:52 AM, Ken Thomases wrote: It seemed to me that I wasn't allowed to bind a View item's (the NSPopUpButton) property directly to a model object's (popup.selectedGame) property. But I do not see any way to use the controller here to communicate with a property in the

NSPopUpButton again

2008-05-08 Thread Johnny Lundy
Hi, still having no luck with NSPopUpButton and getting the selected item in the popup back into my model string. Simplified down to the bone, here's my class Popup: // Popup.h // TestPopup #import Cocoa/Cocoa.h @interface Popup : NSObject { NSArray *popupArray; NSString

NSPopupButton displaying extra item when model changed

2008-05-03 Thread Johnny Lundy
Hello all, Thanks for your previous help. I'm trying to firm up my understanding of NSPopupButton. I wrote a test project modeled after Kevin Wojniak's example here: http://forums.macrumors.com/showthread.php?p=4839485 , post #7, referencing matt neuburg's example. One NSPopupButton

Binding a popup button's selected index to a model integer

2008-04-29 Thread Johnny Lundy
Hello all, I would appreciate some guidance in getting a popup button to use its selectedIndex to set an integer in my model. I am having trouble understanding how to properly bind the selection of a popup to an integer in the model so that changes in the popup's selection changes the

-init and awakeFromNib called twice.

2008-04-25 Thread Johnny Lundy
I know I saw something somewhere in reference to these methods getting called twice on app launch, but can't find it with searching. Is this expected behavior for vanilla -init and (void) awakeFromNib methods? I'm doing some short loops in these methods and calling other instance methods.

Re: Cocoa-dev Digest, Vol 5, Issue 682

2008-04-25 Thread Johnny Lundy
in one NIB. If you're object loads additional NIB files and is the file's owner, it will be called additional times. Good Luck - Jon Hess On Apr 25, 2008, at 9:41 AM, Johnny Lundy wrote: I know I saw something somewhere in reference to these methods getting called twice on app launch, but can't

Fwd: NSPopupButton Bindings

2008-04-20 Thread Johnny Lundy
:49:43 AM EDT To: Johnny Lundy [EMAIL PROTECTED] Cc: cocoa-dev@lists.apple.com Subject: Re: NSPopupButton Bindings On Apr 19, 2008, at 5:58 PM, Johnny Lundy wrote: Good evening, I am having trouble understanding the bindings for NSPopupButton. View: NSPopupButton Controller: NSArrayController

NSPopupButton Bindings

2008-04-19 Thread Johnny Lundy
Good evening, I am having trouble understanding the bindings for NSPopupButton. View: NSPopupButton Controller: NSArrayController, just for the popup button Model: NSMutableArray of NSMutableDictionaries. I have the array controller bound to the array in the model, and that is working fine.

Setting the value of an array element

2008-04-17 Thread Johnny Lundy
I imagine this is a very dumb question, but I am perplexed. NSArray says you can change the values of elements, but not add/ subtract/replace elements. Let's say I have an NSArray @Tom, @Dick, @Harry, nil And I want to change Tom and Dick to Mutt and Jeff. Is my only option to make it a

Re: is this badly written code?

2008-04-15 Thread Johnny Lundy
My Cocoa coding is for hobby only, and only for about 4 years, so I do not have experience with working in teams or on multi-developer projects. But I see this issue in other development environments of recent issue as well. Apple has provided a rich set of finely-granulated APIs, which

Simple TextView not updating view

2008-04-13 Thread Johnny Lundy
First, thanks to Quincey Morris for clarifying the mutableArrayValueForKey issue to get proper KVO on a mutableArray when deleting objects from the Model. It works just fine. I think that will also allow me to get my addObject button to work. I am tackling these issues one at a time. My

Get end-editing notice from simple NSTextField?

2008-04-13 Thread Johnny Lundy
This list has been a great thing for me. I got 2 of my 3 stumpers solved with the help of people here. What's the most clean and elegant (MVC compliant) way to receive an end-editing notice from a plain vanilla NSTextField? I want my user to be able to just type in a string, end editing

Re:NSArrayController's selectionIndex weirdness

2008-04-11 Thread Johnny Lundy
On Apr 10, 2008, at 19:09, Quincey Morris wrote: Thanks a bunch, Quincey. That worked fine. I was going by NSArrayController's documentation that its selectionIndex method returned an NSUInteger. Either that is wrong or the NSButton wraps it in an object wrapper when it uses the Argument

NSArrayController's selectionIndex weirdness

2008-04-10 Thread Johnny Lundy
Hello all, In a TableView column bound to an NSArrayController which has playerArray, a mutable array, as its content. An NSButton binding selectionIndex of the controller as the Argument 1, and the Selector Name to the method below, here's what I get in the method: - (void)