Swiz; But I don’t WANT everything public!

So I was wrapping up my project’s Swiz conversion before I took RobotLegs for a spin and noticed something I didn’t like.  None of my view’s mediated events were firing.  I didn’t actually have many, so I didn’t notice at first.  Then I realized that all of my methods were private.  They were private because I didn’t want to expose them.  Kind of like my parts.

I switched all of those methods to public and things started working.  Except, now I had all of these even handlers exposed.  It doesn’t really BREAK anything, it just . . . feels dirty.  I really don’t think that anybody working with this project would mistakenly call onActionHandler() but I just don’t like exposing things that shouldn’t be exposed.

Of course that’s not an issue at all for my Controller classes.  Public events make sense.

Also I didn’t get a compiler (or even runtime) error about that.  Likely that’s a mistake on my part.  If anybody has a suggestion as to how I would be aware of that private issue please let me know.

As to the Flex-only comment I made earlier Ben Clinkinbeard let me know that it shouldn’t be that way for long.  That’s excellent news for sure.  If I can figure out (or get over) the public mediated handlers then I’ll probably stick with Swiz for a while.

Before I settle though, I am going to give this RobotLegs a try first.  Getting started on it now.  Wish me luck!

Filed under uncategorized · Tagged with

Yea but . . .

Tell me what you're thinking.