BUGS: 2020-03-15 MagicByteOffset never ACTUALLY GETS SET ANYWHERE 2019-10-13 TODO: Figure out why after showing a dialog, then closing it dialogs stop responding with GTK_IS_WINDOW assertion failed 2019-09-10 1. When opening a file over MTP via command line System.IO.DirectoryNotFoundException: Could not find a part of the path "/home/beckermj/Documents/Projects/UniversalEditor/CSharp/Output/Debug/mtp:/KYOCERA_KYOCERA_Android_524700024001/Internal%20shared%20storage/Android/data/com.android.providers.media/albumthumbs/1556075497435". This is because we do not currently support loading from MTP. We need to build an MTPAccessor and set the schema to "mtp" in order to parse this type of URL. 2. When opening an existing file via command line, System.NullReferenceException: Object reference not set to an instance of an object at UniversalWidgetToolkit.Engines.GTK.Controls.DockingContainerImplementation.GetCurrentItem () [0x00007] in :0 The following had to be removed from UE v4.0c to compile with IL2CPU... /// /// Reads an array of items of the specified type from the current stream. /// /// The data type of the items to read. /// The number of items to read. /// public T[] ReadObjectArray(int count) { List objects = new List(); for (int i = 0; i < count; i++) { objects.Add((T)ReadObject(typeof(T))); } return objects.ToArray(); } public T[] ReadStructArray (int count) where T: struct { System.Collections.Generic.List ts = new System.Collections.Generic.List (); for (int i = 0; i < count; i++) { T obj = ReadStruct (); ts.Add (obj); } return ts.ToArray (); } // TODO: ReadStruct needs to be fixed. It has a lot of problems. public T ReadStruct () where T : struct { Type objectType = typeof(T); object value = objectType.Assembly.CreateInstance (objectType.FullName); System.Reflection.FieldInfo[] fis = (objectType.GetFields (System.Reflection.BindingFlags.Default | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance)); foreach (System.Reflection.FieldInfo fi in fis) { Type fieldType = fi.FieldType; object fieldValue = ReadObject (fieldType); fi.SetValue (value, fieldValue); } return (T)value; } public T ReadObject () where T : class { Type objectType = typeof(T); T value = (T)objectType.Assembly.CreateInstance (objectType.FullName); System.Reflection.FieldInfo[] fis = (objectType.GetFields (System.Reflection.BindingFlags.Default | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance)); foreach (System.Reflection.FieldInfo fi in fis) { Type fieldType = fi.FieldType; object fieldValue = ReadObject(fieldType); fi.SetValue (value, fieldValue); } return value; } public object ReadObject(Type objectType) { if (objectType == typeof(Byte)) { return ReadByte(); } else if (objectType == typeof(SByte)) { return ReadSByte(); } else if (objectType == typeof(String)) { return ReadLengthPrefixedString(); } else if (objectType == typeof(Char)) { return ReadChar(); } else if (objectType == typeof(Char[])) { } else if (objectType == typeof(Single)) { return ReadSingle(); } else if (objectType == typeof(Double)) { return ReadDouble(); } else if (objectType == typeof(Int16)) { return ReadInt16(); } else if (objectType == typeof(Int32)) { return ReadInt32(); } else if (objectType == typeof(Int64)) { return ReadInt64(); } else if (objectType == typeof(UInt16)) { return ReadUInt16(); } else if (objectType == typeof(UInt32)) { return ReadUInt32(); } else if (objectType == typeof(UInt64)) { return ReadInt64(); } else if (objectType == typeof(DateTime)) { return ReadDateTime(); } object value = objectType.Assembly.CreateInstance (objectType.FullName); System.Reflection.FieldInfo[] fis = (objectType.GetFields (System.Reflection.BindingFlags.Default | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance)); foreach (System.Reflection.FieldInfo fi in fis) { Type fieldType = fi.FieldType; object fieldValue = ReadObject (fieldType); fi.SetValue (value, fieldValue); } return value; }