picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.58k stars 325 forks source link

Images cannot be bound when using Gtk #312

Closed Jojatekok closed 9 years ago

Jojatekok commented 9 years ago

ImageViewTest.BindDataContext("Image", "SomeImageInMyDataContext"); crashes the application.

cwensley commented 9 years ago

Do you get a stack trace? The details would be helpful.

Thanks!

Jojatekok commented 9 years ago

Yeah, I'll copy it here tomorrow if I don't forget about it ;)

Jojatekok commented 9 years ago

Here is the stack trace:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Object reference not set to an instance of an object
at Eto.GtkSharp.Forms.Controls.ImageViewHandler.set_Image (Eto.Drawing.Image value) [0x00000] in <filename unknown>:0
at Eto.Forms.ImageView.set_Image (Eto.Drawing.Image value) [0x00000] in <filename unknown>:0
at at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MonoProperty.SetValue (System.Object obj, System.Object value, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] index, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.PropertyInfo.SetValue (System.Object obj, System.Object value) [0x00000] in <filename unknown>:0
at Eto.PropertyBinding`1[Eto.Drawing.Image].InternalSetValue (System.Object dataItem, Eto.Drawing.Image value) [0x00000] in <filename unknown>:0
at Eto.IndirectBinding`1[Eto.Drawing.Image].SetValue (System.Object dataItem, Eto.Drawing.Image value) [0x00000] in <filename unknown>:0
at Eto.ObjectBinding`2[Eto.Forms.Control,Eto.Drawing.Image].set_DataValue (Eto.Drawing.Image value) [0x00000] in <filename unknown>:0
at Eto.DualBinding`1[Eto.Drawing.Image].SetDestination () [0x00000] in <filename unknown>:0
at Eto.DualBinding`1[Eto.Drawing.Image]..ctor (Eto.DirectBinding`1 source, Eto.DirectBinding`1 destination, DualBindingMode mode) [0x00000] in <filename unknown>:0
at Eto.ObjectBinding`2[Eto.Forms.Control,Eto.Drawing.Image].Bind (Eto.DirectBinding`1 sourceBinding, DualBindingMode mode) [0x00000] in <filename unknown>:0
at Eto.Forms.ControlBinding`2[Eto.Forms.Control,Eto.Drawing.Image].Bind (Eto.DirectBinding`1 sourceBinding, DualBindingMode mode) [0x00000] in <filename unknown>:0
at Eto.Forms.ControlBinding`2[Eto.Forms.Control,Eto.Drawing.Image].BindDataContext (Eto.IndirectBinding`1 dataContextBinding, DualBindingMode mode, Eto.Drawing.Image defaultControlValue, Eto.Drawing.Image defaultContextValue) [0x00000] in <filename unknown>:0
at Eto.Forms.Control.BindDataContext[Image] (Eto.IndirectBinding`1 controlBinding, Eto.IndirectBinding`1 dataContextBinding, DualBindingMode mode, Eto.Drawing.Image defaultControlValue, Eto.Drawing.Image defaultContextValue) [0x00000] in <filename unknown>:0
at Eto.Forms.Control.BindDataContext[Image] (System.String controlPropertyName, System.String dataContextPropertyName, DualBindingMode mode, Eto.Drawing.Image defaultControlValue, Eto.Drawing.Image defaultContextValue) [0x00000] in <filename unknown>:0
at Jojatekok.MoneroGUI.Desktop.Views.MainForm.StatusBarView..ctor () [0x0005f] in /home/jojatekok/Asztal/MoneroGui.Net-multi-platform/MoneroGui.Net.Desktop/Views/MainForm/StatusBarView.cs:35
at Jojatekok.MoneroGUI.Desktop.Windows.MainForm.RenderContent () [0x00229] in /home/jojatekok/Asztal/MoneroGui.Net-multi-platform/MoneroGui.Net.Desktop/Windows/MainForm.cs:341
at Jojatekok.MoneroGUI.Desktop.Windows.MainForm..ctor () [0x00090] in /home/jojatekok/Asztal/MoneroGui.Net-multi-platform/MoneroGui.Net.Desktop/Windows/MainForm.cs:47
at Jojatekok.MoneroGUI.Desktop.Desktop.Program.Main (System.String[] args) [0x0002e] in /home/jojatekok/Asztal/MoneroGui.Net-multi-platform/MoneroGui.Net.Desktop/Objects/Program.cs:16

By the way, how can I build and deploy a Mac application using Eto.Forms and Xamarin.Mac? I don't really understand how I should pack them along with Mono assemblies, or just simply build an app file.

Jojatekok commented 9 years ago

@cwensley How can I compile Mac applications using Xamarin and Eto.Forms?