Post Reply 
Can I access another application's files or variables?
03-30-2016, 01:24 AM
Post: #1
Can I access another application's files or variables?
Hi all,

I've been playing around a bit with application variables and files using the AVars and AFiles commands. I was wondering if it is possible to access files or variables defined in another application. It would be most useful if applications could share or exchange files. The appName dot objectName convention doesn't seem to work for the above commands.

The only alternatives I can think of for the moment would be to store the value of a variable or file in a built-in variable like L1. Or perhaps each application could have a utility function to read or write a local file. Neither alternative quite matches what I'd like to do for sharing information across applications.

Any suggestions (or pointer to hidden functions) anyone?
~Mark

Remember kids, "In a democracy, you get the government you deserve."
Find all posts by this user
Quote this message in a reply
03-30-2016, 04:48 AM
Post: #2
RE: Can I access another application's files or variables?
Hello,

I just tried creating a file (A) and a variable toto, in function, and I was able to go to stat app, and use Function.AFiles("A") and Function.toto with no issues...

Can you share in more details what you were trying to do?

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
03-30-2016, 06:14 PM
Post: #3
RE: Can I access another application's files or variables?
Hi Cyrille,

You are right, I was using the dot reference incorrectly, as in AFiles("Function.A") rather than Function.AFiles("A"). In hindsight, your form does seem obvious, doesn't it?

The context for file sharing is a program I have for mimicking the R data frame object using the Spreadsheet app of the HP Prime. So far I can load and save CSV files, insert or delete rows or columns, etc. This is why I had asked earlier how to programmatically determine the extent of a spreadsheet, so the user wouldn't need to explicitly define the row and column bounds. For this particular question about file sharing, I can imagine a scenario where a saved instance of Spreadsheet with one data set needs to import from another data set.

I hope to post the program soon, once I finish the documentation, and verify load/save of formulas and cell content other than strings and numbers. I'd like to additionally develop some programs for extracting table subsets based on conditional expressions, support basic R graphic functions like 'plot,' 'boxplot' and 'hist,' and provide command scripting. Eventually, tie all that together into a Prime app with functionality somewhat like RStudio.

I had asked sometime earlier about using the graphic capability of one built-in app within the context of another app instance, and that sounded a bit difficult to do. But we'll see what approach to take (custom code or app context switching) when I get to the graphics part of the project later.

Thanks,
~Mark

Remember kids, "In a democracy, you get the government you deserve."
Find all posts by this user
Quote this message in a reply
Post Reply 




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