文件: root - diary - 2007 - 2007-06 - 2007-06-19_01.19AM.html
标签: 学习笔记, Learning Notes, | 英文 | 主页 | 类别: 计算机科学 | 20848 次阅读, 50225 次搜索 | 114 个单词
| 浏览 | 博客存档
![定阅此目录的博客 定阅此目录的博客](/images/form/rss.gif)
标签: 学习笔记, Learning Notes, | 英文 | 主页 | 类别: 计算机科学 | 20848 次阅读, 50225 次搜索 | 114 个单词
![定阅此目录的博客 定阅此目录的博客](/images/form/rss.gif)
I was stuck the whole afternoon in debugging... finally i found something interesting...
Every time Delphi's Dynamic Array , (setLength fun) is extended, the original array cells' addresses may be changed...
Because I use TTreeView to link its Data (Pointer) to a particular cell of a dynamic array.
e.g.
TreeView.Data:=@dynamic_array[i];
and
unfortunately, the program adds one cell to dynamic_array somewhere...
setLength(dynamic_array,length(dynamic_array)+1);
the original cells' address are totally different, which is really confusing....
anyway, i solved this by taking the alternative...
TreeView.Data:=Pointer(i);
when i use it, i go for something like this..
dynamic_array[integer(TreeView.Data)];
Haha, everything works out finally.
标签: 学习笔记, Learning Notes, | 英文 | 主页 | 类别: 计算机科学 | 20848 次阅读, 50225 次搜索 | 114 个单词 Every time Delphi's Dynamic Array , (setLength fun) is extended, the original array cells' addresses may be changed...
Because I use TTreeView to link its Data (Pointer) to a particular cell of a dynamic array.
e.g.
TreeView.Data:=@dynamic_array[i];
and
unfortunately, the program adds one cell to dynamic_array somewhere...
setLength(dynamic_array,length(dynamic_array)+1);
the original cells' address are totally different, which is really confusing....
anyway, i solved this by taking the alternative...
TreeView.Data:=Pointer(i);
when i use it, i go for something like this..
dynamic_array[integer(TreeView.Data)];
Haha, everything works out finally.
![定阅此目录的博客 定阅此目录的博客](/images/form/rss.gif)
猜您喜欢...
- Fix Brackets
- Daily Interview Puzzle: Ways to Traverse a Grid
- Daily Interview Problem: Given two arrays, write a function to compute their intersection.
- Daily Interview Problem: Reconstrunct Binary Tree from Preorder and Inorder Traversals
- Daily Interview Problem: Trapping Rainwater
- [Daily Problem] Remove k-th Last Element From Linked List
- Daily Interview Problem: Product of Array Except Self
- [Daily Problem] Validate Balanced Parentheses
- New Vulnerabilities (CVE-2016-4581) have been detected in CentOS/RHEL/CloudLinux 7
- Spreadsheet Column Title
©2006~2024 牛排过熟 - 0.01559 秒 - 1144.961 KB/s - 11 在线
内存: 493.11 KB
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - 服务器 PHP 版本号: 7.4.33
牛排怎么做才好吃? | <meta name="机器人" content="不索引, 跟踪" />
![](/images/top.jpg)
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - 服务器 PHP 版本号: 7.4.33
读写完全 - 一般 - 最小 - 表格 - 所有评论 - 统计
当前页暂时没有评论。