I am developing application using Livecode and facing problems how to deploy my application with many modules. Let me explain my application structure:
RIS folder
--Modules folder (which contains about 10 .livecode files for each modules).
--Template folder (which contains some templates as user want to email it)
--RIS.livecode(This file is used to start using this application)
As my lase experience, when I developed application I but all modules into only 1 stack so that's easy to deploy. However, as I decided to divided it into many modules by putting it into modules folder as you see above IT DOESN'T WORK.
Here are some code of my application
1.For Login Stack
global gAppLoc,gModulesLoc
Code: Select all
on preopenstack
put StackLoc() into gAppLoc
put gAppLoc & "Modules/" after gModulesLoc
put gModulesLoc & "StartUp.livecode" into tLibraryStack (this stack is responsible for Authenticated)
start using tLibraryStack
end preopenstack
function StackLoc
put empty into gAppLoc
put empty into gModulesLoc
put the filename of stack (the mainstack of this stack) into tName
set the itemdel to "/"
delete last item of tName
return (tName & "/")
end StackLoc
as I clicked on Login button
Code: Select all
on mouseUp
doLogin
end mouseUp
Code: Select all
global gAppLoc,gModulesLoc
on preopenstack
put gModulesLoc & "DataAccessLayer.livecode" into tLibraryStack
start using stack tLibraryStack
end preopenstack
/*this method is use to check following below:
1.Authenticated User
2.Permission of User
*/
on doLogin
--Authenticate successfully--
put gModulesLoc & "MenuMain.livecode" into MenuMain (Menu main for user to operate)
open stack MenuMain
end doLogin
Could you guys please help me to fix this problems ? Thanks in advance
Regards,
Quang