Title: Embedded Browser in Genero 2.30 Post by: James S. on October 10, 2013, 03:28:22 am Hi all,
I am trying to use the embedded browser that was introduced in Genero 2.20 on my Genero 2.30 system in order to display a webpage. Does this feature still exist in Genero 2.30? If so, could someone please give me an example of how to set up the embedded browser, as I am having trouble getting it working using the existing documentation. Thanks, James Title: Re: Embedded Browser in Genero 2.30 Post by: Reuben B. on October 10, 2013, 03:45:34 am Are you using a TEXTEDIT or an IMAGE? It was moved from TEXTEDIT to IMAGE somewhere around those versions you mention.
https://4js.com/online_documentation/fjs-fgl-manual-html/User/PresentationStyles.html#STYATT_IMAGE Other thing to watch out for perhaps, are you using 32-bit GDC or 64-bit GDC? Title: Re: Embedded Browser in Genero 2.30 Post by: James S. on October 10, 2013, 04:21:06 am Hi Rueben,
I tried both, but I may have to try again I guess. I am using 32 bit version of the GDC. This may be my lack of knowledge, but I am meant to do something like the following within a style file yes? <Style name="image.browser"> <StyleAttribute name="ImageContainerType" value="browser"/> </Style> Thanks, James Title: Re: Embedded Browser in Genero 2.30 Post by: Reuben B. on October 10, 2013, 04:36:23 am I can never remember when case is important but try this ...
Code
Title: Re: Embedded Browser in Genero 2.30 Post by: James S. on October 10, 2013, 04:50:29 am Hi Rueben,
Thanks for the help. Unfortunately, this did not resolve the trouble I am having. When running the program, it just results in a white square where the image is, instead of the embedded browser that I am expecting. Thanks, James Title: Re: Embedded Browser in Genero 2.30 Post by: Reuben B. on October 10, 2013, 06:54:36 am This is my little test ...
Code
Code
Code
Title: Re: Embedded Browser in Genero 2.30 Post by: James S. on October 10, 2013, 07:10:28 am Hi Reuben,
Trying something like that, Code
Code
Code
And genero is happily telling me: FORMS statement error number -1102. Field (browser) not found in form. Title: Re: Embedded Browser in Genero 2.30 Post by: Reuben B. on October 10, 2013, 07:41:17 am I think you have a Static Image in your form, not a Dynamic Image field.
A static image remains the same, whilst a dynamic image can be DISPLAY'ed to. https://4js.com/online_documentation/fjs-fgl-manual-html/User/FormSpecFiles.html#FF_ITEMTYPE_IMAGE Title: Re: Embedded Browser in Genero 2.30 Post by: James S. on October 10, 2013, 07:48:37 am Thanks, that was the cause of that error.
As you can probably tell, I am still fairly new to the GDC. However, it is still displaying as an empty white square instead of the page I am expecting to show. I have tested with the link you used also, with the same result. Title: Re: Embedded Browser in Genero 2.30 Post by: Lionel F. on October 10, 2013, 10:00:28 am Hello James,
By any chance, does your internet connection pass through a proxy? If so, you need to specify the proxy settings in the connection tab of the options panel. Indeed, by default GDC doesn't inherit the system proxy settings. Best regards, Lionel Title: Re: Embedded Browser in Genero 2.30 Post by: James S. on October 10, 2013, 11:30:45 pm Hi Lionel,
Good question, and probably the right one to ask. I probably am behind a company proxy which would be stopping it. I will try again once I have the details and post the results. James Title: Re: Embedded Browser in Genero 2.30 Post by: James S. on October 11, 2013, 12:12:49 am Well it seems I dont have access to the options panel on my machine.
It was suggested to me that I could instead try to display a local html file as a check to see if it is the proxy causing issues. However this resulted in the same white square. Is it possible to display local files in the embedded browser? Title: Re: Embedded Browser in Genero 2.30 Post by: Reuben B. on October 11, 2013, 12:18:51 am James,
Re: the options panel, start the GDC in admin mode (-a) https://4js.com/online_documentation/fjs-gdc-manual-html/User/CmdLine.html If you are planning to use the RSS News Feed URL you had in an earlier post, you may find that after you overcome the proxy issue you will be disappointed. In my small program if I use the GDC and your URL I get what looks like raw html, if I use the GWC I get a page similar to what I see in a browser. For the GDC note this disclaimer in the documentation https://4js.com/online_documentation/fjs-fgl-manual-html/User/PresentationStyles.html#STYATT_IMAGE "Note: This feature uses the WebKit Open Source project as provided with Qt, and has limitations such as no Java or ActiveX support. It will display HTML / rich text, but may encounter difficulties with more complex Web pages" An alternative way to read this RSS news feed would be to use the methods in the com library to read the RSS news feed into an XML document, and from there you can filter out what parts of the news feed you want to display Code
Reuben Title: Re: Embedded Browser in Genero 2.30 Post by: James S. on October 11, 2013, 12:21:35 am Hi Rueben,
Thanks for the reply. However I have been told to drop the idea of an external webpage for the time being and focus on trying to get a local html file to work instead. Any comment on if it should or shouldn't work? James Title: Re: Embedded Browser in Genero 2.30 Post by: Reuben B. on October 11, 2013, 12:43:20 am Probably not...
Bz15152 Integrated browser: being able to display a local html file using "file:///" protocol ...fixed in GDC 2.50.00 Title: Re: Embedded Browser in Genero 2.30 Post by: James S. on October 11, 2013, 12:59:34 am Thanks for the reply Rueben,
Damn oh well, time to find another way. Title: Re: Embedded Browser in Genero 2.30 Post by: James S. on October 14, 2013, 01:35:06 am Hi all,
Sorry to open this up again. I have joined the 2.50 EAP, installed it, and tried again. I am still getting the empty white square when pointing to a file, which may be because it is not yet implemented in the EAP, however when going into the stylesheet, I found it had new errors in 2.50. Most of them didnt affect me and I removed the offending lines, however one did. The imageContainerType styleAttribute line has an error stating: Value 'imageContainerType' not in enumeration. The program still runs despite this error, but I am unsure of it. Is this a bug of the EAP or is it being changed how this feature is used? Regards, James Title: Re: Embedded Browser in Genero 2.30 Post by: Reuben B. on October 14, 2013, 02:31:02 am James,
We have a couple of different communication options. 1. If you are in the EAP program and you discover a change in behaviour with the EAP version compared to the previous version, or have a query about some new functionality in the EAP version, then you should raise that in the EAP mailing list. Details of which are provided when you join the EAP 2. If you have an issue with a released version of Genero, or you have a howto question, then you should contact your local support center. So in this instance, the" Value 'imageContainerType' not in enumeration: message is not an EAP issue because it also occurs in a release version of Genero. I get the same error message using GST 2.41.31. So for this, you should be sending a mail to your local support center. Now for your other issue, when communicating with the forum or support, you should provide an overview of what you are trying to do. So in this instance, you probably want to say something along the lines of "I want my Genero program to display the output of this RSS feed http://news.customs.gov.au/RSS_news_feed.asp?CAT=1" By giving this overview, it maybe that you are going down the wrong path and someone may open an alternative way of doing the task. So if the above is what you want do do, have you considered using the launchurl frontcall CALL ui.Interface.frontCall("standard","launchurl","http://news.customs.gov.au/RSS_news_feed.asp?CAT=1",[]), or if you don't want to launch a browser using the com/xml libraries to read the RSS feed into a 4gl program and display parts of it via DISPLAY ARRAY and/or TEXTEDIT. The other thing you should do is provide a small example that illustrates your issue. Your issue with the file maybe because you have the wrong number of slashes but there is no way of us knowing that. So take the example I posted earlier and modify it to reproduce your issue. If we have an example that works in our environment, but the same doesn't work in your environment then we also know we can start looking for environment type issues such as the proxy server that Lionel mentioned. Hope that all makes sense Reuben Title: Re: Embedded Browser in Genero 2.30 Post by: James S. on October 14, 2013, 02:41:23 am Hi Rueben, Thanks for the reply.
As stated in a previous post, I have been told to scrap the idea of reaching an external page for the time being and I am merely trying to reach a local html file on the machine and display that. Code
I am using a 4fd file rather then a handwritten screen, however the relevant parts of the resulting 42f file are below Code
And the styleSheet is still the same with: Code
If there is anything I can do to help solve this issue I am having quicker, please let me know Regards, James Title: Re: Embedded Browser in Genero 2.30 Post by: Reuben B. on October 14, 2013, 04:06:53 am You can always attach files to your posts. So attach your example 4gl/4fd/4st files if in doubt. If you do attach a .4fd, please specify the version of Studio used to create it. Also if your files have a schema attach that as well although this simple example should not need one.
Looking at your pathname, I am suspicious that the html file you are trying to load is complex. Have you tried creating a simple html file and loading that e.g. Code
Title: Re: Embedded Browser in Genero 2.30 Post by: James S. on October 14, 2013, 04:13:47 am Hi Rueben,
Sorry, I never considered uploading the files.... As for the complex file question, the path should be ignored as to the files complexity, it is a remnant from a previous attempt at something. The file i was trying to load was a copy of the basic google search page, for testing. I also created a hello world page and tried that with the same result. The 4fd was originally created in 2.30 on my main project and then was converted upon being opened and saved within GST 2.50. Title: Re: Embedded Browser in Genero 2.30 Post by: James S. on October 14, 2013, 04:15:54 am And I realised too late that I didn't attach my 4gl or 4st, so please find that attached to this post.
Title: Re: Embedded Browser in Genero 2.30 Post by: Reuben B. on October 14, 2013, 04:55:42 am Thanks for the attachments but that is not a small example that allows us to reproduce the problem.
I am expecting to see a 4gl similar to ... Code
With your 4gl I don't see anything loading the stylesheet. With your attachments please remember we don't have access to your libraries and database so any example to reproduce an issue needs to be small and self-contained. With what you sent, all we can do is read it and look for obvious errors. We can't compile it as we would also need globals.4gl and fpacmenu.sch. We can't run it because we don't have your libraries and database. Reuben Title: Re: Embedded Browser in Genero 2.30 Post by: James S. on October 14, 2013, 05:06:50 am Hi Rueben,
I feel like a rather large idiot right now. The problem lied in the fact that I was not using the CALL ui.Interface.loadStyles("browser.4st") call. I had assumed that this was handled by the Studio when I chose the style file in the properties panel. The result has not turned out perfectly, with the menu bar on the right disappearing as the browser showed up, but this particular problem is solved. I am sorry that I wasted so much time because of an assumption. Regards, James Title: Re: Embedded Browser in Genero 2.30 Post by: Reuben B. on October 14, 2013, 05:19:22 am No worries.
What you probably want to do is add the 3 lines ... Code
... into your applications style sheet Reuben |