rhodes 3.3.2.beta.2 → 3.3.2.beta.3

Sign up to get free protection for your applications and to get access to all the features.
data/doc/device-caps.txt CHANGED
@@ -84,12 +84,12 @@ Enable\disable phone sleep by timeout, return previous state
84
84
  Open application associated with url; behavior may be different on different platforms and depend on installed software.
85
85
  :::ruby
86
86
  System.open_url(url)
87
- **NOTE: On iPhone, if you post path of local file, then the specific iOS control (UIDocumentInteractionController) where file will previewed and user will be able open this file by selected application wich supported this filetype.
87
+ **NOTE: On iPhone, if you post path of local file, then the specific iOS control (UIDocumentInteractionController) where file will previewed and user will be able open this file by selected application wich supported this filetype.**
88
88
 
89
89
  Run specified application. Note: appname is platform dependent
90
90
  :::ruby
91
91
  System.run_app(appname, params)
92
- **NOTE: On iPhone, appname is the same with registered application URL scheme. Params just string. Example : System.run_app('myapp', 'someparams'). Also this the same with : System.open_url('myapp:someparams')
92
+ **NOTE: On iPhone, appname is the same with registered application URL scheme. Params just string. Example : System.run_app('myapp', 'someparams'). Also this the same with : System.open_url('myapp:someparams')**
93
93
 
94
94
 
95
95
  Install application from specified url
@@ -99,7 +99,8 @@ Install application from specified url
99
99
  Is specified application installed on device?
100
100
  :::ruby
101
101
  System.app_installed?(appname)
102
- **NOTE: On iPhone, appname is the same with registered application URL scheme.
102
+
103
+ **NOTE: On iPhone, appname is the same with registered application URL scheme.**
103
104
 
104
105
  Uninstall specified application
105
106
  :::ruby
@@ -191,14 +192,14 @@ Any call to GeoLocation method or notification call back will power up the GPS r
191
192
  The GPS receiver will be switched off authomatically after some time (see [Configuration](configuration#run-time-configuration) for parameters) or explicitly by GeoLocation.turnoff.
192
193
  Also note that it usually takes a while to acquire the device's current position; in some cases, it may take several minutes and may not work at all indoors.
193
194
 
194
- Note that in old rhodes versions (up to 2.3.1) this feature uses only GPS location provider;
195
- however, in more recent rhodes it also use network based location determination. Network based location
196
- is not as precise as GPS but in most cases it consumes less power and returns results faster than GPS.
195
+ Note that in old rhodes versions (up to 2.3.1) this feature uses only GPS location provider. In more recent rhodes, it also uses network based location determination. Network based location
196
+ is not as precise as GPS, but in most cases it consumes less power and returns results faster than GPS.
197
197
  Rhodes will update location using network data until the GPS signal has been received; then only GPS will be used for more precise data.
198
198
 
199
- There are two ways to use GeoLocation:
200
- * Syncronous call to GeoLocation module for particular value.
201
- * Set GeoLocation notification and track location by call back. In this case all location values passed to notification as parameters.
199
+ There are two ways to use GeoLocation.
200
+
201
+ * Syncronous call to GeoLocation module for particular value.
202
+ * Set GeoLocation notification and track location by call back. In this case all location values passed to notification as parameters.
202
203
 
203
204
  Note that GeoLocation is switched off automatically when the application goes into the background, and is switched on as the application goes back to foreground.
204
205
  However it is possible to switch on location services as usual while the application is in background.
@@ -244,8 +245,15 @@ Set callback to track location changes.
244
245
 
245
246
  * callback - callback url; after the callback has been called once, it will be automatically called repeatedly with the current location coordinates passed to the callback as parameters. (You need not reset the callback within the callback.)
246
247
  * ping_gpssystem_timeout - optional, if 0 system timeout used, use to redefine timeout in sec for gps system reading
247
- * callback params: known_position, latitude, longitude, available, status('error', 'ok'), error_code(from RhoError)
248
-
248
+ * callback params: known_position, latitude, longitude, available, status('error', 'ok'), error_code(from RhoError), accuracy
249
+
250
+ Turn off GeoLocation.
251
+
252
+ :::ruby
253
+ GeoLocation.turnoff
254
+
255
+ **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.**
256
+
249
257
  Get the distance between two points in miles.
250
258
  :::ruby
251
259
  GeoLocation.haversine_distance(
@@ -313,6 +321,26 @@ Callback points to the `geo_callback` in the Settings controller.rb:
313
321
  # do nothing, still wait for location
314
322
  end
315
323
 
324
+ ##### Turning off GeoLocation as soon as the app goes of the device front page
325
+
326
+ In this code sample, /GeoLocation/ has to be replaced with an appropriate regular expression to detect the controller. This code is called from geo_callback. This decision allows you to switch off GeoLocation from a single code point in case geo_callback is set.
327
+
328
+ :::ruby
329
+ def geo_callback
330
+ puts "geo_callback : #{@params}"
331
+
332
+ if WebView.current_location !~ /GeoLocation/
333
+ puts "Stopping geo location since we are away of geo page: " + WebView.current_location
334
+ GeoLocation.turnoff
335
+ return
336
+ end
337
+ end
338
+
339
+ If the app does not need location updates, and GeoLocation should still remian active, you can send an empty notification.
340
+
341
+ :::ruby
342
+ GeoLocation.set_notification "", "", 30
343
+
316
344
  #### Code Sample
317
345
 
318
346
  See controller and view in the /app/GeoLocation folder of the [System API Samples application](http://github.com/rhomobile/rhodes-system-api-samples/tree/master/app/GeoLocation/controller.rb) for more information.
@@ -351,9 +379,10 @@ For these selectors an additional params hash may be used. The next keys and val
351
379
  * :offset - offset from begin of contacts' list
352
380
  These two parameters are used to paginate contacts list. If used with :count exact number of returned contacts can be determined (for example for last page).
353
381
 
354
- The next parameters are available at Android only:
355
- * :select - list of contact properties have to be selected from phonebook (Use it to enchance query performance)
356
- * :conditions - hash of conditions to query contacts. Look for more details below.
382
+ The next parameters are available at Android only.
383
+
384
+ * :select - list of contact properties have to be selected from phonebook (Use it to enchance query performance)
385
+ * :conditions - hash of conditions to query contacts. Look for more details below.
357
386
 
358
387
  **NOTE: It is allowed to pass additional params hash at all platforms. Platforms that has no extended functionality will just skip these**
359
388
 
@@ -525,30 +554,31 @@ Recurrence properties:
525
554
  Recurrence properties are groupped in separate hash stored as single event property (event[Rho::RhoEvent::RECURRENCE]).
526
555
 
527
556
  ### Names of properties
528
- There are helper constants defined in Rho::RhoEvent which can be used to address event values and as predefined set of values (for frequency):
529
- * ID
530
- * TITLE
531
- * CANCELED
532
- * ORGANIZER
533
- * START_DATE
534
- * END_DATE
535
- * LAST_MODIFIED
536
- * LOCATION
537
- * NOTES
538
- * PRIVACY
539
- * REMINDER
540
- * RECURRENCE
541
- * RECURRENCE_FREQUENCY
542
- * RECURRENCE_FREQUENCY_DAILY
543
- * RECURRENCE_FREQUENCY_WEEKLY
544
- * RECURRENCE_FREQUENCY_MONTHLY
545
- * RECURRENCE_FREQUENCY_YEARLY
546
- * RECURRENCE_INTERVAL
547
- * RECURRENCE_COUNT
548
- * RECURRENCE_END
549
- * RECURRENCE_DAYOFMONTH
550
- * RECURRENCE_MONTHS
551
- * RECURRENCE_DAYS
557
+ There are helper constants defined in Rho::RhoEvent which can be used to address event values and as predefined set of values (for frequency).
558
+
559
+ * ID
560
+ * TITLE
561
+ * CANCELED
562
+ * ORGANIZER
563
+ * START_DATE
564
+ * END_DATE
565
+ * LAST_MODIFIED
566
+ * LOCATION
567
+ * NOTES
568
+ * PRIVACY
569
+ * REMINDER
570
+ * RECURRENCE
571
+ * RECURRENCE_FREQUENCY
572
+ * RECURRENCE_FREQUENCY_DAILY
573
+ * RECURRENCE_FREQUENCY_WEEKLY
574
+ * RECURRENCE_FREQUENCY_MONTHLY
575
+ * RECURRENCE_FREQUENCY_YEARLY
576
+ * RECURRENCE_INTERVAL
577
+ * RECURRENCE_COUNT
578
+ * RECURRENCE_END
579
+ * RECURRENCE_DAYOFMONTH
580
+ * RECURRENCE_MONTHS
581
+ * RECURRENCE_DAYS
552
582
 
553
583
 
554
584
  ### Sample
@@ -614,8 +644,9 @@ Get camera info:
614
644
 
615
645
  camera_type - "default"(is the same with "main"), "main", "front"
616
646
  return Hash with camera info for selected camera type or NIL if this type is not supported.
617
- In returned hash :
618
- * "max_resolution" - hash with "width" and "height" numeric values.
647
+ In returned hash:
648
+
649
+ * "max_resolution" - hash with "width" and "height" numeric values.
619
650
 
620
651
 
621
652
  ### Sample
@@ -635,7 +666,7 @@ For barcode recognition we use Zbar library (iPhone, and Windows Mobile platform
635
666
  * iPhone platform: UPC-A, UPC-E, EAN-8, EAN-13, Code 39, Code 128, QR Code .
636
667
  * Android and BlackBerry platforms: UPC-A, UPC-E, EAN-8, EAN-13, Code 39, Code 128, Code 93, QR Code, ITF, Codabar
637
668
 
638
- **NOTE: We are very sorry, but we are removed ZBar source code from our project by ZBar license requirements. For build Barcode extension for WM, you should download ZBar sources from http://zbar.sourceforge.net/ and copy to [rhodes root]/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/ folder "include" and "zbar" folders from ZBar sources. Also you should fix ZBar sources for building by Microsoft Visual Studio (move define of inner function variables to begin of functions, etc.). See detailed instructon in [Rhodes root]/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/README.TXT
669
+ **NOTE: We are very sorry, but we are removed ZBar source code from our project by ZBar license requirements. For build Barcode extension for WM, you should download ZBar sources from http://zbar.sourceforge.net/ and copy to [rhodes root]/lib/extensions/barcode/ext/barcode/shared/zbar/zbar/ folder "include" and "zbar" folders from ZBar sources. Also you should fix ZBar sources for building by Microsoft Visual Studio (move define of inner function variables to begin of functions, etc.). See detailed instructon in your Rhodes installation at /lib/extensions/barcode/ext/barcode/shared/zbar/zbar/README.TXT**
639
670
 
640
671
  On Android and iOS (not supported on iPhone 2G and iPhone 3G !) now supported real-time barcode recognizing (second parameter is hash with options):
641
672
  :::ruby
@@ -646,9 +677,10 @@ On Android also you can use front camera for take_barcode :
646
677
  Barcode.take_barcode(url_for(:action => :take_callback), {:camera => 'front'})
647
678
 
648
679
  This code open special UI for real-time barcode recognizing from camera. If any barcode found recognizing stopped and user can select - confirm recognizing barcode or continue recognizig. If user confirmed or cancelled the callback will be called.
649
- In callback:
650
- * "status" - "ok" or "cancel"
651
- * "barcode" - recognized barcode string
680
+ In callback are these parameters.
681
+
682
+ * "status" - "ok" or "cancel"
683
+ * "barcode" - recognized barcode string
652
684
 
653
685
  ### Sample
654
686
  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.
@@ -663,7 +695,7 @@ To enable add to build.yml:
663
695
 
664
696
  extensions: ["barcode-moto"]
665
697
 
666
- Barcode API :
698
+ Barcode API:
667
699
 
668
700
  Get a list of scanners present on the device. Return array of hashes ('name','id'):
669
701
 
@@ -700,10 +732,10 @@ Enables the scanner and start scanner. Before callback is called scanner is disa
700
732
  :::ruby
701
733
  Barcode.take_barcode(url_for(:action => :barcode_callback), {:name=>name_from_enumerate})
702
734
 
703
- Callback parameters:
735
+ THe callback uses these parameters.
704
736
 
705
- * "status" - "ok" or "cancel"
706
- * "barcode" - recognized barcode string
737
+ * "status" - "ok" or "cancel"
738
+ * "barcode" - recognized barcode string
707
739
 
708
740
  ### Sample
709
741
  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.
@@ -724,26 +756,28 @@ The Signature Capture API allow take a signature and save it as an image:
724
756
  :::ruby
725
757
  Rho::SignatureCapture.take(callback_url, params)
726
758
 
727
- Signature Capture open window for hand writing, where user draw his signature. Signature saved to an image file. You can choice 'jpg' or 'png' format for image.
728
- * callback_url - callback url
729
- * params - hash with params
759
+ Signature Capture open window for hand writing, where user draw his signature. Signature saved to an image file. You can choice 'jpg' or 'png' format for image.
730
760
 
731
- Example :
761
+ * callback_url - callback url
762
+ * params - hash with params
763
+
764
+ Example:
732
765
  :::ruby
733
766
  Rho::SignatureCapture.take(url_for( :action => :signature_callback), { :imageFormat => "jpg", :penColor => 0xff0000, :penWidth=>3, :bgColor => 0x00ff00 })
734
767
 
735
- Params in hash:
768
+ The following parameters are in the hash.
736
769
 
737
- * imageFormat - "jpg", "png" or "bmp"
738
- * penColor - color of pen used for drawing signature
739
- * penWidth - wide of pen
740
- * bgColor - color of background
770
+ * imageFormat - "jpg", "png" or "bmp"
771
+ * penColor - color of pen used for drawing signature
772
+ * penWidth - wide of pen
773
+ * bgColor - color of background
741
774
 
742
- NOTE: On Windows Mobile and Windows CE devices only "bmp" supported as 'imageFormat'
775
+ **NOTE: On Windows Mobile and Windows CE devices only "bmp" is supported as 'imageFormat'.**
743
776
 
744
- After user entered signature (or canceled) provided callback url will be called. Callback parameters will be:
745
- * status - 'ok' or 'cancel'
746
- * signature_uri - path to the image with signature
777
+ After user entered signature (or canceled) provided callback url will be called. Callback parameters will be the following.
778
+
779
+ * status - 'ok' or 'cancel'
780
+ * signature_uri - path to the image with signature
747
781
 
748
782
  ### Inline signature capture
749
783
  Windows Mobile and Windows CE devices support signature capture started in window, which you can show over current page(scrolling is not supported in this case).
@@ -806,7 +840,7 @@ There are two steps to make connection and start using of Bluetooth :
806
840
  * For make connection without UI, you should execute `Rho::BluetoothManager.create_server_and_wait_for_connection` on server and `Rho::BluetoothManager.create_client_connection_to_device` on client. On client you should specify server name(display name - not Bluetooth ID!) for connect. Specify callback - callback have the same parameters with `Rho::BluetoothManager.create_session`. You can cancel connection process by `Rho::BluetoothManager.stop_current_connection_process`
807
841
  * After receiving successful result and name of connected device in create_session_callback you should setup session_callback by `Rho::BluetoothSession.set_callback` to process incoming session events from connected device (data received) or event related to this session connection(disconnect, errors).
808
842
 
809
- **NOTE: Connection without UI worked only on iOS and Android platforms only !
843
+ **NOTE: Connection without UI worked only on iOS and Android platforms!**
810
844
 
811
845
  ### Bluetooth API
812
846
 
@@ -989,14 +1023,15 @@ Get all available ringtones
989
1023
  Play a given ringtone
990
1024
  :::ruby
991
1025
  RingtoneManager::play @ringtones['My Ringtone']
992
- NOTE: that if 'play' is called while another ringtone is playing, it will stop the old ringtone and start the new one.
1026
+
1027
+ **NOTE: If 'play' is called while another ringtone is playing, it will stop the old ringtone and start the new one.**
993
1028
 
994
1029
  Halt playing of a ringtone
995
1030
  :::ruby
996
1031
  RingtoneManager::stop
997
1032
  * Can safely be called even if no ringtone is playing
998
1033
 
999
- NOTE: Currently implemented for Android, Blackberry and Windows mobile. On Blackberry, only the user installed ringtones are accessible. System preinstalled ringtones are not accessible due to Blackberry limitations.
1034
+ **NOTE: Currently implemented for Android, Blackberry and Windows mobile. On Blackberry, only the user installed ringtones are accessible. System preinstalled ringtones are not accessible due to Blackberry limitations.**
1000
1035
 
1001
1036
  ### Sample
1002
1037
  See controller and view in the /app/Ringtones folder of the [System API Samples application](http://github.com/rhomobile/rhodes-system-api-samples/tree/master/app/Ringtones/controller.rb) for more information.
@@ -1056,7 +1091,7 @@ Automatic push message parameters handling takes its place in case no custom pus
1056
1091
  ### iPhone
1057
1092
  iPhone PUSH support uses the Apple Push Notification Service (APNS) introduced in iPhone SDK 3.0. In order to use the service, you will need to obtain a push-enabled provisioning profile and a server-side push certificate used for encrypting RhoConnect->APNS traffic.
1058
1093
 
1059
- NOTE: For testing push, you will need to build and deploy your application to a physical iPhone (or iPad) device. Apple does not support testing push on simulators.
1094
+ **NOTE: For testing push, you will need to build and deploy your application to a physical iPhone (or iPad) device. Apple does not support testing push on simulators.**
1060
1095
 
1061
1096
  #### Setup Push Certificate
1062
1097
  The first step to setting up your environment is to create an APNS push certificate. To create the SSL certificate, follow the "Creating the SSL Certificate and Keys" section on the
@@ -1105,7 +1140,7 @@ Then modify your application's build.yml and specify there google account used t
1105
1140
 
1106
1141
  This is the same address used by RhoConnect to retrieve authtoken. See [here](/rhoconnect/push#android) for more information.
1107
1142
 
1108
- NOTE: **WARNING** This e-mail address MUST NOT be the same as origin of google account on phone! This mean that google account registered on your phone/emulator MUST NOT be push-app@gmail.com; it MUST be another one. This is known bug in Android C2DM implementation - if sender and receiver are the same, underlying android service crash and lose message. More details [here](http://groups.google.com/group/android-c2dm/browse_thread/thread/128790789c4e9d6a/67aca1e1764724d4). This is actual not for all Android versions.
1143
+ **NOTE: WARNING! This e-mail address MUST NOT be the same as origin of google account on phone! This mean that google account registered on your phone/emulator MUST NOT be push-app@gmail.com; it MUST be another one. This is known bug in Android C2DM implementation - if sender and receiver are the same, underlying android service crash and lose message. More details [here](http://groups.google.com/group/android-c2dm/browse_thread/thread/128790789c4e9d6a/67aca1e1764724d4). This is actual not for all Android versions.**
1109
1144
 
1110
1145
  At Android it is possible to set up status bar notifications for PUSH messages. In this case push message is handled by application only after user has opened the notification.
1111
1146
  There are two modes available for push notifications:
@@ -1140,7 +1175,7 @@ Uncomment the last line of the file, which should be 'push.application.reliable.
1140
1175
  #### Setup BlackBerry Simulator
1141
1176
  To listen for incoming messages on BlackBerry, the Rhodes application will start when device powers on and will run a listener thread in the background. You will use the "push_port" option in the [rhoconfig.txt](configuration#run-time-configuration) to specify the listening port for incoming push messages. If "push_port" is not specified, default will be 100 as shown in the previous section.
1142
1177
 
1143
- NOTE: For testing push, the BlackBerry simulator requires a 'kickstart' process. When the simulator starts, open the web browser on the simulator and navigate to any web page (i.e. http://m.google.com/). Now your simulator is ready to receive push messages.
1178
+ **NOTE: For testing push, the BlackBerry simulator requires a 'kickstart' process. When the simulator starts, open the web browser on the simulator and navigate to any web page (i.e. http://m.google.com/). Now your simulator is ready to receive push messages.**
1144
1179
 
1145
1180
  Now you are ready to [testing Push in the RhoConnect Web Console](/rhoconnect/push#testing-push-in-the-web-console).
1146
1181
 
@@ -1363,7 +1398,7 @@ You can customize sheme and host name parts with following build.yml parameters:
1363
1398
  In case if URIHost is specified no path prefix will be used. If no custom URIHost then default one is used (rhomobile.com) and path prefix must contain java package name of your application.
1364
1399
  Optional path and query just passed to your application for further processing.
1365
1400
 
1366
- NOTE: Google recommends to always use common scheme such as 'http', 'https', 'ftp', etc.
1401
+ **NOTE: Google recommends to always use common scheme such as 'http', 'https', 'ftp', etc.**
1367
1402
 
1368
1403
  http scheme example:
1369
1404
  :::html
@@ -77,7 +77,7 @@ module NavBar
77
77
  end
78
78
 
79
79
  end
80
-
80
+ =begin
81
81
  module Rho
82
82
 
83
83
  class RhoConf
@@ -152,7 +152,7 @@ class RhoConf
152
152
  end
153
153
 
154
154
  end
155
-
155
+ =end
156
156
  class RhoLog
157
157
  def initialize
158
158
  end
@@ -578,6 +578,8 @@ namespace "build" do
578
578
  # Store app name
579
579
  File.open(File.join($srcdir, "name"), "w") { |f| f.write($app_config["name"]) }
580
580
 
581
+ Jake.build_file_map( File.join($srcdir, "apps"), "rhofilelist.txt" )
582
+
581
583
  end
582
584
 
583
585
  task :upgrade_package => ["build:iphone:rhobundle"] do
@@ -942,7 +944,7 @@ namespace "run" do
942
944
  simapp = File.join($simdir, $emulator_version, "Applications")
943
945
 
944
946
 
945
- rholog = simapp + "/" + $guid + "/Library/Private Documents/rholog.txt"
947
+ rholog = simapp + "/" + $guid + "/Library/Caches/Private Documents/rholog.txt"
946
948
  puts "log_file=" + rholog
947
949
  end
948
950
 
@@ -1068,7 +1070,7 @@ namespace "run" do
1068
1070
 
1069
1071
  #>>>>>>>>>>
1070
1072
  #`echo "#{$applog}" > "#{$simrhodes}/Documents/rhologpath.txt"`
1071
- rholog = simapp + "/" + $guid + "/Library/Private Documents/rholog.txt"
1073
+ rholog = simapp + "/" + $guid + "/Library/Caches/Private Documents/rholog.txt"
1072
1074
 
1073
1075
 
1074
1076
  simpublic = simapp + "/" + $guid + "/Documents/apps/public"
@@ -77,7 +77,7 @@ LRESULT CDateTimePickerDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LP
77
77
  else {
78
78
  SetWindowText(_T("Date"));
79
79
  }
80
- #if defined(_WIN32_WCE)
80
+ #if defined(_WIN32_WCE) && !defined(OS_PLATFORM_MOTCE)
81
81
 
82
82
  SHINITDLGINFO shidi = { SHIDIM_FLAGS, m_hWnd, SHIDIF_SIZEDLGFULLSCREEN };
83
83
  RHO_ASSERT(SHInitDialog(&shidi));
@@ -87,7 +87,7 @@ LRESULT CDateTimePickerDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LP
87
87
  mbi.hwndParent = m_hWnd;
88
88
  mbi.nToolBarId = IDR_GETURL_MENUBAR;
89
89
  mbi.hInstRes = _AtlBaseModule.GetResourceInstance();
90
- RHO_ASSERT(SHCreateMenuBar(&mbi));
90
+ SHCreateMenuBar(&mbi);
91
91
 
92
92
  SYSTEMTIME times[2]; // min and max times
93
93
  unsigned int flags = 0;
@@ -208,7 +208,7 @@ LRESULT CTimePickerDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM
208
208
  SetWindowText(_T("Date"));
209
209
  }
210
210
 
211
- #if defined(_WIN32_WCE)
211
+ #if defined(_WIN32_WCE) && !defined(OS_PLATFORM_MOTCE)
212
212
 
213
213
  SHINITDLGINFO shidi = { SHIDIM_FLAGS, m_hWnd, SHIDIF_SIZEDLGFULLSCREEN };
214
214
  RHO_ASSERT(SHInitDialog(&shidi));
@@ -217,7 +217,7 @@ LRESULT CTimePickerDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM
217
217
  mbi.hwndParent = m_hWnd;
218
218
  mbi.nToolBarId = IDR_GETURL_MENUBAR;
219
219
  mbi.hInstRes = _AtlBaseModule.GetResourceInstance();
220
- RHO_ASSERT(SHCreateMenuBar(&mbi));
220
+ SHCreateMenuBar(&mbi);
221
221
  GotoDlgCtrl(GetDlgItem(IDC_TIME_CTRL));
222
222
 
223
223
  SYSTEMTIME start_time;
@@ -73,7 +73,7 @@ public:
73
73
  #endif
74
74
 
75
75
  class CDateTimePickerDialog : public
76
- #if defined(OS_WINDOWS)
76
+ #if defined(OS_WINDOWS) || defined(OS_PLATFORM_MOTCE)
77
77
  COkCancelModalDialog<CDateTimePickerDialog>
78
78
  #else
79
79
  CDialogImpl <CDateTimePickerDialog>
@@ -108,7 +108,7 @@ private:
108
108
 
109
109
 
110
110
  class CTimePickerDialog : public
111
- #if defined(OS_WINDOWS)
111
+ #if defined(OS_WINDOWS) || defined(OS_PLATFORM_MOTCE)
112
112
  COkCancelModalDialog<CTimePickerDialog>
113
113
  #else
114
114
  CDialogImpl <CTimePickerDialog>
@@ -31,7 +31,7 @@
31
31
 
32
32
  LRESULT CLogOptionsDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
33
33
  {
34
- #ifdef OS_WINCE
34
+ #if defined( OS_WINCE ) && !defined (OS_PLATFORM_MOTCE)
35
35
  SHINITDLGINFO shidi;
36
36
  shidi.dwMask = SHIDIM_FLAGS;
37
37
  shidi.dwFlags = SHIDIF_SIZEDLGFULLSCREEN;//SHIDIF_DONEBUTTON | SHIDIF_SIZEDLGFULLSCREEN |SHIDIF_EMPTYMENU;
@@ -43,7 +43,7 @@ LRESULT CLogOptionsDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BO
43
43
  mbi.nToolBarId = IDR_LOGOPTIONSMENUBAR; // ID of toolbar resource
44
44
  mbi.hInstRes = _AtlBaseModule.GetResourceInstance();
45
45
  mbi.dwFlags = SHCMBF_HMENU;
46
- RHO_ASSERT(SHCreateMenuBar(&mbi));
46
+ SHCreateMenuBar(&mbi);
47
47
  #endif //OS_WINCE
48
48
 
49
49
  SendDlgItemMessage(IDC_CBXLEVELS,CB_ADDSTRING,0, (LPARAM)_T("Trace"));
@@ -41,7 +41,9 @@ rho::common::CMutex CLogView::m_ViewFlushLock;
41
41
 
42
42
  LRESULT CLogView::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
43
43
  {
44
- #ifdef OS_WINCE
44
+ #if defined( OS_WINCE )
45
+
46
+ #if !defined (OS_PLATFORM_MOTCE)
45
47
  SHINITDLGINFO shidi;
46
48
  shidi.dwMask = SHIDIM_FLAGS;
47
49
  shidi.dwFlags = SHIDIF_SIZEDLGFULLSCREEN;//SHIDIF_DONEBUTTON | SHIDIF_SIZEDLGFULLSCREEN |SHIDIF_EMPTYMENU;
@@ -56,6 +58,7 @@ LRESULT CLogView::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
56
58
  SHCreateMenuBar(&mbi);
57
59
 
58
60
  // SendDlgItemMessage(IDC_LOGEDIT,WM_SETFONT, (WPARAM)GetStockObject(SYSTEM_FONT),0);
61
+ #endif
59
62
 
60
63
  loadLogText();
61
64
 
@@ -446,7 +446,7 @@ LRESULT CMainWindow::OnActivate(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOO
446
446
  int fActive = LOWORD(wParam);
447
447
  rho_rhodesapp_callAppActiveCallback(fActive);
448
448
 
449
- #if defined(_WIN32_WCE)
449
+ #if defined(_WIN32_WCE) && !defined (OS_PLATFORM_MOTCE)
450
450
  // Notify shell of our WM_ACTIVATE message
451
451
  SHHandleWMActivate(m_hWnd, wParam, lParam, &m_sai, 0);
452
452
 
@@ -613,8 +613,11 @@ LRESULT CMainWindow::OnSettingChange(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam
613
613
  rho_rhodesapp_callScreenRotationCallback(width, height, 90);
614
614
  }
615
615
 
616
+ #if !defined (OS_PLATFORM_MOTCE)
616
617
  // Notify shell of our WM_SETTINGCHANGE message
617
618
  SHHandleWMSettingChange(m_hWnd, wParam, lParam, &m_sai);
619
+ #endif
620
+
618
621
  #endif
619
622
  return 0;
620
623
  }
@@ -90,8 +90,9 @@ LRESULT CRhoMapViewDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*
90
90
  {
91
91
  SetWindowText(_T("MapView"));
92
92
 
93
- #if defined(_WIN32_WCE)
93
+ #if defined(_WIN32_WCE)
94
94
 
95
+ #if !defined (OS_PLATFORM_MOTCE)
95
96
  SHINITDLGINFO shidi = { SHIDIM_FLAGS, m_hWnd, SHIDIF_SIZEDLGFULLSCREEN };
96
97
  RHO_ASSERT(SHInitDialog(&shidi));
97
98
 
@@ -102,7 +103,7 @@ LRESULT CRhoMapViewDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*
102
103
  mbi.hInstRes = _AtlBaseModule.GetResourceInstance();
103
104
 
104
105
  SHCreateMenuBar(&mbi);
105
- //RHO_ASSERT(SHCreateMenuBar(&mbi));
106
+ #endif
106
107
 
107
108
  //::SetWindowLong(GetDlgItem(IDC_SLIDER_ZOOM).m_hWnd,
108
109
  // GWL_EXSTYLE,
@@ -26,7 +26,7 @@
26
26
 
27
27
  #pragma once
28
28
 
29
- #if defined(OS_WINDOWS)
29
+ #if defined(OS_WINDOWS) || defined(OS_PLATFORM_MOTCE)
30
30
 
31
31
  template <class T> class COkCancelModalDialog : public CDialogImpl<T>
32
32
  {
@@ -64,10 +64,10 @@ private:
64
64
  void Maximize ()
65
65
  {
66
66
  RECT rect;
67
- NONCLIENTMETRICS ncm = { sizeof(NONCLIENTMETRICS) };
67
+
68
68
 
69
69
  GetParent().GetWindowRect(&rect);
70
- SystemParametersInfo ( SPI_GETNONCLIENTMETRICS, 0, &ncm, false );
70
+
71
71
 
72
72
  m_width = rect.right - rect.left - GetSystemMetrics(SM_CXEDGE)*2;
73
73
  m_height = rect.bottom - rect.top - GetSystemMetrics(SM_CYCAPTION) - GetSystemMetrics(SM_CYEDGE)*2;
@@ -75,8 +75,15 @@ private:
75
75
  GetSystemMetrics(SM_CXEDGE) : GetSystemMetrics(SM_CXBORDER);
76
76
  m_yborder = GetSystemMetrics(SM_CYEDGE) > GetSystemMetrics(SM_CYBORDER) ?
77
77
  GetSystemMetrics(SM_CYEDGE) : GetSystemMetrics(SM_CYBORDER);
78
- m_btnHeight = ncm.iMenuHeight+ncm.iBorderWidth * 4 + 2;
79
78
 
79
+
80
+ #if !defined(OS_PLATFORM_MOTCE)
81
+ NONCLIENTMETRICS ncm = { sizeof(NONCLIENTMETRICS) };
82
+ SystemParametersInfo ( SPI_GETNONCLIENTMETRICS, 0, &ncm, false );
83
+ m_btnHeight = ncm.iMenuHeight+ncm.iBorderWidth * 4 + 2;
84
+ #else
85
+ m_btnHeight = GetSystemMetrics(SM_CYMENU) + GetSystemMetrics(SM_CYBORDER)*4 + 2;
86
+ #endif
80
87
  MoveWindow(rect.left + m_xborder, rect.top + GetSystemMetrics(SM_CYCAPTION), m_width, m_height);
81
88
  }
82
89
 
@@ -1144,7 +1144,7 @@ LRESULT CRhoBluetoothDiscoverDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/,
1144
1144
  mbi.hwndParent = m_hWnd;
1145
1145
  mbi.nToolBarId = IDR_GETURL_MENUBAR;
1146
1146
  mbi.hInstRes = _AtlBaseModule.GetResourceInstance();
1147
- RHO_ASSERT(SHCreateMenuBar(&mbi));
1147
+ SHCreateMenuBar(&mbi);
1148
1148
  //GotoDlgCtrl(GetDlgItem(IDC_DATE_CTRL));
1149
1149
 
1150
1150
  #else
@@ -1211,7 +1211,7 @@ LRESULT CRhoBluetoothDiscoveredDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*
1211
1211
  mbi.hwndParent = m_hWnd;
1212
1212
  mbi.nToolBarId = IDR_GETURL_MENUBAR;
1213
1213
  mbi.hInstRes = _AtlBaseModule.GetResourceInstance();
1214
- RHO_ASSERT(SHCreateMenuBar(&mbi));
1214
+ SHCreateMenuBar(&mbi);
1215
1215
  //GotoDlgCtrl(GetDlgItem(IDC_DATE_CTRL));
1216
1216
 
1217
1217
  #else
@@ -124,7 +124,7 @@ LRESULT CRhoSignatureWindow::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPAR
124
124
  mbi.hwndParent = m_hWnd;
125
125
  mbi.nToolBarId = IDR_GETURL_MENUBAR;
126
126
  mbi.hInstRes = _AtlBaseModule.GetResourceInstance();
127
- RHO_ASSERT(SHCreateMenuBar(&mbi));
127
+ SHCreateMenuBar(&mbi);
128
128
  #elif defined( OS_PLATFORM_MOTCE )
129
129
  m_hWndCommandBar = CommandBar_Create(_AtlBaseModule.GetResourceInstance(), m_hWnd, 1);
130
130
  TBBUTTON oBtn = {0};
@@ -403,7 +403,7 @@
403
403
  IgnoreImportLibrary="true"
404
404
  UseUnicodeResponseFiles="false"
405
405
  AdditionalOptions=" /subsystem:windowsce,5.0 /machine:THUMB"
406
- AdditionalDependencies="aygshell.lib Ws2.lib Ceshell.lib wininet.lib comsuppwd.lib"
406
+ AdditionalDependencies="Ws2.lib Ceshell.lib wininet.lib"
407
407
  OutputFile="$(OutDir)/rhodes.exe"
408
408
  LinkIncremental="2"
409
409
  AdditionalLibraryDirectories="$(OutDir)"
@@ -1004,7 +1004,7 @@
1004
1004
  IgnoreImportLibrary="true"
1005
1005
  UseUnicodeResponseFiles="false"
1006
1006
  AdditionalOptions=" /subsystem:windowsce,5.00 /machine:THUMB"
1007
- AdditionalDependencies="Ws2.lib Ceshell.lib wininet.lib comsuppw.lib"
1007
+ AdditionalDependencies="Ws2.lib wininet.lib Ceshell.lib"
1008
1008
  OutputFile="$(OutDir)/rhodes.exe"
1009
1009
  LinkIncremental="1"
1010
1010
  AdditionalLibraryDirectories="$(OutDir)"
@@ -124,17 +124,17 @@
124
124
  #include <tpcshell.h>
125
125
  #endif
126
126
 
127
- #if defined(_WIN32_WCE)
127
+ #if defined(_WIN32_WCE) && !defined(OS_PLATFORM_MOTCE)
128
128
  #include <aygshell.h>
129
129
  #pragma comment(lib, "aygshell.lib")
130
130
  //#include <tpcshell.h> // Required for SHSendBackToFocusWindow
131
- #endif // SHELL_AYGSHELL
131
+ //#endif // SHELL_AYGSHELL
132
132
 
133
- #ifndef OS_PLATFORM_CE
133
+ //#ifndef OS_PLATFORM_MOTCE
134
134
  #define _WTL_CE_NO_ZOOMSCROLL
135
135
  #define _WTL_CE_NO_CONTROLS
136
136
  #include <atlwince.h>
137
- #endif //OS_PLATFORM_CE
137
+ #endif
138
138
 
139
139
  #undef max
140
140
  #undef min
@@ -245,7 +245,13 @@ namespace rho.net
245
245
  else
246
246
  LOG.INFO("Request was cancelled by user.");
247
247
  }
248
- catch (Exception)
248
+ catch (ArgumentNullException e)
249
+ {
250
+ m_code = 1;
251
+ m_respWaitEvent.Set();
252
+ return;
253
+ }
254
+ catch (Exception e)
249
255
  {
250
256
  ///LOG.ERROR("EndGetResponse", e);
251
257
  m_respWaitEvent.Set();
@@ -53,7 +53,7 @@ namespace rho.rubyext
53
53
  {
54
54
  try
55
55
  {
56
- RhoConf.getInstance().setString(name, value as String, true);
56
+ RhoConf.getInstance().setString(name, value.ToString(), true);
57
57
 
58
58
  RhoLogger.getLogConf().loadFromConf(RhoConf.getInstance());
59
59
  }
@@ -164,7 +164,7 @@ end
164
164
  res.should > 0
165
165
  end
166
166
 
167
- if !defined?(RHO_WP7)
167
+
168
168
  it "should update syncserver at runtime" do
169
169
 
170
170
  dbRes = ::Rho::RHO.get_user_db().select_from_table('client_info','token,token_sent')
@@ -181,7 +181,7 @@ if !defined?(RHO_WP7)
181
181
  SyncEngine.set_syncserver(saveSrv)
182
182
  Rho::RhoConfig.syncserver.should == saveSrv
183
183
  end
184
- end
184
+
185
185
 
186
186
  it "should not sync without login" do
187
187
  SyncEngine.logged_in.should == 0
@@ -317,7 +317,7 @@ end
317
317
  cust22.first.should == cust2.first
318
318
 
319
319
  end
320
- if !defined?(RHO_WP7)
320
+
321
321
  it "should process error sync" do
322
322
 
323
323
  records = ::Rho::RHO.get_user_db().select_from_table('changed_values','*')
@@ -346,7 +346,7 @@ if !defined?(RHO_WP7)
346
346
  records.length.should == 0
347
347
 
348
348
  end
349
- end
349
+
350
350
  it "should modify Product" do
351
351
  SyncEngine.logged_in.should == 1
352
352
 
data/version CHANGED
@@ -1 +1 @@
1
- 3.3.2.beta.2
1
+ 3.3.2.beta.3
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhodes
3
3
  version: !ruby/object:Gem::Version
4
- hash: 62196455
4
+ hash: 62196453
5
5
  prerelease: true
6
6
  segments:
7
7
  - 3
8
8
  - 3
9
9
  - 2
10
10
  - beta
11
- - 2
12
- version: 3.3.2.beta.2
11
+ - 3
12
+ version: 3.3.2.beta.3
13
13
  platform: ruby
14
14
  authors:
15
15
  - Rhomobile
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2012-01-27 00:00:00 -08:00
20
+ date: 2012-01-30 00:00:00 -08:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency