UI_RADIOBUTTON compatibility issue

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2017-10-25 10:49 PM
‎2017-10-25
10:49 PM
In a code running mostly on AC18, I wrote:
UI_RADIOBUTTON "Blabla" someVariable[_i] x, y, w, hAnd it ran.
The same code crashed on AC20 citing that I cannot use arrays as parameters driven by
On AC20 there is a new version:
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
So there was working stuff that was modified into two nonworking commands.
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):
at first I have to initialize the UI vars, like
parameters UIvar = someArray[_i]and then write back the result
if GLOB_MODPAR_NAME = "UIvar" then someArray[_i] = UIvar parameters someArray = someArray endifThe 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
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.
So this is not a 100% workaround for this celverly programmed bug.
GDL/Python/C++ dev
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2017-10-26 02:54 AM
‎2017-10-26
02:54 AM
Sam wrote:So you are saying that this doesn't work? ...
Even if I ask GDL version with aREQUESTand make a selection for this, it keeps crashing, regardless of the control reaching that part of code.
IF REQ("GDL_version")<=1.806 THEN ! VER 18 and below UI_RADIOBUTTON ..... ENDIF IF REQ("GDL_version")>1.806 THEN ! VER 19 and above UI_RADIOBUTTON{2} ..... ENDIFI use this a lot in my objects although I must admit very rarely in my Interface script.
Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2017-10-26 12:06 PM
‎2017-10-26
12:06 PM
You guys are doing that for having just one object to take care of?
Lucas Becker | AC 27 on Mac | Graphisoft Insider Panelist | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |
POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2017-10-26 10:44 PM
‎2017-10-26
10:44 PM
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.
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.
(PS besides the error message, the UI crashes at that point)
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.
(PS besides the error message, the UI crashes at that point)
IF REQ("GDL_version")<=1.806 THEN ! VER 18 and below UI_RADIOBUTTON ..... ENDIF IF REQ("GDL_version")>1.806 THEN ! VER 19 and above UI_RADIOBUTTON{2} ..... ENDIF
GDL/Python/C++ dev

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-02-07 05:09 PM
‎2018-02-07
05:09 PM
Hey All,
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.
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!
Regards,
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.
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!
Regards,
Daniel Alexander Kovacs
Professional Services Consultant
GRAPHISOFT
For Troubleshooting and useful Tips & Tricks visit
Professional Services Consultant
GRAPHISOFT
For Troubleshooting and useful Tips & Tricks visit