I’d like to add to my list control possibility of sorting after clicking on column headers. However I am failing at a very early stage - getting the list of the header buttons with TGListView::GetHeaderButons(). It fails in both threaded and non-threaded version, I attach an example (a bit complicated but that is what I have now). etos_dispatcher.C (853 Bytes) triggerwindow.py (4.7 KB)
the problem is that the return type of this:TGTextButton** GetHeaderButtons() { return fColHeader; }is treated as thisTGTextButton* GetHeaderButtons() { return fColHeader; }in ROOT5. It’s handled (more) properly in ROOT6. I can backport that code, but that won’t give what you want, as the returned result will be a TGTextButton** object, not a TGTextButton*[] array.
The code does not actually use the result (yet). What is the eventual code (in (pseudo-)code if possible)?
that’s going to be hard. The problem first of all being that a concept like “TGTextButton**” is known and handled, so somehow at run-time it must be changed to “TGTextButton*[]” instead. That’ll need some thinking.
Likely you can reconstitute this with AddressOf(), a pointer addition, and BindObject() though.