Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 5    Views: 49

miku
Aspiring developer
Profile
Posts: 405
Reg: Feb 20, 2014
zagorje ob savi
10,600
07/25/14 03:38 AM (9 years ago)

Collector plugin errors

Collector plugin returns errors in Xcode simulator: AN_CollectorTableViewController.m: undeclared identifier "collectors_appDelegate". Did I miss something or is it a bug?
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
07/25/14 04:03 AM (9 years ago)
is your app called collectors, if not it looks like chaneg collectors_appDelegate to yourAppName_appDelegate
 
miku
Aspiring developer
Profile
Posts: 405
Reg: Feb 20, 2014
zagorje ob savi
10,600
like
07/27/14 05:31 AM (9 years ago)
Since my app has name Movies, I changed it to: -(BT_item *)getScreenByItemType:(NSString *)type { movies_appDelegate *appDelegate = (movies_appDelegate *)[[[UIApplication sharedApplication] delegate]; BT_item *tmpScreen = nil; NSArray *arrayWithPlaces = [appDelegate.rootApp.screens valueForKey:@"itemType"]; NSUInteger index = [arrayWithPlaces indexOfObject:type]; tmpScreen = index != NSNotFound ? appDelegate.rootApp.screens[index] : nil; return tmpScreen; } 1 error still remains: Parse issue: Expected identifier. What should I change?
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
07/27/14 05:34 AM (9 years ago)
movies_appDelegate *appDelegate = (movies_appDelegate *)[[[UIApplication sharedApplication] delegate]; has an extra square braceet should be movies_appDelegate *appDelegate = (movies_appDelegate *)[[UIApplication sharedApplication] delegate];
 
miku
Aspiring developer
Profile
Posts: 405
Reg: Feb 20, 2014
zagorje ob savi
10,600
like
07/27/14 05:45 AM (9 years ago)
It works now. Thank you very much!
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
07/27/14 05:59 AM (9 years ago)
No problems
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.