Normal Topic Readonly statement (Read 583 times)
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Readonly statement
Apr 19th, 2007 at 10:12pm
Print Post Print Post  
I have been using using Readonly( ) statements to help with navigation. I am not sure if it is an intended use. The problem I have,  that if I put it in the element (on element exit event) just before the element on which I need to execute Readonly( ) statement to make element readonly so that the cursor would not go in that.  The problem is that the ReadOnly statement does not trigger before the cursor is already in the element that should have been readonly.  If I put the statement in one element before that it would work fine, but it is not always possible to do so. One would imagine that all the statements in the element will complete before the cursor reaches the element.  Am I making any sense here?

I try to avoid using goto and ThrowFocus( ) statements to facilitate use of mouse.

Bharat Naik
  
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: Readonly statement
Reply #1 - Apr 19th, 2007 at 11:36pm
Print Post Print Post  
I used to use ReadOnly statements in Q&A and trained people to use the Tab key to proceed through the fields.  Since I was able to disable the mouse with "-g", that gave me some control, but not always.  In Sesame this becomes worse because the mouse is used more and it is harder to force a user to go through fields.

So, what can be done?  This is not a complete answer, but can be helpful.
In the Designer, in the top Commands section, use Change Program Execution Order.  This allows you to have better control. 

But you may still need to use ThrowFocus in some elements in the OnElementEnter section.

  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Readonly statement
Reply #2 - Apr 19th, 2007 at 11:49pm
Print Post Print Post  
Quote:
In the Designer, in the top Commands section, use Change Program Execution Order.


As I understand, change execution order is applicable only in "On Form Change" event. How would you use that to help in navigation to assure that it would not impede the mouse use?  Bob, would you please elaborate on that?  If there is goto statement in an element and if you click with mouse on any other element on the form, it will be totally ignored and cursor will land where goto statement dictated.

Bharat
  
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: Readonly statement
Reply #3 - Apr 20th, 2007 at 1:28am
Print Post Print Post  
Oops, you are right.  I meant to say Change Navigation Order, not Program Execution. 

Sorry about that.  I did copy/paste from the list, and I grabbed the wrong one.  You can use ThrowFocus with OnElement Entry to override these Navigation Order settings.  But, there really is nothing obvious to help control mouse movements unless you can disable the mouse completely.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Readonly statement
Reply #4 - Apr 20th, 2007 at 11:51am
Print Post Print Post  
Why ReadOnly statement in the element is not executed before the cursor reaches the next element? I guess it will execute if I put it in "Element Immediate Change" event but then it will get to that part of programming with every stroke of the key and that seems like waste of resources. However with conditional statement it will execute only once.

If @Readonly (BP) = 0 then
          {
                  ReadOnly (BP, 1)
             }
  
Back to top
 
IP Logged