facebook

test center Render problem

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #341111 Reply

    Proffie
    Member

    hi there.
    all of a sudden. I have a render problem with the test center. the code renders fine in Google Chrome.
    The lower protion of the screen is not rendered and stays blank. actually it seems, as if the window has shortened. see attached picture.
    any suggestions?

    Attachments:
    You must be logged in to view attached files.
    #341124 Reply

    Hi Proffie,

    Could you share what mobione version you are using? Can you share your design file to investigate? If you want to keep data in privacy you can send it to support at genuitec dot com, use title, mobione data from Proffie

    #341142 Reply

    Proffie
    Member

    Hi Support-Octavio,
    thank you for the quick reply.

    Yes, I am using MobiOne 2.3.2(hot-fix 1, 20130425)
    I just started a similar code from scratch, just to see if I somehow managed to have a cache problem, but the same behavior. I attach the design here.
    By the way, can you explain to me, why the content from comboboxes can (only) be retreived by:

    var objectType = $('select[name="combobox1"]').val();

    and the content from input text fields (only) with :

    var TextFieldContent1 = document.getElementById('m1-NewReport-TextFieldId1').value;

    but not vice versa????
    meaning, I was not successful in using

    var combobox1 = document.getElementById('m1-NewReport-combobox1').value;

    or in using

    var TextFieldContent1 = $('select[id="TextFieldId1"]').val();

    I have to admit, that I am not a crack in JS, but this kind of behavior just drives me nuts…:-)

    Edited: I added the .js files, which were missin extra…

    Attachments:
    You must be logged in to view attached files.
    #341148 Reply

    Stu Wade
    Member

    The ‘normal’ way to get the values would be

    $(‘#m1-screenName-textField1’).text();

    And

    $(‘#m1-screenName-combox1’).value();

    Which, I believe, is using JQuery.

    #341150 Reply

    Proffie
    Member

    Hi Stu,
    it might be the ‘normal’ way, but that does not work in MobiOne… 🙁
    I made an example where you can see the different results.

    I took the

    var objectType = $('select[name="combobox1"]').val();

    example from Support-Octavio. I assume, he knows better than me 🙂

    Attachments:
    You must be logged in to view attached files.
    #341153 Reply

    Stu Wade
    Member

    Ah well two wrong out of two ain’t my worst score 🙁

    If I had been awake I would have got the first one right …
    Textfields have .val not .text … Labels have .text

    But the combo box is bizarre so much so that I have given up on them, so really should not have proffered an opinion.

    In your example textField2 change .text to .val and all is well, but the select() structure seems to be unique to the combo box.

    #341175 Reply

    Proffie
    Member

    Hi Stu,
    sorry for waking you up :-)=)

    There is yet another strange thing with .val , .value in mobiOne.
    It seems, that if I declare global variables in an external .js file (like the ones above in my pending problem) , which call upon input m1 widgets (combox, text fields, etc.,), I get error messages in the debugger like ‘undefined, can not set value of null’
    I assume, this has something to do with the parsing sequence of internal and external .js files and the creation of HTML5????
    in the WWW, you get nice help suggestion like: DIV do not have values, they are no objects,…ason. That does not really help me.
    As I still have no clue as what causes the above mentioned render problem, I was wondering if this .js variable thing has something to do with it and if I need to put all my .js code in the xxx_custom.js file. If that is the case, I wonder what can be put in an external .js file and what not?
    Maybe this could be explained somewhere in the MB1 documentation a little more detailed…?
    regards

    #341176 Reply

    Proffie
    Member

    octavio,
    I still think, it has something to do with the JS, but still open for suggestions.
    As I mentioned to Stu, I tried to change the location of the variables, but no difference.
    also strange, If I run the

    var orderNr = document. getElementById('m1-NewReportBeta1-orderNr').value

    directly from the OnChange function of the textField, it works fine and I get the alert, if I put the same code in the XXX_custom.js file, it does not???
    See the two snippets I attached.

    Attachments:
    You must be logged in to view attached files.
    #341204 Reply

    Proffie
    Member

    Ok, I will close this issue I think.
    The render Problem seems to be caused by .js errors. It is an indication that the .js included in the project is not correct. It does not give you any indication about what and where, but hey, we are programming, so we should be able to tell…?
    Due to the fact, that MB1 and Google chrome use different bases for the debugging, errors in the variables can lead to syntax errors as described above. After This, I decided to throw away all the javascript snippets which I used from this forum on different database examples and started the code from scratch based only on JQuery.
    this seems the cleanest way with MobiOne, as the response from the test center is now OK.
    Thanks

    #341216 Reply

    Hi Proffie,

    I’ve opened a bug for the Test Center render issue. I realized that it only happens the first time you run your design. If you close Test Center and run it again, it will be rendered fine.

    Re javascript snippets: I think is better to use the jQuery API, that is easier and you can find many snippet code examples in the Widgets doc in Learning Center: http://www.genuitec.com/mobile/docs/widgetReference/widgetReference.html

    #341240 Reply

    Proffie
    Member

    Hi Octavio,

    yes it is good that you opened a bug report, because I have noticed, that the render problem still is there, even if the Javascript is clean. If I close the test center and open it again, it is still there, I have to close the whole MB1 programm and open it again, run the test center and it is gone. But, if I change anything on the design, it appears again… strange.

    If jQuery is easier, I will not discuss. I like my code to be understandable and I just can not always understand the meaning of “$”….but the jQuery chaet sheet helps a lot.
    It is just that a lot of good samples are available in this forum from well experienced users. They are not always in clean jQuery and that can give some copy and paste problems. Well, that will be part of my learning curve I guess..

    #341377 Reply

    Proffie
    Member

    Octavio,
    sorry to pop this up again, but I was also not successful in the test center in rendering the PDF from your PDFtest.mobi file you supplied to this forum . it just shows the binaries and not the document. from reading that post on PDFtest. I assume that at a given time it was possible to view PDF in the test center?
    If I run your PDFtest.html file in Chrome, the PDF shows nicely.
    I cleraed all cache in the test center before attempting to run your PDFtest.mobi.
    Any thoughts?

    #341667 Reply

    Hi Proffie,

    The example worked fine for me in 2.3.2.1. Did you use other pdf file? or are your issue the same that you reported in this thread? http://www.genuitec.com/support-genuitec/viewtopic.php?f=8&t=5984

    If you are using a physic pdf file, can you share it with us to investigate?

    Attachments:
    You must be logged in to view attached files.
    #341683 Reply

    Proffie
    Member

    Hi Octavio,

    I used the pdf file you supllied within you pDFTest.mobi example (the same as shown in your post).
    when I run your PDFTest.mobi in the test center, I get the binaries. (see picture) if I then run the generated HTML from the PDFTest-www folder in Goggle Chrome, it behaves normally and I can see the PDF.

    Attachments:
    You must be logged in to view attached files.
Viewing 14 posts - 1 through 14 (of 14 total)
Reply To: test center Render problem

You must be logged in to post in the forum log in