Although time has been limited, I did manage to do some LSharp hacking whilst at TechEd Europe last week.
Microsoft released the .NET Framework Version 3.0 which includes Windows Presentation Foundation (formerly Avalon) technology.
Anyway, to cut a long story short, I’m now running and developing LSharp under Windows Vista RC2. Both Emacs and LSharp seem to run without any problems. The OS is reported as Microsoft Windows NT 6.0.5744.0.
The WPF example is included in subversion under the download directory. See wpf.ls and calc.xaml. You need to compile and run the latest LSharp from Subversion and also install the .NET Framework 3.0 runtime redistributable.
One issue was around the use of STAThread. It seems that WPF requires a single threaded apartment model, so I’ve modified spawn to make this an optional argument.
(reference "presentationcore")
(reference "presentationframework")
(reference "windowsbase")
(reference "system")
(reference "system.xml")
(using "system.windows")
(using "system.io")
(using "system.windows.markup")
;; Load and instantiate objects from a XAML file
(defun load-xaml (filename)
(with (f (new filestream filename (Open FileMode))
element (call load xamlreader f))
(close f)
element))
(defun main()
;; Define a new application
(= app (new application))
;; Define a window based on a XAML Description
(= win (the window
(load-xaml "d:\\code\\lsharp\\lsharp.org\\download\\calc.xaml")))
;; Run the application with the new window
(run app win))
;; WPF Requires [STAThread]
(spawn
(main)
(sta system.threading.apartmentstate))
*The opinions expressed on this site are my own and do not necessarily represent those of Two10degrees or Active Web Solutions Ltd.