working more with id only

This commit is contained in:
Torsten Ruger 2015-08-19 00:08:28 +02:00
parent ef321dab26
commit d7e0cd665f
3 changed files with 6 additions and 5 deletions

View File

@ -14,7 +14,8 @@ module Main
container.addEventListener("mouseenter" , red)
end
def marker var
def marker id
var = Virtual.machine.objects[id]
return "Wo" if var.is_a? String
var.class.name.split("::").last[0,2]
end
@ -24,11 +25,11 @@ module Main
fields = []
if object and ! object.is_a?(String)
clazz = object.class.name.split("::").last
fields << ["#{clazz}:#{object.internal_object_length}" , 0]
fields << ["#{clazz}:#{object.object_id}" , 0]
fields << ["--------------------" , 0 ]
object.get_instance_variables.each do |variable|
f = object.get_instance_variable(variable)
fields << ["#{variable} : #{marker(f)} : #{f.object_id}" , f.object_id]
fields << ["#{variable} : #{marker(f.object_id)} : #{f.object_id}" , f.object_id]
end
end
fields

View File

@ -3,7 +3,7 @@
<:Body>
<li>
<a href="#">{{attrs.object}}</a>
<a href="#">{{marker(attrs.id)}} {{attrs.id}}</a>
{{ if(is_object?(attrs.id) ) }}
<ul>
{{content(attrs.id).each do |con3| }}

View File

@ -8,7 +8,7 @@
<ul id="nav">
<a href="#">{{reg.name}} : {{reg.value}}</a>
{{ reg.fields.each do |attribute| }}
<:objects object={{attribute}} id={{attribute.object_id}} />
<:objects id={{attribute.object_id}} />
{{end}}
</ul>
</div>