From 7bde9ef4239791c8ba690feb65a2a89e51a4eb7c Mon Sep 17 00:00:00 2001 From: Mark Rickert Date: Thu, 6 Jun 2013 11:38:47 -0400 Subject: [PATCH] Use PM.logger.deprecated instead of warn all over the place. --- lib/ProMotion/helpers/measure_helper.rb | 4 ++-- lib/ProMotion/screens/_screen_module.rb | 4 ++-- lib/ProMotion/screens/_tables/table_data.rb | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ProMotion/helpers/measure_helper.rb b/lib/ProMotion/helpers/measure_helper.rb index f77994d..77f55ca 100644 --- a/lib/ProMotion/helpers/measure_helper.rb +++ b/lib/ProMotion/helpers/measure_helper.rb @@ -2,7 +2,7 @@ module ProMotion class MeasureHelper class << self def content_height(view) - warn "[DEPRECATION] `MeasureHelper.content_height` is deprecated. Include the module `ScreenElements` to get access to this method (already included in Screen)." + PM.logger.deprecated "`MeasureHelper.content_height` is deprecated. Include the module `ScreenElements` to get access to this method (already included in Screen)." height = 0 view.subviews.each do |subview| @@ -17,4 +17,4 @@ module ProMotion end end end -end \ No newline at end of file +end diff --git a/lib/ProMotion/screens/_screen_module.rb b/lib/ProMotion/screens/_screen_module.rb index 4488646..c3fbf85 100644 --- a/lib/ProMotion/screens/_screen_module.rb +++ b/lib/ProMotion/screens/_screen_module.rb @@ -126,7 +126,7 @@ module ProMotion # [DEPRECATED] def set_view_controller(vc) - warn "[DEPRECATION] `set_view_controller` is deprecated and discontinued. Please inherit from the UIViewController you wish to use and include ProMotion::ScreenViewController instead." + PM.logger.deprecated "`set_view_controller` is deprecated and discontinued. Please inherit from the UIViewController you wish to use and include ProMotion::ScreenViewController instead." self end @@ -153,7 +153,7 @@ module ProMotion def on_disappear; end def view_controller - warn "[DEPRECATION] `view_controller` is deprecated, as screens are now UIViewController subclasses." + PM.logger.deprecated "`view_controller` is deprecated, as screens are now UIViewController subclasses." self end diff --git a/lib/ProMotion/screens/_tables/table_data.rb b/lib/ProMotion/screens/_tables/table_data.rb index f41f7e8..68d1914 100644 --- a/lib/ProMotion/screens/_tables/table_data.rb +++ b/lib/ProMotion/screens/_tables/table_data.rb @@ -119,13 +119,13 @@ module ProMotion mappings.each_pair do |n, old| if data_cell[old] - warn "[DEPRECATION] `:#{old}` is deprecated in TableScreens. Use `:#{n}`" + PM.logger.deprecated "`:#{old}` is deprecated in TableScreens. Use `:#{n}`" data_cell[n] = data_cell[old] end end if data_cell[:styles] && data_cell[:styles][:textLabel] - warn "[DEPRECATION] `:textLabel` is deprecated in TableScreens. Use `:label`" + PM.logger.deprecated "`:textLabel` is deprecated in TableScreens. Use `:label`" data_cell[:styles][:label] = data_cell[:styles][:textLabel] end