yab | yet another Basic for HAIKU
refsreceived - Printable Version

+- yab | yet another Basic for HAIKU (https://yab.orgfree.com/forum)
+-- Forum: installing / troubleshooting / feature requests (https://yab.orgfree.com/forum/forumdisplay.php?fid=5)
+--- Forum: feature requests / bug fixes (https://yab.orgfree.com/forum/forumdisplay.php?fid=11)
+--- Thread: refsreceived (/showthread.php?tid=63)



refsreceived - clasqm - 04-13-2016

is peek$("refsreceived") still around? It seems to have dropped out of the documentation. My apps using it don't crash, though


RE: refsreceived - bbjimmy - 04-14-2016

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:, "BEOSTongueREF_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.


RE: refsreceived - bbjimmy - 05-03-2016

Looks like I missed the refsreceived documentation in the last release.

It won't miss the next release ... https://github.com/bbjimmy/YAB/commit/e1459f1135ba82d46804f2a0cd1bbc8be4d3ff7f


Free Web Hosting