<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Defaultvalue for UIReadStringMessage(true); in Customization</title>
    <link>https://www.ptcusercommunity.com/t5/Customization/Defaultvalue-for-UIReadStringMessage-true/m-p/281152#M695</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;But I'm looking for the to display a default value at the input or to define a Combobox at the input in Jlink. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 17 Jun 2017 04:40:27 GMT</pubDate>
    <dc:creator>DieterKotsch</dc:creator>
    <dc:date>2017-06-17T04:40:27Z</dc:date>
    <item>
      <title>Defaultvalue for UIReadStringMessage(true);</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Defaultvalue-for-UIReadStringMessage-true/m-p/281150#M693</link>
      <description>How can i define a Default value for the UIReadStringMessage(true); The command appears in my jlinkapp without a defaultvalue. On page 79 of the helpfile you can read the note. A default value is displayed in the text box as Input.When user presses the Enter key as input in the user</description>
      <pubDate>Wed, 02 May 2018 23:28:09 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Defaultvalue-for-UIReadStringMessage-true/m-p/281150#M693</guid>
      <dc:creator>DieterKotsch</dc:creator>
      <dc:date>2018-05-02T23:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Defaultvalue for UIReadStringMessage(true);</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Defaultvalue-for-UIReadStringMessage-true/m-p/281151#M694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do not know how to display default value at the input, but the string use_default_string is just flag for using default value you define in your code, so you can do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;String myDefaultValue = "my_parameter_name";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;String result = session.UIReadStringMessage(true);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;if(result.equals("use_default_string");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; result = myDefaultValue;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;//rest of your code ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;If you need to inform user what is default string value you can display it in the message log using method &lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;UIDisplayMessage&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Alternatively you can display default string using new process, which will create GUI and then dissapear, like the Android is displaying short messages e.g. when you set alarm.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 18:47:33 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Defaultvalue-for-UIReadStringMessage-true/m-p/281151#M694</guid>
      <dc:creator>sjuraj</dc:creator>
      <dc:date>2017-06-16T18:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: Defaultvalue for UIReadStringMessage(true);</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Defaultvalue-for-UIReadStringMessage-true/m-p/281152#M695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;But I'm looking for the to display a default value at the input or to define a Combobox at the input in Jlink. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Jun 2017 04:40:27 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Defaultvalue-for-UIReadStringMessage-true/m-p/281152#M695</guid>
      <dc:creator>DieterKotsch</dc:creator>
      <dc:date>2017-06-17T04:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Defaultvalue for UIReadStringMessage(true);</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Defaultvalue-for-UIReadStringMessage-true/m-p/281153#M696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, if you want combobox you can easely create jDialog and fill it with combobox or listview. You can also fill jDialog with JFXPanel, which enable you to use JavaFX components into swing component. With JavaFX you can create really nice and modern looking GUI. I suppose you can create such thing as combobox in j-link. To create GUI is issue of java object toolkit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Jun 2017 07:23:08 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Defaultvalue-for-UIReadStringMessage-true/m-p/281153#M696</guid>
      <dc:creator>sjuraj</dc:creator>
      <dc:date>2017-06-17T07:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Defaultvalue for UIReadStringMessage(true);</title>
      <link>https://www.ptcusercommunity.com/t5/Customization/Defaultvalue-for-UIReadStringMessage-true/m-p/1034128#M14487</link>
      <description>&lt;P&gt;You need to provide a specific pattern in the message file.&lt;BR /&gt;In PROTOOLKIT the default value to the read function is supplied by the preceding "ProMessageDisplay" function if its argument does include the special form "|||" within.&lt;BR /&gt;In ObjectToolkit it's barely the same; the default value is provided by the preceding "UIDisplayMessage" function, provided the message has the same form.&lt;/P&gt;&lt;P&gt;Here's an example from PROTOOLKIT examples folders:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;message file (msd_ugmessages.txt) content:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;%CPUSER Enter any integer between %0d and %1d: |||%2d&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Enter any integer between %0d and %1d: |||%2d&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;#&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;#&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;and the code (UgMessagewindoeUse.c)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;/*------------------------------------------------------------------*\&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; Read an integer with a restricted range and a default value.&amp;nbsp; Message&amp;nbsp;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; will display as a prompt.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;\*------------------------------------------------------------------*/&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; err = ProMessageDisplay (msgfil,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "USER Enter any integer between %0d and %1d: |||%2d", &amp;amp;irange[0],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;irange[1], &amp;amp;default_int);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; err = ProMessageIntegerRead (irange, &amp;amp;i2);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; if (err != PRO_TK_NO_ERROR &amp;amp;&amp;amp; err != PRO_TK_GENERAL_ERROR)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; return (err);&lt;/FONT&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;Now a similar example in Object Toolkit:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;msg_user.txt:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;enter desired string.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;enter desired string.|||%0s&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;enter desired string.|||%0s&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;#&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;the code:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;xstring desiredString, defaultString{ "Default" };&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;xstringsequence_ptr xDefaultValues = xstringsequence::create();&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;xDefaultValues-&amp;gt;append(defaultString);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;pfcGetCurrentSession()-&amp;gt;UIDisplayMessage("msg_user.txt", "enter desired string.", xDefaultValues);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;try {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;desiredString = pfcGetCurrentSession()-&amp;gt;UIReadStringMessage(xfalse);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;catch (...) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;desiredString = "user aborted";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;if (desiredString == xstring("use_default_string")) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;desiredString = defaultString;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;BR /&gt;Giuseppe.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Sep 2025 14:06:52 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Customization/Defaultvalue-for-UIReadStringMessage-true/m-p/1034128#M14487</guid>
      <dc:creator>GiuseppeMicheli</dc:creator>
      <dc:date>2025-09-16T14:06:52Z</dc:date>
    </item>
  </channel>
</rss>

