<?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=403855&amp;view=findpost&amp;p=3629345</guid>
        <pubDate>Tue, 13 Oct 2015 07:01:06 +0000</pubDate>
        <title>Имя события на собственной форме наследнике от TCustomForm</title>
        <link>https://forum.sources.ru/index.php?showtopic=403855&amp;view=findpost&amp;p=3629345</link>
        <description><![CDATA[Fr0sT: Не обращай внимания, это какой-то странный полуспамер.]]></description>
        <author>Fr0sT</author>
        <category>Delphi: Разработка компонентов</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=403855&amp;view=findpost&amp;p=3628149</guid>
        <pubDate>Mon, 05 Oct 2015 11:26:48 +0000</pubDate>
        <title>Имя события на собственной форме наследнике от TCustomForm</title>
        <link>https://forum.sources.ru/index.php?showtopic=403855&amp;view=findpost&amp;p=3628149</link>
        <description><![CDATA[user89: Тоже заинтересовался...<br>
<br>
<div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=403855&view=findpost&p=3628142'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>cboss &#064; <time class="tag-quote__quoted-time" datetime="2015-10-05T11:08:29+00:00">05.10.15, 11:08</time></span><div class='quote '>Такое решение неприемлемо в КОММЕРЧЕСКОМ КОДЕ.</div></div><br>
А как правильно?]]></description>
        <author>user89</author>
        <category>Delphi: Разработка компонентов</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=403855&amp;view=findpost&amp;p=3628142</guid>
        <pubDate>Mon, 05 Oct 2015 11:08:29 +0000</pubDate>
        <title>Имя события на собственной форме наследнике от TCustomForm</title>
        <link>https://forum.sources.ru/index.php?showtopic=403855&amp;view=findpost&amp;p=3628142</link>
        <description><![CDATA[cboss: Такое решение неприемлемо в КОММЕРЧЕСКОМ КОДЕ.]]></description>
        <author>cboss</author>
        <category>Delphi: Разработка компонентов</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=403855&amp;view=findpost&amp;p=3611367</guid>
        <pubDate>Tue, 07 Jul 2015 16:39:12 +0000</pubDate>
        <title>Имя события на собственной форме наследнике от TCustomForm</title>
        <link>https://forum.sources.ru/index.php?showtopic=403855&amp;view=findpost&amp;p=3611367</link>
        <description><![CDATA[G-Host: ВСЁ&#33;&#33;&#33; Сообразил...<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">procedure Register;</div><div class="code_line">&nbsp;&nbsp;procedure RegMethodProperty(Comp: TComponentClass);</div><div class="code_line">&nbsp;&nbsp;var</div><div class="code_line">&nbsp;&nbsp; &nbsp;PropList: PPropList;</div><div class="code_line">&nbsp;&nbsp; &nbsp;i: integer;</div><div class="code_line">&nbsp;&nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;i := 0;</div><div class="code_line">&nbsp;&nbsp; &nbsp;PropList := AllocMem(SizeOf(PropList^));</div><div class="code_line">&nbsp;&nbsp; &nbsp;try</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;GetPropList(Comp.ClassInfo, [tkMethod], PropList);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;while (PropList^[i] &#60;&#62; nil) and (i &#60; High(PropList^)) do</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;RegisterPropertyEditor(PropList^[i].PropType^, Comp, &#39;&#39;, TisFormMethodProperty);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Inc(i);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp;finally</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;FreeMem(PropList);</div><div class="code_line">&nbsp;&nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;RegisterCustomModule(TMyBestForm, TCustomModule);</div><div class="code_line">&nbsp;&nbsp;RegMethodProperty(TMyBestForm);</div><div class="code_line">end;</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
<br>
Спасибо Вам, о, великий гуру, DimaBr&#33;&#33;&#33; Сделаю себе наколку с вашим именем :D  ;)]]></description>
        <author>G-Host</author>
        <category>Delphi: Разработка компонентов</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=403855&amp;view=findpost&amp;p=3611345</guid>
        <pubDate>Tue, 07 Jul 2015 14:29:06 +0000</pubDate>
        <title>Имя события на собственной форме наследнике от TCustomForm</title>
        <link>https://forum.sources.ru/index.php?showtopic=403855&amp;view=findpost&amp;p=3611345</link>
        <description><![CDATA[G-Host: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=403855&view=findpost&p=3611285'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>DimaBr &#064; <time class="tag-quote__quoted-time" datetime="2015-07-07T10:40:51+00:00">07.07.15, 10:40</time></span><div class='quote '>Переопределите GetFormMethodName и будет вам счастье</div></div><br>
Сделал... Переписал... Счастье уже близко... :D  :D  :D <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">RegisterPropertyEditor(TypeInfo(????), TMyBestForm, &#39;&#39;, TMyBestFormMethodProperty);</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">RegisterComponentEditor(TMyBestForm, TMyBestFormMethodProperty);</div></ol></div></div></div></div><br>
и тут проблема... <br>
<br>
<span class="tag-color tag-color-named" data-value="mergepost" style="color: mergepost"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2015-07-07T14:54:57+00:00">07.07.15, 14:54</time></span></span><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">RegisterPropertyEditor(TypeInfo(TNotifyEvent), TMyBestForm, &#39;&#39;, TMyBestFormMethodProperty);</div></ol></div></div></div></div><br>
а если, к примеру в форме есть другие методы (собственные)? для всех остальных, для каждого? или можно как-то общё(для всех методов сразу)?]]></description>
        <author>G-Host</author>
        <category>Delphi: Разработка компонентов</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=403855&amp;view=findpost&amp;p=3611285</guid>
        <pubDate>Tue, 07 Jul 2015 10:40:51 +0000</pubDate>
        <title>Имя события на собственной форме наследнике от TCustomForm</title>
        <link>https://forum.sources.ru/index.php?showtopic=403855&amp;view=findpost&amp;p=3611285</link>
        <description><![CDATA[DimaBr: Смотрим <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">procedure TMethodProperty.Edit;</div><div class="code_line">var</div><div class="code_line">&nbsp;&nbsp;FormMethodName: string;</div><div class="code_line">&nbsp;&nbsp;CurDesigner: IDesigner;</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;CurDesigner := Designer; { Local property so if designer is nil&#39;ed out, no AV will happen }</div><div class="code_line">&nbsp;&nbsp;if not AllNamed then</div><div class="code_line">&nbsp;&nbsp; &nbsp;raise EDesignPropertyError.CreateRes(@SCannotCreateName);</div><div class="code_line">&nbsp;&nbsp;FormMethodName := GetValue;</div><div class="code_line">&nbsp;&nbsp;if (FormMethodName = &#39;&#39;) or</div><div class="code_line">&nbsp;&nbsp; &nbsp;CurDesigner.MethodFromAncestor(GetMethodValue) then</div><div class="code_line">&nbsp;&nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;if FormMethodName = &#39;&#39; then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;FormMethodName := GetFormMethodName;</div><div class="code_line">&nbsp;&nbsp; &nbsp;if FormMethodName = &#39;&#39; then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;raise EDesignPropertyError.CreateRes(@SCannotCreateName);</div><div class="code_line">&nbsp;&nbsp; &nbsp;SetValue(FormMethodName);</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">&nbsp;&nbsp;CurDesigner.ShowMethod(FormMethodName);</div><div class="code_line">end;</div></ol></div></div></div></div><br>
и выясняем что текст берётся из FormMethodName<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">function TMethodProperty.GetFormMethodName: string;</div><div class="code_line">var</div><div class="code_line">&nbsp;&nbsp;I: Integer;</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;if GetComponent(0) = Designer.GetRoot then</div><div class="code_line">&nbsp;&nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;Result := Designer.GetRootClassName; // вот возвращается класс ФОРМЫ</div><div class="code_line">&nbsp;&nbsp; &nbsp;if (Result &#60;&#62; &#39;&#39;) and (Result[1] = &#39;T&#39;) then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;Delete(Result, 1, 1);</div><div class="code_line">&nbsp;&nbsp;end</div><div class="code_line">&nbsp;&nbsp;else</div><div class="code_line">&nbsp;&nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;Result := Designer.GetObjectName(GetComponent(0));</div><div class="code_line">&nbsp;&nbsp; &nbsp;for I := Length(Result) downto 1 do</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;if Result[I] in [&#39;.&#39;, &#39;[&#39;, &#39;]&#39;, &#39;-&#39;, &#39;&#62;&#39;] then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Delete(Result, I, 1);</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">&nbsp;&nbsp;if Result = &#39;&#39; then</div><div class="code_line">&nbsp;&nbsp; &nbsp;raise EDesignPropertyError.CreateRes(@SCannotCreateName);</div><div class="code_line">&nbsp;&nbsp;Result := Result + GetTrimmedEventName;</div><div class="code_line">end;</div></ol></div></div></div></div><br>
<br>
Переопределите GetFormMethodName и будет вам счастье]]></description>
        <author>DimaBr</author>
        <category>Delphi: Разработка компонентов</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=403855&amp;view=findpost&amp;p=3611256</guid>
        <pubDate>Tue, 07 Jul 2015 09:41:15 +0000</pubDate>
        <title>Имя события на собственной форме наследнике от TCustomForm</title>
        <link>https://forum.sources.ru/index.php?showtopic=403855&amp;view=findpost&amp;p=3611256</link>
        <description><![CDATA[G-Host: Вах&#33; похоже на этом форуме я не дождусь ответа.... :no:]]></description>
        <author>G-Host</author>
        <category>Delphi: Разработка компонентов</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=403855&amp;view=findpost&amp;p=3610969</guid>
        <pubDate>Mon, 06 Jul 2015 11:14:04 +0000</pubDate>
        <title>Имя события на собственной форме наследнике от TCustomForm</title>
        <link>https://forum.sources.ru/index.php?showtopic=403855&amp;view=findpost&amp;p=3610969</link>
        <description><![CDATA[G-Host: Собратья&#33; Требуется помощь знатока.<br>
<br>
Вот к примеру создал я TMyBestForm наследника от TCustomForm, зарегистрировал честь по чести, всё ОК&#33;<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">type </div><div class="code_line">&nbsp;&nbsp;TMyBestForm1 = class(TMyBestForm)</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">...</div></ol></div></div></div></div><br>
И вот в наследнике я назначаю метод OnCreate, и он прописывается так:<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">...</div><div class="code_line">procedure TMyBestForm1.MyBestFormCreate(Sender: TObject);</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;inherited;</div><div class="code_line">&nbsp;</div><div class="code_line">end;</div></ol></div></div></div></div><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">...</div><div class="code_line">procedure TMyBestForm1.FormCreate(Sender: TObject);</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;inherited;</div><div class="code_line">&nbsp;</div><div class="code_line">end;</div></ol></div></div></div></div><br>
<br>
Кто знает?&#33;&#33; - подскажите, как это реализовать...<br>
<br>
 <br>
Премного благодарен&#33; :rolleyes:]]></description>
        <author>G-Host</author>
        <category>Delphi: Разработка компонентов</category>
      </item>
	
      </channel>
      </rss>
	