Home » Community » Newbie corner » Issues using 2015.2 version
Re: Issues using 2015.2 version [message #45894 is a reply to message #45893] |
Thu, 21 January 2016 18:34   |
Lance
Messages: 656 Registered: March 2007
|
Contributor |
|
|
Hi Giorgioļ¼
Not sure if you are directly using the BarcodeTest program, anyway, the following line generates the problem you referred to
GUI_APP_MAIN
{
auto a=MyApp(); <============ This line
a.Sizeable().MaximizeBox();
a.Maximize();
a.Run();
}
while MyApp has this definition
struct MyApp : WithBarcodeTestLayout<TopWindow>
{
MyApp(){
CtrlLayout(*this, "Barcode Test");
input<<=THISBACK(Updated);
print.SetImage(CtrlImg::print())<<=THISBACK(Print);
top<<=2;
left<<=2;
}
virtual void Paint(Draw& w);
void GenBarcode();
void Print();
void Updated()
{
Refresh();
Code128 c(String().Cat()<<~input);
EAN ean(AsString(~input));
PDF417 pdf(AsString(~input));
richview.SetQTF(String("[ ").Cat()
<<c.DisplayText("Hi, U++ user!")
.Color(Red()).BarRatio(36)
<<"&&" // new line
<<ean.Type(EAN::EAN8UPCAEAN13)
.DisplayText("Best Seller")
<<"&&"
<<pdf.FixedAspectRatio(3,2)
);
}
typedef MyApp CLASSNAME;
};
There are not even any data members (except ones inherits from its ancestors) in the MyApp struct definition, so it could not be because of anything from my barcode library.
I am also puzzled on that line. Logically local variable a should be default constructed once, instead of a default construct of a temporary and then an assignment, so it should be equivalent to
Apparently I was wrong. Anyway, change the line to above fixed the problem. I was wondering why should I use the more cumbersome form at first place. So if you are using the BarcodeTest program directly, change the GUI_MAIN to the following form will fix your problem:
GUI_APP_MAIN
{
MyApp a;
a.Sizeable().MaximizeBox();
a.Maximize();
a.Run();
}
HTH
|
|
|
 |
|
Issues using 2015.2 version
By: Giorgio on Thu, 21 January 2016 11:31
|
 |
|
Re: Issues using 2015.2 version
|
 |
|
Re: Issues using 2015.2 version
By: Giorgio on Thu, 21 January 2016 13:48
|
 |
|
Re: Issues using 2015.2 version
By: Lance on Thu, 21 January 2016 18:34
|
 |
|
Re: Issues using 2015.2 version
|
 |
|
Re: Issues using 2015.2 version
By: forlano on Tue, 26 January 2016 23:32
|
 |
|
Re: Issues using 2015.2 version
By: mirek on Wed, 27 January 2016 07:27
|
 |
|
Re: Issues using 2015.2 version
By: forlano on Wed, 27 January 2016 21:10
|
 |
|
Re: Issues using 2015.2 version
By: Giorgio on Fri, 22 January 2016 15:08
|
 |
|
Re: Issues using 2015.2 version
By: mr_ped on Sat, 23 January 2016 12:08
|
 |
|
Re: Issues using 2015.2 version
By: Oblivion on Sat, 23 January 2016 22:59
|
 |
|
Re: Issues using 2015.2 version
By: Giorgio on Mon, 25 January 2016 09:48
|
 |
|
Re: Issues using 2015.2 version
By: mr_ped on Wed, 27 January 2016 22:42
|
 |
|
Re: Issues using 2015.2 version
By: forlano on Thu, 28 January 2016 15:42
|
 |
|
Re: Issues using 2015.2 version
By: forlano on Sat, 30 January 2016 14:03
|
Goto Forum:
Current Time: Mon May 05 01:40:45 CEST 2025
Total time taken to generate the page: 0.03632 seconds
|