Hi Ich sitze grade an ner app - habe nicht viel Erfahrung was ihr bestimmt auch an meiner frage merkt .
ich habe ein NSMutableArray und schreibe werte hinein - dann will ich von einer ibaction getriggert dieses wieder ausgeben . doch bekomme dort keine werte sondern null
bin für jeden tipp dankbar
Alles anzeigen
ich habe ein NSMutableArray und schreibe werte hinein - dann will ich von einer ibaction getriggert dieses wieder ausgeben . doch bekomme dort keine werte sondern null
bin für jeden tipp dankbar
Quellcode
-
- @synthesize commentlist;
- -(id) init
- {
- commentlist =[[NSMutableArray alloc] init];
- return self;
- }
- - (IBAction)saveComment:(id)sender {
- NSString *newComment = [NSString stringWithFormat:@"%@", [_CommentText stringValue]];
- NSString *newcommentleng = [newComment stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
- AVPlayer *Player = [_VideoPlayerview player];
- Float64 millis = CMTimeGetSeconds([Player currentTime]) * 1000;
- NSString *commenttime = [NSString stringWithFormat:@"%f", millis];
- if (newcommentleng.length > 0){
- [commentlist addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:
- newComment,@"comment",
- commenttime,@"commenttime",
- [_MarkerType objectValue],@"commenttype",
- nil]];
- [
- }
- - (IBAction)exportAsXml:(id)sender {
- [commentlist count];
- }