[Mono-bugs] [Bug 545988] New: ImageView.Drawstring() Methods causes exception.
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sat Oct 10 10:05:45 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=545988
Summary: ImageView.Drawstring() Methods causes exception.
Classification: Mono
Product: MonoTouch
Version: unspecified
Platform: x86
OS/Version: Mac OS X 10.6
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Class Libraries
AssignedTo: gnorton at novell.com
ReportedBy: Jochenvanwylick at hotmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
I'm not able to draw on an ImageView object. Everytime I use the DrawString
method - I get a exception every time.
Recreate - do this:
1. Create a new Monotouch solution
2. Hook up a view - add a UIImageView to this view
3. Create outlet for this view - let's say ImageOutlet
4. Use this line of code: this.ImageOutlet.DrawString("test",new
RectangleF(0,0,10,10));
5. Compile & run
Exception text:
2009-10-10 16:04:17.130 BugProject[658:207] *** -[NSCFString drawInRect:]:
unrecognized selector sent to instance 0x3c55090
Unhandled Exception: MonoTouch.Foundation.MonoTouchException: Objective-C
exception thrown. Name: NSInvalidArgumentException Reason: *** -[NSCFString
drawInRect:]: unrecognized selector sent to instance 0x3c55090
at (wrapper managed-to-native)
MonoTouch.ObjCRuntime.Messaging:void_objc_msgSend_RectangleF
(intptr,intptr,System.Drawing.RectangleF)
at MonoTouch.UIKit.UIView.DrawString (System.String str, RectangleF rect)
[0x00000]
at BugProject.AppDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication
app, MonoTouch.Foundation.NSDictionary options) [0x00026] in
/Users/ntry/Projects/BugProject/BugProject/Main.cs:28
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 BugProject.Application.Main (System.String[] args) [0x00000] in
/Users/ntry/Projects/BugProject/BugProject/Main.cs:15
Code that causes problems:
window.MakeKeyAndVisible ();
RectangleF r = new RectangleF(0,0,100,100);
this.ImageOutlet.DrawString("test",new RectangleF(0,0,10,10));
UIImageView newImage = new UIImageView();;
window.AddSubview (VIEW);
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list