• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

[SOLVED] Hex Characters crashing my app

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [SOLVED] Hex Characters crashing my app

    Using Sencha touch 2 I have a text area field that allows user to enter notes. Works correctly.........except if a user enters a note with a return key (enter) in the note field...or any other hex character. I am able to save the info correctly to the back end file. The problem happens when the user tries to re open the note. I do a getCurrentNote procedure and try to populate the note field fro m the back end file. If the note has a enter key(any hex) the app will crash. I have tried using the vvUtility_encode but to no avail. If I use HTML encoding it still crashes..If I use JSON it inserts a '/n' but that doesn't look right in my text area??
    Thanks for any help.

    Ryan BCapture.jpg

  • #2
    How does it store on the back-end file? What does it look like? How exactly are you sending the data back, what vvOut procedure are you using? I am curious where "/n" is coming into play as this is not a line feed in Javascript, it should be "\n".

    Comment


    • #3
      Its goes to a physical file. We have DBU so you can actually see where the enter key is stored. .. .see attached picture.... I am just using a simple vvOut_execSQLtoJSON....... when i try to use the vvutility_encode it does keep my program from crashing but I can't get the desired look..... as you can see from the first picture i posted it gives you the /n.cnxhex.JPG

      Comment


      • #4
        Screen Shot 2013-05-13 at 11.34.01 AM.jpgMC.zip
        I am attaching an example application that will save two fields (one is a text area) and gives you the ability to pull up an entry. Compile the file MCCREARY and the rpg pgm MCCREARY. The front-end has a button that will submit the values and save to the file. It also has a button "Get First" that will pull the first record out of the MCCREARY file. If you first submit a name with a bio that has some new lines "Enter Key" then tap the Get First button you should see the backend respond with '\n' newline.

        Comment


        • #5
          beckhamrryyaann - did you ever determine where the "/n" characters were coming from? Is your issue resolved now?

          Comment


          • #6
            Thanks Johnny and Sean. I was able to run your program and see the code.. it works...it seems like i was over complicating it.

            Comment

            Working...
            X