Getting Titanium CurrentWindow To Work Under CommonJS

Appcelerator is a moving target, developed and changing pretty fast. The old way was using the **url: ** property of a window to open up a new screen with a javascript screen. Old and Busted var window = Ti.UI.createWindow({ url: 'screen.js' }); Another Old Way Then came the Tweetanium structure, while a solid way to set up, it’s not the route Appcelerator is recommending anymore. See my post for more information on the Tweetanium Setup

Appcelerator Titanium Twitter Birdhouse Failing because of HTTP

This problem caused me much angst and it’s partly Twitter’s fault (just ask me). I’m using the great Titanium library for Twitter called Birdhouse. It does a great job requesting authorization, storing it, and gives you an API to post tweets. So I was using this code to post tweets using Birdhouse. this.tweet = function(message) { Ti.API.info(‘Im about to post to twitter:‘); Ti.API.info(escape(message)); BH.api(‘http://api.twitter.com/1/statuses/update.json', ‘POST’, ‘status=’ + escape(message), function(resp) { Ti.

MVC for Appcelerator Titanium (understanding Tweetanium)

Tweetianium builds it’s own namespace that it operates under rather than calling code that looks like the following to open up a new window. Ti.UI.createWindow({url:‘somefile.js’, importantdata: mydata }); This essentially uses different files to open new windows, it’s managable to point, but I had trouble with not having some sort of global variables I could call on. In walks Tweetanium and Struct These keep the entirety of the code in basically a namespaced object.

More Zend Framework Fun

Sending email via Gmail $config = array( ‘ssl’ => ‘tls’, ‘port’ => 587, ‘auth’ => ‘login’, ‘username’ => ‘youemail@gmail.com’, ‘password’ => ‘yourpassword’ ); $gmail = new Zend_Mail_Transport_Smtp(‘smtp.gmail.com’, $config); $mail = new Zend_Mail(); $mail->addTo($this->to); $mail->setSubject($this->subject); $mail->setFrom($this->from); $mail->setBodyText($this->body); $mail->send($gmail); As you can see, you need to create an object for Gmail, then create an email object, then tell the email object to use the gmail object. It works great.