|
|
|
Что делает kbmMemTable.MoveCurRecord?
|
|||
|---|---|---|---|
|
#18+
Ребята, подскажите что делает метод kbmMemTable.MoveCurRecord? Ожидал, что переместит активную запись вверх или вниз. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 09.03.2018, 22:20 |
|
||
|
Что делает kbmMemTable.MoveCurRecord?
|
|||
|---|---|---|---|
|
#18+
scorpion235, можно подсмотреть ... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 09.03.2018, 22:41 |
|
||
|
Что делает kbmMemTable.MoveCurRecord?
|
|||
|---|---|---|---|
|
#18+
Блогодарю, прокачал версию 7.70.00 > 7.74.00 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.03.2018, 15:55 |
|
||
|
Что делает kbmMemTable.MoveCurRecord?
|
|||
|---|---|---|---|
|
#18+
// Move record to the specified destination. function TkbmCustomMemTable.MoveCurRecord(Destination: TkbmNativeInt): Boolean; begin Result := MoveRecord(RecNo,Destination); end; Переместите запись в указанное место назначения. Но по факту что-то никуда не двигает ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.03.2018, 18:49 |
|
||
|
Что делает kbmMemTable.MoveCurRecord?
|
|||
|---|---|---|---|
|
#18+
scorpion235// Move record to the specified destination. function TkbmCustomMemTable.MoveCurRecord(Destination: TkbmNativeInt): Boolean; begin Result := MoveRecord(RecNo,Destination); end; Переместите запись в указанное место назначения. Но по факту что-то никуда не двигает а должна ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.03.2018, 18:53 |
|
||
|
Что делает kbmMemTable.MoveCurRecord?
|
|||
|---|---|---|---|
|
#18+
defecator, хотелось бы ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.03.2018, 20:21 |
|
||
|
Что делает kbmMemTable.MoveCurRecord?
|
|||
|---|---|---|---|
|
#18+
scorpion235defecator, хотелось бы так загляни внутрь MoveRecord ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.03.2018, 20:29 |
|
||
|
Что делает kbmMemTable.MoveCurRecord?
|
|||
|---|---|---|---|
|
#18+
defecator, перестраивает индекс, по факту записи не меняются местами kbmMemTable.pas// Record rearranging. // Move record from one place in table to another. // Only rearranges the roworder index. function TkbmCustomMemTable.MoveRecord(Source, Destination: TkbmNativeInt): Boolean; var p: Pointer; begin Result := False; if FCurIndex<>Indexes.FRowOrderIndex then exit; {Because property RecNo has values 1..FRecords.Count and FRecNo has values 0..FRecords.Count - 1} Dec(Source); Dec(Destination); if (Source <> Destination) and (Source > -1) and (Source < FCurIndex.FReferences.Count) and (Destination > -1) and (Destination < FCurIndex.FReferences.Count) then begin p:=FCurIndex.FReferences[Source]; FCurIndex.FReferences.Delete(Source); FCurIndex.FReferences.Insert(Destination,p); Result:=true; end; end; ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.03.2018, 20:41 |
|
||
|
Что делает kbmMemTable.MoveCurRecord?
|
|||
|---|---|---|---|
|
#18+
scorpion235defecator, перестраивает индекс, по факту записи не меняются местами kbmMemTable.pas// Record rearranging. // Move record from one place in table to another. // Only rearranges the roworder index. function TkbmCustomMemTable.MoveRecord(Source, Destination: TkbmNativeInt): Boolean; var p: Pointer; begin Result := False; if FCurIndex<>Indexes.FRowOrderIndex then exit; {Because property RecNo has values 1..FRecords.Count and FRecNo has values 0..FRecords.Count - 1} Dec(Source); Dec(Destination); if (Source <> Destination) and (Source > -1) and (Source < FCurIndex.FReferences.Count) and (Destination > -1) and (Destination < FCurIndex.FReferences.Count) then begin p:=FCurIndex.FReferences[Source]; FCurIndex.FReferences.Delete(Source); FCurIndex.FReferences.Insert(Destination,p); Result:=true; end; end; а зачем физически переносить данные записи, если достаточно изменить позицию данных в списке ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.03.2018, 21:05 |
|
||
|
Что делает kbmMemTable.MoveCurRecord?
|
|||
|---|---|---|---|
|
#18+
defecator, самописный код смены позиции двух записей в DataSet'е уже есть, думал у kbmMemTable есть готовое решение ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.03.2018, 21:21 |
|
||
|
Что делает kbmMemTable.MoveCurRecord?
|
|||
|---|---|---|---|
|
#18+
scorpion235самописный код смены позиции двух записей в DataSet'е уже естьхмм, позиция записи определяется сортировкой в выбранном индексе, либо внутренней реализацией датасета когда индекса/сортировки нет, так что не особо понятно о каком коде речь ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 12.03.2018, 10:45 |
|
||
|
|

start [/forum/topic.php?fid=58&msg=39612871&tid=2041161]: |
0ms |
get settings: |
4ms |
get forum list: |
11ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
157ms |
get topic data: |
10ms |
get forum data: |
2ms |
get page messages: |
50ms |
get tp. blocked users: |
1ms |
| others: | 222ms |
| total: | 461ms |

| 0 / 0 |
