Today is a good day to code

Confusion around Mach-II

Posted: December 31st, 1969 | Author: | Filed under: Uncategorized | No Comments »

Confusion around Mach-II

Picture of Irv Owens Web DeveloperIt looks like we are going to standardize on Mach-II at work. We are building pretty complex integrated software and it makes sense to have solid shop standards. Mach-II isn't that hard once you get a couple of things straight.

The thing that has been the stumbling block for me through the past year is that I couldn't understand how form and URL elements were passed to the listener objects. I read what little documentation there was for Mach-II, and I worked with the sample applications. I just couldn't get the darn thing to work. Even once I began to understand design patterns a little better, I still couldn't get Mach-II to work. I was missing two things which I will talk about now.

The first problem was with getting the event arguments, or the for and URL elements into my listener objects. What I was missing was that by configuring the event handler to notify the listener, you are telling it to pass the event arguments object into the listener. To pass it through, you can tell your listener to recieve an argument called event of type MachII.framework.Event.

This is important, it is the final hurdle, which I got over today to getting it to work. Even though the folder is Mach-II, your type has to start with MachII. If it doesn't, then your listener won't work because it will say that the argument passed in isn't of type Mach-II.framework.Event. That was what I couldn't figure out for several months. While I now feel somewhat stupid, I am glad that I have figured it out and can begin desigining applications. Even though my model is typically very abstracted from the framework, and should operate.