Dave N589

Member since: Tuesday, 18 March 2014
Last login: 2 weeks ago
Profile viewed: 274 views

Your Rank: 85
Points: 9

"One of the solutions in KastriFree is a way to handle keeping the current focused control visible when the keyboard is visible on mobile devices"I don't believe that's included (unless it's there by accident!). There is, however:* Support for Fireba

Dave N589 created a new topic ' Multiple calls to TRESTRequest.ExecuteAsync' in the forum. 2 years ago

I have the following code:

type
TRequestCompleteCallback = procedure(ASuccess: Boolean) of object;

procedure TNetworkDatamodule.RefreshRequest(ARequest: TRESTRequest; const AIDList: string; AComplete: TRequestCompleteCallback);
begin
ARequest.Params.ParameterByName('$idlist').Value := AIDList;
ARequest.ExecuteAsync(procedure
begin
AComplete(ARequest.Response.Status.Success);
end);
end;

This method is called multiple times in succession, each time passing a different TRESTRequest as the first parameter. This causes a "Duplicates not allowed" exception which is occuring in TMacHTTPClient.DoExecuteRequest in the System.Net.HttpClient.Mac unit on this line:

FDataTasks.AddTask(LConnection, LResponse);

I'm not sure why the error should occur, because it looks like the connection and response being added to FDataTasks should be unique, since they're being created within DoExecuteRequest.

I could refactor my code so that each request is called when the previous one completes, but that seems to defeat the purpose of calling them asynchronously
Read More...

Dave N589 replied to the topic 'Time for a new language - Swift' in the forum. 2 years ago

You realise that on mobile, Delphi code has ARC, i.e. automatic reference counting? Does Swift have the ability to compile to Android?
Read More...

Dave N589 replied to the topic 'Appending to detail in livebindings master/detail' in the forum. 3 years ago

I already tried option 1, and it is far less desirable.

Option 2 works; thanks very much! I'm going to blog about your solution (at delphi.radsoft.com.au/blog) when I have time.

Thanks again.
Read More...

Dave N589 replied to the topic 'Appending to detail in livebindings master/detail' in the forum. 3 years ago

PS: My profile activity shows that I uploaded the example project, but it's not appearing in the message, and clicking on it says "Fatal error - attempt to access unpublished file by non-admin user"
Read More...

Dave N589 replied to the topic 'Appending to detail in livebindings master/detail' in the forum. 3 years ago

It seems the attachment process isn't working for me. What other ways are there to insert records other than using Append or Insert? (Neither works in this instance). For what it's worth, my code looks like this:

qryItems.Append;
qryItemsListID.Value := ListID;

..and fails on the second line.

I've now discovered the issue seems to be the LiveBindings link between the BindSource and the Synch property of the ListView (it's a Win32 ListView) because if I take that off, it works. The problem is that I need the link. Is there a way around this?
Read More...

Dave N589 created a new topic ' Appending to detail in livebindings master/detail' in the forum. 3 years ago

I'm using Delphi XE8, and have a pretty simple master/detail setup, bound to a couple of listviews using LiveBindings to a SQLite db.

I'm attempting to append to the detail dataset, and before I can change any of the fields, the dataset falls out of dsInsert state to dsBrowse, thus causing a "Dataset not in insert or edit mode" error.

I've attached a test case as a demo of what's happening
Read More...

Dave N589 uploaded new file Project1.zip in Forums 3 years ago