Project

General

Profile

Actions

Bug #1041

closed
JH

setHidden and WAnimation

Bug #1041: setHidden and WAnimation

Added by Jan Hrubeš almost 15 years ago. Updated almost 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
10/26/2011
Due date:
% Done:

0%

Estimated time:

Description

Hi,
you have changed setHidden() to use WAnimation.

virtual void setHidden (bool hidden, const WAnimation &animation=WAnimation())

Please overload this function to

virtual void setHidden (bool hidden)

I can use

WAnimation *noAnimation = new WAnimation();
something->setHidden(true,*noAnimation);

but it is useless to define noAnimation for a such thing.

best regards
Jan Hrubes

KD Updated by Koen Deforche almost 15 years ago Actions #1

  • Status changed from New to Feedback

Hey,

But the signature:

virtual void setHidden (bool hidden, const WAnimation &animation=WAnimation())

allows you to call:

widget->setHidden(true);

because of the default value for the second parameter ?

Regards,
koen

JH Updated by Jan Hrubeš almost 15 years ago Actions #2

Hi,
compiler's (g 4.6.1) opinion is

../rrHome.cpp: In member function 'Wt::WWidget* rrHome::mBridge()':
../rrHome.cpp:388:30: error: no matching function for call to 'Wt::WComboBox::setHidden(bool)'
../rrHome.cpp:388:30: note: candidate is:
/usr/local/include/Wt/WFormWidget:60:16: note: virtual void Wt::WFormWidget::setHidden(bool, const Wt::WAnimation&)
/usr/local/include/Wt/WFormWidget:60:16: note:   candidate expects 2 arguments, 1 provided
make: *** [rrHome.o] Error 1

regards,
Jan

JH Updated by Jan Hrubeš almost 15 years ago Actions #3

Hi Koen,
I have checked method WWidget::hide which uses a call of setHidden as you described. So I have used hide instead of setHidden and all is running.

By the way you have a typo in description of method show.

void show ()
    Hides the widget.

regards,
Jan

KD Updated by Koen Deforche almost 15 years ago Actions #4

Hey,

Oops!

There was indeed a bug in WFormWidget's specialization of setHidden(). Will be fixed with next git push.
And the doc fix too ...

Regards,
koen

KD Updated by Koen Deforche almost 15 years ago Actions #5

  • Status changed from Feedback to Resolved
  • Target version set to 3.2.0

KD Updated by Koen Deforche almost 15 years ago Actions #6

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom