Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 5    Views: 82

thegibcoyote
Apple Fan
Profile
Posts: 139
Reg: Feb 01, 2011
Gibraltar
1,390
02/08/14 12:39 PM (11 years ago)

Fixed - Scringo button loads any screen

Adding a Scringo Custom Button (command) has caused me issues but with the help of Kittsy have managed to now get it all working. Problem was I could create a button on scringo interface or several as it might be. Each with a unique ID. The ID got transmitted to APP but i was unable to point these to dedicated BT screens. Details below
 
thegibcoyote
Apple Fan
Profile
Posts: 139
Reg: Feb 01, 2011
Gibraltar
1,390
like
02/08/14 12:44 PM (11 years ago)
Added in the app_delegate.m file the following sections In the app delegate.m file I have included this [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(customFeatureClicked:) name:kScringoCustomButtonClicked object:nil]; and further down -(void)customFeatureClicked:(NSNotification *)aNotification { NSLog(@"User selected my custom command. Command id is =%@", [aNotification userInfo]); [[self getViewController] loadScreenWithNickname:[[aNotification userInfo]objectForKey:@"customButtonId"]]; [Scringo closeSidebar]; } *** Important *** that the scringo ID used is identical to the BT Screen Nickname....one important thing...scringo does not accept these ID's to start with numbers or have spaces so make sure that BT screen nicknames that are to be called by BT also follow this rule. This solution works like a dream giving your code full flexibility to create as many custom menu items on scringo slide menu and these to point to respective BT screens. Awesome Once again my many thanks goes to @Kittsy which without his help would have not achieved this very important addition to my app. Thanks and hope it is helpful.
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
02/08/14 12:50 PM (11 years ago)
Yippee An afternoon of procrastination and code without having a mac in front of me, I must be getting good at this. Here is the thread that started it all http://www.buzztouch.com/forum/thread.php?tid=0AEFF1909A28E9AC27DD126 My poor iPad doesn't know whats hit it. You did well to stay with it, you could have bailed at the hard coded solution and said stuff it.
 
thegibcoyote
Apple Fan
Profile
Posts: 139
Reg: Feb 01, 2011
Gibraltar
1,390
like
02/08/14 12:52 PM (11 years ago)
Yeah Kittsy I was at a position of bailing at one stage.....but thanks to your help, I kept going and very chuffed at the end result. Hope our time and effort will help others too. Thanks again Mate
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
02/08/14 02:49 PM (11 years ago)
Thanks for sharing the solution :) Farcat
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
02/09/14 03:09 AM (11 years ago)
Awesome, thanks for the share! In codebox it goes.
 

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.