Changed signature of the TabPanel.addTab method

Discuss all problems you have with Servoy here. It might help to mention the Servoy version and Operating System version you are using

Changed signature of the TabPanel.addTab method

Postby rossent » Fri Sep 06, 2013 11:50 am

Hi Servoy,

Updating to the last i3 build of Servoy 7.2 (build 2016) we discovered that the last optional argument of the TabPanel.addTab is missing.

According to the documentation in the Wiki:

Code: Select all
addTab
BooleanaddTab(form/formname, [name], [tabText], [tooltip], [iconURL], [fg], [bg], [relatedfoundset/relationname], [index])
Adds a relationless or related form as a tab in a specified tabpanel.
Parameters
form/formname – the specified form/form name you wish to add as a tab
[name] – the specified name for the tab or NULL (default is null)
[tabText] – the specified text for the tab (default is null)
[tooltip] – a specified tooltip for the tab (default is null)
[iconURL] – a specified icon image or icon URL for the tab (default is null)
[fg] – the HTML RGB Hexadecimal foreground color for the tab (default is null)
[bg] – the HTML RGB Hexadecimal background color for the tab (default is null)
[relatedfoundset/relationname] – the specified name of the related foundset (default is null)
[index] – the specified index of a tab, default is -1, will add tab to the end


However in Servoy Developer, the last index argument is missing and we get code warnings.

My question is: is the index argument removed from the API and will no longer be available or is this a regression bug introduced in the last build (or some of the prior intermediate builds of 7.2) If the argument is intentionally removed and will not be available, how can developers specify the position of new tabs on the tabpanels?
Rossen Totev
Argos Software
rossent
 
Posts: 288
Joined: Wed Dec 31, 2008 2:03 pm

Re: Changed signature of the TabPanel.addTab method

Postby mboegem » Fri Sep 06, 2013 12:31 pm

Hi Rossen,

Better file a case for this.
Then it get's the attention which it needs right away.
As 'affected version' you need to specify 7.3
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1743
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Changed signature of the TabPanel.addTab method

Postby lvostinar » Fri Sep 13, 2013 1:02 pm

This will be fixed in Servoy 7.3 (will work as before). The bug is only for the docs/ developer part, at runtime everything runs as before.
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1062
Joined: Tue Feb 19, 2008 10:53 am

Re: Changed signature of the TabPanel.addTab method

Postby amcgilly » Fri Mar 04, 2016 11:04 pm

In 7.4.5 the signature for addTab() says that the [index] parameter is 0-based. If you specify 0 as the index, the tab will get added as the first tab on the left.

In all other tab-related methods and properties like getTabNameAt() and tabIndex, the tab index is 1-based. Unfortunately the signatures for these methods and properties don't mention that. To avoid confusion it would be helpful if the signatures for ALL tab-related methods and properties mentioned whether the tab index is 0-based or 1-based.

Thanks.
Adrian McGilly
Servoy Developer

Image
amcgilly
 
Posts: 375
Joined: Fri Dec 09, 2005 12:03 am
Location: San Francisco, CA


Return to Discuss possible Issues and Bugs

Who is online

Users browsing this forum: No registered users and 14 guests