<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — Updated my SF to Ver. 2.30 build 2276, AppGraphics program ill behaved]]></title>
		<link>http://forums.approximatrix.com/viewtopic.php?id=587</link>
		<atom:link href="http://forums.approximatrix.com/extern.php?action=feed&amp;tid=587&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Updated my SF to Ver. 2.30 build 2276, AppGraphics program ill behaved.]]></description>
		<lastBuildDate>Mon, 26 Sep 2016 21:50:30 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Updated my SF to Ver. 2.30 build 2276, AppGraphics program ill behaved]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2673#p2673</link>
			<description><![CDATA[<p>Hi Jeff,</p><p>I just got home and gave the new build a trial. Seems to be working much better. I am not totally sure but there appear to be some artifacts that still make it outside the plot windows but only in the spaces between the control buttons. However this far from objectionable so I am content for now. I will let you know if there are any other interesting things that are unexpected should that happen.</p><p>Thanks again,<br />Rod</p>]]></description>
			<author><![CDATA[null@example.com (grogley)]]></author>
			<pubDate>Mon, 26 Sep 2016 21:50:30 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2673#p2673</guid>
		</item>
		<item>
			<title><![CDATA[Re: Updated my SF to Ver. 2.30 build 2276, AppGraphics program ill behaved]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2671#p2671</link>
			<description><![CDATA[<p>If anyone else had similar problems, a new build (2281) of Simply Fortran is <a href="https://simplyfortran.com/download/">now available on the Download page</a> that should fix drawing issues with Windows controls (buttons, text boxes, etc.).</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Mon, 26 Sep 2016 14:39:26 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2671#p2671</guid>
		</item>
		<item>
			<title><![CDATA[Re: Updated my SF to Ver. 2.30 build 2276, AppGraphics program ill behaved]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2669#p2669</link>
			<description><![CDATA[<p>Jeff,</p><p>I just sent you my code, project file and some data files. Hopefully this will all work for you once it is compiled.</p><p>Rod</p>]]></description>
			<author><![CDATA[null@example.com (grogley)]]></author>
			<pubDate>Wed, 21 Sep 2016 22:52:52 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2669#p2669</guid>
		</item>
		<item>
			<title><![CDATA[Re: Updated my SF to Ver. 2.30 build 2276, AppGraphics program ill behaved]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2668#p2668</link>
			<description><![CDATA[<p>Jeff,</p><p>Unfortunately, if there is no data, the program immediately shuts down and the window closes. You will not be able to see the artifacts plotted outside the data plotting windows. I can rig up a small data folder to include along with the project folders. </p><p>Note this is self contained code, so there is no other source or libraries needed. </p><p>Rod</p>]]></description>
			<author><![CDATA[null@example.com (grogley)]]></author>
			<pubDate>Wed, 21 Sep 2016 14:27:16 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2668#p2668</guid>
		</item>
		<item>
			<title><![CDATA[Re: Updated my SF to Ver. 2.30 build 2276, AppGraphics program ill behaved]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2667#p2667</link>
			<description><![CDATA[<p>Rod,</p><p>If the program would simply start without data, it should be sufficient.&nbsp; You mentioned that the buttons don&#039;t appear at all when the program starts, correct?&nbsp; We can tackle that issue at least initially.</p><p>Also, be sure not to include the executable and any object files.&nbsp; Spam filters will stop email otherwise.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Wed, 21 Sep 2016 14:04:00 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2667#p2667</guid>
		</item>
		<item>
			<title><![CDATA[Re: Updated my SF to Ver. 2.30 build 2276, AppGraphics program ill behaved]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2666#p2666</link>
			<description><![CDATA[<p>Jeff,</p><p>I don&#039;t have any real issue sending my code (other than dying of embarrassment from how horrible a coder I am). </p><p>Sending an entire project is problematic in that you will need data to plot in order for the program to do anything. I can try to bundle a small amount of data in with the project and zip it into a folder that you can extract and work from. Do you know how large of an email file your mail system can handle? If I can squeeze it into that size, then it should be possible.</p><p>I will have to wait until I get home tonight to send the email.</p><p>Note too there are other things going on in the program that I didn&#039;t discuss, like there is an option to create screen captures to make video from the output but that is an option that is access through the initialization file. I will try to include instructions on how to use/run the program when I send it. </p><p>Thanks again,<br />Rod</p>]]></description>
			<author><![CDATA[null@example.com (grogley)]]></author>
			<pubDate>Wed, 21 Sep 2016 13:43:36 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2666#p2666</guid>
		</item>
		<item>
			<title><![CDATA[Re: Updated my SF to Ver. 2.30 build 2276, AppGraphics program ill behaved]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2665#p2665</link>
			<description><![CDATA[<p>Rod,</p><p>Would you be comfortable emailing your entire project to me at support@approximatrix.com?&nbsp; It might be the quickest way to sort out the issue inside AppGraphics.&nbsp; From your description, I really don&#039;t see any issues with your code.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Wed, 21 Sep 2016 12:32:22 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2665#p2665</guid>
		</item>
		<item>
			<title><![CDATA[Re: Updated my SF to Ver. 2.30 build 2276, AppGraphics program ill behaved]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2664#p2664</link>
			<description><![CDATA[<p>Jeff,</p><p>Sorry, I didn&#039;t see your questions from earlier yesterday. My answers follow best as I can understand.</p><p>1) I have been using clearviewport from the beginning and it does what I think is should do. For example, when the the zoom-in button is pushed I set a flag in the callback subroutine that tells the main plotting loop that we want to change the plotting scale. In the plotting loop, there is a big if-then-else segment where all plotting control flags are checked. In the case of zoom-in, I reset the plotting scale and clear the viewport for plotting data at the new scale. </p><p>In this case clearviewport works fine, here is the segment of code for re-initializing the viewport for the new scaling:</p><p>! mcntrl=2 is Zoom In button actions <br />&nbsp; &nbsp; &nbsp; &nbsp; pscale=4.0*pscale/5.0<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; write(scalenumber,&#039;(f8.2)&#039;)pscale<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; call settextboxcontents(isclbox, scalenumber)<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; mcntrl=0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; call setviewport(1,iwiny-iptx,iptx,iwiny,.true.)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; call setbkcolor(mBlack)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; call clearviewport()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; call setviewport(iptx+1,iwiny-iptx,iwinx,iwiny,.true.)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; call setbkcolor(mBlack)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; call clearviewport()</p><br /><p>2) If understand your question, I don&#039;t do anything in the callback subroutines other that setting an action flag (mcntrl above) to tell the code what action to perform. I know this extremely simplistic coding but that is what I settled on to keep the callbacks simple. Here is the callback for the zoomin action:</p><br /><p>&nbsp; &nbsp; Subroutine zoominbut()<br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; integer::mcntrl<br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; common /control/ mcntrl<br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; mcntrl=2<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; end subroutine zoominbut</p><p>3) Creating the buttons:</p><p>In the code, I start by creating all the items in the top control area of the program which includes all the text boxes, check box, other text and then I create all the buttons:</p><p>!Create all the bottons in the control viewport<br />&nbsp; &nbsp; <br />ignore=createbutton(iwinx-ibutton-5,ibutwinsiz-2*ibtoffy-2,ibutton,ibtoffy,&quot;Pause&quot;,pausebut)</p><p>All the button and other controls are created before the main data plotting loop ever starts and before I create the other plotting and informational viewports. I assume once created, they never need attention again and that was what worked before in the old versions I was using. </p><p>***************************************************************************************<br />I know you didn&#039;t ask for it but as an exercise, I thought I would include a high level flow.<br />From a program flow perspective the code starts:</p><p>Initialize all the variables to be used later<br />set up some color names for later use<br />Create the main execution window, setting up default text and colors<br />Create the Control view port which includes:<br />&nbsp; &nbsp; Set the size<br />&nbsp; &nbsp; Set default text and color<br />&nbsp; &nbsp; Write the fixed text for the three left text boxes to follow<br />&nbsp; &nbsp; Set up the three text boxes for the scale, File increment and file number and set their initial contents<br />&nbsp; &nbsp; Set up the three text boxes for the x,y and z offsets and set their initial contents<br />&nbsp; &nbsp; Create the check box for center-of-mass plotting<br />&nbsp; &nbsp; Create the two two text boxes for the CM plotting dialog and initialize their contents. <br />&nbsp; &nbsp; Write out the fixed text associated with those CM text boxes<br />&nbsp; &nbsp; Create 12 buttons for all the button actions each with an associated callback subroutine<br />Create the informational text area of the program,set color (white) and default text properties<br />Create the two data plotting areas, set colors and then clear each new viewport. </p><p>At this point the main plotting loop begins<br />&nbsp; &nbsp; Check for any control changes and perform actions needed for the associated control<br />&nbsp; &nbsp; read in data from the current file number <br />&nbsp; &nbsp; Check for CM positions to be calculated<br />&nbsp; &nbsp; Begin object plotting loop <br /> &nbsp; &nbsp; &nbsp; &nbsp; Set up all the positioning constraints based on control sets<br />&nbsp; &nbsp; &nbsp; &nbsp; Check to see if object is inside the plotting window<br />&nbsp; &nbsp; &nbsp; &nbsp; Call setviewport for the X-Y plotting window<br />&nbsp; &nbsp; &nbsp; &nbsp; Plot the object based on control conditions (includes plotting black for previous loop positions) <br />&nbsp; &nbsp; &nbsp; &nbsp; Call setviewport for the Z-Y plotting window<br />&nbsp; &nbsp; &nbsp; &nbsp; Plot the object based on control conditions (includes plotting black for previous loop positions) <br />&nbsp; &nbsp; &nbsp; &nbsp; Save current positions to use for next iteration<br />&nbsp; &nbsp; &nbsp; &nbsp; Check for last file or first file actions to reverse time plotting if needed; includes update the increment text&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;box in the control viewport <br />&nbsp; &nbsp; End object plot loop<br />&nbsp; &nbsp; Check for every fifth loop to output status to the control and text windows. This includes the following:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Set and write text for updating the text boxes in the control window<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Set and write&nbsp; text for updating the text in the information text area<br />End main loop<br />Exit</p>]]></description>
			<author><![CDATA[null@example.com (grogley)]]></author>
			<pubDate>Wed, 21 Sep 2016 10:49:09 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2664#p2664</guid>
		</item>
		<item>
			<title><![CDATA[Re: Updated my SF to Ver. 2.30 build 2276, AppGraphics program ill behaved]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2663#p2663</link>
			<description><![CDATA[<p>Jeff,</p><p>Sorry forgot to mention the OS in this post. I am using Win 7 Pro for most of my systems and for development. Um, I can try running the program on the on Win 10 system I have to see how it behaves. If it behaves different, I will let you know.</p><p>Rod</p>]]></description>
			<author><![CDATA[null@example.com (grogley)]]></author>
			<pubDate>Tue, 20 Sep 2016 19:21:15 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2663#p2663</guid>
		</item>
		<item>
			<title><![CDATA[Re: Updated my SF to Ver. 2.30 build 2276, AppGraphics program ill behaved]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2662#p2662</link>
			<description><![CDATA[<p>Rod,</p><p>One additional question: What operating system are you using?&nbsp; Drawing can vary between different versions of Windows, although one would think it wouldn&#039;t matter.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Tue, 20 Sep 2016 13:51:31 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2662#p2662</guid>
		</item>
		<item>
			<title><![CDATA[Re: Updated my SF to Ver. 2.30 build 2276, AppGraphics program ill behaved]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2661#p2661</link>
			<description><![CDATA[<p>Rod,</p><p>I&#039;ve tried a few techniques, and I can&#039;t seem to replicate the issue you&#039;re reporting.&nbsp; I have a few questions about how drawing is handled in your code.</p><p>First, I suspect with the older version you had been using that <em>clearviewport</em> was an especially useless function.&nbsp; Were you using some sort of fill or call to <em>bar</em> to clear a viewport?&nbsp; The current <em>clearviewport</em> is especially useful now in that it will actually fill a region with the background color as one might expect.&nbsp; Additionally, are you using <em>setviewport</em> to restrict the drawing region?&nbsp; That should work, and I would think it would cut down on artifacts occurring outside your drawing area (although that could be the bug you&#039;re describing).</p><p>Second, are you performing drawing inside a callback?&nbsp; That shouldn&#039;t cause an issue (I can&#039;t cause one on my end), but it might.&nbsp; </p><p>Third, when do you initialize the buttons?&nbsp; And what drawing actions do you take after initializing the buttons?&nbsp; I&#039;m trying to hunt down why they wouldn&#039;t redraw.</p><p>AppGraphics jumps through some odd hoops to keep GUI program simple even though the background drawing is quite complicated on Windows.&nbsp; Hunting down these bugs can be a bit problematic, especially if a user is writing AppGraphics code in a manner I&#039;m not expecting (which isn&#039;t necessarily wrong, just different).</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Tue, 20 Sep 2016 12:55:10 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2661#p2661</guid>
		</item>
		<item>
			<title><![CDATA[Re: Updated my SF to Ver. 2.30 build 2276, AppGraphics program ill behaved]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2660#p2660</link>
			<description><![CDATA[<p>Rod,</p><p>Not just yet.&nbsp; I suspect I can find and fix the intial problem (disappearing buttons) rather easily.&nbsp; The second problem, graphical artifacts, might be related to double-buffering and a failure to update all buffers appropriately.&nbsp; I&#039;ll take a look at that as well.&nbsp; The problems you&#039;ve described should be caused entirely by AppGraphics itself as opposed to your code.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Mon, 19 Sep 2016 21:28:37 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2660#p2660</guid>
		</item>
		<item>
			<title><![CDATA[Re: Updated my SF to Ver. 2.30 build 2276, AppGraphics program ill behaved]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2659#p2659</link>
			<description><![CDATA[<p>Thanks Jeff,</p><p>I don&#039;t intentionally plot data outside the windows that are set up for data plotting. That said, something I noticed this morning was that there are some data plotting artifacts outside the data plotting windows. I had never seen that before and my code explicitly prohibits plotting outside the confines of the data windows. </p><p>I tested that behavior this morning by restricting the plotting volume even further inside each window and could watch objects with the tighter constraints. Outside of the new constricted volume, no objects were plotted. But in the control interface area, I see what appear to be objects moving through the buttons; overwriting the button graphics. Weird. </p><p>Would it be helpful if I created a program flow? </p><p>Rod</p>]]></description>
			<author><![CDATA[null@example.com (grogley)]]></author>
			<pubDate>Mon, 19 Sep 2016 18:47:22 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2659#p2659</guid>
		</item>
		<item>
			<title><![CDATA[Re: Updated my SF to Ver. 2.30 build 2276, AppGraphics program ill behaved]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2658#p2658</link>
			<description><![CDATA[<p>Rod,</p><p>That behavior is almost certainly due to how AppGraphics handles updating the window.&nbsp; Basically, overlaying the Windows controls (buttons, etc.) over graphics can be problematic as Windows requests redraws.&nbsp; It isn&#039;t your fault, though.&nbsp; AppGraphics should be forcing the Windows control to the top regardless of redrawing. Let me see if I can replicate and fix the issue, and I&#039;ll let you know when a build is available.&nbsp; If I do come across&nbsp; quick fix in the meantime, I&#039;ll be sure to notify you.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Mon, 19 Sep 2016 14:59:11 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2658#p2658</guid>
		</item>
		<item>
			<title><![CDATA[Updated my SF to Ver. 2.30 build 2276, AppGraphics program ill behaved]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2656#p2656</link>
			<description><![CDATA[<p>Hi All,</p><p>I started a new thread from the one the other day since this is a different issue. In that previuos thread, Jeff suggested updating my SF package and so after some deliberation, I decided to try. I have had to work on other projects in the last day and they all behave properly but they are not AppGraphics code.</p><p>My AppGraphics application when recompiled I notice some different behaviors. It was easy to adjust the fonts as perhaps the defaults were changed. However, one thing I have been struggling with is that the function buttons I create to control the features of the plotting now appear and disappear in ways that I have not completely characterized. </p><p>Previously I have shared the screen shot of this application (<a href="https://flic.kr/p/rnZ1SS">https://flic.kr/p/rnZ1SS</a>) and there are four areas within the created window that have activity. There are two large plotting areas where the data is plotted, there is the control are on top and then a text informational area in the middle. </p><p>What happens when the program starts is that all the control buttons (with the exception of the Pause and Reverse buttons) are invisible. Note that even though invisible, the area around the button is still active and will complete the desired action for that individual button. If i wait a few (several in some cases) seconds or if I move the entire window, all the buttons will appear and stay. They will stay only until one of the zoom-in or zoom-out buttons buttons is pushed; then they disappear for a while (indetermined). If I move the window all will return again.</p><p>Note too that some of the buttons show the &quot;pushed&quot; action and some do not but all function as to their actions when pushed.</p><p>I have tried a number of things in the last couple of days and have cleaned the code up some. However, in all honesty, I only vaguely understand what the actions of some of the AppGraphics commands do and I am not sure my program is structured in way that AppGraphics expects. Recall, I hacked this code together using your example code.</p><p>If any of this rings a bell with anyone, help would be appreciated. I can live with the current behavior but it is not ideal.&nbsp; </p><p>Note too that all the behaviors above are new with the new SF version. I did have some odd behavior in the past versions but nothing that I couldn&#039;t live with.<br />Thanks,<br />Rod</p>]]></description>
			<author><![CDATA[null@example.com (grogley)]]></author>
			<pubDate>Sun, 18 Sep 2016 14:35:52 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2656#p2656</guid>
		</item>
	</channel>
</rss>
