Subscribe for automatic updates: RSS icon RSS

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

Pages: 1 [2]
  Reply  |  Print  
Author Topic: Embedded Browser in Genero 2.30  (Read 46059 times)
James S.
Posts: 14


« Reply #15 on: October 11, 2013, 12:59:34 am »

Thanks for the reply Rueben,

Damn oh well, time to find another way.
James S.
Posts: 14


« Reply #16 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
Reuben B.
Four Js
Posts: 1046


« Reply #17 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

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


« Reply #18 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
  1. FUNCTION sixteen()
  2.  DEFINE
  3.    win ui.Window,
  4.    myForm ui.Form,
  5.    id, i INTEGER,
  6.    d ui.Dialog
  7.  
  8.  #OPEN WINDOW win_sixte WITH FORM "sixte" ATTRIBUTE (border)
  9.  OPEN FORM Form1 FROM "sixte"
  10.  DISPLAY FORM Form1
  11.  
  12.  #DISPLAY "http://news.customs.gov.au/RSS_news_feed.asp?CAT=1" TO browser
  13.  DISPLAY "file:///C:/Users/jsunderland/Documents/My%20Genero%20Files/fpacmenu250/webcomponents/industrial/Google.html" TO browser
  14. END FUNCTION
  15.  

I am using a 4fd file rather then a handwritten screen, however the relevant parts of the resulting 42f file are below
Code
  1.  <Folder name="folder1">
  2.        <Page name="page1" action="industry" text="Industry News">
  3.          <LStr text="Industry News"/>
  4.          <Grid name="grid2" width="47" height="23">
  5.            <FormField name="formonly.browser" colName="browser" sqlType="CHAR" fieldId="12" sqlTabName="formonly" noEntry="1" tabIndex="20">
  6.              <Image width="43" height="21" style="browser" posY="1" posX="3" gridWidth="43" gridHeight="21"/>
  7.            </FormField>
  8.          </Grid>
  9.        </Page>
  10.  

And the styleSheet is still the same with:

Code
  1. <Style name="Image.browser">
  2.   <StyleAttribute name="imageContainerType" value="browser"/>
  3.  </Style>
  4.  

If there is anything I can do to help solve this issue I am having quicker, please let me know

Regards,

James
Reuben B.
Four Js
Posts: 1046


« Reply #19 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
  1. Hello World
  2. </body>
  3. </html>

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


« Reply #20 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.


* sixte.4fd (14.02 KB - downloaded 1187 times.)
* Google.html (110.78 KB - downloaded 1396 times.)
* hello.html (0.05 KB - downloaded 1181 times.)
James S.
Posts: 14


« Reply #21 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.

* sixte.4gl (24.64 KB - downloaded 1310 times.)
* browser.4st (1.97 KB - downloaded 1264 times.)
Reuben B.
Four Js
Posts: 1046


« Reply #22 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
  1. MAIN
  2.    CALL ui.Interface.loadStyles("browser.4st")
  3.    CLOSE WINDOW SCREEN
  4.    OPEN WINDOW w WITH FORM "browser"
  5.  
  6.    DISPLAY "file:///C:/Users/jsunderland/Documents/My%20Genero%20Files/fpacmenu250/webcomponents/industrial/hello.html" TO browser
  7.  
  8.    MENU ""
  9.        ON ACTION close
  10.            EXIT MENU
  11.    END MENU
  12. END MAIN

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

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


« Reply #23 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
Reuben B.
Four Js
Posts: 1046


« Reply #24 on: October 14, 2013, 05:19:22 am »

No worries.

What you probably want to do is add the 3 lines ...

Code
  1. <Style name="Image.browser">
  2.  <StyleAttribute name="imageContainerType" value="browser"/>
  3. </Style>

... into your applications style sheet

Reuben

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Pages: 1 [2]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines