Persistence values - still cant get this to work
-
@d-healey Dave thanks for those suggestions, heres a snippet that is considerably reduced - just the authorisation widgets really... and its still failing to work when exported as a VST
HiseSnippet 2623.3oc4ZrzaabbdWKswRxVA1oo.8VGPjFPgXQK9vIowwUqkDYLazCVRY63SVq1cH4.u6Na1cIkYcLfA5kdK+HxefBzq8fQK5Menn4P5Q+SvWxoVf1uYl8wr7kHipMhZIAj39My26mytaCepINHf5qnt7gC7vJpWVq0.2vta20f3pTeGFfuXfMsEwwyFqr0.Oif.rkhp5BeFaGpKunB+yq1bKCaCWSbJHEk6QIl3cINjvTnMz+bhscMCK7gDGocWQutI0capMsGHMKnsghmg4iL5f22fssKnon9VUsHgT+VgFg3.E0E2hZMnUW5Ith8eOR.4XPHgKJpzBHj.bMpsEShYPU1tKw1pQrVGn.ToQpMXAgM3c01iXQRfmZKtBeATJFx1C0KLMwqnr3swrKdpRh2hBw6pZsL8IdgoqvjsKoU2MD621vLqaRrWkK7uVUqcOWyPB0E02vlXAR4s6E1M+ZOY0UVcEKJwsy8DvYa4VnP+d3at5JHDxG2A41yoH.zyvO.CLJOC0864bL1uXgN3P.yd37qcsharVFbJMdbJMMbJOdbJOMbpLdbpLVbRPzYvg3GGBnx0tO.ka8bve4hszEkkunhfDLVvoaPg.bX9bg.cxcsHBxXCeWj1n74EVtagJVpbkarF58eeTdggIFDyAfDe1l5FPswE77IfdjywHzratHoludyGx3bFuySw1A3IRh1FD6OIR1KJQo9F9n11Fc.RUyvDBaGzvGCpRM.ljQKEAltHP.jaIQdTVdbuPTaAMQdbhJqBSPKPipIY1YaCXMosFo6h+YQB7rMFHBm4F+mx+aR.elMDwggjZRxtJTHQdm2n94Njeti2m6fctiKwNFYHk8eIAovharF5q9pz3yzKKm8xJhKyFFfPW+5HriW3.T.T1CE1EiNAaaRcvHGnPETKO61YhTc2.HHf6kxjJk69BLKfZXiMBvHLq5FZ.zcfiG0mDHpTsM0Bi.uGicGSeLN.B5n8IPQUjgqEOBL.c66d3cNnY8V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VlkUzoKq4m7P1QcISmZ+Dc1sRIcK+L8Cfj+.H+wNSBz6pmIW+Yk0ahs5k8UuBFej1Yn2PK9ah0P43PGXeR+Lnl1P94ee9+zlma84WL4MZi+xq8YwCnsh1dFAPpxPioIYSQu3EK97cFtx18ybdAkGnOza7128Mus9+0LVYduzl9rwLAGctYV92QLj54IAl63O+HvWQCNO7OBD22Do6uI3giAbPpGF831YolKwg.5sKeFlkg5Iv0njGwBy13PrHOzzjcbv0KpnLdLJM2XTdtwnxbiwMlaL9v4FiOZtw3imBFr2JWVCOGQ7N.nQU9yTQUspK69yxC8U9O.+WSGaA
-
@Lindon A variable usually will be initialized (so the value = 0) and if you write a code where a variable never be initialized it will return weird values, that's the basics of correct programming.
-
@ossian1961 Thank you - I bow to your superior programming skills, can you point out which of the variables I have declared has not got an initial value?
heres the init variable definition section
const var AuthPanel = Content.getComponent("AuthPanel"); const var AuthInstructions = Content.getComponent("AuthInstructions"); const var AuthNumber1 = Content.getComponent("AuthNumber1"); const var AuthNumber2 = Content.getComponent("AuthNumber2"); const var AuthNumber3 = Content.getComponent("AuthNumber3"); const var AuthNumber4 = Content.getComponent("AuthNumber4"); const var AuthoriseButton = Content.getComponent("AuthoriseButton"); const var FactoryPresetFlag = Content.getComponent("FactoryPresetFlag"); const var AuthValues = Content.getComponent("AuthValues"); var CR_Auth = false; var doingValidation = false;
-
@Lindon said in Persistence values - still cant get this to work:
@ossian1961 Thank you - I bow to your superior programming skills, can you point out which of the variables I have declared has not got an initial value?
heres the init variable definition section
const var AuthPanel = Content.getComponent("AuthPanel"); const var AuthInstructions = Content.getComponent("AuthInstructions"); const var AuthNumber1 = Content.getComponent("AuthNumber1"); const var AuthNumber2 = Content.getComponent("AuthNumber2"); const var AuthNumber3 = Content.getComponent("AuthNumber3"); const var AuthNumber4 = Content.getComponent("AuthNumber4"); const var AuthoriseButton = Content.getComponent("AuthoriseButton"); const var FactoryPresetFlag = Content.getComponent("FactoryPresetFlag"); const var AuthValues = Content.getComponent("AuthValues"); var CR_Auth = false; var doingValidation = false;
Oh you don't need to bow because I get not a superior programming skill at all ;)
-
@ossian1961 OK, but where is this variable that remains un-initialised that you mentioned?
-
@Lindon said in Persistence values - still cant get this to work:
@ossian1961 OK, but where is this variable that remains un-initialised that you mentioned?
When I wrote "A variable usually will be initialized (so the value = 0) and if you write a code where a variable never be initialized it will return weird values, that's the basics of correct programming." I wrote something is related to programming I'mnot talking about your code, you was talking about your plugin returned a 0-0-0-0 value, not me ;)
-
@ossian1961 whA?
Did you look at the snippet at all?
You will see its configuring a text for display that shows
0-0-0-0
when it should show
12345-12345-0-0 -
@Lindon said in Persistence values - still cant get this to work:
@ossian1961 whA?
Did you look at the snippet at all?
You will see its configuring a text for display that shows
0-0-0-0
when it should show
12345-12345-0-0Yes I saw that and you right that it's weird, but I really don't understand just one thing that is why you chosen the preset to relate a protection of the whole plugin and so you asked for a persistent storage of an authorisation in the preset and not in the whole plugin. My first question is started by that.
-
@Lindon I write you that because, just to make that a label shows the current preset it has been hard and I needed many comments exchanges before a solution :)
-
Frankly Im not bothered about using presets right now I just want HISE to save and recall the state of a widget.
-
@Lindon said in Persistence values - still cant get this to work:
Frankly Im not bothered about using presets right now I just want HISE to save and recall the state of a widget.
I'd like it too. I remember, for exemple, that in the old release when you put a widget on the GUI you created, the code of that appeared on the script, that was like a "RAD" programming ide, but Christoph took off this feature in the new release we use and now I feel the widget palette a bit "weird" because when you add a widget through the script, obviously the properties used in the script are not available to modify in the palette, but only through the script, so at the moment the script-Widgets palette looks a bit "ambiguous" system. Anyway, Hise is under costant development and I have faith in Christoph skills, I'm sure he will give a more logic and stable nature to his wonderful creature :)
-
but Christoph took off this feature in the new release
Do you mean this change: https://github.com/christophhart/hise_documentation/blob/master/NewInterfaceDesigner.md
In retrospective this is one of the best improvements I made to HISE, the old boilerplate JSON code was terrible and ugly.
Sure there are a few hiccups, but I still think it's the best way to combine a WYSIWYG editor with scripting.
-
@Christoph-Hart said in Persistence values - still cant get this to work:
In retrospective this is one of the best improvements I made to HISE, the old boilerplate JSON code was terrible and ugly.
Took me some getting used to but definitely an improvement.
-
@Christoph-Hart said in Persistence values - still cant get this to work:
Sure there are a few hiccups, but I still think it's the best way to combine a WYSIWYG editor with scripting.
I think that the few hiccups could have not a solution for the nature itself of the way or I wrong? ;)
-
But what exactly is the hiccup we‘re talking about here? As soon as you set properties with a script, you obviously can‘t change it on the interface designer anymore because it would get overwritten each time you recompile the script.
If you want to batch process widgets once via script but then keep on editing the properties, wrap the property changes into a function and call it once, then comment it out so you can access them in the interface designer again.
-
@Christoph-Hart said in Persistence values - still cant get this to work:
But what exactly is the hiccup we‘re talking about here? As soon as you set properties with a script, you obviously can‘t change it on the interface designer anymore because it would get overwritten each time you recompile the script.
If you want to batch process widgets once via script but then keep on editing the properties, wrap the property changes into a function and call it once, then comment it out so you can access them in the interface designer again.
Christoph I don't saying you souldn't take off the old way, I'm agree with you about creating averything through code writing is better and powerful (I started in that way before the RAD Ides), but why we need, so, to get a widgets palete? I thought it's no useful (it's only my personal opinion, don't take it as a request or a criticism) ;)