I'm using an NSXMLParser to grab data and build an array of dictionaries with some information on a set of photos. Whenever I attempt to add a dictionary to the array, the value is always (null)
Code:
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSStr...
Hello everyone,
I am newbie with Cocoa Touch, I have a problem that I try to figure out. I will appreciate if anyone could help.
I would like to create a tableDataList to display on the table. AsyncViewController will call TableHandler fillList method to initialize table data. But after fillList call, the tableDataList return empty.
C...
Hi,
I am working on a application in which i need to search values in array which is storing the values from xml. I shall be thankful for this.
with Regards
Prateek Bhanot
...
Hi Everyone!
My question is the following,
I have an NSTextView and I want to do 2 things :
First save this textview in an NSMutableArray and assign a X,Y position to it in this array.
Secondly, get this textview from the NSMutableArray and display it at the position I've set when I saved it in the array.
Anyone have an idea of ho...
Hey guys,
I want to store a couple of sockets in an ArrayList/NSMutableArray, but the sockets are of type int and NSMutableArray only accepts objects (id). Is there another data type that I can use as a container for sockets? I am not sure how many entries I will have, so I would like the data container to be like an ArrayList.
Thanks!...
greetings Cocoa masters - this simple issue has me crawling the walls. I have a custom class called Movie which consists of a bunch of properties and a few collections. I am populating it successfully using FMDB and SQLite. However, with each pass through the result collection from the DB, my addObject: seems to be writing over the entir...
i am having array called stored and i want to access thier indexes so that i can select them individually to do my operations...
if i want to print thier indexes what should i do?....
...
Hi,
I'm really desperate on this one. I'm trying to make a Framework which you can search and play YouTube videos with. But while testing it, I'm running in to a big problem.
In the search operation I'm adding YTVideos (a subclass of NSObject) to a NSMutableArray. When I loop thru it in the main(), I'm getting nil-objects:
Method
- (N...
So i'm working on an iphone app that parses json and tries to put the results into a plain UITableview. I have my tableview setup in the xib file and also setup the datasource and the delegate as the MainViewController (this is utility application). I get the JSON request just fine and I always test this by outputting it to a text label...
I am looking for what is probably a simple answer to my novice question. I know that NSMutableArray can only hold objects, so when I put the double into the array I used the [myArray addObject:[NSNumber numberWithDouble:aValue]]; conversion method. What I need to do now is to pull the values out as doubles and average them. I believe...
I have an object called Station in my system with these attributes:
@interface Station : NSObject {
NSString *stationID;
NSString *callsign;
NSString *stationState;
}
I also have an NSMutableArray containing 20 'Station' objects as defined above.
I need to define a method which can can sort this array in 2 ways:
1) By stationID
2) By...
I currently have an object called Station defined as:
@interface RFStation : NSObject {
NSString *stationID;
NSString *callsign;
NSString *logo;
NSString *frequency;
@end
I also have an NSMutableArray containing a list of 'Station' objects.
I need to have a method to sort these objects by the 'stationState' attrib...
I am copying a mutable array like this:
//copy players' info into playerList from a dictionary
playerList = [[NSMutableArray alloc] initWithArray:[params objectForKey:@"p"] copyItems:YES];
The items in the array implement copyWithZone like this:
- (id)copyWithZone:(NSZone *)zone
{
PlayerInfo* copy = [[[self class] allocWithZone:zo...
Hi,
I'm trying to use KVO to observe a mutable array :
How can i use NSKeyValueObservingOptionNew and NSKeyValueObservingOptionOld to get the objects that have been inserted or removed ?
Here is what i tried :
in the viewDidLoad method :
[self addObserver:self
forKeyPath:@"recipeList"
options:NSKeyValueObservingOptionNew |
...
Hello,
Can you show me the syntax or any sample programs to archive an NSArray of custom objects in Objective-C?
...
Hello, here is what i am trying to do:
NSMutableArray *objectNames = [[NSMutableArray alloc] init];
for (Object *o in objectList){
if (![objectNames containsObject:o.name]) {
[objectNames addObject:o.name];
}
}
I am trying to go through an array of objects, then take the objects name (a string) and add it to a string a...
Hi Everyone,
I'm a beginner at Objective-C and am trying to initialize an NSMutableArray with objects of various types. Here is my code:
NSMutableArray *mutArr = [NSMutableArray arrayWithCapacity:1];
[mutArr addObject:path];
[mutArr addObject:fullPath];
[mutArr addObject:pathArray];
[mutArr addObject:pI];
[mutArr addObject:proces...
HI All,
I have a Threaded application, in which there is a NSMutableArray, which contains the NSManagedObjects, Now i want my array to be accessed once at a time by any Thread. So how do i synchronize that array, or may be put locking mechanism on it.
Thanks in Advance ...
...
Hi,
i've got one question about the memory management of the NSMutableArray. I create an object of my custom class and add this object to a NSMutableArray. Is this automatically retained, so that I can release my created object?
Thanks!
...
I tried to insert NSDictionary's in a NSMutableDictionary. There is noch Error but it won't work :-( It's empty like before.
Here's my code:
NSMutableDictionary *einnahmen = [[NSMutableDictionary alloc] initWithCapacity:20];
NSArray *objects = [NSArray arrayWithObjects:
name,
[NS...