From: <EFu...@ne...> - 2005-07-22 17:30:49
|
Hello, "Daan Leijen" <t-...@mi...> wrote: > This function expects a >"wxClosure" as an argument. These "wxClosure"'s are the way to connect >Common Lisp to the wx world. WxWidget events will call back on >wxClosure's into the Lisp world. > When an object is destroyed, it calls on its >listening wxClosures with a NULL event object. This also happens for the >closure that you pass to "ELJAPP_initializeC" -- ie. you would call the >initalize function with a closure this is only fired once with a NULL >event -- and you use this to run the LISP initialization that will >create windows etc. and install further event handlers on the frames. >This means that you hand over control to wxWidgets -- only being in LISP >land when an event is triggered. Thanks for the help once again. I am now able to use some of the baseic functionalities, of wxC from lisp, but I am running into two issues. 1. In my initialization function, I am not registering for any events, and I am running just few basic bitmap related functions, they all work fine. But when the initialization function finishes, my lisp ends unceremoniously , is this due to the code? " return wxApp::OnExit();" Does it causes the lisp to terminate? How can I avoid this problem? 2. When I try to just create a frame in init function, (again without registering for any events), the lisp connection dies midway. Am I doing anything wrong here? Thanks for your time and answer. -- Surendra Singhi http://www.public.asu.edu/~sksinghi/index.htm __________________________________________________________________ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp |
From: <EFu...@ne...> - 2005-07-27 04:55:54
Attachments:
image-file.cpp
wxc-msw2.4.2-0.9.4.dll
|
Hello Daan, Thanks for your help. I was indeed making mistake in the function calling convention, once I fixed that, I was able to use many functions without lisp terminating abruptly. But, another problem which I am still facing is that I am still not ablr to create frames. As you suggested, I tried writing a C++ program, but even that doesn't work. I am attaching the c++ program (its pretty short) and the wxHaskell dll file which I am using. If you get time then please look into it. And point out, if I am making any mistake. Thanks for your time. I really appreciate your help. P.S.- Do you want me to CC you when I send the emails? -- Surendra Singhi http://www.public.asu.edu/~sksinghi/index.htm __________________________________________________________________ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp |
From: Daan L. <da...@cs...> - 2005-07-23 04:18:56
|
Dear Surendra, > Thanks for the help once again. I am now able to use some of the baseic functionalities, of wxC from lisp, but I am running into two issues. > > 1. In my initialization function, I am not registering for any events, and I am running just few basic bitmap related functions, they all work fine. But when the initialization function finishes, my lisp ends unceremoniously , is this due to the code? > " return wxApp::OnExit();" > > Does it causes the lisp to terminate? How can I avoid this problem? No, in principle the function would just return immediately. > > 2. When I try to just create a frame in init function, (again without registering for any events), the lisp connection dies midway. Am I doing anything wrong here? > This is not the correct behaviour :-) The most obvious issue is related to static intializer in the wxWidgets library. First of all, execute the lisp code from a compiled program and see what happens. -- Daan (explanation: the wxWidgets library initializes static variables at dll load time and doesn't reset them properly after OnExit. This means that an interpreter could only use the main loop once -- the next time it would find the static variables in an inconsistent state.) > Thanks for your time and answer. |