rhodes 2.3.0 → 2.3.1.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. data/CHANGELOG +6 -0
  2. data/Manifest.txt +5819 -0
  3. data/README.md +2 -2
  4. data/Rakefile +9 -5
  5. data/doc/build.txt +7 -13
  6. data/doc/configuration.txt +4 -0
  7. data/doc/connect-to-web-services.txt +0 -1
  8. data/doc/device-caps.txt +2 -2
  9. data/doc/extensions.txt +2 -0
  10. data/doc/linea.txt +699 -0
  11. data/doc/rhom.txt +2 -1
  12. data/doc/synchronization.txt +39 -2
  13. data/doc/ui.txt +1 -0
  14. data/installer/README.html +1 -1
  15. data/lib/build/jake.rb +3 -0
  16. data/lib/framework/res/esri.wm.png +0 -0
  17. data/lib/framework/rho/render.rb +2 -0
  18. data/lib/framework/rho/rho.rb +17 -10
  19. data/lib/framework/rho/rhoapplication.rb +13 -3
  20. data/lib/framework/rho/rhoevent_bb.rb +3 -1
  21. data/lib/framework/rho/rhoevent_c.rb +4 -1
  22. data/lib/framework/rhodes.rb +1 -1
  23. data/lib/framework/rhom/rhom.rb +10 -0
  24. data/lib/framework/rhom/rhom_object_factory.rb +45 -0
  25. data/lib/framework/rhom/rhom_source.rb +1 -1
  26. data/lib/framework/version.rb +1 -1
  27. data/lib/rhodes.rb +1 -1
  28. data/platform/android/Rhodes/AndroidManifest.xml +2 -2
  29. data/platform/android/Rhodes/jni/include/rhodes/RhoClassFactory.h +1 -1
  30. data/platform/android/Rhodes/jni/src/RhoClassFactory.cpp +1 -1
  31. data/platform/android/Rhodes/jni/src/callbacks.cpp +9 -11
  32. data/platform/android/Rhodes/jni/src/event.cpp +17 -9
  33. data/platform/android/Rhodes/jni/src/mapview.cpp +34 -4
  34. data/platform/android/Rhodes/jni/src/rhodes.cpp +1 -1
  35. data/platform/android/Rhodes/res/drawable/esri.png +0 -0
  36. data/platform/android/Rhodes/src/com/rhomobile/rhodes/AndroidR.java +1 -0
  37. data/platform/android/Rhodes/src/com/rhomobile/rhodes/BaseActivity.java +3 -0
  38. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +8 -5
  39. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +80 -9
  40. data/platform/android/Rhodes/src/com/rhomobile/rhodes/event/EventStore.java +29 -8
  41. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +4 -1
  42. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/TabbedMainView.java +50 -10
  43. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mapview/MapView.java +3 -0
  44. data/platform/android/build/android.rake +45 -23
  45. data/platform/android/build/librhocommon_build.files +1 -0
  46. data/platform/bb/Hsqldb/src/com/rho/db/HsqlDBStorage.java +6 -1
  47. data/platform/bb/Hsqldb/src/org/hsqldb/CachedDataRow.java +1 -1
  48. data/platform/bb/Hsqldb/src/org/hsqldb/CachedRow.java +3 -2
  49. data/platform/bb/Hsqldb/src/org/hsqldb/Row.java +1 -1
  50. data/platform/bb/Hsqldb/src/org/hsqldb/persist/CachedObject.java +1 -1
  51. data/platform/bb/Hsqldb/src/org/hsqldb/persist/DataFileCache.java +66 -16
  52. data/platform/bb/Hsqldb/src/org/hsqldb/persist/HsqlDatabaseProperties.java +1 -1
  53. data/platform/bb/RubyVM/src/com/rho/RhoCrypto.java +116 -0
  54. data/platform/bb/RubyVM/src/com/rho/ThreadQueue.java +39 -2
  55. data/platform/bb/RubyVM/src/com/rho/Tokenizer.java +11 -6
  56. data/platform/bb/RubyVM/src/com/rho/db/DBAdapter.java +157 -150
  57. data/platform/bb/RubyVM/src/com/rho/db/IDBStorage.java +1 -1
  58. data/platform/bb/RubyVM/src/com/rho/file/RhoFile.java +15 -0
  59. data/platform/bb/RubyVM/src/com/rho/net/AsyncHttp.java +35 -23
  60. data/platform/bb/RubyVM/src/com/rho/net/NetRequest.java +6 -9
  61. data/platform/bb/RubyVM/src/com/rho/sync/SyncEngine.java +54 -16
  62. data/platform/bb/RubyVM/src/com/rho/sync/SyncNotify.java +18 -9
  63. data/platform/bb/RubyVM/src/com/rho/sync/SyncSource.java +37 -59
  64. data/platform/bb/RubyVM/src/com/rho/sync/SyncThread.java +3 -0
  65. data/platform/bb/build/RubyVM_build.files +1 -0
  66. data/platform/bb/build/bb.rake +4 -5
  67. data/platform/bb/rhodes/platform/5.0/com/rho/RhodesApplicationPlatform.java +4 -1
  68. data/platform/bb/rhodes/platform/5.0/com/rho/db/SqliteStorage.java +8 -3
  69. data/platform/bb/rhodes/resources/esri.png +0 -0
  70. data/platform/bb/rhodes/src/com/rho/RhodesApplicationPlatform.java +2 -0
  71. data/platform/bb/rhodes/src/com/rho/db/SqliteStorage.java +8 -3
  72. data/platform/bb/rhodes/src/com/rho/rubyext/RhoCalendar.java +4 -1
  73. data/platform/bb/rhodes/src/com/rho/rubyext/System.java +2 -0
  74. data/platform/bb/rhodes/src/rhomobile/mapview/ESRIMapField.java +9 -0
  75. data/platform/iphone/Classes/Event/Event.m +12 -2
  76. data/platform/iphone/Classes/NativeBar.h +12 -11
  77. data/platform/iphone/Classes/NativeBar.m +13 -3
  78. data/platform/iphone/Classes/Rhodes.m +48 -10
  79. data/platform/iphone/Classes/SimpleMainView.h +1 -0
  80. data/platform/iphone/Classes/SimpleMainView.m +7 -1
  81. data/platform/iphone/Classes/SplitView/LeftViewController.m +3 -0
  82. data/platform/iphone/Classes/SplitView/RightViewController.m +11 -6
  83. data/platform/iphone/Classes/SplitView/SplittedMainView.m +8 -0
  84. data/platform/iphone/Classes/TabbedMainView.m +39 -3
  85. data/platform/iphone/Info.plist +1 -1
  86. data/platform/iphone/RhoLib/RhoLib.xcodeproj/project.pbxproj +4 -0
  87. data/platform/iphone/rhorunner.xcodeproj/project.pbxproj +3 -3
  88. data/platform/shared/SyncClient/SyncClient.cpp +23 -23
  89. data/platform/shared/common/IRhoClassFactory.h +6 -4
  90. data/platform/shared/common/RhoAppAdapter.h +1 -1
  91. data/platform/shared/common/RhoFile.cpp +10 -0
  92. data/platform/shared/common/RhoFile.h +1 -0
  93. data/platform/shared/common/RhoMutexLock.h +1 -1
  94. data/platform/shared/common/RhoStd.h +5 -0
  95. data/platform/shared/common/RhoThread.cpp +2 -2
  96. data/platform/shared/common/RhoThread.h +1 -2
  97. data/platform/shared/common/RhodesApp.cpp +33 -55
  98. data/platform/shared/common/RhodesApp.h +0 -5
  99. data/platform/shared/common/RhodesAppBase.cpp +1 -1
  100. data/platform/shared/common/SplashScreen.cpp +1 -2
  101. data/platform/shared/common/ThreadQueue.cpp +31 -4
  102. data/platform/shared/common/ThreadQueue.h +10 -3
  103. data/platform/shared/common/Tokenizer.cpp +12 -8
  104. data/platform/shared/common/iphone/RhoClassFactory.cpp +5 -8
  105. data/platform/shared/common/iphone/RhoClassfactory.h +1 -1
  106. data/platform/shared/common/map/ESRIMapEngine.cpp +17 -7
  107. data/platform/shared/common/map/ESRIMapEngine.h +11 -1
  108. data/platform/shared/common/map/GoogleMapEngine.cpp +3 -3
  109. data/platform/shared/common/map/GoogleMapEngine.h +2 -2
  110. data/platform/shared/common/map/MapEngine.cpp +37 -0
  111. data/platform/shared/common/map/MapEngine.h +5 -0
  112. data/platform/shared/db/DBAdapter.cpp +113 -81
  113. data/platform/shared/db/DBAdapter.h +21 -5
  114. data/platform/shared/db/DBAttrManager.cpp +2 -2
  115. data/platform/shared/db/DBResult.h +28 -0
  116. data/platform/shared/net/AsyncHttp.cpp +48 -48
  117. data/platform/shared/net/AsyncHttp.h +15 -12
  118. data/platform/shared/net/CURLNetRequest.cpp +27 -105
  119. data/platform/shared/net/CURLNetRequest.h +8 -15
  120. data/platform/shared/net/INetRequest.cpp +122 -0
  121. data/platform/shared/net/INetRequest.h +96 -23
  122. data/platform/shared/net/ssl.cpp +1 -1
  123. data/platform/shared/ruby/ext/calendar/calendar.i +2 -2
  124. data/platform/shared/ruby/ext/calendar/calendar_wrap.c +30 -3
  125. data/platform/shared/rubyext/GeoLocation.cpp +4 -5
  126. data/platform/shared/rubyext/GeoLocation.h +4 -4
  127. data/platform/shared/rubyext/RhoAppAdapter.cpp +1 -1
  128. data/platform/shared/rubyext/System.cpp +3 -0
  129. data/platform/shared/sync/ClientRegister.cpp +6 -9
  130. data/platform/shared/sync/ClientRegister.h +8 -6
  131. data/platform/shared/sync/SyncEngine.cpp +54 -30
  132. data/platform/shared/sync/SyncEngine.h +9 -11
  133. data/platform/shared/sync/SyncNotify.cpp +19 -14
  134. data/platform/shared/sync/SyncNotify.h +5 -12
  135. data/platform/shared/sync/SyncSource.cpp +53 -76
  136. data/platform/shared/sync/SyncSource.h +5 -4
  137. data/platform/shared/sync/SyncThread.cpp +5 -7
  138. data/platform/shared/sync/SyncThread.h +2 -2
  139. data/platform/wm/RhoLib/RhoLib.vcproj +43 -39
  140. data/platform/wm/build/wm.rake +19 -17
  141. data/platform/wm/rhodes/AppManager.cpp +4 -4
  142. data/platform/wm/rhodes/MainWindow.cpp +0 -1
  143. data/platform/wm/rhodes/MapView/MapViewManager.cpp +4 -0
  144. data/platform/wm/rhodes/Vibrate.cpp +2 -2
  145. data/platform/wm/rhodes/Vibrate.h +1 -1
  146. data/platform/wm/rhodes/rho/common/RhoClassFactory.cpp +7 -5
  147. data/platform/wm/rhodes/rho/common/RhoClassFactory.h +3 -3
  148. data/platform/wm/rhodes/rho/net/NetRequestImpl.cpp +24 -10
  149. data/platform/wm/rhodes/rho/net/NetRequestImpl.h +49 -25
  150. data/platform/wm/rhodes/rho/rubyext/calendar.cpp +16 -2
  151. data/platform/wm/rhodes/rhodes.vcproj +77 -85
  152. data/platform/wm/tools/detool/detool.cpp +16 -6
  153. data/rakefile.rb +9 -5
  154. data/res/build-tools/detool.exe +0 -0
  155. data/rhodes.gemspec +2 -2
  156. data/spec/phone_spec/app/spec/blobsync_spec.rb +1 -0
  157. data/spec/phone_spec/app/spec/events_spec.rb +13 -2
  158. data/spec/phone_spec/app/spec/mapview_spec.rb +2 -2
  159. data/spec/phone_spec/app/spec/nativebar_spec.rb +3 -3
  160. data/spec/phone_spec/app/spec/navbar_spec.rb +3 -3
  161. data/spec/phone_spec/app/spec/rho_spec.rb +1 -1
  162. data/spec/phone_spec/app/spec/rhom_object_spec.rb +1 -1
  163. data/spec/phone_spec/app/spec/syncengine_spec.rb +219 -0
  164. data/spec/phone_spec/build.yml +1 -0
  165. metadata +15 -8
  166. data/platform/wm/rhodes/rho/net/NetRequest.cpp +0 -89
  167. data/platform/wm/rhodes/rho/net/NetRequest.h +0 -45
data/README.md CHANGED
@@ -37,9 +37,9 @@ This will generate a model file, controller file, and several views (correspondi
37
37
 
38
38
  ## More Resources
39
39
 
40
- There is a [tutorial available](http://wiki.rhomobile.com/index.php/Tutorial) on the [Rhomobile site](http://www.rhomobile.com). This includes thorough and current platform-by-platform build instructions.
40
+ There is a [tutorial available](http://docs.rhomobile.com/rhodes/tutorial) on the [Rhomobile site](http://www.rhomobile.com). This includes thorough and current platform-by-platform build instructions.
41
41
 
42
- The [Rhodes Developer Reference](http://wiki.rhomobile.com/index.php/Rhodes) for full documentation on the Rhodes framework.
42
+ The [Rhodes Developer Reference](http://docs.rhomobile.com/rhodes/introduction) for full documentation on the Rhodes framework.
43
43
 
44
44
  For further questions [email us](mailto:info@rhomobile.com) or join the [Google Group](http://groups.google.com/group/rhomobile).
45
45
 
data/Rakefile CHANGED
@@ -351,16 +351,20 @@ def init_extensions(startdir, dest)
351
351
 
352
352
  exts = File.join($startdir, "platform", "shared", "ruby", "ext", "rho", "extensions.c")
353
353
 
354
- #if $config["platform"] != "bb" && !FileUtils.uptodate?(exts,[File.join($app_path, "build.yml")])
355
354
  if $config["platform"] != "bb"
356
355
  exists = []
357
- File.new(exts, "r").read.split("\n").each do |line|
358
- next if line !~ /^\s*extern\s+void\s+([A-Za-z_][A-Za-z0-9_]*)/
359
- exists << $1
356
+
357
+ if ( File.exists?(exts) )
358
+ File.new(exts, "r").read.split("\n").each do |line|
359
+ next if line !~ /^\s*extern\s+void\s+([A-Za-z_][A-Za-z0-9_]*)/
360
+ exists << $1
361
+ end
360
362
  end
361
-
363
+
362
364
  if exists.sort! != extentries.sort!
363
365
  File.open(exts, "w") do |f|
366
+ puts "MODIFY : #{exts}"
367
+
364
368
  f.puts "// WARNING! THIS FILE IS GENERATED AUTOMATICALLY! DO NOT EDIT IT MANUALLY!"
365
369
  #f.puts "// Generated #{Time.now.to_s}"
366
370
  if $config["platform"] == "wm" || $config["platform"] == "win32"
data/doc/build.txt CHANGED
@@ -613,7 +613,7 @@ Note that Windows Mobile versions of your Rhodes app must be built in a Windows
613
613
  * .NET Compact Framework
614
614
  * Windows Mobile 6 Professional SDK(s)
615
615
  * Microsoft Active Sync 4.5
616
- * Visual Studio 2005 Service Pack 1 installed.
616
+ * Visual Studio 2005 Service Pack 1 installed or Visual Studio 2008.
617
617
  * [7-zip](http://www.7-zip.org/)
618
618
 
619
619
  Open ActiveSync main window, go to the File -> Connection Settings, select checkbox "Allow connections to one of the following" and select "DMA" from the list box. It is required to work with emulator.
@@ -630,35 +630,29 @@ Add path to CabWiz.exe to rhobuild.yml in the Rhodes folder:
630
630
  paths:
631
631
  cabwiz: C:/Program Files/Windows Mobile 6 SDK/Tools/CabWiz
632
632
 
633
- If you use Visual Studio 2010 : add path to msbuild to rhobuild.yml in rhodes folder:
634
-
635
- env:
636
- paths:
637
- vcbuild: msbuild
638
-
639
- Go to your application directory. From here you can run all of the Windows Mobile rake tasks.
633
+ ### To run application on device or emulator(Visual Studio 2008 only) :
640
634
 
641
635
  To build and run application on emulator, run (fastest way):
642
636
 
643
637
  :::term
644
- $ rake run:wm:emu
638
+ $ rake run:wm
645
639
 
646
640
  To build cab-file, install it and run application on emulator, run:
647
641
 
648
642
  :::term
649
- $ rake run:wm:emucab
643
+ $ rake run:wm:cab
650
644
 
651
645
  To build and run application on device, run (fastest way):
652
646
 
653
647
  :::term
654
- $ rake run:wm:dev
648
+ $ rake run:wm:device
655
649
 
656
650
  To build cab-file, install it and run application on device, run:
657
651
 
658
652
  :::term
659
- $ rake run:wm:devcab
653
+ $ rake run:wm:device:cab
660
654
 
661
- To build application cab-file for the device, run:
655
+ ### To build application cab-file for the device, run:
662
656
 
663
657
  :::term
664
658
  $ rake device:wm:production
@@ -157,6 +157,10 @@ Turn on Persistent Storage usage mode for Blackberry
157
157
  use_persistent_storage = 1
158
158
 
159
159
 
160
+ To use only models from bulk database. If true, application will not create models and will use models from bulk sync database
161
+
162
+ use_bulk_model = true
163
+
160
164
  ### Last Visited Page
161
165
  Rhodes can keep track of the last visited page, so that next time you start your application, it will open to the same page. To enable this feature, use
162
166
 
@@ -12,7 +12,6 @@ Below is the list of available `AsyncHttp` methods you can use to asyncrhonously
12
12
  * `:callback_params` - (optional) Parameters to send to the callback.
13
13
  * `:authentication` - (optional) Send Basic Auth header with request. This takes the form:
14
14
 
15
- :::ruby
16
15
  :authentication => {
17
16
  :type => :basic,
18
17
  :username => "john",
data/doc/device-caps.txt CHANGED
@@ -315,9 +315,9 @@ Return hash of all properties of the events found by specified parameters (index
315
315
  * 'occurring' searches for events that have any part of the event occurring during the period specified by start_date and end_date.
316
316
  * include_repeating - if false then only search based on an Event's START and END values and do not calculate repeating occurrences of the event; if true then repeating occurrences of an Event are included during the search.
317
317
 
318
- Create new event in the calendar, set properties of the event from passed as parameter hash, and save created calendar event (create):
318
+ Create new event in the calendar, set properties of the event from passed as parameter hash, and save created calendar event (create), also return hash of all properties of the created event(include 'id' property):
319
319
  :::ruby
320
- Rho::RhoEvent.create!(@params['event'])
320
+ created_event = Rho::RhoEvent.create!(@params['event'])
321
321
 
322
322
  Find event in the calendar, update record properties from the has passed as parameter and save updated event. Event id passed in the hash (update):
323
323
  :::ruby
data/doc/extensions.txt CHANGED
@@ -493,6 +493,8 @@ See [Rhodes-System-Api-Samples](http://github.com/rhomobile/rhodes-system-api-sa
493
493
 
494
494
  See [/app/NativeView/controller.rb](http://github.com/rhomobile/rhodes-system-api-samples/blob/master/app/NativeView/controller.rb) and [/app/NativeView/index.erb](http://github.com/rhomobile/rhodes-system-api-samples/blob/master/app/NativeView/index.erb) for details how to call native view from your controller.
495
495
 
496
+ ** NOTE: Windows Mobile: Visual Studio 2005 has issues with long paths. If you have problems with building rainbow extension, move rhodes folder to shorter path. **
497
+
496
498
  * To navigate to rainbow view in your controller you should call `WebView.navigate('rainbow_view:red')`. In your url schema indicates view type you want to open and rest of the url (red) passed to the after it was created.
497
499
 
498
500
  * To pass parameters to created view you may call WebView.navigate again: `WebView.navigate('rainbow_view:green')`. In your native code you may pass parameters to the native view by calling `pNativeView->navigate(url)` where pNativeView is an instance of native view created by the `RhoNativeViewManager` using registered factory.