View Full Version : Calendar Plugin Problemo !!!!
DaSoulRed
12-03-2007, 10:05 AM
Greets from Here to There
I wil try to be direct and short.
I got a lilltle progo i have created with my AMS and it does have calendar pluging included.
so all runs perfect when i preview (F5) the project becouse i enter a date in the calendar and when i preview (F5) the calendar again well the date i allready put there before just fine at this momment.
the PROBLEMO is when i publish (F7) becouse all runs perfect except when i add dates to the calendar becouse it is not holding the dates i add becouse i run the progo in other pcs and it works just like it works the people can add dates but the progro it does not holding the info it does not save the dates so the next time i run the program it does not have the last dates just added.
so the question mark goes for why is this why the progo does add the dates just fine when i preview (F5) and does not save the dates when i publish F7)
Thanks for the feed back i try to solve this my self but i run out off solutions so if u have a byte can you give a shot to this one THANKS
Are you using a web exe? (self extracting). If so, then more than likely you are using a relative path to your data, and you need to use a static one.
When the web executable extracts, it extracts to a temporary folder. You use the app, like normal, then it deletes the temp files. The next time you run it, it extracts...
Set your database or data to the My Documents folder or something like that.
DaSoulRed
12-03-2007, 01:03 PM
Are you using a web exe? (self extracting). If so, then more than likely you are using a relative path to your data, and you need to use a static one.
When the web executable extracts, it extracts to a temporary folder. You use the app, like normal, then it deletes the temp files. The next time you run it, it extracts...
Set your database or data to the My Documents folder or something like that.
So to use an static path i need to use other method or i can use a web exe with some adjust or modifycations. can this be done. can i modify the path to the file in question so the web exe can read the file in new path
Direct Cuestion.
CAN A WEB EXE USE CALENDAR PLUGIN AND READ THE DATA STORED IN DIFFERENT PATH SO THAT WAY CAN NOT BE ERASED WHEN THE WEB EXE RUNS AGAIN AND AGAIN?
or how this problem be solved burning a hard drive app with folders same as the F5 works with the option burn to folder an packing it
or can i use a web exe and pack it with it the autoplay structure paths folder and just burn the folder structure
or how can this works
Dermot
12-03-2007, 05:43 PM
When your app for the first time, have it create the file and save it in the My Documents folder or somewhere like that. Then save your calendar entries to that file. That way it won't get overwritten each time you run the exe.
yep, what Dermot said. :yes
DaSoulRed
12-03-2007, 08:11 PM
When your app for the first time, have it create the file and save it in the My Documents folder or somewhere like that. Then save your calendar entries to that file. That way it won't get overwritten each time you run the exe.
Hey Dermot man i am confused now i dont get it where are the entries if i only got a single web exe so do i need to add a folder end them zip the web exe and just added second file or folder or how does it work becouse i dont understand what you just say
i use the hard drive file built option and guess what it works but at the time i send the progo i need to send a full zip file with the folder in it and this file needs to be extracted and if any off the folders or files are missing well the exe in it does not work so i need to do it simple
web exe single file and needed file maybe a folder or a txt but the question mark is can a single web exe acces the data base beside the hard drive built option
if this is a yes answer can u point me in the rigth direcction on a little how to and thanks for the feedback
i love this forum and i love feedback THANKS ALOT u two Lua Masters or any other who have the answer i will love you to in the rigth way if u know what i mean
Thanks
In the project, you are creating a database. Instead of creating it in the Autoplay\Docs folder (or where ever you are creating it). Create it in the My Documents folder, or somewhere else on the users hard drive. That way the database will not be deleted when your application cleans up after itself.
DaSoulRed
12-03-2007, 09:27 PM
In the project, you are creating a database. Instead of creating it in the Autoplay\Docs folder (or where ever you are creating it). Create it in the My Documents folder, or somewhere else on the users hard drive. That way the database will not be deleted when your application cleans up after itself.
Hey WORM
O Yeah so ur telling me on the inner code off the AMS there are a code who tells the web exe to create the txt the one with the database one way to call this single txt file and it does tell to create one at Autoplay\Docs so that way it does allways creating one when the app close.
so if i crate the txt file in hard drive universal path c: or something it will not delete the file or overwrite with a new one.
and this will be called from there to read data u say it will be called from there with the data storage and this file will grow any time i add a new date and it will not be overwrite with a new one and it will be called from there every time i run the progo from the same old location
i am wrong
TJ_Tigger
12-03-2007, 10:27 PM
This is fairly common practice for AMS to have it look for a file and if it does not exist you create the file and then you can write to that file. If it does exist then you can read the entries that are in the file/database.
Tigg
DaSoulRed
12-04-2007, 09:46 AM
Hey Yaa All
So if i follow rigth
the web exe can read from other location if before in the code we add a diferent path to create the data file in question so this file can be accesed every time the progo runs and it will not be deleted or replaced when the progo closes or do an exit.
here is the code so can any one tellme where can i do that.
--Save the Path to the Text file
--strTextFilePath = Shell.GetFolder(SHF_MYDOCUMENTS).."\\CalNotes.txt";
strTextFilePath = _SourceFolder.."\\AutoPlay\\Docs\\CalNotes.txt"
--Create Table
tbBlog = {};
--Does the File Exist?
if (File.DoesExist(strTextFilePath)) then
--Read Text File
tbTextFile = TextFile.ReadToTable(strTextFilePath);
if (tbTextFile) then
--Get Number of table elements
nCount = Table.Count(tbTextFile);
if (nCount > 1) then
--Now Loop through the Table and store it
for nPos = 1, nCount, 2 do
--Get the Date
strDate = tbTextFile[nPos];
--Get the Note, and replace ASCII placeholder with LUA line breaks
strNote = String.Replace(tbTextFile[nPos+1], "\002", "\r\n");
--No Blanks
if (strNote ~= "") then
tbBlog[strDate] = strNote;
--Now Make the Date Special
Calendar.AddSpecialDate("calendar",strDate);
end
end
end
end
end
i know this is a how to but it will help me alot i try to solve this my self but after all i am just a normal user asking for a byte off help.
thanks in advance take a minute to send some feedback okay i wish you well :)
DaSoulRed
12-04-2007, 08:06 PM
Help Wanted :eek:
Help Request :wow
Help Advidse :D
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.