[Mono-list] Windows Forms...wah

Tum tum@veridicus.com
Sun, 22 Sep 2002 03:36:06 +1200


*sigh*

Are you trying to say that all your list boxes are populated with static
data?  Doesn't the data for the list box come from somewhere?  Don't you
store the data the list box contains in your own array?

Usually people have some arrangement like this:

ArrayList myCustomerNames;

...

// Now populate the listbox with myCustomerNames.

foreach (string s in myCustomerNames)
{
   listbox.Add(s);
}

As you can see, both the myCustomerNames list and the listbox contain
the customer names.

MVC solves this problem.

No decent programmer stores the only copy of his data in the UI
controls.

::Tum

> -----Original Message-----
> From: mono-list-admin@ximian.com [mailto:mono-list-admin@ximian.com]
On
> Behalf Of fssc
> Sent: Saturday, 21 September 2002 2:29 p.m.
> To: mono-list
> Subject: Re: [Mono-list] Windows Forms...wah
> 
> 
> I don't quite understand why the data is stored twice in a non-explict
MCV
> model? If I populate a list box using the items property in one of the
> commerical toolboxes, as far as I know there is only one copy of the
data.
> 
> H
> ----- Original Message -----
> From: "Tum" <tum@veridicus.com>
> To: "'fssc'" <hsauro@fssc.demon.co.uk>; "'mono-list'" <mono-
> list@ximian.com>
> Sent: Saturday, September 21, 2002 1:39 AM
> Subject: RE: [Mono-list] Windows Forms...wah
> 
> 
> > Adding an items
> > > property to a list box is not that bad is it? You still get your
MVC.
> > >
> >
> > Yes it is.  Because this would still mean data needlessly be stored
> > twice.
> >
> > I gave you several code examples of how an MVC model would not need
to
> > require any extra code or work for VB/Delphi etc programmers.
> > How is adding items to a StringListModel any more difficult than
adding
> > it to a ListBox?
> >
> > ::Tum
> >
> >
> 
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list