Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: FFimage  (Read 13320 times)
Jeremy G.
Posts: 12


« on: August 24, 2015, 04:24:49 pm »

Hello everyone,

I try to understand how to manipulate image widget, i take a look in HTML5ClientTutorial, so now i know to give the functionality to a user to select a picture, to take the location and to put a picture in a determined folder.

But I didn't find the way to select a picture from a folder and put it on a image widget. I watched the video available here : https://4js.com/en/training/videos/genero/viewvideo/97/6-form-widgets/use-of-images but not seen to do that.

I don't know where to ask this question : In the end of the video above we can see "genero demo directory", is there a way to download it and have source codes of all of the examples?

Thanks a lot,

Regards

Lionel F.
Four Js
Posts: 82


« Reply #1 on: August 24, 2015, 05:57:45 pm »

Hello Jeremy,
Could you just precise what is the Genero product you're using for testing ? Is it a Genero Evaluation Program ?

Thanks!

Regards,
Lionel 
Reuben B.
Four Js
Posts: 1049


« Reply #2 on: August 25, 2015, 01:11:19 am »

Hi Jeremy,

The demo that is shown at or around the 2:49 mark in that video is shipped with the product.

If you look in $FGLDIR, you will see a directory demo.  The image example is in the Widgets directory i.e $FGLDIR/demo/Widgets/  (depending on age of video, program may differ)

These demos are handy to be able to run as they can be used to verify system installation as well as testing individual features.  You should be able to go ...

cd $FGLDIR
. ./envcomp
cd demo
fglrun demo.42r

The Images demo is then selecting from the tree menu,  User Interface->UI Basics->Widgets->Image

Alternatively to run the image example from the command line, you could have gone

cd $FGLDIR
. ./envcomp
cd demo/Widgets
fglrun Image.42r

If you want to run those demos using the Web Client, when httpdispatch is running, if you enter the following into a browser http://localhost:6394/demos.html  (assuming defaults ports, modify port number as neccessary), you will see a link "Genero Demos".  If you click on that, it will launch the same demo programs in the web client.    If you get a message Access Forbidden or equivalent, look in the file FGLASDIR/etc/as.xcf for an entry Id="gwc-demo" and check the ACCESS_CONTROL entries below it.  Again being able to run this example via the web browser is a good configuration test.

If you want to run these demos from Genero Studio, at present, there is no .4pw shipped that allows you to do that..  That will hopefully be included in a future version.  You can however create a .4pw easily which is good enough for your purposes.  Follow these steps...

File->New ... Simple Project
Delete the default group including in a new project, you just want the top root node remaining in the structure
File->Save As ... - save it in FGLDIR/demo as demo.4pw
Right-click on the top root node and select Import Project
In the dialog box that appears, in the Project Path, select FGLDIR/demo via the wizard.
Check the box that says "Define the source directory as the target directory"
Click OK
This will then take about a minute and create lots of warning about unable to compute dependencies which you can ignore.

When its done, save it, and then find the demo application in the project structure, make this the default application and you can run it.   You can run individual demos within the structure as well, you just have to be careful, the import mechanism does not read makefiles and so makes guesses based on name and directory as to what files are needed for an application.  You may need to move files out of a library node and into an application node in order to run individual demo programs.

That will help you run the demo program.

For your other questions, you will

1. need to be familiar with the openfile, opendir, savefile front call functions https://4js.com/online_documentation/fjs-fgl-manual-html/#c_fgl_FrontEndFunctions_004.html

2. familiar with FGL_GETFILE and FGL_PUTFILE https://4js.com/online_documentation/fjs-fgl-manual-html/#c_fgl_BuiltInFunctions_FGL_GETFILE.html

3. If using GWC, what changes with the above front-calls and use of FGL_GETFILE, FGL_PUTFILE https://4js.com/online_documentation/fjs-gas-manual-html/#c_gwc_file_transfer_001.html

4. Be familiar with IMAGE item type https://4js.com/online_documentation/fjs-fgl-manual-html/#c_fgl_FormSpecFiles_IMAGE_Item_Type.html

5. Be familiar with FGLIMAGEPATH concept https://4js.com/online_documentation/fjs-fgl-manual-html/#c_fgl_EnvVariables_FGLIMAGEPATH.html

Its not as complicated as it looks.  The key is to understand that Genero is two programs running at once, the fglrun process on the server , and the gdc or browser on the desktop.  The browser does not give you the same access to the desktop that an app running on the desktop (in our case gdc.exe) does.

Hope this helps,

Reuben



Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Jeremy G.
Posts: 12


« Reply #3 on: August 25, 2015, 10:01:56 am »

Hello Jeremy,
Could you just precise what is the Genero product you're using for testing ? Is it a Genero Evaluation Program ?

Thanks!

Regards,
Lionel 

Hello Lionel, I'm using Genero Studio v2.5.23 build-141884.

If I'm right, I've a licensed product, I'm in the company since the 1st of July, my genero studio seems to be installed registered, my collegue is in holiday at now, i'll ask him to check if everithing is ok in the configuration/setup of genero.
Jeremy G.
Posts: 12


« Reply #4 on: August 25, 2015, 10:12:56 am »

Hi Jeremy,

The demo that is shown at or around the 2:49 mark in that video is shipped with the product.

If you look in $FGLDIR, you will see a directory demo.  The image example is in the Widgets directory i.e $FGLDIR/demo/Widgets/  [..]


Thanks a lot for your reply, I'm looking the image.42r demo, you unlocked my learning thanks again.
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines