add space to left view

show integer and word values
This commit is contained in:
Torsten Ruger
2018-04-07 19:44:47 +03:00
parent 509aff9552
commit 73643e4882
3 changed files with 13 additions and 6 deletions

View File

@ -1,16 +1,17 @@
require_relative "classes_view"
class SwitchView < ListView
class LeftView < ListView
def initialize interpreter
super([ SelectView.new(interpreter) , ClassesView.new(interpreter) ])
super([ SelectView.new(interpreter) ,
ObjectView.new( Parfait.object_space , interpreter , 16),
ClassesView.new(interpreter) ])
end
def draw
super(".classes")
end
end
# opal eval seems to get the scope wrong and evals in object (not where its called)
include AST::Sexp
class SelectView < ElementView

View File

@ -59,6 +59,12 @@ class ObjectView < ListView
index += 1
end
end
if( object.is_a?(Parfait::Integer) )
fields << RefView.new( 3.to_s , object.value , @z )
end
if( object.is_a?(Parfait::Word) )
fields << RefView.new( 3.to_s , object.to_string , @z )
end
end
fields
end