[Mono-list] perl script -- alternative?

Jaak Simm jaaksimm@firm.ee
Thu, 18 Apr 2002 10:24:37 +0200


I like the idea.
It would be smart to add following things:
- '[MonoTODO]' in front of the properties/methods/events
- public events
- a summary node for the class
- maybe a possibility to create the property/method/event without [MonoTODO]
and notimplementedexception (so it is ready for implementation).

Looking forward to try it out.

Best,
Jaak

Daniel Carrera wrote:

> I will certainly comply with whatever rules Mono sets.
>
> I have another idea.  Not as useful as the first, but I'm sure it's
> legal:
>
> I can come up with some sort of "markup" that people can type the classes
> into.  It'd be designed to minimize typing.  Then my program would convert
> that markup to the actual stubbs.
>
> I might need help desgning an efficient markup.
> The markup file (in the System.Windows.Forms directory) might be
> something like this:
>
> Daniel Carrera (dcarrera@math.toronto.edu)
> abstract class FileDialog : CommonDialog
>
> public prop [
> bool AddExtension {get set}
> virtual bool CheckFileExists {g s}
> ]
>
> protected methods [
> void Dispose()
> virtual object GetService(Type service)
> ]
>
> >From this my script would generate:
>
> //
> // System.Windows.Forms.FileDialog
> //
> // Author:
> //   stubbed out by Daniel Carrera (dcarrera@math.toronto.edu)
> //
> // (C) 2002 Ximian, Inc
> //
>
> namespace System.Windows.Forms
> {
>         /// <summary>
>         /// ToDo note:
>         ///  - Nothing is implemented
>         /// </summary>
>         public abstract class FileDialog : CommonDialog
>         {
>
>                 //
>                 //  --- Public Properties
>                 //
>                 public bool AddExtension
>                 {
>                        get { throw new NotImplementedException (); }
>                        set { throw new NotImplementedException (); }
>                 }
>                 public virtual bool CheckFileExists
>                 {
>                        get { throw new NotImplementedException (); }
>                        set { throw new NotImplementedException (); }
>                 }
>
>                 //
>                 //  --- Protected Methods
>                 //
>                 protected void Dispose()
>                 {
>                         throw new NotImplementedException ();
>                 }
>                 protected virtual object GetService(Type service)
>                 {
>                         throw new NotImplementedException ();
>                 }
>         }
> }
>
> This is much less powerful than the one I made already.  However, I
> thought that if we have to do 3000 classes it might still be worth it.
>
> Thoughts on this?
>
> Daniel.
>
> On 17 Apr 2002, Miguel de Icaza wrote:
>
> > Manually typing in the stubs, and bug fixing as we go should be fine.
> >
> > Do not attempt to use any automatic mechanisms.
> >
> > Miguel.
> ...
> >
> > We have never copy/pasted code.  I have always used one machine to read
> > the prototypes, and another to type it in (logistically, thats the only
> > way I could do it ;-), which is why you find so many little mistakes in
> > the base classes ;-)
> >
> > Miguel
> >
>
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list