<?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_RADIOBUTTON compatibility issue in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/UI-RADIOBUTTON-compatibility-issue/m-p/240460#M5058</link>
    <description>As far as I know regardless of any kind of selection if there is a UI_RADIOBUTTON{2} in a code AC18 runs, the interpreter print an error that it doesn't know the version 2 of UI_RADIOBUTTON.&lt;BR /&gt;
&lt;BR /&gt;
Specifically, I REQ-ed somewhere else the GDL_version, put it into a local variable and on the UI script I made the if to that variable's value, but I think it's not a difference.&lt;BR /&gt;
&lt;BR /&gt;
(PS besides the error message, the UI crashes at that point) &lt;BR /&gt;

&lt;PRE&gt;IF REQ("GDL_version")&amp;lt;=1.806 THEN		! VER 18 and below
    UI_RADIOBUTTON .....
ENDIF

IF REQ("GDL_version")&amp;gt;1.806 THEN		! VER 19 and above
    UI_RADIOBUTTON{2} .....
ENDIF

&lt;/PRE&gt;</description>
    <pubDate>Thu, 26 Oct 2017 20:44:43 GMT</pubDate>
    <dc:creator>Sam Karli</dc:creator>
    <dc:date>2017-10-26T20:44:43Z</dc:date>
    <item>
      <title>UI_RADIOBUTTON compatibility issue</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/UI-RADIOBUTTON-compatibility-issue/m-p/240457#M5055</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;Hi, I ran into a fantastic issue.&lt;BR /&gt;
&lt;BR /&gt;
In a code running mostly on AC18, I wrote:&lt;BR /&gt;

&lt;PRE&gt;UI_RADIOBUTTON "Blabla" someVariable[_i] x, y, w, h&lt;/PRE&gt;

And it ran.&lt;BR /&gt;
&lt;BR /&gt;
The same code crashed on AC20 citing that I cannot use arrays as parameters driven by &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;UI_RADIOBUTTON.&lt;E&gt;&lt;/E&gt;&lt;BR /&gt;
On AC20 there is a new version: &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;UI_RADIOBUTTON{2}.&lt;E&gt;&lt;/E&gt;&lt;BR /&gt;
&lt;BR /&gt;
But if I write it into the original code, it will crashes on older versions, like on AC18. Even if I ask GDL version with a &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;REQUEST&lt;E&gt;&lt;/E&gt; and make a selection for this, it keeps crashing, regardless of the control reaching that part of code.&lt;BR /&gt;
&lt;BR /&gt;
So there was working stuff that was modified into two nonworking commands.&lt;BR /&gt;
&lt;BR /&gt;
I devised a workaround of driving a temporary UI parameter from UI_RADIOBUTTON and pass it to the actual (array) parameter I want to drive from UI, but it has its own disadvantages (except for the 4 extra hours of coding I have spent with this problem):&lt;BR /&gt;
&lt;BR /&gt;
at first I have to initialize the UI vars, like
&lt;PRE&gt;parameters UIvar = someArray[_i]&lt;/PRE&gt;

and then write back the result
&lt;PRE&gt;if GLOB_MODPAR_NAME = "UIvar" then
    someArray[_i] = UIvar
    parameters someArray = someArray
endif&lt;/PRE&gt;

The only problem that a code like this is not aware of the real running context and will falsely initialize UIvar to someArray[_i] even if I manipulate the radiobutton. So there must be a selector for initializing UIvar (ot to put it into the else branch of this &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;GLOB_MODPAR_NAME&lt;E&gt;&lt;/E&gt; stuff).&lt;BR /&gt;
&lt;BR /&gt;
But there is still chance of being erroneous, because this piece of code is not aware if UIvar is changed indirectly by another UI element.&lt;BR /&gt;
&lt;BR /&gt;
So this is not a 100% workaround for this celverly programmed bug.&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 25 Oct 2017 20:49:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/UI-RADIOBUTTON-compatibility-issue/m-p/240457#M5055</guid>
      <dc:creator>Sam Karli</dc:creator>
      <dc:date>2017-10-25T20:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: UI_RADIOBUTTON compatibility issue</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/UI-RADIOBUTTON-compatibility-issue/m-p/240458#M5056</link>
      <description>&lt;BLOCKQUOTE&gt;Sam wrote:&lt;BR /&gt;Even if I ask GDL version with a &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;REQUEST&lt;E&gt;&lt;/E&gt; and make a selection for this, it keeps crashing, regardless of the control reaching that part of code.
&lt;/BLOCKQUOTE&gt;

So you are saying that this doesn't work? ...&lt;BR /&gt;

&lt;PRE&gt;IF REQ("GDL_version")&amp;lt;=1.806 THEN		! VER 18 and below
    UI_RADIOBUTTON .....
ENDIF

IF REQ("GDL_version")&amp;gt;1.806 THEN		! VER 19 and above
    UI_RADIOBUTTON{2} .....
ENDIF

&lt;/PRE&gt;

I use this a lot in my objects although I must admit very rarely in my Interface script.&lt;BR /&gt;
&lt;BR /&gt;
Barry.</description>
      <pubDate>Thu, 26 Oct 2017 00:54:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/UI-RADIOBUTTON-compatibility-issue/m-p/240458#M5056</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2017-10-26T00:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: UI_RADIOBUTTON compatibility issue</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/UI-RADIOBUTTON-compatibility-issue/m-p/240459#M5057</link>
      <description>You guys are doing that for having just one object to take care of?</description>
      <pubDate>Thu, 26 Oct 2017 10:06:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/UI-RADIOBUTTON-compatibility-issue/m-p/240459#M5057</guid>
      <dc:creator>runxel</dc:creator>
      <dc:date>2017-10-26T10:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: UI_RADIOBUTTON compatibility issue</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/UI-RADIOBUTTON-compatibility-issue/m-p/240460#M5058</link>
      <description>As far as I know regardless of any kind of selection if there is a UI_RADIOBUTTON{2} in a code AC18 runs, the interpreter print an error that it doesn't know the version 2 of UI_RADIOBUTTON.&lt;BR /&gt;
&lt;BR /&gt;
Specifically, I REQ-ed somewhere else the GDL_version, put it into a local variable and on the UI script I made the if to that variable's value, but I think it's not a difference.&lt;BR /&gt;
&lt;BR /&gt;
(PS besides the error message, the UI crashes at that point) &lt;BR /&gt;

&lt;PRE&gt;IF REQ("GDL_version")&amp;lt;=1.806 THEN		! VER 18 and below
    UI_RADIOBUTTON .....
ENDIF

IF REQ("GDL_version")&amp;gt;1.806 THEN		! VER 19 and above
    UI_RADIOBUTTON{2} .....
ENDIF

&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Oct 2017 20:44:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/UI-RADIOBUTTON-compatibility-issue/m-p/240460#M5058</guid>
      <dc:creator>Sam Karli</dc:creator>
      <dc:date>2017-10-26T20:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: UI_RADIOBUTTON compatibility issue</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/UI-RADIOBUTTON-compatibility-issue/m-p/240461#M5059</link>
      <description>Hey All,&lt;BR /&gt;
&lt;BR /&gt;
It looks like this change was unintentional, so it is a bug (it can cause incompatibility issues with previously working GDL Library Parts). The UI_RADIOBUTTON command should still work with Array Parameters.&lt;BR /&gt;
&lt;BR /&gt;
This will be fixed in the next main version (AC22), and we are looking into whether we can fix it in 20 and 21 as well. Thanks for pointing this out to us!&lt;BR /&gt;
&lt;BR /&gt;
Regards,</description>
      <pubDate>Wed, 07 Feb 2018 16:09:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/UI-RADIOBUTTON-compatibility-issue/m-p/240461#M5059</guid>
      <dc:creator>Daniel Kovacs</dc:creator>
      <dc:date>2018-02-07T16:09:19Z</dc:date>
    </item>
  </channel>
</rss>

