<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dabo.leafe.com/index.php?action=history&amp;feed=atom&amp;title=RegID</id>
	<title>RegID - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dabo.leafe.com/index.php?action=history&amp;feed=atom&amp;title=RegID"/>
	<link rel="alternate" type="text/html" href="https://wiki.dabo.leafe.com/index.php?title=RegID&amp;action=history"/>
	<updated>2026-11-21T23:04:25Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.12</generator>
	<entry>
		<id>https://wiki.dabo.leafe.com/index.php?title=RegID&amp;diff=4039&amp;oldid=prev</id>
		<title>Ed: Created page with &quot;Short for &#039;&#039;&#039;Registered ID&#039;&#039;&#039;. Used in Dabo to uniquely identify a control on a given form.  RegIDs are different from names in that a name only needs to be unique among sibli...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.dabo.leafe.com/index.php?title=RegID&amp;diff=4039&amp;oldid=prev"/>
		<updated>2020-05-11T15:44:29Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Short for &amp;#039;&amp;#039;&amp;#039;Registered ID&amp;#039;&amp;#039;&amp;#039;. Used in Dabo to uniquely identify a control on a given form.  RegIDs are different from names in that a name only needs to be unique among sibli...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Short for &amp;#039;&amp;#039;&amp;#039;Registered ID&amp;#039;&amp;#039;&amp;#039;. Used in Dabo to uniquely identify a control on a given form.&lt;br /&gt;
&lt;br /&gt;
RegIDs are different from names in that a name only needs to be unique among siblings, while a RegID must be unique on that form. This allow for unambiguously identifying a control without relying on complicated and unreliable containership pathing, such as &amp;lt;code&amp;gt;self.Form.pageframeMain.Page2.txtZipcode&amp;lt;/code&amp;gt;. Because of the special qualities of a RegID, if the control referenced in the prior sentence had a RegID of &amp;lt;code&amp;gt;ziptextbox&amp;lt;/code&amp;gt;, you could reference it by &amp;lt;code&amp;gt;self.Form.ziptextbox&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
RegIDs are not required for any control. However, once a value is assigned to a control, it cannot be changed. Attempting to assign a RegID that is already in use, or attempting to change an existing RegID will raise an AttributeError.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;The following is an excerpt from an email discussion between &amp;#039;&amp;#039;&amp;#039;Dennis Meulensteen&amp;#039;&amp;#039;&amp;#039; (blue text) and &amp;#039;&amp;#039;&amp;#039;Ed Leafe&amp;#039;&amp;#039;&amp;#039; that explains the concept behind RegID and its practical use.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff&amp;quot;&amp;gt;The line is: &amp;lt;code&amp;gt;self.dPanel.dGrid.Columns[1].WordWrap = True&amp;lt;/code&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff&amp;quot;&amp;gt;I thought that, in order to reference the dGrid object, I had to reference it via its ancestors. Obviously this is not &amp;quot;quite&amp;quot; right....&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff&amp;quot;&amp;gt;So I&amp;#039;ll come right out and ask. How do I reference objects like text boxes on a form correctly? I had hoped to discover this by myself but you beat me to it.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can certainly reference objects through their containership hierarchy, using the dot-separated list of object names (i.e., the &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; property). Assuming in this case that &amp;lt;code&amp;gt;self&amp;lt;/code&amp;gt; is the form, you have to look to make sure that there is an object that is a child of the form whose &amp;lt;code&amp;gt;Name == &amp;quot;dPanel&amp;quot;&amp;lt;/code&amp;gt;. If not, there&amp;#039;s your problem (and that&amp;#039;s what the error message indicates).&lt;br /&gt;
&lt;br /&gt;
As you can imagine, this method of grabbing references is very fragile and error-prone. What happens if you move an object? What happens if you rename one of the containers? Those actions, while perfectly reasonable things to do during design, will break the reference. So Dabo uses a way to create references that are unique across any given form. This is based on the &amp;#039;&amp;#039;&amp;quot;Registration&amp;quot;&amp;#039;&amp;#039; design pattern, in which objects that need to communicate with other objects &amp;quot;register&amp;quot; themselves with the form. There is a property named &amp;lt;span style=&amp;quot;font-weight: bold&amp;quot;&amp;gt;RegID&amp;lt;/span&amp;gt; that exists just for this: it is empty by default, but if you need to get refer to that object anywhere within the form, set the &amp;lt;code&amp;gt;RegID&amp;lt;/code&amp;gt; to something unique and descriptive. When the form runs, the object will register itself with the form automatically, and after that you can then refer to it from anywhere using &amp;lt;code&amp;gt;form-dot-RegID&amp;lt;/code&amp;gt;. Example: if you set your grid&amp;#039;s &amp;lt;code&amp;gt;RegID&amp;lt;/code&amp;gt; to be &amp;#039;&amp;#039;&amp;#039;OrderGrid&amp;#039;&amp;#039;, the code to reference it would be &amp;lt;code&amp;gt;self.OrderGrid&amp;lt;/code&amp;gt; from within form methods, and &amp;lt;code&amp;gt;self.Form.OrderGrid&amp;lt;/code&amp;gt; from any other object within the form.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff&amp;quot;&amp;gt;For example what I have in my search method on the base Form is: &amp;#039;&amp;lt;code&amp;gt;self.Form.ddNaam.Value&amp;lt;/code&amp;gt;&amp;#039;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#0000ff&amp;quot;&amp;gt;where &amp;lt;code&amp;gt;ddNaam&amp;lt;/code&amp;gt; is a drop down list. I can reference it from self but that&amp;#039;s about it. I have tried everything I can think of but I still don&amp;#039;t get it.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In that line of code, &amp;lt;code&amp;gt;ddNaam&amp;lt;/code&amp;gt; must be the value of the dropdown&amp;#039;s &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; property, and it must be a direct child of the form for that code to work. The better solution would be to set its RegID to &amp;lt;code&amp;gt;ddNaam&amp;lt;/code&amp;gt;, and that would guarantee that your reference would work.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;RegID&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039; are completely different properties; &amp;lt;code&amp;gt;Name&amp;lt;/code&amp;gt; is required for all objects, and must be unique only among sibling controls. &amp;lt;code&amp;gt;RegID&amp;lt;/code&amp;gt; is completely optional, and if set it must be unique among all the controls on the form.&lt;/div&gt;</summary>
		<author><name>Ed</name></author>
	</entry>
</feed>