Hi
I am new to this objective c
I have created the one mutable array in appdelegate.
I am trying to retrieve values of that mutable array in another app. But it is crashing at that point.
below is the code i have declared in appdelegate
savedLocation = [[NSMutableArray alloc] init];
savedLocation = [[NSMutableArray arrayWithObjects:...
Edit: When I start the App without the status bar on top everything behaves as planned. With the status bar I coulnd't get the views to act as I wanted. It looks as if the UINavigationController keeps resizing the content view by subtracting the 20 pixels of the satus bar... I don't know...
Hi,
I created a simple UINavigationController-...
I'm trying to kill all memory leaks in my iPhone 3.0 application. CLANG builds with all lights green so now I'm analyzing with Instruments.
This is easier said then done, since it is indicating hundreds of 16 byte leaks after just a few minutes of using the app. It seams to be mainly in UIKit, and the common part is that the end of the...
hi,
I am using a simple function to display messages to user through a label. The function is as follows:
-(void) showMessage:(NSString*) message {
Message.text = message;
[message release];
}
There is no memory leak if I call this function from the main thread. But if I call this function from a separate thread, the instruments m...
I always try to keep my Xcode projects very well organized but I recently asked myself where to put struct data types.
Normal I use a lot of classes even when a struct would do. Since classes are always separate files there are much easier to organize and easier to find.
Where do you put your structs?
...
Hello,
How can I post a full hyperlink with its parameters to another link in objective-c?
Like: url=http://www.test.de/index.php?param1=23&param2=23&param3=345
Thanks
...
Below are three fragments of code, the first two are interfaces for two objects along with a couple of @property commands. Please note that this is just me learning, its not part of an application just a small test program.
After adding (retain) to the 2nd @property I noticed that my machine object was leaking when my program exited, w...
I am just curious if the order expressed for the release of objects should reflect the reverse of their order in the hierarchy:
// Psuedo code
alloc OBJ_001;
alloc OBJ_001 > OBJ_002;
alloc OBJ_001 > OBJ_002 > NSSting;
release NSString;
release OBJ_002;
release OBJ_001;
I am pretty sure it should (makes sense to me), but have not seen...
I have two NSStrings with the same value
this failed for me:
if (button.controlName == controlName) {
return button;
}
this worked:
if ([button.controlName compare: controlName] == NSOrderedSame) {
return button;
}
Is this just how strings are compared in objective c? Or should the first statement have worked as well? Why ...
Here is my scenario:
I have an array of dictionary items with 2 values.
array = (
{
id = 1;
title = "Salon One";
},
{
id = 2;
title = "Salon Two";
}
)
I'm not even sure if this is possible, but can I pass this array into a function and return an objects index based on a dictionary value...
I understand that the v03 example creates an object that I own and must ultimately release. What I would like to know is are there any differences between the first two(v_01 & v02), or are they essentially the same?
// Version_01
userName = @"Teddy";
// Version_02
userName = [NSString stringWithString:@"Gary"];
// Version_03
userName ...
I can't seem to wire events to my UITextView.
I'm expecting that the list of events that are available for the UITextField ("Did End On Exit", "Editing Changed", etc) , should all be available for the UITextView.
However this isn't the case. UITextView in its events listing shows nothing.
What's going on here and how do I trap events...
How can i bring up the iphone uikeyboard with non-english language?
tnx :)
...
Hi!
Should I still bother with releasing objects in a unit test?
I noticed in Apple's "iPhoneUnitTests" sample project objects are [[object alloc] init] in the setup method but never released anywhere in the unit test?
Thanks!
...
Hi everyone, I've come across a problem related to pointers within arrays in objective-c.
What I'm trying to do is take the pointers within an NSArray, pass them to a method, and then assign the returned value back to the original pointer(the pointer which belongs to the array).
Based on what I know from C and C++, by dereferencing th...
Hi all,
I'm trying to print an NSTableView, but most of the table keeps getting cut out.
My question is twofold:
How can I get it to resize to fit one page?
How can I get it to print landscape?
If there's a better way to do it, without using the print: function, then I'm happy to receive those suggestions too! (The Table is binded t...
My understanding is that sqllite is pretty much the only choice for database on the iphone. Is there an O/R Mapper for it?
...
Does anyone know of any libraries for Objective-C Cocoa Touch that provide data entry fields for all different types of inputs (e.g. Date fields, Boolean, Numbers, Integers, etc). Aside from just the built in text fields that accept all inputs? I know you can limit input in the text field delegate and change the keyboard, but stuff like ...
Hello all,
I have the following code:
float valueCalculated = (val1 / val2) * 100;
What I want to be able to do is to cap the maximum value of valueCalculated to 100.
I believe I could do this using some sort of if statement, but this would mean many more lines of code. Edit// This is not the case, see the answers below.
Thanks,
...
Hi there,
I'm sorting out some memory issues with my iPhone app and I've just been thinking about some basics. If I setup an ivar and never end up using it in the lifespan of my object, when I call dealloc on it, will that cause a problem? E.g.
@interface testClass {
id myobject;
}
@property (nonatomic, retain) id myobject;
@end
@...