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 » Gui Tutorial 16 oops...
icon5.gif  Gui Tutorial 16 oops... [message #8954] Mon, 09 April 2007 23:23 Go to next message
jimmygyuma is currently offline  jimmygyuma
Messages: 6
Registered: April 2007
Location: Yuma, AZ
Promising Member
You'll need to refer to the Gui Tutorial 16 to follow this.
I compiled and ran it, then changed some things in the designer and it wouldn't complile. I undid everything, compiled. Then I made the following changes one by one, compiling after each.
Set Label font to bold.
Set Label ink to White.
Set Option font to bold.
Set Option ink to White ... and got this:

C:/upp/tutorial/Gui16/dlg.lay: In function `void InitLayout(Upp::Ctrl&, L&, D&, DlgLayout__layid&) [with L = MyApp, D = MyApp]':
C:/upp/uppsrc/CtrlCore/TopWindow.h:220: instantiated from `void Upp::CtrlLayout(T&) [with T = MyApp]'
C:/upp/uppsrc/CtrlCore/TopWindow.h:228: instantiated from `void Upp::CtrlLayout(T&, const char*) [with T = MyApp]'
C:\upp\tutorial\Gui16\main.cpp:10: instantiated from here
C:/upp/tutorial/Gui16/dlg.lay:4: error: 'class Upp::Pusher' has no member named 'SetInk'
Gui16: 1 file(s) built in (0:03.57), 3578 msecs / file, duration = 3594 msecs

In an ideal world, the designer wouldn't let me set something that wouldn't fly, but aside from that, if it 'has no member named "SetInk",' why is it there inviting you to change it?
Re: Gui Tutorial 16 oops... [message #8958 is a reply to message #8954] Tue, 10 April 2007 09:04 Go to previous messageGo to next message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
Just had a look at it and it seems like Pusher realy has not a SetInk method which makes no sense to me.

@Mirek:
should be added to Pusher will we add it to 2007.1? should only be a small fix.

Bas
Re: Gui Tutorial 16 oops... [message #8960 is a reply to message #8958] Tue, 10 April 2007 11:01 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Sorry about this, it is "ordering bug".

The problem is that modifier methods (like SetInk) have to be chained in specific order, otherwise "return *this;" upcasts the chain to the base class (Pusher in this case).

Thinking about it, maybe we do not need to use chaining calls in layouts, that would solve the problem once forever... but too risky for 2007.1.

Mirek
Re: Gui Tutorial 16 oops... [message #8970 is a reply to message #8954] Tue, 10 April 2007 23:29 Go to previous messageGo to next message
jimmygyuma is currently offline  jimmygyuma
Messages: 6
Registered: April 2007
Location: Yuma, AZ
Promising Member
...uh, thanks, I think.
Re: Gui Tutorial 16 oops... [message #8979 is a reply to message #8970] Wed, 11 April 2007 08:34 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
jimmygyuma wrote on Tue, 10 April 2007 17:29

...uh, thanks, I think.


Well, at least you have the chance to exercise setting them in the code Wink

(Will fix the bug ASAP).

Mirek
Previous Topic: problems with popup/pulldown menus on Gentoo/kde linux
Next Topic: Layouts, sizers etc
Goto Forum:
  


Current Time: Sat Apr 20 00:21:43 CEST 2024

Total time taken to generate the page: 0.02659 seconds