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 » U++ Library support » U++ Widgets - General questions or Mixed problems » bug: declaring widget as global
bug: declaring widget as global [message #47888] Wed, 19 April 2017 11:20 Go to previous message
luoganda is currently offline  luoganda
Messages: 204
Registered: November 2016
Experienced Member
This is from fatal error dialog:
Assertion failed in .../uppsrc/CtrlCore/Ctrl.cpp, line 570,
GUI widgets cannot be global variables

All 4 variants does not work,
this in on linux 64,gcc
CodeEditor& codeedit = Single<CodeEditor>();

CodeEditor& _gce(){static CodeEditor _;return _;}
CodeEditor& gcedit=_gce();

struct Globs{
	CodeEditor gcedit;
}globs;

One<CodeEditor> _gcedit=MakeOne<CodeEditor>();
CodeEditor *gcedit=_gcedit.Get();

... the only thing that works is declaring it as usual in some TopWindow class
 
Read Message
Read Message
Previous Topic: FileSelPreview - No previews bmp files (UPP 10694, 64bit, GCC, C++11)
Next Topic: About LabelBox and child widgets
Goto Forum:
  


Current Time: Wed Jul 17 19:25:59 CEST 2024

Total time taken to generate the page: 0.03613 seconds