rmq
rmq copied to clipboard
live reloading adding colors
I was using live reloading and wanted to add a color to the application in the code block:
class ApplicationStylesheet < RubyMotionQuery::Stylesheet
def application_setup
color.add_named :warning, '#E32935'
end
end
I added the color, saved the file, and then went to use it in a stylesheet (all while still in live
mode).
Got this error when saving:
=> "Live reloading of RMQ stylesheets is now on."
(main)> 2015-06-01 21:17:20.137 Ribos Dev[29713:8246577] stylesheet.rb:190:in `apply_style_to_view:': undefined method `warning' for RubyMotionQuery::Color:Class (NoMethodError)
from stylesheet.rb:100:in `block in reapply_styles'
from stylesheet.rb:99:in `reapply_styles'
2015-06-01 21:17:20.165 Ribos Dev[29713:8246577] *** Terminating app due to uncaught exception 'NoMethodError', reason: 'stylesheet.rb:190:in `apply_style_to_view:': undefined method `warning' for RubyMotionQuery::Color:Class (NoMethodError)
from stylesheet.rb:100:in `block in reapply_styles'
from stylesheet.rb:99:in `reapply_styles'
Is the application setup part of the application stylesheet not reloaded when in live
mode?
that would make sense, application setup is configured to specifically only run once. I wonder if we need to wire that up to fire again in the live stylesheets or something..
Live reloading doesn't currently work with application setup stuff. Marking as enhancement.
Application setup doesn't get reloaded with live. Marking as enhancement.