I am just learning Ojective C and had an example program working fine. I started adding more classes and to it and when I run it builds ok but in All output it says just (lldb) and not the results I was looking for. Any ideas?
Thanks
Thanks
//Simple_Car.h
#import <Foundation/Foundation.h>
@interface Simple_Car : NSObject
{
NSNumber *vin;
NSString *make;
NSString *model;
NSString *country;
NSString *colour;
NSNumber *price;
{
@property (nonatomic, retain)NSNumber *vin;
@property (nonatomic, copy)NSString *make;
@property (nonatomic, copy)NSString *model;
@property (nonatomic, copy)NSString *country;
@property (nonatomic, copy)NSString *colour;
@property (nonatomic, retain)NSNumber *price;
@end
//Simple_Car.m
#import "Simple_Car.h"
@implementation Simple_Car
- (void)setVin:(NSNumber *)newVin
{
[vin release];
vin = [number numberWithInt:newVin];
}
- (NSNumber *)vin
{
return vin;
}
- (void)setMake:(NSString *)newMake
{
id newString = [newMake copy];
[make release];
make = newString;
}
- (NSString *)make
{
return make;
}
// Convenience Method
- (void)setMake:(NSString *)newMake andModel:(NSString *)newModel
{
[self setValue:newMake forKey:@"make"];
[self setValue:newModel forKey:@"model"];
}
@end
//Simple_Car.h
#import <Foundation/Foundation.h>
@interface Simple_Car : NSObject
{
NSNumber *vin;
NSString *make;
NSString *model;
NSString *country;
NSString *colour;
NSNumber *price;
{
@property (nonatomic, retain)NSNumber *vin;
@property (nonatomic, copy)NSString *make;
@property (nonatomic, copy)NSString *model;
@property (nonatomic, copy)NSString *country;
@property (nonatomic, copy)NSString *colour;
@property (nonatomic, retain)NSNumber *price;
@end
//Simple_Car.m
#import "Simple_Car.h"
@implementation Simple_Car
@synthesize vin, make, model, country, colour, price;
// Convenience Method
- (void)setMake:(NSString *)newMake andModel:(NSString *)newModel
{
[self setValue:newMake forKey:@"make"];
[self setValue:newModel forKey:@"model"];
}
@end
vin = [number numberWithInt:newVin];
vin = [NSNumber numberWithInt:newVin];
vin = [NSNumber numberWithFloat:newVin];
vin = [NSNumber numberWithDouble:newVin];
vin = [NSNumber numberWithLong:newVin];
//ect.