NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jslarve

Pages: 1 [2]
16
I have an API server where you upload an image and it returns a processed image encoded with B64.

It works fine when using SetAccept('xml') on the client. Pretty snappy. The b64 is split up into 75 character lines. Groovy.

When SetAccept('json'), it works fine, but the b64 is returned as one large string (not multi lined).

This makes it impossible for a TEXT control to view it. It just freezes up. I guess that's OK if I can't load in a TEXT control, but I'd like to be able to if possible.

2 Questions:

  • Is using b64 the wrong approach for returning an image? I want to avoid saving the image on disk.
  • Is there a setting to allow the B64 to be split up in the json version?
Thanks.

17
Web Server - Ask For Help / Re: Memory issue - Solved?
« on: April 23, 2020, 08:18:46 AM »
Until the next NT build I went with this, just in case x might equal 1 some time.

        IF x > 1
                self.AddLog(self._ConnectionDataQueue.Data[1:x-1],self.packet.FromIP)
        ELSE
                self.AddLog(self._ConnectionDataQueue.Data[1:x],self.packet.FromIP)
        END


Hi Bruce

Correct, I am clicking on the WebServer window - I would like to see the POST data

Specifically, it only happens when I click on a POST log entry where the _thread_ is 0 - believe this is just the POST Header.

In Netweb.clw, around line 686

            self.AddLog(self._ConnectionDataQueue.Data[1:x],self.packet.FromIP)

Problem goes away if I change this line with this:  "[1:x-1]"

            self.AddLog(self._ConnectionDataQueue.Data[1:x-1],self.packet.FromIP)

Not sure if that will break something further along - doesn't appear to...?

Have no idea what is at the end of the string to cause it to lose it's marbles like that

Cheers
Graham

18
Web Server - Ask For Help / Re: Memory issue - Solved?
« on: April 23, 2020, 08:04:04 AM »
Hi Graham -

On my machine it's a lone <13> (0dh) without the <10>.

I tried saving the offending string to a file and duplicating the error by assigning to a TEXT control in a test app, but it didn't exhibit the offending behavior. So I guess there's more to the circumstance than just the <13>. But I am glad you figured out how to get around it.


Hi Jeff

Yip, that's what I was running into and it only happens if you touch the POST with thread number 0 which is the POST Header

App appears to lock up but if you leave it long enough, it comes back (sort of) but Ram used has gone thru the roof and impossible to use after that.

Think its actually a <10> - this is the code:

        x = instring ('<13,10><13,10>', self._ConnectionDataQueue.Data[1 : self._ConnectionDataQueue.DataLen], 1, pos)  ! Look for request terminating character
        if x > 0
          ! Found Header End Marker
          self._ConnectionDataQueue.HeaderEndPosition = x + 3

Cheers
Graham

19
Web Server - Ask For Help / Re: Memory issue - Solved?
« on: April 23, 2020, 12:33:35 AM »
Good find, Graham. I wonder if that <13> was confusing the ?Web:LastPost TEXT control on the WebServer window.

Will check that out tomorrow.

I was dealing with this for several hours today, but didn't discover the actual cause.

https://www.screencast.com/t/0j7Xm8Pb2R

When I commented out the one line, it stopped locking up. But I didn't take note of the memory usage.

If Field() = ?LogQueue and Event() = Event:NewSelection
      Get(LogQueue,Choice(?LogQueue))
      If ErrorCode() = 0
        Case Upper(Sub(LogQueue.Desc,1,3))
        Of 'POS'
          web:LastPost = LogQueue.Desc !This line locks up.
        Of 'GET'
          web:LastGet = LogQueue.Desc
        Else
          web:LastGet = LogQueue.Desc
        End
        Display()
      End
    End



thanks Graham - I've made the tweak.
It'll exclude the <13> which was in position x, which should do no harm.
(It should do no harm being there either, but hey, if removing it helps...)

cheers
Bruce

21
If I run the Chrome task manager and right-click on the list to display the "JavaScript Memory" column, I notice that my app's active tab in Chrome grows continuously. This happens with Clarionshop too.

Is this a bug?

I'll try leaving my browser open over night and see where it ends up.

Thanks

22
Well, I wasted a couple of hours yesterday trying to figure out why one proc couldn't see the other's session value. But I was using SetValue instead of SSV. :)

23
Web Server - Ask For Help / Re: NetWebBrowse - Design considerations
« on: October 05, 2016, 07:49:17 PM »
Thanks for the comments, Stu. I'm pretty much in the #2 realm at the moment.

It seems doable, but I had to unlearn some pre-HTML5 stuff with TABLE structures in xHTML. I was getting the "Next Button of Death" because I was trying to specify column width in pixels.  :-)

This page got the bells ringing for that http://www.w3schools.com/tags/tag_table.asp

Thanks again.
Jeff Slarve

24
Web Server - Ask For Help / NetWebBrowse - Design considerations
« on: October 05, 2016, 02:52:53 PM »
I have a database of line items. There can be multiple prices assigned to a line item via a child table.

(if one record has 2 children, then ALL records will have 2 pricing children in this particular situation)

I would like to dynamically be able to display xx number of pricing columns for xx number of child records.

I have one way that I started to solve, that seems to work okay, but it can get messy. I have a column in my browse, where I dynamically generate xx table structures to go in that column. It seems to work okay. e.g., this might be inside a cell, representing one child record:

This is the kind of thing I'm generating.
<TABLE WIDTH="100%">
  <TR>
     <TH width="30%">M</TH>
     <TH width="30%">L</TH>
     <TH width="30%">E</TH>
   </TR>
   <TR>
       <TD>$33.00</TD>
       <TD>$220.00</TD>
       <TD>$100.00</TD>
   </TR>
</TABLE>

So, in theory, I could put a couple of tables in that cell.

But since I'm early into this project, I'm wondering if there's a "more nettalk" way of doing this. I don't wish to have a bunch of pre-designed hidden columns. There are a whole lot of different cost fields per child record, and depending on the kind of database, we'll display different fields.

Thanks and Best wishes
Jeff Slarve

25
Hello -

I have a NetWebBrowse that has a memory NetWebForm as a child, to the right.
As far as the browse is concerned, the form is unrelated, datawise (if that matters).

When the browse first opened, with records in it, the locator works great.

However, if I enter a string that causes the browse to become empty, the focus moves from the browse locator to one of the fields on the child form.

How do I force the focus of the caret to remain on the locator when the browse gets filtered out?

I hope I've adequately explained the problem.

Thank you,
Jeff Slarve

26
OK. Now it's gone, and looks perfect. I wonder what I did to make that happen. :)

Hello -

My double drop menus have text underneath that I want to get rid of. Any clues would be much appreciated. See the image in the link below. Thanks.

http://slarve.com/NetTalkMenuProb1.png

27
Web Server - Ask For Help / Nettalk Double Drop Menu Problem (Noob alert)
« on: September 14, 2016, 12:22:42 PM »
Hello -

My double drop menus have text underneath that I want to get rid of. Any clues would be much appreciated. See the image in the link below. Thanks.

http://slarve.com/NetTalkMenuProb1.png

Pages: 1 [2]