Sencha Touch Numberfield is too Short

November 8th, 2011

In Sencha 1.1.0 and 1.1.1 the numberfield is pretty useful, but on the iPhone it shows up a bit too short. A simple fix to this:

.x-field.x-field-number {
    background-color: white!important;
}

Sencha Touch: Scroll To Top After Leaving a Panel

October 17th, 2011

This doesn’t seem to work on Ext.List, but you can add a List with “scroll:false” as a child of an Ext.Panel with “scroll:true” and add this listener to the Ext.Panel.  Now the next time the user goes back to that panel, they are at the top of the list, form, content, etc.

listeners          : {
  hide : function() {
    this.scroller.scrollTo({ x: 0, y: 0 })
  }
}

Sencha Touch Deselect List Item After Item Tap

October 17th, 2011

All you need to do is add this wonderful little listener and a timeout. If anyone knows how do do this globally as an override to the List type, I’m all ears.

listeners: {
  itemtap: function(record, index, item, e) {
    setTimeout(function(){record.deselect(index);},500);
  }
}

Sencha Touch Email to User

October 13th, 2011

There are really only two approaches.  One is to send a notice to your server to send a particular user an email.  For lightweight requirements, you can just do this:

var msg = {
subject : "My genius email",
body : "Something about rabid squirrels in your coffee... nothing wakes you up, like rabies in your cup"
};
window.location = "mailto:" + MyApp.User.Email + "?" + Ext.urlEncode(msg);

Do not make this simple iPhone mailto link mistake

October 13th, 2011

IS: mailto:myemail@gmail.com?subject=wearmorepantsjames&body=someurlencodedtext

NOT: mailto:myemail@gmail.com&subject=wearmorepantsjames&body=someurlencodedtext

The iOS web package is not smart enough to translate that ampersand into a question mark like your desktop setup is.



©2005-2012 Blog – Epiphany Digital is proudly powered by Badgers and Web Design is by Epiphany Digital
Entries (RSS) and Comments (RSS). 32 queries. 0.791 seconds.

Thank you for visiting this site. The web fairy will visit you in your sleep... you know, I was going somewhere with this, but it really doesn't have as much innocent charm as the tooth fairy, especially when I picture the web fairy as someone much like the Simpsons' Comic Book Guy but with wings. It's just not something I want.