Greg Ercolano wrote:
> Albrecht Schlosser wrote:
>> Greg (or Matt, since you have VC 2008 Express installed now),
>> could one of you please test if it works with
>>
>> if (!(w->flags() & Fl_Window::FORCE_POSITION)) {
>>
>> in Fl_win32.cxx, line 1477 (s/Fl_Widget::/Fl_Window::/) ?
>
> There are two instaces of FORCE_POSITION in FL_win32.cxx:
>
> % grep FORCE_POSITION Fl_win32.cxx
> set_flag(FORCE_POSITION); <-- THIS ONE FAILS
> if (!(w->flags() & Fl_Widget::FORCE_POSITION)) { <-- THIS ONE WORKS
Now I'm totally confused. The error message you posted referred to
line #1477, which is the second occurrence of FORCE_POSITION. The
first is in line #1295. What is the error message?
Here is the message you posted originally:
c:\fltk-1.3.x-r6960\src\Fl_win32.cxx(1477) : error C2248:
'FORCE_POSITION' : cannot access protected enumerator declared in class
'Fl_Widget'
../..\FL/Fl_Widget.H(151) : see declaration of 'FORCE_POSITION'
../..\FL/Fl_Widget.H(91) : see declaration of 'Fl_Widget'
At least I read it that "(1477)" means line #1477.
> ..so I think the Right Thing (TM) to do is to change the
> first one to have Fl_Widget:: (instead of Fl_Window::)
> just to be consistent.
I'm not convinced yet. Did you try with a fresh checkout, or did you
reset everything in the project?
>> Last question: if it works, what would be the solution
>> for the problem?
>
> It appears that just the above change might be all that's needed;
> I backed out my changes to make Fl_Widget::[flags] enum public,
> and it still built OK.
Could it be that something went wrong with backing out your changes?
> I'm not going to try to second guess the intentions of what's in .H,
Well, in the FLTK 1.1 version, some of the enum values had been declared
(even private) in different classes (with FORCE_POSITION being private
in Fl_Window). Although I think that this is a clean solution, the
problem was that the same bits had been declared more than once.
> and would just assume the above change is needed simply due to
> an omission of the "Fl_Widget::" prefix on that first FORCE_POSITION
> instance in Fl_win32.cxx, the assumption being that somehow VS Express
> 2008
> is being more pedantic than the other compilers, which is why it never
> came up.
This is a rather new change, perhaps that's why it didn't come up
before. And there are other uses of FORCE_POSITION without the
Fl_Widget:: prefix, cf. e.g. FL/Fl_Window.H: free_position().
> If this looks OK, I can check it in.
See above ...
Albrecht
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev