Normal Topic Failing to Compile (Read 1246 times)
actiontech
Full Member
***
Offline



Posts: 173
Joined: Apr 10th, 2016
Failing to Compile
Oct 31st, 2016 at 5:11pm
Print Post Print Post  
I recently changed some LE names on my form to kind of clean things up a bit and to add some consistency throughout.

I even went to the Program Editor and checked all of my event programming to make sure the LE's were right.

However, every time I go to to Preview Mode then open my form I get this message:

Quote:
Some or all of the programming in this form has failed to compile. No event programming will run.


Is there anything else I should check? Or is there some kind of log I could access that shows me exactly what's failing to compile?
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Failing to Compile
Reply #1 - Oct 31st, 2016 at 6:50pm
Print Post Print Post  
Check to see if you have any LEs that are named the same as the layout (form).
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
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: Failing to Compile
Reply #2 - Oct 31st, 2016 at 7:31pm
Print Post Print Post  
If everything tests just fine when you click Test->Test Program, there are two possibilities.

1: Your programming is referencing an element that is on the canvas but not on the form itself. The canvas is the gray area that appears to the left and below the form in designer. Elements placed on it are not shown in Preview mode or Runtime. Since these elements are available in designer when the programming is tested, the programming compiles but doesn't work when you go to preview mode.

2: You are using the form name someplace in your programming without quotes around it. An example of this is
Code
Select All
vVar = @FormFieldValue(FormName, "ElementName", 0) 

. Note: If you are on 2.6.2, the above code will throw a compile error in Designer. If you are on 2.6.2 and able to use the form name in a way that does not give an error when testing but does when running the application; please send the design file to support@lantica.com so that we can catch that case as well.

Carl, You can't rename an element to have the same name as your form.

-Ray
  

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



Posts: 173
Joined: Apr 10th, 2016
Re: Failing to Compile
Reply #3 - Oct 31st, 2016 at 11:53pm
Print Post Print Post  
Everything is still testing fine.

Everywhere I use the FormFieldValue command, I use @Layout to pull whatever the current form is.

Also, quick question, is it best practice to always use quote's (" ") when referring to an LE? Or just when in parentheses, or what?

I have no LE's in the canvas area.
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Failing to Compile
Reply #4 - Nov 1st, 2016 at 3:42am
Print Post Print Post  
Ray,

I know I ran into something like this once. I guess I was thinking about possibility #2.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
actiontech
Full Member
***
Offline



Posts: 173
Joined: Apr 10th, 2016
Re: Failing to Compile
Reply #5 - Nov 1st, 2016 at 1:54pm
Print Post Print Post  
Just updated to 2.6.2. Still having issue.
  
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: Failing to Compile
Reply #6 - Nov 1st, 2016 at 1:58pm
Print Post Print Post  
actiontech wrote on Oct 31st, 2016 at 11:53pm:
Everything is still testing fine.


No it's not. A quick glance at the design files that you sent into support shows that your Jobs form has a compile error.

Quote:
Everywhere I use the FormFieldValue command, I use @Layout to pull whatever the current form is.


The only time you should be using FormFieldValue() to access the current form is when you are using it to set a value in a non-text field in Search Mode. If you are using it in Update or Add mode, you probably shouldn't be.

Quote:
Also, quick question, is it best practice to always use quote's (" ") when referring to an LE? Or just when in parentheses, or what?

There is no best practice per say. You use quotes when you need them, and don't use them when you don't need them. You use quotes when you are passing the name of the element to a function such as FormFieldValue() or XLookup(). You don't use quotes when you are referring to the value in that element or directly to that element.

-Ray
  

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



Posts: 173
Joined: Apr 10th, 2016
Re: Failing to Compile
Reply #7 - Nov 1st, 2016 at 2:43pm
Print Post Print Post  
Thanks and sorry I missed that one variable in the Jobs form. Not sure why it wasn't compiling before, but it's working now.
  
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: Failing to Compile
Reply #8 - Nov 1st, 2016 at 3:03pm
Print Post Print Post  
actiontech wrote on Nov 1st, 2016 at 2:43pm:
Not sure why it wasn't compiling before, but it's working now.


It wasn't compiling as your code was using a name that was not an element name or a declared variable, So Sesame had no idea what you meant when you referenced vDateCompleted.

-Ray
  

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