Compiling with compaq cxx

2001-03-16 Thread Jean-Marc Lasgouttes


When I compile latest cvs with cxx, I get lots of

cxx: Error: ../../../../lyx-devel/src/frontends/xforms/FormFiledialog.C, line 407: 
  identifier "slot" is undefined
r_ = Dialogs::redrawGUI.connect(slot(this, &FileDialog::Private::redraw));
^


I guess it is related to the recent namespace changes. So, how is
the compiler supposed to find out that slot is really SigC::slot?

JMarc



Re: Compiling with compaq cxx

2001-03-16 Thread Angus Leeming

On Friday 16 March 2001 11:32, Jean-Marc Lasgouttes wrote:
> When I compile latest cvs with cxx, I get lots of
> 
> cxx: Error: ../../../../lyx-devel/src/frontends/xforms/FormFiledialog.C, 
line 407: 
>   identifier "slot" is undefined
> r_ = Dialogs::redrawGUI.connect(slot(this, 
&FileDialog::Private::redraw));
> ^
> 
> 
> I guess it is related to the recent namespace changes. So, how is
> the compiler supposed to find out that slot is really SigC::slot?
> 
> JMarc

JMarc. I'm fixing this here too, so don't waste your time. The fix is to have 
either a 

using SigC::slot;

at the top of the .C file or to type explicitly

r_ = Dialogs::redrawGUI.connect(SigC::slot(this, 
&FileDialog::Private::redraw));

Both are allowable. Only in header files are using directives evil.

Angus



Re: Compiling with compaq cxx

2001-03-16 Thread Jean-Marc Lasgouttes

> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> JMarc. I'm fixing this here too, so don't waste your time. The
Angus> fix is to have either a

Angus> using SigC::slot;

Angus> at the top of the .C file or to type explicitly

Angus> r_ = Dialogs::redrawGUI.connect(SigC::slot(this,
Angus> &FileDialog::Private::redraw));

Angus> Both are allowable. Only in header files are using directives
Angus> evil.

That's what I began to do, but when I realized it was a problem for
_all_ files, I felt something was wrong.

BTW, would it make sense to have slot a member of the base dialog
class, to hide the SigC dependency?

JMarc



Re: Compiling with compaq cxx

2001-03-16 Thread Angus Leeming

On Friday 16 March 2001 11:50, Jean-Marc Lasgouttes wrote:
> > "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
> 
> Angus> JMarc. I'm fixing this here too, so don't waste your time. The
> Angus> fix is to have either a
> 
> Angus> using SigC::slot;
> 
> Angus> at the top of the .C file or to type explicitly
> 
> Angus> r_ = Dialogs::redrawGUI.connect(SigC::slot(this,
> Angus> &FileDialog::Private::redraw));
> 
> Angus> Both are allowable. Only in header files are using directives
> Angus> evil.
> 
> That's what I began to do, but when I realized it was a problem for
> _all_ files, I felt something was wrong.
> 
> BTW, would it make sense to have slot a member of the base dialog
> class, to hide the SigC dependency?

No, I don't think so. The thing will be done in a few minutes and then the 
pain will be over ;-)

Angus



Re: Compiling with compaq cxx

2001-03-16 Thread Lars Gullik Bjønnes

Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

| When I compile latest cvs with cxx, I get lots of
| 
| cxx: Error: ../../../../lyx-devel/src/frontends/xforms/FormFiledialog.C, line 407: 
|   identifier "slot" is undefined
| r_ = Dialogs::redrawGUI.connect(slot(this, &FileDialog::Private::redraw));
| ^
| 
| 
| I guess it is related to the recent namespace changes. So, how is
| the compiler supposed to find out that slot is really SigC::slot?

Well... you add SigC:: in front of it...

Lgb




Re: Compiling with compaq cxx

2001-03-16 Thread Lars Gullik Bjønnes

Angus Leeming <[EMAIL PROTECTED]> writes:

| On Friday 16 March 2001 11:32, Jean-Marc Lasgouttes wrote:
| > When I compile latest cvs with cxx, I get lots of
| > 
| > cxx: Error: ../../../../lyx-devel/src/frontends/xforms/FormFiledialog.C, 
| line 407: 
| >   identifier "slot" is undefined
| > r_ = Dialogs::redrawGUI.connect(slot(this, 
| &FileDialog::Private::redraw));
| > ^
| > 
| > 
| > I guess it is related to the recent namespace changes. So, how is
| > the compiler supposed to find out that slot is really SigC::slot?
| > 
| > JMarc
| 
| JMarc. I'm fixing this here too, so don't waste your time. The fix is to have 
| either a 
| 
| using SigC::slot;
| 
| at the top of the .C file or to type explicitly
| 
| r_ = Dialogs::redrawGUI.connect(SigC::slot(this, 
| &FileDialog::Private::redraw));
| 
| Both are allowable. Only in header files are using directives evil.

I regard them as eveil in source files as well. they should be as
local as possible. (or maintainable)...

of only in a couple of places: use SigC::slot
if only in a couple of methods: using SigC::slot inside the method
if used all over the source file: using SigC::slot in the top.

Lgb