[fpc-pascal] Re: TFPSMap return wrong pointer address

2013-01-31 Thread ik
On Thu, Jan 31, 2013 at 9:35 PM, ik ido...@gmail.com wrote:
 Hello,

 I'm trying to use TFPSMap, to store a class using a key.

 While the key seems to be saved properly, and easy to find, the data
 pointer that returns is wrong.
 The adding of the data can be found here:
 https://github.com/ik5/split_lazarus/blob/master/src/untlazsplitview_code.pas#L244

 Here is the debug information that I can see it:

 1. Saving:

 TSplitView.ToggleSplitView - ActiveEditor (7FEEC39733C0)
 TSplitView.ToggleSplitView - Looked for an item index: -1
 TSplitView.ToggleSplitView - No Item was found
 TSplitView.ToggleSplitView - Added new item index: 0
 TSplitView.ToggleSplitView - tab (7FEEC1234C80),
 SplitEditor(7FEEC218C610), Splitter (7FEEC219CDD0)
 TSplitView.SetEditor - Editor (7FEEC218C610)
 TSplitView.SetSplitter - Splitter (7FEEC219CDD0)
 TSplitView.ToggleSplitView - done execution

 2. Retrieving:
 TSplitView.ToggleSplitView - ActiveEditor (7FEEC39733C0)
 TSplitView.ToggleSplitView - Looked for an item index: 0
 TSplitView.ToggleSplitView - Found the item
 TSplitView.ToggleSplitView - tab (7FEEBB2FCD00),
 SplitEditor(), Splitter ()
 TSplitView.ToggleSplitView - CleanResources - Going to free
 SplitEditor () and Splitter ()
 TSplitView.ToggleSplitView - CleanResources - tab.SplitEditor is not 
 allocated
 TSplitView.ToggleSplitView - CleanResources - Going to free tab.Splitter

The above was wrong, the checking did find that it was not allocated,
the text itself was wrong, and fixed it

 TSplitView.SetEditor - Editor (

 Am I doing something wrong here ?
 If so, what is the best way to solve it ?


 Thanks,
 Ido
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Re: TFPSMap return wrong pointer address

2013-01-31 Thread ik
On Thu, Jan 31, 2013 at 9:44 PM, ik ido...@gmail.com wrote:
 On Thu, Jan 31, 2013 at 9:35 PM, ik ido...@gmail.com wrote:
 Hello,

 I'm trying to use TFPSMap, to store a class using a key.

 While the key seems to be saved properly, and easy to find, the data
 pointer that returns is wrong.
 The adding of the data can be found here:
 https://github.com/ik5/split_lazarus/blob/master/src/untlazsplitview_code.pas#L244

 Here is the debug information that I can see it:

 1. Saving:

 TSplitView.ToggleSplitView - ActiveEditor (7FEEC39733C0)
 TSplitView.ToggleSplitView - Looked for an item index: -1
 TSplitView.ToggleSplitView - No Item was found
 TSplitView.ToggleSplitView - Added new item index: 0
 TSplitView.ToggleSplitView - tab (7FEEC1234C80),
 SplitEditor(7FEEC218C610), Splitter (7FEEC219CDD0)
 TSplitView.SetEditor - Editor (7FEEC218C610)
 TSplitView.SetSplitter - Splitter (7FEEC219CDD0)
 TSplitView.ToggleSplitView - done execution

 2. Retrieving:
 TSplitView.ToggleSplitView - ActiveEditor (7FEEC39733C0)
 TSplitView.ToggleSplitView - Looked for an item index: 0
 TSplitView.ToggleSplitView - Found the item
 TSplitView.ToggleSplitView - tab (7FEEBB2FCD00),
 SplitEditor(), Splitter ()
 TSplitView.ToggleSplitView - CleanResources - Going to free
 SplitEditor () and Splitter ()
 TSplitView.ToggleSplitView - CleanResources - tab.SplitEditor is not 
 allocated
 TSplitView.ToggleSplitView - CleanResources - Going to free tab.Splitter

 The above was wrong, the checking did find that it was not allocated,
 the text itself was wrong, and fixed it

 TSplitView.SetEditor - Editor (


Forgot to mention: FPC 2.6.0 with Arch Linux 64 bit

 Am I doing something wrong here ?
 If so, what is the best way to solve it ?


 Thanks,
 Ido
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal