To the Top
File:  root - diary - 2007 - 2007-06 - 2007-06-19_01.19AM.html
Tags: 学习笔记, Learning Notes, | English | Home Page | Category: Computing | 20623 Views, 48291 Search Bots | 114 Words

Subscribe to Feed Burner | Browse | Archive

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.
Tags: 学习笔记, Learning Notes, | English | Home Page | Category: Computing | 20623 Views, 48291 Search Bots | 114 Words Subscribe to Feed Burner

Related Articles

  1. PHP Unit Tests on VPS Server
  2. Spreadsheet Column Title
  3. YES!!
  4. Daily Interview Problem: Maximum Profit From Stocks
  5. Daily Interview Puzzle: Minimum Size Subarray Sum
  6. Daily Interview Problem: Deepest Node in a Binary Tree
  7. New Vulnerabilities (CVE-2016-4581) have been detected in CentOS/RHEL/CloudLinux 7
  8. Daily Interview Puzzle: Falling Dominoes
  9. [Daily Problem] Angles of a Clock
  10. Daily Interview Problem: Given two arrays, write a function to compute their intersection.

Comments (0)

Your Email (Domain Part Not Exposed):

Your Comments:

Privately By Mail Colors More Smileys S x y @

Verification (Click Image 2 Refresh):

    Be the first one to comment this page !


Page Edited: October 30 2020 14:21:09 | RSS Subscription
How to Cook a Perfect Steak? | <meta name="robots" content="noindex, follow" />