Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

live reloading adding colors #271

Open
markrickert opened this issue Jun 2, 2015 · 3 comments
Open

live reloading adding colors #271

markrickert opened this issue Jun 2, 2015 · 3 comments

Comments

@markrickert
Copy link
Member

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?

@squidpunch
Copy link
Contributor

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..

@twerth
Copy link
Member

twerth commented Jun 20, 2015

Live reloading doesn't currently work with application setup stuff. Marking as enhancement.

@twerth
Copy link
Member

twerth commented Jun 20, 2015

Application setup doesn't get reloaded with live. Marking as enhancement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants