Koen Deforche | 1 Sep 09:47 2009
Picon

Re: Ext::ComboBox currentIndex crash

Hey Guy,

2009/8/31 Guy Deleeuw <G.De_Leeuw@...>:
> Hello,
>
> Ext::ComboBox.currentIndex() crash.
> With this combobox I use :
>  Ext::ComboBox* m_cbbExtContact = new Ext::ComboBox(0);
>  m_cbbExtContact->setTextSize(60);
>  m_cbbExtContact->setModel(m_pModel);
>  m_cbbExtContact->setModelColumn(1);
>
>  m_cbbExtContact->setEditable(true);
>  m_cbbExtContact->setQueryDelay(2);
>  m_cbbExtContact->setMinQueryLength(1);

Perhaps you see a crash because currentIndex() may be -1: when the
user has added an entry by editing, this entry is not added to the
underlying model. When this entry is the currently selected entry,
currentIndex() will be -1, and currentText() will return the value.

At least the test case in attachment works well for me, if not for
you, can you modify it to reproduce the crash ?

Regards,
koen
Attachment (test30.cc): text/x-c++src, 1698 bytes
------------------------------------------------------------------------------
(Continue reading)

Jean-Michel Caricand | 1 Sep 09:51 2009
Picon

WFileUpload

Hello,

In my application, I use a WFileUpload widget. I can upload any file but 
I have a little question : how to clear the filename field after the 
upload ? I didn't find method to do that in the documentation.

Thanks.

--

-- 
Jean-Michel Caricand

Laboratoire Informatique de l'Université de Franche-Comté
16 route de Gray
25000 Besançon

Tél : 03 81 66 20 63
Courriel : jean-michel.caricand@...

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Koen Deforche | 1 Sep 10:18 2009
Picon

Re: WFileUpload

Hey Jean-Michel,

2009/9/1 Jean-Michel Caricand <jean-michel.caricand@...>:
> Hello,
>
> In my application, I use a WFileUpload widget. I can upload any file but
> I have a little question : how to clear the filename field after the
> upload ? I didn't find method to do that in the documentation.

For security reasons, you cannot manipulate the contents of a file
upload field through JavaScript.
The only solution is thus to delete it and create a new field.

Regards,
koen

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Adrian Sutherland | 1 Sep 13:51 2009

Re: WFileUpload

Hi

I was just using WFileUpload and have a couple of question also.

1. It works fine for "happy days" - but what happens if the user
inputs a filename that does not exist. At the moment it seems to give
a javascript error (access denied) - would be good if it threw a event
like it does for "file to large" ...? If no file name is entered at
all it seems to silently fail (again it would be good if it raised an
error event).

2. How do you configure the max file size - apologies if this is
documented somewhere!

Other suggestions:

- perhaps we should also have a "file upload started" event - this
would avoid doubt as to if the file transfer was in progress (and
allow the screen to be updated accordingly).

- I think we perhaps should have a single completion event with a
status code indicated success or type of failure? Or better the status
code could be got via a class method.

- I tried to do a upload->disable() - which does not exist. I wanted
to disable the field while an update was in progress. Perhaps it does
it implicitly anyway?

Cheers

(Continue reading)

Guy Deleeuw | 1 Sep 15:11 2009
Picon

Re: Ext::ComboBox currentIndex crash

Hello,

Your example work and I not see what could give this crash. No model 
into the combobox ?
Regards
Guy

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f77decdc950 (LWP 29933)]
Wt::Ext::ComboBox::count (this=0x0) at 
/home/guy/Docs/Dev/wt/src/wt/src/Wt/Ext/ComboBox.C:112
112      return model_->rowCount();
Current language:  auto; currently c++

>
> Perhaps you see a crash because currentIndex() may be -1: when the
> user has added an entry by editing, this entry is not added to the
> underlying model. When this entry is the currently selected entry,
> currentIndex() will be -1, and currentText() will return the value.
>
>   
No I manage this case.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Koen Deforche | 1 Sep 15:58 2009
Picon

Re: WFileUpload

Hey Adrian,

2009/9/1 Adrian Sutherland <adrian@...>:
> Hi
>
> I was just using WFileUpload and have a couple of question also.
>
> 1. It works fine for "happy days" - but what happens if the user
> inputs a filename that does not exist. At the moment it seems to give
> a javascript error (access denied) - would be good if it threw a event

I tried this with Firefox on linux and IE on windows: with Firefox it
simply uploads an empty file, with IE it refuses me to input an
non-existing file.

What browser/platform do you see this javascript error ?

> like it does for "file to large" ...? If no file name is entered at
> all it seems to silently fail (again it would be good if it raised an
> error event).

That is a silly regression, I opened a ticket for it a about a week
ago (http://redmine.webtoolkit.eu/issues/show/53).

> 2. How do you configure the max file size - apologies if this is
> documented somewhere!

<max-request-size> in wt_config.xml

> Other suggestions:
(Continue reading)

Koen Deforche | 1 Sep 15:59 2009
Picon

Re: Ext::ComboBox currentIndex crash

Hey Guy,

2009/9/1 Guy Deleeuw <G.De_Leeuw@...>:
> Hello,
>
> Your example work and I not see what could give this crash. No model
> into the combobox ?
> Regards
> Guy
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7f77decdc950 (LWP 29933)]
> Wt::Ext::ComboBox::count (this=0x0) at
> /home/guy/Docs/Dev/wt/src/wt/src/Wt/Ext/ComboBox.C:112
> 112      return model_->rowCount();
> Current language:  auto; currently c++

Your combobox is 0 (this=0x0), perhaps you did not save the pointer properly ?

Regards,
koen

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Guy Deleeuw | 1 Sep 16:07 2009
Picon

Re: Ext::ComboBox currentIndex crash

Hello Koen,

Ooops yes, sorry for the sound.
Regards
guy
> Your combobox is 0 (this=0x0), perhaps you did not save the pointer properly ?
>
>   

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Adrian Sutherland | 1 Sep 20:45 2009

Re: WFileUpload

Evening Koen - thanks for your reply

> I tried this with Firefox on linux and IE on windows: with Firefox it
> simply uploads an empty file, with IE it refuses me to input an
> non-existing file.
>
> What browser/platform do you see this javascript error ?

This is with IE. You are right that the control lets you enter
anything but does not trigger a change event - however I have a button
which fires upload() as per the example. It is with this that I get
the javascript error. I guess I can get rid of the button (my
application relies on javascript anyway).

> For an AJAX session, starting is always triggered yourself using
> WFileUpload::upload(), no ?

I guess - I wasn't certain if the control did an upload in other cases
(from reading the reference) - but yeah I must know when I call
upload()!

> the API is a bit messy

I'll drink to that :-)

> The disabled tag is not interpreted correctly on some browser (e.g.
> Safari), so it would not work in general. We would need to investigate
> what is exactly allows from a security point of view, but perhaps
> hiding (and replacing with a text "Upload in progress" is the most
> likely thing to work.
(Continue reading)

Lasse Kärkkäinen | 1 Sep 14:25 2009
Picon
Picon

Re: Internal errors etc.

> It seems that there is a mismatch between the URL at which the
> application is deployed, and the URL which the application thinks it
> has.
> 
> Are you using url rewriting rules ? How are you deploying ? At '/c' or
> at '/c/' ?

Not using rewrite rules. The script is /c/nihcms.fcgi and it is set as 
the directory index in apache config.

We are also getting a large number of segfaults and other issues. I 
managed to get a Valgrind log of this by manually killing the process 
with SIGTERM. I am not sure whether Wt catches this and handles the 
situation correctly, so maybe these errors are unrelated to the ones 
that we see in production use (without valgrind and without manually 
killing anything).

The system is currently only accessible on 
http://goblin.tkk.fi/c/foo.fcgi due to the large amount of issues we've had.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

Gmane