<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — Handling multiple window]]></title>
	<link rel="self" href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=723&amp;type=atom" />
	<updated>2019-09-27T16:39:37Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.approximatrix.com/viewtopic.php?id=723</id>
		<entry>
			<title type="html"><![CDATA[Re: Handling multiple window]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3344#p3344" />
			<content type="html"><![CDATA[<p>Thank you ! I&#039;ll work with that <img src="https://forums.approximatrix.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[ker2x]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3821</uri>
			</author>
			<updated>2019-09-27T16:39:37Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3344#p3344</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Handling multiple window]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3343#p3343" />
			<content type="html"><![CDATA[<p>You can reliably count on <em>closeflag</em> to end the program if set to <em>.TRUE.</em>.&nbsp; So in your case, I would rewrite the program as:</p><div class="codebox"><pre><code>CALL initsomestuff()
CALL initsomeotherstuff()
DO WHILE(.TRUE.)
    CALL loop()
    CALL setcurrentwindow(main_screen)
END DO
CALL closewindow(main_screen)
END PROGRAM</code></pre></div><p>The above assumes that, after closing a secondary window, you always want <em>main_screen</em> to be the current window.</p><p>What AppGraphics really should have is the option for a callback when a window is closed so that your code can handle anything it might need to do like set a different window as current or possibly end the program more gracefully than what <em>closeflag</em> allows.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2019-09-26T17:25:18Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3343#p3343</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Handling multiple window]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3342#p3342" />
			<content type="html"><![CDATA[<p>Do you have any workaround idea for this ? <br />and i don&#039;t understand the purpose of the closeflag if it&#039;s not for this exact problem <img src="https://forums.approximatrix.com/img/smilies/hmm.png" width="15" height="15" alt="hmm" /></p><p>thank you <img src="https://forums.approximatrix.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[ker2x]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3821</uri>
			</author>
			<updated>2019-09-26T12:58:10Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3342#p3342</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Handling multiple window]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3341#p3341" />
			<content type="html"><![CDATA[<p>When any window is closed in AppGraphics, it also triggers a call to <em>stopidle</em>.&nbsp; I don&#039;t believe the documentation explicitly outlines this, but it is indeed true.&nbsp; In your program, when you close either window, the program will exit the <em>loop</em> call immediately.</p><p>I do see a problem with this configuration, though.&nbsp; AppGraphics maybe does require a more explicit way of determining the event that caused <em>stopidle</em> to be called.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2019-09-26T11:05:30Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3341#p3341</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Handling multiple window]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3340#p3340" />
			<content type="html"><![CDATA[<p>Friendly greetings !</p><p>Using appgraphic, on windows 10 :<br />I have 2 windows (&quot;main_screen&quot; and &quot;printer_screen&quot;) created with initwindow on startup. One with closeflag TRUE and the other one FALSE.<br />When i close any of them, the whole program close.</p><p>Is this supposed to happens ?</p><p>My main is really simple : </p><p>CALL initsomestuff()<br />CALL initsomeotherstuff()<br />CALL loop()<br />CALL closewindow(main_screen)<br />END PROGRAM</p><p>Thank you</p>]]></content>
			<author>
				<name><![CDATA[ker2x]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3821</uri>
			</author>
			<updated>2019-09-26T07:06:00Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3340#p3340</id>
		</entry>
</feed>
