Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Hey,i met a problem
Hey,i met a problem [message #47002] Wed, 19 October 2016 07:46 Go to next message
foxsir is currently offline  foxsir
Messages: 1
Registered: October 2016
Junior Member
Hey,plz help me. i just copy this code from u++ official tutorial,it gave me some compile errors

17 error: no matching function for call to 'Upp::Bar::Add(const char [5],MyAppWindow::SubMenu(Upp::Bar&)::<lambda()>)'
21 error:'class Upp::Bar'has no member named 'Sub'
29 error:no matching function for call to'Upp::MenuBar::Set(MyAppWindow::MyAppWindow()::<lambda(Upp::Bar&) >)'


#include <CtrlLib/CtrlLib.h>

using namespace Upp;

struct MyAppWindow : TopWindow {
MenuBar menu;

void Exit() {
if(PromptOKCancel("Exit MyApp?"))
Break();
}

void SubMenu(Bar& bar) {
bar.Add("Exit", [=] { Exit(); });
}

void MainMenu(Bar& bar) {
bar.Sub("Menu", [=](Bar& bar) { SubMenu(bar); });
}

typedef MyAppWindow CLASSNAME;

MyAppWindow() {
Title("My application with menu").Sizeable();
AddFrame(menu);
menu.Set([=](Bar& bar) { MainMenu(bar); });
}
};

GUI_APP_MAIN
{
MyAppWindow app;
app.Run();
}

my email is foxsir2016@163.com
Re: Hey,i met a problem [message #47004 is a reply to message #47002] Thu, 20 October 2016 09:26 Go to previous messageGo to next message
BioBytes is currently offline  BioBytes
Messages: 307
Registered: October 2008
Location: France
Senior Member
Hi Foxsir,

What is the configuration of your build system ? Question Go to the build methods in the TheIde menu and post a snapshot of your screen

Biobytes Razz
Re: Hey,i met a problem [message #47005 is a reply to message #47002] Thu, 20 October 2016 14:50 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1077
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

For lambda callbacks please make sure you use nightly instead of stable release. Stable release currently doesn't have this feature. Nightly builds can be obtained from here.

Sincerely,
Klugier


U++ - one framework to rule them all.
Re: Hey,i met a problem [message #47020 is a reply to message #47005] Mon, 07 November 2016 08:43 Go to previous messageGo to next message
foxsir2016 is currently offline  foxsir2016
Messages: 3
Registered: November 2016
Junior Member
thx very much.
this is a old invalid, tutorial code from official web site...

then,i found the right one ,it in the IDE's help topic

thx,very much
Re: Hey,i met a problem [message #47023 is a reply to message #47020] Tue, 08 November 2016 21:28 Go to previous message
Klugier is currently offline  Klugier
Messages: 1077
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

If it is posted in u++ official documentation - it would be nice if you post url to this article. We belive that in documentation there shouldn't be mistakes like this.

Sincerely and thakns,
Klugier


U++ - one framework to rule them all.
Previous Topic: Hey,MyImages::MyImage() problem
Next Topic: not wanting to pick all members of user type
Goto Forum:
  


Current Time: Tue Jun 25 01:40:08 CEST 2024

Total time taken to generate the page: 0.03250 seconds