slight improvement on the register view
still lagging, but …
This commit is contained in:
parent
add84432b4
commit
228b1b5832
@ -18,7 +18,8 @@ class BlockView
|
|||||||
def update_block
|
def update_block
|
||||||
block_name! interpreter.block.name
|
block_name! interpreter.block.name
|
||||||
codes = interpreter.block.codes.dup
|
codes = interpreter.block.codes.dup
|
||||||
codes.shift while( codes.index(interpreter.instruction) > 1 )
|
slice = codes.index(interpreter.instruction) - 1
|
||||||
|
codes.shift( slice ) if slice >= 0
|
||||||
codes.pop while(codes.length > 4)
|
codes.pop while(codes.length > 4)
|
||||||
block! codes
|
block! codes
|
||||||
end
|
end
|
||||||
|
@ -9,7 +9,6 @@ class InstructionView
|
|||||||
define_state :active => ""
|
define_state :active => ""
|
||||||
|
|
||||||
before_mount do
|
before_mount do
|
||||||
interpreter.register_event(:instruction_changed, self)
|
|
||||||
check_active interpreter.instruction
|
check_active interpreter.instruction
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -28,7 +28,8 @@ class RegisterView
|
|||||||
puts "found #{clazz}"
|
puts "found #{clazz}"
|
||||||
has_fields << clazz
|
has_fields << clazz
|
||||||
object.get_instance_variables.each do |variable|
|
object.get_instance_variables.each do |variable|
|
||||||
has_fields << object.get_instance_variable(variable).to_s
|
f = object.get_instance_variable(variable)
|
||||||
|
has_fields << f
|
||||||
end
|
end
|
||||||
fields! has_fields
|
fields! has_fields
|
||||||
end
|
end
|
||||||
@ -39,12 +40,15 @@ class RegisterView
|
|||||||
div.col_md_12 do
|
div.col_md_12 do
|
||||||
objects_id.to_s
|
objects_id.to_s
|
||||||
end
|
end
|
||||||
fields.each do |variable|
|
fields.each do |attribute|
|
||||||
div.col_md_12 do
|
div.col_md_12 do
|
||||||
variable.span
|
"#{marker(attribute)} - #{attribute.object_id}".span
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def marker var
|
||||||
|
var.class.name.split("::").last[0]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user