minor fixes
This commit is contained in:
@ -10,12 +10,12 @@ module Virtual
|
||||
def keep object
|
||||
return if object.nil?
|
||||
return unless Machine.instance.add_object object
|
||||
# puts "adding #{object.class}"
|
||||
#puts "adding #{object.class}"
|
||||
unless object.has_layout?
|
||||
object.init_layout
|
||||
end
|
||||
layout = object.get_layout
|
||||
puts "Layout #{layout.get_object_class.name} #{Machine.instance.objects.include?(layout)}"
|
||||
#puts "Layout #{layout.get_object_class.name} #{Machine.instance.objects.include?(layout)}"
|
||||
keep layout
|
||||
layout.each do |name|
|
||||
inst = object.instance_variable_get "@#{name}".to_sym
|
||||
|
@ -24,7 +24,7 @@ module Virtual
|
||||
elsif( me.is_a? Parfait::Object )
|
||||
# get the function from my class. easy peasy
|
||||
puts "Me is #{me.class}"
|
||||
method = me.get_class.get_instance_method(Virtual.new_word code.name)
|
||||
method = me.get_class.get_instance_method(code.name)
|
||||
raise "Method not implemented #{me.class}.#{code.name}" unless method
|
||||
new_codes << MethodCall.new( method )
|
||||
else
|
||||
@ -39,7 +39,7 @@ module Virtual
|
||||
if ref.type.is_a?(Reference) and ref.type.of_class
|
||||
#find method and call
|
||||
clazz = ref.type.of_class
|
||||
method = clazz.resolve_method Virtual.new_word(code.name)
|
||||
method = clazz.resolve_method code.name
|
||||
raise "No method found #{code.name}" unless method
|
||||
new_codes << MethodCall.new( method )
|
||||
else
|
||||
|
Reference in New Issue
Block a user