[Mono-bugs] [Bug 537249] New: Set Method not found when using reflection to set object properties
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Sep 7 15:42:19 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=537249
Summary: Set Method not found when using reflection to set
object properties
Classification: Mono
Product: MonoTouch
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: Blocker
Priority: P5 - None
Component: Runtime
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: fak at kruegersystems.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Created an attachment (id=317100)
--> (http://bugzilla.novell.com/attachment.cgi?id=317100)
Project file
Description of Problem:
An exception is thrown when attempting to set a property using PropertyInfo.
(Probably because the linker strips it out.)
Steps to reproduce the problem:
1. Load the attached project
2. Run it
Note the function "WorkAroundBugs" in Main.cs. You can uncomment those lines to
see this execute correctly.
Actual Results:
Executing CREATE TABLE User(Id int, Name varchar(50));
Executing INSERT INTO User(Id, Name) VALUES(1, 'Foo');
Executing INSERT INTO User(Id, Name) VALUES(2, 'Bar');
Unhandled Exception: System.ArgumentException: Set Method not found for 'Id'
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]
at System.Reflection.PropertyInfo.SetValue (System.Object obj, System.Object
value, System.Object[] index) [0x00000]
at SQLiteClient.SQLiteCommand+<ExecuteQuery>c__Iterator0`1[Db.User].MoveNext
() [0x00000]
at Db.AppDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication app,
MonoTouch.Foundation.NSDictionary options) [0x00000]
at (wrapper managed-to-native)
MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String
principalClassName, System.String delegateClassName) [0x00000]
at MonoTouch.UIKit.UIApplication.Main (System.String[] args) [0x00000]
at Db.Application.Main (System.String[] args) [0x00000]
Expected Results:
1: Foo
2: Bar
Executing CREATE TABLE User(Id int, Name varchar(50));
Executing INSERT INTO User(Id, Name) VALUES(1, 'Foo');
Executing INSERT INTO User(Id, Name) VALUES(2, 'Bar');
The query returns all the data.
How often does this happen?
Always
Additional Information:
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list