On Mon, Nov 12, 2012 at 5:08 PM, Koen Deforche <k...@emweb.be> wrote: > Hey Rob, > > 2012/11/12 Rob Van Dyck <rob.van.d...@gmail.com>: >> Hi, >> >> Since the post+bind normally happens outside the wt thread, is there a way >> to know the wApp is not yet deleted when you do the binding? For example, >> can you ask the WServer using the sessionid? > > So, yes, actually you need to bind within the event loop, and this > function is "exported" for a call (usually later) to WServer::post() > > Thus: > > // Within event loop > boost::function< void()> function = > wApp->bind(boost::bind(WWidget::hide, text)); > std::string sessionId = wApp->sessionId(); > > // Later ... > WServer::instance()->post(sessionId, function);
This means that without the wApp->bind there is the possibility that a widget (with the same span-life of the session) could have been destroyed while the session still exists? Gaetano -- cpp-today.blogspot.com ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ witty-interest mailing list witty-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/witty-interest