Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 4    Views: 54

mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
11/01/14 08:59 PM (9 years ago)

Xib button plugin help

I am embarrassed to ask for help since I initially designed this plugin, but some of the coding has changed. My home screen has 17 buttons which I use. The plugin only supports 12 through the control panel. In the past I have just gone into the .m file and added a few more fields such as: [buttonList addObject:[BT_strings getJsonPropertyValue:self.screenData.jsonVars nameOfProperty:@"buttonScreen13" defaultValue:@""]]; Then I just manually enter the screen ID inside the " ". This has always worked in the past but when I updated to the new plugin it stopped. It still says "button tapped" in the output but it's not loading the screen. Anyone have any ideas? Chris?? josh
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
11/01/14 09:01 PM (9 years ago)
And before anyone asks... yes, I have changed the tags for the new buttons, and they are connected in Interface Builder.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
11/01/14 09:24 PM (9 years ago)
First, make sure you have a tag set on the extra buttons. Then, look for this of code somewhere around 174 in the file: NSString *loadScreenWithItemId = [BT_strings getJsonPropertyValue:self.screenData.jsonVars nameOfProperty:[NSString stringWithFormat:@"buttonScreen%i",sender.tag] defaultValue:@""]; After that, add: if (sender.tag==13) loadScreenWithItemId = @"someScreenIdHere";
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
11/01/14 09:48 PM (9 years ago)
Perfect as always... thanks! Josh
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/02/14 10:45 PM (9 years ago)
Don't feel bad... every time I look at one of my plugins, I have to reteach myself what I did. I suppose that presents a long standing case for documenting your code, but I'm too darn old and cranky to start changing my habits now ;) Cheers! -- Smug
 

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.