<?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 GUI-Guider: Center alignment can crash Micropython in GUI Guider</title>
    <link>https://community.nxp.com/t5/GUI-Guider/GUI-Guider-Center-alignment-can-crash-Micropython/m-p/1945639#M1179</link>
    <description>&lt;P&gt;I am prototyping a GUI design using the simulator under Windows.&amp;nbsp; Running it under C worked, but MicroPython crashed, displaying a blank window that immediately disappeared.&amp;nbsp; I ran "micropython gui_guider.py:" in a terminal window to find this message:&lt;/P&gt;&lt;P&gt;File "/Users/wmb/Documents/Tablet7/generated/gui_guider.py", line 430, in &amp;lt;module&amp;gt;&lt;BR /&gt;TypeError: can't convert float to int&lt;/P&gt;&lt;P&gt;The offending line of code was:&lt;/P&gt;&lt;P&gt;screen_label_state.set_pos(10, 19.5)&lt;/P&gt;&lt;P&gt;That non-integral position 19.5 resulted from the VerticalAlignCenter command, where I tried to align a first item of height 33 to a second item with Y position 11, height 50.&amp;nbsp; The calculation resulted in a first item Y position of 19.5, which appeared in the Attributes:Position display in GUI-Guider.&lt;/P&gt;&lt;P&gt;The C compiler demoted the floating point value 19.5 to integer, so the C version worked.&amp;nbsp; MicroPython errored out.&lt;/P&gt;&lt;P&gt;I believe that GUI Guider should round calculated positions to integer to avoid such problems.&lt;/P&gt;&lt;P&gt;It is easy to workaround this problem if you happen to notice it.&amp;nbsp; You can just hit the decrement button on the Position and it will remove the .5 .&lt;/P&gt;</description>
    <pubDate>Mon, 02 Sep 2024 20:09:18 GMT</pubDate>
    <dc:creator>MitchBradley</dc:creator>
    <dc:date>2024-09-02T20:09:18Z</dc:date>
    <item>
      <title>GUI-Guider: Center alignment can crash Micropython</title>
      <link>https://community.nxp.com/t5/GUI-Guider/GUI-Guider-Center-alignment-can-crash-Micropython/m-p/1945639#M1179</link>
      <description>&lt;P&gt;I am prototyping a GUI design using the simulator under Windows.&amp;nbsp; Running it under C worked, but MicroPython crashed, displaying a blank window that immediately disappeared.&amp;nbsp; I ran "micropython gui_guider.py:" in a terminal window to find this message:&lt;/P&gt;&lt;P&gt;File "/Users/wmb/Documents/Tablet7/generated/gui_guider.py", line 430, in &amp;lt;module&amp;gt;&lt;BR /&gt;TypeError: can't convert float to int&lt;/P&gt;&lt;P&gt;The offending line of code was:&lt;/P&gt;&lt;P&gt;screen_label_state.set_pos(10, 19.5)&lt;/P&gt;&lt;P&gt;That non-integral position 19.5 resulted from the VerticalAlignCenter command, where I tried to align a first item of height 33 to a second item with Y position 11, height 50.&amp;nbsp; The calculation resulted in a first item Y position of 19.5, which appeared in the Attributes:Position display in GUI-Guider.&lt;/P&gt;&lt;P&gt;The C compiler demoted the floating point value 19.5 to integer, so the C version worked.&amp;nbsp; MicroPython errored out.&lt;/P&gt;&lt;P&gt;I believe that GUI Guider should round calculated positions to integer to avoid such problems.&lt;/P&gt;&lt;P&gt;It is easy to workaround this problem if you happen to notice it.&amp;nbsp; You can just hit the decrement button on the Position and it will remove the .5 .&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 20:09:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/GUI-Guider/GUI-Guider-Center-alignment-can-crash-Micropython/m-p/1945639#M1179</guid>
      <dc:creator>MitchBradley</dc:creator>
      <dc:date>2024-09-02T20:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: GUI-Guider: Center alignment can crash Micropython</title>
      <link>https://community.nxp.com/t5/GUI-Guider/GUI-Guider-Center-alignment-can-crash-Micropython/m-p/1946939#M1181</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/239982"&gt;@MitchBradley&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your feedback, this problem does exist in V1.8.0, we will trying to fix it in the future release.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wenbin&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 06:55:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/GUI-Guider/GUI-Guider-Center-alignment-can-crash-Micropython/m-p/1946939#M1181</guid>
      <dc:creator>WenbinYuan</dc:creator>
      <dc:date>2024-09-04T06:55:45Z</dc:date>
    </item>
  </channel>
</rss>

