Frans Meulenbroeks | 1 Feb 08:30 2012
Picon

Re: static building



2012/1/31 Wim Dumon <wim-fsvWVe5cvas@public.gmane.org>
Hello Frans,

What always worked for me is to omit -static and instead use full
paths to the .a files when linking (without -l):
g++  -O2 -o hello hello.C /usr/local/lib/libwthttp.a /usr/local/lib/libwt.a ...

There may be some option of ld or gcc that avoids static linking for
some libraries, but I don't know that by heart.

Best regards,
Wim.

Hi Wim.

Thanks alot, That is a good suggestion, didn't think of that one.

This page http://redmine.webtoolkit.eu/projects/wt/wiki/Wt_embedded suggested:

By default, shared/static libraries is all-or-nothing with CMake. However, you probably want to use system-wide versions of libstdc++, libm and libc depending on other applications on your device.
  • Use -Bdynamic in front of libraries you wish to link dynamically against
 But that did not work too well for me.
I've also reconfigured with the suggestions made with the page above. Let's see what that delivers.

Frans

2012/1/31 Frans Meulenbroeks <fransmeulenbroeks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
> Hi,
>
> I'm trying to statically link hello to learn about footprint.
> I peeked at the instructions at
> http://redmine.webtoolkit.eu/projects/wt/wiki/Wt_embedded, I haven't applied
> all of them, but I feel I'm quite far from the results listed on that page
> as my exe is about 5 MB. (intel x86-64)
>
> The thing that I do not seem to get under control is using libc (and maybe
> some other libs) dynamically.
>
> E.g. with this command:
> g++  -O2 -o hello hello.C -static -lwthttp -lwt -lstdc++ -lboost_signals -lz
> \
>     -lssl -lcrypto -lboost_thread -lboost_filesystem -lboost_program_options
> -lboost_date_time -lpthread -lboost_regex \
>     -lboost_system -lrt -ldl -licudata -licui18n -licuuc -Bdynamic -lz -lm
> -Bdynamic -lc
>
> I still end up with a fully statically linked executable.
>
> The other thing that somewhat concerns me are these linker messages:
>
> /usr/lib64/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
> (.text+0x5c4): warning: Using 'dlopen' in statically linked applications
> requires at runtime the shared libraries from the glibc version used for
> linking
> /usr/lib64/libwthttp.a(Server.o): In function `getaddrinfo':
> /usr/include/boost/asio/detail/socket_ops.hpp:1809: warning: Using
> 'getaddrinfo' in statically linked applications requires at runtime the
> shared libraries from the glibc version used for linking
>
> Anyone any pointers on how to improve my results
> (and yes, I know there are some things in the wiki that I have not tried).
>
> Rationale for going static is that this is the only C++ app in my target
> system, so I'd rather have only those parts of the lib that I really use.
> (and I came to the list of libs above by dynamically linking and doing ldd
> -v hello
>
> Thanks in advance for any suggestions!
> Frans
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> witty-interest mailing list
> witty-interest-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
witty-interest mailing list
witty-interest-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/witty-interest

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
witty-interest mailing list
witty-interest@...
https://lists.sourceforge.net/lists/listinfo/witty-interest
Matthew Sherborne | 1 Feb 20:18 2012
Picon

Re: Three problems

HI Torsten,


I've three Problems.
1: I'll use in wt_config.xml the parameter "reload-is-new-session" =
false. But then the internalPathChanged-event doesn't work.

I got around this by calling interpathChanged().emit(internalPath()); // Or whatever it is

From the end of the constructor of my application.

So when a user clicks on a 'WAnchor with a WLink of type internalPath .. internalpathchanged works fine.

But if you have some randomy WAnchor with just a string .. it'll usally create  a new WApplicatoin instance.

Also if the uesr just types some url in top of their browser, it'll create a new WAppliction instance.

So the way around it is, once your WApplication instance is created .. emit an internalPath changed to put the user on the right page.

Hope this helps.
Matthew Sherborne
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
witty-interest mailing list
witty-interest@...
https://lists.sourceforge.net/lists/listinfo/witty-interest
Matthew Sherborne | 1 Feb 20:25 2012
Picon

Re: Using Loading indicator for measuring loading time?

There's an example loading indicator thing here:





To show/hide it: myWApplication->loadingIndicator()->widget()->show(); / hide();

Haven't tried it .. but that should work according to the docs.

Kind Regards,
Matthew Sherborne

On Tue, Jan 31, 2012 at 7:55 PM, Stefan Ruppert <sr-OsXsj/w0QlQAvxtiuMwx3w@public.gmane.org> wrote:
assume the showing and hiding of the loading indicator is a client
side operation! I'm right? How can I achieve this?

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
witty-interest mailing list
witty-interest@...
https://lists.sourceforge.net/lists/listinfo/witty-interest
Stefan Ruppert | 1 Feb 20:40 2012

Re: Using Loading indicator for measuring loading time?

Hi Matthew,

I have tried this but it seems to me that it does not work as expected.

Do you know if the server side triggers the showing and hiding of the 
loading indicator or is it a java script code on the client side within 
the browser?

If its only client side triggered the show and hide events need to be 
forwarded to the server!? Is this possible?

Maybe I need to implement this on the server side in the application logic.

Regards,
Stefan

On 01.02.2012 20:25, Matthew Sherborne wrote:
> There's an example loading indicator thing here:
>
> http://www.webtoolkit.eu/widgets/style-and-layout/wloadingindicator
>
> and docs here:
> http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WLoadingIndicator.html
>
> and you can just set your custom one here:
> http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WApplication.html#a080d01aa8e92ae57ef9c9491d33a7fca
>
> To show/hide it: myWApplication->loadingIndicator()->widget()->show(); /
> hide();
>
> Haven't tried it .. but that should work according to the docs.
>
> Kind Regards,
> Matthew Sherborne
>
> On Tue, Jan 31, 2012 at 7:55 PM, Stefan Ruppert <sr@...
> <mailto:sr@...>> wrote:
>
>     assume the showing and hiding of the loading indicator is a client
>     side operation! I'm right? How can I achieve this?
>
>
>
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
>
>
>
> _______________________________________________
> witty-interest mailing list
> witty-interest@...
> https://lists.sourceforge.net/lists/listinfo/witty-interest

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
Koen Deforche | 1 Feb 21:25 2012
Picon

Re: Three problems

Hey Torsten,

2012/1/30 Torsten Schulz <kontakt@...>:
>> 2012/1/27 Torsten Schulz<tsschulz@...>:
>>> I've three Problems.
>>> 1: I'll use in wt_config.xml the parameter "reload-is-new-session" =
>>> false. But then the internalPathChanged-event doesn't work.
>> Could you specify more exactly what you observe? There shouldn't be
>> any impact of reload-is-new-session on this parameter.
> I'll write a community, so if a user opens another url and came back to
> the app, he'll be logged in.
> But with reload-is-new-session = true he'll see the login again. So I
> know two ways to resolve it:
> a) reload-is-new-session = false
> b) use cookies
> I would prefer a)

I could reproduce this problem, and will hopefully have a resolution soon.

>>> 3: For me the wApp->triggerUpdate() doesn't work. I've set
>>> enbaleUpdates(true), the function is running (i tested with
>>> debugging-outputs), but the ui doesn't change.
>> Do you call enableUpdates(true) from within the event loop ? It is a
>> common misconception that you can call this method also just before a
>> triggerUpdate(), but this is not possible: it needs to be called from
>> within the event loop.
> enableUpdates(true) is used in the application-constructor,
> triggerUpdate() is used in event loop.
> I thought I'm able to use it like in the chat-example. But it doesn't work.

I think you'll need to be more specific. There are also simpler
examples that show how this work (feature/serverpush and
feature/broadcast) which can help you to get on the right track.

Regards,
koen

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
Koen Deforche | 1 Feb 21:35 2012
Picon

Re: Using Loading indicator for measuring loading time?

Hey Stefan,

2012/1/31 Stefan Ruppert <sr@...>:
> Hi all,
>
> I want to use a loading indicator to measure the loading time of a
> WebRequest!?

The actual place to measure the loading time is best done in an
overloaded WApplication::notify(), measuring the time around the base
call to notify().

But then you are too late to show this number to the user, since the
rendering phase will already be finished. It's a bit a circular thing:
trying to measure how long it takes to render and render the result of
this measurement.

> Our web application is a frontend to a database containing a huge amount
> of data. Therefore we want a generic way to measure and present the
> loading time to the user. The idea I had is to implement a special
> loading indicator and reimplement setHidden() method taking a start
> timestamp when the widget is shown and a stop timestamp when the widget
> is hidden again... But this does not work.

As you imagine, indeed, the loading indicator is a client-side affair
since it will show when the server takes too long to respond.

However, Wt does this by optimizing setHidden() using "stateless slot
learning" of show() and hide().

You can thus reimplement setHidden() in a special loading indicator
and use doJavaScript() -- these calls will be also be "pre-learned" as
client-side JavaScript.

Thus something like:

void MyLoadingIndicator::setHidden(bool hidden)
{
  if (!hidden) {
    doJavaScript("...");
  } else {
    doJavaScript("...");
  }

  WLoadingIndicator::setHidden(hidden);
}

The JavaScript could do whatever you want, including modifying the
loading indicator text or anything else, but it will be purely
javascript.

Regards,
koen

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
Frans Meulenbroeks | 1 Feb 22:17 2012
Picon

Re: treeview example, toggle stripes



2012/1/31 Frans Meulenbroeks <fransmeulenbroeks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
HI,

As part of learning Wt I've been playing with the treeview example.
One of the buttons is Toggle Stripes. This one does toggle alternatingRowColors.
According to the doc this gives the alternate color in the css.
However the example has no .css file; and loading the stylesheet is commented out:
TreeViewApplication.C:  //app->useStyleSheet("treeview.css");

Of course I can uncomment this, but I have not really an idea how exactly to specify the alternate color in the css.
Can someone provide a hint (or, maybe even better) a pointer to where I can find this kind of info.

Thanks alot!
Frans

Made some progress on this one; I noticed that the example has stripes if you use the normal height, but looses its stripes when going to larger row distance.
No idea yet how to resolve this. Suggestions are welcome.

Also I haen't been able yet to get an image below 3.8 M on x86-64. Not sure how that scales to arm (didn't crosscompile yet).

Frans
 

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
witty-interest mailing list
witty-interest@...
https://lists.sourceforge.net/lists/listinfo/witty-interest
Nagaev Boris | 1 Feb 22:26 2012
Picon

Re: treeview example, toggle stripes

Hi!

I think, this problem is similar to that, reported in
http://redmine.emweb.be/issues/1144
It seems to be a restriction, that it works only if the height is less
or equal to 40.

On Thu, Feb 2, 2012 at 01:17, Frans Meulenbroeks
<fransmeulenbroeks <at> gmail.com> wrote:
>
>
> 2012/1/31 Frans Meulenbroeks <fransmeulenbroeks <at> gmail.com>
>>
>> HI,
>>
>> As part of learning Wt I've been playing with the treeview example.
>> One of the buttons is Toggle Stripes. This one does toggle
>> alternatingRowColors.
>> According to the doc this gives the alternate color in the css.
>> However the example has no .css file; and loading the stylesheet is
>> commented out:
>> TreeViewApplication.C:  //app->useStyleSheet("treeview.css");
>>
>> Of course I can uncomment this, but I have not really an idea how exactly
>> to specify the alternate color in the css.
>> Can someone provide a hint (or, maybe even better) a pointer to where I
>> can find this kind of info.
>>
>> Thanks alot!
>> Frans
>
>
> Made some progress on this one; I noticed that the example has stripes if
> you use the normal height, but looses its stripes when going to larger row
> distance.
> No idea yet how to resolve this. Suggestions are welcome.
>
> Also I haen't been able yet to get an image below 3.8 M on x86-64. Not sure
> how that scales to arm (didn't crosscompile yet).
>
> Frans
>
>
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> witty-interest mailing list
> witty-interest <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
witty-interest mailing list
witty-interest <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest
Frans Meulenbroeks | 1 Feb 22:47 2012
Picon

form objects in treeview

Hi,

A n00bish questions:

I am creating a treeview, but now I need a few of the fields in the treeview to be editable.
I've peeked at the treeview example and know how to do an icon or a checkbox, but I have not really an idea how to do a combobox or another form widget (apart from combobox, I probably need line-edit and/or inplaceedit).
Any suggestions or pointers to an example?
Or is there another way to (easily) achieve what I want?

Thanks alot for your help.
Frans.

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
witty-interest mailing list
witty-interest@...
https://lists.sourceforge.net/lists/listinfo/witty-interest
Frans Meulenbroeks | 1 Feb 22:52 2012
Picon

Re: treeview example, toggle stripes



2012/2/1 Nagaev Boris <bnagaev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Hi!

I think, this problem is similar to that, reported in
http://redmine.emweb.be/issues/1144
It seems to be a restriction, that it works only if the height is less
or equal to 40.

I haven't studied the details yet, but on this page: http://www.webtoolkit.eu/widgets/mvc-widgets/wtreeview it works as I would expect it to.
Height in the treeview example toggles between 25 and 31 (or soemthing like that).

No idea on a solution yet.
Frans

On Thu, Feb 2, 2012 at 01:17, Frans Meulenbroeks
<fransmeulenbroeks <at> gmail.com> wrote:
>
>
> 2012/1/31 Frans Meulenbroeks <fransmeulenbroeks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>
>> HI,
>>
>> As part of learning Wt I've been playing with the treeview example.
>> One of the buttons is Toggle Stripes. This one does toggle
>> alternatingRowColors.
>> According to the doc this gives the alternate color in the css.
>> However the example has no .css file; and loading the stylesheet is
>> commented out:
>> TreeViewApplication.C:  //app->useStyleSheet("treeview.css");
>>
>> Of course I can uncomment this, but I have not really an idea how exactly
>> to specify the alternate color in the css.
>> Can someone provide a hint (or, maybe even better) a pointer to where I
>> can find this kind of info.
>>
>> Thanks alot!
>> Frans
>
>
> Made some progress on this one; I noticed that the example has stripes if
> you use the normal height, but looses its stripes when going to larger row
> distance.
> No idea yet how to resolve this. Suggestions are welcome.
>
> Also I haen't been able yet to get an image below 3.8 M on x86-64. Not sure
> how that scales to arm (didn't crosscompile yet).
>
> Frans
>
>
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> witty-interest mailing list
> witty-interest <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
witty-interest mailing list
witty-interest <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
witty-interest mailing list
witty-interest@...
https://lists.sourceforge.net/lists/listinfo/witty-interest

Gmane