Project

General

Profile

Actions

Bug #1436

closed

myWFileUpload->setDisabled(false) not working

Added by Jan Hrubeš over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
09/12/2012
Due date:
% Done:

0%

Estimated time:

Description

Hi,

I have problem with reenabling a WFileUpload widget:

setDisabled(true) disables the widget,

but setDisabled(false) does not enable the widget.

problem may be in

void WWebWidget::propagateSetEnabled(bool enabled)
{
  if (children_)
    for (unsigned i = 0; i < children_->size(); ++i) {
      WWidget *c = (*children_)[i];
      if (!c->isDisabled())                <-------------- not sure about this condition
        c->webWidget()->propagateSetEnabled(enabled);
    }
}

regards,

Jan


Files

disable.cpp (1.42 KB) disable.cpp Koen Deforche, 10/11/2012 09:41 PM
Actions #1

Updated by Koen Deforche over 11 years ago

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche
  • Target version set to 3.2.3

Hey Jan,

I think this the real problem is in WFileUpload --- but I recall that something was fixed related to this.

With what version do you see this problem ?

Regards,

koen

Actions #2

Updated by Koen Deforche over 11 years ago

  • Status changed from InProgress to Feedback
Actions #3

Updated by Jan Hrubeš over 11 years ago

Hi Koen,

I'm working with Wt 3.2.1, boost 1_49_0.

regards,

Jan

Actions #4

Updated by Koen Deforche over 11 years ago

Hey Jan,

I believe this has been fixed since. We are prepping a 3.2.3 release, so it would be nice if you could see if the last git version works for you.

Regards,

koen

Actions #5

Updated by Jan Hrubeš over 11 years ago

Hi Koen,

the last git clone (Mo, 8.10.2012) suffers with this error

wt-121008git/src/web/ImageUtils.C: In function `std::string Wt::Image::identifyImageMimeType(const std::vector<unsigned char, std::allocator<unsigned char> >&)':
wt-121008git/src/web/ImageUtils.C:70: error: 'const class std::vector<unsigned char, std::allocator<unsigned char> >' has no member named 'data'

you probably changed a data type from std::string to std::vector and std::vector has no data() method.

H.

Actions #6

Updated by Jan Hrubeš over 11 years ago

&header[0]

instead of

header.data()

should work.

Actions #7

Updated by Koen Deforche over 11 years ago

Hey Jan,

I've just pushed an new git version that fixes this (this was also a problem on windows platforms).

Regards,

koen

Actions #8

Updated by Jan Hrubeš over 11 years ago

Hi Koen

Issue with WFileUpload::setDisabled() persist in last git version (11.10.2012)

Tested with Opera, FF and Chrome on code similar to this:

WFileUpload* fu = new WFileUpload( wApp->root() );

WPushButton* bte = new WPushButton("enable", wApp->root() );
bte->clicked().connect(boost::bind( &WFileUpload::setDisabled, fu, false ));

WPushButton* btd = new WPushButton("disable", wApp->root() );
btd->clicked().connect(boost::bind( &WFileUpload::setDisabled, fu, true ));

regards,

Jan

Actions #9

Updated by Koen Deforche over 11 years ago

Hey,

I fail to reproduce this though. Can you change the attached example so that it fails ?

Regards,

koen

Actions #10

Updated by Jan Hrubeš over 11 years ago

Hi,

I checked it again and found bad linking path.

Last git is working, issue can be closed.

regards,

Jan

Actions #11

Updated by Koen Deforche over 11 years ago

  • Status changed from Feedback to Resolved
Actions #12

Updated by Koen Deforche over 11 years ago

  • Status changed from Resolved to Closed

Fixed in Wt 3.2.3 RC1.

Actions

Also available in: Atom PDF