Abdelrazak Younes wrote:
Richard Heck wrote:
Abdelrazak Younes wrote:
Richard Heck wrote:
What follows has to be const_cast<Buffer &>(buffer).dispatch().
No, I want rather to use the global dispatch method. So that would be:
+        lyx::dispatch(FuncRequest(LFUN_BUFFER_CHILD_OPEN,
MSVC chose this one automatically for me but I'll do the change anyway. Thanks.
I also had to add:
   extern void dispatch(FuncRequest const & action);
to get it to compile. This isn't declared in LyX.h for some reason.
That is in LyXFunc.h, I'll fix that too, thanks.
Now that it does compile, I can confirm that...it segfaults. What I send up seeing is a billion calls to getMasterBuffer(). The problem has to do with how parentname is being set. One of my child docs is turning out to be its own parent. This is a consequence of the "inconvenience" we were discussing before, namely, that the active buffer is being reset on each call. If I break in LyXFunc::loadLyXFilename(), I can see that the wrong buffer is being set as parent.
I see. Now that I know all use cases, let me think a bit about it, I'll try to come up with a clean solution during the week-end. Maybe the only clean way is to remove loadLyXFile from LyXView and BufferView altogether.

Thanks for the help and testing.
No problem. One of the things I like about this is the teamwork. And being able to learn from people who've been at it a while.

Richard

--
==================================================================
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==================================================================
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto

Reply via email to