Project

General

Profile

Actions

Bug #1041

closed

setHidden and WAnimation

Added by Jan Hrubeš over 12 years ago. Updated over 12 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

Actions #1

Updated by Koen Deforche over 12 years ago

  • 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

Actions #2

Updated by Jan Hrubeš over 12 years ago

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

Actions #3

Updated by Jan Hrubeš over 12 years ago

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

Actions #4

Updated by Koen Deforche over 12 years ago

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

Actions #5

Updated by Koen Deforche over 12 years ago

  • Status changed from Feedback to Resolved
  • Target version set to 3.2.0
Actions #6

Updated by Koen Deforche over 12 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF