Ziriax
Posts: 60
Joined: 10 Dec 2015, 17:59
Location: Belgium
Contact:

Re: Caliburn.Micro port issues

27 Feb 2017, 18:21

Man this is so cool what you are doing, if these things would get patched it should increase the compatibility between WPF and NoesisGUI a lot.
Peter Verswyvelen,
Strongly Typed Solutions

Tags:
 
KeldorKatarn
Topic Author
Posts: 86
Joined: 30 May 2014, 10:26

Re: Caliburn.Micro port issues

02 Mar 2017, 15:26

Any comments on the API stuff from the devs?
 
User avatar
sfernandez
Site Admin
Posts: 1970
Joined: 22 Dec 2011, 19:20

Re: Caliburn.Micro port issues

03 Mar 2017, 04:58

Hi,

There are a lot of things missing, so I'm going to create a ticket in our bugtracker for each request and a meta-ticket to reference all of them to correctly track the development of this.
Anyway, many issues correspond to the Interactivity namespace that we don't implement. So although the name of the classes is the same, they are totally different. We'll see how to solve this ambiguity correctly in our API.

There are some things that can already be workaround though.

The Triggers can be obtained from the FrameworkElement class.
You can safely cast to Visual when using VisualTreeHelper.GetParent() as we don't have a Visual3D class. Anyway we will change the signature to match WPF.
About the DataTemplate, as I said before, in Noesis you can create the elements of the VisualTree the same way you create a normal control:
var boder = new Border { Background = Brushes.Silver };
var stack = new StackPanel { Orientation = Orientation.Horizontal };
var text1 = new TextBlock { Text = "Name: " };
var text2 = new TextBlock();
stack.Children.Add(text1);
stack.Children.Add(text2);
border.Child = stack;
var dataTemplate = new DataTemplate { VisualTree = border };
 
KeldorKatarn
Topic Author
Posts: 86
Joined: 30 May 2014, 10:26

Re: Caliburn.Micro port issues

03 Mar 2017, 05:03

Ok I'll further look into things on how to get the interactivity stuff working and maybe figure out some workaround. I first need to look a bit more into the code and actually see what Caliburn is doing exactly (some of the message stuff is pretty advanced since there's also a tiny bit of an expression language they parse even.)

My biggest issue would probably be the different event handler signatures and the problem with the EventArgs and EventHandler constructors, especially regarding the routed event stuff.
That stuff is probably very important to get this to work correctly.

(Funnily enough during all this I'm pretty sure I found a bug in Caliburn, that I already reported to them and fixed in this implementation)

Also good to know about the way to create DataTemplates in Noesis. I think it would still be cool to have the XamlReader in the future. But I read in another thread that you're kinda working on that already. as long as this way works now, I'm good and I will test that out soon.

I'm actually working on translating the Caliburn samples to Unity and I think most of them should work fine. I mean even the message binding will work, it will just not work currently with a convention you still have to do that databinding the traditional way for now, but the BIGGEST stuff is the property binding anyway because that's how modular UIs are built up. And that part should already work.

I'll keep working on it over the weekend and next week. The biggest challenge will be the dialogs and popups so I'll probably come back here to ask you guys for opinions on how to do this best, I already have a few ideas but I'm not sure how general and generic it needs to be.
 
KeldorKatarn
Topic Author
Posts: 86
Joined: 30 May 2014, 10:26

Re: Caliburn.Micro port issues

26 Mar 2017, 16:46

Small further update, I couldn't work on this for a couple weeks since I had another eye operation and I need my glasses to readjusted. I should be ready to resume work on this in about a week. I'll then try to get most of the Caliburn samples working in Unity and I'll upload that stuff as a package somewhere so people here can play around with it and we can discuss how to get the missing stuff working :)
 
User avatar
jsantos
Site Admin
Posts: 2955
Joined: 20 Jan 2012, 17:18
Contact:

Re: Caliburn.Micro port issues

27 Mar 2017, 22:44

Great great! Waiting for your update : )
 
User avatar
sfernandez
Site Admin
Posts: 1970
Joined: 22 Dec 2011, 19:20

Re: Caliburn.Micro port issues

28 Mar 2017, 18:32

Thanks for all your effort on this topic, I'm sure it will be very useful for a lot of people.
 
KeldorKatarn
Topic Author
Posts: 86
Joined: 30 May 2014, 10:26

Re: Caliburn.Micro port issues

29 Mar 2017, 00:04

I don't think I deserve the credits. All I do is trying to get it to work with this API. The design and it's usefulness is 100% the work of the original Caliburn team.
 
KeldorKatarn
Topic Author
Posts: 86
Joined: 30 May 2014, 10:26

Re: Caliburn.Micro port issues

28 Sep 2017, 12:41

Sorry for not having posted in ages. Other things had to take priority. I'm getting back to this and just upgraded to Unity 2017.

I'm having a few issues still.

First and foremost I'm still getting the
Assertion failed: Assertion failed on expression: '!performAutorepaint || GetApplication().MayUpdate()'
UnityEditor.AssetDatabase:SaveAssets()
NoesisPostprocessor:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Assets/NoesisGUI/Plugins/Editor/NoesisPostprocessor.cs:55)
UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets(String[], String[], String[], String[], String[])
error all over the place. What's the deal with this?
I'm going to continue and try and pull over all Caliburn Samples and see where the API problems are.

I also tried using DelegateCommand from the Noesis.Samples since Caliburn Actions don't work yet, but that doesn't seem to do anything at all when I bind it to a Button Command.
I'll have to look into this further but so far... there seem to be still a lot of incompatibilities to WPF.

I'll have to check to see whether it's worth the time to continue this. It seems like everytime either Unity or Noesis updates I can start completely from scratch with this.
 
User avatar
jsantos
Site Admin
Posts: 2955
Joined: 20 Jan 2012, 17:18
Contact:

Re: Caliburn.Micro port issues

28 Sep 2017, 13:29

First and foremost I'm still getting the
Assertion failed: Assertion failed on expression: '!performAutorepaint || GetApplication().MayUpdate()'
UnityEditor.AssetDatabase:SaveAssets()
NoesisPostprocessor:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Assets/NoesisGUI/Plugins/Editor/NoesisPostprocessor.cs:55)
UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets(String[], String[], String[], String[], String[])
error all over the place. What's the deal with this?
When are you getting this? Does it happen with a clean installation of our package?
I also tried using DelegateCommand from the Noesis.Samples since Caliburn Actions don't work yet, but that doesn't seem to do anything at all when I bind it to a Button Command.
One of the examples included in the package (Start menu) is just a bunch of DelegateCommands connected to buttons. Could you please have a look at it?
I'll have to look into this further but so far... there seem to be still a lot of incompatibilities to WPF.
Yes, but less and less with each version. Thanks a lot for your work, please let us know how we can help you.

Who is online

Users browsing this forum: No registered users and 0 guests