Hey,
2009/12/31 OvermindDL1 <[email protected]>:
> I am attempting to change location when a certain even happens, it
> should change to a different menu item. As testing I have it go to:
> /user/members
>
> When the event happens (in this case they click on a button), I call
> setInternalPath("/user/members", true), with true to propagate it,
> however this does nothing to the browser window, nothing changes. I
> then tried to redirect() to it using a bookmarkurl from that location,
> that just causes the session to reset.
That should work indeed.
I cannot reproduce your problem with a test on the homepage (see patch
in attachment) to switch from the Download to the Documentation using
a push button ?
Regards,
koen
diff --git a/examples/wt-homepage/WtHome.C b/examples/wt-homepage/WtHome.C
index b47a2a4..90ef58f 100644
--- a/examples/wt-homepage/WtHome.C
+++ b/examples/wt-homepage/WtHome.C
@@ -17,6 +17,8 @@
#include <Wt/WViewWidget>
#include <Wt/WWidget>
+#include <Wt/WPushButton>
+
#include "ExampleSourceViewer.h"
WtHome::WtHome(const WEnvironment& env)
@@ -129,9 +131,19 @@ WWidget *WtHome::examples()
return result;
}
+void changePath(const WMouseEvent& e)
+{
+ wApp->setInternalPath("/documentation", true);
+}
+
WWidget *WtHome::download()
{
WContainerWidget *result = new WContainerWidget();
+
+ WPushButton *button = new WPushButton("Go to documentation");
+ result->addWidget(button);
+ button->clicked().connect(changePath);
+
result->addWidget(new WText(tr("home.download")));
result->addWidget(new WText(tr("home.download.license")));
result->addWidget(new WText(tr("home.download.requirements")));
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest