This is my error:
Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '-[__NSArrayI addObject:]: unrecognized selector sent to instance
I have no idea why this is happening. Both the array (which is NSMutableArray) and the object being added are definitely not nil, and the @property for the array is straig...
I currently have an NSMutableArray which stores a collection of Video objects.
Each Video object has an ID and TITLE.
I also have another NSMutableArray of video objects generated from parsing an XML API call.
When the user hits a 'synchronize' button, I want the system to be able to figure out the minimum number of operations needed ...
Hi
I have an array with 10 objects and I put this into a table. How can I edit one of the individual objects in the array or refresh it?
All the objects just hold text, so after I change the text how can I refresh the array? See where I am coming from?
Thanks.
...
Hi, I am having difficulties with some logic.
What I am trying to do is I have a nsmutablearray which I want to do a check with an object.
If i have selected multiple creditcards in a particular view i store that card details name is my nsmutablearray called filteredCard. Then I have objects of companies which has one or more creditcard...
Can anyone tell me why logging [self.giftees count] keeps returning 0 even though I'm adding objects to it?
header:
#import <UIKit/UIKit.h>
@interface Test2AppDelegate : NSObject <UIApplicationDelegate>
{
UIWindow *window;
NSMutableArray *giftees;
}
@property (nonatomic, retain) UIWindow *window;
@property (nonatomic, retai...
I'm writing an iPad split view-based application and I've a NSMutableArray with some objects passed to the main tableView with this code:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"CellIdentifier";
// Dequeue or create a cell of th...
Basically I have an NSMutableArray set up like so, with instances of another class as the array elements.
[[NSMutableArray alloc] initWithObjects: [[Shape alloc] init], [[Shape alloc] init], nil];
Each of the shape classes has an instance variable that holds what kind of shape it is. I want to be able to make this array so that it ass...
Hi
I have a bunch of NSStrings in a NSMutableArray. I have added them to the array and now I want to loop through the array, getting each object in it (the strings) and set them to a common value @"No Lessons".
This is how I have the loop so far: But how can I get the object then set it? Currently its fairly simple, just getting loopin...
I use an NSXMLParser to parse YouTube's API and I get all the content I want and put it into a class called Video. When I am writing to the class from inside parserDidEndElement and I end that video I write the class to an NSMutableArray. Then I NSLog the title of the video that was logged into the array. This is different for each video...
Hi friends...
I m doing this-
for(int i=0;i>count;i++)
{
NSArray *temp=[[NSArray alloc]initWIthObjects]i,nil];
NSLog(@"%i",temp);
}
it returns me 0,1,2,3....count one by one.
but i want array with appending these values {0,1,2,3,4,5...}.
This is not a big deal but i m unable to find it....sorry...i am new to Iphone.
...
Hi i am having a nsmutable array and in that nearly 50 -60 object having different names ,and can i sort this array in alphabatical order (Is it possible, How?) (is it a duplicate question ?)
...
My app runs fine in the simulator, but when running on the device, it terminates with SIGABRT. I have narrowed it down to the following code:
- (void)loadImage {
int imageNumber = currentImageNumber;
// check to see if the image has already been downloaded.
// if not, get it and add it to an array
if ([imageData count] < totalNumberOfIm...
Hi guys,
i am trying to remove objects from my NSMutableArray but i keep getting bad_access error.
I used "removeAllObjects" and "removeObjectAtIndex" but none of these work.
If i add objects to this array , everything is fine.
What i want to do is to clear my array before filling it again.
I didnt release the array before trying to...
I have the following code that populates an array (this is within a loop):
NSString *code = [NSString stringWithFormat:@"%@ - (%@) %@",[tempDic objectForKey:@"state"],[tempDic objectForKey:@"city"],[tempDic objectForKey:@"name"]];
[tempArrayOfAirports removeObjectIdenticalTo:code]; // checks for a previous object, then removes if found...
Is there a tutorial for saving and restoring an array of custom objects?
...
Hi!
I try to get the data of an array in an TableView but get an bad access error all the time. My code looks like this:
NewsViewController.h
#import "StatusMessage.h"
@interface NewsViewController : UIViewController {
IBOutlet UITableView *table;
NSMutableArray *statusMessages;
}
@property(nonatomic, retain) NSMutableArray...
Let's say I create an object like this:
Person:
NSString *name;
NSString *phone;
NSString *address
I create several of these objects. Then I create an NSMutableArray called people and store them in there.
Can I save this array to disk with Array writeToFile? Does it need to be converted to NSData?
...
Is the parameter for NSKeyedArchiver archivedDataWithRootObject: supposed to be the array I am trying to save, or the array converted into NSData?
...
I made a class. This is the h file.
// MyClass.h
#import <Foundation/Foundation.h>
@interface MyClass : NSObject <NSCoding> {
NSString *string1;
NSString *string2;
}
@property (nonatomic, retain) NSString *string1;
@property (nonatomic, retain) NSString *string2;
@end
This is the m file.
// MyClass.m
#import "MyClass.h"...
I made a class. This is the h file.
// MyClass.h
#import <Foundation/Foundation.h>
@interface MyClass : NSObject <NSCoding> {
NSString *string1;
NSString *string2;
}
@property (nonatomic, retain) NSString *string1;
@property (nonatomic, retain) NSString *string2;
@end
This is the m file
// MyClass.m
#import "MyClass.h"
...