diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-29 22:13:14 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-29 22:13:14 +0100 |
| commit | 2bbceb457f29a1410b99eebbcd42cdb386691b38 (patch) | |
| tree | dfc4556205c31c66fb2b56c2ddf54694c7aa6bc2 /src/ItemTemplate.cs | |
| parent | 8a25a19ee73e8b7c0c9726bbb2ce4ec918f4e905 (diff) | |
crowObjs type search debug, improve type search in ItemTemplate selection
Diffstat (limited to 'src/ItemTemplate.cs')
| -rw-r--r-- | src/ItemTemplate.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ItemTemplate.cs b/src/ItemTemplate.cs index 1f03f7f8..34085d2b 100644 --- a/src/ItemTemplate.cs +++ b/src/ItemTemplate.cs @@ -56,6 +56,19 @@ namespace Crow public void CreateExpandDelegate (TemplatedGroup host){ Type dataType = Type.GetType(strDataType); + if (dataType == null) { + Assembly a = Assembly.GetEntryAssembly (); + foreach (Type expT in a.GetExportedTypes ()) { + if (expT.Name == strDataType) { + dataType = expT; + break; + } + } + } + if (dataType == null) { + Debug.WriteLine ("ItemTemplate error: DataType not found: {0}.", strDataType); + return; + } Type tmpGrpType = typeof(TemplatedGroup); Type evtType = typeof(EventHandler); |