Made apps portables to another computers


Harald Schneider

Hi

Editing the path for CSS Styles in the filemanager is possible, but not for Images. The edit icon is disabled.

So I can only delete an add the paths again, if it changes afterwards.

BTW: Would it be possible to use relative paths here? Just the same as for App Icon and Splash Screen resources ?

-- Harald

DecSoft

Hello Harald,

Yes; it's now the expected behaviour. The styles and scripts can be edited because can contain optional "queries" to be included in their URLs.



Harald Schneider
OK - but this limits the portability of the project. Relative paths (in relation to the project file) would be the best solution. What do you think?

Harald Schneider
The background idea for this:

If I have network paths stored here, then I have to edit them again if I want to use the project locally e.g. on a notebook.


DecSoft

Hello Harald,

AB projects intended to be completely portable. And it is. What you must to do is to place the app's files aside the app's project file. For example, supose your app's project file is "MyApp.ab". Aside that file you can place a directory named "images". Then use the File manager to add the images from that folder: then AB uses relative paths to your app's project file and therefore you can share the project in other computers without problems.

The above is valid for all the available kind of files and folders. Of course, if you choose an absolute path that cannot be relative to the, for example, if you choose an image file from another unit, then, if that unit do not exists in another computer... the image load fail. But, if you save your app's project file in a directory, and, inside this directory you place your app's files (even inside other subfolders), then the app is completely portable to other file system and computers without problem.

The background idea for this: If I have network paths stored here, then I have to edit them again if I want to use the project locally e.g. on a notebook.

I am not quite sure about network paths... probably we can't deal it in a relative to the project file, so, my recomendation is what I say above: store your files in a folder aside your app's project file. Probably we can't use network paths, but, in the same way that we can't use absolute paths not relative to our app's project file... better said... we can use it... but probably the app cannot be compile in other system, except if the files exists in the specified URLs / paths.

The below try to be a sample of directories three:

The point is to pick files from the "Audios", "Styles", "Scripts"... directories, so App Builder automatically save their paths relative to our app's project file. Then we can move the "MyCuteApp" directory (the root one) to another computer and continue working in the project without problem.



Harald Schneider
OK - I see ...

So the problem is, that the project file is located on a network drive and the file dialog returns the absolute path.

Thanks for the detailed explanation!

Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.