Posts Tagged ‘Quirks’

ProjNameGen: There are many like it, but this one is mine.

There are tons of random project name generators out there, but surprisingly few for the iPhone from what I can tell.  That’s where ProjNameGen comes in.  I spent an extremely frustrating but ultimately rewarding weekend bashing my head against my keyboard and threatening to cast off all trappings of technology and join an Amish village somewhere learning about Sqlite, honing my Objective C skills, and navigating the incredibly quirky and unfriendly XCode IDE.

The bulk of the app is done.  It makes random project names based on word lists for the first second and third words.  Right now the first word is always an adjective.

The little heart icon in the top right is for marking a project name as a favorite, and I haven’t coded up the functionality for that yet.  I’m thinking about making it a simpler icon – white with a punched-out plus sign so it goes with the minimalist feel of the app.

The Settings tab will have a few things for the user to play with.  You’ll be able to add your own words and enable/disable the first/second/third words.

The space at the top will be for advertising.  I’m going to document my upcoming struggle to get this thing into the app store.

Advertisements

Flex 3 – Errors in the Problem Pane May Not Actually Be Where They Appear To Be

I just ran into a pretty weird problem during some Flex development that had me cursing and throwing things around the office…ok, not really, but it was still frustrating.

After getting the latest code from our source repository, I kept getting compile errors in Flex Builder but the line that had the error *didn’t even exist* in the file that was causing it to break.

Long story short: our designer had built various doodads in Flash to use as style components, then referred to those doodads in a stylesheet.  Any item in my Flex code that used those styles was breaking because Flex couldn’t find the object that the style was referring to.  But it gets even more interesting!

As you may be aware, when Flex Builder does a compile, it turns your nice, pretty declarative MXML tags into plain ‘ol nasty ActionScript before it does the actual compilation.  The *true* place in the code that was killing the compile was in fact in the generated ActionScript files.  And every place in those generated files where the Flash components were referenced was causing an error.

During the course of figuring this out, I checked the “save generated code” checkbox (it’s in the Project properties) which gave me a nice folder full of ActionScript files (generatedCode, i think it was called).  Guess what was in there?  The lines with errors.  Through those files I was able to figure out that the style stuff was causing the problem.

But if I got latest code, why wasn’t the CSS finding the nifty Flash doodads?  Great question.  It’s because I needed to add the SWF (or SWC, or whatever you use) as a library reference in my project.

Flash Builder Quirk #184912 – The Fake Compile

The other day I had to merge some code (we’re using SVN with Tortoise).  Sometimes that doesn’t work out too well.  This is especially true with Flex code, for some reason.  The merge left a few files conflicted and otherwise wonky, and after untangling that mess Flex Builder still wasn’t compiling the project.

Or should I say, Flex Builder wasn’t compiling it, but it appeared as though it was.  It turns out that there was a huge chunk of “<<<< mine” and “<<<< theirs” code sticking out of one of the files, but FB wasn’t reporting any compile errors.

Long story short: any time you suspect that FB isn’t really compiling the latest version of your code, try running the project straight out of the IDE (hit the big green Play button) instead of running it via your web page.  That should knock it in the head and let it show you the compile error.

Silverlight/VS 2008 quirks driving you crazy?

One of the things I’ve noticed about editing XAML files in Visual Studio 2008 is that sometimes you’ll need to close the file you’re working on then re-open it in order to see certain changes take effect, in particular when you change the ImageSource attribute on an element.  That took me a while to figure out.  There are few things more frustrating than stumbling on a bug in the IDE when you’re trying to learn an entirely new way of building apps.

Another interesting thing is that you apparently need to specifically tell elements to be a certain height/width.  For instance, if you have an element inside another rectangle, don’t expect it to inherit the size of its parent…it won’t fill that space unless you tell it to!