CASE STATEMENT 
Author Message
 CASE STATEMENT

The following code is described in the Clairon Programmer's Guide on page
14-15.
***********************
    Program
    map
    end
MyWin   window('Hello Windows'),at(,,100,100),SYSTEM
          string('Hello Windows'),at(26,23),USE(?string1)
          button('OK'),at(34,60),use(?Ok),default
        end
    code
    open(MyWin)
    ACCEPT
      CASE EVENT()
      OF EVENT:OpenWindow
        MESSAGE('Opened Window')
      OF EVENT:GainFocus
        MESSAGE('Gained Focus')
      END
      case field()
      of ?ok
        case event()
        of event:accepted
          break
        end
      end
    end
******************

on top of page 15 it says that EVENT:OpenWindow  generates as soon as the
window displays, but EVENT:GainFocus does not , etc.
When i run the sample it, shows GainFocus first ?
Anybody ?????



Sat, 28 Aug 1999 03:00:00 GMT  
 CASE STATEMENT

I think what is happening is...

1. EVENT:GainFocus
2. EVENT:OpenWindow
3. EVENT:Selected
4. EVENT:Sized
5. EVENT:Moved
6. EVENT:Suspended

These are the events that are shown when a window opens using Ross' free
CW Event displayer.

Your using MESSAGE in this area will cause some strange things to happen
since they also generate EVENTs and mess up what really happens.


  The following code is described in the Clairon Programmer's Guide on
  page
  14-15.
  ***********************
      Program
      map
      end
  MyWin   window('Hello Windows'),at(,,100,100),SYSTEM
            string('Hello Windows'),at(26,23),USE(?string1)
            button('OK'),at(34,60),use(?Ok),default
          end
      code
      open(MyWin)
      ACCEPT
        CASE EVENT()
        OF EVENT:OpenWindow
          MESSAGE('Opened Window')
        OF EVENT:GainFocus
          MESSAGE('Gained Focus')
        END
        case field()
        of ?ok
          case event()
          of event:accepted
            break
          end
        end
      end
  ******************

  on top of page 15 it says that EVENT:OpenWindow  generates as soon
  as the
  window displays, but EVENT:GainFocus does not , etc.
  When i run the sample it, shows GainFocus first ?
  Anybody ?????

--
 ------------------------------------------------------------------



 Visit our web page     - http://www.Software-By-Ragazzi.com/

   "Begin a new era of productivity;
      leave the mundane aspects of programming to us!"?
 ------------------------------------------------------------------
 Clarion for Windows(tm) developer add-ons and consulting services!

 Logo          - http://software-by-ragazzi.com/images/sbr_logo.gif
 ------------------------------------------------------------------



Sat, 28 Aug 1999 03:00:00 GMT  
 CASE STATEMENT


Quote:
>These are the events that are shown when a window opens using Ross' free
>CW Event displayer.

Where can we find Ross' free CW Event displayer, sound like a nice
tool to have around.

Best Regards,

Andy Kaczmarczyk
Auratek International



Sun, 29 Aug 1999 03:00:00 GMT  
 CASE STATEMENT

Craig,

Quote:
>on top of page 15 it says that EVENT:OpenWindow  generates as soon as the
>window displays, but EVENT:GainFocus does not , etc.
>When i run the sample it, shows GainFocus first ?
>Anybody ?????

I too have recently been looking at this. In my tests,
I found that EVENT:GainFocus happens first when a
procedure has been STARTed for the first time from the
Toolbar. However, if one closes that procedure and then
immediately reSTARTS it from the Toolbar, EVENT:GainFocus is not
generated at all.

You should be able to easily see this in a CW example program
using your method of putting MESSAGE statements in the embeds
for the events.

To date, I haven't heard any explanation as to why this happens
or whether it might even be a bug. Perhaps your message will
bring a better response than I received.

***************************************************************
Douglas E. Johnson
University of Colorado
***


***************************************************************



Sun, 29 Aug 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. case statement flipflop statement

2. difference if statement with case statement?

3. [Fwd: Case statements, decision trees, and good OO design]

4. Case statements in parallel

5. Detecting Multiple Events (was: Case Statements...)

6. Case Statements...

7. SIMPLE Case statement

8. RFI: Simple CASE Statement

9. Eaker CASE statement words ....

10. programatically add item to case statement

11. Controlling program flow and case statements

12. case statements

 

 
Powered by phpBB® Forum Software