B4J Question [BANano] DesignerCreateView - Removing Dead Code & 'ignoredeadcode

Mashiane

Expert
Licensed User
Longtime User
Hi

I have methods called in DesignerCreateView, eg. setOverlay below

B4X:
mElement = mTarget.Append($"[BANCLEAN]<div id="${mName}" class="${xclasses}" ${xattrs} style="${xstyles}">
        <input id="${mName}_toggle" type="checkbox" class="drawer-toggle"></input>
        <div id="${mName}_content" class="drawer-content flex flex-col"></div>
        <div id="${mName}_side" class="drawer-side z-50">
            <label id="${mName}_overlay" for="${mName}_toggle" aria-label="close sidebar" class="drawer-overlay"></label>
        </div>
    </div>"$).Get("#" & mName)
    setOverlay(bOverlay)

When I turn .RemoveDeadCode this method is not picked up.

B4X:
Uncaught (in promise) TypeError: _B.setoverlay is not a function
    at _B.designercreateview (sithasodaisy5.js:56:135266)
    at BANC (bananocore9.11.js:19:14023)
    at banano_sithasodaisy5demo_pgindex.baselayout (app1739535610577.js:3:398051)
    at banano_sithasodaisy5demo_pgindex.initialize (app1739535610577.js:3:385688)

Is it possible for methods called in that sub to be picked up by the transpiler and not removed? For now, adding 'ignoredeadcode to the sub seems to help.

Thanks in advance
 
Top