Forum Replies Created
-
AuthorPosts
-
-
July 25, 2024 at 03:04 #57657
TomYU
ParticipantWhich line of code specifically caused the problem?
-
June 17, 2024 at 04:05 #57619
TomYU
Participant这是我以前写的,参考下。
-
June 12, 2024 at 11:19 #57617
TomYU
ParticipantClose Range check
-
May 9, 2024 at 03:12 #57584
TomYU
Participant…..
-
March 18, 2024 at 04:07 #57533
TomYU
ParticipantThis problem does exist and we look forward to resolving it as soon as possible. Additionally, I have encountered issues with calling the Activate method.
When switching to Activate, Activate=True and the schedule is not executed. -
March 5, 2024 at 09:07 #57527
TomYU
ParticipantkbmMW Version: 5.23.00
-
January 11, 2024 at 02:46 #57404
TomYU
ParticipantLet’s see if there’s any latest news, unfortunately it’s still not there.
-
June 2, 2022 at 01:26 #56498
TomYU
Participant……
-
April 17, 2022 at 15:10 #56429
TomYU
Participanthow to test?
Is Delphi 11 or Delphi 11.1?
-
April 13, 2022 at 01:11 #56416
TomYU
ParticipantDefault compilation variables used:
{$DEFINE KBMMW_SUPPORT_FASTMRWSLOCK} // If to use native very fast Multiple Reader Exclusive Writer lock. -
April 13, 2022 at 00:49 #56415
TomYU
ParticipantThe pause method does not work as expected on the Android platform:
procedure TkbmMWCustomThread.Pause;
-
April 13, 2022 at 00:28 #56414
TomYU
ParticipantAs a new development, I found that the code implemented in this way can execute normally on android platform.
procedure TForm1.Button2Click(Sender: TObject);
begin
rs:=TkbmMWPooledDatasetRefreshScheduler.Create(Self);
rs.StopScheduling; //not frozen when TkbmMWPooledDatasetRefreshScheduler.Owner<>nil.
rs.Free;
rs:=nil;
end;
-
April 12, 2022 at 12:56 #56413
TomYU
ParticipantWhen the application is closed, kbmMWClientConnectionPool1 will be released.
and kbmMWClientConnectionPool1 will execute the following methods:
FRefreshScheduler. StopScheduling;
On the Android platform, this line of code is frozen and will not continue.So the application can’t exit normally!
fixed code:
procedure TkbmMWPooledDatasetRefreshScheduler.StopScheduling;
begin
if FThread.IsStarted then//add by Tom YU
FThread.Pause;
end;I don’t know if this correction is correct, but my application can be closed normally.
best regards
Tom YU.
-
April 10, 2022 at 02:13 #56412
TomYU
ParticipantI found the cause of this problem, but I don’t know how to modify the code.
Problems caused by kbmMWGetCurrentThreadID function on Android platform.
This function generates an exception when the boundary check compilation option is turned on.
I recorded more details here:
-
April 10, 2022 at 01:31 #56411
TomYU
Participanthi,
I did this just to redisplay the problem.
When the application is closed, because this component cannot be released normally, the application cannot exit normally. When the application is restarted, the application is stuck.
This is a problem on the Android platform.best regards
Tom YU.
-
October 25, 2021 at 05:50 #55972
TomYU
ParticipantHas this problem been solved?
-
June 15, 2021 at 05:32 #55825
TomYU
ParticipantA ClientQuery has F1,F2,F3 fields, F1 is primary key,when i modify F2, I want to generate SQL like this: update testtable set (f1,f2) values (‘aaa’,’bbb’) where f1=xxx.
-
May 17, 2021 at 04:39 #55773
TomYU
Participanthi, kim
In fact, this problem has existed since 5.10.10, and we look forward to official corrections.
best regards
Tom YU.
-
May 17, 2021 at 01:32 #55771
TomYU
Participantfixed code:
procedure TkbmMWBindingDataSourceNavigator.SetValue(const AName:string; const AValue:TValue);
var
fld:TField;
begin
if IsValid then
begin
fld:=FDataSource.Dataset.FindField(AName);
if fld<>nil then
begin
if not (FDataSource.Dataset.State in [dsEdit,dsInsert]) then //+++++
FDataSource.DataSet.Edit;//+++++
fld.AsVariant:=TkbmMWRTTI.ConvertValue2Variant(AValue,nil);
FDataSource.DataSet.Post;//+++++
end;
end;
end; -
April 2, 2021 at 01:28 #55653
TomYU
Participantthanks!
-
March 29, 2021 at 06:32 #55622
TomYU
Participantfixed code:
class function TkbmMWPlatformMarshal.Memory2Int16(const AMemory:PByte; const ALittleEndian:boolean):smallint; type TShortBytes = packed record case integer of 1: (short: smallint); 2: (b:array[1..2] of byte); end; PShortBytes = ^TShortBytes; PShort=^smallint; var t:TShortBytes; begin {$IFDEF KBMMW_BIG_ENDIAN} if ALittleEndian then {$ELSE} if not ALittleEndian then {$ENDIF} begin t.b[1]:=PShortBytes(AMemory).b[2]; t.b[2]:=PShortBytes(AMemory).b[1]; Result:=t.short; end else Result:=PShort(AMemory)^; end; -
March 29, 2021 at 05:45 #55621
TomYU
Participanthi,
kbmMW 5.15 fixed!
thanks!
best regards.
Tom yu
-
March 26, 2021 at 05:27 #55606
TomYU
ParticipantFMX ListView only displays the content of the first bound field, the others are not displayed.
-
March 25, 2021 at 11:20 #55599
TomYU
Participantprocedure TForm3.Button1Click(Sender: TObject); begin FBindings := TkbmMWBindings.Create; FBindings.Bind(DisplayDataSet, 'f1', ListView1, '#Text1'); // error. FBindings.Bind(DisplayDataSet, 'f2', ListView1, '#Text2'); FBindings.Bind(DisplaydataSet, '@', ListView1, '@', [mwboTwoWay]); FBindings.UpdateEvent.Activate(False); FBindings.Clear; //An error occurred end;
Writing the code like this reproduced this error.
-
March 25, 2021 at 02:45 #55597
TomYU
ParticipantThis problem is real in my actual project, for this reason I cannot upgrade to kbmMW 5.14.
-
March 25, 2021 at 02:36 #55594
TomYU
Participantprocedure TListDialogFrame.PrepareView; begin if DisplayDataSet <> nil then begin ListViewSearchBox(ListView1).Text:=''; FBindings.Clear;//******************* if KeyFieldName <> '' then FBindings.Bind(DisplayDataSet, KeyFieldName, ListView1, ''); FBindings.Bind(DisplayDataSet,DisplayFieldName,ListView1,'#Caption'); FBindings.Bind(DisplaydataSet,'@',ListView1,'@',[mwboTwoWay]); //双向绑定.位置同步. FBindings.Update; FBindings.UpdateEvent.Activate(True); end else begin FBindings.Clear;//***************** FillListFromDisplayStringList; end; end; -
March 16, 2021 at 01:45 #55578
TomYU
ParticipantBecause of this issue, I cannot upgrade to kbmMW 5.14!
-
January 7, 2021 at 03:42 #55395
TomYU
Participantwhen will release an update of kbmMW?
-
December 14, 2020 at 06:49 #55272
-
November 23, 2020 at 06:58 #55250
TomYU
Participantki,kim
delete this topic.
-
November 22, 2020 at 05:01 #55249
TomYU
ParticipantI had to change Queue to Synchronize to ensure that my application can run normally.
-
November 18, 2020 at 07:27 #55216
TomYU
ParticipantHi,
I tried and still did not solve the problem, I sent an email to you, pay attention to check.
best regards
Tom YU.
-
November 7, 2020 at 09:04 #55207
TomYU
Participanthi,
I’m sorry,I made a mistake!
best regards
Tom YU.
-
November 7, 2020 at 08:54 #55206
TomYU
Participanthi,
I found set kbmMWTCPIPIndyClientTransport1.VerifyTransfer and kbmMWTCPIPIndyServerTransport1.VerifyTransfer =True, Client can connect server.
if set VerifyTransfer=False for server and client, Client can’t connect server.
best regards
TomYU.
-
November 7, 2020 at 05:40 #55204
TomYU
Participanthi,kim
5.13 fixed! Thank you.
Best regards
TomYU.
-
November 7, 2020 at 05:39 #55203
TomYU
Participanthi,kim
5.13 not fixed!
Best regards
TomYU.
-
November 7, 2020 at 05:38 #55202
TomYU
Participanthi,kim
5.13 fixed!
Thank you.
Best regards
TomYU.
-
November 7, 2020 at 05:34 #55201
TomYU
Participanthi,kim
5.13 fixed!
thank you!
best regards
TomYU
-
November 4, 2020 at 06:25 #55190
TomYU
ParticipantCode written like the following will not trigger WhenException.
Scheduler.Run(Task1)
.WhenException(procedure(const AException:Exception)
begin
ShowMessage(AException.Message);
end)
.Activate; -
October 16, 2020 at 09:34 #55175
TomYU
Participanthi,
Thank you for your reply and agree with you.
If this method is added to kbmMWClientQuery, it will let me not use the helper class.
best regards.
Tom yu.
-
October 15, 2020 at 03:46 #55170
TomYU
ParticipantThis is the helper class I wrote to solve the above problem:
function TkbmMWClientQueryHelper.IsModified: Boolean;
var
i: TkbmNativeInt;
j: TkbmNativeInt;
pRec, pOrigRec, pOldRec: PkbmRecord;
aRecords: TkbmList;
st: TUpdateStatus;
aOldV, aNewV: Variant;
begin
if Self.State in [dsInsert, dsEdit] then
Self.Post;
Result := False;
with Self do
begin
aRecords := Common.Records;
for i := 0 to aRecords.Count – 1 do
begin
pRec := PkbmRecord(aRecords.Items[i]);
if pRec = nil then
begin
Continue;
end;
// Find oldest version.
pOrigRec := pRec;
while pOrigRec^.PrevRecordVersion <> nil do
begin
pOrigRec := pOrigRec^.PrevRecordVersion;
end;// Check what status to react on.
if pRec^.UpdateStatus = usDeleted then
begin
// Dont resolve inserts that were deleted again.
if pOrigRec^.UpdateStatus = usInserted then
st := usUnmodified
else
st := usDeleted;
end
else if pOrigRec^.UpdateStatus = usInserted then
st := usInserted
else
st := pRec^.UpdateStatus;
pOldRec := OverrideActiveRecordBuffer;
try
if st = usModified then
begin
OverrideActiveRecordBuffer := pRec; // 指向修改后的数据
for j := 0 to FieldCount – 1 do
begin
OverrideActiveRecordBuffer := pRec; // 指向修改后的数据
aNewV := FieldByName(Fields[j].FieldName).Value;
OverrideActiveRecordBuffer := pOrigRec; // 指向修改前的数据
aOldV := FieldByName(Fields[j].FieldName).Value;
if aNewV <> aOldV then
begin
Result := True;
Break;
end;
end;
end
else if st = usInserted then
begin
Result := True;
end
else if st = usDeleted then
begin
Result := True;
end
else if pRec.UpdateStatus = usUnmodified then
beginend;
finally
OverrideActiveRecordBuffer := pOldRec;
end;if Result then
Break;
end;
end;
end; -
August 18, 2020 at 05:31 #54995
TomYU
ParticipantFor such a complicated SQL, it is better to write a method on the server side.
-
July 13, 2020 at 08:27 #54960
TomYU
ParticipantCurrently I only use listView binding with ClientQuery.
-
June 2, 2020 at 02:46 #54879
TomYU
ParticipantHi,
Thanks!
5.12 fixed is OK! -
May 21, 2020 at 07:18 #54788
TomYU
ParticipantI bind the keyfield value to a Text object in ListviewItem,
Now I call the DataSet.Locate method to synchronize the current position of the Dataset. -
May 20, 2020 at 07:00 #54785
TomYU
ParticipantThis problem affects the TkbmMWBindings.Update method.
The TkbmMWBindings.Update method will enter an infinite loop when the UpdateNonSync method generates an exception. -
May 18, 2020 at 07:01 #54779
TomYU
ParticipantDo you call the Stop method in the thread executed by the Scheduler?
If so, that is the reason.
-
May 14, 2020 at 04:09 #54769
TomYU
Participanthi,
“In addition, when the Listview is bound to the clientquery, my users can feel the efficiency is very low on the android platform, Is there a way to improve the efficiency?”
This problem was caused by rebinding.
I created a field for ClientQuery during the design period and bound it once during the run time to solve the problem of slow display.best regards
Tom yu. -
May 12, 2020 at 04:55 #54749
TomYU
ParticipantI bind a clientquery, and then when I reopen the clientquery, I must clear the binding before opening, and then rebind after opening.
How can smartbind better support data reopening? Once bound, Smartbind can adapt to the reopening of the clientquery.
-
June 28, 2022 at 01:32 #56529
TomYU
ParticipantThis content is meaningless. Kbmmw is right.
-
June 27, 2022 at 11:13 #56527
TomYU
ParticipantSorry,this is error.
Define in unit System:
{$IFDEF POSIX}
TThreadID = NativeUInt;
{$ENDIF}Help file:
Defines a platform-dependent unsigned integer.
NativeUInt represents a subset of the natural numbers. The range of NativeUInt depends on the current platform. On 32-bit platforms, NativeUInt is equivalent to the Cardinal type. On 64-bit platforms, NativeUInt is equivalent to the UInt64 type.
The size of NativeUInt is equivalent to the size of the pointer on the current platform.
function kbmMWGetCurrentThreadID:TkbmNativeUInt;
should change to :
function kbmMWGetCurrentThreadID:TThreadID ; -
June 13, 2022 at 03:58 #56512
TomYU
Participantit’s work fine.
-
April 14, 2022 at 08:10 #56423
TomYU
ParticipantI’m not sure. I just want to test FLock.BeginWrite work as expected?
-
March 28, 2021 at 05:39 #55613
TomYU
ParticipantCan it display the file name requested by the client?
-
May 16, 2020 at 07:11 #54776
TomYU
ParticipantAfter using mwafoNevera or mwafoOncer, I do not need to rebind, but when ClientQuery is opened, Listview and data set are often displayed out of sync, even though I call the Refresh method.
This forced me to change back to the original way. -
May 16, 2020 at 07:03 #54775
TomYU
ParticipantI have some questions about smartbind:
1.Smarbind does not work properly on the Android platform, but works normally on Windows. When ClientQuery.AutoFieldDefsOnOpen = mwafoOnce.
I think mwafoOnce has bug on android platform.
An error message : the field does not have a dataset.2.I had to call Refresh twice for Listview to display the contents of the dataset correctly.
qOrderItem is a TkbmMWClientQuery and qOrderItem .AutoFieldDefsOnOpen =mwafoNeverprocedure TForm1.BindOrderItem;
begin
qOrderItem .AutoFieldDefsOnOpen :=mwafoNever;
if NavigatorOrderItem=nil then
begin
FBindOrderItem.Bind(qOrderItem, ‘FGoodsCode’, ListView1, ‘#fgoodscode’);
… NavigatorOrderItem:=FBindOrderItem.Bind(qOrderItem, ‘@’, ListView1, ‘@’, [mwboTwoWay]);
end;
NavigatorOrderItem.Navigator.Refresh;
NavigatorOrderItem.Navigator.Refresh;//+++++++++++++end;
3.In the process of repeatedly opening the dataset when clientquery .AutoFieldDefsOnOpen :=mwafoNever, occasionally an error message is generated: the field does not have a dataset. This is caused when smartbind calls the Update method.
-
May 14, 2020 at 01:06 #54767
TomYU
Participanthi,
This is definitely good news for me.
I have used smartbind in the actual project. If I can see the improvement of the above problem as soon as possible, it is a very grateful event for me.
I have already felt the perfection of smartbind. Smartbind is a technology that must be used in the development projects. I look forward to smartbind being more perfect.
In order to bind the reopened clientquery, I have to write a lot of code because my clientquery is on the datamodule and the binding object is on the form. In the end, it looks like the form and datamodule Still tightly coupled together.
In addition, when the Listview is bound to the clientquery, my users can feel the efficiency is very low on the android platform, Is there a way to improve the efficiency?
best regards
Tom yu. -
April 12, 2020 at 02:32 #54590
TomYU
ParticipantHow do you modify it?
-
-
AuthorPosts
