Engine.createFixObjectFactory(var layoutDescription)
-
Even Christoph doesn't know :p
https://forum.hise.audio/topic/6018/fixobjectfactory/5?_=1670499868311
-
@ulrik already asked :
https://forum.hise.audio/post/52550I quickly tried it back in the day but didn't found how to use it so I moved on
-
@d-healey :)
-
@Matt_SF Ok, I'll have a go then, wish me luck
-
Not mentioning
FixObjectArray
andFixObjectStack
... What are they? -
@ustk true...
-
@ulrik Why I started searching in the API is because I need to find if an Object is inside an Array, and this will obviously not work
if (Array.contains(object))
but with the FixObj... function it seems to be possible?
-
and this will obviously not work
Sure it will!
const obj1 = {id:"obj1"}; const obj2 = {id:"obj2"}; const obj3 = {id:"obj3"}; const a = [obj1, obj2, obj3]; Console.print(a.contains(obj1));
-
@ulrik Of course you can search for an object:
const var Panel1 = Content.getComponent("Panel1"); const var array = [Panel1]; Console.print(array.contains(Panel1)); //1
-
-
inline function containsObject(array, key, value) { for (x in array) if (x[key] == value) return true; return false; }
HiseSnippet 778.3ocsU01SaCCD1tzfVxdQCo8CvpepUpC0RYunUgFi9xT0FP0JCMIDB4l3PMM0txwgQEh+q6mv9GrcNokjBUcPkV9fUt64NmGe44N2UIcYggREBaezjwLD9YV8lHzCZLfxEnNMQ3WXsOMTyTjDW6MYLMLj4gv309rwA1NOJ942ebOZ.U3xRcgPGK4truxGw0od6t6W3AAsodri3ixD8161wUJZHCjQ.eVypBZL0cH8b1ATSX4rP30a4w0RUOMUyBgX1S5Mo2.4OEIweLOj2OfYLph5AaThaTiA7.utyNqgHDNe2zS9ZIm7WYsO2ieq+zJvKiAHoYjsFfysLJU8QPIbFJkOgRaX0yUwGqSQL74oVcDvODeJTpyRkjXQ49E1pgDhPn2bDcHqsBLtMihusRkxDXoTcGGnbGpIx9WTkrC4Zt2GJXduvM0SQ1JCxVygTKCRMCxTHJ3+Dy9TNN+30ZmBvbQ.WvH9QBWMWJHP3ZnFGdX+KXt5hTkhNoLYHCVtjFDwJ4bsisuTQJdEgKHw3kbrs49fmSf3NkryNyB011VwzQJAQqhX0crclY6SCBAG233.UkPY.aywJtPW7te9xjBbuBvZ7IsTo52RTo3.olcnnXLifchbWHe+EhY9MnjAAL0BgMxe0xRrnHZTelJa8vDHnOlWzs9CSz4lnJxDnTzQv0GNlM0tsLvyHlLueeIJZprBd66cZR0TipcpOHtwLklanCtI6RnsOQCaa0jENTKGCM92SfCsVRun.pd99Myfko.P8XNQtQHKB45IYG77HZBqrzlvGJE2vpKW6NXwbL2B3HTo9evwoitdtUKeePDmRv7Vs+wpNm5e74+lLRyEmuOUq3WgvVGDMpGLw1kAecgfE.atENmQsjXWwXap.8XBuXi+.OSAqZrwSAqNCDMh5pjm4lzEXFN9jXO.mDw2EXCWJA1jpn3NCHOqJaVAMBlSelqq43+ZP.u3b1ZExo1Jjy1qPNuYEx4sqPNuaEx48KMGyUjeJRKGkzN.N51JdDAF2RPAkUrJD8W.GaeT1.
-
@d-healey Nice! Thank you :)
-
This post is deleted!