Method MyConv::Scan never gets called when running code case below:
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
struct MyConv : Convert
{
Value Scan(const Value& text) const
{
return "returning whatever I want!";
}
};
class App : public TopWindow
{
public:
typedef App CLASSNAME;
App()
{
Add(arr.SizePos());
arr.AddColumn("some column").SetConvert(Single<MyConv>());
for(int i = 0; i < 10; i++)
arr.Add(Format("double click here - %d", i));
arr.WhenLeftDouble = THISBACK(DDClick);
}
void DDClick()
{
PromptOK(arr.Get(0).ToString());
}
ArrayCtrl arr;
};
GUI_APP_MAIN
{
App().Run();
}
Isn't Convert::Scan all about 'returning whatever I want' into my PromptOK? Well, it doesn't! It just relays unchanged row content after double clicking it.
After poking around for a while, I ended up inserting the following patch in ArrayCtrl.cpp near line #336: