Post Reply 
Images et Programme
09-22-2018, 04:03 PM (This post was last modified: 09-22-2018 04:05 PM by Tyann.)
Post: #1
Images et Programme
Bonjour
J'ai créer une application qui contient dans le dossier 'Fichiers' 6 images 32*32 au format png.
J'ai créer un autre petit programme qui utilise les 6 images de l'application.
Pour rendre ce petit programme indépendant de l'application, j'ai copié ces 6 images dans des variables HVars avec HVars("name"):=AFiles("name").
J'ai remplacé ensuite dans le petit programme : Gx:=AFiles("name") par Gx:=HVars("name").
Tout cela fonctionne très bien et maintenant mon petit programme est indépendant de mon application.
1er point : je ne savais pas qu'une variable HVars pouvait contenir des images.
2 ème point : le gestionnaire de mémoire me les affiche comme des variables de type SRTING.
Enfin mon problème :
Si je veux mettre ce programme disponible en téléchargement, il semble que je ne peux pas sauvegarder le contenu du repertoire Variables depuis le kit de connectivité.
Je ne peux donc pas associer ces images à mon programme et de toute façon si je fais un click droit sur le dossier Variables, il n y a pas d'option 'AJOUTER'
J'ai raté quelque chose ou cela n'est pas possible ?

Hello
I create an application that contains in the folder 'Files' 6 images 32 * 32 in png format.
I created another little program that uses the 6 images of the application.
To make this little program independent of the application, I copied these 6 images into HVars variables with HVars ("name"): = AFiles ("name").
I then replaced in the small program: Gx:=AFiles ("name") by Gx:=HVars ("name").
All this works very well and now my little program is independent of my application.
1st point: I did not know that an HVars variable could contain images.
2nd point: the memory manager displays them as SRTING variables.
Finally my problem:
If I want to make this program available for download, it seems that I can not save the contents of the Variables directory from the connectivity kit.
I can not associate these images with my program and anyway if I make a right click on the folder Variables, there is no option 'ADD'
I missed something or it is not possible?

Sorry for my english
Find all posts by this user
Quote this message in a reply
09-22-2018, 04:38 PM (This post was last modified: 09-22-2018 04:39 PM by grsbanks.)
Post: #2
RE: Images et Programme
Je crois bien que la seule façon de distribuer des images et autres "fichiers" avec un programme est de les incorporer dans une app à distribuer. En procédant de cette façon, tout est groupé dans un seul répertoire qu'il suffit de distribuer sous la forme d'une archive .zip.

I think the only way to distribute images and other "files" with a program is to embed them in an app that you'll distribute. That way, everything is stored in the same directory that can be distributed as a .zip file.
Find all posts by this user
Quote this message in a reply
09-22-2018, 05:17 PM
Post: #3
RE: Images et Programme
If your HVars are showing up as strings, can't you copy the strings in your program to avoid using external variables ?
Find all posts by this user
Quote this message in a reply
09-23-2018, 06:24 AM
Post: #4
RE: Images et Programme
(09-22-2018 05:17 PM)Didier Lachieze Wrote:  If your HVars are showing up as strings, can't you copy the strings in your program to avoid using external variables ?

Bonjour

Excellente idée, je viens de faire un essai cela fonctionne.
Lorsque j'évalue les variables dans l'écran Home, l'image s'affiche dans l'historique
puis si je fait un copier sur l'image j'obtiens une chaîne dans la ligne de commande
que je n'ai plus qu 'à copier coller dans le programme.
J'ai mis le contenu dans une variable globale déclarée avant le code sous forme de liste
et cela fonctionne.
Merci.
Ceci dit je viens de me souvenir qu'il y a aussi la solution de ICON qui est toujours supporté
en tous cas dans la version 13865.

Hello

Great idea, I just have a try it works.
When I evaluate variables in the Home screen, the image is displayed in the history
then if i copy to the image i get a string in the command line
that I have only to copy paste in the program.
I put the contents in a global variable declared before the code as a list
and it works.
Thank you.

That said I just remember that there is also the ICON solution that is still supported
in any case in version 13865.

Sorry for my english
Find all posts by this user
Quote this message in a reply
09-24-2018, 01:18 PM
Post: #5
RE: Images et Programme
Hello,

In theory, you should not be using graphic in programs...

The geist of the Prime design/thinking was that anything that did graphics and the likes most likely waranted it's own app. Programs being reserved for "library type funtions". Think basic math functions that are needed everywhere...

(Program were also useable for beginer just trying to create simple programs for "test" before them moved them to apps...)

Anyhow, The fact that you are trying to shoehorn things that were not ment to work together... together is causing you the issues there...

Placing the strings in your program probably will not work well either as these "image" strings are not real strings in the fact that they hide data after the final 0. But should you do a copy/paste of these strings in your program, it most likely would not work well as the binary data hidden after that 0 would not be copied...

So, what can you do? Well, if you really want to use a program, I would suggest using the ICON keyword which was our original sollution to adding graphic in programs...
Not a great sollution, but it would work well enough for your case I beleive.
You can get the PC helper program from this thread:
http://www.hpmuseum.org/forum/thread-738.html

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
09-24-2018, 02:27 PM (This post was last modified: 09-24-2018 02:46 PM by Tim Wessman.)
Post: #6
RE: Images et Programme
Just make it into an app, use the access of files and folders directly... simple.

Distribute the app and the program together. Why do you feel you need a "program" separate though? Just use the application directly...

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
09-24-2018, 06:14 PM
Post: #7
RE: Images et Programme
Bonjour Cyrille, Tim

Le programme avec les images sous forme de chaînes fonctionne correctement semble t-il.

L'application qui contenait ces images a déjà son programme, un programme assez conséquent avec quelques options.
Le petit programme que j'ai voulu rendre indépendant est un mini jeu, relativement simple et le présenter sous forme d'application n' a pas trop d'intéret, je pense.
Merci à vous deux pour vôtre attention.


Hello Cyrille, Tim

The program with the images in the form of strings works correctly, it seems.

The application that contained these images already has its program, a fairly consistent program with some options.
The small program that I wanted to make independent is a mini game, relatively simple and present it as an application is not too interesting, I think.
Thank you both for your attention.

Sorry for my english
Find all posts by this user
Quote this message in a reply
Post Reply 




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