Bug with CoreRPG 3.3.12 Column List onInit()
Hi,
Been having a problem in the Mongoose Traveller ruleset, that some of the 'Padlocks' are appearing on Reference Sheets as Red (correct) yet '_iedit' buttons attached to lists on the sheet are appearing when they shouldn't.
In the CoreRPG code 'common/scripts/column_list.lua' at the top on the onInit(), I've modified it to include debug comments.
Code:
function onInit()
Debug.console('CoreRPG here')
if isReadOnly() then
self.update(true);
else
local node = getDatabaseNode();
if not node or node.isReadOnly() then
Debug.console('CoreRPG here3')
self.update(true);
Debug.console('CoreRPG here3.1')
end
end
Debug.console('CoreRPG here4')
end
function isEmpty()
return (getWindowCount() == 0);
end
function update(bReadOnly, bForceHide)
Debug.console('CoreRPG update', bReadOnly)
Debug.console('CoreRPG update', bForceHide)
Note that `update` is called with 'True' as the first argument.
However on inspecting the value of `bReadOnly` parameter in the 'update' function, it's been received as 'nil'.
Quote:
Runtime Notice: Host session started
Runtime Notice: s'CoreRPG here'
Runtime Notice: s'CoreRPG here3'
Runtime Notice: s'CoreRPG update' | nil
Runtime Notice: s'CoreRPG update' | nil
Runtime Notice: s'CoreRPG here3.1'
Runtime Notice: s'CoreRPG here4'
If the `self` is removed from the onInit() calls to 'update' then the behaviour is correct.
Cheers,
MBM