Your message dated Mon, 8 Aug 2011 20:56:43 +0200
with message-id 
<CAK=MUcZRQQdGBBqErTomRfRD2DBsx34Dq+1Efc=nxmojpxn...@mail.gmail.com>
and subject line WMenu paths break when not using the default path
has caused the Debian Bug report #618378,
regarding WMenu paths break when not using the default path.
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
618378: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=618378
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libwt27
Version: 3.1.8-2

Hi,

The attached example will show "Home" instead of "Test", when
you go to the url of the binary with "/test2" after it.  So that
means that bookmarking that url doesn't work.

In the log file it will show:
[error] "WMenu: unknown path: 'test2'"

If you change "test2" in the code to "test", everything works
as expected.  As far as I understand "test" is the default value.


Kurt

#include <Wt/WApplication>
#include <Wt/WStackedWidget>
#include <Wt/WMenu>
#include <Wt/WText>

using namespace Wt;

class Test : public WApplication
{
public:
	Test(const WEnvironment& env);

private:
	WMenu *MainMenu;
};

Test::Test(const WEnvironment& env) : WApplication(env)
{
	WStackedWidget *contents = new WStackedWidget();
	contents->setId("main_page");

	MainMenu = new WMenu(contents, Horizontal);
	MainMenu->setRenderAsList(true);
	MainMenu->setInternalPathEnabled();
	MainMenu->setInternalBasePath("/");

	MainMenu->addItem(WString("Home"), new WText("Home"))->setPathComponent("");
	MainMenu->addItem(WString("Test"), new WText("Test"))->setPathComponent("test2");
	root()->addWidget(MainMenu);
	root()->addWidget(contents);
}

WApplication *createApplication(const WEnvironment& env)
{
  return new Test(env);
}

int main(int argc, char *argv[])
{
	return WRun(argc, argv, &createApplication);
}


--- End Message ---
--- Begin Message ---
bug fixed upstream

quote:
Updated by Koen Deforche 4 months ago

    Status changed from Resolved to Closed

Available in Wt 3.1.9

-- 
--
 .''`.   Alice Ferrazzi <[email protected]>      Related projects:
: :'  :  proud Debian volunteer QA http://goo.gl/I6FCB blog: http://goo.gl/UuRDh
 `-  Debian - when you have better things to do than watching the monitor


--- End Message ---

Reply via email to