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 |
luoganda
Messages: 205 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
|
|
|
|
Goto Forum:
Current Time: Sat Sep 21 04:57:24 CEST 2024
Total time taken to generate the page: 0.03508 seconds
|