Normal Topic Global Code and Libraries (Read 822 times)
daniel
Member
*
Offline


No personal text

Posts: 7
Location: Germany
Joined: Dec 20th, 2005
Global Code and Libraries
Dec 26th, 2005 at 11:18am
Print Post Print Post  
Hello everyone,

It might be that I have a general misunderstanding of Sesame Programming Events.

I wrote some functions I need in several forms. For example, it seems that many people do not understand how telephone country codes work. So I wrote a function that reformats telephone and fax numbers into the correct international format before storing them into the database.

I placed this function into the "Global Code" area of each form. But if I change the function (for example to fix a bug) I always have to copy it to the "Global Code" area of all other forms, too.

I wonder why there is no "Global Code" area for the complete application.  I also looked for a way to store these functions into a library, but it seems that Sesame does not support libraries at all.

Best regards,
Daniel (from Germany)
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Global Code and Libraries
Reply #1 - Dec 26th, 2005 at 2:01pm
Print Post Print Post  
SBasic programming in Sesame 1.x is essentially a superset of capabilities in Q&A 5.0. As such, no - it does not have "libraries" that can span forms (or applications for that matter). It, like Q&A 5.0 is "form based".

Sesame 2.0 is based on Sesame 1.0, but expands the programming to match the Sesame multi-form model. As such, it has the precompilation construct "include" that allows you to build a text file that can be included before compilation. This allows for libraries that can span forms or even whole applications.

Sesame 2.0 has just entered the alpha test and document cycle.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
daniel
Member
*
Offline


No personal text

Posts: 7
Location: Germany
Joined: Dec 20th, 2005
Re: Global Code and Libraries
Reply #2 - Dec 27th, 2005 at 8:18am
Print Post Print Post  
Dear Mark,

thanks for your fast reply.

For Sesame 1.x, can you suggest any other (easier) way to provide a function for several forms in my application than I do?

About Sesame 2.x, is it already forseeable when it will be launched? Will Lantica provide a free update for users of Sesame 1.x?

Best regards,
Daniel (from Germany)
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Global Code and Libraries
Reply #3 - Dec 27th, 2005 at 2:13pm
Print Post Print Post  
Quote:
Dear Mark,

thanks for your fast reply.

For Sesame 1.x, can you suggest any other (easier) way to provide a function for several forms in my application than I do?

Use the ability of the programming editor to save and load the programming as a strictured ASCII file. Keep that ASCII file in a central locale and accessible by each of your apps. When you make a change to your "library routines" keep a list of those apps that use those routines and reload for each.
Quote:
About Sesame 2.x, is it already forseeable when it will be launched? Will Lantica provide a free update for users of Sesame 1.x?

Not really my province. You will have to contact Lantica's marketing people for that kind of information.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
UPaul42
Junior Member
Members
**
Offline


been a Q&A user/programmer
since version 2.0

Posts: 57
Location: Broad Brook CT
Joined: Jul 23rd, 2003
Re: Global Code and Libraries
Reply #4 - Dec 27th, 2005 at 4:02pm
Print Post Print Post  
Mark,

If I'm not wrong, isn't a "strictured ASCII file" a file that is structured with very strict rules?
Wink
  

&&http://www.lantica.com/images/sespro_badges/sespro3.gif&&Paul Anderson&&President&&Systems-Consulting&&89 Main Street, Broad Brook CT 06016&&(860) 627-5393&&Sales@Systems-Consulting.com
Back to top
IP Logged