<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=207852&amp;view=findpost&amp;p=3744376</guid>
        <pubDate>Tue, 10 Oct 2017 13:19:15 +0000</pubDate>
        <title>Проблема с загрузкой ресурсов</title>
        <link>https://forum.sources.ru/index.php?showtopic=207852&amp;view=findpost&amp;p=3744376</link>
        <description><![CDATA[Mo.b: ;)]]></description>
        <author>Mo.b</author>
        <category>PalmOS</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=207852&amp;view=findpost&amp;p=3729861</guid>
        <pubDate>Sun, 25 Jun 2017 20:13:36 +0000</pubDate>
        <title>Проблема с загрузкой ресурсов</title>
        <link>https://forum.sources.ru/index.php?showtopic=207852&amp;view=findpost&amp;p=3729861</link>
        <description><![CDATA[Java8: :whistle:]]></description>
        <author>Java8</author>
        <category>PalmOS</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=207852&amp;view=findpost&amp;p=1742567</guid>
        <pubDate>Thu, 25 Oct 2007 21:59:37 +0000</pubDate>
        <title>Проблема с загрузкой ресурсов</title>
        <link>https://forum.sources.ru/index.php?showtopic=207852&amp;view=findpost&amp;p=1742567</link>
        <description><![CDATA[bugger: модальная форма, которая выскакивает на аларм, крутит свой мэйнлуп и не отпускает его, пока форма не будет закрыта. вы лочите мэмхэндл  потом приходит второй аларм, а залоченный хэндл лочится снова. оттого и может быть крэш.<br><br>возможные выходы:<br>1. юзать немодальную форму. при следующем аларме принудительно закрывать существующую форму<br>2. как только нужна в мэмхэндле отпадает, сразу же его разлочивать (кстати, по коду не видно, где это происходит).<br><br>также, рекомендую прогнать ситуацию на эмуляторе. там можно вычислить проблеммное место.]]></description>
        <author>bugger</author>
        <category>PalmOS</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=207852&amp;view=findpost&amp;p=1741712</guid>
        <pubDate>Thu, 25 Oct 2007 08:37:44 +0000</pubDate>
        <title>Проблема с загрузкой ресурсов</title>
        <link>https://forum.sources.ru/index.php?showtopic=207852&amp;view=findpost&amp;p=1741712</link>
        <description><![CDATA[debugx: Привет всем.<br>
Возникла проблема с загрузкой ресурсов.<br>
У меня в программе вызывается окно по событию: сработал аларм. Завожу два аларма. По срабатыванию первого аларма, окно вызывается без проблем, но если на него не отреагировать и дождаться пока сработает второй аларм и вызовется это же самое окно, то креш. С управлением окнами вроде всё в порядке. Проблема в следующем коде:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp;MemHandle &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; resH;</div><div class="code_line">&nbsp;&nbsp; &nbsp;MemHandle &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; snzStrListH;</div><div class="code_line">&nbsp;&nbsp; &nbsp;MemHandle &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; resFollowH;</div><div class="code_line">&nbsp;&nbsp; &nbsp;MemHandle &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; flwStrListH;</div><div class="code_line">&nbsp;&nbsp; &nbsp;Char &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*resP;</div><div class="code_line">&nbsp;&nbsp; &nbsp;Char* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; resFollowP;</div><div class="code_line">&nbsp;&nbsp; &nbsp;resH = DmGetResource (strListRscType, MyResStringList); </div><div class="code_line">&nbsp;&nbsp; &nbsp;resP = (Char *) MemHandleLock(resH);</div><div class="code_line">&nbsp;&nbsp; &nbsp;resP += StrLen(resP) + 1; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp;MemMove(&amp;snzListCount, resP, sizeof(UInt16));</div><div class="code_line">&nbsp;&nbsp; &nbsp;resP += sizeof(UInt16); </div><div class="code_line">&nbsp;&nbsp; &nbsp;snzStrListH = SysFormPointerArrayToStrings(resP, snzListCount);</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
далее делаю тоже самое, но для другого списка строк, хранящегося в ресурсах:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp;resFollowH = DmGetResource (strListRscType, MyEmailResStringList);</div><div class="code_line">&nbsp;&nbsp; &nbsp;resFollowP = (Char *) MemHandleLock(resFollowH);</div><div class="code_line">&nbsp;&nbsp; &nbsp;resFollowP += StrLen(resFollowP) + 1;</div><div class="code_line">&nbsp;&nbsp; &nbsp;MemMove(&amp;flwListCount, resFollowP, sizeof(UInt16));</div><div class="code_line">&nbsp;&nbsp; &nbsp;resFollowP += sizeof(UInt16);</div><div class="code_line">&nbsp;&nbsp; &nbsp;flwStrListH = SysFormPointerArrayToStrings(resFollowP, flwListCount);</div></ol></div></div></div></div><br>
<br>
Сами ресурсы представляют собой обычный набор строк:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">STRINGTABLE ID MyResStringList</div><div class="code_line">&nbsp;&quot;&quot; &quot;Name1&quot; &quot;Name2&quot; &quot;Name3&quot; &quot;Email&quot;</div></ol></div></div></div></div><br>
Что я делаю неправильно при загрузке ресурсов.<br>
Спасибо]]></description>
        <author>debugx</author>
        <category>PalmOS</category>
      </item>
	
      </channel>
      </rss>
	