Action Messages on Loaded events

Aug 18, 2010 at 12:50 PM
Edited Aug 18, 2010 at 12:56 PM

Hi.

I have found a issue where if you have the following xaml, there seems to be a malfunction inside CM. I have a Listbox with:

Micro:Message.Attach="[Event Loaded] = [Action GetReports]" with GetReports being a coroutine.

Stepping though CM, Inside ActionMessage.Invoke there is a line "var outcome = execute.Invoke(target, values);" which seems to misfire, even though all the information to complete the invoke is there.

If I put that Message.Attach into the <Grid> control that contains the ListBox it suddenly works.

Any ideas what might be going wrong here?

I would guess that there is some sort of issue when a message attaches to the loading event of a control, because that same loading event is used to set up the Action Message. Debugging reveals that the setup is done by CM before the action message is invoked, but still it fails strangely. 

 

 

Coordinator
Aug 18, 2010 at 1:03 PM
Would you mind putting together a small sample solution that demonstrates the project? That would really help me get to the bottom of this. Please send to robertheisenberg at hotmail dot com Thanks!
Aug 18, 2010 at 1:05 PM
Edited Aug 18, 2010 at 2:19 PM

Will do.

PS- You Action methods cannot contain the string "Action", that also bugs things. Understandibly so though, with the conventions and all. Something to think about.

Aug 18, 2010 at 2:22 PM

Ok, i put together a small test appy but I could not reproduce the problem.

Then tried to reproduce the problem on my main application and the problem seems to have disappeared. 

Fairly confusing. It was definitely not working before, even though debugging showed that it should work. 

O_o

Coordinator
Aug 18, 2010 at 4:27 PM
If you see the issue again, feel free to email a repro at any time.