Archive for Programming

Apple Push Notifications and Ad Hoc

// March 25th, 2011 // 2 Comments » // Objective-C, Programming

This will be very short. I learned something the hard way today. When you’re developing an iOS app, and you’re sending it out to testers as an Ad Hoc app, to use push notifications you have to use a Production certificate, not a Development certificate. If you don’t do this, you’re going to find yourself, the developer, the only person able to receive push notifications to your device. Everyone else on the Ad Hoc team will be left wondering what you’re doing wrong.

I’d been using Boxed Ice’s excellent guide on the subject, and they mention the developer identity instead of the production one. That guide is still tremendously useful, just make sure to go through the process of creating certs twice–once for Dev and once for Production!

VideoDisplay Improvements

// April 3rd, 2009 // 1 Comment » // Actionscript 3, Flash, Flex, Programming

VideoDisplay has no doubt been the source of many headaches and much wasted time for any developer that has touched it. A lot has been written about it, and here’s my contribution, which is an evolutionary improvement over others’ work. It’s a fix that adds video smoothing and a source propert setter that doesn’t break the component and still allow you to set autoPlay. (This will all make sense in a minute.)

(more…)

A Note on VideoDisplay in Flex

// March 6th, 2009 // No Comments » // Actionscript 3, AIR, Flash, Flex, Programming

I just wasted an hour trying to track down the cause of a VideoDisplay-related bug, and I’m posting the very simple solution here to hopefully save one or two people (including future Daniel) some headaches.

(more…)

Customizing FLVPlayback

// March 3rd, 2009 // 19 Comments » // Actionscript 3, Flash

Here’s a quick tutorial showing you how to beef up FLVPlayback’s SeekBar, adding in a play progress bar and a full-bar hit area to make scrubbing quite a lot easier than finding that little tiny arrow Adobe seems to think is enough.

(more…)

JVM and Flex Don’t Play Nice

// August 22nd, 2008 // No Comments » // Flex, Programming

I ran across an interesting problem today. I tried to create a new workspace with the intent of cleaning up my Flex environment. It’s getting pretty cluttered between client work and personal projects and random experiments. So I hit Switch Workspace / Other and type in the name of a location that doesn’t exist yet, assuming it would go ahead and create that Experiments folder for me. Which it did, right as Flex went down in flames.

Every time I try opening Flex Builder up again, I was immediately met with a daunting error. JVM Terminated! All from switching my workspace? Obviously this isn’t normal behavior. A week ago, I was required to change my machine’s version of Java SDK to work with a simulator required for my current project. The computer was using what seemed to be a special version of 1.5, and the simulator app required 1.6. In OS X, there is a sym link at /System/Library/Frameworks/JavaVM.framework/Versions called Current. Originally, that was pointing at something called A, and I don’t know what that means, because in the same directory there’s also the 1.5 sdk, and they look pretty much the same. That was switched to 1.6.0 and the simulator worked. I switched (and when I say “I” here, I mean our resident Java guy) that sym link from 1.6 back to 1.5, still getting the error. Then I switched it back to A, and all is well.

So! Lesson learned. Flex Builder will give me problems if I mess with Java. Seems like kind of a bad thing, though, if ever I want to do any Java programming, right?

Resizing ViewStack

// June 25th, 2008 // No Comments » // Actionscript 3, Flex


Warning: array_keys() [function.array-keys]: The first argument should be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3643

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3643

Warning: array_keys() [function.array-keys]: The first argument should be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3651

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3651

Warning: array_keys() [function.array-keys]: The first argument should be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3654

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3654

Warning: array_keys() [function.array-keys]: The first argument should be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3643

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3643

Warning: array_keys() [function.array-keys]: The first argument should be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3651

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3651

Warning: array_keys() [function.array-keys]: The first argument should be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3654

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3654

Warning: array_keys() [function.array-keys]: The first argument should be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 1925

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 1925

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 2290

Warning: implode() [function.implode]: Argument must be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3242

Warning: array_keys() [function.array-keys]: The first argument should be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3265

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3265

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3306

Warning: array_keys() [function.array-keys]: The first argument should be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3357

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3357

Warning: array_keys() [function.array-keys]: The first argument should be an array in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3502

Warning: Invalid argument supplied for foreach() in /nfs/c01/h13/mnt/12290/domains/themathiseasy.com/html/blog/wp-content/plugins/devformatter/geshi/geshi.php on line 3502

This is simply a really quick note, and a reminder that whenever you’re starting to jump through hoops with code in Flex to accomplish something that should already be there, it probably is. Check the documentation.

So ViewStack lets you switch between different containers visually. By default, the ViewStack takes on the height of the first container within it and does not adjust height when it changes what it’s showing. Why this is the default behavior, I have no idea. But there’s a property that address this.

1
resizeToContent = "true"

Done. And duh.

SWFAddress

// May 11th, 2008 // 2 Comments » // Actionscript 3, Flash, Programming

Holy sweet jesus deep linking is easy with SWFAddress. It’s criminal that all Flash sites don’t implement it.

Eclipse Workspaces

// March 9th, 2008 // No Comments » // Geekery, Programming

Before I started at Schematic, I’d never developed in a real IDE. I coded in Flash itself. Near the end of my pre-Schematic days I began to realize that this was a silly way to do things and began searching for an alternative. I was PC-only at the time (seems like so long ago. My conversion is now complete.) and the easiest option I found was SEPY. All in all, at was a pretty good app and I found it immensely more useful than Flash. At Schematic, I still used SEPY while I saw everyone else using other stuff. This guy named Roger was doing crazy things with this thing called Eclipse, which was apparently big in the Java world. I tried installing it at some point, which turned into a colossal failure. I couldn’t just open up a damn file? I had to create an entire project? And what’s this whole workspace thing? It seems insanely cumbersome for what could have been such a simple task.

I hadn’t really grasped the full concept of what a project was at the time, I guess, because now I code exclusively in Flex Builder and I can’t really imagine doing it any other way. [Incidentally I'm playing around with the iPhone SDK, which is letting me learn XCode. From a Flex Builder perspective, XCode feels so scattered that it's quickly becoming frustrating.] As time goes on, I’m getting more and more comfortable with Eclipse’s quirks.

This is all actually just a really long way to get to the point of this post: I’ve finally starting adjusting to the concept of Workspaces, and it’s a really useful organizational tool. I don’t actually have much to say other than that. Consider everything above the paragraph as aimless fluff.

Leave me alone, I need to start making this look like a real blog, ok?