live reloading adding colors
- Dominant language
- HTML
- Stars
- 305
- Forks
- 51
- PR merge metrics
- No merged PRs in 30d
Description
I was using live reloading and wanted to add a color to the application in the code block:
``` ruby
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?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in stylesheet.rb at apply_style_to_view and reapply_styles, then trace how application_setup in ApplicationStylesheet is handled during live mode. Reproduce the reported color addition and stylesheet save; done means the named color is available after reloading without the NoMethodError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- developer-experience, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100