I have the File System helper added to my app. My only need here is to associate the documents the app creates with the app so that they can be opened. I have confirmed that the helper is being added to the standalone and I have the app.yml file configured with a file extension:
file extensions:
CBP Files: cbp3
Then I added this to "OpenApplication" in the app.livecodescript stack:
if fileSystemFilesToProcessOnOpen() is not empty then
ProcessMyFiles fileSystemFilesToProcessOnOpen()
end if
and added to "ProcessFiles" in the app.livecodescript stack:
ProcessMyFiles pFiles
The instructions seemed to indicate the above should be added to the app.yml file but that didn't seem right to me and I assumed they belonged in app.livecodescript
With the app complied a double click on a document will launch the app but then I get a list of errors as follows:
573,52,1,ProcessMyFiles
253,52,1
241,51,1,OpenApplication
353,0,0,stack (then the path to app.livecodescript in the app)
675,567,1,levureFinishLoadingApplication
353,0,0,stack (then the path to levure.livecodescript in the app)
If the app is already launched and I double-click a document, it just brings the app to the front but the document does not open. I have obviously missed something here.
Levure File_System
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 52
- Joined: Fri Mar 24, 2006 5:33 pm
- Location: Blaine, Washington - USA
Re: Levure File_System
The first thing that jumped up at me was your file extensions key. Is CBP Files indented? It isn't in your post.
The error message (provided by Mikey's Error Handler helper, in case you need it) is:
You are right about the references to app.yml being wrong.
The error message (provided by Mikey's Error Handler helper, in case you need it) is:
I'm pretty sure processMyFiles is a handler you have to write.Error:
- can't find handler
at char 1 in line 52
Hint: ProcessMyFiles
- error in statement
at char 1 in line 52
- error in statement
at char 1 in line 51
Hint: OpenApplication
- Name:
Hint: stack (then the path to app.livecodescript in the app)
- bad command
at char 1 in line 567
Hint: levureFinishLoadingApplication
- Name:
Hint: stack (then the path to levure.livecodescript in the app)
You are right about the references to app.yml being wrong.
-
- Posts: 52
- Joined: Fri Mar 24, 2006 5:33 pm
- Location: Blaine, Washington - USA
Re: Levure File_System
Just goes to show you what happens when you assume something! I thought the ProcessMyFiles was being handled. In my case replacing that with a simple go stack (line 1 of pFiles) does the trick.
Re: Levure File_System
When I read the README after your post, I could definitely see that. I fixed it and the other typos and issued a PR, so Trevor can update it.
There are several things going on in the Levure project to make writing and using helpers easier. Hopefully it will eventually become really really easy.
There are several things going on in the Levure project to make writing and using helpers easier. Hopefully it will eventually become really really easy.
-
- Posts: 52
- Joined: Fri Mar 24, 2006 5:33 pm
- Location: Blaine, Washington - USA
Re: Levure File_System
I'll have to say, I was reluctant to start working on this project to convert a project from the old GLX framework over to Levure, but it hasn't been nearly as hard as I thought. I'm very impressed with Levure and am totally excited to see it grow. Kudos to all who have helped make it happen.