Le 04/11/2012 23:33, Bruce a écrit :
> On Sun, 2012-11-04 at 14:35 +0100, Benoît Minisini wrote:
>> Le 04/11/2012 11:54, Bruce a écrit :
>>> This used to work
>>>           tvwJockeys.Add(Subst("R&1#&2", cs.RaceNo, cs.BP),
>>>           Subst("(R&2 ... #&3) &1", cs.HorseName, cs.RaceNo, cs.TabNo),,
>>>           cs.Jockey)
>>>
>>> OK, I'll simplify :-)
>>>
>>>           tvwX.Add(somekey, sometext,,parent)
>>>
>>> no Picture, no After.
>>>
>>> Now I get a "null object" error.  I think its due to the empty parameter
>>> [Optional Picture as Picture]?  ... because every other cs.something is
>>> valid.
>>>
>>   > ...
>>   >
>>
>> tvwX.Add(somekey, sometext,,parent)
>>
>> is perfectly valid.
>>
>> So you must give me more information about where you get a null error.
>> Ensure that cs is not null before calling tvwJockeys.Add(), to find what
>> is null exactly.
>>
>> Regards,
>>
>
> Hi Benoît,
>
> After a bit of tracking it down, the null object is at line 109 in
> _Treeview:
>
>
> Public Sub _SortParent(sKey As String)
>
>    If sKey Then
>      $cSort[sKey] = True                   <-------!!!!
>    Else
>      $bSortRoot = True
>    Endif
>    If Not $hSortTimer Then
>      $hSortTimer = New Timer As "Sort"
>      $hSortTimer.Trigger
>    Endif
>
> End
>
> The null object is $cSort.
>
> The problem arises on the second time the treeview is loaded, not the
> first.
>
> I hacked the FTreeview class a bit in gb.gui.base to demonstrate. It is
> attached.
>
> Basically, I added a "Refresh" button that clears and reloads the tree
> (and there are a few debug messages still hanging around in it).
>
> When the program starts, the treeview is loaded properly, but when the
> Refresh button is clicked the null object occurs.
>
> regards
> Bruce
>

These problems should be solved by revision #5300.

Regards,

-- 
Benoît Minisini

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to