Use PM.logger.deprecated instead of warn all over the place.

This commit is contained in:
Mark Rickert
2013-06-06 11:38:47 -04:00
parent dccfbcfd3a
commit 7bde9ef423
3 changed files with 6 additions and 6 deletions

View File

@@ -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
end

View File

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

View File

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