(No WRAP, No Java Only B4A)
I finally finished my first Library. I suppose it's full of bugs. I rely on your messages and your benevolence (Do not be too bad with me)
There are already many Dialogs libraries already, but since B4A 7.01 is available, the question arises. How do people who have an old version without WaitFor and Sleep will have to keep obsolete libraries because the new ones will no longer be supported.
So I decided to create an updated library that would use both DoEvents (the so hated) but it would work without it. Here is my library.
With the attached examples you can see how to use the bookstore in the ways (with and without DoEvents). Probably you can also use it in a third way with WaitFor, but I have not tried it.
SD_Dialogs
Author: Star-Dust
Version: 0.07
rel. 0.0.2
New: NameEvent on Initialize: You can raise an Event other than Class_Response (See spoiler)
rel. 0.0.3
New: Field: Intercept_KEYCODE_BACK As Boolean
rel. 0.0.5
New: Modify Initialize, not required pass Activity
rel. 0.0.6
New: Fix Bug FileDialog, Add button "create folder"
rel. 0.0.7
New: Fix Bug DateDialog, B4A 8.8+ and SDK28+
New XUI version of the multi-platform library is available. You can download it from here
I finally finished my first Library. I suppose it's full of bugs. I rely on your messages and your benevolence (Do not be too bad with me)
There are already many Dialogs libraries already, but since B4A 7.01 is available, the question arises. How do people who have an old version without WaitFor and Sleep will have to keep obsolete libraries because the new ones will no longer be supported.
So I decided to create an updated library that would use both DoEvents (the so hated) but it would work without it. Here is my library.
With the attached examples you can see how to use the bookstore in the ways (with and without DoEvents). Probably you can also use it in a third way with WaitFor, but I have not tried it.
SD_Dialogs
Author: Star-Dust
Version: 0.07
- ColorDIalog
Events:- Response (Response as int As , RGBcolor as int As )
- response As Int
- rgbcolor As Int
- argb (alpha As Int, Red As Int, Green As Int, Blue As Int) As Int
- class_globals As String
- doeventwaitresponse As Int
- initialize (Me_CallBack As Object, EventName As String) As String
Initializes the object. You can add parameters to this method if needed. - show (Title As String, Positive As String, Cancel As String, Negative As String) As String
- DateDialog
Events:- Response (Response as int As , DateTick as long As )
- datetick As Long
- response As Int
- IsInitialized As Boolean
Tests whether the object has been initialized. - class_globals As String
- datatotext (Tick As Long) As String
- doeventwaitresponce As Int
- getdayofmounth As Int
only get - getmounth As Int
only get - getyear As Int
only get - initialize (MeCallBack As Object, EventName As String, Date As Long) As String
Initializes the object. You can add parameters to this method if needed. - setdate (DayOfMounth As Int, Mounth As Int, Year As Int) As String
- show (Title As String, Positive As String, Cancel As String, Negative As String) As String
- Dialogs
Fields:- cancel As Int
- input_type_decimal_number As Int
- input_type_email As Int
- input_type_first_upcase As Int
- input_type_multi_line As Int
- input_type_no_suggest As Int
- input_type_none As Int
- input_type_numbers As Int
- input_type_password As Int
- input_type_phone As Int
- input_type_suggest As Int
- input_type_text As Int
- input_type_upcase As Int
- negative As Int
- positive As Int
- response_not_initialized As Int
- response_not_selected As Int
- process_globals As String
- FileDialog
Events:- Response (Response as int As , FileName as string As )
- filename As String
- path As String
- response As Int
- showonlyfolders As Boolean
- addfilter (Filter As String, Description As String) As String
- class_globals As String
- clearfilter As String
- doeventwaitresponse As Int
- initialize (MyActivity As ActivityWrapper, Me_CallBack As Object, EventName As String) As String
Initializes the object. You can add parameters to this method if needed. - show (Title As String, Positive As String, Cancel As String, Negative As String) As String
- timerdialog (MillSec As Int) As String
- android.permission.WRITE_EXTERNAL_STORAGE
- InputDialog
Events:- Response (Response as int As , InputText as string As )
- colorestyle As Int
- hint As String
- input As String
- input_type_decimal_number As Int
- input_type_email As Int
- input_type_first_upcase As Int
- input_type_multi_line As Int
- input_type_no_suggest As Int
- input_type_none As Int
- input_type_numbers As Int
- input_type_password As Int
- input_type_phone As Int
- input_type_suggest As Int
- input_type_text As Int
- input_type_upcase As Int
- inputtype As Int
- response As Int
- showkeyboard As Boolean
- style_ellipse As Int
- style_fringe As Int
- style_trapeze As Int
- class_globals As String
- doeventwaitresponse As Int
- initialize (MyActivity As ActivityWrapper, Me_CallBack As Object, EventName As String) As String
Initializes the object. You can add parameters to this method if needed. - show (Message As String, Title As String, Positive As String, Cancel As String, Negative As String) As String
-100 Error not initialized - styledshow (Message As String, Title As String, Positive As String, Cancel As String, Negative As String, GraficStyle As Int) As String
-100 Error not initialized
Stlye 0 = Trapezio
Style 1 = Ellisse
Style 2 = Frangia - timerdialog (MillSec As Int) As String
- ListDialog
Events:- Response (Response as int As , ListResponse as List As )
- colorestyle As Int
- listresponse As List
- response As Int
- class_globals As String
- doeventwaitresponse As Int
- initialize (Me_CallBack As Object, EventName As String) As String
Initializes the object. You can add parameters to this method if needed. - show (ListItem As List, Title As String, MultiSelect As Boolean, Positive As String, Cancel As String, Negative As String) As String
-100 Error not initialized - timerdialog (MillSec As Int) As String
- MessageBox
Events:- Response (Response as int As )
- colorestyle As Int
- response As Int
- style_ellipse As Int
- style_fringe As Int
- style_trapeze As Int
- class_globals As String
- doeventwaitresponse As Int
- initialize (MyActivity As ActivityWrapper, Me_CallBack As Object, EventName As String) As String
Initializes the object. You can add parameters to this method if needed. - newmsgbox (Message As String, Title As String, Positive As String, Cancel As String, Negative As String) As String
-100 Error not initialized - styledmsgbox (Message As String, Title As String, Positive As String, Cancel As String, Negative As String, GraficStyle As Int) As String
-100 Error not initialized
Stlye 0 = Trapezio
Style 1 = Ellisse
Style 2 = Frangia - timerdialog (MillSec As Int) As String
- SignatureDialog
Events:- Response (Response as int As , Signature as bitmap As )
- colorestyle As Int
- response As Int
- sign As BitmapWrapper
- class_globals As String
- doeventwaitresponse As Int
- initialize (Me_CallBack As Object, EventName As String) As String
Initializes the object. You can add parameters to this method if needed. - show (Title As String, Positive As String, Negative As String) As String
-100 Error not initialized - timerdialog (MillSec As Int) As String
- TimeDialogs
Events:- Response (Response as int As , TimeTick as long As )
- response As Int
- timetick As Long
- IsInitialized As Boolean
Tests whether the object has been initialized. - class_globals As String
- doeventwaitresponce As Int
- initialize (MeCallBack As Object, EventName As String, Time As Long) As String
Initializes the object. You can add parameters to this method if needed. - show (Title As String) As String
rel. 0.0.2
New: NameEvent on Initialize: You can raise an Event other than Class_Response (See spoiler)
Initializing so Class.Initialize(Activity, Me, "NameEvent"), when it raise the event, launches the sub NameEvent_Response (Arg ...).
If a StringEvent that contains underscores (for example, Class.Initialize(Activity, Me, "Event_Click") call the sub with the exact name entered as a topic, In this case, Event_Click, without passing arguments.
If a StringEvent that contains underscores (for example, Class.Initialize(Activity, Me, "Event_Click") call the sub with the exact name entered as a topic, In this case, Event_Click, without passing arguments.
rel. 0.0.3
New: Field: Intercept_KEYCODE_BACK As Boolean
rel. 0.0.5
New: Modify Initialize, not required pass Activity
rel. 0.0.6
New: Fix Bug FileDialog, Add button "create folder"
rel. 0.0.7
New: Fix Bug DateDialog, B4A 8.8+ and SDK28+
New XUI version of the multi-platform library is available. You can download it from here
Attachments
Last edited: