I have created list activity that simply queries a data store for objects and then displays the object's name in the list. the data store is wrapped with a repository (IRepository<T>) and the objects that i am querying all implement a common interface, IEntity (that has the "Name" property.) I was using a string property from the activity's intent to decide which entity's repository to query, but decided to try making the activity itself generic so as to remove the property from the intent like so...
[Activity (Label = "@string/lookupLabel",Theme="@android:style/Theme.Dialog")] public class LookupActivity<TEntity> : ListActivity where TEntity : IEntity {} so then my main activity invokes this activity like so... StartActivity(typeof(LookupActivity<AmpachePlaylist>)); but actually invoking this generic activity fails on the device, so is a generic activity supported in Android, supported in M4A, or a bug in M4A? below is the stack trace from StartActivity E/mono ( 857): Unhandled Exception: System.InvalidProgramException: Invalid IL code in (wrapper dynamic-method) object:609b572c-c6b1-408c-b6b4-4664f81a05e4 (intptr,object[]): IL_0018: call 0x00000009 E/mono ( 857): E/mono ( 857): E/mono ( 857): at System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, Boolean throwOnBindFailure, Boolean allowClosed) [0x00000] in <filename unknown>:0 E/mono ( 857): at System.Delegate.CreateDelegate (System.Type type, System.Reflection.MethodInfo method, Boolean throwOnBindFailure) [0x00000] in <filename unknown>:0 E/mono ( 857): at System.Delegate.CreateDelegate (System.Type type, System.Reflection.MethodInfo method) [0x00000] in <filename unknown>:0 E/mono ( 857): at System.Reflection.Emit.DynamicMethod.CreateDelegate (System.Type delegateType) [0x00000] in <filename unknown>:0 E/mono ( 857): at Android.Runtime.ConstructorBuilder.CreateDelegate (System.Type type, System.Reflection.ConstructorInfo cinfo, System.Type[] parameter_types) [0x00000] in <filename unknown>:0 E/mono ( 857): at Android.Runtime.TypeManager.n_Activate _______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid