Hello everyone,
I want to try this in livecode coz I saw in my friend application (vb6). Once the application load it will ask where the database is location and once the user locate the database it will restart. Then it will go to the login form. I noticed that once the database is found the application will not go to the step 1 which is to find the database. Is this possible in livecode? Does anyone here did this before. Hope you can guide me thanks in advance
login form w/ database
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: login form w/ database
Hi Lemodizon,
What you describe should be very easy to implement I'd imagine.
You would need to create a permanent storage for the file path to the database file (either store in a writeable stack or in a file that is read on start up). If the file path info is empty then go to 'localise db' layout (card or group).
If the file path info is not empty, then check the database file exists, if not then go to 'localise db' layout
Once you have a valid file path, store it in your permanent storage.
Then go to login layout (card or group).
Seems straightforward?
Stam
--- edit ---
I just noticed from what you've written that you may not be intending to store a file path, in which case it's even simpler.
Personally i would normally keep all of this on the same card, but group controls for locating the database into one group, then the controls for logging in in another group and would show/hide groups depending on whether there is a valid file path to a database file - but should be no different if you did on separate cards though.
If you're struggling with the code, post what you've done so far and you'll probably get a lot of responses with help
What you describe should be very easy to implement I'd imagine.
You would need to create a permanent storage for the file path to the database file (either store in a writeable stack or in a file that is read on start up). If the file path info is empty then go to 'localise db' layout (card or group).
If the file path info is not empty, then check the database file exists, if not then go to 'localise db' layout
Once you have a valid file path, store it in your permanent storage.
Then go to login layout (card or group).
Seems straightforward?
Stam
--- edit ---
I just noticed from what you've written that you may not be intending to store a file path, in which case it's even simpler.
Personally i would normally keep all of this on the same card, but group controls for locating the database into one group, then the controls for logging in in another group and would show/hide groups depending on whether there is a valid file path to a database file - but should be no different if you did on separate cards though.
If you're struggling with the code, post what you've done so far and you'll probably get a lot of responses with help
Re: login form w/ database
I'm not sure that you want your app to quit and restart (I can't think of any normal reason you would want this). Attached is a stack where card 1 is the "find database" window and card 2 is the "login" window. You can see that the database path has been passed from card 1 to card 2 (I assume what you want is to use the database path combined with username & password to effect the login). In this stack you can return to card 1 by clicking on the text below "chosen db path" (where you can then change the db path and see it updated on cd 2).lemodizon wrote: ↑Wed Sep 15, 2021 8:06 amOnce the application load it will ask where the database is location and once the user locate the database it will restart. Then it will go to the login form. I noticed that once the database is found the application will not go to the step 1 which is to find the database. Is this possible in livecode?
If you really do need the app to quit and restart, please explain why that is needed.
- Attachments
-
- Untitled 1.livecode.zip
- (1.51 KiB) Downloaded 91 times
Re: login form w/ database
Bernard wrote: ↑Wed Sep 15, 2021 11:35 amI'm not sure that you want your app to quit and restart (I can't think of any normal reason you would want this). Attached is a stack where card 1 is the "find database" window and card 2 is the "login" window. You can see that the database path has been passed from card 1 to card 2 (I assume what you want is to use the database path combined with username & password to effect the login). In this stack you can return to card 1 by clicking on the text below "chosen db path" (where you can then change the db path and see it updated on cd 2).lemodizon wrote: ↑Wed Sep 15, 2021 8:06 amOnce the application load it will ask where the database is location and once the user locate the database it will restart. Then it will go to the login form. I noticed that once the database is found the application will not go to the step 1 which is to find the database. Is this possible in livecode?
If you really do need the app to quit and restart, please explain why that is needed.
Hi Bernard,
Thanks for the response.. I just saw the application from my friend and i don't know why his application is like that . anyways thanks and stay safe
Thank you & God Bless Everyone
Regards,
lemodizon
Regards,
lemodizon
Re: login form w/ database
Hi Stam,stam wrote: ↑Wed Sep 15, 2021 9:16 amHi Lemodizon,
What you describe should be very easy to implement I'd imagine.
You would need to create a permanent storage for the file path to the database file (either store in a writeable stack or in a file that is read on start up). If the file path info is empty then go to 'localise db' layout (card or group).
If the file path info is not empty, then check the database file exists, if not then go to 'localise db' layout
Once you have a valid file path, store it in your permanent storage.
Then go to login layout (card or group).
Seems straightforward?
Stam
--- edit ---
I just noticed from what you've written that you may not be intending to store a file path, in which case it's even simpler.
Personally i would normally keep all of this on the same card, but group controls for locating the database into one group, then the controls for logging in in another group and would show/hide groups depending on whether there is a valid file path to a database file - but should be no different if you did on separate cards though.
If you're struggling with the code, post what you've done so far and you'll probably get a lot of responses with help
Thanks for the response I will try to create one and if i struggle in my code i will post it here. thanks and stay safe
Thank you & God Bless Everyone
Regards,
lemodizon
Regards,
lemodizon