Hi all,
In brief:
Attempting a minimal Windows Presentation Foundation application using the RDNZL 0.13.3 tarball and LispWorks Personal 5.1.1 resulted in a "The calling thread must be STA" error. Using a copy of rdnzl.dll built in Visual Studio C++ 2010 Express eliminated the error. Does rdnzl.tar.gz contain an old(er) build of rdnzl.dll, or is there something else at work?
In detail:
After appropriate calls to "import-assembly", "use-namespace", etc., I tried the following, and got the subsequent error:
RDNZL-USER 9 > (let* ((win (new "Window")) (app (new "Application"))) (setf [%Height win] 300) (setf [%Width win] 300) [Run app win])
Error: .NET error (System.InvalidOperationException): The calling thread must be STA, because many UI components require this. 1 (abort) Return to level 0. 2 Return to top loop level 0.
Type :b for backtrace, :c <option number> to proceed, or :? for other options
I downloaded the current rdnzl-cpp tarball, and grepped for threading, finding
RDNZL\RDNZL.vcxproj: <CLRThreadAttribute>STAThreadingAttribute</CLRThreadAttribute> RDNZL\Stdafx.cpp: System::Threading::Thread::CurrentThread->ApartmentState = System::Threading::ApartmentState::STA;
Having no idea how to go about debugging the problem directly, I took a shot in the dark and built the DLL in Visual Studio C++ 2010 Express. It built fine. I replaced the existing rdnzl.dll and tried again: it worked perfectly!
Let me know if I can provide any additional details.
Thanks,
Walter