{"id":403,"date":"2015-06-18T11:01:04","date_gmt":"2015-06-18T18:01:04","guid":{"rendered":"http:\/\/www.icetips.com\/blog_wp\/?p=403"},"modified":"2015-06-18T11:01:04","modified_gmt":"2015-06-18T18:01:04","slug":"bug-in-clarion-resize-class-with-a-fix","status":"publish","type":"post","link":"http:\/\/www.icetips.com\/blog_wp\/2015\/06\/18\/bug-in-clarion-resize-class-with-a-fix\/","title":{"rendered":"Bug in Clarion Resize class &#8211; with a fix!"},"content":{"rendered":"<p>I have been working on <a href=\"http:\/\/www.buildautomator.com\" target=\"_blank\">Build Automator<\/a> in Clarion 10 this week, along with other things. \u00a0Yesterday I discovered that there was something very odd going on with the resizing of the windows. \u00a0When comparing the Search and Replace window between the Clarion 6.3 version and the Clarion 10 version, it was like the listbox wasn't stretching like it should, as seen in the screenshot below.<\/p>\n<figure id=\"attachment_404\" aria-describedby=\"caption-attachment-404\" style=\"width: 625px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2015\/06\/06.17.2015-14.59.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-404 size-large\" src=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2015\/06\/06.17.2015-14.59-1024x702.png\" alt=\"06.17.2015-14.59\" width=\"625\" height=\"428\" srcset=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2015\/06\/06.17.2015-14.59-1024x702.png 1024w, http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2015\/06\/06.17.2015-14.59-300x206.png 300w, http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2015\/06\/06.17.2015-14.59-960x658.png 960w, http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2015\/06\/06.17.2015-14.59.png 1141w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><figcaption id=\"caption-attachment-404\" class=\"wp-caption-text\">Clarion 6.3 window on the left, Clarion 10 window on the right.<\/figcaption><\/figure>\n<p>After quite a bit of snooping around and posting on the newsgroup, where Bob Campbell pointed out the listbox size issue, I came to the conclusion that there was a problem with the\u00a0WindowResizeClass.SetParentDefault method in ABRESIZE.CLW. \u00a0So to test it, I copied the one from Clarion 6.3 and omitted the original and lo and behold the resizing worked perfectly again!<\/p>\n<p>After sleeping on it, I realized that the code\u00a0change involved a new method of finding the parent control of a control, which doesn't have a PROP:Parent parent - kind of an orphan;)<\/p>\n<p>In the class method the code figures out what type of parent controls there can be:<\/p>\n<pre> CASE ThisControl{PROP:Type} + 0\r\n OF CREATE:Group\r\n OROF CREATE:Option\r\n OROF CREATE:Tab\r\n OROF CREATE:Sheet<\/pre>\n<p>This is missing both CREATE:Panel and CREATE:Region! \u00a0I'm using Panels all over the place on the windows in <a href=\"http:\/\/www.buildautomator.com\" target=\"_blank\">Build Automator<\/a> and came to the conclusion that this is where the problem was. \u00a0So I added:<\/p>\n<pre> OROF CREATE:Panel\r\n OROF CREATE:Region<\/pre>\n<p>to the list, re-compiled after omitting the Clarion 6.3 code, and it worked perfectly again:) The CASE statement is around line 580 in the ABRESIZE.CLW file if you want to do this fix to your class file.\u00a0 I have reported this to Softvelocity and hope they will fix this in the next\u00a0release.<\/p>\n<p><em>Arnor Baldvinsson<\/em><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_403\" class=\"pvc_stats all  \" data-element-id=\"403\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>I have been working on Build Automator in Clarion 10 this week, along with other things. \u00a0Yesterday I discovered that there was something very odd going on with the resizing of the windows. \u00a0When comparing the Search and Replace window between the Clarion 6.3 version and the Clarion 10 version, it was like the listbox <a href=\"http:\/\/www.icetips.com\/blog_wp\/2015\/06\/18\/bug-in-clarion-resize-class-with-a-fix\/\" class=\"more-link\">...continue reading <span class=\"screen-reader-text\">Bug in Clarion Resize class &#8211; with a fix!<\/span><\/a><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_403\" class=\"pvc_stats all  \" data-element-id=\"403\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[17,6,5],"tags":[],"class_list":["post-403","post","type-post","status-publish","format-standard","hentry","category-clarion-10","category-news","category-technical"],"_links":{"self":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts\/403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/comments?post=403"}],"version-history":[{"count":1,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts\/403\/revisions"}],"predecessor-version":[{"id":405,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts\/403\/revisions\/405"}],"wp:attachment":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/media?parent=403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/categories?post=403"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/tags?post=403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}