<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — dlgrequesttext problem]]></title>
		<link>https://forums.approximatrix.com/viewtopic.php?id=802</link>
		<atom:link href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=802&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in dlgrequesttext problem.]]></description>
		<lastBuildDate>Wed, 10 Mar 2021 18:38:59 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: dlgrequesttext problem]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3701#p3701</link>
			<description><![CDATA[<p>Thank you Jeff. I suspected there were &quot;hidden&quot; extra characters that were throwing things off. I had solved the problem using the same idea that you suggested.</p>]]></description>
			<author><![CDATA[null@example.com (tun_day)]]></author>
			<pubDate>Wed, 10 Mar 2021 18:38:59 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3701#p3701</guid>
		</item>
		<item>
			<title><![CDATA[Re: dlgrequesttext problem]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3699#p3699</link>
			<description><![CDATA[<p>I would try to make the text longer.&nbsp; Because AppGraphics is interacting with Windows API calls, all strings will have a null character appended to them whether setting or retrieving.&nbsp; We strip away this null character when passing back results, but it does take up memory (one of your two character spaces).&nbsp; You probably need to make it a longer string variable.</p><p>You can look at the <a href="https://forums.approximatrix.com/help.php?section=bbcode">BBCode guide</a> on how to italicize or bold text in your posts.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Sun, 07 Mar 2021 16:00:16 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3699#p3699</guid>
		</item>
		<item>
			<title><![CDATA[Re: dlgrequesttext problem]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3698#p3698</link>
			<description><![CDATA[<p>I expected the same result as your code. My caller to the get_text subroutine calls it almost exactly as your main. Except that you declared the variable txt to be length 100 in your main whereas I declared my the equivalent variable in my caller to be length to be length 2. I expected it to be no longer than that because it represents only 1-digit number. </p><p>When I ran your code as is, I got expected results. But when I changed your declaration to txt(2) I got the same problem as my version. On the other hand when I changed my variable to be at least length 3 in my code, I got expected results. I can&#039;t find anything in the documentation of dlgrequesttext that says the string length should be at least 3. Also nothing in my Fortran manual that says so.</p><p>By the&nbsp; way, is there a way to bold or italicize texts in composing this message?</p><p>Thanks!</p>]]></description>
			<author><![CDATA[null@example.com (tun_day)]]></author>
			<pubDate>Thu, 04 Mar 2021 16:25:39 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3698#p3698</guid>
		</item>
		<item>
			<title><![CDATA[Re: dlgrequesttext problem]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3697#p3697</link>
			<description><![CDATA[<p>I&#039;m not sure exactly what you&#039;re saying here.&nbsp; In my code, when I call your routine <em>get_text</em>, a text box pops up, and the user enters text.&nbsp; If the user clicks &quot;Ok,&quot; that text is copied into the variable <em>text</em> in the subroutine <em>get_text</em> as expected.&nbsp; My program simply displays the contents of the variable <em>text</em> after this operation, which appears to be correct. </p><p>Are you seeing something different if you run the code I provided as-is?</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Wed, 03 Mar 2021 13:30:33 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3697#p3697</guid>
		</item>
		<item>
			<title><![CDATA[Re: dlgrequesttext problem]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3696#p3696</link>
			<description><![CDATA[<p>The subroutine get_text properly displays a dialog with the correct input text and prompt to the user but the text typed in by the user does not change the input text in the message box as I understand the documentation to say. As you can see I hardcoded a text (&#039;4&#039;) for now.</p>]]></description>
			<author><![CDATA[null@example.com (tun_day)]]></author>
			<pubDate>Tue, 02 Mar 2021 21:58:04 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3696#p3696</guid>
		</item>
		<item>
			<title><![CDATA[Re: dlgrequesttext problem]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3695#p3695</link>
			<description><![CDATA[<p>I just tested your subroutine, and it seems to work fine.&nbsp; Here&#039;s my working code:</p><div class="codebox"><pre><code>program main
use appgraphics
implicit none

    integer::myscreen
    character(100)::txt
    
    myscreen = initwindow(800, 600, closeflag=.TRUE.)
    
    txt = &#039; &#039;
    call get_text(&quot;Please Provide Text&quot;, txt)
    
    call dlgmessage(DIALOG_INFO, txt)
    
    call loop()
    
    call closewindow(myscreen)

contains

    subroutine get_text(prompt, text)
    use appgraphics

    implicit none

        integer i2
        character :: prompt*(*), text*(*), title*5
        logical ok

        title = &#039;title&#039;
        ok = dlgrequesttext (text, title, prompt)
        i2 = len(text)
        ! text = &#039;4&#039;
    end subroutine get_text

end program main</code></pre></div><p>What exactly do you mean that it &quot;does not output user text input&quot; in your message?</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Mon, 01 Mar 2021 12:36:12 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3695#p3695</guid>
		</item>
		<item>
			<title><![CDATA[dlgrequesttext problem]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3694#p3694</link>
			<description><![CDATA[<p>dlgrequesttext does not output user text input in the following subroutine. Is it me (most likely) or a bug?</p><p>subroutine get_text(prompt, text)<br />use appgraphics</p><p>implicit none</p><p>integer i2<br />character :: prompt*(*), text*(*), title*5<br />logical ok</p><p>title = &#039;title&#039;<br />ok = dlgrequesttext (text, title, prompt)<br />i2 = len(text)<br />! text = &#039;4&#039;<br />end subroutine get_text</p>]]></description>
			<author><![CDATA[null@example.com (tun_day)]]></author>
			<pubDate>Sun, 28 Feb 2021 20:59:23 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3694#p3694</guid>
		</item>
	</channel>
</rss>
