[Gambas-user] New treeview is getting a little bit overexcited

Bruce bbruen at ...2308...
Sun Nov 4 11:54:28 CET 2012


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.


Will

        tvwX.Add(somekey, sometext, Null, parent) 

work? (I haven't tried.)

Benoit, 
Would you mind giving us a clear picture of optional parameter handling.
I know that somewhere else I have to stick a ",Null," between optional
parameters, can't remember where.

The premise is

        Public Sub Anything ( Optional p1 as thing, Optional p2 as
        thing, .. Optional P3 as thing)
        
Can I call 
Anything(,,Fred)
Anything(Frieda,,Fred)
Anything(Frieda,Finglehoffer)
with impunity?

or will/should I call
Anything(Null,Null,Fred)
Anything(Frieda,Null,Fred)
Anything(Frieda,Finglehoffer)
with impunity?

best regards
Bruce















More information about the User mailing list