Source language: Translate to:

Password Page

General questions about NeoBook

Moderator: Neosoft Support

Password Page

Postby BRobinsonS » Fri Jun 24, 2016 5:57 pm

I have tried using the First page of my app as a Password Page.
I keep the choice to use or not use a password in a table.
If the DBPro database / Table indicates I am not using a password, I want to not show/skip the first (password) page.

I have put the code in the Book Actions but the password page wants to momentarily display before going to the page past the password page.
Code: Select all
  FileExists "[PubDir]AddressBook.mdb" "[Result]"
  If "[Result]" "=" "True"
    dbpOpenAccessDatabase "AddrBook" "[PubDir]AddressBook.mdb" ""
. open Branch table to check password
    dbpOpenTable "AddrBook" "Branch" ""
. if using password to to password page, else continue
    If "[AddrBook.Branch.UsePswd]" "=" "True"
     GotoPage "PasswordPage"
    Else
      GoSub "DatabaseOpen"
      GotoPage "Entry Screen"
    EndIf
  Else
    GoSub "CreateDB"
  EndIf


Is there any way to prevent this first page showing?
Brian Robinson
'When all else fails, try again!'
www.ComputerSoftwareSystems.com
User avatar
BRobinsonS
 
Posts: 337
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada

Re: Password Page

Postby Gaev » Fri Jun 24, 2016 9:00 pm

Brian:

Try placing the same code in the PageEnter section of the first (i.e. PasswordPage) page ... you won't need the command ...
Code: Select all
GotoPage "PasswordPage"

... as you are already on this page.


If it still shows the contents of the page for a split second ...

a) Add a page before the current first (i.e. PasswordPage) page ... call it Intro ... you can keep it empty ... or have some kind of Welcome message.

b) place your code in the PageEnter section of Intro ... you will need to add ...
Code: Select all
     GotoPage "PasswordPage"
... after ...
Code: Select all
    GoSub "CreateDB"



Many (many) moons ago, I was told that the sequence at run time is ...

a) show the objects of the first page
b) service the PageEnter section of the first page
c) service the StartUp section of the publication
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Password Page

Postby BRobinsonS » Sat Jun 25, 2016 7:41 am

Interestingly enough I moved the Password Page to the last page.
I works satisfactorily now.
i.e. If there is no password being used, it goes to my 'Entry Screen' (the original first page).
If a password being used, the password page covers the 'Entry Page' (or replace it) and is asking for a password.

The app seems to be working as expected so I didn't mess up my app by introducing a password and moving the code around.

Gaev, thanks for your thoughts as always.
Brian Robinson
'When all else fails, try again!'
www.ComputerSoftwareSystems.com
User avatar
BRobinsonS
 
Posts: 337
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 1 guest