phantomwhale
January 14th, 2012, 23:22
Hi all,
Something I noticed today whilst playing with windowlists - the default entry never gets created any more ?
The windowlists I was playing with all had the following script:
function onInit()
if #getWindows() == 0 then
createWindow();
end
end
But then looking at the windowlist reference documentation, I saw there was a <skipempty/> tag, which is described as follows:
<skipempty /> If given, the empty entry is not created in lists with no entries
Ah ha, I thoguht, the empty entry will be created for me ! So I removed my onInit method, paired the windowlist down to the most basic windowlist it could be and... no empty entry is created ?
Not a problem, I've put my onInit() methods back, and the default empty entry is back. But this seems like the <skipempty/> tag is redundant now, as it's always in effect anyway ?
Perhaps this was caused by fixing this bug : https://www.fantasygrounds.com/forums/showthread.php?t=9730 but in any case would be good to update the documentation to reflect this (or fix the issue, or change the tag to be an <includeempty/> tag that does the reverse).
Regards,
PW
Something I noticed today whilst playing with windowlists - the default entry never gets created any more ?
The windowlists I was playing with all had the following script:
function onInit()
if #getWindows() == 0 then
createWindow();
end
end
But then looking at the windowlist reference documentation, I saw there was a <skipempty/> tag, which is described as follows:
<skipempty /> If given, the empty entry is not created in lists with no entries
Ah ha, I thoguht, the empty entry will be created for me ! So I removed my onInit method, paired the windowlist down to the most basic windowlist it could be and... no empty entry is created ?
Not a problem, I've put my onInit() methods back, and the default empty entry is back. But this seems like the <skipempty/> tag is redundant now, as it's always in effect anyway ?
Perhaps this was caused by fixing this bug : https://www.fantasygrounds.com/forums/showthread.php?t=9730 but in any case would be good to update the documentation to reflect this (or fix the issue, or change the tag to be an <includeempty/> tag that does the reverse).
Regards,
PW