I can get the example code on the AutoDocs wiki to work, but it only gives me the first icon. How do I loop through to get all the icon names in the path? There is no way the example code could compare all the names to "Prefs" the way it is shown.
Sun, 2015-06-14 22:03
#1
ChangeWorkbenchSelection()
The example code looks wrong to me.
It should not be returning BOOL but one of three values.
try something like:
[edit]
Raised a BZ against the OS component.
I saw that too and am using the ignore tag. But I still don't know how to loop through the list of icons. The example shows only comparing the name once.
for(node=GetHead(list); node; node->GetSucc(list)) // or whatever the syntax is
{
....compare names
....return(found it)
}
return(didn't find it)
Your hook is called for each icon inside the drawer, given as the first argument in
ChangeWorkbenchSelection()
.So, the loop is done by workbench and not by the application.
You can stop the loop, by returning
ISMACTION_Stop
.So, lets say the drawer LoopMe has three icons Icon1, Icon2 and Icon3. Then SelectIcon is called three times:
@AND: That is what I thought it was supposed to do (and it is). I was totally not catching the names properly. My bad. It works as described. I am doing something totally different than the example.