rhodes 3.3.3.beta.1 → 3.3.3.beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. data/CHANGELOG +3 -0
  2. data/Manifest.txt +23 -9
  3. data/Rakefile +13 -2
  4. data/doc/build.txt +18 -11
  5. data/doc/device-caps.txt +4 -68
  6. data/doc/rhom.txt +33 -0
  7. data/doc/test-log-debug.txt +18 -42
  8. data/lib/framework/rho/render.rb +1 -1
  9. data/lib/framework/rho/rho.rb +31 -1
  10. data/lib/framework/rho/rhocontroller.rb +2 -2
  11. data/lib/framework/rhodes.rb +1 -1
  12. data/lib/framework/rhoframework.rb +4 -0
  13. data/lib/framework/rholang/localization_simplified.rb +1 -1
  14. data/lib/framework/rhom/rhom_object_factory.rb +22 -1
  15. data/lib/framework/version.rb +1 -1
  16. data/lib/rhodes.rb +1 -1
  17. data/platform/android/Rhodes/AndroidManifest.xml +2 -2
  18. data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_RhodesService.h +25 -9
  19. data/platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_extmanager_RhoExtManagerImpl.h +21 -0
  20. data/platform/android/Rhodes/jni/src/extmanager.cpp +36 -0
  21. data/platform/android/Rhodes/jni/src/nativeview.cpp +1 -1
  22. data/platform/android/Rhodes/jni/src/rhodesapp.cpp +14 -5
  23. data/platform/android/Rhodes/jni/src/rhodessystem.cpp +5 -0
  24. data/platform/android/Rhodes/jni/src/signature.cpp +29 -3
  25. data/platform/android/Rhodes/src/com/rhomobile/rhodes/NativeBar.java +3 -3
  26. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +4 -0
  27. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +42 -7
  28. data/platform/android/Rhodes/src/com/rhomobile/rhodes/WebView.java +61 -10
  29. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtData.java +6 -0
  30. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtManager.java +39 -0
  31. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtension.java +18 -0
  32. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtDataImpl.java +18 -0
  33. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtManagerImpl.java +142 -0
  34. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtManagerSingleton.java +15 -0
  35. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/MainView.java +6 -3
  36. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +25 -13
  37. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SplashScreen.java +15 -9
  38. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/TabbedMainView.java +15 -5
  39. data/platform/android/Rhodes/src/com/rhomobile/rhodes/nativeview/RhoNativeViewManager.java +3 -3
  40. data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/ImageCapture.java +14 -8
  41. data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/Signature.java +218 -51
  42. data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/SignatureProperties.java +94 -0
  43. data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/SignatureView.java +122 -37
  44. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/GoogleWebView.java +6 -2
  45. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/{WebView.java → IRhoWebView.java} +2 -1
  46. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebViewClient.java +4 -0
  47. data/platform/android/build/RhodesSRC_build.files +8 -1
  48. data/platform/android/build/android.rake +5 -1
  49. data/platform/android/build/librhodes_build.files +1 -0
  50. data/platform/bb/RubyVM/src/com/rho/RhodesApp.java +22 -1
  51. data/platform/bb/RubyVM/src/com/rho/sync/SyncSource.java +15 -0
  52. data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RhoSupport.java +4 -0
  53. data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyRuntime.java +4 -2
  54. data/platform/bb/build/rhodes_build.files +2 -0
  55. data/platform/bb/rhodes/src/com/rho/RhoRubyHelper.java +1 -1
  56. data/platform/bb/rhodes/src/com/rho/rubyext/PNGEncoder.java +613 -0
  57. data/platform/bb/rhodes/src/com/rho/rubyext/SignatureCapture.java +314 -0
  58. data/platform/bb/rhodes/src/com/rho/rubyext/WebView.java +1 -1
  59. data/platform/iphone/Classes/AppManager/AppManager.m +11 -0
  60. data/platform/iphone/Classes/Rhodes.m +1 -1
  61. data/platform/iphone/Classes/Signature/SignatureDelegate.h +5 -1
  62. data/platform/iphone/Classes/Signature/SignatureDelegate.m +186 -5
  63. data/platform/iphone/Classes/Signature/SignatureView.h +12 -0
  64. data/platform/iphone/Classes/Signature/SignatureView.m +11 -3
  65. data/platform/iphone/Classes/SimpleMainView.m +4 -0
  66. data/platform/iphone/Classes/rho/net/NetRequestImpl.m +98 -3
  67. data/platform/iphone/Info.plist +1 -1
  68. data/platform/iphone/rbuild/iphone.rake +18 -5
  69. data/platform/shared/RhoConnectClient/RhoConnectClient.cpp +1 -1
  70. data/platform/shared/common/ExtManager.h +64 -9
  71. data/platform/shared/common/RhoSimConf.h +1 -0
  72. data/platform/shared/common/RhodesApp.cpp +77 -28
  73. data/platform/shared/common/RhodesApp.h +9 -4
  74. data/platform/shared/common/RhodesAppBase.cpp +4 -3
  75. data/platform/shared/common/RhodesAppBase.h +5 -3
  76. data/platform/shared/net/HttpServer.cpp +4 -4
  77. data/platform/shared/net/HttpServer.h +2 -2
  78. data/platform/shared/qt/rhodes/impl/MainWindowImpl.cpp +1 -1
  79. data/platform/shared/qt/rhodes/main.cpp +1 -1
  80. data/platform/shared/ruby/ext/rho/rhoruby.c +12 -2
  81. data/platform/shared/ruby/ext/rho/rhosupport.c +11 -1
  82. data/platform/shared/ruby/thread_win32.c +2 -1
  83. data/platform/shared/rubyext/System.cpp +6 -0
  84. data/platform/shared/sync/SyncSource.cpp +15 -0
  85. data/platform/wm/RhoLib/RhoLib.vcproj +0 -4
  86. data/platform/wm/build/build_inf.js +34 -4
  87. data/platform/wm/build/wm.rake +75 -25
  88. data/platform/wm/rhodes/AppManager.cpp +14 -3
  89. data/platform/wm/rhodes/IBrowserEngine.h +7 -0
  90. data/platform/wm/rhodes/IEBrowserEngine.cpp +43 -0
  91. data/platform/wm/rhodes/IEBrowserEngine.h +7 -0
  92. data/platform/wm/rhodes/LogOptionsDlg.cpp +1 -1
  93. data/platform/wm/rhodes/MainWindow.cpp +92 -7
  94. data/platform/wm/rhodes/MainWindow.h +28 -1
  95. data/platform/wm/rhodes/MapView/MapViewManager.cpp +4 -4
  96. data/platform/wm/rhodes/Rhodes.cpp +149 -10
  97. data/platform/wm/rhodes/resource.h +5 -1
  98. data/platform/wm/rhodes/rho/common/ExtManager.cpp +307 -0
  99. data/platform/wm/rhodes/rho/rubyext/NativeToolbar.cpp +1 -1
  100. data/platform/wm/rhodes/rho/rubyext/RhoSignature.cpp +1 -1
  101. data/platform/wm/rhodes/rho/rubyext/RhoSignature.h +1 -1
  102. data/platform/wm/rhodes/rho/rubyext/SystemImpl.cpp +14 -2
  103. data/platform/wm/rhodes/rho/rubyext/WebView.cpp +6 -3
  104. data/platform/wm/rhodes/rhodes.vcproj +5 -1
  105. data/platform/wm/rhodes/simulator/MainWindowQt.cpp +22 -1
  106. data/platform/wm/rhodes/simulator/MainWindowQt.h +4 -0
  107. data/platform/wp7/RhoRubyExtGen/RhoWebView.cs +1 -1
  108. data/platform/wp7/RhoRubyLib/Initializers.Generated.cs +1 -1
  109. data/platform/wp7/RhoRubyLib/common/RhodesApp.cs +33 -38
  110. data/platform/wp7/RhoRubyLib/net/HttpServer.cs +134 -29
  111. data/platform/wp7/RhoRubyLib/rubyext/RhoWebView.cs +12 -2
  112. data/platform/wp7/RhoRubyLib/sync/SyncSource.cs +17 -1
  113. data/platform/wp7/RhoRubyLib/views/RhoTabHeader.xaml +3 -3
  114. data/platform/wp7/RhoRubyLib/views/RhoView.xaml.cs +48 -8
  115. data/rakefile.rb +13 -2
  116. data/res/build-tools/iphonesim/build/Release/iphonesim_43 +0 -0
  117. data/res/build-tools/iphonesim/iphonesim.xcodeproj/project.pbxproj +158 -0
  118. data/res/generators/rhogen.rb +33 -28
  119. data/res/generators/templates/application/app/layout.erb +6 -5
  120. data/res/generators/templates/application/public/css/android.css +21 -315
  121. data/res/generators/templates/application/public/css/iphone.css +1 -499
  122. data/res/generators/templates/application/public/css/jqmobile-patch.css +18 -5
  123. data/res/generators/templates/application/public/css/windows_phone7.css +378 -0
  124. data/res/generators/templates/application/public/jqmobile/images/icons-18-black.png +0 -0
  125. data/res/generators/templates/application/public/jqmobile/images/icons-36-black.png +0 -0
  126. data/res/generators/templates/application/public/jqmobile/{jquery.mobile-1.0.css → jquery.mobile-1.0.1.css} +33 -11
  127. data/res/generators/templates/application/public/jqmobile/{jquery.mobile-1.0.js → jquery.mobile-1.0.1.js} +249 -125
  128. data/res/generators/templates/application/public/jqmobile/jquery.mobile-1.0.1.min.css +2 -0
  129. data/res/generators/templates/application/public/jqmobile/jquery.mobile-1.0.1.min.js +177 -0
  130. data/res/generators/templates/application/public/jqmobile/{jquery.mobile.structure-1.0.css → jquery.mobile.structure-1.0.1.css} +33 -11
  131. data/res/generators/templates/application/public/jqmobile/jquery.mobile.structure-1.0.1.min.css +2 -0
  132. data/res/generators/templates/application/public/jquery/jquery.json-2.3.js +193 -0
  133. data/res/generators/templates/application/public/jquery/jquery.json-2.3.min.js +23 -0
  134. data/res/generators/templates/application/public/js/jquery-wp7-patch.js +68 -20
  135. data/spec/phone_spec/app/Case/case.rb +22 -0
  136. data/spec/phone_spec/app/Customer/customer.rb +16 -0
  137. data/spec/phone_spec/app/spec/rhom_object_spec.rb +108 -11
  138. data/spec/phone_spec/app/spec/syncengine_spec.rb +43 -1
  139. data/spec/phone_spec/build.yml +2 -1
  140. data/version +1 -1
  141. metadata +27 -13
  142. data/platform/shared/common/ExtManager.cpp +0 -103
  143. data/res/generators/templates/application/public/jqmobile/jquery-mobile-iphone.css +0 -9
  144. data/res/generators/templates/application/public/jqmobile/jquery.mobile-1.0.min.css +0 -2
  145. data/res/generators/templates/application/public/jqmobile/jquery.mobile-1.0.min.js +0 -172
  146. data/res/generators/templates/application/public/jqmobile/jquery.mobile.structure-1.0.min.css +0 -2
data/CHANGELOG CHANGED
@@ -1,4 +1,7 @@
1
1
  ## 3.3.3
2
+ * Support freezed models (FixedSchema and PropertyBag)
3
+ * Detect available network types
4
+ * iPhone: support Xcode 4.3
2
5
  * Fix Windows Mobile issues
3
6
 
4
7
  ## 3.3.2
data/Manifest.txt CHANGED
@@ -978,6 +978,7 @@ platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_alert_PopupA
978
978
  platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_bluetooth_RhoBluetoothManager.h
979
979
  platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_camera_Camera.h
980
980
  platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_datetime_DateTimePicker.h
981
+ platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_extmanager_RhoExtManagerImpl.h
981
982
  platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_file_RhoFileApi.h
982
983
  platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_geolocation_GeoLocationImpl.h
983
984
  platform/android/Rhodes/jni/include/rhodes/jni/com_rhomobile_rhodes_Logger.h
@@ -1006,6 +1007,7 @@ platform/android/Rhodes/jni/src/callbacks.cpp
1006
1007
  platform/android/Rhodes/jni/src/camera.cpp
1007
1008
  platform/android/Rhodes/jni/src/datetimepicker.cpp
1008
1009
  platform/android/Rhodes/jni/src/event.cpp
1010
+ platform/android/Rhodes/jni/src/extmanager.cpp
1009
1011
  platform/android/Rhodes/jni/src/fileapi.cpp
1010
1012
  platform/android/Rhodes/jni/src/geolocation.cpp
1011
1013
  platform/android/Rhodes/jni/src/JNIRhoRuby.cpp
@@ -1104,6 +1106,12 @@ platform/android/Rhodes/src/com/rhomobile/rhodes/datetime/DateTimePicker.java
1104
1106
  platform/android/Rhodes/src/com/rhomobile/rhodes/datetime/DateTimePickerScreen.java
1105
1107
  platform/android/Rhodes/src/com/rhomobile/rhodes/event/Event.java
1106
1108
  platform/android/Rhodes/src/com/rhomobile/rhodes/event/EventStore.java
1109
+ platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtData.java
1110
+ platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtension.java
1111
+ platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtManager.java
1112
+ platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtDataImpl.java
1113
+ platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtManagerImpl.java
1114
+ platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtManagerSingleton.java
1107
1115
  platform/android/Rhodes/src/com/rhomobile/rhodes/file/RhoFileApi.java
1108
1116
  platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocation.java
1109
1117
  platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocationImpl.java
@@ -1163,6 +1171,7 @@ platform/android/Rhodes/src/com/rhomobile/rhodes/RhoMenu.java
1163
1171
  platform/android/Rhodes/src/com/rhomobile/rhodes/RingtoneManager.java
1164
1172
  platform/android/Rhodes/src/com/rhomobile/rhodes/signature/ImageCapture.java
1165
1173
  platform/android/Rhodes/src/com/rhomobile/rhodes/signature/Signature.java
1174
+ platform/android/Rhodes/src/com/rhomobile/rhodes/signature/SignatureProperties.java
1166
1175
  platform/android/Rhodes/src/com/rhomobile/rhodes/signature/SignatureView.java
1167
1176
  platform/android/Rhodes/src/com/rhomobile/rhodes/socket/RhoSockAddr.java
1168
1177
  platform/android/Rhodes/src/com/rhomobile/rhodes/socket/RhoSocket.java
@@ -1185,11 +1194,11 @@ platform/android/Rhodes/src/com/rhomobile/rhodes/util/Utils.java
1185
1194
  platform/android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientNew.java
1186
1195
  platform/android/Rhodes/src/com/rhomobile/rhodes/webview/ChromeClientOld.java
1187
1196
  platform/android/Rhodes/src/com/rhomobile/rhodes/webview/GoogleWebView.java
1197
+ platform/android/Rhodes/src/com/rhomobile/rhodes/webview/IRhoWebView.java
1188
1198
  platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettings.java
1189
1199
  platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettingsNew.java
1190
1200
  platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebSettingsOld.java
1191
1201
  platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebViewClient.java
1192
- platform/android/Rhodes/src/com/rhomobile/rhodes/webview/WebView.java
1193
1202
  platform/android/Rhodes/src/com/rhomobile/rhodes/WebView.java
1194
1203
  platform/bb/build/bb.rake
1195
1204
  platform/bb/build/hsqldb_build.files
@@ -1393,8 +1402,10 @@ platform/bb/rhodes/src/com/rho/RhoMainScreen.java
1393
1402
  platform/bb/rhodes/src/com/rho/RhoRubyHelper.java
1394
1403
  platform/bb/rhodes/src/com/rho/rubyext/Alert.java
1395
1404
  platform/bb/rhodes/src/com/rho/rubyext/GeoLocation.java
1405
+ platform/bb/rhodes/src/com/rho/rubyext/PNGEncoder.java
1396
1406
  platform/bb/rhodes/src/com/rho/rubyext/RhoCalendar.java
1397
1407
  platform/bb/rhodes/src/com/rho/rubyext/RhoPhonebook.java
1408
+ platform/bb/rhodes/src/com/rho/rubyext/SignatureCapture.java
1398
1409
  platform/bb/rhodes/src/com/rho/rubyext/System.java
1399
1410
  platform/bb/rhodes/src/com/rho/rubyext/WebView.java
1400
1411
  platform/bb/rhodes/src/com/rho/rubyext/XMLParser.java
@@ -2117,7 +2128,6 @@ platform/shared/common/AppMenu.h
2117
2128
  platform/shared/common/AutoPointer.h
2118
2129
  platform/shared/common/BundleManager.cpp
2119
2130
  platform/shared/common/emml.h
2120
- platform/shared/common/ExtManager.cpp
2121
2131
  platform/shared/common/ExtManager.h
2122
2132
  platform/shared/common/InputStream.h
2123
2133
  platform/shared/common/iphone/RhoClassFactory.cpp
@@ -4375,6 +4385,7 @@ platform/wm/rhodes/phonebook/phonebook.cpp
4375
4385
  platform/wm/rhodes/phonebook/phonebook.h
4376
4386
  platform/wm/rhodes/resource.h
4377
4387
  platform/wm/rhodes/resources/icon.ico
4388
+ platform/wm/rhodes/rho/common/ExtManager.cpp
4378
4389
  platform/wm/rhodes/rho/common/RhoClassFactory.cpp
4379
4390
  platform/wm/rhodes/rho/common/RhoClassFactory.h
4380
4391
  platform/wm/rhodes/rho/common/RhoCryptImpl.cpp
@@ -4655,6 +4666,7 @@ res/build-tools/cygz.dll
4655
4666
  res/build-tools/detool.exe
4656
4667
  res/build-tools/insertRhoBundle2pkg.rb
4657
4668
  res/build-tools/iphonesim/build/Release/iphonesim
4669
+ res/build-tools/iphonesim/build/Release/iphonesim_43
4658
4670
  res/build-tools/iphonesim/iphonesim.xcodeproj/project.pbxproj
4659
4671
  res/build-tools/iphonesim/iphonesim_Prefix.pch
4660
4672
  res/build-tools/iphonesim/iPhoneSimulatorRemoteClient/iPhoneSimulatorRemoteClient.h
@@ -4720,6 +4732,7 @@ res/generators/templates/application/public/css/blackberry.css
4720
4732
  res/generators/templates/application/public/css/iphone.css
4721
4733
  res/generators/templates/application/public/css/jqmobile-patch.css
4722
4734
  res/generators/templates/application/public/css/windows_mobile.css
4735
+ res/generators/templates/application/public/css/windows_phone7.css
4723
4736
  res/generators/templates/application/public/images/android/btn_check_off.png
4724
4737
  res/generators/templates/application/public/images/android/btn_check_on.png
4725
4738
  res/generators/templates/application/public/images/android/btn_radio_off.png
@@ -4774,15 +4787,16 @@ res/generators/templates/application/public/jqmobile/images/icons-18-black.png
4774
4787
  res/generators/templates/application/public/jqmobile/images/icons-18-white.png
4775
4788
  res/generators/templates/application/public/jqmobile/images/icons-36-black.png
4776
4789
  res/generators/templates/application/public/jqmobile/images/icons-36-white.png
4777
- res/generators/templates/application/public/jqmobile/jquery-mobile-iphone.css
4778
- res/generators/templates/application/public/jqmobile/jquery.mobile-1.0.css
4779
- res/generators/templates/application/public/jqmobile/jquery.mobile-1.0.js
4780
- res/generators/templates/application/public/jqmobile/jquery.mobile-1.0.min.css
4781
- res/generators/templates/application/public/jqmobile/jquery.mobile-1.0.min.js
4782
- res/generators/templates/application/public/jqmobile/jquery.mobile.structure-1.0.css
4783
- res/generators/templates/application/public/jqmobile/jquery.mobile.structure-1.0.min.css
4790
+ res/generators/templates/application/public/jqmobile/jquery.mobile-1.0.1.css
4791
+ res/generators/templates/application/public/jqmobile/jquery.mobile-1.0.1.js
4792
+ res/generators/templates/application/public/jqmobile/jquery.mobile-1.0.1.min.css
4793
+ res/generators/templates/application/public/jqmobile/jquery.mobile-1.0.1.min.js
4794
+ res/generators/templates/application/public/jqmobile/jquery.mobile.structure-1.0.1.css
4795
+ res/generators/templates/application/public/jqmobile/jquery.mobile.structure-1.0.1.min.css
4784
4796
  res/generators/templates/application/public/jquery/jquery-1.6.4.js
4785
4797
  res/generators/templates/application/public/jquery/jquery-1.6.4.min.js
4798
+ res/generators/templates/application/public/jquery/jquery.json-2.3.js
4799
+ res/generators/templates/application/public/jquery/jquery.json-2.3.min.js
4786
4800
  res/generators/templates/application/public/js/application.js
4787
4801
  res/generators/templates/application/public/js/jqmobile-patch.js
4788
4802
  res/generators/templates/application/public/js/jquery-wp7-patch.js
data/Rakefile CHANGED
@@ -263,6 +263,8 @@ namespace "config" do
263
263
  $app_config[$config["platform"]]["capabilities"] and $app_config[$config["platform"]]["capabilities"].is_a? Array
264
264
  $app_config["capabilities"] = capabilities
265
265
 
266
+ application_build_configs = {}
267
+
266
268
  #Process motorola extensions
267
269
  if capabilities.index("motorola")
268
270
  $app_config["capabilities"] += ["webkit_browser"] if $app_config["extensions"].index("webkit-browser")
@@ -272,6 +274,17 @@ namespace "config" do
272
274
  $app_config["extensions"][idx_barcode] = "barcode-moto" if idx_barcode
273
275
 
274
276
  $app_config["capabilities"] += ["barcode"] if $app_config["extensions"].index("barcode-moto")
277
+
278
+ #check for RE2 plugins
279
+ plugins = ""
280
+ $app_config["extensions"].each do |ext|
281
+ if ( ext.start_with?('moto-') )
282
+ plugins += ',' if plugins.length() > 0
283
+ plugins += ext[5, ext.length()-5]
284
+ end
285
+ end
286
+
287
+ application_build_configs['moto-plugins'] = plugins if plugins.length() > 0
275
288
  end
276
289
 
277
290
  puts "$app_config['extensions'] : #{$app_config['extensions'].inspect}"
@@ -279,9 +292,7 @@ namespace "config" do
279
292
 
280
293
  $hidden_app = $app_config["hidden_app"].nil?() ? "0" : $app_config["hidden_app"]
281
294
 
282
-
283
295
  #application build configs
284
- application_build_configs = {}
285
296
 
286
297
  $application_build_configs_keys.each do |key|
287
298
  value = $app_config[key]
data/doc/build.txt CHANGED
@@ -73,13 +73,18 @@ To build for iPhone/iPad using you will need the following software installed:
73
73
 
74
74
  * Mac OS X 10.6 or greater.
75
75
  * Follow [All Platforms Prerequisites](#all-platforms-prerequisites).
76
- * iPhone SDK. We recommend the latest stable version available from the [iPhone Dev Center](http://developer.apple.com/iphone/index.action).
76
+ * XCode 4.2 or greater
77
+ * XCode Command Line Tools (already included in versions of XCode before 4.3) should be installed manually from XCode 4.3 - see Note below.
78
+ * iPhone SDK. We recommend installing the latest XCode with the latest iOS SDK (the latest XCode is already included with the iOS SDK). The latest stable version is available from the [iPhone Dev Center](http://developer.apple.com/iphone/index.action).
79
+
80
+ ** NOTE: In XCode 4.3, command line tools are not included in the installation. You should install the command line tools from XCode by using the Components tab of the Downloads preferences panel. See [New Features in Xcode 4.3](https://developer.apple.com/library/ios/#documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_4_3.html) **
77
81
 
78
82
  ### Building and Running Your iOS Application with RhoStudio
79
83
 
80
- To start the build process, create a Run Configuration: select your project in the Project Explorer, and either:
81
- * select Run->Run Configurations... from the main menu,
82
- * or right-click on your project, and select Run As->Run Configurations from the popup menu.
84
+ To start the build process, create a Run Configuration: select your project in the Project Explorer, and do one of the following actions.
85
+
86
+ * Select Run->Run Configurations... from the main menu,
87
+ * Or right-click on your project, and select Run As->Run Configurations from the popup menu.
83
88
 
84
89
  <img src="http://rhodocs.s3.amazonaws.com/build-rhodes-app/run-configurations-menu.png"/>
85
90
 
@@ -137,15 +142,17 @@ You can edit your Rhodes code for your Rhodes application in a text editor, save
137
142
 
138
143
  The resulting application package (*.app) is located in your Rhodes source code folder under /platform/iphone/build/, in a folder named like [Debug/Release]-[iphoneos/iphonesimulator]/rhorunner.app.
139
144
 
140
- ### Building and run on old devices (before iPhone4/iPad)
145
+ ### Building and Run on devices before iPhone4 and iPad
146
+
147
+ From XCode 4.2 on, Apple removed default support of the armv6 architecture. In this case there are two issues.
148
+
149
+ Your distribution build should include code for both armv6 and armv7. The XCode projects included with Rhodes and used for build Rhodes-based application for iOS are already fixed for this.
141
150
 
142
- From the XCode 4.2 Apple was removed default support of armv6 architecture. In this case there are two issues:
151
+ If you want to build/run/debug your application on devices before iPhone4/iPad (for example, on iPhone 3G), you should manually path all your native extension xcode projects used in your application for Architecture settings. In your project, under Build Settings -> Architectures, click the Debug or Release row (depending on if you are debugging or releasing), and choose "Other". In the pop-up box, modify as follows.
143
152
 
144
- * Distributution build should include code for armv6 and armv7 both. Our projects already fixed for this.
145
- * If you want build/run/debug your application on devices before iPhone/iPad (for example on iPhone 3G), you should manually path all your (our already fixed) native extension xcode projects used in your application for Architecture settings:
146
- in each project modify [Build Settings]-[Architectures]-[Debug]/[Release]:
147
- remove $(ARCHS_STANDARD_32_BIT)
148
- add two architectures manually: "armv7" and "armv6"
153
+ * Remove `$(ARCHS_STANDARD_32_BIT)` and replace by typing `armv6`.
154
+ * Use the plus button to add a new row. Type `armv7`.
155
+ * Click Done.
149
156
 
150
157
  ### Building and Releasing on App Store
151
158
 
data/doc/device-caps.txt CHANGED
@@ -55,6 +55,8 @@ Properties:
55
55
  * ppi_x - horizontal PPI (Pixels Per Inch)
56
56
  * ppi_y - vertical PPI (Pixels Per Inch)
57
57
  * has_network - is device connected to the network
58
+ * has_cell_network - is device connected to the cell network
59
+ * has_wifi_network - is device connected to the wifi network
58
60
  * phone_number - device phone number
59
61
  * device_owner_email - primary email of phone owner (works only on Android)
60
62
  * device_owner_device_owner_name - name(account name) of phone owner (works only on Android)
@@ -247,6 +249,8 @@ Set callback to track location changes.
247
249
  * ping_gpssystem_timeout - optional, if 0 system timeout used, use to redefine timeout in sec for gps system reading
248
250
  * callback params: known_position, latitude, longitude, available, status('error', 'ok'), error_code(from RhoError), accuracy(horizontal radius in meters; iOS and Android)
249
251
 
252
+ **NOTE: You should call GeoLocation.set_notification only once. The current behavior of the callback is that it will be called forever until it is stopped; you need to call `GeoLocation.turnoff` to stop it. The previous behavior was that the callback was called once and needed to be reset.**
253
+
250
254
  Also there are two parameters you can set in rhoconfig.txt:
251
255
 
252
256
  Geo location update period (in seconds). Used as the default value for the third parameter (ping_gpssystem_timeout) of GeoLocation.set_notification method. This value is passed to OS API and behaviour and is OS dependent (it should be used by system as a tip on how often to call notification back). Ignored on iOS.
@@ -257,7 +261,6 @@ Geo location inactivity timeout (in seconds). This parameter controls the time a
257
261
 
258
262
  geo_location_inactivity_timeout = gps_ping_timeout_sec * 10
259
263
 
260
-
261
264
  Turn off GeoLocation.
262
265
 
263
266
  :::ruby
@@ -265,8 +268,6 @@ Turn off GeoLocation.
265
268
 
266
269
  **NOTE: GeoLocation.turnoff - after GPS is switched off, you might still receive a few callbacks (this depends on the platform; iOS does not receive callbacks after turnoff).**
267
270
 
268
- **NOTE: The current behavior of the geolocation callback is that it will be called forever until it is stopped; you need to call `GeoLocation.turnoff` to stop it. Previous behavior was that the callback was called once and needed to be reset.**
269
-
270
271
  Get the distance between two points in miles.
271
272
  :::ruby
272
273
  GeoLocation.haversine_distance(
@@ -697,71 +698,6 @@ In callback are these parameters.
697
698
  ### Sample
698
699
  See controller and view in the /app/BarcodeRecognizer folder of the [System API Samples application](http://github.com/rhomobile/rhodes-system-api-samples/tree/master/app/BarcodeRecognizer/controller.rb) for more information.
699
700
 
700
- ## Barcode for Motorola devices
701
- Rhodes 3.3 and RhoElements 2.0 support Motorola barcode scanner devices. Install RhoElements gem or RhoStudio and start developing for Motorola Windows Mobile, Windows CE and Android(ET1) devices .
702
-
703
- To enable add to build.yml:
704
-
705
- capabilities:
706
- -motorola
707
-
708
- extensions: ["barcode-moto"]
709
-
710
- Barcode API:
711
-
712
- Get a list of scanners present on the device. Return array of hashes ('name','id'):
713
-
714
- :::ruby
715
- Barcode.enumerate
716
-
717
- Enables the scanner. barcode_callback get the same parameters as Barcode.take_barcode:
718
-
719
- :::ruby
720
- Barcode.enable(url_for(:action => :barcode_callback), {:id=>id_from_enumerate})
721
-
722
- Callback parameters:
723
-
724
- * "status" - "ok" or "cancel"
725
- * "barcode" - recognized barcode string
726
-
727
- Disables the currently enabled scanner. This reverts the scanner to its default state and flushes any current decoder settings
728
-
729
- :::ruby
730
- Barcode.disable
731
-
732
- Performs a soft trigger start. If the scan does not result in a decode it is necessary to perform a soft stop before another soft start
733
-
734
- :::ruby
735
- Barcode.start
736
-
737
- Performs a soft trigger stop
738
-
739
- :::ruby
740
- Barcode.stop
741
-
742
- Enables the scanner and start scanner. Before callback is called scanner is disabled:
743
-
744
- :::ruby
745
- Barcode.take_barcode(url_for(:action => :barcode_callback), {:id=>id_from_enumerate})
746
-
747
- THe callback uses these parameters.
748
-
749
- * "status" - "ok" or "cancel"
750
- * "barcode" - recognized barcode string
751
-
752
- ### Sample
753
- See controller and view in the /app/BarcodeRecognizerMoto folder of the [System API Samples application](http://github.com/rhomobile/rhodes-system-api-samples/tree/master/app/BarcodeRecognizerMoto/controller.rb) for more information.
754
-
755
- ## WebKit browser for Motorola devices
756
- Rhodes 3.3 and RhoElements 2.0 support Motorola WebKit browser for Windows Mobile, Windows CE and Android (ET1) devices.
757
-
758
- To enable: install RhoElements gem or RhoStudio and add to build.yml
759
-
760
- capabilities:
761
- -motorola
762
-
763
- extensions: ["webkit-browser"]
764
-
765
701
  ## Signature Capture
766
702
 
767
703
  The Signature Capture API allow take a signature and save it as an image:
data/doc/rhom.txt CHANGED
@@ -564,7 +564,38 @@ Or multiple declarations:
564
564
 
565
565
  **NOTE: After a new product is created, the `:product_id` for the `Customer` records will be updated to the new value.**
566
566
 
567
+ ## Freezed models
568
+ If you want to limit model attributes by specific list - you can 'freeze' model:
567
569
 
570
+ :::ruby
571
+ class Customer
572
+ include Rhom::PropertyBag
573
+
574
+ enable :sync
575
+
576
+ set :freezed, true
577
+
578
+ property :address, :string
579
+ property :city, :string
580
+ property :email, :string
581
+ end
582
+
583
+ For such models if you try to add not listed property - you will get ArgumentError exception:
584
+
585
+ :::ruby
586
+ obj = Customer.new( :wrong_address => 'test') #will raise ArgumentError exception
587
+ obj = Customer.create( :wrong_address => 'test') #will raise ArgumentError exception
588
+
589
+ obj = getCase().new
590
+ obj.wrong_address = 'test' #will raise ArgumentError exception
591
+
592
+ obj = getCase().new
593
+ obj.update_attributes(:wrong_address => 'test') #will raise ArgumentError exception
594
+
595
+
596
+ NOTE: FixedSchema models 'freezed' by default.
597
+
598
+
568
599
  ## Accessing Sync Info with RhomSource
569
600
  Rhom exposes sync information as a `RhomSource` object. You can use this information for alerts, status pages, etc.
570
601
 
@@ -898,3 +929,5 @@ If your application requires that the local database is encrypted on the filesys
898
929
 
899
930
  :::ruby
900
931
  require_source 'Model'
932
+
933
+ *NOTE see more tips here: [How can I create a lot of objects in controller action](/faq#how-can-i-create-a-lot-of-objects-in-controller-action)
@@ -1,4 +1,4 @@
1
- # Testing, Logging, and Debugging
1
+ # Testing and Logging, and Debugging
2
2
 
3
3
  ## Testing
4
4
 
@@ -77,13 +77,29 @@ There are two methods to log messages.
77
77
 
78
78
  From any controller you can log using the methods app_info and app_error. These methods take a string and will write that to rholog.txt with the category of your controllers name. See platform specific [build topic](build) to see notes on how to get rholog.txt.
79
79
 
80
+ Call app_info and app_error from a method in your controller:
81
+
82
+ :::ruby
83
+ def index
84
+ app_info "My info message"
85
+ app_error "My error message"
86
+ end
87
+
80
88
  There also is a logging Ruby class called RhoLog. This class has methods info and error which take 2 strings. The first string is the category, the second string is the message.
81
89
 
90
+ Call the RhoLog error or info methods from a method in your Rhodes app:
91
+
92
+ :::ruby
93
+ def index
94
+ RhoLog.error("Some Category", "Some message")
95
+ end
96
+
82
97
  In rholog.txt the lines appear as follows:
83
98
 
84
99
  <Timestamp> <category> | <message>
85
100
 
86
101
  ### RhoError class
102
+
87
103
  You may find access to the error class useful in logging and reporting:
88
104
 
89
105
  This class contains error codes and the method message() to translate error code to a text message.
@@ -106,46 +122,6 @@ See [Login/Logout Manager]() as an example.
106
122
 
107
123
  ## Debugging
108
124
 
109
- You can debug your Rhodes app running on OSX using the Rhodes Debugger.
110
-
111
- The Rhodes Debugger app is located in [platform/osx/Rhodes Debugger](https://github.com/rhomobile/rhodes/tree/master/platform/osx/Rhodes%20Debugger). An xcode project is located there that you can use to build the debugger.
112
-
113
- Launching the debugger, by default it listens for debugger connections over tcp. There is a checkbox to enable scanning using gdb for a local emulator running.
114
-
115
- Be aware that debugging using the methods below will have a noticeable performance penalty on your application. GDB performance penalty is incurred when the debugger connects to the application and until the application is relaunched. TCP performance penalty is incurred if the application makes a successful connection to the debugger.
116
-
117
- [This video demonstrates debugging using TCP on iPhone and Android](http://www.youtube.com/watch?v=xtpjlIdOdQE).
118
-
119
- [This video demonstrates debugging using GDB](http://www.youtube.com/watch?v=dHJ3qvzjcuA).
120
-
121
- ### TCP debugging
122
-
123
- Tcp debugging works across multiple platforms, and can be run from the device.
124
-
125
- To enable tcp debugging, you have two make a few small modifications to your application:
126
-
127
- Include the extensions net-http and debugger in your build.yml.
128
-
129
- extensions:
130
- - net-http
131
- - debugger
132
-
133
- Modify your rhoconfig.txt add two lines at the bottom: debug_host and debug_port. This should be set to an ip address and port of the machine that the debugger app is running on that is reachable by the phone or emulator.
134
-
135
- debug_host = '192.168.1.106'
136
- debug_port = 9000
137
-
138
- Modify your application.rb. At the top of the application.rb file in your app, after the first require add the line:
139
-
140
- :::ruby
141
- require 'debugger'
142
-
143
- Then you can launch your application and you should see the text in the bottom left of the debugger change from 'Waiting for Rhodes' to 'Connected'. Once this is connected, browse to your rhodes application and then you can set breakpoints or execute ruby commands.
144
-
145
- Once you are done debugging, you should click the disconnect button on the debugger to disconnect the debugger from the app.
146
-
147
- ### Gdb debugging
125
+ You can use the [RhoStudio debugger](rhostudio.tutorial#using-the-debugger) to debug your Rhodes app.
148
126
 
149
- Gdb debugging only works when you run the debugger and iphone simulator on the same machine. It only works with the iphone simulator.
150
127
 
151
- There is no changes needed to your application to use gdb debugging. Simply launch the Rhodes Debugger app select the gdb checkbox and then launch your application in the iphone simulator. The debugger will detect your application and connect to it automatically.
@@ -32,7 +32,7 @@ module Rho
32
32
  class RhoController
33
33
  begin
34
34
  is_translator_exist = true
35
- is_translator_exist = Rho::file_exist?( File.join(__rhoGetCurrentDir(), 'lib/rhodes_translator' + RHO_RB_EXT) ) if !defined?( RHODES_EMULATOR )
35
+ is_translator_exist = Rho::file_exist?( File.join(__rhoGetRuntimeDir(), 'lib/rhodes_translator' + RHO_RB_EXT) ) if !defined?( RHODES_EMULATOR )
36
36
 
37
37
  if is_translator_exist
38
38
  require 'rhodes_translator'