Images from server
-
@DanH In what way?
-
@d-healey just added a ";" to if(value==1) and it seeeeeeeems to work.....
inline function onButton1Control(component, value) { if(value==1); Server.downloadFile("download/HISE_1_1_1.exe", {}, target, function()
-
@DanH You should check out this guy's YouTube channel ;)
https://www.youtube.com/watch?v=sW0kaUFhBt0
And always use curly braces with your if statements.
-
@d-healey Yeah it didn't think it was right to add the ;
I tried adding the curly braces, I just get errors in the console wherever I put them :confused_face:
-
@DanH Where are you putting them?
-
@d-healey comme ça... Feels wrong though
inline function onButton1Control(component, value) { if(value==1) { Server.downloadFile("download/HISE_1_1_1.exe", {}, target, function() { var message = ""; message += Engine.doubleToString(this.data.numDownloaded / 1024.0 / 1024.0, 1); message += "MB / " + Engine.doubleToString(this.data.numTotal / 1024.0 / 1024.0, 1) + "MB"; Label1.set("text", message); Console.print(message); if(this.data.finished) Console.print(this.data.sucess ? "Done" : "Fail"); }); }; } Content.getComponent("Button1").setControlCallback(onButton1Control);
-
It looks right, but no need for the semi-colon at the end (after the curly brace).
-
@d-healey Thanks David. So this seems to work in Hise more or less, but not compiled in a standalone app. Any flags needed or something?
HiseSnippet 1095.3ocsVstSiaDEdLfa2j1T0UsO.i7ubzlFhWnsaWDZo4VaTA1n0vp9Ozf8DxHFOSj8XJQHj1Gs9HUo9.zdFOiSLPVDJRXjBdN2lu4bNy2wiSkQzrLYJxo1IymQQNesa3bgZZuoDl.MpOx46bi4RRLVQyT3.7TVFE0c9LRVFMF43r4uoMzo1Vnhm+4ccIbhHhtTDB8QIKhdHKgoVJc7A+AiyGRhomvRpX8tGLJRJ5I4xb.Ta51AMiDcI4B5wDsYa3hb9hAwLkLMTQ.Lgb1pqLdd3T4eIL1+QVF6bNUuH.EBAxHdnjGqQrVJp2TFOdb4gOCAQY7xTwllTw26dDKlsP9xTx2Vn.uzip4CmMdL3ETEdcd5vyoB71x.uW5FFkxloVpQisuxcjPQSmPhtaYxXKZi+cS2dRvBgpcB4R5vTXwBO72oSmV3W+lNM2qQcnL.U7qHo3CImS4A38wkddAU0SlLSJfE9dF0dZeZTOjldEMscFU0kjQO8CG56MUol81s2V24zljGyjd2M7JRJDPH7CYbZ37LEMQuCEYjT+JB6CIQcuXVyBDnSRZs9d+9nvAmEn+qM8ZpEILAmIn3I4hHESJvRQ2bkRJBzmhTI2Op7HzBfAOm1rQ8aZTGCOleYS7Kju+9AMKkCFTydDisnw.gxUaeOrzBeyssrGwVK.ieSMBs6lNGj.UPnIGRBdd6UEDkJd093AhKfCDru4P+yIxPUJSbguBxqsiIJRaQdRYFhFi2FGz4061tyhWZgCZt2CBp2QcAK7vu5oD9SjJBe0QFB.DpRraZIzcA9dJ50JHMX2yRH.EgLIm1dFrKJ+6obYAX41OgIXYSow1RA9gAYosY45aD32g85CEXO7awdCILtsw3V6+r+r5lZauhWS8gv1wziv4mCrQ92uUxDvJcZGKUz2CU452TuV8aqiuupISVoNa33Pa+pTqYJSeLG8gZz4zzx94RCAJi6xI4944jpRYFYxLULTJFIXp2OiJ9bLUHa5Dd6zQ8ghgl7xJCraFMUwzPvoO8JXpfgJqlaeZ1kJ4LffeQM.47kpBseiknyjyQrXsC1B.55EiN9zfCluXwee5ATAANSZl5CojT6vAV1QxDH3jz4lSPF4J5Hw3TJTlMlfpf.WCBZXQPQacA.dgqoEux9ipt+ehbftuWyRGrS6eo3Rl4EXz2CnxgAJx3bNQc2oL5QqVEPY9Nz4ZJaQFSMu5n2mkQOOU39R2wLUzzUi2MVAdgFima7ZGj2vcvjIzH0Rvtk6v+74epM5CxbEPhdDA3RgFE2iySBguqIhBHQHnb8UQmMzWZLq6nWqyLgTQbwh+CdrJCzqcrJCJUhRHQoxyhLD.5OU3EER.LIJ9hoZtGoWiCPEjBfetcZ2Ak.2KNKJRmJ9A.6q1mWuF9ryZ3ytqgO+3Z3yOsF97yqgOu4Q8QSI8q4JYh4ZBHX7fBlRGmAEbVEcjn+GPT88xi
-
Is your exported version being blocked by your firewall or anti-virus?
You should indent your code to make it more readable, like this:
HiseSnippet 1108.3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n1f7fO51Eil9Ruimsf3eN+Xpf.mI8jfSnj37gOrjgxHv4j3YlSPB4F5.wnXJbEaTAUBA1FDTKGAYkCY.3E1lRiR6Op79+Exw55E8T.u8a9aYEolOfQqe0nBXfkLLkSTKOESO5NW.bMuz3B8HAQBSMq7n8mkQaOU39R6QLUvj0i2sVCdgDima7l+PgZ18FOlFnJ.aE69e94+UAnOJSUPS3gDnWLjnXeZZjO7to.JfDgfx0khVaoKZLzszz5HiOUDlQ7evJWnml1JWn2bgnHRPr7h.SC.8SQdQFG.ShrWjsi8PMM1Ck0T.rytUyVnHnt3hf.cn3mAruda1aCrY+MvlC1.a9kMvlecCr4MafMu8QsQ2R52SUxHSYBvXTurNkVV8x5YkkQh9e.T1DO0B
-
@d-healey no anti virus or anything, nope...
-
@DanH Try debugging it in visual studio, see if you get any errors.
-
@d-healey Never done this before - on mac currently, how does one go about this in Xcode?
-