AGS Development > Editor Development

AGS.Native cannot compile with latest changes in Editor

(1/1)

Crimson Wizard:
Like said in the topic title, AGS.Native fails to compile after tzachs' changes to folder classes. I discussed that with tzachs couple of months ago, now I want to tell this publicly FYI.

This is not tzachs' fault, but Microsoft's one. Seriously.
This is what I found:
http://connect.microsoft.com/VisualStudio/feedback/details/674944

Basically, if you have a generic class with constraints declared in C#, C++/CLI compiler does not understand it properly and will not let you use any class, based on that generic.
This is reproducible both in MSVS 2008 and 2010. Haven't tried 2012 yet.

I did not want to spend much time on this, so I made a simple workaround by creating a C# FolderHelper class in AGS.Types and moving some AGS.Native code there.
Here's my commit, if anyone's interested: https://github.com/adventuregamestudio/ags/commit/b924c8371ee6858e6034587c53154b35001647a3


One more thing, partially related to this. I noticed that IViewFolder interface defines SubFolders member of ViewFolder type (not IViewFolder!). I do not know why this was made so, but IMO putting objects of derived class to interface defeats the purpose of interface.

Navigation

[0] Message Index

Go to full version