/// </summary>\r
public virtual void RegisterForRedraw ()\r
{\r
- TopContainer.gobjsToRedraw.Add (this);\r
+ if (TopContainer != null)\r
+ TopContainer.gobjsToRedraw.Add (this);\r
}\r
\r
/// <summary>\r
/// <summary> trigger dependant sizing component update </summary>\r
protected virtual void OnLayoutChanges(LayoutingType layoutType)\r
{\r
+ if (Parent==null)\r
+ return;\r
+ \r
switch (layoutType) {\r
case LayoutingType.Width: \r
if (Parent.getBounds ().Width < 0)\r
string root = "Object";
Stream stream = GetStreamFromPath (path);
+ if (stream == null)
+ throw new FileNotFoundException ("GOML file not found", path);
+
using (XmlReader reader = XmlReader.Create (stream)) {
while (reader.Read()) {
// first element is the root element