[#40130] Ruby/Tk の講習会 — Hidetoshi NAGAI <nagai@...>

永井@知能.九工大です.

12 messages 2004/10/25

[ruby-list:40083] Re: Module.constantsとModule.const_get

From: HASHIMUKAI Toshikatsu <hashi@...>
Date: 2004-10-13 01:27:23 UTC
List: ruby-list #40083
  はしむかいです。

On Wed, 13 Oct 2004 09:04:18 +0900
Yukihiro Matsumoto <matz@ruby-lang.org> san wrote:
>>たぶん、どこかに見落としがあるのだと思います。実際にエラーが
>>出るプログラム全体を見せてくださいませんか。


  ザウルスの中でruby-qteを使ってます。
  Ruby は ruby 1.8.0 (2003-08-04) [arm-linux]、
	Ruby/Qte は ruby-qte_0.5.1_arm.ipk です。
	  (http://takahr.dhis.portside.net/cgi-bin/rwiki.cgi?cmd=view;name=Ruby%2FQte にあります)

----
require 'qte'
require 'qpe'
include Qte
include Qpe

class DubiousBehavior < QObject

  p self.class.ancestors      # => [Class, Module, Object, Qpe, Qte, Kernel]
	p Key_Idiaeresis            # => 207
	p Qte::Qt::Key_Idiaeresis   # => 207
	p Qte::QObject::Key_Idiaeresis
	                            # => 207
	p Qte::Qt.const_get("Key_Idiaeresis")
	                            # => 207
	p Qte::QObject.const_get("Key_Idiaeresis")
	                            # => 207
	p Module.const_get("Key_Idiaeresis")
	                            # => uninitialized constant Module.Key_Idiaeresis (NameError)

end
----

  いくらかでもリクツがわかれば、自分でruby-qte部分くらいはおっかけようか、とも
思っていたのですが、拡張ライブラリとかSWIGとか絡むので時間がかかりそう、と
ちとチューチョしております。


In This Thread