04-14-2016, 11:35 AM
It never was in the IDE help file.
peek$("refsreceived") is a very important command. It is used like this:
1
Be sure to give your yab app its own appsig. using the buildfactory from the IDE, over-write application/x-vnd.yab-app with something like application/x-vnd.yourcool-app
2
When your app saves files have it add an attribute:
ATTRIBUTE SET "Mime:, "BEOSREF_APP", "application/x-vnd.yourcool-app", Filename$
Where Filename$ is the name of the file to save.
3
Have the program open the proper file
a$=peek$("refsreceived")
if a$<>"" then
// do what it takes to open the file
endif
4
Add the program to the applications section of FileTypes, /boot/system/preferences/FileTypes
5
Double click the saved data file and your program is launched with the refsreceived information about what file was double clicked.
This should allow one to double-click the data file and have it open in your program.
peek$("refsreceived") is a very important command. It is used like this:
1
Be sure to give your yab app its own appsig. using the buildfactory from the IDE, over-write application/x-vnd.yab-app with something like application/x-vnd.yourcool-app
2
When your app saves files have it add an attribute:
ATTRIBUTE SET "Mime:, "BEOSREF_APP", "application/x-vnd.yourcool-app", Filename$
Where Filename$ is the name of the file to save.
3
Have the program open the proper file
a$=peek$("refsreceived")
if a$<>"" then
// do what it takes to open the file
endif
4
Add the program to the applications section of FileTypes, /boot/system/preferences/FileTypes
5
Double click the saved data file and your program is launched with the refsreceived information about what file was double clicked.
This should allow one to double-click the data file and have it open in your program.