Re: [Cvslog] lyx-devel/src/frontends/xforms

2001-03-16 Thread John Levon

On Fri, 16 Mar 2001 [EMAIL PROTECTED] wrote:

> Update of /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms
> In directory baywatch.lyx.org:/tmp/cvs-serv29891/src/frontends/xforms
> 
> Modified Files:
>   ChangeLog FormMaths.C 
> Log Message:
> compilation fixes

so whenever I use stringstream I have to use str().c_str() to get the
string out in the case of using lyxstring right ?

Any other lyxstring incompatibilities I should be aware of ??

thanks
john

-- 
"You lose it if you talk about it."
- Ernest Hemingway




Re: [Cvslog] lyx-devel/src/frontends/xforms

2001-03-16 Thread Jean-Marc Lasgouttes

> "John" == John Levon <[EMAIL PROTECTED]> writes:

John> so whenever I use stringstream I have to use str().c_str() to
John> get the string out in the case of using lyxstring right ?

It is for the ugly case where one uses lyxstring in general (which I
am forced to do under tru64 because the linker does not like the long
identifiers produced by basic_string) but the STL does have a sstream
(which of course uses real string). As you can see, a rather special
case.

However, we have to do this for now, but the nice part is that it will
be easy to remove if we find a better solution.

John> Any other lyxstring incompatibilities I should be aware of ??

Not that I know of. Anyway, I compile often with cxx, and do not
really mind doing these occasional compilation fixes.

JMarc



Re: [Cvslog] lyx-devel/src/frontends/xforms

2001-03-16 Thread John Levon

On Fri, 16 Mar 2001 [EMAIL PROTECTED] wrote:

> Update of /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms
> In directory baywatch.lyx.org:/tmp/cvs-serv29983/src/frontends/xforms
> 
> Modified Files:
>   ChangeLog FormBaseDeprecated.C FormMaths.C FormMaths.h 
>   form_maths.C form_maths.h 
> Log Message:
> math panel cleanup. LyX no longer crashes on "Close"ing the math panel, but
> still does on exit from LyX if the math panel has been opened.

This was not checking for form && form->visible in the WMHideCB ?? Odd that it
didn't happen at home ...

is the other one my bug was well ?

Also, why did you move most of the callback logic into member functions ? How
is this better ? It just looks like more lines of code to me !

And why move the static chars up to the top of the file ? I would prefer them
near their actual use personally (even better is to not have them at all of course)

thanks
john

-- 
"You lose it if you talk about it."
- Ernest Hemingway




Re: [Cvslog] lyx-devel/src/frontends/xforms

2001-03-16 Thread Angus Leeming

On Friday 16 March 2001 15:29, John Levon wrote:
> On Fri, 16 Mar 2001 [EMAIL PROTECTED] wrote:
 
> This was not checking for form && form->visible in the WMHideCB ?? 
> Odd that it didn't happen at home ...

No. This was me. FormMaths ultimately derives from FormBaseDeprecated, not 
FormBase anymore. Since the close button sent a calback to 
C_FormBaseCancelCB, this resulted in a pile of rubbish!

> is the other one my bug was well ?
Who knows!

> Also, why did you move most of the callback logic into member functions ?
> How is this better ? It just looks like more lines of code to me !

The extern "C" callbacks are meant to be very simple wrappers for "real" C++ 
functions. In the past we did this with a macro, but that buggered up Lars' 
debugger. The principle behind the macros is still valid, however.

Basically, we need them because xforms is written in C but that doesn't mean 
we like them!

Anyway, the methods are not static, so you get rid of all that form->xyz 
stuff.

> And why move the static chars up to the top of the file ? 
> I would prefer them near their actual use personally (even better is to 
> not have them at all of course)

I was just trying to get the thing to compile. Put them where you like.

Angus



Re: [Cvslog] lyx-devel/src/frontends/xforms

2001-03-18 Thread Allan Rae

On Fri, 16 Mar 2001, Angus Leeming wrote:
> The extern "C" callbacks are meant to be very simple wrappers for "real" C++
> functions. In the past we did this with a macro, but that buggered up Lars'
> debugger. The principle behind the macros is still valid, however.

Ahh!  Now I finally know what happened to my lovely macros!

Lars' should have gotten a better debugger ;-)

Allan. (ARRae)




Re: [Cvslog] lyx-devel/src/frontends/xforms

2001-03-18 Thread Lars Gullik Bjønnes

Allan Rae <[EMAIL PROTECTED]> writes:

| On Fri, 16 Mar 2001, Angus Leeming wrote:
| > The extern "C" callbacks are meant to be very simple wrappers for "real" C++
| > functions. In the past we did this with a macro, but that buggered up Lars'
| > debugger. The principle behind the macros is still valid, however.
| 
| Ahh!  Now I finally know what happened to my lovely macros!
| 
| Lars' should have gotten a better debugger ;-)

I can't say that I remember deleteing them...

but I am strongly against macros that generate code and/or take
arguments. (even if I see that they sometimes are useful)

And if you need to generate code, do that with m4 or a similar tool,
not with the preprocessor.

Lgb



Re: [Cvslog] lyx-devel/src/frontends/xforms

2001-03-18 Thread Allan Rae

On 19 Mar 2001, Lars Gullik Bjønnes wrote:

> Allan Rae <[EMAIL PROTECTED]> writes:
>
> | On Fri, 16 Mar 2001, Angus Leeming wrote:
> | > The extern "C" callbacks are meant to be very simple wrappers for "real" C++
> | > functions. In the past we did this with a macro, but that buggered up Lars'
> | > debugger. The principle behind the macros is still valid, however.
> |
> | Ahh!  Now I finally know what happened to my lovely macros!
> |
> | Lars' should have gotten a better debugger ;-)
>
> I can't say that I remember deleteing them...
>
> but I am strongly against macros that generate code and/or take
> arguments. (even if I see that they sometimes are useful)

spoil sport :P

> And if you need to generate code, do that with m4 or a similar tool,
> not with the preprocessor.

Cool!  Something else to play with.  Maybe we could use m4 to generate the
dialogs?  :P

Allan. (ARRae)




Re: [Cvslog] lyx-devel/src/frontends/xforms

2001-03-30 Thread John Levon

On Fri, 30 Mar 2001 [EMAIL PROTECTED] wrote:

> Update of /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms
> In directory baywatch.lyx.org:/tmp/cvs-serv17815/frontends/xforms
> 
> Modified Files:
>   ChangeLog FormCitation.C FormExternal.C form_citation.C 
>   form_external.C form_external.h 
> Log Message:
> Squashed bugs in Citation and (I hope) External Material popups. Could
> people please check this one more time...

nope :(

edit/view coredumps because insetexternal.view is not set. I suppose
you need to add a copy c-tor or operator= for InsetExternal :/

also, changing parameters and file entry still doesn't enable OK/Apply.

john

by the way, you can easily test it yourself by adding a template to the
templates file ...

-- 
"Nothing would please me more than being able to hire ten programmers and 
 deluge the hobby market with good software."
- Bill Gates