"Do not use Eval() outside of the main() " 中的 main 之外是什么意思?
What does it mean outside of main in "Do not use Eval() outside of the main() "?
我是 roku 开发的新手,正在考虑使用 eval,但我在 docs
中偶然发现了这个警告
Do not use Eval() outside of the main() function as it can cause unexpected bugs and crashes
不确定我是否完全理解限制,他们说 "running outside of main" 是什么意思?
每个 Roku 应用程序都有 main.brs 文件(你可以随意命名这个文件,只要它位于源文件夹下,Nas Banov 在下面的评论中指出没有 main.brs requirement) 并且在其中你将有 Main() 函数。
例如,深度链接是通过将参数传递给 Main() 函数等来实现的。这也是 Roku 的主线程(您有 Main、SceneGraph 和 Task 线程)。
那又怎样:
Do not use Eval() outside of the main() function as it can cause
unexpected bugs and crashes
其实意思是这样的:
Do not use Eval outside of main thread as it can cause unexpected bugs
and crashes
有关 SceneGraph 线程的更多信息:
https://sdkdocs.roku.com/display/sdkdoc/SceneGraph+Threads
我是 roku 开发的新手,正在考虑使用 eval,但我在 docs
中偶然发现了这个警告Do not use Eval() outside of the main() function as it can cause unexpected bugs and crashes
不确定我是否完全理解限制,他们说 "running outside of main" 是什么意思?
每个 Roku 应用程序都有 main.brs 文件(你可以随意命名这个文件,只要它位于源文件夹下,Nas Banov 在下面的评论中指出没有 main.brs requirement) 并且在其中你将有 Main() 函数。 例如,深度链接是通过将参数传递给 Main() 函数等来实现的。这也是 Roku 的主线程(您有 Main、SceneGraph 和 Task 线程)。
那又怎样:
Do not use Eval() outside of the main() function as it can cause unexpected bugs and crashes
其实意思是这样的:
Do not use Eval outside of main thread as it can cause unexpected bugs and crashes
有关 SceneGraph 线程的更多信息: https://sdkdocs.roku.com/display/sdkdoc/SceneGraph+Threads