Hot Topic (More than 10 Replies) Programming not working since upgrading to 1.13 (Read 1361 times)
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Programming not working since upgrading to 1.13
Nov 29th, 2005 at 7:08pm
Print Post Print Post  
On element entry programming, gives a total for line items.

I have to click the element, then go back to sub-form click the last element and then back to grand total element:

var a as int=1
var vmax as int = @formresultsettotal("Itemsused")
Var vgrandtotal as double = 0

while a <=vmax
{
vgrandtotal=vgrandtotal + @Tonumber(@formfieldvalue("Itemsused","Total",a))
a=a+1
}
Grand total0=vgrandtotal

???
Was working before I upgraded with no problems.
« Last Edit: Nov 29th, 2005 at 10:11pm by proudpoppy »  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Programming not working since upgading to 1.13
Reply #1 - Nov 29th, 2005 at 7:58pm
Print Post Print Post  
Is that code on a command button or a text element or other?

Is the subform a Table View or Form View?

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: Programming not working since upgading to 1.13
Reply #2 - Nov 29th, 2005 at 8:02pm
Print Post Print Post  
Quote:
Is that code on a command button or a text element or other?
A text element
Is the subform a Table View or Form View?
Form View

-Ray

  
Back to top
 
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: Programming not working since upgading to 1.13
Reply #3 - Nov 29th, 2005 at 8:06pm
Print Post Print Post  
The next tab page over has a sub-form and a text element to get a total with the same programming just different le names and its working right. go figure ???
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Programming not working since upgading to 1.13
Reply #4 - Nov 29th, 2005 at 8:09pm
Print Post Print Post  
Send it to me at Support@Lantica.com and I'll have a look at it.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: Programming not working since upgading to 1.13
Reply #5 - Nov 29th, 2005 at 8:11pm
Print Post Print Post  
I just started clicking around the le and it filled in, but would not with the mouse click on it.And when I tried to delete the record in the sub form it would not delete, when I clicked in the total element and hit F3 it deleted the record in the sub-form ???
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Programming not working since upgading to 1.13
Reply #6 - Nov 29th, 2005 at 9:09pm
Print Post Print Post  
Unless I am looking at the wrong form the 'Itemsused' form is a Table View subform and not a Form view subform. I am on the Materials tab of the Closeout Form.  Is this the right place?

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: Programming not working since upgading to 1.13
Reply #7 - Nov 29th, 2005 at 9:19pm
Print Post Print Post  
you're in the right pew Ray, its been awhile since I designed it, it could of been a table view,sorry  Grin
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Programming not working since upgading to 1.13
Reply #8 - Nov 29th, 2005 at 9:37pm
Print Post Print Post  
Hello Robert,

Here is what is happening. The first click out of a Table view subform onto the main form is not firing the On Element Entry event for that element for some elements. If you click in another element on the main form and then into your Grand Total element the code runs fine. If you move your code from the On Element Entry event of the Grand Total0 element to the On Element Entry event of a button the code runs fine. You can click right on the button when you leave the subform and the code will run.

Next time be sure to include the Username and Password.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: Programming not working since upgading to 1.13
Reply #9 - Nov 29th, 2005 at 9:57pm
Print Post Print Post  
oops  Grin
  
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Programming not working since upgading to 1.13
Reply #10 - Nov 29th, 2005 at 10:00pm
Print Post Print Post  
Quote:
The first click out of a Table view subform onto the main form is not firing the On Element Entry event for that element for some elements......You can click right on the button when you leave the subform
  Shocked
This raises all kinds of questions..

Is this by design?   ???

Has it always been this way, or new with 1.1.3?   ???

Which types of elements will not fire when getting focus from a table view subform?  ???

If there are certain elements that need this to fire properly, then shouldn't the programming be moved to OnFormEntry?  ???

And will they really fire there OnFormEntry when getting focus from the table view subform.?  ???

Putting into OnFormEntry would tend to slow down record advances/backscrolling for programming that might not otherwise need to run except OnElementEntry

===============================
This sounds unreliable to rely on someone to remember to click on a certain element when they leave the table view subform.  There is no way we can count on that always happening.   

This sounds like it does need to be corrected to fire immediately regardless of where the focus came from.  Or provide a function to use when focus changes between forms to use with IF and programming statements. 
Like:
If @FocusFromSameForm() do nothing
else
IF @FocusFromOtherForm() do something
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Programming not working since upgading to 1.13
Reply #11 - Nov 29th, 2005 at 10:29pm
Print Post Print Post  
Of course it's not by design, Bob.

Sometimes these issues are circular. This is likely a result of something we did to fix an issue reported where table view subforms were not pulling focus aggressively enough, making it so that you couldn't use things like Mass Delete on them.

It's a bug that we need to get taken care of.  Bugs that require such specific circumstances to appear sometimes don't get caught by normal testing procedures. Fortunately, since it is so specific, it shouldn't be too hard to work around for those people who encounter it at all.

In a case like this, especially for an application not for your own use, I'd recommend not depending on User to click in a particular place to trigger the calcs anyway, even without this bug in the mix. What if they decide to click elsewhere on their way out of the subform? This kind of calc should probably be calced OnFormExit of the child record and reconfirmed OnFormExit of the parent. Otherwise, the user has too many ways to change the children without updating the parent.

  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Programming not working since upgrading to 1.1
Reply #12 - Nov 29th, 2005 at 10:44pm
Print Post Print Post  
Quote:
In a case like this, especially for an application not for your own use, I'd recommend not depending on User to click in a particular place to trigger the calcs anyway, even without this bug in the mix.
That is exactly the point I was trying to make.

I understand that this could be a bug vs. design.  But some strange things are by design, thus my question. 

Since this is a "new" bug, then I should stay with 1.1.2 until this is fixed?  If NO, then we need a list of the types of elements that will not fire properly so that we can modify programming as needed.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Programming not working since upgrading to 1.1
Reply #13 - Nov 30th, 2005 at 3:05pm
Print Post Print Post  
Command Buttons will fire, all other elements will not. Note this is only after coming out of a table view subform, and only if you were not in edit mode of an element on that table view subform when you clicked out, and only for the first element that is clicked in when moving from the subform to the main form, Elements on the parent form clicked in afterwards will fire their programming normally until focus is returned to the table.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged