Normal Topic [Solved]Tabpage "combobox" throwfocus not working? (Read 1140 times)
CliffN
Ex Member


[Solved]Tabpage "combobox" throwfocus not working?
Nov 26th, 2007 at 1:20am
Print Post Print Post  
I have an odd thing happening...

I have a tab page with several text box elements and two combo box elements.

The first combo box is designed to throwfocus to the next element on the parent tab page upon immediate change...and it does that nicely...this is followed by several text box elements up to our final element which is the second combo box.

I designed the second combo box to throw focus upon immediate change to the next LE in the form which is the first item on the following tab page. (using the same method as for the first combo box...simply stating throwfocus(iname) upon immediate change (tried every other iteration of on exit, change, etc. as well...)

However...the tab page does not increment to the next tab page...

Interestingly enough, I can see that the "focus" has been shifted to the next element on the following tab page by observing its behavior in the spec manager.

Things I've done...

I can throw focus to the element on the following tab page AND increment the tab page successfully if I change the combo box element to a text box element.

I have quadruple checked that none of the LE's are read only and...I also added a hidden text box element as the last element on the tab page in question as a precaution (based on some of the things I've read in this forum).

I've also tried using the "goto" command and the "cnext" command as well as trying a couple other tricks using a simple boolean operator and a check box suggesting that throwfocus occur whent the check box is "true"...but it seems that I can not throw focus to another LE on another tab page from any type LE other than a text box...??

This isn't a major deal...however, I am trying to create as elegant an application as is possible for our client...and this capability would be nice.

Any and all help is very much appreciated...

Thanks kindly...

Cliff
« Last Edit: Nov 30th, 2007 at 2:08pm by Hammer »  
Back to top
 
IP Logged
 
Ben
Lantica Support
*****
Offline



Posts: 218
Joined: Apr 7th, 2005
Re: Tabpage "combobox" throwfocus not working?
Reply #1 - Nov 26th, 2007 at 4:28pm
Print Post Print Post  
Hello Cliff,
What version of Sesame are you running?
Do you have any other programming besides the throwfocus commands on your form?
  
Back to top
IP Logged
 
CliffN
Ex Member


Re: Tabpage "combobox" throwfocus not working?
Reply #2 - Nov 27th, 2007 at 1:20am
Print Post Print Post  
Hi Ben...thanks for the response. We are running Sesame version: 1.1.4.

We have a bunch of (albeit simple) programming as follows: (which all seems to work fine)...

Thanks again...

Cliff



** PROGRAMMING SECTION: [ GLOBAL CODE ] [] **

SubRoutine CalculateTotal1()

var aTotal as double

aTotal = POL_PREM + PREMIUM_FOR_TERROR + FEES

TOT_POL = aTotal

End Subroutine


SubRoutine CalculateTotal2()

var bTotal as double

bTotal = RR_ES_LIM + RR_MS_LIM

RR_MAX_LIM = bTotal

End Subroutine



** PROGRAMMING SECTION: [BUILDERS RISK] [On Element Entry] **
//var vTreeStatus as INT


// Open or Close Command tree

//vTreeStatus = @CloseCommandArea()

//If vTreeStatus = 0 Then
//      {
//      CloseCommandArea(1)
//      }
//ELSE
//      {
//      CloseCommandArea(1)
//      }

//ForceRedraw()






** PROGRAMMING SECTION: [EXIT_1] [On Element Entry] **
// EXITS THE RECORD
// This works whether adding or searching records because both Menu Tree items are covered
var vNav as Int
If @UpDate Then
{
vNav = @SelectTreeItem("Search Update Menu!Exit Search Update")
@exit
}
If @Add Then
{
vNav = @SelectTreeItem("Add Data Menu!Exit Add Data")
@exit
}
vNav = ""



** PROGRAMMING SECTION: [SAVE_1] [On Element Entry] **
// Saves the record and then Exits current mode to the Menu
// This works whether adding or searching records because both Menu Tree items are covered
var vNav as Int
If @UpDate Then
{
     vNav = @SelectTreeItem("Search Update Menu!Navigation!Save Record")
     @exit
}
If @Add Then
{
     vNav = @SelectTreeItem("Add Data Menu!Navigation!Save Record")
     @exit
}
vNav = ""



** PROGRAMMING SECTION: [SEARCH] [On Element Entry] **
Var vMenu as INT
vMenu = @SelectTreeItem("BUILDERS RISK!Forms!Search/Update!BUILDERS RISK!BUILDERS RISK")



** PROGRAMMING SECTION: [TODAYS_DATE] [On Form Entry] **
TODAYS_DATE = @DATE



** PROGRAMMING SECTION: [PRE] [On Element Entry] **



** PROGRAMMING SECTION: [PRE] [On Element Immediate Change] **
IF PRE = "DIH"

THEN

TERROR_FORMS = "NAS-GLB-NOTICE (12/00)"

IF PRE = "DIN"

THEN

TERROR_FORMS = "NAS-CTER-END (02/03)"
TERROR_FORMS1 = "NAS-TERR-005 (11/02)"

IF PRE = "DIH" OR PRE = "DIN"

THEN

GOTO POLICY_NO





** PROGRAMMING SECTION: [CLASS_CODE] [On Element Entry] **



** PROGRAMMING SECTION: [CLASS_CODE] [On Element Exit] **



** PROGRAMMING SECTION: [CLASS_CODE] [On Form Change] **



** PROGRAMMING SECTION: [CLASS_CODE] [On Element Change] **



** PROGRAMMING SECTION: [CLASS_CODE] [On Form Entry] **



** PROGRAMMING SECTION: [CLASS_CODE] [On Form Exit] **



** PROGRAMMING SECTION: [CLASS_CODE] [On Element Immediate Change] **



** PROGRAMMING SECTION: [DATE_ISSUED] [On Form Entry] **
If @IsNew Then
{
     DATE_ISSUED = @Date
}



** PROGRAMMING SECTION: [UNDWRTR] [On Element Entry] **



** PROGRAMMING SECTION: [UNDWRTR] [On Element Exit] **



** PROGRAMMING SECTION: [UNDWRTR] [On Element Change] **



** PROGRAMMING SECTION: [UNDWRTR] [On Form Exit] **



** PROGRAMMING SECTION: [UNDWRTR] [On Element Immediate Change] **
THROWFOCUS(INAME)



** PROGRAMMING SECTION: [ISTATE] [On Element Exit] **
//STATE CONDITIONS FOR NY/VT/VA


IF ISTATE = "NY" OR ISTATE = "VT"
{
A3 = ""
}
ELSE
IF ISTATE <> "NY" OR ISTATE = "VT"
{
A3 = "NAS-BR-020 (03/02)"
}

IF ISTATE = "VA" OR ISTATE = "VT"
{
A4 = ""
}
ELSE
IF ISTATE <> "VA" OR ISTATE = "VT"
{
A4 = "CL 0100 (03/99)"
}

//ALL OTHER CONDITIONS


if pre = "dih" and istate = "ct"
{
a13 = "CL0180 01 01"
}
else
IF PRE = "DIN" AND ISTATE = "CT"
{
a13 = ""
}

if pre = "din" and istate = "ct"
{
a19 = "CL0180 01 01"
}
else
IF PRE = "DIH" AND ISTATE = "CT"
{
a19 = ""
}



IF PRE = "DIH" AND ISTATE = "DE"
{
A13 = ""
}

IF PRE = "DIN" AND ISTATE = "DE"
{
A19 = ""
}

if pre = "dih" and istate = "ga"
{
a13 = "CL 0128 01 01"
a14 = "IM 2021 04 04"
a15 = "IM 2201 10 06"
}
else
if pre = "din" and istate = "ga"
{
a13 = ""
a14 = ""
a15 = ""
}


IF PRE = "DIN" AND ISTATE = "GA"
{
A19 = "CL 0128 01 01"
A20 = "IM 2021 04 04"
A21 = "IM 2201 10 06"
}
ELSE
IF PRE = "DIH" AND ISTATE = "GA"
{
A19 = ""
A20 = ""
A21 = ""
}

IF PRE = "DIH" AND ISTATE = "MA"
{
A13 = "CL 0233 12 03"
A14 = "IM 2043 04 04"
}
ELSE
IF PRE = "DIN" AND ISTATE = "MA"
{
A13 = ""
A14 = ""
}

IF PRE = "DIN" AND ISTATE = "MA"
{
A19 = "CL 0233 12 03"
A20 = "IM 2043 04 04"
}
ELSE
IF PRE = "DIH" AND ISTATE = "MA"
{
A19 = ""
A20 = ""
}

IF PRE = "DIH" AND ISTATE = "MD"
{
A13 = "CL 0168 10 06"
A14 = "IM 2041 09 06"
}
ELSE
IF PRE = "DIN" AND ISTATE = "MD"
{
A13 = ""
A14 = ""
}

IF PRE = "DIN" AND ISTATE = "MD"
{
A19 = "CL 0168 10 06"
A20 = "IM 2041 09 06"
}
ELSE
IF PRE = "DIH" AND ISTATE = "MD"
{
A19 = ""
A20 = ""
}

IF PRE = "DIH" AND ISTATE = "ME"
{
A13 = "CL 0116 03 04"
A14 = "IM 2039 04 04"
}
ELSE
IF PRE = "DIN" AND ISTATE = "ME"
{
A13 = ""
A14 = ""
}

IF PRE = "DIN" AND ISTATE = "ME"
{
A19 = "CL 0116 03 04"
A20 = "IM 2039 04 04"
}
ELSE
IF PRE = "DIH" AND ISTATE = "ME"
{
A19 = ""
A20 = ""
}

IF PRE = "DIH" AND ISTATE = "MI"
{
A13 = "CL0200 03 99"
A14 = "IM 2045 03 07"
}
ELSE
IF PRE = "DIN" AND ISTATE = "MI"
{
A13 = ""
A14 = ""
}

IF PRE = "DIN" AND ISTATE = "MI"
{
A19 = "CL 0200 03 99"
A20 = "IM 2045 03 07"
}
ELSE
IF PRE = "DIH" AND ISTATE = "MI"
{
A19 = ""
A20 = ""
}

IF PRE = "DIH" AND ISTATE = "MN"
{
A13 = "CL 0142 03 99"
A14 = "IM 3004 12 99"
}
ELSE
IF PRE = "DIN" AND ISTATE = "MN"
{
A13 = ""
A14 = ""
}

IF PRE = "DIN" AND ISTATE = "MN"
{
A19 = "CL 0142 03 99"
A20 = "IM 3004 12 99"
}
ELSE
IF PRE = "DIH" AND ISTATE = "MN"
{
A19 = ""
A20 = ""
}

IF PRE = "DIH" AND ISTATE = "NC"
{
A13 = "CL 0158 01 01"
A14 = "CL 1057 10 04"
A15 = "IM 2067 09 06"
}
ELSE
IF PRE = "DIN" AND ISTATE = "NC"
{
A13 = ""
A14 = ""
A15 = ""
}

IF PRE = "DIN" AND ISTATE = "NC"
{
A19 = "CL 0158 01 01"
A20 = "CL 1057 10 04"
A21 = "IM 2067 09 06"
}
ELSE
IF PRE = "DIH" AND ISTATE = "NC"
{
A19 = ""
A20 = ""
A21 = ""
}

IF PRE = "DIH" AND ISTATE = "NH"
{
A13 = "CL 0138 01 01"
A14 = "IM 2059 11 04"
}
ELSE
IF PRE = "DIN" AND ISTATE = "NH"
{
A13 = ""
A14 = ""
}

IF PRE = "DIN" AND ISTATE = "NH"
{
A19 = "CL 0138 01 01"
A20 = "IM 2059 11 04"
}
ELSE
IF PRE = "DIH" AND ISTATE = "NH"
{
A19 = ""
A20 = ""
}

IF PRE = "DIH" AND ISTATE = "NJ"
{
A13 = "CL 0146 10 02"
A14 = "IM 2061 04 04"
}
ELSE
IF PRE = "DIN" AND ISTATE = "NJ"
{
A13 = ""
A14 = ""
}

IF PRE = "DIN" AND ISTATE = "NJ"
{
A19 = "CL 0146 10 02"
A20 = "IM 2061 04 04"
}
ELSE
IF PRE = "DIH" AND ISTATE = "NJ"
{
A19 = ""
A20 = ""
}

IF PRE = "DIH" AND ISTATE = "NY"
{
A13 = "CL 0140 02 05"
A14 = "IM 2065 04 04"
}
ELSE
IF PRE = "DIN" AND ISTATE = "NY"
{
A13 = ""
A14 = ""
}

IF PRE = "DIN" AND ISTATE = "NY"
{
A19 = "CL 0140 02 05"
A20 = "IM 2065 04 04"
}
ELSE
IF PRE = "DIH" AND ISTATE = "NY"
{
A19 = ""
A20 = ""
}

IF PRE = "DIH" AND ISTATE = "PA"
{
A13 = "CL 0124 01 01"
A14 = "IM 2077 04 04"
A15 = "ML 0120 03 99"
}
ELSE
IF PRE = "DIN" AND ISTATE = "PA"
{
A13 = ""
A14 = ""
A15 = ""
}

IF PRE = "DIN" AND ISTATE = "PA"
{
A19 = "CL 0124 01 01"
A20 = "IM 2077 04 04"
A21 = "ML 0120 03 99"
}
ELSE
IF PRE = "DIH" AND ISTATE = "PA"
{
A19 = ""
A20 = ""
A21 = ""
}

IF PRE = "DIH" AND ISTATE = "RI"
{
A13 = "CL 0166 10 05"
A14 = "IM 2081 04 04"
}
ELSE
IF PRE = "DIN" AND ISTATE = "RI"
{
A13 = ""
A14 = ""
}

IF PRE = "DIN" AND ISTATE = "RI"
{
A19 = "CL 0166 10 05"
A20 = "IM 2081 04 04"
}
ELSE
IF PRE = "DIH" AND ISTATE = "RI"
{
A19 = ""
A20 = ""
}

IF PRE = "DIH" AND ISTATE = "SC"
{
A13 = "CL 0114 03 99"
A14 = "IM 2083 09 06"
}
ELSE
IF PRE = "DIN" AND ISTATE = "SC"
{
A13 = ""
A14 = ""
}

IF PRE = "DIN" AND ISTATE = "SC"
{
A19 = "CL 0114 03 99"
A20 = "IM 2083 09 06"
}
ELSE
IF PRE = "DIH" AND ISTATE = "SC"
{
A19 = ""
A20 = ""
}

IF PRE = "DIH" AND ISTATE = "TN"
{
A13 = "CL 0118 01 01"
}
ELSE
IF PRE = "DIN" AND ISTATE = "TN"
{
A13 = ""
}

IF PRE = "DIN" AND ISTATE = "TN"
{
A19 = "CL 0118 01 01"
}
ELSE
IF PRE = "DIH" AND ISTATE = "TN"
{
A19 = ""
}

IF PRE = "DIH" AND ISTATE = "VA"
{
A13 = "CL 0101 01 01"
A14 = "CL 0302 05 00"
A15 = "IM 2105 01 07"
}
ELSE
IF PRE = "DIN" AND ISTATE = "VA"
{
A13 = ""
A14 = ""
A15 = ""
}

IF PRE = "DIN" AND ISTATE = "VA"
{
A19 = "CL 0101 01 01"
A20 = "CL 0302 05 00"
A21 = "IM 2105 01 07"
}
ELSE
IF PRE = "DIH" AND ISTATE = "VA"
{
A19 = ""
A20 = ""
A21 = ""
}

IF PRE = "DIH" AND ISTATE = "VT"
{
A13 = "CL 0132 01 01"
A14 = "IM 2093 10 05"
}
ELSE
IF PRE = "DIN" AND ISTATE = "VT"
{
A13 = ""
A14 = ""
}

IF PRE = "DIN" AND ISTATE = "VT"
{
A19 = "CL 0132 01 01"
A20 = "IM 2093 10 05"
}
ELSE
IF PRE = "DIH" AND ISTATE = "VT"
{
A19 = ""
A20 = ""
}



** PROGRAMMING SECTION: [IZIP] [On Element Exit] **
THROWFOCUS(COVERED_PROP)



** PROGRAMMING SECTION: [SINGLE_RISK] [On Element Change] **
CNEXT




** PROGRAMMING SECTION: [SINGLE_RISK] [On Element Immediate Change] **
IF SINGLE_RISK = "T"

THEN

A7 = "NAS-BR-DEC-SR (01/08)"
A8 = "NAS-BR-SCH-SR (01/08)"
A9 = "IM 7088 04 04"

if single_risk and reno_risk = "t"
if reno_risk and single_risk = "t"

then

@Msgbox("","Please Select Only One Risk Type","")

if single_risk and rptg_risk = "t"
if rptg_risk and single_risk = "t"

then

@Msgbox("","Please Select Only One Risk Type","")

ELSE CNEXT








** PROGRAMMING SECTION: [SR_RATE] [On Element Change] **
//CalculateTotal()
//CalculateTotal1()



** PROGRAMMING SECTION: [SR_MAX_LIM] [On Element Change] **
// Run Subroutine
//CalculateTotal()
//CalculateTotal1()



** PROGRAMMING SECTION: [RENO_RISK] [On Element Change] **
THROWFOCUS(RR_RATE)



** PROGRAMMING SECTION: [RENO_RISK] [On Element Immediate Change] **
IF RENO_RISK = "T"

THEN

A7 = "NAS-BR-DEC-SR (01/08)"
A8 = "NAS-BR-SCH-SR (01/08)"
A9 = "IM 7088 04 04"

if single_risk and reno_risk = "t"
if reno_risk and single_risk = "t"

then

@Msgbox("","Please Select Only One Risk Type","")



** PROGRAMMING SECTION: [RR_ES_LIM] [On Element Change] **
CalculateTotal2()



** PROGRAMMING SECTION: [RR_MS_LIM] [On Element Entry] **
CalculateTotal2()



** PROGRAMMING SECTION: [RR_MAX_LIM] [On Element Entry] **
CalculateTotal2()



** PROGRAMMING SECTION: [RPTG_RISK] [On Element Change] **
THROWFOCUS(RP_PER)



** PROGRAMMING SECTION: [RPTG_RISK] [On Element Immediate Change] **
IF RPTG_RISK = "t"

THEN

A7 = "NAS-BR-DEC-RF (01/08)"
A8 = "NAS-BR-SCH-RF (01/08)"
A9 = "IM 7088 04 04"

if single_risk and rptg_risk = "t"
if rptg_risk and single_risk = "t"

then

@Msgbox("","Please Select Only One Risk Type","")

if rptg_risk and reno_risk = "t"
if reno_risk and rptg_risk = "t"

then

@Msgbox("","Please Select Only One Risk Type","")



** PROGRAMMING SECTION: [POL_PREM] [On Element Change] **
// Run Subroutine
//CalculateTotal()
CalculateTotal1()



** PROGRAMMING SECTION: [PREMIUM_FOR_TERROR] [On Element Change] **
// Run Subroutine
//CalculateTotal()
CalculateTotal1()



** PROGRAMMING SECTION: [FEES] [On Element Change] **
CalculateTotal1()



** PROGRAMMING SECTION: [TOT_POL] [On Element Change] **
//TOT_POL = (POL_PREM + PREMIUM_FOR_TERROR)
// Run Subroutine
//CalculateTotal1()
CalculateTotal1()



** PROGRAMMING SECTION: [RET_PREM] [On Element Exit] **
THROWFOCUS(LPAYEE1)



** PROGRAMMING SECTION: [RET_PREM] [On Element Change] **
CalculateTotal1()



** PROGRAMMING SECTION: [LPAYEE1] [On Element Exit] **
THROWFOCUS(PNAME)



** PROGRAMMING SECTION: [PCODE] [On Element Exit] **
THROWFOCUS(A1)



** PROGRAMMING SECTION: [A1] [On Element Exit] **
THROWFOCUS(CLICK_TO_PRINT)



** PROGRAMMING SECTION: [SHOW] [On Element Entry] **
//ON ELEMENT ENTRY

var vTreeStatus as INT
// Open or Close Command tree
vTreeStatus = @CloseCommandArea()
If vTreeStatus = 1 Then
     {
     CloseCommandArea(0)
     }
ELSE
     {
     CloseCommandArea(1)
     }
ForceRedraw()



** PROGRAMMING SECTION: [EXIT_2] [On Element Entry] **
// EXITS THE RECORD
// This works whether adding or searching records because both Menu Tree items are covered
var vNav as Int
If @UpDate Then
{
vNav = @SelectTreeItem("Search Update Menu!Exit Search Update")
@exit
}
If @Add Then
{
vNav = @SelectTreeItem("Add Data Menu!Exit Add Data")
@exit
}
vNav = ""



** PROGRAMMING SECTION: [SAVE_2] [On Element Entry] **
// Saves the record and then Exits current mode to the Menu
// This works whether adding or searching records because both Menu Tree items are covered
var vNav as Int
If @UpDate Then
{
     vNav = @SelectTreeItem("Search Update Menu!Navigation!Save Record")
     @exit
}
If @Add Then
{
     vNav = @SelectTreeItem("Add Data Menu!Navigation!Save Record")
     @exit
}
vNav = ""



** PROGRAMMING SECTION: [CLICK_TO_PRINT] [On Element Entry] **
//** PROGRAMMING SECTION: [Click to Print] [On Element Entry] **
/*
 WordMerge Lite by TJM/Marble Publications Jan '06.

Word Merge code follows for the next few hundred lines but was eliminated for simplicity's sake...
 
  
Back to top
 
IP Logged
 
Ben
Lantica Support
*****
Offline



Posts: 218
Joined: Apr 7th, 2005
Re: Tabpage "combobox" throwfocus not working?
Reply #3 - Nov 28th, 2007 at 6:55pm
Print Post Print Post  
Cliff -
The throwfocus issue you are experiencing does not occur in Sesame version 2.
For version 1.1.x, there is a workaround below that should take care of your problem.

1) Open your design file in Sesame Designer
2) Enter Preview Mode
3) Enter Add Data Mode
4) Press Shift-F2
5) Press the Down Arrow on the keyboard
6) Press Shift F2
7) Select 'Macro->Save Macro'
8) Save the macro in 'C:\Sesame\Data\' with whatever name you prefer
9) Exit Preview Mode
10) Add the programming below to the On Element Immediate Change event of your combobox:
     throwfocus(ELEMENT NAME)
     @DeferredMacro("C:\Sesame\data\MACRO_NAME.mac")
11) Close the Program Editor
12) Save and Reconcile
« Last Edit: Nov 28th, 2007 at 8:00pm by Ben »  
Back to top
IP Logged
 
Cliff
Full Member
***
Offline



Posts: 126
Location: New Hampshire
Joined: May 5th, 2006
Re: Tabpage "combobox" throwfocus not working?
Reply #4 - Nov 29th, 2007 at 6:08pm
Print Post Print Post  
Wow...!
Thanks Ben...
Very much appreciated...
Cliff
  
Back to top
 
IP Logged