Skip to content
Browse files

added new enums and string extensions

  • Loading branch information...
1 parent 62e0044 commit 1b0dbb4405940a0316aa6c16e4bd5ffd4351b592 @probablycorey probablycorey committed
Showing with 26 additions and 1 deletion.
  1. +17 −1 lib/wax-scripts/enums.lua
  2. +9 −0 lib/wax-scripts/ext/string.lua
View
18 lib/wax-scripts/enums.lua
@@ -217,4 +217,20 @@ UITextFieldViewModeAlways = 3
-- UITextAutocorrectionType
UITextAutocorrectionTypeDefault = 0
UITextAutocorrectionTypeNo = 1
-UITextAutocorrectionTypeYes = 2
+UITextAutocorrectionTypeYes = 2
+
+-- UIBarStyle
+UIBarStyleDefault = 0
+UIBarStyleBlack = 1
+UIBarStyleBlackOpaque = 1 -- Deprecated. Use UIBarStyleBlack
+UIBarStyleBlackTranslucent = 2 -- Deprecated. Use UIBarStyleBlack and set the translucent property to YES
+
+
+-- NSURLRequestCachePolicy
+NSURLRequestUseProtocolCachePolicy = 0
+NSURLRequestReloadIgnoringLocalCacheData = 1
+NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4 -- Unimplemented
+NSURLRequestReloadIgnoringCacheData = NSURLRequestReloadIgnoringLocalCacheData
+NSURLRequestReturnCacheDataElseLoad = 2
+NSURLRequestReturnCacheDataDontLoad = 3
+NSURLRequestReloadRevalidatingCacheData = 5 -- Unimplemented
View
9 lib/wax-scripts/ext/string.lua
@@ -7,6 +7,15 @@ function string.unescape(url)
return url
end
+function string.split(s, sep)
+ local t = {}
+ for o in string.gmatch(s, "([^" .. (sep or " ") .. "]+)") do
+ table.insert(t, o)
+ end
+
+ return t
+end
+
function string.escape(s)
s = string.gsub(s, "([&=+%c])", function (c)
return string.format("%%%02X", string.byte(c))

0 comments on commit 1b0dbb4

Please sign in to comment.
Something went wrong with that request. Please try again.