{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/AL/issues/4092","repository_url":"https://api.github.com/repos/Microsoft/AL","labels_url":"https://api.github.com/repos/Microsoft/AL/issues/4092/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/AL/issues/4092/comments","events_url":"https://api.github.com/repos/Microsoft/AL/issues/4092/events","html_url":"https://github.com/Microsoft/AL/issues/4092","id":372133432,"node_id":"MDU6SXNzdWUzNzIxMzM0MzI=","number":4092,"title":"Control Add-in in Business Central Windows APP. How to debug?","user":{"login":"thomasbarbut","id":40474090,"node_id":"MDQ6VXNlcjQwNDc0MDkw","avatar_url":"https://avatars2.githubusercontent.com/u/40474090?v=4","gravatar_id":"","url":"https://api.github.com/users/thomasbarbut","html_url":"https://github.com/thomasbarbut","followers_url":"https://api.github.com/users/thomasbarbut/followers","following_url":"https://api.github.com/users/thomasbarbut/following{/other_user}","gists_url":"https://api.github.com/users/thomasbarbut/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasbarbut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasbarbut/subscriptions","organizations_url":"https://api.github.com/users/thomasbarbut/orgs","repos_url":"https://api.github.com/users/thomasbarbut/repos","events_url":"https://api.github.com/users/thomasbarbut/events{/privacy}","received_events_url":"https://api.github.com/users/thomasbarbut/received_events","type":"User","site_admin":false},"labels":[{"id":899187201,"node_id":"MDU6TGFiZWw4OTkxODcyMDE=","url":"https://api.github.com/repos/Microsoft/AL/labels/cross-team-investigate","name":"cross-team-investigate","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-19T22:15:49Z","updated_at":"2018-11-07T10:20:07Z","closed_at":"2018-11-07T10:20:07Z","author_association":"NONE","body":"Hello everyone,\r\n\r\nI have a control add-in which works perfectly in all browsers but does not response in the Business Central Windows App.\r\nIs there any way to debug the Windows App?\r\nI have some buttons. As soon as I press them the application freezes for 5 seconds and nothing happens. Regardless of which button is pressed.\r\n\r\n**I think it's a javascript error, but I'm not able to open up a console like in the browsers.**\r\n\r\nBelow the javascript code. The buttons are highlighted.\r\n\r\n> function init(y, Width, Height) {\r\n>     if (y) {\r\n>         document.getElementById(\"controlAddIn\").innerHTML = '<div>' +\r\n>             '<style>table {border: 0.5px solid black;}</style> ' +\r\n>             '   <table cellpadding=\"0\"  width=\"' + Width + '\">  ' +\r\n>             '     <tr>  ' +\r\n>             '       <td height=\"' + Height + '\" width=\"' + Width + '\">  ' +\r\n>             '<img src=\"data:image/png;base64, ' + y + ' />' +\r\n>             '</td>  ' +\r\n>             '     </tr>  ' +\r\n>             '   </table>  ' +\r\n>             '</div> ';\r\n> \r\n> \r\n>     }\r\n>     else {\r\n>         document.getElementById(\"controlAddIn\").innerHTML = '     ' +\r\n>             '<style>table {border: 1.5px solid #4cccd5;}' +\r\n>             '   input[type=button], input[type=submit], input[type=reset] {  ' +\r\n>             '       background-color: #4cccd5;  ' +\r\n>             '       border: none;  ' +\r\n>             '       color: white;  ' +\r\n>             '       padding: 16px 32px;  ' +\r\n>             '       text-decoration: none;  ' +\r\n>             '       margin: 4px 2px;  ' +\r\n>             '       cursor: pointer;  ' +\r\n>             '  }  ' +\r\n>             '</style> ' +\r\n>             '   <table cellpadding=\"0\"  width=\"' + Width + '\">  ' +\r\n>             '     <tr>  ' +\r\n>             '       <td height=\"' + Height + '\" width=\"' + Width + '\">  ' +\r\n>             '   <canvas id=\"cnv\" name77=\"cnv\" width=\"' + Width + '\" height=\"100\"></canvas>  ' +\r\n>             '       </td>  ' +\r\n>             '     </tr>  ' +\r\n>             '   </table>  ' +\r\n>             '   <canvas name=\"SigImg\" id=\"SigImg\" width=\"500\" height=\"100\"></canvas>  '  + \r\n>             **'<button id=\"signbutton\" onclick=\"javascript:onSign(' + Width + ',' + Height + ')\">Sign</button>' +\r\n>             '<button id=\"clearbutton\" onclick=\"javascript:onClear()\">Clear</button>' +\r\n>             '<button id=\"donebutton\" onclick=\"javascript:onDone(' + Width + ',' + Height + ')\">Done</button>'**\r\n>     }\r\n> \r\n> \r\n> \r\n> }\r\n> var tmr;\r\n> function onSign(Width, Height) {\r\n>     var ctx = document.getElementById('cnv').getContext('2d');\r\n>     SetDisplayXSize(Width);\r\n>     SetDisplayYSize(Height);\r\n>     SetTabletState(0, tmr);\r\n>     SetJustifyMode(0);\r\n>     ClearTablet();\r\n>     if (tmr == null) {\r\n>         tmr = SetTabletState(1, ctx, 50);\r\n>     }\r\n>     else {\r\n>         SetTabletState(0, tmr);\r\n>         tmr = null;\r\n>         tmr = SetTabletState(1, ctx, 50);\r\n>     }\r\n> }\r\n> \r\n> function onClear() {\r\n>     ClearTablet();\r\n> }\r\n> \r\n> function onDone(Width, Height) {\r\n>     if (NumberOfTabletPoints() == 0) {\r\n>     }\r\n>     else {\r\n>         SetTabletState(0, tmr);\r\n>         SetSigCompressionMode(1);\r\n>         SetImageXSize(Width);\r\n>         SetImageYSize(Height);\r\n>         SetImagePenWidth(5);\r\n>         GetSigImageB64(SigImageCallback);\r\n>     }\r\n> }\r\n> \r\n> function SigImageCallback(str) {\r\n>     Microsoft.Dynamics.NAV.InvokeExtensibilityMethod(\"GetSig\", [str]);\r\n> }\r\n> "}}
{"actor":{"display_login":"StanislawStempin"}}