HP Forums

Full Version: Creating App Variables
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Does anyone know how to create new App variables?

I can add code to an app, modify (or rewrite) its views and generally make it behave as i want. What I haven't figured out, is how to create variables that are bound to an app, do not appear in the user variable list and retain their values.

Since the Prime does not have a directory structure it seems that the only way to create a group of persistent data items for a specific purpose is to embed them in an app. I just can't figure out how to do it.
You can do this as follows:

1. Take any App, say Spreadsheet, and save it under a different name, say Test.

2. Select it as the active App and go to the Program Catalog. It will appear at the top of the list as Test (App).

3. Open it in the editor and you will see the program template. Insert your desired bound variable at the top, e.g.:



4. Exit the editor and return to Home or CAS view. You will find this variable bound to this App:

Vars > App > Test > Program > App_Test_Var

Thanks. It was simpler than I thought. I was hoping there was a way for the app variables to appear in the connection kit under a tab (like Results or Plot) where the default values could be edited. But I can live with it the way it is.

-- jeff
If you'd like there to be certain default values, you just need to initialize to those values in the source. Remember though, that happens on *compile* time of the program source file - not on runtime.

Reference URL's