Hi I am very new to this program and programming.
But I have managed to put together a test project with some help from examples.
I have a couple of pages that takes me to an file browser, on the file browser page I have a back button ""Page.Navigate(PAGE_BACKWARD)"" when I then return to the file browser page it shows 2 of each file next time 3 and so on.
What can I do to prevent that?
Here is my code on the file browser page:
ON PRELOAD
--populate a table with all the files
med_file = File.Find(_SourceFolder.."\\AutoPlay\\Docs\\Anlägg ningsdata", "*", false, false, nil);
zero_file = File.Find(_SourceFolder.."\\AutoPlay\\Docs\\Anlägg ningsdata", "*", false, false, nil);
-- An if statement that compares two numbers
if zero_file == nil then
-- Do something here
do return end
else
--do the following for each file:
for j,file_path in med_file do
--add the item to the listbox, with the name visible and path as data
ListBox.AddItem("File List", String.SplitPath(file_path).Filename, file_path);
end
--Allow the listbox to display the updated content
ListBox.SetUpdate("File List", true);
end
But I have managed to put together a test project with some help from examples.
I have a couple of pages that takes me to an file browser, on the file browser page I have a back button ""Page.Navigate(PAGE_BACKWARD)"" when I then return to the file browser page it shows 2 of each file next time 3 and so on.
What can I do to prevent that?
Here is my code on the file browser page:
ON PRELOAD
--populate a table with all the files
med_file = File.Find(_SourceFolder.."\\AutoPlay\\Docs\\Anlägg ningsdata", "*", false, false, nil);
zero_file = File.Find(_SourceFolder.."\\AutoPlay\\Docs\\Anlägg ningsdata", "*", false, false, nil);
-- An if statement that compares two numbers
if zero_file == nil then
-- Do something here
do return end
else
--do the following for each file:
for j,file_path in med_file do
--add the item to the listbox, with the name visible and path as data
ListBox.AddItem("File List", String.SplitPath(file_path).Filename, file_path);
end
--Allow the listbox to display the updated content
ListBox.SetUpdate("File List", true);
end
Comment