[Mono-list] perl script -- alternative?

Daniel Carrera dcarrera@math.toronto.edu
Wed, 17 Apr 2002 22:06:05 -0400 (EDT)


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
>