为什么PyObjC文档如此糟糕? [英] Why is the PyObjC documentation so bad?

查看:77
本文介绍了为什么PyObjC文档如此糟糕?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如, http://developer.apple.com/cocoa/pyobjc.html 仍适用于OS X 10.4 Tiger,而不是10.5 Leopard ..那是Apple的官方文档.

PyObjC官方页面同样糟糕, http://pyobjc.sourceforge.net/

这真是太糟糕了,令人困惑..我之所以考虑学习Ruby,主要是因为RubyCocoa的资料被更好地记录了,并且有很多不错的教程(例如http://www.rubycocoa.com/),并且由于使用了Shoes GUI工具包.

甚至解决方案

我同意该教程存在缺陷,在您眼前抛出了随机的,无法解释的代码.它介绍了诸如自动释放池和用户默认值之类的概念,而没有说明您为什么要使用它们(用于内存管理的自动释放池"几乎无法解释).

那是……

基本上我要做的就是编写Cocoa应用程序而不必学习ObjC.

恐怕暂时,您需要基本的ObjC知识,以便从使用Cocoa的任何语言中受益. PyObjC,RubyCocoa,Nu和其他充其量都是利基市场,它们都是由熟悉ObjC和可可的来龙去脉的人开发的.

就目前而言,如果您切实地看到那些桥梁在脚本语言真正发扬光大方面有用,而不是尝试使用它们构建整个应用程序,那么您将受益最大.尽管完成了 (使用LimeChat,我现在正在使用RubyCocoa编写的应用程序),但这种情况很少见,并且可能会持续一段时间.

For example, http://developer.apple.com/cocoa/pyobjc.html is still for OS X 10.4 Tiger, not 10.5 Leopard.. And that's the official Apple documentation for it..

The official PyObjC page is equally bad, http://pyobjc.sourceforge.net/

It's so bad it's baffling.. I'm considering learning Ruby primarily because the RubyCocoa stuff is so much better documented, and there's lots of decent tutorials (http://www.rubycocoa.com/ for example), and because of the Shoes GUI toolkit..

Even this badly-auto-translated Japanese tutorial is more useful than the rest of the documentation I could find..

All I want to do is create fairly simple Python applications with Cocoa GUI's..
Can anyone shed light on the horrible documentation, or point me at some tutorials that don't just give you huge blocks of code and assume you know what NSThread.detachNewThreadSelector_toTarget_withObject_("queryController", self, None) does..?

解决方案

I agree that that tutorial is flawed, throwing random, unexplained code right in front of your eyes. It introduces concepts such as the autorelease pool and user defaults without explaining why you would want them ("Autorelease pool for memory management" is hardly an explanation).

That said…

basically all I want to do is write Cocoa applications without having to learn ObjC.

I'm afraid that for the time being, you will need a basic grasp of ObjC in order to benefit from any language that uses Cocoa. PyObjC, RubyCocoa, Nu and others are niches at best, and all of them were developed by people intimately familiar with the ins and outs of ObjC and Cocoa.

For now, you will benefit the most if you realistically see those bridges as useful where scripting languages truly shine, rather than trying to build a whole application with them. While this has been done (with LimeChat, I'm using a RubyCocoa-written app right now), it is rare and likely will be for a while.

这篇关于为什么PyObjC文档如此糟糕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆