31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/glimmer-dsl-opal/ext/glimmer/dsl/engine.rb', line 31
def interpret_expression(expression, keyword, *args, &block)
work = lambda do
expression.interpret(parent, keyword, *args, &block).tap do |ui_object|
add_content(ui_object, expression, keyword, *args, &block)
dsl_stack.pop
end
end
if ['shell', 'message_box', 'dialog'].include?(keyword) && Glimmer::SWT::DisplayProxy.instance.shells.empty?
Document.ready? do
Glimmer::SWT::DisplayProxy.instance.async_exec(&work)
end
Glimmer::SWT.const_get("Latest#{keyword.camelcase(:upper)}Proxy").new
else
work.call
end
end
|