How does the onSelect function work? I called it and it says the function does not exist.
function buildbot_filelist::onselect(){ if($buildbot::doubleclick) { if(getsimtime() - $buildbotfileclick < 500) { buildbot_open(); $buildbotfileclick = 0; return 1; } $buildbotfileclick = getsimtime(); return 0; } buildbot_open(); return 1;}function buildbot_open(){ if((%row = buildbot_filelist.getselectedid()) >= 0) { $buildbotpath = $buildbotpath @ getfield(buildbot_filelist.getrowtextbyid(%row), 1); buildbot_refresh($buildbotpath); return 1; } return 0;}
It works with a text list controlfrom Client_Buildbot/client.csCode: [Select]function buildbot_filelist::onselect(){ if($buildbot::doubleclick) { if(getsimtime() - $buildbotfileclick < 500) { buildbot_open(); $buildbotfileclick = 0; return 1; } $buildbotfileclick = getsimtime(); return 0; } buildbot_open(); return 1;}function buildbot_open(){ if((%row = buildbot_filelist.getselectedid()) >= 0) { $buildbotpath = $buildbotpath @ getfield(buildbot_filelist.getrowtextbyid(%row), 1); buildbot_refresh($buildbotpath); return 1; } return 0;}looking back at this, it doesn't look like I accounted for clicking on two different options in rapid succession. I should fix that.
Add-Ons/Client_Friends/Packages.cs (28): Unknown command onSelect.
You can't call the command to cause an effect unless it's already defined for that control. What are you trying to do?
Create the function nameOfYourListControl::onSelect instead of calling it.In regard to your second question, use getField instead of getWord.
That's what I was doing, function NPL_List::onSelect(%a, %b, %rowText)
The following error would only occur if you explicitly/implicitly called the function or attempted to do parent::onSelect:
Any way to parent it then?