Thanks all for the feedback, the way I ended up doing it was similar to the
way that the chat application does it, by creating WText's that are added
to a WContainerWidget.
Thanks,
Alex
On Wed, Oct 9, 2013 at 3:10 AM, Wim Dumon <w...@emweb.be> wrote:
> Hi Alex,
>
> There's no provisioning for that, WTextArea/WText/... don't support
> appending text through their interface.
> You could implement this in your own class with a little JS (concept code,
> may be totally wrong):
>
> WText *t = new WText();
> t->setText("initial text");
> t->doJavaScript(t->jsRef() + ".text = " + jsRef() + ".text + " +
> 'extratext'");
>
> Danger: filter 'extratext' appropriately (and this filter will be complex)
> to ensure that you didn't create a XSS hole in your application.
>
> It's certainly easier to add a new WText for every update that you want to
> do. And as Jason suggests, if your log file is big, why not show your log
> in a WTableView, with the benifit of partial loading?
>
> BR,
> Wim.
>
>
>
> 2013/10/4 Slide <slide.o....@gmail.com>
>
>> I was looking at the class reference and trying to find a way to append
>> text to a WTextArea instead of setting the text completely. I was trying to
>> use Wt as kind of a logging console for an application, but setting the
>> text every time seems like it would be inefficient, is there a better way?
>>
>> Thanks,
>>
>> Alex
>>
>>
>> ------------------------------------------------------------------------------
>> October Webinars: Code for Performance
>> Free Intel webinars can help you accelerate application performance.
>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
>> from
>> the latest Intel processors and coprocessors. See abstracts and register >
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
>> _______________________________________________
>> witty-interest mailing list
>> witty-interest@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/witty-interest
>>
>>
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
> _______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
--
Website: http://earl-of-code.com
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest