Jan 16, 2014 Replies: 23 This is a date picker similar to B4A AnotherDatePicker. In order to use it in your project, you should choose Project - Add existing module and add jAnotherDatePicker to your project. You should also add the DatePicker layout file and calendar_icon.png. It is implemented as a custom view. It should be added from the designer. Attachments jAnotherDatePicker.zip jAnotherDatePicker.zip 6.8 KB · Views: 1,433 Last edited: Mar 2, 2016 Click to expand...
This is a date picker similar to B4A AnotherDatePicker. In order to use it in your project, you should choose Project - Add existing module and add jAnotherDatePicker to your project. You should also add the DatePicker layout file and calendar_icon.png. It is implemented as a custom view. It should be added from the designer.
F frsimon New Member Licensed User Longtime User Oct 20, 2014 #3 That zip doesn't contain a layout file. Am I missing something.
Erel B4X founder Staff member Licensed User Longtime User Oct 20, 2014 #4 No. The layout is created programmatically.
tdocs2 Well-Known Member Licensed User Longtime User Aug 24, 2015 #5 Greetings. Thank you for your replies to this Newbie question. 1. I am using the Open Designer for my app. I do not have any FXML layouts. 2. When I click on Designer, Scene Builder Layouts, it gives me one Choice - Create New. 3. As instructed, You should also add the DatePicker layout file. Click to expand... . How do I add the DatePicker layout file to my project? Obviously, I was able to add the jAnotherDatePicker module to the project. Thanks again. Sandy
Greetings. Thank you for your replies to this Newbie question. 1. I am using the Open Designer for my app. I do not have any FXML layouts. 2. When I click on Designer, Scene Builder Layouts, it gives me one Choice - Create New. 3. As instructed, You should also add the DatePicker layout file. Click to expand... . How do I add the DatePicker layout file to my project? Obviously, I was able to add the jAnotherDatePicker module to the project. Thanks again. Sandy
Erel B4X founder Staff member Licensed User Longtime User Aug 24, 2015 #6 You need to add DatePicker.fxml file from the zip file to your project Files tab.
tdocs2 Well-Known Member Licensed User Longtime User Aug 24, 2015 #7 Thank you, Erel. I followed your instructions, and I received the error below. My app is looking for DatePicker.bjl and not for DatePicker.fxml... I do not know how to tell my app to look for the fxml (which is in the Files Folder). That was my poorly worded question in the post above. Code: Program started. janotherdatepicker._initialize (java line: 269) java.io.FileNotFoundException: DatePicker.bjl at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:180) at anywheresoftware.b4j.objects.LayoutBuilder.loadLayout(LayoutBuilder.java:43) at anywheresoftware.b4j.objects.PaneWrapper.LoadLayout(PaneWrapper.java:76) at b4j.example.janotherdatepicker._initialize(janotherdatepicker.java:269) at b4j.example.main._appstart(main.java:57) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93) at anywheresoftware.b4a.BA.raiseEvent(BA.java:84) at b4j.example.main.start(main.java:36) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$159(LauncherImpl.java:863) at com.sun.javafx.application.LauncherImpl$$Lambda$53/10423575.run(Unknown Source) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$172(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl$$Lambda$45/1681433494.run(Unknown Source) at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295) at com.sun.javafx.application.PlatformImpl$$Lambda$48/1334252076.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294) at com.sun.javafx.application.PlatformImpl$$Lambda$47/1685538367.run(Unknown Source) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$145(WinApplication.java:101) at com.sun.glass.ui.win.WinApplication$$Lambda$36/2058534881.run(Unknown Source) at java.lang.Thread.run(Thread.java:745)
Thank you, Erel. I followed your instructions, and I received the error below. My app is looking for DatePicker.bjl and not for DatePicker.fxml... I do not know how to tell my app to look for the fxml (which is in the Files Folder). That was my poorly worded question in the post above. Code: Program started. janotherdatepicker._initialize (java line: 269) java.io.FileNotFoundException: DatePicker.bjl at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:180) at anywheresoftware.b4j.objects.LayoutBuilder.loadLayout(LayoutBuilder.java:43) at anywheresoftware.b4j.objects.PaneWrapper.LoadLayout(PaneWrapper.java:76) at b4j.example.janotherdatepicker._initialize(janotherdatepicker.java:269) at b4j.example.main._appstart(main.java:57) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93) at anywheresoftware.b4a.BA.raiseEvent(BA.java:84) at b4j.example.main.start(main.java:36) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$159(LauncherImpl.java:863) at com.sun.javafx.application.LauncherImpl$$Lambda$53/10423575.run(Unknown Source) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$172(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl$$Lambda$45/1681433494.run(Unknown Source) at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295) at com.sun.javafx.application.PlatformImpl$$Lambda$48/1334252076.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294) at com.sun.javafx.application.PlatformImpl$$Lambda$47/1685538367.run(Unknown Source) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$145(WinApplication.java:101) at com.sun.glass.ui.win.WinApplication$$Lambda$36/2058534881.run(Unknown Source) at java.lang.Thread.run(Thread.java:745)
tdocs2 Well-Known Member Licensed User Longtime User Aug 24, 2015 #8 Erel said: You need to add DatePicker.fxml file from the zip file to your project Files tab. Click to expand... I GOT IT! Add MEANS In Project Files Tab > Add File - not just copy the fxml to the Files folder. Thank you, Erel, for your patience (in FL, USA, you need sunglasses)
Erel said: You need to add DatePicker.fxml file from the zip file to your project Files tab. Click to expand... I GOT IT! Add MEANS In Project Files Tab > Add File - not just copy the fxml to the Files folder. Thank you, Erel, for your patience (in FL, USA, you need sunglasses)
ivan.tellez Active Member Licensed User Longtime User Aug 28, 2015 #9 tdocs2 said: I GOT IT! Add MEANS In Project Files Tab > Add File - not just copy the fxml to the Files folder. Thank you, Erel, for your patience (in FL, USA, you need sunglasses) Click to expand... Actualy you can "just copy" the fxml to the Files folder. Then, click on the "Sync" Button in the Files Tab.
tdocs2 said: I GOT IT! Add MEANS In Project Files Tab > Add File - not just copy the fxml to the Files folder. Thank you, Erel, for your patience (in FL, USA, you need sunglasses) Click to expand... Actualy you can "just copy" the fxml to the Files folder. Then, click on the "Sync" Button in the Files Tab.
L le_toubib Active Member Licensed User Longtime User Mar 1, 2016 #10 hi all after adding the module and the layout file i get this error : Program started. Error occurred on line: 81 (Main) java.lang.ClassCastException: b4j.example.janotherdatepicker cannot be cast to anywheresoftware.b4a.ObjectWrapper at anywheresoftware.b4j.objects.FXMLBuilder.setNodeField(FXMLBuilder.java:140) at anywheresoftware.b4j.objects.FXMLBuilder.LoadLayout(FXMLBuilder.java:124) at anywheresoftware.b4j.objects.PaneWrapper.LoadLayout(PaneWrapper.java:76) at b4j.example.main._appstart(main.java:383) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:607) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:228) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:158) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:90) at anywheresoftware.b4a.BA.raiseEvent(BA.java:84) at b4j.example.main.start(main.java:36) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863) Click to expand... at the line of this code 81: MainForm.RootPane.LoadLayout("lo2") 'Load the layout file. Code: MainForm = Form1 CurrentState = "Initiating" MainForm.Initialize("mainform",-1,-1) MainForm.SetFormStyle("DECORATED") SetSystemProperty("glass.accessible.force", "false") MainForm.RootPane.LoadLayout("lo2") 'Load the layout file. MainForm.Show dp_pt_spn_dob.Initialize(MainForm) what am i doing wrong ? p.s : i also get this worning from the downloaded project itself : this sub should be used for variable declarations or assignemnts of primitive values a this line : Private selectedColor As Paint = fx.Colors.RGB(144, 176, 248)
hi all after adding the module and the layout file i get this error : Program started. Error occurred on line: 81 (Main) java.lang.ClassCastException: b4j.example.janotherdatepicker cannot be cast to anywheresoftware.b4a.ObjectWrapper at anywheresoftware.b4j.objects.FXMLBuilder.setNodeField(FXMLBuilder.java:140) at anywheresoftware.b4j.objects.FXMLBuilder.LoadLayout(FXMLBuilder.java:124) at anywheresoftware.b4j.objects.PaneWrapper.LoadLayout(PaneWrapper.java:76) at b4j.example.main._appstart(main.java:383) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:607) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:228) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:158) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:90) at anywheresoftware.b4a.BA.raiseEvent(BA.java:84) at b4j.example.main.start(main.java:36) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863) Click to expand... at the line of this code 81: MainForm.RootPane.LoadLayout("lo2") 'Load the layout file. Code: MainForm = Form1 CurrentState = "Initiating" MainForm.Initialize("mainform",-1,-1) MainForm.SetFormStyle("DECORATED") SetSystemProperty("glass.accessible.force", "false") MainForm.RootPane.LoadLayout("lo2") 'Load the layout file. MainForm.Show dp_pt_spn_dob.Initialize(MainForm) what am i doing wrong ? p.s : i also get this worning from the downloaded project itself : this sub should be used for variable declarations or assignemnts of primitive values a this line : Private selectedColor As Paint = fx.Colors.RGB(144, 176, 248)
L le_toubib Active Member Licensed User Longtime User Mar 2, 2016 #11 Ok , i restarted everything, and now it's working , with the same worning though. But when i moved to another device, i get another error, upon clicking on the text field the date picker starts to appear and then the app crash ; Java(TM) platform SE has stopped working BEX64 Last edited: Mar 2, 2016
Ok , i restarted everything, and now it's working , with the same worning though. But when i moved to another device, i get another error, upon clicking on the text field the date picker starts to appear and then the app crash ; Java(TM) platform SE has stopped working BEX64
Erel B4X founder Staff member Licensed User Longtime User Mar 2, 2016 #12 How did you create the layout file? Custom views will only work with the internal designer.
L le_toubib Active Member Licensed User Longtime User Mar 2, 2016 #13 I found both 1.fxml and datepicker.Fxml can be opened in scene builder? My original (very big) layout file was created in scene builder. Why is it working perfectly on one device? And the whole java.exe crashes on another ?
I found both 1.fxml and datepicker.Fxml can be opened in scene builder? My original (very big) layout file was created in scene builder. Why is it working perfectly on one device? And the whole java.exe crashes on another ?
Erel B4X founder Staff member Licensed User Longtime User Mar 2, 2016 #14 The first post was updated with the latest version of jAnotherDatePicker. It is now implemented as a custom view. I recommend you to switch to the new implementation. You can load it to a pane in your existing layout.
The first post was updated with the latest version of jAnotherDatePicker. It is now implemented as a custom view. I recommend you to switch to the new implementation. You can load it to a pane in your existing layout.
L le_toubib Active Member Licensed User Longtime User Mar 2, 2016 #15 You wonna say to create a pane inside my layout in scene builder. And then load the pane with the datepicker. Fxml layout? Should the pane be invisible at first? What about the .Show property?
You wonna say to create a pane inside my layout in scene builder. And then load the pane with the datepicker. Fxml layout? Should the pane be invisible at first? What about the .Show property?
Erel B4X founder Staff member Licensed User Longtime User Mar 2, 2016 #16 le_toubib said: And then load the pane with the datepicker. Fxml layout? Click to expand... And then load a bjl layout that holds the custom view. There is no show method. It opens when the user clicks on the calendar icon (you can add a show method if you like).
le_toubib said: And then load the pane with the datepicker. Fxml layout? Click to expand... And then load a bjl layout that holds the custom view. There is no show method. It opens when the user clicks on the calendar icon (you can add a show method if you like).
L le_toubib Active Member Licensed User Longtime User Mar 2, 2016 #17 OK : for some reason i had an older version of adp with fxml not bjl... now what i did : 1- i created i new layout dp.bjl inside which i created the custom view "AnotherDatePicker" 2- i have my original lo2.fxml , inside which i added a pane node , then i loadlayout("dp") for this new node 3- in the project it shows correctly and when i press on the icon the datepicker is shown correctly 4- but the AnotherDatePicker_DateChanged (NewDate As Long) event is not raised when the date is changed EDIT : sorry that was a mistake in naming the view .. now working fine. but had to set a boolean variable to prevent the trigger of the event before changing the date ( as it s triggered on show) Last edited: Mar 2, 2016
OK : for some reason i had an older version of adp with fxml not bjl... now what i did : 1- i created i new layout dp.bjl inside which i created the custom view "AnotherDatePicker" 2- i have my original lo2.fxml , inside which i added a pane node , then i loadlayout("dp") for this new node 3- in the project it shows correctly and when i press on the icon the datepicker is shown correctly 4- but the AnotherDatePicker_DateChanged (NewDate As Long) event is not raised when the date is changed EDIT : sorry that was a mistake in naming the view .. now working fine. but had to set a boolean variable to prevent the trigger of the event before changing the date ( as it s triggered on show)
L le_toubib Active Member Licensed User Longtime User Mar 6, 2016 #18 Alright everything it's working fine on my win 10 laptop ... But when i moved to win 7 desktops the whole app crash at the line ; Frm.showandwait In the class module Is there any explanation ?
Alright everything it's working fine on my win 10 laptop ... But when i moved to win 7 desktops the whole app crash at the line ; Frm.showandwait In the class module Is there any explanation ?
Erel B4X founder Staff member Licensed User Longtime User Mar 6, 2016 #19 Please start a new thread for this and post the logs.
roberto64 Active Member Licensed User Longtime User Apr 9, 2016 #20 regardsErnel hello, how can I display any Another DATEPICKER1 a different date es. (AnotherDatePicker1.Date = m.Get ("datapreventivo"), he writes in AnotherDatePicker1.
regardsErnel hello, how can I display any Another DATEPICKER1 a different date es. (AnotherDatePicker1.Date = m.Get ("datapreventivo"), he writes in AnotherDatePicker1.