Android Tutorial [B4X] B4A, B4i, B4J and B4r API documentation - B4X Object Browser

Status
Not open for further replies.
API documentation - B4a, B4i, B4J and B4R (i.e. B4X) Object Browser (which also includes Code Snippet Management)

Hi everyone,

As you may or may not be aware, I have embarked on a project to bring better documentation to us all.

The first problem I have had is that the official and semi-official documentation tools aren't what I was hoping for. Not saying they aren't good, they just aren't what I need.

My first thankyou was called the B4a Object Browser. This version was for B4Android only. It is my own version of the XML file loader. I call it the B4a Object Browser.

The second thankyou is an updated version that supports B4A, B4I and B4J. This is called the B4X Object Browser.

If you know the Visual Studio Object Browser, you should have a good idea of what I am trying to emulate.

To run it you must have .NET Framework 3.5 SP1 installed, and you must install it from my setup.

I have only tested it on Windows, and not with Mono.
I am assuming that everyone that wants to use it, will be on Windows.

Here are some screenshots:

B4AObjectBrowser3.1.4.0.png


upload_2014-12-18_21-26-19.png


Download the appropriate zip, unzip it and run the setup. I suggest you scan it for viruses before you run it of course.

B4A Object Browser:
When it runs the first time, it will need to know where the B4a Library XML files are, so ensure you go into the Options and configure them.
If you are upgrading, you can Import your old settings, and in fact are prompted to do so if you have a blank configuration.

If you are asked to find the B4A Library XML files, browse to your B4a Library folder (usually C:\Program Files\Anywhere Software\Basic4android\Libraries, or if you are using 64 bit Windows, it is C:\Program Files (x86)\Anywhere Software\Basic4android\Libraries)

From this point, it will remember the path, so you will not have to enter it again.

B4X Object Browser:
The paths to your B4A, B4I and B4J installations (and the Libraries folders under them) will be determined automatically.

In the Options screen you can set multiple paths, with the ability to modify them.

It has multi-language support, and will detect your PC's language and apply the changes automatically. If you want to over-ride this, you may do so from the Options screen.

In B4A Object Browser, the following languages are supported:

Afrikaans
Arabic
Bulgarian
Chinese
Czech
Danish
Dutch
English
French
German
Hebrew
Indonesian
Italian
Japanese
Norwegian
Persian
Polish
Portuguese
Romanian
Russian
Spanish
Swedish
Thai
Ukrainian
Vietnamese

B4X Object Browser adds support for:
Catalan
Greek


I suggest everyone that uses this tool subscribe to the thread so you are informed of changes.

Have fun!

Dave

Change history:
B4A Object Browser
2.0.0.0 - First public release.
2.0.1.0 - Minor GUI update, remove the need to click Reload button during initial setup.
2.1.0.0 - See post #8
2.2.0.0 - See post #23
2.3.0.0 - see post #31
2.3.0.0 - see post #35
2.4.0.0 - see post #60
2.5.0.0 - see post #63
2.6.0.0 - see post #70
2.6.1.0 - see post #75
2.7.0.0 - see post #79
3.0.0.0 - (Pre-release)
3.0.1.0 - Major GUI updates
3.0.1.1 - Minor fixes to correct some "Copy" functionality that had been removed
3.1.0.0 - All known bugs fixed, plus multiple language support added. Separate link provided below. See post 112 for full info.
3.1.1.0 - Additional languages, ability to override GUI language, Chinese language fixed. See post 122 for more info.
3.1.2.0 - Fixes to French, German and Italian language translations. 15 languages now provided. Search history added.
3.1.3.0 - Portuguese language added, making this language number 16
3.1.4.0 - Updated ru and ja translations, Moved Options to View menu, Added support for DesignerName attribute. See post 128 for full details.
3.1.5.0 - Corrected some logic problems around Version Number and DependsOn. Fixed URL Links. See post 147 for full details.
3.1.6.0 - Increased search options, fixed some search bugs, added Hebrew. Full details in post 156.
3.2.0.0 - AutoUpdate, new language, a couple of minor bugfixes. Full details in post 157.
3.2.1.0 - New languages, a few bugfixes. Full details in post 164.
3.2.2.0 - Updated Thai translation.
3.2.3.0 - Fixed further Thai translation strings, arabic and Thai language settings, memory corruption error when switching from R-L and L-R languages and more
3.2.4.0 - Added the ability to override language settings.* See "How to override language setting.txt" in the installation directory.
3.2.4.1 - Fixed bug when overriding language settings.
3.2.4.2 - Fixed bug when selecting the following languages: Arabic, Bulgarian, Hebrew, Thai
3.2.4.3 - Fixed bug when showing empty parentheses, Search and Clear Search buttons, bug where Clear Search button forced library reload even if no search text was entered
3.2.4.4 - Fixed bug where installer did not remove previous version
3.2.5.0 - Added ability to select viewing of Class_Globals and Property Get / Property Set
3.2.5.1 - Added ability to select viewing of DesignerCreateView
3.2.5.2 - Added Romanian language
3.2.5.3 - Fixed problem when selecting Romanian
3.2.5.4 - Fixed 2nd problem when selecting Romanian
3.2.5.5 - Added Vietnamese language
3.2.5.6 - Added preliminary support for B4a 3.0 (Beta)
3.2.5.7 - Added ability to show duplicate Library Short Names
3.2.5.8 - Forced GUI to always show Full type name when showing Class and Library annotations
3.2.5.9 - Fixed a bug when reloading libraries after performing a search. Also added Donate form.
3.2.5.10 - Set XML Reader to null after closing the file, plus set properties to remove flickering when displaying file data.
3.2.5.11 - Corrected an issue where a blank History would cause an application error
3.2.5.12 - Added Czech, Danish and Persian languages
3.2.5.13 - Persian language updated
3.2.5.14 - Added "Always on top" setting (under "Always on top" menu setting) and modified each Form to follow this setting
----------- Note: No further updates will be performed to B4a Object Browser

Full list of changes here (before 3.2.5.1): http://www.b4x.com/android/forum/th...n-b4a-object-browser.25682/page-9#post-172076

B4X Object Browser
1.0.0.0 - First public release
4.0.0.1 - Minor changes - mainly updating graphics to reflect Anywhere Software changes.
4.0.0.2 - Bug fixes, Desktop icon.
4.1.0.0 - Code Snippet Management added.
4.1.1.1 - Spanish language updates
4.1.1.2 - Modified the Method / Property / Field Copy function appropriately to copy either the selected text or all text
4.1.1.3 - Performed multiple bug-fixes to correct issues with right-click commands
4.1.1.4 - Performed another bug-fix to the right-click menu (for Events list)
4.1.1.5 - Performed another bug-fix to the right-click menu (for copying Fullname)
4.1.2.0 - Added support for B4R
4.1.3.0 - Changed auto-update download to .msi (instead of .exe)

I have put together a pdf to understand how to use it. It is included in the setup, but you can get it separately here (559 Kb).
Grab the setup and unzip and install it. This must be done this way because of the file size being too big for the forum. (>2 MB)...

B4a Object Browser
Version 3.2.0.0 (NOT AutoUpdate) is available here.
Version 3.2.1.0 (AutoUpdate enabled) is available here.
All newer versions (from Version 3.2.2.0 onwards) are available through AutoUpdate, and will not be provided here (other than the link below).
The latest version is always available from here.

B4X Object Browser
The latest B4x Version is available from here. AutoUpdate will take over from that point.
 

Attachments

  • upload_2014-12-11_22-32-46.png
    upload_2014-12-11_22-32-46.png
    106.1 KB · Views: 2,728
Last edited:

alfcen

Well-Known Member
Licensed User
Longtime User
For Japanese

Truely amazed by your work, mate.
This is not only a reference but also a formidable tool
for checking and tiding up self-made libraries :sign0098:, indeed!

Just a few harmless findings,

under Options/Language:
1. 日本人 = 日本語
2. Indonesia = Bahasa Indonesia

(日本人 means Japanese people, 日本語 means Japanese language)

After switching to Japanese, I find underneath the PayPal button:
ビールを買ってください = Go and buy a beer
Better is: 寄付のお願い = Please donate

Also in Options,
The buttons at the center right (Add/Delete)
Add should be 追加, Delete should be 削除
OK button should be labeled just as OK or 決定

Then in the browser,
At the top left 図書館 means bibliotheque (or library)
The correct term is ライブラリ

Browser Menu
ファイル File
終了する = 終了
ヘルプ Help
釣 = バーション情報

That's all I found ad-hoc,

Cheers
Robert
 

Vader

Well-Known Member
Licensed User
Longtime User
Thanks Robert. I have made a few changes according to what you have outlined, except I didn't understand exactly where all the changes are required.

Sorry.

I will PM you.
 

Vader

Well-Known Member
Licensed User
Longtime User
Version 3.2.1.0 has now been released, with the following changes:

  • Added language: Arabic
  • Added Language: Thai
  • Fixed Language name: "Indonesia" renamed to "Bahasa Indonesia"
  • Fixed some translation strings for Japanese
  • Updated all translations to use "B4a" instead of "B4A"
  • Fixed small display bug where the colour of Property names was incorrect (Black instead of Slate-Grey)
  • Fixed some translation strings for Bulgarian language
  • Fixed missing Tooltip for INTERNET permission (all languages)
  • Fixed bug where changing View menu (Method/Property/Field) did not update label
  • Languages in Options screen combo-box now sorted alphabetically
  • Updated included PDF file

Everyone using version 3.2.0.0 should have been prompted with an Upate message. Everyone else can get the new version from the first post.
 
Last edited:

Vader

Well-Known Member
Licensed User
Longtime User
Version 3.2.2.0 is now available on AutoUpdate.

The only change for this version is the updated Thai language.
 

Vader

Well-Known Member
Licensed User
Longtime User
Version 3.2.4.1 has been released. This version gives you the ability to override the language setting.
Unfortunately in the first version I posted up, this was set to English, and if you are using another language, when next you started up, you would have reverted to English.

If this happens to you, open language.txt and remove the word "English".

Apologies for the short-term bug.
 
Last edited:

jdevsoft

Member
Licensed User
Longtime User
Hello Dave,

if i upgrade to the current version my AntiVirus System say "suspected" file !

What´s wrong in the new version old one without autoupdate work.

Hope you can help.

Harald
 

Vader

Well-Known Member
Licensed User
Longtime User
Hello Dave,

if i upgrade to the current version my AntiVirus System say "suspected" file !

What´s wrong in the new version old one without autoupdate work.

Hope you can help.

Harald

I think you are asking what the differences are between versions.
Because I don't know what version you are using, here is the complete list of changes:

25 May 2013
Version 3.2.5.0

Added ability to hide or show Class_Globals and Property Set and Property Get
08 May 2013
Version 3.2.4.4

Fixed bug where installer did not remove previous version

07 May 2013
Version 3.2.4.3

Fixed bug when showing empty parentheses
Fixed Search and Clear Search buttons
Fixed bug where Clear Search button forced library reload even if no search text was entered

05 May 2013
Version 3.2.4.2

Fixed bug when selecting the following languages:
* Arabic
* Bulgarian
* Hebrew
* Thai

04 May 2013
Version 3.2.4.1

Fixed bug when overriding language settings.

04 May 2013
Version 3.2.4.0

Added the ability to override language settings.* See "How to override language setting.txt" in the installation directory.

03 May 2013
Version 3.2.3.0

Fixed some translation strings for Thai
Fixed Thai language setting not being applied
Fixed Arabic language setting not being applied
Fixed memory corruption error when moving from right-to-left to left-to-right locales and vice versa (restart switch)
Fixed Search button and Clear button mouse-over descriptions (all languages)

30 April 2013
Version 3.2.2.0

Fixed some translation strings for Thai

28 April 2013
Version 3.2.1.0

Added language: Arabic
Added Language: Thai
Fixed Language name: "Indonesia" renamed to "Bahasa Indonesia"
Fixed some translation strings for Japanese
Updated all translations to use "B4a" instead of "B4A"
Fixed small display bug where the colour of Property names was incorrect (Black instead of Slate-Grey)
Fixed some translation strings for Bulgarian language
Fixed missing Tooltip for INTERNET permission (all languages)
Fixed bug where changing View menu (Method/Property/Field) did not update label
Languages in Options screen combo-box now sorted alphabetically
Updated included PDF file

24 April 2013
Version 3.2.0.0

Added language: Bulgarian
Modified existing Afrikaans translation
Added AutoUpdate capability
Added support for DesignerName for Properties and Fields
Fixed bug where DesignerName was never shown in the Syntax

01 April 2013
Version 3.1.6.0

Hebrew language added (making this language 17)
Support for Right-to-Left languages added (Hebrew, Arabic, etc)
Events are now tracked the same as other objects/attributes
Searches can now be performed on the following additional items:
* Version
* Author
* DependsOn
* Events
* Permissions

Wait cursor now shown during searches
Escape key now clears search text
Object details pane has been enlarged so that it is approximately the same size as the Methods / Properties / Fields pane. Note, this pane is still resizable.

01 April 2013
Version 3.1.5.0

DependsOn was linked to Class, now correctly linked to Library
Version was linked to Class, now correctly linked to Library
URL's were not enabled - fixed
Main window position was incorrectly reverting to last saved location and dimensions when exiting Options screen - fixed

Libraries screen:
* Added Author column
* Added Version number to Product name (for Add/Remove programs)

31 March 2013
Version 3.1.4.0

Fixed issue where some English words were mixed up with German
Russian language file updated
Japanese language file updated (Credits updated)
Added support for DesignerName attribute
Removed Connection status
Updated Donations landing page
Moved View options from Options page to View Menu
Changed default for "Load XML on demand" to False

09 March 2013
Version 3.1.3.0

Portuguese language added

09 March 2013
Version 3.1.2.0

Fixed some translation strings for French, German and Italian
Added search history
Fixed small bug with Search

08 March 2013
Version 3.1.1.0

Options screen
* Import button allows you to specify the file to import from
* Export button allows you to specify the folder to export to
* Language dropdown allows you to override the current OS language. (This setting is not saved) EDIT: Newer versions now save this setting.

The following languages are now supported:
* Afrikaans
* German
* Spanish
* French
* Indonesian
* Italian
* Japanese
* Dutch
* Norwegian
* Polish
* English
* Russian
* Swedish
* Ukrainian
* Chinese

04 March 2013
Version 3.1.0.0

This version contains bugfixes for all known problems, plus adds language support for the following:
* English
* Spanish
* German
* Polish
* French
* Dutch
* Japanese
* Italian
Chinese is also in there, but in my testing, I couldn't get it to work. Your mileage may differ.

03 March 2013
Version 3.0.1.1

Fixed small bugs that were introduced in version 3.0.1.0

02 March 2013
Version 3.0.1.0
Added support for Unicode characters in Author name
Removed Community features

16 February 2013
Version 3.0.0.0

Added Community features
Other changes:
URL links in Comments and Details panes now open a web browser and navigate to the URL
Title of Comment pane (Originally it just showed "Comment") now has the path to the clicked Class (following the selected option around short or normal type names)
Display bug of Field description now fixed


09 February 2013
Version 2.7.0.0

Changes in this version:

Double-click a search result navigates the main screen to that same point
Treeview in search results now sorted, and double-buffered
Removed "Comments" search option as it didn't do anything


05 February 2013
Version 2.6.1.0

Null Pointer error fixed
Added an extra window (Help | About | Libraries) that shows all libraries (in the selected paths), the classes in each Library, and the version of each of these.
Version is dependant upon the Library rather than the Class, however I thought it important to show Classes as well as libraries.


03 February 2013
Version 2.6.0.0

ability to search for text in the following places:
* Library (Name)
* Class (Name, Comment)
* Method (Name, Comment)
* Property (Name, Comment)
* Field (Name, Comment)
* Annotation (Name, Value)
* Parameter (Name)

Results are returned in a Treeview in a seperate Window.

I haven't added the ability to navigate directly from the search results to the main window (yet), but there is enough visual information to find the correct location of whatever you are searching for.

This was a huge change as I had to extend every .Net Class (Class, Method, Parameter, Annotation etc), plus add a Library Class, to allow me to search through the in-memory Data model, navigating backwards as required. For example, each of the objects now has a Parent Property, which allows me to walk the in-memory tree up and down as required.

There is still a small bug in there around the display of Field descriptions, but I will get to that in time.

I have added the function where screen size and position is now saved (Informatix - that's for you).

Other things fixed are:
Class comment was never cleared
Import Button (Options Screen) didn't do anything
Classes Treeview wasn't sorted fully (Additional Path Libraries were tacked onto the end)


02 February 2013
Version 2.5.0.0

Export and Import the configuration settings
Resizing of window elements added


02 February 2013
Version 2.4.0.0

Ok, so I have a few things to explain here...

Firstly, the GUI has changed a little because it was starting to get too cluttered. I'm not a 100% fan of the end-result, but I hope you agree it is functional and kind-of pleasing to the eye.

There are now three additional listboxes to show additional information. These are:
Depends On
Permissions
Events

These show what other Classes the selected Library/Class depends upon, what permissions the Class requests/requires, and what Events are generated by the Class.
This last one is a favourite of mine, because I don't know where else in the IDE this information is shown (if at all).

Next, the Comment area AND the Details area are both HTML aware. Well, mostly they are. This means they understand <u>, <b>, <i>, <link> etc.
At this time, <code> is stripped out and not handled that well, but at least the examples read a little better now.

I have also moved one of the Toolbar buttons so as to keep the B4A site buttons together. The Android Packages button is now last (i.e to the right of the others).

There is an additional button to allow text searching the B4A site for any text you wish to enter. This is in addition to the pre-existing ability to search the B4A site for any selected text.

The comment area can now be "Copy"'ed and "Copy RTF"'ed, thus preserving links, colours etc.

You can perform a search from selected text in the Comment area.

EDIT: I nearly forgot: The flickering is now fixed!

I still don't have a solution to the Unicode problem (sorry Informatix), and the HTML codes are not 100%, but I hope you agree they are much better than what I had previously.

When you unpack the zip (in Post #1 as always), please note there is now an additional DLL that must also be copied. This is the control that handles the HTML in the Richtext boxes as described above.

Again, you will have to re-create your config. I will work on pulling the config out from .NET, but for now we have what is standard, which changes with every version.


30 January 2013
Version 2.3.0.0

Toolbar buttons for all menu items
Extra toolbar buttons for:
* B4A documentation link (link is specified in Options)
* Forum landing page
* Android Packages landing page

Any selected node in Classes and methods/Properties/Fields list can be searched (Right-click menu) - opens in Google search window
Properties now specified as ReadWrite or ReadOnly
Properties now have Return Type listed
Classes have Wrapper shown
Classes have Comment shown
Standardised detail output to my upcoming documentation style (eg "Usage" becomes "Syntax")
Treeview details are sorted before being written to Treeview (allows documentation to be sorted properly)
Copy and Copy RTF (for details pane) right-click options
Control of Full or short typename display across whole application is controlled by option
Added option to hide BA Object if it is the first parameter in a method (this is the default value)

Known issues:
Unicode and HTML codes as per previous versions
Re-setting of options required as per previous versions


29 January 2013
Version 2.2.0.0

Additions:
Renamed to B4A Object Browser
Multiple paths can now be specified
Statusbar added (progress and text) to show what load action is being performed
Option added to allow loading of Libraries upon demand (ie when you click it), and set to default
When choosing a file, the treeview expands that file's details automatically

Bugfixes:
Treeview flickering is now much improved or removed
When viewing Properties with Don't show empty parentheses selected, an empty bracket was shown in the usage.

Known issues:
Unicode text still not displaying correctly
HTML codes not handled (eg <U>Text</U> is not displayed as Text)

27 January 2013
Version 2.1.0.0

Changes:
Removed Reload button (option now provided in File menu)
Grouped class information into a group box
Added "Loading Libraries" information when waiting for Form to load Libraries
Added classic File menu, including Reload Libraries option
Help menu (Only shows About box, but is enough to know what version you have)

Options:
Browse to Library folder
Optionally show methods, Properties and Fields (At least one must be selected)
Optionally show Void in Usage
Optionally Show Full typenames
Optionally show empty parentheses
Label above Methods, properties and Fields treeview changes according to your selected options.

Known issues:
If you change your View options and click OK, you will have to click on the Method/Property/Field again for the updated options to take effect.
You will have to re-specify your Library location after applying this update.
 

blong

Active Member
Licensed User
Longtime User
Help browser

Great job ... as a VB user it sure looks familiar.:sign0098:

So I "bought you a beer" as per the Tools/Options request !

You state you need some help... job seems done to me by now.... being an Oz person like yourself (based on address) let me know whats still needed and if I have time (and ability) to assist will do so.
 

Vader

Well-Known Member
Licensed User
Longtime User
Great job ... as a VB user it sure looks familiar.:sign0098:

So I "bought you a beer" as per the Tools/Options request !

You state you need some help... job seems done to me by now.... being an Oz person like yourself (based on address) let me know whats still needed and if I have time (and ability) to assist will do so.

Thanks Barry, as my email states I am very appreciative.

For everyone's benefit, my donation total is now $35.
 

Vader

Well-Known Member
Licensed User
Longtime User
Version 3.2.5.1 has now been released. This version allows the DesignerCreateView Method to be shown or hidden.

AutoUpdate should pick this up for you automatically. I did have some trouble getting this latest version onto the FTP site, so if you need to uninstall and reinstall, please use the manual link in post 1.
 
Status
Not open for further replies.
Top