Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology
Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered
You are not logged in.
Pages: 1
colleagues:
i would like to create a file navigation api in scol, something that would use lists and/or arrays to do the following. the first step would just be to display values in the console:
1. contain all the .xos fils in the user partition
2. contain all the .pak files in the cache partition
3. contains a history of the files that the user navigates to as a list since the very first time the app is run.
4. a 'home' function to navigate back to the user partition or cache
5. up, down, forward, and backward functions to navigate through the scol partitions
6. loading and storing variables, lists, and arrays (the latter may not be needed) from an .xml file on the app startup
7. contains a 'favorites' list (well, maybe not, not necessary)
8. contains a 'recent' list (well, maybe not , not necessary)
a big job, i will start working on the first step, using iri's listcat example
Last edited by hebdemnobad (16-Dec-2014 19:54:26)
Offline
ok, after some thinking i think this may be the way to get going....with an object that represents a folder location, the siblings of the folder (which can be either folders or files or both), their full paths, their display names (just the name of the file or Folder, for displaying to the user in a webnavitor ui or scol window/container ui), and the parent of the folder:
struct File_navigator =
[
//file navigator parent, contains path name and display name (name of file or folder without path to display to user)
File_navigator_parent : [S S],
//file navigator sibling [S= full path S=display name (name of file or folder without path to display to user)
File_navigator_file_siblings : [[S S] r1],
File_navigator_folder_siblings : [[S S] r1]
] mkFile_navigator;;
//a file navigator holds the information necessary to display the contents of a folder's parent's child folders and child files
any input welcome
-h
Offline
Hello,
Why not ...
I haven't really thought but i think i'll write something like :
struct FNavigator = [
fn_parent : FNavigator,
fn_path : S,
fn_name : S,
fn_files : [S r1],
fn_subdirs : [FNavigator r1]
] mkFNavigator;;
This is a recursive structure. You can navigate in your tree in both directions.
- fn_parent is the parent node, nil for the big father
- fn_path and fn_name are the path and the display name of this node
- fn_files is the list of all file names (the path should be already known from fn_path)
- fun_subdirs is a list of child nodes, nil if no subdir.
Note : fn_path is a convenience, you could get it by recursion but it is more cost to set this field.
Offline
Thx Iri... I have to think whether the vm creates the file tree in realtime or constructs an XML file that contains a model of the user partition file tree. And that relates to having my media octopus app talk to another VM that has access to the user partition....only strings can be passed between vms. I need a pencil and paper for this.
Ack! One issue gives birth to another which in turn gives birth to yet another.
Last edited by hebdemnobad (19-Dec-2014 14:29:05)
Offline
only strings can be passed between vms
S, I and F
If you store the tree in a xml file (by example at the startup), you can not perform an update (if the user adds a file from its files explorer or any other way).
However, you can handle the current directory only :
By default, this could be root (""). So, you list only file names and the name of subdirs.
If the user select a subdir, you handle it and display only the file names and the name of the subdirs. For that you read the content only at this moment.
Etc ...
To prevent to browse the full tree.
The communication between two local VMs should be fast.
Offline
hebdemnobad wrote:only strings can be passed between vms
S, I and F
If you store the tree in a xml file (by example at the startup), you can not perform an update (if the user adds a file from its files explorer or any other way).
However, you can handle the current directory only :
By default, this could be root (""). So, you list only file names and the name of subdirs.
If the user select a subdir, you handle it and display only the file names and the name of the subdirs. For that you read the content only at this moment.
Etc ...
To prevent to browse the full tree.
The communication between two local VMs should be fast.
yes Iri this is what I am thinking. eyecandy vm shows pretty pictures and launches filessearcher vm (its only job is to look through user partition) and mediaotctopus player. mediaoctopus player gets subdirectorys and list of files from filesearcher vm, which uses some sort of api we have spoken about to traverse the user partition, up, down, sideways, wherever. that way the mediaoctopus player cannot invoke the _deletepack function in the user partition, since the vm with access to the user partition will not execute this function sent from the mediaoctopus player.
that will result in unhappy customers!
..i assume i can have three vm's in communication with each other, correct?
now i see why the cache activation function is so important, i have something like ten years of work in my user partition.
Offline
Why 3 VMs ?
2 seems me sufficient.
Your searcher can be done by the eyecandy.
i assume i can have three vm's in communication with each other, correct?
Yes. Even 4, 5, .... much as you want. But you define a channel between each VM.
Offline
Why 3 VMs ?
2 seems me sufficient.Your searcher can be done by the eyecandy.
hebdemnobad wrote:i assume i can have three vm's in communication with each other, correct?
Yes. Even 4, 5, .... much as you want. But you define a channel between each VM.
you are right...i think i used one of the os3d functions that results in finding every single file in the user partition, and that lead to the console hanging (the resulting log file was 12mb), but yes _listoffiles and _listofsubdir work quickly enough, so probably two vms will do the trick.
then again, there may be a user who has 12mb worth of filenames in his/her user partition. a digital hoarder kind of person.
Offline
Pages: 1