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,559
Last edited:

agraham

Expert
Licensed User
Longtime User
I've not tried this before - very nice! However a lot of libraries have an overall description of the library in the XML in a comment attribute under root, sometimes with licensing info like my EJML library which uses a LGPL sub-library. I can't see where this is being shown. I would have expected it to be shown when clicking on the library name in the Classes pane.
 

Vader

Well-Known Member
Licensed User
Longtime User
I've not tried this before - very nice! However a lot of libraries have an overall description of the library in the XML in a comment attribute under root, sometimes with licensing info like my EJML library which uses a LGPL sub-library. I can't see where this is being shown. I would have expected it to be shown when clicking on the library name in the Classes pane.

If you give me a Library / Class name, I will look into it for you.
 

Vader

Well-Known Member
Licensed User
Longtime User
I've not tried this before - very nice! However a lot of libraries have an overall description of the library in the XML in a comment attribute under root, sometimes with licensing info like my EJML library which uses a LGPL sub-library. I can't see where this is being shown. I would have expected it to be shown when clicking on the library name in the Classes pane.

Oh, and thanks for the kind words. I put a LOT of hours into it.
 

Vader

Well-Known Member
Licensed User
Longtime User
While you are at it Dave :cool: I see that links in the comments are correctly coloured and underlined and the cursor changes appropriately when you mouse over them. However they are dead when clicked. Can you easily fix that?

I'll look at it also.

Because my app is 100% OOP, I have to add another property to the Library Class (Comment), and then the first issue should be easily fixed, however something wrong with the GUI is another matter. I'm at the mercy of the component maker, and in this instance it's MS.

(And it's 10:27 PM Easter Sunday, so I'm getting a little tired)

But, enough yabbering...
 

Vader

Well-Known Member
Licensed User
Longtime User
Ok, so I have updated it to version 3.1.5.0.

Changes/Fixes in this version:
  • 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)

As always, the link is in the first post.

Any other issues, they will have to be fixed later today (Easter Monday) as it's now 12:30 AM.
 
Last edited:

agraham

Expert
Licensed User
Longtime User
Thanks for the rapid update. I'm sorry if it seems I'm being picky (I know I am but at least I said sorry :)) but there are another three things I've noticed that I think are worth commenting on.

1) Search does not include not include events so if I want to find out what Views have a Click event and search for "click" I don't see them.

2) I think this one may be difficult but it's not that important now you got the links working but is a bit of a visual distraction. The BADoclet that produces the xml files insists on the format
B4X:
<link>SimpleMatrix|http://code.google.com/p/efficient-java-matrix-library/wiki/SimpleMatrix</link>
With a title and a URL separated by a pipe character. The On-line Documentation and Intellisense in the IDE display the title as a clickable link that goes to the URL which is not displayed. In B4a Object Browser both are displayed and when the title is also the URL, which is necessary if the intention is to display the actual URL in Intellisense, then two clickable links are shown. If you can't easily copy the Intellisense behaviour I wonder if a good compromise would be to only show the URL as a link and ignore the title.

3) Help-> About-> Libraries shows multiple entries for a library if the library has more than one class in it. As there is only one version entry in the xml fpr the whole library, which therefore applies to each class, only one entry is required. Or maybe I'm overlooking a reason for including all the classes.
 

Vader

Well-Known Member
Licensed User
Longtime User
Easiest one first...

3) Help-> About-> Libraries shows multiple entries for a library if the library has more than one class in it. As there is only one version entry in the xml fpr the whole library, which therefore applies to each class, only one entry is required. Or maybe I'm overlooking a reason for including all the classes.

BrowserLibraries.png
 

Vader

Well-Known Member
Licensed User
Longtime User
I'm getting there...

I had to deviate for Erel's sake first though...

BrowserHebrew.png


This is my first ever attempt at translation including Right-To-Left, so I am hopeful it goes off without a hitch. This is language number 16.

I'm still working on the other search items.
 

Vader

Well-Known Member
Licensed User
Longtime User
1) Search does not include not include events so if I want to find out what Views have a Click event and search for "click" I don't see them.

Search now includes the following:
  • Version
  • Author
  • DependsOn
  • Events
  • Permissions

BrowserEventsearch.png


You still can't search on comments or arguments, but until someone asks for that, I won't add it.

Anything else before I release this?
 
Last edited:

agraham

Expert
Licensed User
Longtime User
I'm sure you have thought of this as a future improvement but it would be nice have the layout of the panes saved and restored. I personally would rather have the Standard pane bigger and Method pane smaller.

Am I being thick or is View -> Show Search Results in Library Class Treeview not functional :confused:
 

Vader

Well-Known Member
Licensed User
Longtime User
I'm sure you have thought of this as a future improvement but it would be nice have the layout of the panes saved and restored. I personally would rather have the Standard pane bigger and Method pane smaller.

I will look into it, no promises.

Am I being thick or is View -> Show Search Results in Library Class Treeview not functional :confused:

Yes, it does work. Kinda. Basically turn it on then perform a search, you should see extra nodes added to the treeview (ie events etc) that you wouldn't normally.

Having said that though, I have just now found and am clearing up some bugs in that area, so I wouldn't be surprised if there was an exception or two waiting to surprise you.
 

Vader

Well-Known Member
Licensed User
Longtime User
Ok, so bugs squashed. Do you want to PM me with an email address, and I can send you the new version to test?

As a workaround on the sizing of the panes, I have made those two panes you mentioned, similar size.

How does this look to you: ?

BrowserMenu.png
 

Vader

Well-Known Member
Licensed User
Longtime User
Version 3.1.6.0 has been released. This version has the following changes and fixes:

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
Libraries screen now refers to Libraries, not classes

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.
 

Vader

Well-Known Member
Licensed User
Longtime User
Version 3.2.0.0 has been released.

It has the following changes:
  • 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

The biggest change here is the AutoUpdate facility. Basically, from this point, every time you run it, the Object Browser will check if a newer version exists, and if so, update itself. You have the option of ignoring or postponing the update if you so desire.

Here's a screenshot of the AutoUpdate functionality
(Don't worry, version 3.2.0.1 doesn't actually exist yet - I did this just to get the screenshot)

AutoUpdate.png


NOTE: At this time, AutoUpdate is NOT available in different languages. That will be in an upcoming version.
 
Status
Not open for further replies.
Top