Errors in framework classes

Game development with Board Game Arena Studio
Post Reply
User avatar
Victoria_La
Posts: 620
Joined: 28 December 2015, 20:55

Errors in framework classes

Post by Victoria_La »

I periodically have this error show up in Studio, can you please fix it (when it appears game UI does not load).

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Template has a deprecated constructor in /var/tournoi/release/tournoi-171014-1817-gs/www/lib/phplib/template.inc on line 65

There is also were annoying dojo warnings on console coming mostly from adaptStatusBar, they fill the console on every mouse move, there are 400 of them just on reload
dojo.js:15 DEPRECATED: dojo.coords() Use dojo.position() or dojo.marginBox().

I overrode it just to get rid of warnings but I really want to gave it fixed in original source (of cause I don't have source so
all locals here are mangled)

Code: Select all

        /**
         * @Override This is here just to override one from bga, and not have annoying warnings on console
         */
        adaptStatusBar : function() {
            var _bf0 = dojo.position("after-page-title");
            var _bf1 = dojo.position("page-title");
            var _bf2 = dojo.window.getBox();
            var _bf3 = _bf2.h;
            var _bf4 = _bf3 / 10;
            if (!dojo.hasClass("page-title", "fixed-page-title") && _bf0.y < 0 && _bf1.h < _bf4) {
                dojo.addClass("page-title", "fixed-page-title");
            } else {
                if (dojo.hasClass("page-title", "fixed-page-title") && (_bf0.y >= 0 || _bf1.h >= _bf4)) {
                    dojo.removeClass("page-title", "fixed-page-title");
                    dojo.style("page-title", "width", "auto");
                    dojo.style("after-page-title", "height", "0px");
                }
            }
            if (dojo.hasClass("page-title", "fixed-page-title")) {
                dojo.style("page-title", "width", (_bf0.w - 10) + "px");
                dojo.style("after-page-title", "height", _bf1.h + "px");
            }
        },
User avatar
Een
Posts: 3854
Joined: 16 June 2010, 19:52

Re: Errors in framework classes

Post by Een »

You are right, we should have fixed those 'deprecated' warnings for clarity.
Done now!
vincentt
Posts: 247
Joined: 01 September 2017, 17:25

Re: Errors in framework classes

Post by vincentt »

Thanks a lot Een!!
It helps with the debug :)

Thank you Victoria_La to make Een do it ;)
Post Reply

Return to “Developers”