Post Reply 
cant save grob
05-10-2016, 10:26 PM (This post was last modified: 05-10-2016 10:39 PM by StephenG1CMZ.)
Post: #7
RE: cant save grob
(01-29-2016 07:16 AM)Didier Lachieze Wrote:  This works for me (tested on the real Prime, the Windows emulator and the Android app):

Code:
EXPORT test1()
BEGIN
AFiles("pic.png"):=G0;
END;

EXPORT test2()
BEGIN
G0:=AFiles("pic.png");
FREEZE;
END;

Enter some data on your Home screen, run test1 then clear the Home screen and run test2. Press Home to return to the active screen.

However one thing to keep in mind is that AFiles and AVars scope is limited to the current active Application (as implied by their name).
If now you go to Apps, change the current application and go back to Home, test2 will return "Error: invalid input" as pic.png doesn’t exist for the new active application.

I had read that AFiles were limited to an Application - and presumed that that meant that I couldn't use them in my program, which so far have been simple programs not requiring inclusion within an App.

But I just gave it a try, and was pleasantly surprised to discover that AFiles seem to work in ordinary programs. It might be worthwhile making that clearer in the documentation: you don't have to be using an App and a STARTVIEW to use AFiles. Or is it just me that misunderstood that?
(No sign of the .PNG in the Android gallery though Sad - only within the HP Prime emulator ).

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
cant save grob - ji3m - 01-28-2016, 09:06 PM
RE: cant save grob - Tyann - 01-28-2016, 09:55 PM
RE: cant save grob - ji3m - 01-28-2016, 10:31 PM
RE: cant save grob - DrD - 01-28-2016, 10:46 PM
RE: cant save grob - Tyann - 01-29-2016, 06:08 AM
RE: cant save grob - Didier Lachieze - 01-29-2016, 07:16 AM
RE: cant save grob - StephenG1CMZ - 05-10-2016 10:26 PM
RE: cant save grob - cyrille de brébisson - 05-11-2016, 05:50 AM



User(s) browsing this thread: 1 Guest(s)