[Gambas-user] Make {H,V}Split raise expressive Layout errors?

Tobias Boege taboege at ...626...
Sun Apr 6 16:03:37 CEST 2014


Hi Benoit,

if I have an {H,V}Split and happen to assign to Layout an Integer[] whose
size is lower than the number of children in the split, an error is raised
about wanting a number but getting Null instead. (I don't do such things but
other people seem to do and they're confused about the error they see.)

Looking at gb.gui.base, the splits seem to be supposed to handle such cases
but they're apparently not doing it right. Attached is a project.

What is the expected behaviour when giving too few elements to Layout,
anyway? There is nothing (I can find) about that in the docs. I would
personally like to see an error message in that case - but I'm satisfied
when the strategy is documented.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hsplit-layout-count-0.0.1.tar.gz
Type: application/octet-stream
Size: 4742 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20140406/a2b905c1/attachment.obj>


More information about the User mailing list