<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: UI Button Double Action? in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/UI-Button-Double-Action/m-p/245042#M11245</link>
    <description>Thank you Barry!  I can't believe how simple that was!&lt;BR /&gt;
&lt;BR /&gt;
I had seen that post before when I was trying something different, but I completely forgot about it.&lt;BR /&gt;
&lt;BR /&gt;
In case anyone else is interested I've attached the fixed object with the &lt;A href="http://archicad-talk.graphisoft.com/viewtopic.php?t=34828&amp;amp;start=0&amp;amp;postdays=0&amp;amp;postorder=asc&amp;amp;highlight=isfirstrun" target="_blank"&gt;bit of code&lt;/A&gt; Michael Rensing put up almost 5 years ago!&lt;BR /&gt;
&lt;BR /&gt;
Thanks again Barry.</description>
    <pubDate>Wed, 11 Feb 2015 05:26:22 GMT</pubDate>
    <dc:creator>Lachlan Green</dc:creator>
    <dc:date>2015-02-11T05:26:22Z</dc:date>
    <item>
      <title>UI Button Double Action?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/UI-Button-Double-Action/m-p/245040#M11243</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;Ok GDL geniuses, any ideas on this one?&lt;BR /&gt;
&lt;BR /&gt;
I have set up some buttons in the UI which are to add / subtract 1 from a parameter.  Sounds simple.  The code itself is very simple (see below or attached object).  However it seems to run it twice, each time you click the button, the parameter goes up or down by two not one.  If you change the interval to 2, it will go up/down by 4.  Unfortunately you can't set the interval to .5 as it rounds it.&lt;BR /&gt;
&lt;BR /&gt;
A similar function, which relies on buttons, has the same issue.  It re-orders the values in an array.  It works fine, except again it does it twice, re-ordering the re-ordered array.&lt;BR /&gt;
&lt;BR /&gt;
Does anyone have some suggestions as to what may be causing this?  This is driving me nuts.&lt;BR /&gt;

&lt;BLOCKQUOTE&gt;unID = 1&lt;BR /&gt;
button_insert	= unID : unID = unID +1&lt;BR /&gt;
button_delete	= unID : unID = unID +1&lt;BR /&gt;
button_set		= unID : unID = unID +1&lt;BR /&gt;
&lt;BR /&gt;
IF GLOB_UI_BUTTON_ID = button_insert THEN&lt;BR /&gt;
	value = test +1						&lt;BR /&gt;
	PARAMETERS test = value&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
IF GLOB_UI_BUTTON_ID = button_delete THEN&lt;BR /&gt;
	PARAMETERS test = test -1&lt;BR /&gt;
ENDIF&lt;BR /&gt;
&lt;BR /&gt;
IF GLOB_UI_BUTTON_ID = button_set THEN&lt;BR /&gt;
	PARAMETERS test = 2&lt;BR /&gt;
ENDIF
&lt;/BLOCKQUOTE&gt;&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 11 Feb 2015 04:18:01 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/UI-Button-Double-Action/m-p/245040#M11243</guid>
      <dc:creator>Lachlan Green</dc:creator>
      <dc:date>2015-02-11T04:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: UI Button Double Action?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/UI-Button-Double-Action/m-p/245041#M11244</link>
      <description>You should find your solution here ...&lt;BR /&gt;
&lt;A href="http://archicad-talk.graphisoft.com/viewtopic.php?t=48202" target="_blank"&gt;&lt;LINK_TEXT text="http://archicad-talk.graphisoft.com/vie ... hp?t=48202"&gt;http://archicad-talk.graphisoft.com/viewtopic.php?t=48202&lt;/LINK_TEXT&gt;&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
The parameter script gets run more than once.&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Wed, 11 Feb 2015 04:24:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/UI-Button-Double-Action/m-p/245041#M11244</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2015-02-11T04:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: UI Button Double Action?</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/UI-Button-Double-Action/m-p/245042#M11245</link>
      <description>Thank you Barry!  I can't believe how simple that was!&lt;BR /&gt;
&lt;BR /&gt;
I had seen that post before when I was trying something different, but I completely forgot about it.&lt;BR /&gt;
&lt;BR /&gt;
In case anyone else is interested I've attached the fixed object with the &lt;A href="http://archicad-talk.graphisoft.com/viewtopic.php?t=34828&amp;amp;start=0&amp;amp;postdays=0&amp;amp;postorder=asc&amp;amp;highlight=isfirstrun" target="_blank"&gt;bit of code&lt;/A&gt; Michael Rensing put up almost 5 years ago!&lt;BR /&gt;
&lt;BR /&gt;
Thanks again Barry.</description>
      <pubDate>Wed, 11 Feb 2015 05:26:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/UI-Button-Double-Action/m-p/245042#M11245</guid>
      <dc:creator>Lachlan Green</dc:creator>
      <dc:date>2015-02-11T05:26:22Z</dc:date>
    </item>
  </channel>
</rss>

