Normal Topic Inside Sesame Sept 2006 (Read 686 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Inside Sesame Sept 2006
Sep 14th, 2006 at 12:32pm
Print Post Print Post  
Is this the right place to ask questions about articles in Inside Sesame, or should I write to Marble Publications?  I need some clarifications about some things discussed in the article "All About Global Values".
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Inside Sesame Sept 2006
Reply #1 - Sep 14th, 2006 at 12:36pm
Print Post Print Post  
Infinity wrote on Sep 14th, 2006 at 12:32pm:
Is this the right place to ask questions about articles in Inside Sesame, or should I write to Marble Publications?  I need some clarifications about some things discussed in the article "All About Global Values".


If you just have general questions about how Global Values work, we can probably help. If you have specific questions about code or techniques used int he article, you're better off writing to Marble.
  

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


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Inside Sesame Sept 2006
Reply #2 - Sep 14th, 2006 at 1:36pm
Print Post Print Post  
OK, thanks.  Well, let me throw some things out and you can tell me where to go.  Wink

The article is very good, it gives me a lot of ideas on how to use Global Values.  Still, it's a bit over my head and just beyond my programming skills as they stand right now.  I've opened up the attached files and created a .dsr so I can examine some of the code.

The article explains how Global Values are stored in the Sesame runtime application, viewed in Designer, and created in both.  When talking about the viewer, the article says
Quote:
In Designer, you can use Application / Global Values List Manager...Here you can only delete a global value.  Unfortunately, you can't create new global values here or change their names or values.
  Is this capability planned for any future versions of Sesame?  It would seem to be of great  use.

Mark (I think it was Mark, I apologize if it was someone else) recently taught me how to create Global Values in runtime using a Mass Update, but I'm still a bit uncertain how to go about it in Designer.  I'd like to do it all in Designer (create, view and delete) because then I'll never have to worry if my .db and .dsr are out of synch.

The article gives an example of using a Global Value to sequence alpanumeric codes.  One of the lines in the code on page 4 is:
Code
Select All
 VGV = "BK" + @Str(@TN(@Num(VGV)) + 1) 


I understand what it does on the whole, but I'm having a hard time parsing the code.  Can someone walk me through what Sesame does when it sees this sequence of functions and parentheses?

The associated zip file contains Charity_GlobalValues.db.  A couple of things about this app caught my eye:
The tab for the Main Menu form opens in Add mode.  The tab label itself says "Main Menu".  How is this done?  Also, no matter what I try, I cannot close the form.  "The "Exit Add Data" command seems to be turned off.

Thank you for your help.
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Inside Sesame Sept 2006
Reply #3 - Sep 14th, 2006 at 2:09pm
Print Post Print Post  
Infinity wrote on Sep 14th, 2006 at 1:36pm:
Is this capability planned for any future versions of Sesame?  It would seem to be of great  use.


You can already do this simply by using Preview mode and doing exactly what you would do in Runtime.

Quote:
Mark (I think it was Mark, I apologize if it was someone else) recently taught me how to create Global Values in runtime using a Mass Update, but I'm still a bit uncertain how to go about it in Designer.  I'd like to do it all in Designer (create, view and delete) because then I'll never have to worry if my .db and .dsr are out of synch.


Again, you can do this in Designer from Preview mode. However, it is the nature of Global Values to be out of synch between a running copy and a design copy. For example, Global Values like NextInvoiceNumber would be constantly updated in the db, but not the dsr. That's why Reconcile does not replace Global Values unless you specificaly tell it to do so.

Quote:
The article gives an example of using a Global Value to sequence alpanumeric codes.  One of the lines in the code on page 4 is:
Code
Select All
 VGV = "BK" + @Str(@TN(@Num(VGV)) + 1) 


I understand what it does on the whole, but I'm having a hard time parsing the code.  Can someone walk me through what Sesame does when it sees this sequence of functions and parentheses?


Sure. It resolves everything working from the inside towards the outside. In this case, if VGV = "BK400", it would resolve like this:

VGV = "BK" + @Str(@TN(@Num(VGV)) + 1)
VGV = "BK" + @Str(@TN("400") + 1)
VGV = "BK" + @Str(400 + 1)
VGV = "BK" + @Str(401)
VGV = "BK" + "401"
VGV = "BK401"


Quote:
The associated zip file contains Charity_GlobalValues.db.  A couple of things about this app caught my eye:
The tab for the Main Menu form opens in Add mode.  The tab label itself says "Main Menu".  How is this done?  Also, no matter what I try, I cannot close the form.  "The "Exit Add Data" command seems to be turned off.


This is done using the SetDefaultTab() command. It is very useful for creating Menu Forms. Look at the code behind the Form and at the On Application Open programming and you'll see how it's done.

Quote:
Thank you for your help.

You're welcome.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged