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 cod
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 instance
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 the
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
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
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 i
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 j
: text/plain; charset=US-ASCII; format=flowed;
delsp=yes
Johnny Lundy had a difficult time using NSPopupButon along with
bindings. The struggles are archived via www.cocoabuilder.com for
posterity. Mr. Lundy recently wrote "...I am still very very hesitant
to put another NSPopUpButto
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 comment.
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 m
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
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
]>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
On May 22, 2008, at 11:43 AM, Greg Titus wrote:
On May 21, 2008, at 12:37 PM, Johnny Lundy wrote:
This is just one example of that "little tidbit" that is always
left out of these references by Apple. It seems to
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 connec
Thank you. That is the crucial issue.
If Aaron says people don't understand it, and I haven't understood it
even after reading all three editions of his book plus the other two
Cocoa books plus the Apple documentation many times, then it must be
difficult.
On May 23, 2008, at 6:17 PM, St
sp=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
(c
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 fi
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'
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, whi
LOL - all of what you just described was the hair-pulling extravaganza
that led me to a more detailed look at File's Owner in the first
place. Several weeks ago I was trying to get my model object out of
the nib, or more specifically, to figure out how to connect the
controller to it if the
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 loa
Forgot one thing.
If anyone would be interested to critique my whole project, I would
appreciate it.
It on my iDisk "johnnylundy", a zip file named "MafiaC9Arrays.zip"
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin
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) nightKill:(
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
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 goa
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 (by
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 a
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
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.
20, 2008 12: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: NSPopup
As follow-up, I set the bindings of the popup to be
content: Array Controller.arrangedObjects
content objects: not used
content values: Array Controller.arrangedObjects.name
When I pass the selection of the Array Controller to my method, all I
get for the parameter in NSLog is
victim: <_NSCo
That works. I did not use the selectedObjects before because my
understanding was that was for detail controllers of detail views.
It is passed wrapped in a one-element NSArray, and I can extract the
dictionary with objectAtIndex:0.
Thanks ever so much - two days struggling with this. I was
Greetings,
I've studied the pasteboard docs, and wonder if there is a simple way
to copy the contents of an NSString to the general clipboard. In AS or
AS Studio it's just "set the clipboard to ." Is there such a
convenience method in Cocoa?
Thanks,
Johnny
___
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. F
only 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 la
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 mod
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
On
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
@interface Popup : NSObject
{
NSArray *popupArray;
NSString *selectedGame;
}
controller...
My popup button now sets 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 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 M
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 'NSInvalidArgumentException'
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 me
ype: text/plain; 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
45 matches
Mail list logo