[resolved] ClickTab Close gadgets

Online Status

I have a clicktab gadget featuring close gadgets. When clicking on the close gadgets on the tabs I'm not getting the event. I'm not 100% sure where the code is failing as yet, but I do know the same code works on OS4.

My event code is effectively:

// we have received a GADGETUP for the clicktab
GetAttr(CLICKTAB_NodeClosed, objects[GID_TABS], &tabnode);

if(tabnode) {
		GetClickTabNodeAttrs(tabnode,
			TNA_UserData, &userdata,
			TAG_DONE);

		close_tab(userdata);
    }

If needed I'll try to create a small example which shows the problem.

I notice the Autodoc mentions CLICKTAB_Closed has further information but that section isn't in the Autodoc.

It also says the close gadget image won't show on inactive tabs as you can't close them, but it shows up on all tabs here. Clicking the close gadget image does nothing at all, on the current or any other tab.

Online Status

I see how the autodocs are completely wrong here on all 3 counts. Closing a node will not cause a gadgetup event. Instead you need to listen to the notify out of the gadget. If a CLICKTAB_NodeClosed is sent out that way it signals that the tab is closed

Online Status

Set up an ICA_TARGET for the gadget and now receiving NodeClosed events. No wonder it didn't work previously! Thanks!