[Mono-list] How to select a GUI implementation?

J. Perkins jason@379.com
Fri, 16 May 2003 14:00:29 -0400


Jonathan raises some good points. Does Mono have a .config file for 
system settings? Perhaps we could have an ordered list of GUI 
implementations, which an advanced user could change. The package 
builders could provide a list for the target platform (for example, the 
RH RPMS could specify Gtk, then Qt, then Wine perhaps, the Windows 
installer would just use a Win32 implementation). That would be more 
foolproof I think, since it allows for a fallback behavior in case the 
preferred toolkit isn't available, and it would not require any changes 
to the current build system.

Also, we should probably throw a NotImplementedException if no 
implementation is available for the current system.

Jason
379


Jonathan Pryor wrote:
> Type Reflector has two levels of support: compile-time and run-time.  By
> default, all front-ends are built.  If this fails (due to missing
> assemblies, e.g. Gtk# isn't installed), it'll fall-back and attempt to
> rebuild with a different set of front-ends.  The problem with this
> approach is it could result in a combinatoric explosion of build
> choices, but with only 2 "optional" front-ends (SWF & Gtk#) this isn't
> too bad.
> 
> The next level is run-time selection.  Type Reflector uses an
> application configuration file (type-reflector.exe.config) which has an
> <appSettings/> tag, which contains a "displayer-order" key.  This key
> contains an ordering (space-delimited) of the front-ends to try to use. 
> An environment variable could be used instead.  At runtime, each entry
> is instantiated; the first displayer that instantiates is the one that
> is used.  This permits all GUI front-ends to fail, resulting in console
> output.