mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
03/28/13 05:23 PM (12 years ago)

Last post on Scringo tonight... adding custom sidebar item

Okay, I'm loving the new scringo and have got it working well. But now I am getting ambitious and trying to add a custom item to the sidebar that will load a buzztouch screen ID. I made an item called "terms" which I'm hoping will bring up my Terms of Use page. Here is what I have in my appDelegate.m file using their guide: -(void)myCommandClicked:(NSNotification *)aNotification { NSLog(@"User selected my custom command. Command id is terms%@", [aNotification userInfo]); // The rest of your code NSString *loadScreenItemId = nil; loadScreenItemId = @"29D587F65CB04A587CFDE38"; } Needless to say this isn't working or I wouldn't be posting anything. I'm not sure I documented my command ID correctly in their code. And if I did, I'm not really sure how to call up a specific BT screen ID. Has anyone done this yet?? Josh
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
03/28/13 10:47 PM (12 years ago)
Not at the computer but I have it working and will post later
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
03/29/13 01:38 AM (12 years ago)
I have my Scringo in the BT Buttons Menu and I call it first in the willappear method like this: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(MoreForMeClicked:) name:kScringoCustomButtonClicked object:nil]; changing myCommandClicked to MoreForMeClicked at the end of the BT_screen_menuButtons.m file I add this code above: ////////////////////////////////////////////////////////////////////////////////////////////////// //downloader delegate methods -(void)MoreForMeClicked:(NSNotification *)aNotification { NSLog(@"User selected my custom command. Command id is =%@", [aNotification userInfo]); // My or your code NSString *loadScreenItemId = nil; loadScreenItemId = @"29D587F65CB04A587CFDE38"; }
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/29/13 04:30 AM (12 years ago)
I did what you said and still can't get it to work. Am I supposed to actually enter my command ID in the code? It is "terms" but not sure where I would put it. When I click on my custom side item this is what shows in the console (never see the ScreenItemId): 2013-03-29 07:27:04.152 erres[881:1e203] Scringo - customFeatureClicked (terms) ... 2013-03-29 07:27:04.153 erres[881:1e203] User selected my custom command. Command id is ={ customButtonId = terms; } 2013-03-29 07:27:04.153 erres[881:1e203] User selected my custom command. Command id is ={ customButtonId = terms; }
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
03/29/13 05:03 AM (12 years ago)
I never changed that command if look above. My code calls an ad and works great. Sorry I'm not sure why yours doesn't work. When I get. Next to my laptop again I'll try exactly like you
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/30/13 06:38 AM (12 years ago)
Okay, what you wrote initially does work. The problem is the code I used to call a custom BT screen. I can get the code to do other things like open an URL in safari but can't launch a BT screen... and it probably wouldn't look right even if I did. So I'm just going to put the "terms of use" as a welcome message. Thanks for your help
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
04/01/13 04:55 AM (12 years ago)
awesome! glad you got it working. i think its an excellent feature from Scringo and easy to implement!
 
thegibcoyote
Apple Fan
Profile
Posts: 139
Reg: Feb 01, 2011
Gibraltar
1,390
like
02/07/14 01:44 PM (11 years ago)
I am having issues with this one any ideas on what is the code to load screen after the following call > -(void)customFeatureClicked:(NSNotification *)aNotification { NSLog(@"User selected my custom command. Command id is =%@", [aNotification userInfo]); // My or your code NSString *loadScreenItemId = nil; loadScreenItemId = @"142D414BC4D4EBE84013AF1"; } Driving me crazy
 

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.