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 » two state button via layout designer
two state button via layout designer [message #3436] Thu, 25 May 2006 10:32 Go to next message
qwerty is currently offline  qwerty
Messages: 130
Registered: May 2006
Experienced Member
...are there chances in next releases?
Re: two state button via layout designer [message #3439 is a reply to message #3436] Thu, 25 May 2006 12:32 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
It should work now?

Mirek
Re: two state button via layout designer [message #3442 is a reply to message #3439] Thu, 25 May 2006 16:16 Go to previous messageGo to next message
qwerty is currently offline  qwerty
Messages: 130
Registered: May 2006
Experienced Member
You ask me?

I ask you Smile, because I can't find that in layout designer(or I am overseeing something?)...
Re: two state button via layout designer [message #3444 is a reply to message #3442] Thu, 25 May 2006 17:30 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
qwerty wrote on Thu, 25 May 2006 10:16

You ask me?

I ask you Smile, because I can't find that in layout designer(or I am overseeing something?)...


Ah... It is Option with ThreeState activated...

Mirek
Re: two state button via layout designer [message #3446 is a reply to message #3444] Thu, 25 May 2006 18:42 Go to previous messageGo to next message
qwerty is currently offline  qwerty
Messages: 130
Registered: May 2006
Experienced Member
C:/MyApps/majpekidz/majpekidz.lay: In function `void InitLayout(Ctrl&, L&, D&, MajpekidzLayout__layid&) [with L = majpekidz, D = majpekidz]':
C:/upp/uppsrc/CtrlCore/TopWindow.h:210:   instantiated from `void CtrlLayout(T&) [with T = majpekidz]'
C:/upp/uppsrc/CtrlCore/TopWindow.h:218:   instantiated from `void CtrlLayout(T&, const char*) [with T = majpekidz]'
C:\MyApps\majpekidz\main.cpp:270:   instantiated from here
C:/MyApps/majpekidz/majpekidz.lay:34: error: 'class Pusher' has no member named 'ThreeState'


Option with ThreeState checked. Why is that? Similar error occured with SwitchImage checked...

[Updated on: Thu, 25 May 2006 18:43]

Report message to a moderator

Re: two state button via layout designer [message #3449 is a reply to message #3446] Thu, 25 May 2006 19:11 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
qwerty wrote on Thu, 25 May 2006 18:42

C:/MyApps/majpekidz/majpekidz.lay: In function `void InitLayout(Ctrl&, L&, D&, MajpekidzLayout__layid&) [with L = majpekidz, D = majpekidz]':
C:/upp/uppsrc/CtrlCore/TopWindow.h:210:   instantiated from `void CtrlLayout(T&) [with T = majpekidz]'
C:/upp/uppsrc/CtrlCore/TopWindow.h:218:   instantiated from `void CtrlLayout(T&, const char*) [with T = majpekidz]'
C:\MyApps\majpekidz\main.cpp:270:   instantiated from here
C:/MyApps/majpekidz/majpekidz.lay:34: error: 'class Pusher' has no member named 'ThreeState'


Option with ThreeState checked. Why is that? Similar error occured with SwitchImage checked...


Can you post the layout part of your *.lay that regard the error (CTRL+T and you see the text mode of lay file)?.

Luigi
Re: two state button via layout designer [message #3453 is a reply to message #3449] Thu, 25 May 2006 21:09 Go to previous messageGo to next message
qwerty is currently offline  qwerty
Messages: 130
Registered: May 2006
Experienced Member
sure

clean new app:

LAYOUT(MyAppLayout, 200, 100)
	ITEM(Option, oMyOption, SetLabel(t_("someName")).ThreeState(true).LeftPosZ(60, 42).TopPosZ(16, 15))
END_LAYOUT


compiler out:
----- CtrlLib ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (1 / 9)
----- CtrlCore ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (2 / 9)
----- RichText ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (3 / 9)
----- Draw ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (4 / 9)
----- Core ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (5 / 9)
----- Image ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (6 / 9)
----- plugin\png ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (7 / 9)
----- plugin\z ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (8 / 9)
----- MyApp ( GUI MAIN GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (9 / 9)
main.cpp
C:/MyApps/MyApp/MyApp.lay: In function `void InitLayout(Ctrl&, L&, D&, MyAppLayout__layid&) [with L = MyApp, D = MyApp]':
	
C:/upp/uppsrc/CtrlCore/TopWindow.h:210:   instantiated from `void CtrlLayout(T&) [with T = MyApp]'
C:/upp/uppsrc/CtrlCore/TopWindow.h:218:   instantiated from `void CtrlLayout(T&, const char*) [with T = MyApp]'
C:\MyApps\MyApp\main.cpp:7:   instantiated from here
C:/MyApps/MyApp/MyApp.lay:2: error: 'class Pusher' has no member named 'ThreeState'
MyApp: 1 file(s) built in (0:05.73), 5735 msecs / file, duration = 5735 msecs, parallelization 0%

There were errors. (0:06.00)


have any idea?
Re: two state button via layout designer [message #3457 is a reply to message #3453] Thu, 25 May 2006 22:27 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
qwerty wrote on Thu, 25 May 2006 21:09

sure

clean new app:

LAYOUT(MyAppLayout, 200, 100)
	ITEM(Option, oMyOption, SetLabel(t_("someName")).ThreeState(true).LeftPosZ(60, 42).TopPosZ(16, 15))
END_LAYOUT


compiler out:
----- CtrlLib ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (1 / 9)
----- CtrlCore ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (2 / 9)
----- RichText ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (3 / 9)
----- Draw ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (4 / 9)
----- Core ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (5 / 9)
----- Image ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (6 / 9)
----- plugin\png ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (7 / 9)
----- plugin\z ( GUI GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (8 / 9)
----- MyApp ( GUI MAIN GCC DEBUG DEBUG_FULL BLITZ WIN32 ) (9 / 9)
main.cpp
C:/MyApps/MyApp/MyApp.lay: In function `void InitLayout(Ctrl&, L&, D&, MyAppLayout__layid&) [with L = MyApp, D = MyApp]':
	
C:/upp/uppsrc/CtrlCore/TopWindow.h:210:   instantiated from `void CtrlLayout(T&) [with T = MyApp]'
C:/upp/uppsrc/CtrlCore/TopWindow.h:218:   instantiated from `void CtrlLayout(T&, const char*) [with T = MyApp]'
C:\MyApps\MyApp\main.cpp:7:   instantiated from here
C:/MyApps/MyApp/MyApp.lay:2: error: 'class Pusher' has no member named 'ThreeState'
MyApp: 1 file(s) built in (0:05.73), 5735 msecs / file, duration = 5735 msecs, parallelization 0%

There were errors. (0:06.00)

have any idea?

It is as suspected... Look this line:
C:/MyApps/MyApp/MyApp.lay:2: error: 'class Pusher' has no member named 'ThreeState'

In it the is the answer: SetLabel() return a class of type Pusher to which you can't apply the method .ThreeState().
The solution: simply remove .ThreeState in that line and use
	ITEM(Option, oMyOption, SetLabel(t_("someName")).LeftPosZ(60, 42).TopPosZ(16, 15))

Then in the constructor add the line:
oMyOption.ThreeState();

and the threestate button will appear.
If you do not use SetLabel() (empty label), then the you can apply the ThreeState() method directly in the designer.
Luigi
Re: two state button via layout designer [message #3458 is a reply to message #3457] Thu, 25 May 2006 22:44 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, this is "hierarchy ordering bug" in .usc script, something to fix.

To explain: Those "modifieres" (like ThreeState) are methods returning *this to be able to chain them.

However, there is potential trouble, as "modifier" can be method of and return base class and then be followed by "modifier" for derived class. Means, modifiers for derived classes have to be first in .lay file... which can be specified in .usc file (file with widgets description), but sometimes is faulty.

Mirek
Re: two state button via layout designer [message #3459 is a reply to message #3458] Thu, 25 May 2006 22:51 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Please try this fix:

CtrlLib/CtrlLib.usc, line 328:

ctrl Option {
	group "Push";

	Text   SetLabel ? @1 "Option text";
	>Base;


(the difference is "@1", which moves that method "to the right" after ThreeState etc...)

Mirek
Re: two state button via layout designer [message #3461 is a reply to message #3459] Thu, 25 May 2006 23:10 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
luzr wrote on Thu, 25 May 2006 22:51

Please try this fix:

CtrlLib/CtrlLib.usc, line 328:

ctrl Option {
	group "Push";

	Text   SetLabel ? @1 "Option text";
	>Base;


(the difference is "@1", which moves that method "to the right" after ThreeState etc...)

Mirek


Yes, it works. Now I get the sequence
	ITEM(Option, oMyOption, ThreeState(true).SetLabel(t_("my option")).LeftPosZ(60, 68).TopPosZ(16, 15))

That seems better as threestate works immediatly without workaround.

Luigi
Re: two state button via layout designer [message #3463 is a reply to message #3461] Thu, 25 May 2006 23:20 Go to previous messageGo to next message
qwerty is currently offline  qwerty
Messages: 130
Registered: May 2006
Experienced Member
I hope I will be resolving these glitches by myself in a future Confused

thank you very much, guys Cool
Re: two state button via layout designer [message #3506 is a reply to message #3461] Mon, 29 May 2006 22:06 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
forlano wrote on Thu, 25 May 2006 23:10


Yes, it works. Now I get the sequence
	ITEM(Option, oMyOption, ThreeState(true).SetLabel(t_("my option")).LeftPosZ(60, 68).TopPosZ(16, 15))

That seems better as threestate works immediatly without workaround.

Luigi

Only now I've seen a bad side effect: the tabctrl and the arrayctrl are not correctly shown in the right manner in designer. Moreover both control do not shown the full list of their properties.
For this reason I came back to the previous state.

Luigi
Re: two state button via layout designer [message #3586 is a reply to message #3506] Sun, 04 June 2006 18:34 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
forlano wrote on Mon, 29 May 2006 16:06

forlano wrote on Thu, 25 May 2006 23:10


Yes, it works. Now I get the sequence
	ITEM(Option, oMyOption, ThreeState(true).SetLabel(t_("my option")).LeftPosZ(60, 68).TopPosZ(16, 15))

That seems better as threestate works immediatly without workaround.

Luigi

Only now I've seen a bad side effect: the tabctrl and the arrayctrl are not correctly shown in the right manner in designer. Moreover both control do not shown the full list of their properties.
For this reason I came back to the previous state.

Luigi


Strange, it seems ok here...

Mirek
Re: two state button via layout designer [message #3592 is a reply to message #3586] Sun, 04 June 2006 22:21 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
luzr wrote on Sun, 04 June 2006 18:34


Strange, it seems ok here...

Mirek


This is what I see with
Text   SetLabel ? @1 "Option text";

index.php?t=getfile&id=162&private=0
and ... (see next post)
  • Attachment: v5_1.jpg
    (Size: 28.19KB, Downloaded 1835 times)
Re: two state button via layout designer [message #3593 is a reply to message #3592] Sun, 04 June 2006 22:23 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
This is what I see with
Text   SetLabel ? "Option text";


index.php?t=getfile&id=163&private=0
  • Attachment: v5_3.jpg
    (Size: 25.48KB, Downloaded 1854 times)
Re: two state button via layout designer [message #3594 is a reply to message #3592] Sun, 04 June 2006 22:29 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
forlano wrote on Sun, 04 June 2006 16:21

luzr wrote on Sun, 04 June 2006 18:34


Strange, it seems ok here...

Mirek


This is what I see with
Text   SetLabel ? @1 "Option text";

index.php?t=getfile&id=162&private=0
and ... (see next post)



Should be

Text SetLabel @1 ? "Option text";


Mirek
Re: two state button via layout designer [message #3595 is a reply to message #3594] Sun, 04 June 2006 23:41 Go to previous message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
luzr wrote on Sun, 04 June 2006 22:29



Should be

Text SetLabel @1 ? "Option text";


Mirek


Opsss... Now it works.
Thank you

Luigi
Previous Topic: simple text_edit
Next Topic: Stripping unnecessary classes
Goto Forum:
  


Current Time: Sun Apr 28 21:34:25 CEST 2024

Total time taken to generate the page: 0.02856 seconds