* Andy Ross -- Saturday 14 May 2005 20:28:
> Calling getIntValue(node, default) on a node that had previously been
> deleted with removeChild() should *never* return anything but the
> default value specified (that is, after all, the whole point of having
> a default value in the first place).  That sounds like the bug, not
> the dialog code.

Yes. It looks like it. getNode() on a removed node does apparently not
return 0. So the default value isn't even used, but the built in
default value "SGRawValue<type>::DefaultValue". Yes, this is yet another
sg/property bug. I'm less and less impressed. I wish I hadn't fixed the
other bug and let the worms out of the can.  :-/

So, should we sweep the ... worms ... under the rug, again? And pretend
everything is fine? Carelessly reading from removed nodes, as we always
did?

It's risky to fix. getNode() is probably used internally and depends
on getting SGPropertyNode::REMOVED node addresses, while for the rest of
the system this is pure crap. Arghh ...

David's comment would be fine. But he hasn't replied to my other mail,
either.

m.

_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to