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,
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
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
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
; 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
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.
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
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,
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
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
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
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
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
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
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.
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
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
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
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
; 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
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
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
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
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
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
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
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
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.
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
: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
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.
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
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
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
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
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
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)
37 matches
Mail list logo