Normal Topic Understanding Scope (Read 743 times)
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Understanding Scope
Aug 23rd, 2004 at 8:45pm
Print Post Print Post  
Am I correct in saying that in the most current release of Sesame, global code can only be seen by the database it is in?

If I have an application that has a database named contacts and a database named Collections and I have a subroutine in contacts that pops up the options for a callback date that subroutine can Not be used in a collections database form, even if it is a subform of Contacts?

Thanks
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Understanding Scope
Reply #1 - Aug 23rd, 2004 at 8:53pm
Print Post Print Post  
Global Code in a particular Form or Report (Layout) can only be seen by that Layout. It cannot be seen by other Layouts even if the other Layout is a parent or child of the one with the subroutine. You can, however, duplicate the subroutine in the Global Code for both the Form and Subform without fear of collision.
  

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


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Understanding Scope
Reply #2 - Aug 23rd, 2004 at 9:05pm
Print Post Print Post  
Quote:
You can, however, duplicate the subroutine in the Global Code for both the Form and Subform without fear of collision.


Thanks. You must be a mind reader. You answered my next question before I even asked.

So I will ask one I have been wondering about for a while. I see the use of Cnext with if statements in many examples. Is Cnext a programming convention that is used or is it a command or something I should not pay any attention to or ???

Thanks

  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Understanding Scope
Reply #3 - Aug 23rd, 2004 at 9:26pm
Print Post Print Post  
CNext, CPrev, CHome, CEnd are there only for Q&A compatibility. In Q&A, CNext would move to the next field, CPrev moved to the previous field, etc.

In Sesame, the only command that should be used to move to a particular element is ThrowFocus().
  

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