<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Как проверить функцию на существование внутри класса?]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13923&amp;type=atom" />
	<updated>2018-07-10T01:15:33Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=13923</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как проверить функцию на существование внутри класса?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126901#p126901" />
			<content type="html"><![CDATA[<p>Еще проблема (2) возникла.<br />1) Что значит 0 в методе Call в func().Call(0, param)? Call(0 &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;<br />2) Как вызвать метод класса в методе класса?<br /></p><div class="codebox"><pre><code>
class A {

	testFunc(text) {
		MsgBox, % text
		return func(A_ThisFunc).Call(text)
	}
}
</code></pre></div><p>Код, конечно же, не работает.</p>]]></content>
			<author>
				<name><![CDATA[toopie]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39054</uri>
			</author>
			<updated>2018-07-10T01:15:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126901#p126901</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как проверить функцию на существование внутри класса?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126900#p126900" />
			<content type="html"><![CDATA[<p>я</p>]]></content>
			<author>
				<name><![CDATA[toopie]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39054</uri>
			</author>
			<updated>2018-07-10T00:39:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126900#p126900</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как проверить функцию на существование внутри класса?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126896#p126896" />
			<content type="html"><![CDATA[<p><strong>serzh82saratov</strong>, thank you <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[toopie]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39054</uri>
			</author>
			<updated>2018-07-09T20:35:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126896#p126896</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как проверить функцию на существование внутри класса?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126894#p126894" />
			<content type="html"><![CDATA[<p>Тогда идёт смещение параметров, видимо баг.<br /></p><div class="codebox"><pre><code>
class Test {
	__new(function) {   
		Func(this.__class &quot;.&quot; function).Call(0, &quot;Hello, world!&quot;) 
	}
	testFunc(txt) { 
		MsgBox % txt
	}
}
new Test(&quot;testFunc&quot;)
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2018-07-09T17:33:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126894#p126894</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как проверить функцию на существование внутри класса?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126893#p126893" />
			<content type="html"><![CDATA[<p><strong>serzh82saratov</strong>, спасибо большое<br />Но возможно ли все таки как нибудь через func это организовать?</p>]]></content>
			<author>
				<name><![CDATA[toopie]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39054</uri>
			</author>
			<updated>2018-07-09T17:10:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126893#p126893</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как проверить функцию на существование внутри класса?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126889#p126889" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>
class Test {
	__new(function) { 
		this[function](&quot;Hello, world!&quot;)
	}
	testFunc(txt) { 
		MsgBox % txt
	}
}
new Test(&quot;testFunc&quot;)
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2018-07-09T15:40:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126889#p126889</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как проверить функцию на существование внутри класса?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126887#p126887" />
			<content type="html"><![CDATA[<p>Тема с ответом.<br />http://forum.script-coding.com/viewtopic.php?id=13907</p>]]></content>
			<author>
				<name><![CDATA[MandarinKa02]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34409</uri>
			</author>
			<updated>2018-07-09T15:19:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126887#p126887</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как проверить функцию на существование внутри класса?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126885#p126885" />
			<content type="html"><![CDATA[<p><strong>serzh82saratov</strong>, в смысле да, тыща извинений.<br />Теперь новый вопрос - как вызвать этот метод класса?<br />Вот мои наброски, ну они, конечно-же, не работают.<br /></p><div class="codebox"><pre><code>
class A {
	Check(function) {
		return func(this[function]).Bind(&quot;Hello, world!&quot;).Call()
	}
	testFunc(wText) {
		MsgBox, % wText
		return true
	}
}

a := new A()
a.Check(&quot;testFunc&quot;)
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[toopie]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39054</uri>
			</author>
			<updated>2018-07-09T14:57:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126885#p126885</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как проверить функцию на существование внутри класса?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126881#p126881" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>class Test {
	__new(function) { 
		MsgBox % IsFunc(this[function])
	}
	testFunc() { 
	}
}
new Test(&quot;testFunc&quot;) 
 </code></pre></div><p>Да кто же тебя знает чё ты имеешь ввиду, если проверить надо метод класса, а не функцию. Может ты по не знанию метод называешь функцией внутри класса, хотя нет, я смотрю ты очень умный.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2018-07-09T14:13:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126881#p126881</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как проверить функцию на существование внутри класса?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126875#p126875" />
			<content type="html"><![CDATA[<p><strong>serzh82saratov</strong>, брат, прочитай название темы, брат.<br /><strong>Внутри класса</strong>, брат. <strong>Внутри</strong>, брат.<br />Понимаешь, брат? <strong>Внутри класса</strong>, не <strong>снаружи</strong>, а <strong>внутри</strong>, брат.</p>]]></content>
			<author>
				<name><![CDATA[toopie]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39054</uri>
			</author>
			<updated>2018-07-09T13:07:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126875#p126875</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как проверить функцию на существование внутри класса?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126856#p126856" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>
class Test {
	testFunc() {
	}
}
MsgBox % IsFunc(Test.testFunc)
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2018-07-09T00:50:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126856#p126856</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как проверить функцию на существование внутри класса?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126853#p126853" />
			<content type="html"><![CDATA[<p>Ладно, допустим, нашел.<br />Вот, может, кому надо.<br /></p><div class="codebox"><pre><code>
class Test {
	check(function) {
		MsgBox, % IsFunc(this.__class &quot;.&quot; function)
	}
	testFunc() {
		return true
	}
}

t := new Test()
t.check(&quot;testFunc&quot;)
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[toopie]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39054</uri>
			</author>
			<updated>2018-07-08T23:55:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126853#p126853</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Как проверить функцию на существование внутри класса?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=126852#p126852" />
			<content type="html"><![CDATA[<p>Здравствуйте, требуется узнать, существует-ли функция внутри вызываемого класса. Вот код:<br /></p><div class="codebox"><pre><code>
class Test {

	Check(function) {
		if (IsFunc(this.function)) {
			MsgBox, % &quot;Функция &quot; function &quot; существует внутри класса&quot;
		} else {
			MsgBox, % &quot;Функция &quot; function &quot; не существует внутри класса&quot;
		}
	}
	TestFunction() {
		return true
	}
}

t := new Test()
t.Check(&quot;TestFunction&quot;)
</code></pre></div><p>Но он, к сожалению, не работает. Есть ли решение?</p>]]></content>
			<author>
				<name><![CDATA[toopie]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39054</uri>
			</author>
			<updated>2018-07-08T23:44:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=126852#p126852</id>
		</entry>
</feed>
