Is there some way when sending this message to specify that I rather have my selector performed after all pending UI events, if any? Ie. give my aterDelay timer a lower priority in the event queue.
...
Greetings,
I have a view based application project where I have created an NSObject class called "SquareClass".
Now, from the Xcode's interface builder, I want to be able to instantiate that "SquareClass" into a square object with global scope, in such a way that, when I create actions from any UI controls(i.e textboxes, buttons etc...)...
For example:
@interface Fraction: NSObject {
...
When wouldn't NSObject be used and is NSObject the ultimate parent class for all other classes?
Please feel free to correct me on any wrong terminology used.
...
So in my view controller, I run code to populate an NSArray of Customer (custom class) objects. This custom class has objects that are of ANOTHER custom class called Address (a customer has a billing address and a shipping address). In the view controller when a customer in the list is selected, it passes a new view controller a customer...
Hello, I'm working on an Objective-C/Cocoa roguelike, because I've always found that working on a game is the best way to learn about a language. I've gotten quite far with my game, but I'm having a problem.
Each level.plist is defined with a few things, like so:
<key>Save Location</key>
<integer>0</integer>
It's grabbed like so, I'...
I have the following code
NSMutableArray *leeTemp = [[NSMutableArray alloc] init];
Player* playerLee = [[Player alloc] init];
playerLee.name = [array objectAtIndex:1];
[leeTemp addObject:playerLee];
[playerLee release];
And this generates an array of Players (I think)! When I do the following it shows the addresses of the Players.
N...
How do I put a "hook" on an object so I can see what messages are being sent to it? (ie do an NSLog() every time a message is sent to an object).
I think recall seeing this done before but I forget how. I am thinking it might help me track down why part of my code is not working.
...
There are a couple of things about Objective-C that are confusing to me:
Firstly, in the objective-c guide, it is very clear that each class needs to call the init method of its subclass. It's a little bit unclear about whether or not a class that inherits directly from NSObject needs to call its init method. Is this the case? And if...
I have a pointer in an objective-C class that I need to send messages to. The pointer can potentially be anything, so I need to make sure that it will respond to my messages before I send them. Here's the function I'm using to do the checking:
int delegatePreparedForSelector(id delegate, SEL aSelector) {
if (delegate
&& [deleg...
I'm having trouble declaring a C Array as an Objective-C Property (You know @property, and @synthesize so I can use dot syntax)...Its just a 3 dimensional int array..
...
What is the purpose/use of NSObject in Objective-C? I see classes that extend NSObject like this:
@interface Fraction : NSObject
In C++ or Java, we don't use any variables like NSObject even though we have preprocessor directives and import statements in both Objective-C and Java.
Why do classes explicitly inherit from NSObject in O...
Hello,
I'm learning Objective-C and as I can see, in some tutorials they use Object(imported from objc/Object.h) and in others i see the use of NSObject(imported from Foundation/NSObject.h), but what are the main differences between they?
Regards.
...
Hello!
I'd like to see the content of NSObjects like properties ( arrays, Integers, floats... ). Since I'm a Flex developer I'm used to use the eclipse debugging tool. But now I'm starting with the iPhone I'm kind of lost.
For example, I just downloaded the SeismicXML application from the dev's sample code, and I put a breakpoint on th...
Hi
Im using a Core Data model for my iPhone app. I have been looking for a way to instantiate or use an Entity outside the ManagedObjectContext. (This should not be done, I know, Im also more looking for a way to not do that, but get the benefits anyway).
My challenge is that I have a view where the user can search for "Persons", all t...
Hello,
I'm a Objective-C learner and I don't have a Mac, then I need to use my Linux with GNUStep, but if I develop my own program on it, the end-user will need to have GNUStep(like .Net) installed and then I started thinking how can I solve this, then I had an idea: "Create this from scratch!", but now to do this I need to know: What ar...
Whenever I implement a method in my own code that can accept or return objects of more than one class, I always try to use the most specific superclass available. For example, if I were going to implement a method that might return an NSArray * or an NSDictionary * depending on its input, I would give that method a return type of NSObje...
Hi,
I've googled around and found some answers but I didn't get any of them to work. I have one NSObject with the class "A" and a second class "B" without an NSObject. In class "A" are my IBOutlets defined and I can't seem to figure out how to access those outlets from class "B"...
I've found answered questions like http://forums.macru...
I've been through a bunch of Core Data examples and the Apple documentation. I'm at a wall after working on this all day.
All I want to happen is I type some text into a text field, save the file, open it again and see the text there.
I made a very very simple Core Data document-based app to experiment. Here are the particulars:
1) ...
I have a small core data app. I have a subclass of an NSObjectController acting as the binding between the view and the model and a NSTextField on the view for the user to type into.
When the window opens the text field is editable because I have the bindings set to my subclassed NSObjectController, controller key to "content" and the ...
I thought I was fairly experienced at iPhone development, but I'm tripping up on the Stanford iPhone course on the very first video
http://deimos3.apple.com/WebObjects/Core.woa/Browse/itunes.stanford.edu.3124430053.03124430055
(38 mins in)
Cannistraro, the teacher, drags an NSObject into the MainWindow.xib. And when he inspects the Ob...