Bug 2776 - provide default implementations for datasources and delegates
Summary: provide default implementations for datasources and delegates
Status: RESOLVED ANSWERED
Alias: None
Product: MonoMac
Classification: Desktop
Component: Bindings ()
Version: unspecified
Hardware: Macintosh Mac OS
: Lowest enhancement
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-01-08 14:06 UTC by Matthias Fuchs
Modified: 2015-02-12 13:32 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Matthias Fuchs 2012-01-08 14:06:28 UTC
It's pretty hard for a .NET experienced programmer completely new to Cocoa and MonoMac to implement a simple program using data table because there is no ".NET" way of filling the NSTableView.
To simply add a row with 2 columns you have to implement several methods for the delegate and datasource ...

I'm used to have Columns and Rows properties that allow to easily fill a control with data. The NSTableView per default does nothing an cannot even be statically filled with content in Interface Designer.

It's clear that the cocoa way of doing things allow more flexibility but on the other hand it's more work in all cases.

It would be nice to combine the two ways and provide a default implementation for the delegate and datasource that can be overridden by custom implementations.

This could also be done by providing an "NSExtendedTableView" that extends or transforms the NSTableView API to a more .NET like API (e.g. providing Rows, Columns properties etc ...)

This would also be nice for all other widgets, e.g. Buttons (rename the StringValue property to Text etc ...).
Comment 1 Miguel de Icaza [MSFT] 2012-01-13 15:50:53 UTC
We do not currently plan on changing the API binding for NSTableView.

The ideal fix is to create a layer on top of it, something like MonoTouch.Dialog that provides a simpler API on top of it.

As for Buttons and "Text", I agree, it would be nice.   But someone needs to survey every widget and make a proposal of those changes.   This should be discussed on the mailing list, but feel free to attach a proposal here.

Feel free to reopen the bug once you have surveyed every control that needs to expose an alias for StringValue (I do agree it woudl be nice).
Comment 2 Timothy Risi 2015-02-12 13:32:18 UTC
The new protocol support in Unified makes combining delegate and data source
more possible now if you want to go that route