PureMVC Architects Lounge

Announcements and General Discussion => General Discussion => Topic started by: novae on September 19, 2008, 07:02:52

Title: Unable to send message through pipes
Post by: novae on September 19, 2008, 07:02:52
Hi all..

I'm still new to pipes, hope you guys can help me.

Basically, I cant send messages from one junction to another. I've registered the listener for the message, I have connected the module and shell with correct input-output pipes, everything seems to be in order. But, the message is not coming through.

Please tell me what I'm missing..


Title: Re: Unable to send message through pipes
Post by: puremvc on September 20, 2008, 05:32:05
Without seeing some code, I can only speculate. Sunspots? Did you set your clock properly for daylight savings time?

Seriously, its a bit difficult to tell anything from this post, but posting a huge zipfile of your project isn't a good answer either, as no one has time to debug modular apps for free.

What I can tell from your post is that you are attempting to do very advanced development without the aide of a debugger. This means as soon as you clear this hurdle, the next one will stop you just as cold.

If you're using Flex Builder, you need to set a breakpoint, for instance on the line that sends the message, run your app in debug mode, and when the line is about to execute and the debugger comes up, use step-over to send the message. Look at the variables view at the return value from the write() call. Is it false? If so it didn't make it down the pipe, its in your plumbing. If it is true, the the message was sent, you just didn't handle it properly. Whichever happens, run again in debug mode and step into. Follow the message through the pipe until you hit error or reach the other module.

If you're not using an IDE with a Flex debugger, then you might want to consider lion-taming or perhaps accountancy, but definitely not modular Flex development.


Title: Re: Unable to send message through pipes
Post by: novae on September 25, 2008, 12:57:10
Hi Cliff..

Sorry for not posting the code, as you said I felt I would be asking too much if I asked for it to be debugged :D

The problem was in the plumbing. The plumbing code executed, however, the junction didn't register any pipes. The problem was that I used the creationComplete event in the module mxml and in the ShellJunctionMediator I used the initialize event to detect module loading. So my moduleJunctionMediator was getting instantiated after the plumbing code executed.

After spending hours debugging I expected the error to be more... complicated. (sigh)

Anyway, thanks a lot for your help! :)