从 Visual Basic 迁移到 perl - 使用用户界面

发布于 2024-08-23 09:17:46 字数 315 浏览 6 评论 0 原文

我在高中时已经接触 Visual Basic 多年,并且是伴随着 Microsoft 提供的 IDE 长大的。这太好了,但是我通过学校获得的 VB 教育版和“工作模型”版本不允许我重新分发软件,这是与 Microsoft 签订的 EULA 的一部分。

相反,我发现自己使用 Perl 为朋友和家人设计程序,而且效果相当好,但我还没有牢牢掌握构建用户界面。我知道我可以使用 tcl/tk for perl 设计用户界面,但是手动编码所有这些的概念对我来说有点令人畏惧。这引出了我的问题。

您对我可以用来为我的 Perl 程序构建 GUI 的工具有什么建议吗?

提前致谢!

I've been around Visual Basic for years in high school, and I've grown up with the IDE supplied by Microsoft. It'd wonderful, but the educational and "working-model" editions of VB available to me through school don't allow me to redistribute software, as part of the EULA with Microsoft.

I instead find myself working in perl to design programs for friends and family, and it works fairly well, but I don't have a firm grasp on building user interfaces yet. I understand I could design user-interfaces with tcl/tk for perl, but the notion of coding all of that by hand is a bit daunting to me. That brings me to my question.

Do you have any suggestions for a tool I could use that would allow me to build GUIs for my perl programs?

Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

少年亿悲伤 2024-08-30 09:17:46

除了 tsee 建议之外,您还可以看看:
Perl/Qt (使用 Qtdesigner) 和 Perl::GladeXML(使用Glade

使用 Glade 和 Qtdesigner,您可以可以生成一个 XML 文件来描述您的用户界面,这将是一个将您的 Perl 代码与小部件的事件挂钩的问题。

In addition to what tsee suggested, you can have a look at :
Perl/Qt (using Qtdesigner) and Perl::GladeXML (using Glade)

With Glade and Qtdesigner, you can generate a XML file that will describe your user interface and it will be a matter of hooking your perl code to widget's events.

万劫不复 2024-08-30 09:17:46

我认为您不会找到像 Visual Basic GUI 生成器那样简单且集成良好的 Perl 工具。一些提示:

  • wxGlade 可用于为 Wx GUI 工具包(适用于 Perl,不仅适用于 Python)。

  • 对于 Win32::GUI,您可以使用 GUI Loft 来实现类似的功能.

我认为还有很多其他 GUI 构建器,其中至少有一个用于 Tk,但我不记得名字了。

无论哪种方式,我相信您都必须接受与 VB 相比,您必须做更多的编码而不是设计。好处是,如果您使用 Tk 或 Wx,您的程序很可能可以移植到所有主要操作系统。

对于特定于 Perl 的开发环境,您可能需要查看 Padre,它本身是使用 Wx 用 Perl 编写的。它正在积极开发中,所以最终,有人可能也会集成一个 GUI 构建器。

I don't think you will find something as simple and well integrated for Perl as the Visual Basic GUI builder. A couple of pointers:

  • wxGlade can be used to design GUIs for the Wx GUI toolkit (for Perl, not only Python).

  • For Win32::GUI, you can use the GUI Loft to achieve something similar.

I think there's a bunch of other GUI builders including at least one for Tk, but I don't remember the name.

Either way, I believe you will have to accept that you have to do more coding vs. designing when compared to VB. The upside is that if you use Tk or Wx, your programs may well be portable to all major operating systems.

For a Perl-specific development environment, you might want to check out Padre, which is itself written in Perl using Wx. It's under active development, so eventually, somebody will probably integrate a GUI builder, too.

水波映月 2024-08-30 09:17:46

坦率地说,多年来我一直在思考 GUI,但从未考虑过它们,我发现使用 Perl 分发 GUI 应用程序的最佳方法是使用 Catalyst,其内置服务器,适用于 Windows 用户,与 Strawberry Perl 一起分发(专业版包含 Catalyst)。对于 Linux 或 Mac 用户,安装 local::lib 以获取所需的 cpan模块。如果您不想经历由 Internet Explorer 引起的常见 Web 开发痛苦,可以选择捆绑便携式 Firefox 的副本。

太长;博士;通过使用带有自己的独立服务器的框架进行 Web 开发,可以避免整个问题。

Frankly, having thought about GUIs for years and never getting round to them, I've found the best way to distribute GUI apps with perl is to use Catalyst, its built in server and for windows users, distributing it with Strawberry Perl (the professional edition comes with Catalyst included). For Linux or Mac users a local::lib installation to pull in the required cpan modules. Optionally bundle in a copy of portable firefox if you want not to have the usual web development pain caused by internet explorer.

tl;dr; Sidestep the whole issue by going for web development with a framework that comes with its own standalone server.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文