Matthew Wallace

Software Developer
 

Web Developer pro tip - LiveReload

I started doing quite a bit of HTML, CSS, Javascript, RoR development. As a long time developer using Flash we compile a swf and most IDEs launch the browser in order for you to view changes.

That small nugget can save you lots of development hours. Textmate is my editor of choice for Rails and Javascript these days. While it does have a "preview" browser it has some small issues. It does refresh but it only stays visible on a selected file. If you switch to another file you have to launch it again.

You will be doing yourself a huge favor by checking out "LiveReload". This awesome and simple application allows you to set up lots of directories for web development. Placing some javascript on the page hooks up a single page to reload as files change but even better there is an extention for google chrome and ff and any time a file changes with in your web directory it will reload any page you have loaded within the browser for that project. A very small simple solution but one that is well worth the money.

The Web Developer Wonderland

(a happy land where browsers don't need a Refresh button)

CSS edits and image changes apply live.

CoffeeScript, SASS, LESS and others just work.

Citizenship is granted through the Mac App Store.
Windows permanent residency issues are being worked out,
temporary stay already allowed.

 

 

View Manager for Corona SDK

Grab it on GitHub

This is an attempt to create a simple view manager class for corona sdk projects. The goal is to keep it simple and light. basically swapping out one view for another and adding some simple transition effects.

About the project

This project was started for my own personal use but please feel free too fork and add. I would like to add some other classes for doing stuff like modal or popup windows.

Questions or thoughts?

Send me a github message or hit me up on twitter http://twitter.com/matthewswallace

 

 

ID Nashville is blow'n up - Join NOW people!

Starting in December of 2011 we changed the direction of the Nashville Flash UG. We now cover all kinds of topics in the Interactive Developer space. Check out the stats on member sign up and participation.  

Screen_shot_2012-01-31_at_7

Next week Andy Matthews is going to cover One Codebase - Deploy to Web, Desktop, & Mobile w/ jQuery, AIR, & Phonegap RSVP to be a part.

SWAG! - Andy will be giving out some great Phonegap stuff as well so don't miss this meetup!

Also a special announcement from Phillip Maddox of Ceed Creative. He's has been hard at work on the new logo and identity for the meetup. You guys are going to really dig what he came up with.

 

 

Corona SDK build command for Sublime Text 2

After using Sublime Text 2 on a few html and ruby on rails project I think it is an awesome choice. If you are Textmate or BBedit user then Sublime will hook you right away. Naturally I wanted to get away from Textmate in my CoronaSDK / Lua projects. The one convenience that I enjoy with Textmate is "command + R" runs your Corona project for you. 

First thing is to get Textmate Corona bundle working in Sublime. Do some googling and you will find some instructions for that. http://bit.ly/z1OCCF 

Now that you have the bundle working in Sublime the next step is adding a new Build System so that we can run a simple command and launch the simulator from our project in Sublime. To do this you will go to Tools > Build System > New Build System. 

Screen_shot_2012-01-22_at_9

You will see a new Build system document open. If you are on OS X you will add the following code to the file.

After that hit "command + s" and name the file CoronaSDK. This will add the new Build to your Build System menu so that you can select it.

Screen_shot_2012-01-22_at_9

Now open up your Corona project and give it a try. "Command + B" should launch the simulator and you will notice that the terminal window will open inside of Sublime at the Bottom witch I think is awesome. Enjoy!

Screen_shot_2012-01-22_at_9

 

 

Now that the dust has settled

I've had my share of feelings about the news coming out of Adobe over the last month. The dust settles fast in the software development world. At the end of the day we all just want to work with languages and technology that doesn't get in our way, that's fun to use and just gets the job done.

Lesson Learned : One thing I can say that I have learned from this and will maker sure doesn't happen again is I found myself defending Adobe, when what I thought I was really doing was defending Flash. From now on, no matter the platform or language, I am going to make sure that I don't do that again, and if I do, please someone stop me or at least give me a nudge and let me know.

Flash is an awesome platform and I am thankful to work on projects that use flash. Actionscript 3 and the Flex framework has made me a better developer. I didn't start out wanting to be a developer until I started using the Flex framework. I have learned better OOP concepts, along with better UX best practices. The whole platform has just made me a better software developer.

Where to go from here : I'd say do what most of us Flash Developers have always done. Do what you love, find languages and platforms that get your creative brains turning and most importantly, don't let a companies bad PR mess with the fun you are already having. Don't limit yourself. There are some awesome languages and technologies out there.

All that to say .... Flash will remain and the industry will still need skilled developers that know what the hell they are doing and more importantly have a passion for the platform they are working on.

That's about all I have to say about that. This was just an attempt to put my thoughts out there. Nothing too it more than that. I enjoy Flash and will continue to enjoy developing on the platform but I enjoy being an Interactive Developer more.

 

Corona SDK 05: Advanced Touch Handling - YouTube

I recently had to create a sliding menu for a game I am working on. Coming from a Flash background I usually think in terms of, "how would I do this in flash?", and it translates really well. Same goes for the functionality that I came up with for the menu component that I created so the user can swip from left to right to get to the next set of buttons.

The difference in Corona and flash that I found was the way you listen for events on the "stage". The following video has some great little bits of info for advanced touch event features and logic. The first tip solved the issue I was having and it only took adding a couple more lines of code.

 

 

Coronasdk development tip - suspend

In hopes to save someone else a few hours of reading and digging I figured I would start posting some quick tips about some of the small things that will make your programming experience on iOS with coronasdk a little easier and let's face it, make you feel more awesome that your applications does what it's supposed to do when a user interacts with it. 

If the user hits the home button on iOS the app closes and if they where in the middle of doing something, by default they will not be returned to that state in the app. Not sure why this is the default functionality but none the less I started searching on how to "save state" of the app when it's interrupted by navigating to another application or clicking the home button to get back to the main screen. 

If you do some googling as I did for "saving state", or "coronasdk suspend" and so forth you will more than likely come across a few posts that suggest listening for and event that the applications is exiting and then figuring out a way to save the state of all the variables and logic needed to load the screen the user is on when they return to the app. This is totally the case and something you should do if you want to return them to that state if the app quit but suspend is different that quitting or exiting the app all together. 

If you want the app to suspend and return to the screen and state that it's in when the user navigates away and returns via "iOS multitasking" then the solution is very simple. Go into your app build.settings file and add the following line "UIApplicationExitsOnSuspend = false". By default a corona app "Exits" the app when suspended by default. You are basically telling the app to suspend rather than exit by adding this to your build settings.

 

Daily build Widget 0.2.1 (BETA) is out for coronasdk

Coming in the next daily build (2011.645—should be up around 2am on the 25th of October), is a MAJOR update to the widget library.

The documentation pages have already been updated to reflect the changes, and I recommend viewing the list of "Known Issues" and "Recent Changes" to become familiar with this update.
http://developer.anscamobile.com/content/widget

Here are the main changes:

 

tableViews and scrollViews

These have been completely redesigned for stability and flexibility. Those who had problems with the tableViews before should immediately notice that there is no more losing rows, no more strange issues with category items, and now, you are completely free to decide WHAT goes in each row.

Each row, to include category items, are just another display group. You'll decide what goes into each row by specifying an 'onRender' listener for each row and inserting objects into the listener's event.view property. This means there's a little more "setup" involved when it comes to creating tableViews, but you are now given a tremendous amount of flexibility that was not possible before.

During testing, we've noticed that on older devices (which include 2nd generation iPod touches and older), tableViews with 500+ rows (or just a huge amount) do tend to stutter and cause some problems. It's not very user-friendly to have that many rows in a tableView anyway, so we recommend splitting up your lists by having a 'Load 25 More' row as the last item.

While the scrollView hasn't changed all that much, the parameters have been made to be more consistent with the tableView (as well as the other widgets), and an unfortunate side effect to all the refinements of this update is the absence of scrollBars (same goes for tableViews). Please be patient as we're working on restoring these in a future update. Until then, please enjoy the enhanced stability and flexibility these widgets now provide.

 

pickerWheel

Since the pickerWheel actually relies heavily on the tableView widget, we had to revamp this widget as well. You'll notice there's more customization options and no more limit to how many rows you can have. We've also added an "alignment" and "startIndex" property to each column.

Currently, there are two known issues that we're working on addressing in a future update. The first one is the fact that rows do not soft-land on specific items (as they do with the native iOS pickerWheel). The selected item will be whatever is in the selection area, whether it is centered or not.

The second known issue is that if you change the 'y' value of the pickerWheel (such as with a transition.to, to slide the pickerWheel up), then the 'getValue()' method will stop working. We recommend you instead "fade" the pickerWheel in if you want some kind of animation, as you cannot move the pickerWheel once it has been created without experiencing issues.

 

tabBar (brand new widget)

This is the much-requested tabBar widget that is brand new to this upcoming version of the widget library. It supports plenty of customization and an unlimited amount of tab buttons.

For iOS users, the default tabBar should look and feel just-right. For other platforms, or apps that need to deviate from the standard look, there are plenty of parameters you can set to get it looking just the way you want.

Here is the API documentation for the new tabBar:
http://developer.anscamobile.com/reference/index/widgetnewtabbar

 

Widget Themes

Prior to this version, themes were hard-coded into the widget library and relied on updates to provide you with new themes. That is no longer the case.

Now, themes are Lua modules which contain tables (similar to config.lua) that correspond to specific widgets. Since widgets have been made to be more flexible, themes are simply preset parameters for the widget (that you can override on a per-widget basis). Themes will have a folder that also needs to be included in your project folder (along with the Lua module), which will contain the graphical assets that are required for that particular theme.

At the moment, there is only an iOS theme. We are working on an Android theme. You can take the iOS theme and modify it to create your own custom themes to share with others, or to simply have unique-looking widgets for your game or app.

 

Text

Previously, the widget library modified the display.newText() function, which caused problems with the new multi-line text capabilities.

Now, the widget library no longer touches the display.newText(), and as of build 2011.645, there is now display.newRetinaText() and display.newEmbossedText() to take care of your retina-display and embossed text needs.

 

Removed Widgets

The segmented control has been removed from the widget library, but has been made open-source for anyone who still wants it:
http://developer.anscamobile.com/code/segmented-control-widget

The tabBar is more cross-platform friendly and serves almost the same purpose as the segmented control, still, the source is available for those who absolutely need/want it.

The toolbar has also been removed, because you can now create an empty tabBar (or just use an image) and place embossed text over it using the display.newEmbossedText() function.

 

BETA Reminder

Unfortunately, if you were currently using the widget library in your projects and you update to this new version that will come out with build 2011.246, your code will break. This library is still in beta and is subject to changes, but we feel like these changes were necessary to keep moving this library forward, and closer to a more stable condition. Most-likely there will not be anymore changes to this widget library as major as this one, since I believe this update addresses most of the major issues that were present in previous versions.

Please take a moment to look over the documentation, and prepare to migrate your previous widget code to be compatible with this new version—you'll be glad you did :-)

http://developer.anscamobile.com/content/widget

The WidgetDemo in Daily Build 2011.646 has also been completely revamped to take advantage of all these changes, and to further demonstrate basic widget usage.

All year I have been playing with the Corona SDK. I took a bit of a break over the summer because I got busy with my full time Flex / Flash Consulting. I started back working on a game about a month ago.

Anyway ... I am really excited to have a subscription to coronasdk now so I can use all the great daily builds that are coming out. It's apparent that the team is really working hard to roll out features that make the sdk more usable and I am sure we will continue to see a lot of great stuff come our way.

 

Starling Framework with Box2d SWC - (Temp FDT bug fix)

Starling Framework with Box2d SWC

If you are using FDT and you are running into issues using the new starling-framework source code then the fix (by John Olson) was to create a Flex Library Project in Flash Builder and export a swc that has all the source from starling in it. I tested this out and sure enough it works.

I prefer swcs in my projects when using frameworks anyway so I packaged up starling and box2d into a swc and you can download it for your convenience. Enjoy!

Github Link:

FDT displays errors on some Class definitions and imports in the framework.
Also in the AGALMiniAssembler.as are some errors, saying "File could not be parsed.", "Unexpected Token" or "Found 'true' but newline or semicolon was expected"

Especially the semicolon shoun't display an error, because it is not a duty to use them. Instead FDT should display a warning

In the Framwork itself FDT can't handle Class definitions with pre package names properly,
e.g. flash.display.Stage in line 144, starling.core.Starling class

see:

Media_httpdldropboxco_fggqm

 

Attention please

There’s something even more limited than time. It’s your attention. Attention is a subset of time, therefore it’s more limited. How you spend your attention is more important than how you spend your time.