From: David W. <da...@dt...> - 2005-02-01 13:55:49
|
Hi! We are a group of students at Chalmers doing a project with the aim of building an IDE for Haskell written in Haskell. We would like to use the Scintilla widget together with wxHaskell to do this, so now we are trying to make a proper wxHaskell binding for Scintilla. Any advice on how to do this would be really appreciated. More specifically, we are struggling with the problem of how to design the event handling. Should it be done via the event handler system of wxcore or should we roll on our own stuff? The backend of wxcore is a pretty complicated beast, but using it would mean not having to do that much hacking in wxdirect. Atleast that's what we think. If someone with more insight would like to comment we would be really happy. We have tried to contact Daan Leijen, but he seems to be a busy man :) David Waern |
From: Daan L. <da...@cs...> - 2005-02-07 10:47:25
|
David Waern wrote: > be really happy. We have tried to contact Daan Leijen, but he seems to be > a busy man :) Hi David, Well, I was mostly busy with my snowboard in the French Alps the past week :-) Sorry for not replying earlier. > We are a group of students at Chalmers doing a project with the aim of > building an IDE for Haskell written in Haskell. We would like to use > the Scintilla widget together with wxHaskell to do this, so now we are > trying to make a proper wxHaskell binding for Scintilla. It is a long-time wish for me to have the scintilla control as part of wxHaskell and it would be great if someone would do this! The scintilla editor is really a great tool. Anyway, I see two problems, uhh, challenges I mean: 1) The component uses its own protocol to call methods 2) The component uses its own protocol to send events So, first of all, I think it is necessary for you to run a basic C++ wxWidgets sample with wxScintilla. Next, you need to somehow make a "C" wrapper (in wxc) for some scintilla methods and add the signatures to the "wxc.h" header file (so they get marshalled by wxDirect). Furthermore, I think it would be much better if you use the wxWidgets standard event model. Actually, you can see how you can make custom events by looking at the "wxcHtmlEvent" class in the "wxc/src/extra.cpp" file (this is all a bit of mess, so carefully navigate aroung :-) Well, I hope this helps you to get started, feel free to write to me personally to get more help -- I would really like to see scintilla as part of wxHaskell. -- Daan. |