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 » TreeCtrl » OptionTree problems
OptionTree problems [message #29725] Wed, 10 November 2010 14:56 Go to next message
avpavp is currently offline  avpavp
Messages: 19
Registered: September 2009
Promising Member
I am trying to use OptionTree. It appears that it should be able to manage the options internally. But if you call

OptionTree.Add( int parent, const char* text )

which should manage the Options internally,

it asserts when trying to access the (non-existent) option.

I also notice in the examples, there is a OptionTree example, and it uses external Options (because the internal options don't work?).

Am I doing something wrong? If not, is there anyone responsible for OptionTree?

Thanks,
avp
Re: OptionTree problems [message #29975 is a reply to message #29725] Wed, 01 December 2010 19:43 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
OptionTree requires external Options.

Mirek
Re: OptionTree problems [message #59933 is a reply to message #29725] Sun, 04 June 2023 11:08 Go to previous messageGo to next message
zouql is currently offline  zouql
Messages: 13
Registered: December 2020
Location: China
Promising Member
Hi mirek:

In the reference/TreeCtrl sample, I can not reproduce the icon display of optiontree mixed state.
I use upp_win_16800 version, and i have tested the Get(id) couldn't return the null state.


index.php?t=getfile&id=6812&private=0
Re: OptionTree problems [message #59946 is a reply to message #59933] Wed, 07 June 2023 09:44 Go to previous message
zouql is currently offline  zouql
Messages: 13
Registered: December 2020
Location: China
Promising Member
Hello mirek,

I think i found the reason.
In the CtrLib/Button.cpp Option& Option::Set(int b) function.
if the code is:
option = IsNull(b) ? Null : (bool)b;
then the option can't assign a Null.
but when changed to :
IsNull(b) ?  (option = Null) : (option = (bool)b);
the option can assigned to Null.

index.php?t=getfile&id=6814&private=0

index.php?t=getfile&id=6815&private=0
  • Attachment: buttoncpp.jpg
    (Size: 246.85KB, Downloaded 131 times)
  • Attachment: after.jpg
    (Size: 42.35KB, Downloaded 129 times)
Previous Topic: Iterate over all nodes
Next Topic: Scrollbar doesnt appear on TreeCtrl
Goto Forum:
  


Current Time: Fri Mar 29 05:34:49 CET 2024

Total time taken to generate the page: 0.01740 seconds