<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Can you add line number for error &quot;You must specify the unique component name, not the object itself”?]]></title><description><![CDATA[<p dir="auto">This error has chased me for ages and I know what chunk of code it belongs to but can’t find a fix.</p>
<pre><code>function createPreset(displayName, target, parent, column, row, preset) {
	reg qsW = 120;
	reg qsH = 22;
	reg margin = 5;

	reg qsX = margin + column * (qsW + margin);
	reg qsY = margin + row * (qsH + margin);
	reg qsBg = 0x11FFFFFF;

	reg qsItem = Content.addPanel("qs" + target, 10 + qsX, 10 + qsY);
	Content.setPropertiesFromJSON("qs" + target, {
		"parentComponent": parent,
		"text": [displayName, target, preset],
		"width": qsW,
		"height": qsH,
		"allowCallbacks": "Clicks &amp; Hover",
	});
</code></pre>
]]></description><link>https://forum.hise.audio/topic/10503/can-you-add-line-number-for-error-you-must-specify-the-unique-component-name-not-the-object-itself</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 02:48:58 GMT</lastBuildDate><atom:link href="https://forum.hise.audio/topic/10503.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 18 Sep 2024 06:42:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Can you add line number for error &quot;You must specify the unique component name, not the object itself”? on Wed, 18 Sep 2024 10:36:20 GMT]]></title><description><![CDATA[<p dir="auto">@d-healey</p>
<p dir="auto">I edited to fix completely tired misinformation etc in my post but yes I had a bunch of regs left over from misusing them and basically haven’t bothered since this is in module and UI builder code but yes I’ll change them.</p>
<p dir="auto">Taking a 5 month leave from working on this has not been great :D</p>
]]></description><link>https://forum.hise.audio/post/86401</link><guid isPermaLink="true">https://forum.hise.audio/post/86401</guid><dc:creator><![CDATA[Fergler]]></dc:creator><pubDate>Wed, 18 Sep 2024 10:36:20 GMT</pubDate></item><item><title><![CDATA[Reply to Can you add line number for error &quot;You must specify the unique component name, not the object itself”? on Wed, 18 Sep 2024 10:33:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/3469">@Fergler</a> said in <a href="/post/86399">Can you add line number for error "You must specify the unique component name, not the object itself”?</a>:</p>
<blockquote>
<p dir="auto">It is an inline function</p>
</blockquote>
<p dir="auto">I see, you should use <code>local</code> variables within inline functions rather than reg.</p>
]]></description><link>https://forum.hise.audio/post/86400</link><guid isPermaLink="true">https://forum.hise.audio/post/86400</guid><dc:creator><![CDATA[David Healey]]></dc:creator><pubDate>Wed, 18 Sep 2024 10:33:13 GMT</pubDate></item><item><title><![CDATA[Reply to Can you add line number for error &quot;You must specify the unique component name, not the object itself”? on Wed, 18 Sep 2024 10:33:44 GMT]]></title><description><![CDATA[<p dir="auto">Parent is a string, I should have included my function call:</p>
<p dir="auto">Quickset.createPreset("Close Skins", "Close Skins", "QS Dropdown", 0, 1, [<br />
["KickPunch", 0.5],<br />
["SnarePunch", 1],<br />
]);</p>
<p dir="auto">That’s where I’m getting so confused, I can’t find any objects that could be throwing this error. :/</p>
<p dir="auto">DHealey<br />
In this case it’s because otherwise I get "Can't reference inline function parameters in nested function body” with some other things going on next to it.</p>
<p dir="auto">Efficiency is not an issue in this part as it’s all develop only generation of the UI XML, this code won’t ship.</p>
]]></description><link>https://forum.hise.audio/post/86399</link><guid isPermaLink="true">https://forum.hise.audio/post/86399</guid><dc:creator><![CDATA[Fergler]]></dc:creator><pubDate>Wed, 18 Sep 2024 10:33:44 GMT</pubDate></item><item><title><![CDATA[Reply to Can you add line number for error &quot;You must specify the unique component name, not the object itself”? on Wed, 18 Sep 2024 09:19:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/3469">@Fergler</a> Why are you using a function and not an inline function?</p>
]]></description><link>https://forum.hise.audio/post/86397</link><guid isPermaLink="true">https://forum.hise.audio/post/86397</guid><dc:creator><![CDATA[David Healey]]></dc:creator><pubDate>Wed, 18 Sep 2024 09:19:53 GMT</pubDate></item><item><title><![CDATA[Reply to Can you add line number for error &quot;You must specify the unique component name, not the object itself”? on Wed, 18 Sep 2024 07:11:36 GMT]]></title><description><![CDATA[<p dir="auto">And if the script error doesn't contain the line information (some errors appear in a context that doesn't know about the scripting code), you can always use the assertion methods from the Console to get a nice stack trace:</p>
<pre><code>inline function call2(parent)
{
	Console.assertEqual(typeof(parent), "string");
}

function call1(p)
{
	call2(p);
}

const var k = Content.addKnob("k", 0, 0);

call1("1234");
call1(k);
</code></pre>
<p dir="auto">yields:</p>
<pre><code>Master Chain:! Assertion failure: values are unequal {SW50ZXJmYWNlfG9uSW5pdCgpfDg5fDd8MjE=}
:			call2() - Line 7, column 21	{SW50ZXJmYWNlfG9uSW5pdCgpfDg5fDd8MjE=}
:			onInit() - Line 12, column 2	{SW50ZXJmYWNlfHwxMzZ8MTJ8Mg==}
</code></pre>
]]></description><link>https://forum.hise.audio/post/86385</link><guid isPermaLink="true">https://forum.hise.audio/post/86385</guid><dc:creator><![CDATA[Christoph Hart]]></dc:creator><pubDate>Wed, 18 Sep 2024 07:11:36 GMT</pubDate></item><item><title><![CDATA[Reply to Can you add line number for error &quot;You must specify the unique component name, not the object itself”? on Wed, 18 Sep 2024 07:07:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.hise.audio/uid/3469">@Fergler</a> <code>parent</code> must be a string, not a reference to the UI object</p>
]]></description><link>https://forum.hise.audio/post/86384</link><guid isPermaLink="true">https://forum.hise.audio/post/86384</guid><dc:creator><![CDATA[Christoph Hart]]></dc:creator><pubDate>Wed, 18 Sep 2024 07:07:13 GMT</pubDate></item></channel></rss>