Alex | 1 Jun 2007 14:33
Picon

[Wt-interest] Some include files misleads

Good toolkit. We are trying to use it for our project.

But we found some strange things in header file hierarchy structure.

It seems that we need to include WTebleCell if we are using WTable.
The same thing with WMenu. To make it compile we must also include 
WInteractWidget header when using WMenu. But in our code we havn't any 
reference to WInteractWidget.

It's only few such thing we have discovered. Is it normal behavior or we 
are misusing something? May be it will better to include WTableCell in 
WTable header and so on.
Or may be we miss main include file wich we have to ues?

System: Linux, g++ 3.4.2. wt 2.0

Good luck.

Koen Deforche | 1 Jun 2007 14:47
Picon

Re: [Wt-interest] Some include files misleads

Hey Alex,

> But we found some strange things in header file hierarchy structure.
>
> It seems that we need to include WTebleCell if we are using WTable.
> The same thing with WMenu. To make it compile we must also include
> WInteractWidget header when using WMenu. But in our code we havn't any
> reference to WInteractWidget.
>
> It's only few such thing we have discovered. Is it normal behavior or we
> are misusing something? May be it will better to include WTableCell in
> WTable header and so on.
> Or may be we miss main include file wich we have to ues?

No, you are using it right. Indeed you have to include <WTableCell> if
you are trying
to access table cells of a table (using elementAt()). Similar thing for WMenu.

I realize it is a bit ackward, but it follows the practice to only
include header files in header files when absolutely needed. On the
other hand, there is not much you can do with a WTable without
WTableCell, and it annoys even me, so if it annoys any more people I
will add the include of WTableCell to WTable.

Good luck too.

Regards,
koen

(Continue reading)

Alex | 2 Jun 2007 00:25
Picon

Re: [Wt-interest] Some include files misleads


> I realize it is a bit ackward, but it follows the practice to only
> include header files in header files when absolutely needed. On the
> other hand, there is not much you can do with a WTable without
> WTableCell, and it annoys even me, so if it annoys any more people I
> will add the include of WTableCell to WTable.
>   
Yes, here it is some logic, but what about WMenu and WInteractWidget?

In theWTableCell header it is itemWidget() method in line 70 which 
returns WInteractWidget pointer. So when using menu we also have to 
inlclude WTableCell and it's ok. But including WInteractWidget is not clear.

De Leeuw Guy | 4 Jun 2007 10:58
Picon

[Wt-interest] WString

Hello

It is possible with wstring to convert a string to an integer ?
or how can a make that ?

Thanks in advance

Guy

Koen Deforche | 5 Jun 2007 09:15
Picon

Re: [Wt-interest] WString

Hey Guy,

On 6/4/07, De Leeuw Guy <G.De_Leeuw@...> wrote:
> Hello
>
> It is possible with wstring to convert a string to an integer ?
> or how can a make that ?

With std::wstring or Wt::WString ?

Try to avoid working with WString whenever possible, and use a
standard library string type instead (std::string or std::wstring).
What I recommend is to use WString only for the interface (widgets),
and use standard strings otherwise (in your 'model/logic'). This is
encouraged by the library by not really providing operations on
WString -- it acts just as a container for localizable strings.

With a standard string type, I prefer using boost::lexical_cast like this

int i = boost::lexical_cast<int>(someStr);

I have not too much experience with std::wstring, but I think it
should equally work ?

Regards,
koen

De Leeuw Guy | 5 Jun 2007 19:53
Picon

[Wt-interest] iframe

Another question :-)

I try to create a splash screen with an iframe

It's possible to add a button into these iframe that are connected to a
slot on the wt app ?

Guy

De Leeuw Guy | 5 Jun 2007 19:56
Picon

Re: [Wt-interest] WString

Hello Koen,

Thanks for your res pons I use std::wstring no problems.
My question are just why not an implementation into WString but you give
me a respons.

Regards
Guy

Koen Deforche a écrit :
> Hey Guy,
>
> On 6/4/07, De Leeuw Guy <G.De_Leeuw@...> wrote:
>   
>> Hello
>>
>> It is possible with wstring to convert a string to an integer ?
>> or how can a make that ?
>>     
>
> With std::wstring or Wt::WString ?
>
> Try to avoid working with WString whenever possible, and use a
> standard library string type instead (std::string or std::wstring).
> What I recommend is to use WString only for the interface (widgets),
> and use standard strings otherwise (in your 'model/logic'). This is
> encouraged by the library by not really providing operations on
> WString -- it acts just as a container for localizable strings.
>
> With a standard string type, I prefer using boost::lexical_cast like this
(Continue reading)

Koen Deforche | 6 Jun 2007 09:10
Picon

Re: [Wt-interest] iframe

Hey Guy,

On 6/5/07, De Leeuw Guy <G.De_Leeuw@...> wrote:
> Another question :-)
>
> I try to create a splash screen with an iframe

I'm not sure why you want to do that with an iframe, but ...

> It's possible to add a button into these iframe that are connected to a
> slot on the wt app ?

... perhaps, but it's not easy, and it requires JavaScript.

You cannot use the automatic event handling, but you can use JSignal
in conjunction with some JavaScript connected to the button cliced
event, which calls

WtSignalEmit(element, 'eventFromSplash');

However, you need to specify a DOM element which corresponds to the
widget where you specified the JSignal (and therefore you need to
generate this code per session). Perhaps I should make it so that if
you specify 'null' for the element, it looks up the signal in the
WApplication, which would remove the need for generating this code.

Regards,
koen

(Continue reading)

Hauke Zuehl | 13 Jun 2007 08:24
Picon

[Wt-interest] Wt 2.0.0: WText and tooltips

Hi folks :)

I tried to run an application which uses following code:

WText *t;
t = new WText("Some information");
t->setToolTip("More information");

Everytime I tried to run that code the whole application crashed at t->setToolTip. Unfortunately I don't
have mod_fastcgi yet (downloaded it some minutes ago and will install it this evening).

Fact is that with 1.1.7 the code worked.
Are there any bugs known or am I myself the problem :)?

Thanks and kind regards,
Hauke

______________________________________________________________________
XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club!		
Jetzt gratis testen! http://produkte.web.de/club/?mc=021130

Koen Deforche | 13 Jun 2007 09:22
Picon

Re: [Wt-interest] Wt 2.0.0: WText and tooltips

Hey Hauke,

On 6/13/07, Hauke Zuehl <hzuehl@...> wrote:
> Hi folks :)
>
> I tried to run an application which uses following code:
>
> WText *t;
> t = new WText("Some information");
> t->setToolTip("More information");
>
> Everytime I tried to run that code the whole application crashed at t->setToolTip. Unfortunately I don't
have mod_fastcgi yet (downloaded it some minutes ago and will install it this evening).
>
> Fact is that with 1.1.7 the code worked.
> Are there any bugs known or am I myself the problem :)?

Oops ! My mistake. I've fixed it in CVS. The fix is a one-liner,
should this be a blocking issue for you (see below).

Why FastCGI ? The most convenient deployment for development/debug is
is to use the built-in httpd ?

Regards,
koen

--- src/wt/WWebWidget.C 2 Jun 2007 23:19:35 -0000       1.46
+++ src/wt/WWebWidget.C 13 Jun 2007 07:17:57 -0000
 <at>  <at>  -527,7 +527,7  <at>  <at> 
   if (!lookImpl_)
(Continue reading)


Gmane