Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 11 total
Thread Build 11 of the Elevate Web Builder 2 Preview Available
Wed, Jun 3 2015 12:07 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

I've uploaded a new build 11 for the EWB 2 Preview, and it fixes the
following issues:

- A focus issue when closing the IDE with an active project running in the
internal IDE web browser.

- Two issues with the TServerRequestQueue component - being unable to cancel
a request, and requests being re-queued incorrectly at the end, instead of
the beginning, of the queue after a failure.

- An issue whereby an event handler for one form would be created in another
form.  This could be reproduced by creating a new visual project, adding a
new form, and then creating an OnCreate event handler for the new form.

- An issue where you could not set the ItemIndex of a TListBox,
TButtonComboBox, or TEditComboBox to -1 in order to clear the active,
selected item in the list.

Thanks,

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Jun 3 2015 1:54 PMPermanent Link

Mark Brooks

Slikware

Avatar

"Tim Young [Elevate Software]" wrote:

>>I've uploaded a new build 11 for the EWB 2 Preview

Tim, can I ask you to clarify how we should use the revised server request mechanism, specifically:

- Which responses now "hang about" e.g. just 4XX or anything not 2XX?
- What do we need to do to remove them?
- Where in code do we do this?

As I understand it, this will be additional code that I need to add in order to have my "API wrapper" function per its EWB1 implementation.

Much appreciated
Mark
Wed, Jun 3 2015 2:30 PMPermanent Link

Raul

Globestar Systems

Team Elevate Team Elevate

On 6/3/2015 1:54 PM, Mark Brooks wrote:
> Tim, can I ask you to clarify how we should use the revised server request mechanism, specifically:
>
> - Which responses now "hang about" e.g. just 4XX or anything not 2XX?

Anything not 200 still.

> - What do we need to do to remove them?

Call CancelRequest on the server queue

> - Where in code do we do this?

for example this sample TServerRequest OnComplete handler is all you need :


procedure TForm1.CustomOncomplete(Request: TServerRequest);
begin
 if Request.StatusCode = HTTP_OK then
   begin
      //completed OK
   end
   else
   begin
      //retry or cancel - this always cancels
      srvReqQ.CancelRequest;
      if srvReqQ.NumPendingRequests>0 then srvReqQ.ExecuteRequests;
   end;
end;


Raul
Wed, Jun 3 2015 3:12 PMPermanent Link

Mark Brooks

Slikware

Avatar

Raul wrote:

>> Anything not 200 still.

Understood, however 201 is also success for example?

>> Call CancelRequest on the server queue

Got it.

>> for example this sample TServerRequest OnComplete handler is all you need :
>>
>> procedure TForm1.CustomOncomplete(Request: TServerRequest);
>> begin
>>   if Request.StatusCode = HTTP_OK then
>>     begin
>>        //completed OK
>>     end
>>     else
>>     begin
>>        //retry or cancel - this always cancels
>>        srvReqQ.CancelRequest;
>>        if srvReqQ.NumPendingRequests>0 then srvReqQ.ExecuteRequests;
>>     end;
>> end;

Got it, again.

Thanks
Mark
Wed, Jun 3 2015 4:08 PMPermanent Link

Raul

Globestar Systems

Team Elevate Team Elevate

On 6/3/2015 3:12 PM, Mark Brooks wrote:
> Understood, however 201 is also success for example?

I know but that will have to be a a future enhancement i think or it's
easy enough to just modify framework.

There are also various 3xx ones that could be handled by framework (301
moved etc).

However it does opens everything up nicely so one show a transient
message to user (i.e. "Trying to reconnect...') and then use a timer
instead to continue after small delay instead of right away.

TServerRequest is based on TComponent so you can use the Tag property to
count retries or Data property to attach some extra useful stuff to
carry state as well.


Not necessarily best way but something like this in OnComplete:

if Request.StatusCode = HTTP_OK then
begin
 //completed OK
end
else
begin
  if Request.StatusCode = 201 then
  begin
    srvReqQ.CancelRequest;
    //also OK so can do something else
  end
  else if Request.StatusCode = HTTP_NOT_FOUND then //404
  begin
    srvReqQ.CancelRequest;
  end
  else if Request.StatusCode = HTTP_SERVICE_UNAVAILABLE then //503
  begin
   //do nothing - force retry with same request
  end;
  if srvReqQ.NumPendingRequests>0 then srvReqQ.ExecuteRequests;
end

Raul
Wed, Jun 3 2015 5:41 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Mark,

<< Understood, however 201 is also success for example? >>

I was modifying this in a hurry, so I forgot the other "safe" results.  I'll
add them in, also.

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Jun 4 2015 2:32 AMPermanent Link

Mark Brooks

Slikware

Avatar

"Tim Young [Elevate Software]" wrote:

>> I was modifying this in a hurry, so I forgot the other "safe" results.  I'll
>> add them in, also.

No worries Tim. Just making sure that I understood the mechanism.

Works totally as described BTW and I can see the rationale.

Regards
MCB
Sun, Jun 7 2015 6:27 AMPermanent Link

Doc

Even with latest Build 11 I have sometimes an issue with a Form losing the connection to an event.
If I work with mulitple Forms open, when I work an Form2, sometimes events in Form1 get lost, especially OnCreate and OnShow events. The code is still there, but I have to go to the Form designer, click on Form - Events and have to select the OnShow event from the drop down list again. I noticed this sometimes when I run my project and it won't run as expected, searched for the problem and found this. I cannot reproduce this exactly. Has anyone else run into this problem, too ?
Sun, Jun 7 2015 8:18 AMPermanent Link

Kane Jun

EZ-Tech, Inc

Doc wrote:

Even with latest Build 11 I have sometimes an issue with a Form losing the connection to an event.
If I work with mulitple Forms open, when I work an Form2, sometimes events in Form1 get lost, especially OnCreate and OnShow events. The code is still there, but I have to go to the Form designer, click on Form - Events and have to select the OnShow event from the drop down list again. I noticed this sometimes when I run my project and it won't run as expected, searched for the problem and found this. I cannot reproduce this exactly. Has anyone else run into this problem, too ?


Hi Doc

I thought it happens only me. I am glad to see company.

It looks happen more frequently if I use different version of EWB2 on different computers.
So I upgraded all the computers to latest version.
So far no problem but I am going to test more...
Sun, Jun 7 2015 8:19 AMPermanent Link

Uli Becker

That is a known problem of Build 11 and the issue will be fixed in the
next build.
Page 1 of 2Next Page
Jump to Page:  1 2
Image