<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — AppGraphics Drop Down List getdropdownlisttext function not working]]></title>
	<link rel="self" href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=974&amp;type=atom" />
	<updated>2025-02-08T17:57:36Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.approximatrix.com/viewtopic.php?id=974</id>
		<entry>
			<title type="html"><![CDATA[Re: AppGraphics Drop Down List getdropdownlisttext function not working]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4428#p4428" />
			<content type="html"><![CDATA[<p>Robert,</p><p>My guess, based on your code and description, is that a deadlock occurs when requesting text from the control while inside a callback.&nbsp; If the main program requested the text, I&#039;m guessing it would work.&nbsp; But... it should work the way you have it as well.&nbsp; If you&#039;re seeing something similar with the multiline textbox, I&#039;m sure it&#039;s the same deadlock.</p><p>I&#039;ll look into it this weekend and push out a fix as soon as I can.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2025-02-08T17:57:36Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4428#p4428</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AppGraphics Drop Down List getdropdownlisttext function not working]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=4427#p4427" />
			<content type="html"><![CDATA[<p>I have a problem with getdropdownlisttext function causing program to stop and return to the IDE.<br />I have a similar problem with MultilineTextBoxes, but I will do a seperate post for that.&nbsp; All the other Appgraphics controls are working fine for me.</p><p>Here is an example</p><p>! AppGraphics Drop Down Lists example<br />program DropDownList</p><p>use Appgraphics<br />implicit none</p><p>integer :: winMain<br />integer :: ddlId, ddlEntries</p><p>interface<br />&nbsp; subroutine ddlCallBack()<br />&nbsp; end subroutine ddlCallBack<br />end interface</p><p>&nbsp; write(*,*) &quot;Drop Down List Test&quot;</p><p>&nbsp; winMain = initwindow(800, 600, title=&quot;App Graphics Drop Down List&quot;,&nbsp; closeflag=.TRUE.)<br />&nbsp; call setbkcolor(LIGHTGRAY)<br />&nbsp; call clearviewport<br />&nbsp; <br />&nbsp; !! create a dropdown list<br />&nbsp; ddlId = createdropdownlist(50, 50, 300, 300, ddlCallBack)</p><p>&nbsp; ddlEntries = insertdropdownlistentry(ddlId, -1, &quot;1 first item&quot; ) <br />&nbsp; ddlEntries = insertdropdownlistentry(ddlId, -1, &quot;2 second time&quot; )<br />&nbsp; ddlEntries = insertdropdownlistentry(ddlId, -1, &quot;3 try again&quot; )<br />&nbsp; ddlEntries = insertdropdownlistentry(ddlId, -1, &quot;4 one more&quot; )<br />&nbsp; ddlEntries = insertdropdownlistentry(ddlId, -1, &quot;5 another one to go&quot; )<br />&nbsp; ddlEntries = insertdropdownlistentry(ddlId, -1, &quot;6 final entry&quot; )<br />&nbsp; &nbsp;<br />&nbsp; call loop()<br />&nbsp; &nbsp; <br />&nbsp; call closewindow(winMain)<br />end program DropDownList</p><p>subroutine ddlCallBack()<br />&nbsp; use Appgraphics<br />&nbsp; implicit none<br />&nbsp; <br />&nbsp; character(len=5) :: txt&nbsp; ! for numeric to integer string conversion<br />&nbsp; character(len=50) :: ddlSelText !&nbsp; to hold the selected line of text<br />&nbsp; integer :: ddlSel, TextLen, ListId<br />&nbsp; <br />&nbsp; ListId = getcallbackcontrolid()</p><p>&nbsp; ! check that we get the correct line number<br />&nbsp; ddlSel = getdropdownlistselection(ListId)&nbsp; !! zero based <br />&nbsp; <br />&nbsp; write(txt, &#039;(i5)&#039; ) ddlSel<br />&nbsp; call dlgmessage(DIALOG_INFO, &quot; got ddl Selection (zero based) &quot; // txt)<br />&nbsp; <br />&nbsp; ! now get the actual text from that line<br />&nbsp; TextLen = getdropdownlisttext(ListId, ddlSel, ddlSelText) !***** this is where it crashes<br />&nbsp; &nbsp;<br />&nbsp; ! check that the length returned makes sense<br />&nbsp; write(txt, &#039;(i15)&#039; ) TextLen<br />&nbsp; call dlgmessage(DIALOG_INFO, &quot; got TextLen &quot; // txt )<br />&nbsp; ! display the line selected<br />&nbsp; call dlgmessage(DIALOG_INFO, &quot; drop down item selected &quot; // ddlSelText)<br />&nbsp; <br />end subroutine ddlCallBack</p><br /><p>When the program gets to the TextLen = .... line then is just stops and returns to the IDE.<br />I cant seem to run debug on Appgraphics, a black window opens and the spinner goes around indicating it is doing something, and nothing happens.&nbsp; That is why I put in the dialog boxe messages to see what is going on.<br />If I comment out the TextLen =&nbsp; .... line&nbsp; &nbsp;then the program runs, but of course the messages are invalid.</p><p>Any ideas ?&nbsp; Why is it only drop down lists that give me this problem ?<br />I am using SF 3.38 build 4333 and GNU Fortran 14.1.0 on a Windows 10 desktop</p><p>Thanks, Robert</p>]]></content>
			<author>
				<name><![CDATA[robert.mclean26]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=4049</uri>
			</author>
			<updated>2025-02-08T16:38:56Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=4427#p4427</id>
		</entry>
</feed>
