CMContrib Project

Topics: Extensibility
Jan 22, 2012 at 7:02 PM
Edited Jan 22, 2012 at 7:16 PM

Hey,

I have a contrib project over at github where I keep all my reusable stuff that builds upon Caliburn.Micro. It mainly adds extra behaviour for IResults and Coroutines but it also features a MVVM approach for user dialogs. Some of the things I implemented where also dicussed here in the Discussion like the additional syntax for ActionMessages. For more details you can have a look at the ReadMe and at the demo projects (SL & WPF).

Since most of the stuff addresses common problem I thought it would be nice to share it with the rest of you. Although Documentation is mostly nonexistent (as always :)), I try to blog regularly about things I add to the project. But most implementations should be self-explanatory. If not feel free to ask me anytime.

And I also wanted to as Rob if it is okay to publish the NuGet package under Caliburn.Micro-Contrib.

Jan 23, 2012 at 3:51 PM
Edited Jan 23, 2012 at 3:53 PM

Kevin,

I've recently starting using your dialogs and plan on using some of the other parts of your addons.  It also seems like a few others are as well.  Thank you for that, so far everything seems well thought out.  I was going to ask if you were going to be updating to 1.3 and doing a compile to SL5 etc. but in just checking your GitHub site to confirm your first name I see that 1.3 at least has been plugged in.  Will you be doing a SL5 compile as well?

I think with all the changes to the ViewLocator, and I'm sure there are going to be lots of discussions posts in the next while as people make tweaks and or adjustments to go back to using the standard framework vs. their custom logic.  I'm thinking it would be very helpful for people plugging in your add-on to have a concrete example of using your dialog logic with their own custom view/viewmodel and what is required via the bootstrapper / namespace mapping to get that to work properly.  If that is something you could add to your samples that would likely be appreciated by more than just myself.

Thanks

jack

Coordinator
Jan 23, 2012 at 6:19 PM

It's fine with me if you publish to Nuget ;)

Jan 24, 2012 at 5:24 PM

@jack

I try to add an SL5 compile over the weekend. Also, there is a small sample for a custom dialog view in the WPF demo but i wanted to overhaul the demos anyway. Dunno how long that takes though. I also wanted to add more tests, but time is sparse :)

@rob

cool

Nov 6, 2013 at 10:46 AM
Edited Nov 6, 2013 at 10:49 AM
While i know that CMContrib runs officially with CM v 1.4.1, I went ahead to run CMContrib on CM v 1.5.2
Everything works fine until i call yield return q.AsResult():
public IEnumerable<IResult> TestRun2()
{

   var q = new Question("Isn't this a nice way to create a Dialog Window?",
                                        Answer.Yes,
                                        Answer.No);

   yield return q.AsResult();
}
Error Message: A first chance exception of type 'System.MissingMethodException' occurred in Caliburn.Micro.dll

The exception happens in SequentialResult.cs - after execute next.Execute(context) - Line 59
if(moveNextSucceeded) {
                try {
                    var next = enumerator.Current;
                    IoC.BuildUp(next);
                    next.Completed += ChildCompleted;
                    next.Execute(context);
                }
                catch(Exception ex) {
                    OnComplete(ex, false);
                    return;
                }
            }
Stack Trace:

Message: "Method not found: '!!0 Caliburn.Micro.IoC.Get()'."

StackTrace " at Caliburn.Micro.Contrib.Results.DialogResult1.<>c__DisplayClass5.<Execute>b__3()\r\n at Caliburn.Micro.Execute.OnUIThread(Action action) in c:\\Users\\Rob\\Documents\\CodePlex\\caliburnmicro\\src\\Caliburn.Micro.Silverlight\\INPC.cs:line 156\r\n at Caliburn.Micro.Contrib.Results.DialogResult1.Execute(ActionExecutionContext context) in D:\dev\dotNET\projects\CMContrib\src\CMContrib.SL\Results\DialogResult.cs:line 44\r\n at Caliburn.Micro.SequentialResult.ChildCompleted(Object sender, ResultCompletionEventArgs args) in c:\Users\Rob\Documents\CodePlex\caliburnmicro\src\Caliburn.Micro.Silverlight\SequentialResult.cs:line 59"

I hope there is a quick fix for this.
Nov 7, 2013 at 5:00 AM
CM.Contrib is not compatible with the current Caliburn.Micro version.
Please post CM.Contrib issues to https://github.com/kmees/CMContrib/