rhodes 3.3.3.beta.3 → 3.3.3.beta.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. data/Manifest.txt +16 -1
  2. data/Rakefile +77 -28
  3. data/doc/build.txt +5 -3
  4. data/doc/configuration.txt +13 -0
  5. data/doc/device-caps.txt +46 -27
  6. data/doc/rhom.txt +2 -2
  7. data/doc/test-log-debug.txt +6 -0
  8. data/doc/ui.txt +13 -0
  9. data/lib/build/jake.rb +11 -11
  10. data/lib/extensions/crypt/crypt/cbc.rb +5 -2
  11. data/lib/extensions/nfc/ext/nfc/platform/android/src/com/rhomobile/nfc/Nfc.java +14 -4
  12. data/lib/framework/rho/render.rb +17 -4
  13. data/lib/framework/rho/rho.rb +1 -1
  14. data/lib/framework/rho/rhocontroller.rb +11 -1
  15. data/lib/framework/rhomotoapi.rb +110 -0
  16. data/platform/android/Rhodes/jni/Android.mk +2 -5
  17. data/platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h +1 -0
  18. data/platform/android/Rhodes/jni/include/rhodes/fileapi.h +38 -0
  19. data/platform/android/Rhodes/jni/src/callbacks.cpp +7 -26
  20. data/platform/android/Rhodes/jni/src/extmanager.cpp +4 -1
  21. data/platform/android/Rhodes/jni/src/fileapi.cpp +38 -14
  22. data/platform/android/Rhodes/jni/src/mapview.cpp +1 -2
  23. data/platform/android/Rhodes/jni/src/rhodesapp.cpp +10 -0
  24. data/platform/android/Rhodes/jni/src/rhodessystem.cpp +1 -1
  25. data/platform/android/Rhodes/jni/src/signature.cpp +1 -4
  26. data/platform/android/Rhodes/rhobundle.xml +1 -1
  27. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +11 -1
  28. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivityListener.java +4 -3
  29. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +26 -6
  30. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +3 -1
  31. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/AbstractRhoExtension.java +70 -0
  32. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtData.java +3 -1
  33. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtManager.java +21 -7
  34. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtension.java +19 -10
  35. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtDataImpl.java +8 -5
  36. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtManager.java +18 -0
  37. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtManagerImpl.java +168 -31
  38. data/platform/android/Rhodes/src/com/rhomobile/rhodes/file/RhoFileApi.java +46 -9
  39. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +3 -2
  40. data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/Signature.java +27 -53
  41. data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/SignatureView.java +27 -3
  42. data/platform/android/Rhodes/src/com/rhomobile/rhodes/util/Utils.java +13 -14
  43. data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebViewClient.java +12 -5
  44. data/platform/android/build/RhodesSRC_build.files +2 -1
  45. data/platform/android/build/android.rake +48 -17
  46. data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyAPI.java +1 -1
  47. data/platform/bb/rhodes/src/rhomobile/RhodesApplication.java +24 -3
  48. data/platform/iphone/Classes/AppManager/AppManager.m +1 -1
  49. data/platform/iphone/Classes/Camera/PickImageDelegate.m +27 -2
  50. data/platform/iphone/Classes/DateTimePickerDelegate.h +2 -0
  51. data/platform/iphone/Classes/DateTimePickerDelegate.m +85 -9
  52. data/platform/iphone/Classes/DateTimePickerViewController.h +21 -0
  53. data/platform/iphone/Classes/DateTimePickerViewController.m +75 -0
  54. data/platform/iphone/Classes/GeoLocation/LocationController.h +6 -2
  55. data/platform/iphone/Classes/GeoLocation/LocationController.m +54 -14
  56. data/platform/iphone/Classes/RhoMainView.h +2 -0
  57. data/platform/iphone/Classes/Rhodes.m +11 -5
  58. data/platform/iphone/Classes/Signature/SignatureDelegate.m +13 -12
  59. data/platform/iphone/Classes/Signature/SignatureViewController.m +2 -1
  60. data/platform/iphone/Classes/SimpleMainView.m +3 -0
  61. data/platform/iphone/Classes/SplitView/SplittedMainView.m +3 -0
  62. data/platform/iphone/Classes/TabbedMainView.m +30 -11
  63. data/platform/iphone/rbuild/iphone.rake +7 -1
  64. data/platform/iphone/rhorunner.xcodeproj/project.pbxproj +6 -0
  65. data/platform/shared/RhoConnectClient/RhoConnectClient.cpp +1 -1
  66. data/platform/shared/common/BundleManager.cpp +42 -2
  67. data/platform/shared/common/ExtManager.h +7 -0
  68. data/platform/shared/common/RhoFile.cpp +170 -2
  69. data/platform/shared/common/RhoFile.h +4 -0
  70. data/platform/shared/common/RhodesApp.cpp +30 -0
  71. data/platform/shared/common/RhodesApp.h +1 -0
  72. data/platform/shared/common/map/OSMMapEngine.cpp +11 -3
  73. data/platform/shared/common/map/OSMMapEngine.h +3 -0
  74. data/platform/shared/logging/RhoLogConf.cpp +8 -9
  75. data/platform/shared/logging/RhoLogConf.h +5 -7
  76. data/platform/shared/logging/RhoLogSink.cpp +3 -3
  77. data/platform/shared/logging/RhoLogSink.h +1 -1
  78. data/platform/shared/net/HttpServer.cpp +17 -9
  79. data/platform/shared/qt/rhodes/main.cpp +1 -1
  80. data/platform/shared/ruby/ext/rho/rhoruby.c +4 -0
  81. data/platform/shared/ruby/ext/webview/webview.i +9 -4
  82. data/platform/shared/ruby/ext/webview/webview_wrap.c +2 -2
  83. data/platform/shared/test/Tests.cpp +2 -2
  84. data/platform/wm/build/build_inf.js +75 -47
  85. data/platform/wm/build/wm.rake +50 -53
  86. data/platform/wm/rhodes/Rhodes.cpp +40 -97
  87. data/platform/wm/rhodes/rho/common/ExtManager.cpp +23 -1
  88. data/platform/wm/rhodes/rho/rubyext/WebView.cpp +9 -0
  89. data/platform/wm/tools/detool/detool.cpp +103 -52
  90. data/platform/wp7/RhoRubyExtGen/RhoDateTimePicker.cs +60 -0
  91. data/platform/wp7/RhoRubyExtGen/RhoRubyExtGen.csproj +1 -0
  92. data/platform/wp7/RhoRubyExtGen/RhoWebView.cs +4 -4
  93. data/platform/wp7/RhoRubyLib/Initializers.Generated.cs +15 -1
  94. data/platform/wp7/RhoRubyLib/RhoRubyLib.csproj +12 -2
  95. data/platform/wp7/RhoRubyLib/WP_PlatformAdaptationLayer.cs +2 -0
  96. data/platform/wp7/RhoRubyLib/common/RhoFile.cs +3 -3
  97. data/platform/wp7/RhoRubyLib/common/RhoFilePath.cs +2 -2
  98. data/platform/wp7/RhoRubyLib/common/RhodesApp.cs +39 -24
  99. data/platform/wp7/RhoRubyLib/json/RJSONTokener.cs +8 -1
  100. data/platform/wp7/RhoRubyLib/logging/RhoLogServerSink.cs +3 -3
  101. data/platform/wp7/RhoRubyLib/logging/RhoLogger.cs +1 -1
  102. data/platform/wp7/RhoRubyLib/net/HttpServer.cs +22 -15
  103. data/platform/wp7/RhoRubyLib/net/NetRequest.cs +1 -1
  104. data/platform/wp7/RhoRubyLib/rubyext/RhoDateTimePicker.cs +237 -0
  105. data/platform/wp7/RhoRubyLib/rubyext/RhoWebView.cs +5 -5
  106. data/platform/wp7/RhoRubyLib/views/RhoDateTimeDlg.xaml +37 -0
  107. data/platform/wp7/RhoRubyLib/views/RhoDateTimeDlg.xaml.cs +59 -0
  108. data/platform/wp7/RhoRubyLib/views/RhoView.xaml.cs +34 -41
  109. data/platform/wp7/rhodes/App.xaml.cs +1 -0
  110. data/platform/wp7/rhodes/Properties/WMAppManifest.xml +18 -18
  111. data/platform/wp7/rhodes/Rhodes.csproj +5 -1
  112. data/platform/wp7/rhodes/Toolkit.Content/ApplicationBar.Cancel.png +0 -0
  113. data/platform/wp7/rhodes/Toolkit.Content/ApplicationBar.Check.png +0 -0
  114. data/rakefile.rb +77 -28
  115. data/res/build-tools/Microsoft.Phone.Controls.Toolkit.dll +0 -0
  116. data/res/build-tools/YUICompressorLicense.txt +54 -0
  117. data/res/build-tools/detool.exe +0 -0
  118. data/res/build-tools/yuicompressor-2.4.7.jar +0 -0
  119. data/res/generators/templates/application/app/layout.erb +1 -0
  120. data/res/generators/templates/application/public/js/jquery-wp7-patch.js +8 -2
  121. data/res/generators/templates/application/public/js/syncengine.js +147 -0
  122. data/spec/phone_spec/app/Data/septest.json +1 -1
  123. data/spec/phone_spec/app/spec/asynchttp_spec.rb +11 -10
  124. data/spec/phone_spec/app/spec/blobsync_spec.rb +9 -34
  125. data/spec/phone_spec/app/spec/date_spec.rb +6 -6
  126. data/spec/phone_spec/app/spec/rho_spec.rb +1 -6
  127. data/spec/phone_spec/app/spec/rhofile_spec.rb +13 -7
  128. data/spec/phone_spec/app/spec/rhom_object_spec.rb +4 -3
  129. data/spec/phone_spec/app/spec/syncengine_spec.rb +12 -14
  130. data/spec/phone_spec/app/spec_runner.rb +9 -10
  131. data/version +1 -1
  132. metadata +20 -5
  133. data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtManagerSingleton.java +0 -15
@@ -212,7 +212,7 @@ public class RubyAPI {
212
212
  className = ((RubyClass)receiver).getName() + "::";
213
213
  else
214
214
  {
215
- if ( receiver.getRubyClass() != null )
215
+ if ( receiver != null && receiver.getRubyClass() != null )
216
216
  className = receiver.getRubyClass().getName() + ".";
217
217
  }
218
218
 
@@ -99,6 +99,7 @@ final public class RhodesApplication extends RhodesApplicationPlatform implement
99
99
  public static final String LABEL_CLOSE = "Close";
100
100
  public static final String LABEL_EXIT = "Exit";
101
101
  public static final String LABEL_NONE = "none";
102
+ public static final String LABEL_COPYPASTE = "copy_paste";
102
103
 
103
104
  private static final RhoLogger LOG = RhoLogger.RHO_STRIP_LOG ? new RhoEmptyLogger() :
104
105
  new RhoLogger("RhodesApplication");
@@ -507,7 +508,9 @@ final public class RhodesApplication extends RhodesApplicationPlatform implement
507
508
  if ( ClientRegister.getInstance() != null )
508
509
  ClientRegister.getInstance().Destroy();
509
510
 
510
- RhoRuby.rho_ruby_deactivateApp();
511
+ if (!m_bInDeactivate)
512
+ RhoRuby.rho_ruby_deactivateApp();
513
+
511
514
  RhoRuby.rho_ruby_uiDestroyed();
512
515
 
513
516
  GeoLocation.stop();
@@ -565,6 +568,7 @@ final public class RhodesApplication extends RhodesApplicationPlatform implement
565
568
  private static boolean m_bRubyInit = false;
566
569
  public void activate()
567
570
  {
571
+ m_bInDeactivate = false;
568
572
  if (!m_bActivate)
569
573
  rhodes_activate();
570
574
  else
@@ -670,9 +674,11 @@ final public class RhodesApplication extends RhodesApplicationPlatform implement
670
674
  }
671
675
  }
672
676
 
677
+ boolean m_bInDeactivate = false;
673
678
  public void deactivate() {
674
679
  LOG.TRACE("Rhodes deactivate ***--------------------------***");
675
680
 
681
+ m_bInDeactivate = true;
676
682
  RhoRuby.rho_ruby_deactivateApp();
677
683
 
678
684
  // SyncEngine.stop(null);
@@ -839,7 +845,8 @@ final public class RhodesApplication extends RhodesApplicationPlatform implement
839
845
  }
840
846
 
841
847
  private Vector menuItems = new Vector();
842
-
848
+ private boolean m_bMenuCopyPaste = false;
849
+
843
850
  private MenuItem homeItem = new MenuItem("", 200000, 10) {
844
851
  public void run() {
845
852
  navigateHome();
@@ -895,8 +902,11 @@ final public class RhodesApplication extends RhodesApplicationPlatform implement
895
902
  super.makeMenu(menu, instance);
896
903
  return;
897
904
  }
905
+ //return;
906
+
907
+ if (!m_bMenuCopyPaste)
908
+ menu.deleteAll();
898
909
 
899
- menu.deleteAll();
900
910
  // Don't draw menu if menuItems is null
901
911
  if (menuItems == null)
902
912
  return;
@@ -955,6 +965,8 @@ final public class RhodesApplication extends RhodesApplicationPlatform implement
955
965
  setDefaultItemToMenuItems(label, closeItem);
956
966
  } else if (label.equalsIgnoreCase(RhodesApplication.LABEL_NONE)) {
957
967
  menuItems = null;
968
+ } else if (value.equalsIgnoreCase(RhodesApplication.LABEL_COPYPASTE)) {
969
+ m_bMenuCopyPaste = true;
958
970
  } else {
959
971
  MenuItem itemToAdd = new MenuItem(label, 200000, 10)
960
972
  {
@@ -1029,6 +1041,7 @@ final public class RhodesApplication extends RhodesApplicationPlatform implement
1029
1041
 
1030
1042
  public void setMenuItems(Vector menuItems) {
1031
1043
  this.menuItems = menuItems;
1044
+ m_bMenuCopyPaste = false;
1032
1045
  }
1033
1046
 
1034
1047
  public MenuItem getSavedGetLinkItem() {
@@ -1371,6 +1384,14 @@ final public class RhodesApplication extends RhodesApplicationPlatform implement
1371
1384
  _mainScreen.close();
1372
1385
  }
1373
1386
  });
1387
+
1388
+ this.invokeLater(new Runnable() {
1389
+ public void run()
1390
+ {
1391
+ System.exit(1);
1392
+ }
1393
+ });
1394
+
1374
1395
  }
1375
1396
 
1376
1397
  boolean m_bDisableInput = false;
@@ -406,7 +406,7 @@ BOOL isPathIsSymLink(NSFileManager *fileManager, NSString* path) {
406
406
  #endif
407
407
  }
408
408
 
409
- rho_logconf_Init_with_separate_user_path(rho_native_rhopath(), "", rho_native_rhouserpath());
409
+ rho_logconf_Init_with_separate_user_path(rho_native_rhopath(), rho_native_rhopath(), "", rho_native_rhouserpath());
410
410
  rho_rhodesapp_create_with_separate_user_path(rho_native_rhopath(), rho_native_rhouserpath());
411
411
  RAWLOG_INFO("Rhodes started");
412
412
  }
@@ -485,10 +485,11 @@ VALUE get_camera_info(const char* camera_type) {
485
485
  }
486
486
  }
487
487
 
488
- if ([platform isEqualToString:@"iPad1,1"]) {
488
+ if ([platform hasPrefix:@"iPad1"]) {
489
489
  // iPad
490
490
  }
491
- if ([platform isEqualToString:@"iPad2,1"]) {
491
+ else
492
+ if ([platform hasPrefix:@"iPad2"]) {
492
493
  // iPad 2
493
494
  if (!isFront) {
494
495
  w = 960;
@@ -498,6 +499,30 @@ VALUE get_camera_info(const char* camera_type) {
498
499
  w = 640;
499
500
  h = 480;
500
501
  }
502
+ }
503
+ else
504
+ if ([platform hasPrefix:@"iPad3"]) {
505
+ // iPad 3
506
+ if (!isFront) {
507
+ w = 2592;
508
+ h = 1936;
509
+ }
510
+ else {
511
+ w = 640;
512
+ h = 480;
513
+ }
514
+ }
515
+ else
516
+ if ([platform hasPrefix:@"iPad"]) {
517
+ // iPad 3/4 ?
518
+ if (!isFront) {
519
+ w = 2592;
520
+ h = 1936;
521
+ }
522
+ else {
523
+ w = 640;
524
+ h = 480;
525
+ }
501
526
  }
502
527
 
503
528
  if ((w <= 0) || (h <= 0)) {
@@ -28,6 +28,7 @@
28
28
  #import <Foundation/Foundation.h>
29
29
  #import "RhoDelegate.h"
30
30
  #import "DateTime.h"
31
+ #import "DateTimePickerViewController.h"
31
32
 
32
33
  @interface DateTimePickerDelegate : RhoDelegate <UIPickerViewDelegate>
33
34
  {
@@ -37,6 +38,7 @@
37
38
  UIToolbar *toolbar;
38
39
  UILabel *barLabel;
39
40
  DateTime *dateTime;
41
+ DateTimePickerViewController* dt_controller;
40
42
  }
41
43
 
42
44
  @property (nonatomic, retain) DateTime *dateTime;
@@ -27,6 +27,8 @@
27
27
  #import "DateTimePickerDelegate.h"
28
28
  #import "common/RhodesApp.h"
29
29
  #import "ruby/ext/rho/rhoruby.h"
30
+ #import "DateTimePickerViewController.h"
31
+ #import "Rhodes.h"
30
32
 
31
33
 
32
34
  static NSString* ourChangeValueCallback = nil;
@@ -166,6 +168,20 @@ static NSString* ourChangeValueCallback = nil;
166
168
  // Add toolbar to view
167
169
  [self createPickerBar:pickerFrame];
168
170
 
171
+
172
+ //pickerFrame.origin.y = self.toolbar.frame.size.height;
173
+
174
+ CGRect totalrect = CGRectMake( parentFrame.origin.x,
175
+ parentFrame.origin.y + parentFrame.size.height - pickerSize.height - self.toolbar.frame.size.height,
176
+ pickerSize.width,
177
+ pickerSize.height + self.toolbar.frame.size.height);
178
+
179
+
180
+ [self.pickerView setFrame:pickerFrame];
181
+
182
+
183
+
184
+ /*
169
185
  // Add picker to view
170
186
  [parentView addSubview:self.pickerView];
171
187
 
@@ -181,22 +197,62 @@ static NSString* ourChangeValueCallback = nil;
181
197
  self.pickerView.frame = pickerFrame;
182
198
 
183
199
  [UIView commitAnimations];
200
+ */
201
+
202
+ //parentFrame.origin.y += totalrect.size.height;
203
+
204
+ dt_controller = [[DateTimePickerViewController alloc] initWithRect:parentFrame];
205
+
206
+ [dt_controller makeTransparencyBackground];
207
+
208
+ [dt_controller.view addSubview:self.toolbar];
209
+ [dt_controller.view addSubview:self.barLabel];
210
+ [dt_controller.view addSubview:self.pickerView];
211
+
212
+ self.pickerView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleWidth;
213
+ self.barLabel.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleWidth;
214
+ self.toolbar.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleWidth;
215
+
216
+ //[[[[Rhodes sharedInstance] mainView] getMainViewController] presentViewController:ctrl animated:YES completion:nil];
217
+ //[ctrl release];
218
+
219
+
220
+
221
+ [parentView addSubview:dt_controller.view];
222
+
223
+ CGRect startFrame = parentFrame;
224
+ startFrame.origin.y = parentFrame.origin.y + parentFrame.size.height - totalrect.size.height;
225
+ dt_controller.view.frame = startFrame;
226
+
227
+ [UIView beginAnimations:nil context:NULL];
228
+ [UIView setAnimationDuration:0.3];
229
+
230
+ [UIView setAnimationDelegate:self];
231
+ [UIView setAnimationDidStopSelector:@selector(slideUpDidStop)];
232
+
233
+ dt_controller.view.frame = parentFrame;
234
+
235
+ [UIView commitAnimations];
236
+
237
+
184
238
  }
185
239
  }
186
240
 
187
241
  - (void)slideUpDidStop
188
242
  {
189
243
  // the date picker has finished sliding upwards, so add toolbar
190
- [self.parentView addSubview:self.toolbar];
191
- [self.parentView addSubview:self.barLabel];
244
+ //[self.parentView addSubview:self.toolbar];
245
+ //[self.parentView addSubview:self.barLabel];
246
+ [dt_controller makeGrayBacground];
192
247
  [self.pickerView addTarget:self action:@selector(onChangeValue:) forControlEvents:UIControlEventValueChanged];
193
248
  }
194
249
 
195
250
  - (void)slideDownDidStop
196
251
  {
197
252
  // the date picker has finished sliding downwards, so remove it
198
- [self.pickerView removeFromSuperview];
199
- [self.pickerView release];
253
+ [dt_controller.view removeFromSuperview];
254
+ [dt_controller release];
255
+ [self.pickerView release];
200
256
  self.pickerView = nil;
201
257
  [self.barLabel release];
202
258
  self.barLabel = nil;
@@ -207,9 +263,11 @@ static NSString* ourChangeValueCallback = nil;
207
263
  - (void)animateDown
208
264
  {
209
265
  CGRect parentFrame = parentView.frame;
210
- CGRect endFrame = pickerView.frame;
211
- endFrame.origin.y = parentFrame.origin.y + parentFrame.size.height;
266
+ CGRect endFrame = dt_controller.view.frame;
267
+ endFrame.origin.y += self.pickerView.frame.size.height + self.toolbar.frame.size.height;
212
268
  // start the slide down animation
269
+ [dt_controller makeTransparencyBackground];
270
+
213
271
  [UIView beginAnimations:nil context:NULL];
214
272
  [UIView setAnimationDuration:0.3];
215
273
 
@@ -218,10 +276,10 @@ static NSString* ourChangeValueCallback = nil;
218
276
  [UIView setAnimationDidStopSelector:@selector(slideDownDidStop)];
219
277
 
220
278
  // Remove toolbar immediately
221
- [self.barLabel removeFromSuperview];
222
- [self.toolbar removeFromSuperview];
279
+ //[self.barLabel removeFromSuperview];
280
+ //[self.toolbar removeFromSuperview];
223
281
 
224
- self.pickerView.frame = endFrame;
282
+ dt_controller.view.frame = endFrame;
225
283
  [UIView commitAnimations];
226
284
  }
227
285
 
@@ -235,6 +293,15 @@ static NSString* ourChangeValueCallback = nil;
235
293
  [postUrl cStringUsingEncoding:[NSString defaultCStringEncoding]],
236
294
  0, [self.dateTime.data cStringUsingEncoding:[NSString defaultCStringEncoding]], 1 );
237
295
  [self animateDown];
296
+ /*
297
+ [[[[Rhodes sharedInstance] mainView] getMainViewController] dismissViewControllerAnimated:YES completion:nil];
298
+ [self.pickerView release];
299
+ self.pickerView = nil;
300
+ [self.barLabel release];
301
+ self.barLabel = nil;
302
+ [self.toolbar release];
303
+ self.toolbar = nil;
304
+ */
238
305
  }
239
306
 
240
307
  - (IBAction)dateAction:(id)sender
@@ -252,6 +319,15 @@ static NSString* ourChangeValueCallback = nil;
252
319
  ldate, [self.dateTime.data cStringUsingEncoding:[NSString defaultCStringEncoding]], 0 );
253
320
 
254
321
  [self animateDown];
322
+ /*
323
+ [[[[Rhodes sharedInstance] mainView] getMainViewController] dismissViewControllerAnimated:YES completion:nil];
324
+ [self.pickerView release];
325
+ self.pickerView = nil;
326
+ [self.barLabel release];
327
+ self.barLabel = nil;
328
+ [self.toolbar release];
329
+ self.toolbar = nil;
330
+ */
255
331
  }
256
332
 
257
333
  +(void)setChangeValueCallback:(NSString*)callback {
@@ -0,0 +1,21 @@
1
+ //
2
+ // DateTimePickerViewController.h
3
+ // rhorunner
4
+ //
5
+ // Created by Dmitry Soldatenkov on 02.03.12.
6
+ // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7
+ //
8
+
9
+ #import <UIKit/UIKit.h>
10
+ #import "RhoViewController.h"
11
+
12
+ @interface DateTimePickerViewController : RhoViewController {
13
+ CGRect myrect;
14
+ }
15
+
16
+ - (id)initWithRect:(CGRect)rect;
17
+
18
+ -(void)makeTransparencyBackground;
19
+ -(void)makeGrayBacground;
20
+
21
+ @end
@@ -0,0 +1,75 @@
1
+ //
2
+ // DateTimePickerViewController.m
3
+ // rhorunner
4
+ //
5
+ // Created by Dmitry Soldatenkov on 02.03.12.
6
+ // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7
+ //
8
+
9
+ #import "DateTimePickerViewController.h"
10
+
11
+ @interface DateTimePickerViewController ()
12
+
13
+ @end
14
+
15
+ @implementation DateTimePickerViewController
16
+
17
+ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
18
+ {
19
+ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
20
+ if (self) {
21
+ // Custom initialization
22
+ }
23
+ return self;
24
+ }
25
+
26
+ - (id)initWithRect:(CGRect)rect
27
+ {
28
+ self = [super initWithNibName:nil bundle:nil];
29
+ if (self) {
30
+ // Custom initialization
31
+ myrect = rect;
32
+ }
33
+ return self;
34
+ }
35
+
36
+
37
+ - (void)loadView
38
+ {
39
+ // If you create your views manually, you MUST override this method and use it to create your views.
40
+ // If you use Interface Builder to create your views, then you must NOT override this method.
41
+ UIView* v = [[UIView alloc] initWithFrame:myrect];
42
+ v.autoresizesSubviews = YES;
43
+ v.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
44
+ v.backgroundColor = [UIColor colorWithWhite:0.5 alpha:0];
45
+ v.opaque = NO;
46
+ self.view = v;
47
+ }
48
+
49
+ -(void)makeTransparencyBackground
50
+ {
51
+ self.view.backgroundColor = [UIColor colorWithWhite:0.5 alpha:0];
52
+ [self.view setNeedsDisplay];
53
+ }
54
+
55
+ -(void)makeGrayBacground
56
+ {
57
+ self.view.backgroundColor = [UIColor colorWithWhite:0.5 alpha:0.4];
58
+ [self.view setNeedsDisplay];
59
+ }
60
+
61
+
62
+ - (void)viewDidLoad
63
+ {
64
+ [super viewDidLoad];
65
+ // Do any additional setup after loading the view, typically from a nib.
66
+ }
67
+
68
+ - (void)viewDidUnload
69
+ {
70
+ [super viewDidUnload];
71
+ // Release any retained subviews of the main view.
72
+ }
73
+
74
+
75
+ @end
@@ -29,20 +29,24 @@
29
29
  @interface LocationController : NSObject<CLLocationManagerDelegate> {
30
30
  CLLocationManager* _locationManager;
31
31
  CFRunLoopTimerRef _timer;
32
+
33
+ bool isErrorState;
32
34
 
33
35
  @public
34
36
  double _dLatitude, _dLongitude, _dAccuracy;
35
37
  bool _bKnownPosition;
36
38
 
37
- SEL onUpdateLocation;
39
+ //SEL onUpdateLocation;
38
40
  }
39
41
 
40
42
  @property (nonatomic, retain) CLLocationManager *_locationManager;
41
43
  @property (assign) SEL onUpdateLocation;
42
44
 
43
- - (void) initLocationManager;
45
+ - (void) initLocationManager:(NSObject*)param;
44
46
  - (void) stop;
45
47
 
48
+ - (void)doUpdateLocation;
49
+
46
50
  - (double) getLatitude;
47
51
  - (double) getLongitude;
48
52
  - (double) getAccuracy;