Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Problem with systemButton:Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE

Hi

I'm new to Appcelerator so please forgive me if I'm asking something silly. Firstly want to say that this is a really great product even though I have found a number of quirks here and there.

Yesterday I went to put a toolbar on to a keyboard and followed the examples from the kitchen sink, which work well in the KS but not so well in my app. I created one button and included the systemButton:Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE button to push it to the right of the screen.

This appeared to work fine the first time I ran the app in the simulator, however, the next time I compiled and ran I got the following error:

>Titanium.UI.iPhone.SystemButtonStyle' [undefined] is not an object

Just don't understand it, thought maybe I was missing a definition or something, but I sure as hell can't see where or what. I have worked round it for now by creating a disabled button, but I'm kind of thinking that other things might not work either. In fact I just tried the following and got the same result:


var set_flexSpace01 = Titanium.UI.createButton({
    enabled:false,
    width:260,
    height:32,
    style:Titanium.UI.iPhone.SystemButtonStyle.BORDERED
— asked September 17th 2010 by Louis Ramsay
  • iphone
0 Comments

7 Answers

  • Accepted Answer

    Usually when I have this problem (And trust me, it's happened many times before), two things usually fix it:

    1. Deleting my entire "build/iphone" build directory.
    2. Install the app on my iPhone, then just build it as normal on the simulator (Which, I understand, is only possible if you set up all the AppIDs and stuff).
    — answered September 17th 2010 by Colton Arabsky
    permalink
    0 Comments
  • Delete your build folder and try again, that usually fixes it.

    — answered September 17th 2010 by Colton Arabsky
    permalink
    0 Comments
  • Thanks for the response Colton, unfortunately that makes no difference, and now I can't even get the close button to show on the toolbar. The thing is I haven't changed the code in anyway!

    Louis

    — answered September 17th 2010 by Louis Ramsay
    permalink
    0 Comments
  • OK, forget the bit about the Cancel button not showing, stupid old f..t did a global replace and changed the image file name! What a plonker!

    — answered September 17th 2010 by Louis Ramsay
    permalink
    0 Comments
  • OK, forget the bit about the Cancel button not showing, stupid old f..t did a global replace and changed the image file name! What a plonker!

    — answered September 17th 2010 by Louis Ramsay
    permalink
    0 Comments
  • Thanks again Colton, just deleted and rebuilt and it did indeed fix the problem, I wonder just for how long though. As I said before it's a nice product and saves me learning Xcode and my senile time of life, but there are lots of things that don't always work.

    Oh well I'll crack on till I hit the next one, it's early days yet as I have only been using this for a couple of days and I have managed to build an app with various windows, so not too bad I guess.

    Thanks again, Louis.

    — answered September 17th 2010 by Louis Ramsay
    permalink
    0 Comments
  • Yes, there are many bugs, but that is only because Appcelerator is a tiny team with a huge userbase and they can't be fixing everything at once. They've spent all their time fixing bugs and they're doing a great job :) I rather JavaScript over Objective-C anyday :)

    PS - It seems that every once in awhile, when you add a Titanium.UI.iPhone INT that happens. It's never really happened unless I add something like a SystemButton or another iPhone-only style.

    — answered September 17th 2010 by Colton Arabsky
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.