Post Reply 
How to make a complete application?
03-10-2017, 12:03 AM
Post: #1
How to make a complete application?
I would like to know how to make a complete application for the HP Prime, I have seen the source code of some applications such as the "Equation Library" of Han, and I have seen that there is a folder with the name "Equation Library.hpappdir" Is the folder that is passed to the calculator or the emulator to the application tree, but within this folder there are other files with different extensions such as * .hpapp, * .hpappprgm, * .hpappvar and * .lib. My question is how do you make those files with those extensions and when doing a program on the Prime to what extent is it saved?
Find all posts by this user
Quote this message in a reply
03-10-2017, 07:09 PM
Post: #2
RE: How to make a complete application?
(03-10-2017 12:03 AM)math7 Wrote:  I would like to know how to make a complete application for the HP Prime, I have seen the source code of some applications such as the "Equation Library" of Han, and I have seen that there is a folder with the name "Equation Library.hpappdir" Is the folder that is passed to the calculator or the emulator to the application tree, but within this folder there are other files with different extensions such as * .hpapp, * .hpappprgm, * .hpappvar and * .lib. My question is how do you make those files with those extensions and when doing a program on the Prime to what extent is it saved?

Creating a complete app is really no different from creating a large program file with a few exceptions:

1. Certain special function names can be used to replace behaviors of the Symb, Plot, and Num keys (and their shifted versions). By using the function name Plot(), Symb(), Num(), PlotSetup(), SymbSetup(), and NumSetup(), whatever code you write for these functions will be run when you press those corresponding keys (or shifted keys). The START() function will be run every time you select the App in the app menu, and press Start in the menu at the bottom of the screen.

2. Apps may make use of app variables and app files via the AVars() and AFiles() command. App variables can only be created on the calculator. App files may be created on the calculator, or imported through the connectivity kit (just drag and drop the file into appdir folder).

3. Apps may have an icon associated with it (just drop an icon.png file into the appdir folder).

Start off by copying an app (press [Apps] and highlight the app you want to mimic). Save it under a new name. Then in the program editor, open the program file named <blah> (App) where <blah> is the name you specified earlier. Here, enter your code. I recommend starting this process on the emulator.

Once you have started coding, open the conn. kit alongside the emulator and drag your custom app into the Content section of the conn. kit (to save it onto your PC/Mac). This where the appdir folder is created.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
03-10-2017, 09:34 PM
Post: #3
RE: How to make a complete application?
Thanks for replying Han, but I understand more or less well. You mean that when creating an application, something like this happens:
1-I have to create the appdir folder too, not the calculator.
2- When using the AVars and AFiles commands, files with * .hpappvar extension are automatically created, or are not they?
3 - The icon I do understand that it is only saved inside the file folder and already.
4-When are the files with * .hpappvar and * .lib extensions created? What are those * .lib files, the calculator creates them or are they made out of it?

It would be a pleasure that when you have time and you have made applications as good as "Equation Library" and "Graph3D" that I have in my calculator you could put a very small example of how to build a mini application with all those extensions putting the detailed steps to clarify My doubts and maybe the many others that are beginning in the programming of this extraordinary calculator, since the manual does not bring many examples of this !!! Thanks again.
Find all posts by this user
Quote this message in a reply
03-10-2017, 09:58 PM
Post: #4
RE: How to make a complete application?
(03-10-2017 09:34 PM)math7 Wrote:  Thanks for replying Han, but I understand more or less well. You mean that when creating an application, something like this happens:
1-I have to create the appdir folder too, not the calculator.
2- When using the AVars and AFiles commands, files with * .hpappvar extension are automatically created, or are not they?
3 - The icon I do understand that it is only saved inside the file folder and already.
4-When are the files with * .hpappvar and * .lib extensions created? What are those * .lib files, the calculator creates them or are they made out of it?

It would be a pleasure that when you have time and you have made applications as good as "Equation Library" and "Graph3D" that I have in my calculator you could put a very small example of how to build a mini application with all those extensions putting the detailed steps to clarify My doubts and maybe the many others that are beginning in the programming of this extraordinary calculator, since the manual does not bring many examples of this !!! Thanks again.

1. No, the hpappdir folder is created for you when you transfer the app out of the calculator/emulator onto the PC/Mac.

2. Yes; I think only one file is created that houses all the variables.

4. The hpappvar file is created as soon as you create an app variable via: AVars("myvarname"):=0 (or whatever you want to store). The lib file is what I created myself using the emulator and typing:

AFiles("Equation Library.lib"):=<list that I copied from a text file and pasted into the emulator>

As for the video, here's a super old one that gets into a bit of detail on replacing the Plot, Symb, etc functions:

https://www.youtube.com/watch?v=hv-MMwfzwwA&t=5s

I'll do another one since that example was done before the whole hpappdir paradigm.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
03-10-2017, 10:25 PM
Post: #5
RE: How to make a complete application?
Ahh I understand better. I'm going to watch the video and practice a bit with the emulator and try to make an application even simple. I'll wait for the new video already updated !!!. Thanks Han
Find all posts by this user
Quote this message in a reply
Post Reply 




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