EtoDocumentEditor not accessible on windows GH in v6


(Andrew Heumann) #1

I’m trying to build a cross-platform GH plug-in. It builds nicely on mac under the WIP, but the Grasshopper.Instances.EtoDocumentEditor property is missing on windows. I’m trying to set the owner of an Eto window to be the GH editor - the line of code is this:
HuiWindow.Owner = Grasshopper.Instances.EtoDocumentEditor;

Is there something else I can do, say inside a compile conditional? I tried some stuff with the eto window’s NativeHandle property but couldn’t figure it out. Or, maybe better, can this property be made accessible in a windows build?

paging @curtisw and @DavidRutten :slight_smile:

(David Rutten) #2

Perhaps use dynamic or Reflection to figure out which is available DocumentEditor or EtoDocumentEditor and go from there? It won’t be elegant code but you won’t have to ship different dlls.

(Andrew Heumann) #3

The problem I’m having is I can’t set the Owner property of an Eto Form to a non-eto window (like the Grasshopper.Instances.DocumentEditor). I was trying to figure out how, mucking around with WindowInteropHelper etc but didn’t get anything that worked.