C5 Window Manager Question 
Author Message
 C5 Window Manager Question

Using Window procedure for Login screen.  Basic button control has embed to
validate Login and Password against User file.  If no errors when
validating, then necessary variables are set and ThisWindow.Kill is called.
First strike of the button has no visible affect and on second strike, I get
error attempting to access file before it's opened.  It is as if the
Access:User.Fetch call does something to keep the rest of the code from
executing and my files get closed.  Here's the embed:

USE:Login = LOC:Login
USE:Pword = LOC:Password

Access:User.Fetch(USE:KeyLoginPWord)

      IF ~ERRORCODE()

      GLO:Type = USE:Type
      GLO:UserID = USE:UserID
      LOC:LoginCount = 0
      Proceed=1
      ThisWindow.Kill                           ! This call does not seem to
be happening

      ELSE

         CASE MESSAGE('Your user Login or Password could not be validated.',
|
         'Invalid Login', Icon:Exclamation, |
         Button:Retry+Button:Cancel, , 0)
         OF Button:Retry
             LOC:LoginCount = LOC:LoginCount + 1
         OF Button:Cancel
             HALT(0,'Access Denied')
         END
     END
     IF LOC:LoginCount = 3
       HALT(0,'Access Denied')
     END



Fri, 12 Jul 2002 03:00:00 GMT  
 C5 Window Manager Question
Thanks.  Using POST(Event:CloseWindow) instead of ThisWindow.Kill made it
work perfectly.  I'd really like to know why.


Quote:
> Kingsley -

>  Try something like this:

>   If Access:User.Fetch(USE:KeyLoginPWord)
>     ReturnValue = Login:Invalid
>     Do Something
>     Post(Event:CloseWindow) !Instead of calling ThisWIndow.Kill
>   end

> On Mon, 24 Jan 2000 19:27:04 -0500, "Kingsley Klosson"

> >Access:User.Fetch(USE:KeyLoginPWord)

> Jeff Slarve  [Team Topspeed]
> http://www.jssoftware.com



Fri, 12 Jul 2002 03:00:00 GMT  
 C5 Window Manager Question
Kingsley -

 Try something like this:

  If Access:User.Fetch(USE:KeyLoginPWord)
    ReturnValue = Login:Invalid
    Do Something
    Post(Event:CloseWindow) !Instead of calling ThisWIndow.Kill
  end

On Mon, 24 Jan 2000 19:27:04 -0500, "Kingsley Klosson"

Quote:

>Access:User.Fetch(USE:KeyLoginPWord)

Jeff Slarve  [Team Topspeed]
http://www.jssoftware.com


Sat, 13 Jul 2002 03:00:00 GMT  
 C5 Window Manager Question
Kill() is the "clean up" that disposes all of the objects that it
needed. It isn't meant to be the course of exit. To get out an ABC
window, depending on where you are in the code, you can usually either
Post(EVENT:CloseWindow) or RETURN Level:Fatal.

On Mon, 24 Jan 2000 22:02:17 -0500, "Kingsley Klosson"

Quote:

>Thanks.  Using POST(Event:CloseWindow) instead of ThisWindow.Kill made it
>work perfectly.  I'd really like to know why.

Jeff Slarve  [Team Topspeed]
http://www.jssoftware.com


Sat, 13 Jul 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. C5 Window Manager

2. C5.5 Database Manager

3. wpy question(s) [actually, X window managers and python]

4. window manager questions

5. Tk, window manager question

6. CDE window manager question.

7. window manager question

8. Window Manager "Full Size" Question

9. removing the window manager titlebar from a window

10. HELP:Stacking windows with a 'olwm'-windows manager

11. window manager problem with gridded windows

12. C5 executing when running C5 apps...

 

 
Powered by phpBB® Forum Software