onTabChange problem? Maybe bug?

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

onTabChange problem? Maybe bug?

Postby Bonkie » Wed Nov 28, 2007 1:41 pm

I've encountered a problem with the onTabChange property.

Code: Select all
var vLastIndex =  arguments[0]


This results in the last tab index. But the problem comes now.
I'm making a method for history back/forward buttons that also remembers the tabindexes. When I click on the back/forward buttons (see code for the method below) it doesnt result in the lasttabindex like it should.
For example: I click on Tab 1, tab 2 and tab 4, then I click the back button. But the index is now set to Tab 3, however the last tabindex is 1 (Tab 2).

Add to history
Code: Select all
vMyObject.type = 'tab'
   vMyObject.formname = currentcontroller.getName()
   vMyObject.table = forms[vForm].foundset.getTableName()
   vMyObject.server = forms[vForm].foundset.getServerName()
   vMyObject.lastTabIndex = vLastIndex;
   vMyObject.tabname = vTab
   


Back in history button:
Code: Select all
         var vTabIndex = vObject.lastTabIndex
         var vTab = vObject.tabname
      application.output('TI::: ' +vObject.lastTabIndex);
         forms[vForm].elements[vTab].tabIndex = vTabIndex


Am I doing something wrong in the Method, or is this a Servoy issue?
Rick Bonkestoter
Certified Servoy 7 Developer

Direct ICT / ServoyCamp
User avatar
Bonkie
 
Posts: 68
Joined: Wed Jun 27, 2007 11:05 am
Location: Den Ham, The Netherlands

Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 10 guests