[Cocoa-sharp] Patch for TableColumn

Edward Carr ecarr at lightshipinc.com
Sun Sep 10 01:05:40 EDT 2006


One bug that I found occurs in the TableColumn class. Note the following
code the way it exists today:

public Cocoa.Object Identifier {
	get {
		return (Cocoa.Object) Native.NativeToManaged ((IntPtr)
ObjCMessaging.objc_msgSend (NativeObject, "identifier", typeof (IntPtr)));
	}
}

If your identifier is a string, the call to objc_msgSend will return you a
pointer to a Cocoa.String object. Calling the NativeToManager however, will
convert this from a Cocoa.String to a System.String. Therefore, we will want
to change the return value for Identifer to be System.Object.

Edward Carr

-----Original Message-----
From: C.J. Adams-Collier [mailto:cjcollier at colliertech.org] 
Sent: Friday, September 08, 2006 10:46 AM
To: Edward Carr
Cc: 'Martyn West'; cocoa-sharp at lists.ximian.com
Subject: Re: [Cocoa-sharp] Cocoa-sharp Digest, Vol 16, Issue 1

On Fri, 2006-08-09 at 10:07 -0400, Edward Carr wrote:
> Martyn,
> 
> Other than struggling with the Mac getting it to do what I want it to do,
> things are coming along very nicely. I'm using .NET 2.0 to develop
reusable
> business logic libraries under both Windows and the Mac. These work great;
> I'm impressed with how far Mono has come along.
> 
> Unfortunately, I'm doing a lot of UI work under the Mac which has required
> that I extend the Cocoa# library. I've had to create about 12 new Cocoa#
> classes, which I would like to add to the Cocoa# library itself.

Please submit a patch and unit test to this list.  I'll see that it gets
in if all tests pass.

> I also had
> to fix a bug with one of the Cocoa# libraries, only to find that I
couldn't
> build the library. So right now, my Mac UI code has quite a few calls to
the
> ObjectiveC wrapper classes, since you can't extend the Cocoa# classes
> directly with the same name, and expect to get the correct instance of the
> object when calling an ObjectiveC method.
> 
> Other than the messiness of the UI code on the Mac, I am happy with using
> Mono on the Mac with Cocoa#. The Cocoa# library itself is pretty much in
its
> infancy and requires a bit of work, but enough of the core functionality
is
> there that I'm confident in using it at this point.

This is great news.  Nice to have user report!

> I haven't seen forms closing themselves without some sort of ObjectiveC
> exception occurring. Unfortunately, trying to trap these has been a huge
> pain in the butt, so I've put each method within an exception handler, and
> wrote any exceptions straight out to a file. This has allowed me to find
UI
> issues that don't behave the way I expected them to.

Can you write an example?  This would be invaluable for new users.

> Edward Carr

Cheers,

C.J.

> -----Original Message-----
> From: cocoa-sharp-bounces at lists.ximian.com
> [mailto:cocoa-sharp-bounces at lists.ximian.com] On Behalf Of Martyn West
> Sent: Friday, September 08, 2006 5:51 AM
> To: cocoa-sharp at lists.ximian.com
> Subject: Re: [Cocoa-sharp] Cocoa-sharp Digest, Vol 16, Issue 1
> 
> I'm having problems building Cocoa# aswell (the version from SVN too). 
> I get: You need to install mono>-1.1.9
> 
> I have mono 1.1.17.1 installed. Is something out of date?
> 
> 
> Am just starting a large cross-platform desktop application and really
need
> to get the strategy sorted for OS X.
> The Windows one is a .NET 2.0 GUI talking to a .NET 1.1 framework which is
> coming along nicely.
> 
> The original idea was to use Mono and Cocoa# but initial investigations
were
> not promising - like forms closing themselves after receiving a second
> event...
> Current plan is to write Objective-C frontend and use ObjC# but there's no
> docs or anything so is proving difficult.
> 
> Has anyone actually written anything for the Mac in .NET that's stable?
> 
> Cheers,
> Martyn
>  
> 
> -----Original Message-----
> From: cocoa-sharp-bounces at lists.ximian.com
> [mailto:cocoa-sharp-bounces at lists.ximian.com] On Behalf Of
> cocoa-sharp-request at lists.ximian.com
> Sent: 06 September 2006 17:00
> To: cocoa-sharp at lists.ximian.com
> Subject: Cocoa-sharp Digest, Vol 16, Issue 1
> 
> Send Cocoa-sharp mailing list submissions to
> 	cocoa-sharp at lists.ximian.com
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.ximian.com/mailman/listinfo/cocoa-sharp
> or, via email, send a message with subject or body 'help' to
> 	cocoa-sharp-request at lists.ximian.com
> 
> You can reach the person managing the list at
> 	cocoa-sharp-owner at lists.ximian.com
> 
> When replying, please edit your Subject line so it is more specific than
> "Re: Contents of Cocoa-sharp digest..."
> 
> 
> Today's Topics:
> 
>    1. Compiling Cocoa# (Edward Carr)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Wed, 06 Sep 2006 10:17:56 -0400
> From: "Edward Carr" <ecarr at lightshipinc.com>
> Subject: [Cocoa-sharp] Compiling Cocoa#
> To: <cocoa-sharp at lists.ximian.com>
> Message-ID: <001601c6d1bf$46796f40$0202a8c0 at atlantic2k.private>
> Content-Type: text/plain; charset="us-ascii"
> 
> I'm having problems compiling Cocoa# under Mono 1.1.17.1 on the Macintosh.
I
> had the same problem compiling with Mono 1.1.16 as well. If I attempt to
> build it, I get the following error:
> 
>  
> 
> Mach.cs(161,18): error CS0131: The left-hand side of an assignment or
> mutating operation must be a variable, property or indexer
> 
>  
> 
> I found one reference to this issue on the web at
>
http://www.mail-archive.com/fink-beginners@lists.sourceforge.net/msg18924.ht
> ml which lists it as an issue with Fink. However, I'm not using Fink.
> 
>  
> 
> If I compile the code under Microsoft Visual Studio 2005, I don't get a
> compilation error, so I'm wondering if the issue is more with Mono than
with
> Cocoa#.
> 
>  
> 
> Any help would be appreciated. Thank you.
> 
>  
> 
> Edward Carr
> 
>  
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
>
http://lists.ximian.com/pipermail/cocoa-sharp/attachments/20060906/9357804d/
> attachment-0001.html 
> 
> ------------------------------
> 
> _______________________________________________
> Cocoa-sharp mailing list
> Cocoa-sharp at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/cocoa-sharp
> 
> 
> End of Cocoa-sharp Digest, Vol 16, Issue 1
> ******************************************
> 
> _______________________________________________
> Cocoa-sharp mailing list
> Cocoa-sharp at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/cocoa-sharp
> 
> 
> _______________________________________________
> Cocoa-sharp mailing list
> Cocoa-sharp at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/cocoa-sharp
> 




More information about the Cocoa-sharp mailing list