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

Status
Not open for further replies.

Vader

Well-Known Member
Licensed User
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.
Now done!
 

Vader

Well-Known Member
Licensed User
Here's a quick heads-up on what is in store next...

Version 3 will allow custom comments against each Class, Field, Property and Method.
These comments will be downloaded from a central location out on the interwebs. What is the purpose of this?
Well, some XML files do not have complete descriptions. That is, the comments are empty.

Here's a few examples:
* ABCamera
* AHPopupMenu
* JetPlayer
* etc.

Even Core Libraries sometimes miss out. The following classes have empty Comments:
* anywheresoftware.b4a.keywords.LayoutBuilder.LayoutValuesAndMap
* anywheresoftware.b4a.objects.SimpleListAdapter.SingleLineLayout
* anywheresoftware.b4a.objects.SimpleListAdapter.TwoLinesAndBitmapLayout
* anywheresoftware.b4a.objects.SimpleListAdapter.TwoLinesLayout

On top of that, there are Methods, Properties and Fields that are also not documented. Here's some examples:
* com.AB.ABExtDrawing.ABExtDrawing.ABCamera.applyToCanvas
* anywheresoftware.b4a.objects.AnimationWrapper.IsInitialized
* anywheresoftware.b4a.audio.VideoViewWrapper.Background
etc

How do we fix this?
Well, I see two ways...
1. Bombard the Author of the Library in question with requests to add more information. This will necessitate the Author releasing a new version of the Library for this change. Then of course, after the Author has done that, someone else is likely to submit changes, and before you know it, the library is at version 1.267. Obviously this is not a good choice.
2. We take the Wiki approach. We individually take note of problems with the documentation, and we put our own version of the correct information forward, for inclusion automagically in everyone's installation of B4a.

The problem with approach #2 is that until now there has been no way for this to happen.

Enter B4a Object Browser v3 [TADA!]

I have already:
1. Implemented the changes to the Object Browser to allow it to download new comments if they are available online.
2. created a Web Service that saves the changes in a local database, and allows the Browser to query for them.
3. Added extra graphical elements to the Browser so that you know you are looking at local or Community content.
4. Added an option to control whether you use Community content, or local only (which is the default).

I still need to do the following:
1. Allow content to be submitted
2. Filter content, returning the most appropriate only
3. Allow users to vote for content they prefer to see (if there is multiple content submitted)

(Edit... Stumbling block removed: I got it working on my Hosted Server)

Here's a screenshot with the current changes highlighted:



Edit:

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

Roger Garstang

Well-Known Member
Licensed User
Will it also be possible just to update/add comments to local xml files? Not that big of a deal since they can easily be edited with Notepad, but would be useful. Then we can quickly add our own notes too that the rest of the world wouldn't need to see. There would need to be a way to save community content to the xml so B4A can make use of it too, so I imagine you already have this. Integrating all the edits together may get messy.
 

thedesolatesoul

Expert
Licensed User
Sorry for not adding the menu in the ICSMenu class. I was just trying to get it to work at that time. Now corwin42 has added it to his library so I dont have access to it.
Anyway, I really like the direction this tool is going in. Very good to see a community member going this far.
While I am here, I would like to give some suggestion (and only a suggestion). Once you get the server integration working, would it be possible to be able to store code snippets via the tool and store them on the server. This way everyone gets access to the code. You can store it by Author name, and allow it to be searchable by title. This would be for self-contained small snippets only (until someone comes around and wishes for a bigger thing!).
:sign0098::sign0098::sign0098:
 

Vader

Well-Known Member
Licensed User
Will it also be possible just to update/add comments to local xml files? Not that big of a deal since they can easily be edited with Notepad, but would be useful. Then we can quickly add our own notes too that the rest of the world wouldn't need to see. There would need to be a way to save community content to the xml so B4A can make use of it too, so I imagine you already have this. Integrating all the edits together may get messy.
Because I need to download all comments at every load, I had not considered keeping community comments local.
It does make sense to keep your own comments local though because of the reasons you cite, plus you may also not want to upload your own comments.
Also, because of the way comments are to be displayed using the voting system, you may want your own comment, regardless of if it is the most popular.
So yes, your own comments will be stored locally.


Sorry for not adding the menu in the ICSMenu class. I was just trying to get it to work at that time. Now corwin42 has added it to his library so I dont have access to it.
Anyway, I really like the direction this tool is going in. Very good to see a community member going this far.
While I am here, I would like to give some suggestion (and only a suggestion). Once you get the server integration working, would it be possible to be able to store code snippets via the tool and store them on the server. This way everyone gets access to the code. You can store it by Author name, and allow it to be searchable by title. This would be for self-contained small snippets only (until someone comes around and wishes for a bigger thing!).
:sign0098::sign0098::sign0098:
This is actually the 2nd reason I came up for doing this. Code snippets are currently shown in the method/property/field comments because that's where Erel put them in the xml file.
Consequently, people can put their snippet in the same place just by virtue of commenting on the method/property/field.
I guess it would be easy to show all comments submitted ordered by vote so that if 2 comments are helpful, you can see both.
That will make the GUI a little more challenging, but as I type this, I can see options already on how to do it.
I guess the answer really is that yes I can do as you ask, and control it by personal options, so that it can work in the original manner (which now sounds quite limiting I must admit) or the way I have described just now.

Please don't be shy in putting suggestions forward. Now that I'm working full time (I was unemployed up to 2 weeks ago, which explains my progress in part) I can't think of everything myself, so suggestions are encouraged.
 

Vader

Well-Known Member
Licensed User
Once you get the server integration working, would it be possible to be able to store code snippets via the tool and store them on the server. This way everyone gets access to the code. You can store it by Author name, and allow it to be searchable by title. This would be for self-contained small snippets only (until someone comes around and wishes for a bigger thing!).
:sign0098::sign0098::sign0098:
Ok, so two things... who defines what a big snippet is, vs a small snippet? That's a rhetorical question, don't answer it :)

I could do both. Add snippets separately and show them with the Browser, plus create a new tool to manage snippets only. This tool would be tailored for snippets, so will have a better interface for that purpose.

I think that sounds like a good approach, and utilising the same Web Service, it is easy to do the Server stuff. Watch this space! ;)
 

Vader

Well-Known Member
Licensed User
Ok, so I have had some good progress tonight.

It doesn't save edits yet, but I can at least select the correct text and edit it.





It's getting there slowly, but surely. I will post more teasers as I go.
 

Vader

Well-Known Member
Licensed User
Ok, so it is a bit after 1:30 AM here.

I have gotten this version to the point where what is working is:
Voting
Community content

I still need to:
Add the ability to save comments locally,
"Browse" multiple comments against the same class/method/property/field.


I expect that I will get this working tomorrow (today - 16 Feb).

If anyone wants to beta test this, send me a PM with an email address so I can send the zip to you.
I may just select a few people, rather than just everyone, so please don't be offended if you don't get an email.

Just give me about 10 hours from now to sleep :)
 

Vader

Well-Known Member
Licensed User
I am testing this myself by adding documentation for the libraries I have.
Still no local comments, but that may have to be V3.1. We'll see.

In the meanwhile I will keep adding to the documentation pool and see how it goes for usability.

At the very least, V3.0.0.0 will have extra documentation than what people have today, and that was the primary reason for the tool anyway.
 

Vader

Well-Known Member
Licensed User
Let me spin up a VM that hasn't had any exposure to my development and I will see what is happening.
 

Vader

Well-Known Member
Licensed User
Ok, so try this...

Go here and get the setup and install it.

That should get you up and running.

Edit: Don't use Community content in this version as it is broken
 
Last edited:

robife

Member
Licensed User
Vader I get error when I try to use (USE COMMUNITY DATA)
Application crash.

B4X:
*********** Unntakstekst **************
System.ServiceModel.EndpointNotFoundException: Kan ikke koble til http://localhost:61687/WebService.asmx. TCP-feilkode 10061: Kan ikke koble til fordi målmaskinen avslo tilkobling 127.0.0.1:61687.  ---> System.Net.WebException: Kan ikke koble til den eksterne serveren ---> System.Net.Sockets.SocketException: Kan ikke koble til fordi målmaskinen avslo tilkobling 127.0.0.1:61687
   ved System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   ved System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
   ved System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
   --- Slutten på sporingen av intern unntaksstakk ---
   ved System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
   ved System.Net.HttpWebRequest.GetRequestStream()
   ved System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
   --- Slutten på sporingen av intern unntaksstakk ---

Server stack trace: 
   ved System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
   ved System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
   ved System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout)
   ved System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
   ved System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
   ved System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   ved System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
   ved System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   ved System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   ved System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   ved System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   ved Browser.CommunityLibrary.WebServiceSoap.GetUserDetails(String Version, String Username, String Password, String EmailAddress)
   ved Browser.CommunityLibrary.WebServiceSoapClient.GetUserDetails(String Version, String Username, String Password, String EmailAddress)
   ved Browser.frmOptions.btnCheckUsername_Click(Object sender, EventArgs e)
   ved System.Windows.Forms.Control.OnClick(EventArgs e)
   ved System.Windows.Forms.Button.OnClick(EventArgs e)
   ved System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   ved System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   ved System.Windows.Forms.Control.WndProc(Message& m)
   ved System.Windows.Forms.ButtonBase.WndProc(Message& m)
   ved System.Windows.Forms.Button.WndProc(Message& m)
   ved System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   ved System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   ved System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Innlastede samlinger **************
mscorlib
    Samlingsversjon: 2.0.0.0
    Win32-versjon: 2.0.50727.5466 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Browser
    Samlingsversjon: 3.0.0.0
    Win32-versjon: 3.0.0.0
    CodeBase: file:///C:/Users/amin/AppData/Local/Apps/2.0/649GQE7Z.EO1/O86QR8M7.WND/brow..tion_c7e04ff45de32524_0001.0000_a8a76c096218812b/Browser.exe
----------------------------------------
System.Windows.Forms
    Samlingsversjon: 2.0.0.0
    Win32-versjon: 2.0.50727.5468 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Samlingsversjon: 2.0.0.0
    Win32-versjon: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Samlingsversjon: 2.0.0.0
    Win32-versjon: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
LibraryObjects
    Samlingsversjon: 1.0.0.0
    Win32-versjon: 1.0.0.0
    CodeBase: file:///C:/Users/amin/AppData/Local/Apps/2.0/649GQE7Z.EO1/O86QR8M7.WND/brow..tion_c7e04ff45de32524_0001.0000_a8a76c096218812b/LibraryObjects.DLL
----------------------------------------
System.ServiceModel
    Samlingsversjon: 3.0.0.0
    Win32-versjon: 3.0.4506.5452 (Win7SP1GDR.030729-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.ServiceModel/3.0.0.0__b77a5c561934e089/System.ServiceModel.dll
----------------------------------------
System.Data
    Samlingsversjon: 2.0.0.0
    Win32-versjon: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Xml
    Samlingsversjon: 2.0.0.0
    Win32-versjon: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
SMDiagnostics
    Samlingsversjon: 3.0.0.0
    Win32-versjon: 3.0.4506.5452 (Win7SP1GDR.030729-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/SMDiagnostics/3.0.0.0__b77a5c561934e089/SMDiagnostics.dll
----------------------------------------
System.Configuration
    Samlingsversjon: 2.0.0.0
    Win32-versjon: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Web
    Samlingsversjon: 2.0.0.0
    Win32-versjon: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
System.WorkflowServices
    Samlingsversjon: 3.5.0.0
    Win32-versjon: 3.5.594.5420
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.WorkflowServices/3.5.0.0__31bf3856ad364e35/System.WorkflowServices.dll
----------------------------------------
System.ServiceModel.Web
    Samlingsversjon: 3.5.0.0
    Win32-versjon: 3.5.594.5420
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.ServiceModel.Web/3.5.0.0__31bf3856ad364e35/System.ServiceModel.Web.dll
----------------------------------------
System.Runtime.Serialization
    Samlingsversjon: 3.0.0.0
    Win32-versjon: 3.0.4506.5452 (Win7SP1GDR.030729-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Serialization/3.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
System.IdentityModel
    Samlingsversjon: 3.0.0.0
    Win32-versjon: 3.0.4506.5452 (Win7SP1GDR.030729-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.IdentityModel/3.0.0.0__b77a5c561934e089/System.IdentityModel.dll
----------------------------------------
HtmlRichTextBox
    Samlingsversjon: 1.0.4795.41145
    Win32-versjon: 1.0.4795.41145
    CodeBase: file:///C:/Users/amin/AppData/Local/Apps/2.0/649GQE7Z.EO1/O86QR8M7.WND/brow..tion_c7e04ff45de32524_0001.0000_a8a76c096218812b/HtmlRichTextBox.DLL
----------------------------------------
fvwwfryi
    Samlingsversjon: 2.0.0.0
    Win32-versjon: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
mscorlib.resources
    Samlingsversjon: 2.0.0.0
    Win32-versjon: 2.0.50727.5466 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
TreeViewWalker
    Samlingsversjon: 1.0.4795.41145
    Win32-versjon: 1.0.4795.41145
    CodeBase: file:///C:/Users/amin/AppData/Local/Apps/2.0/649GQE7Z.EO1/O86QR8M7.WND/brow..tion_c7e04ff45de32524_0001.0000_a8a76c096218812b/TreeViewWalker.DLL
----------------------------------------
System.Xml.Linq
    Samlingsversjon: 3.5.0.0
    Win32-versjon: 3.5.30729.5420 built by: Win7SP1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml.Linq/3.5.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------
System.Core
    Samlingsversjon: 3.5.0.0
    Win32-versjon: 3.5.30729.5420 built by: Win7SP1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
bfjyf1am
    Samlingsversjon: 3.0.0.0
    Win32-versjon: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.resources
    Samlingsversjon: 2.0.0.0
    Win32-versjon: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.resources/2.0.0.0_no_b77a5c561934e089/System.resources.dll
----------------------------------------
system.servicemodel.resources
    Samlingsversjon: 3.0.0.0
    Win32-versjon: 3.0.4506.5420 (Win7SP1.030729-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.ServiceModel.resources/3.0.0.0_no_b77a5c561934e089/System.ServiceModel.resources.dll
----------------------------------------
System.Windows.Forms.resources
    Samlingsversjon: 2.0.0.0
    Win32-versjon: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_no_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------

************** JIT-feilsøking **************
Når du skal aktivere JIT-feilsøking (Just In Time), må .config-filen for dette
programmet eller datamaskinen (machine.config) ha
jitDebugging-verdien angitt i delen system.windows.forms.
Programmet må også kompileres med feilsøking
aktivert.

For eksempel:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

Når JIT-feilsøking er aktivert, blir alle ubehandlede unntak
sendt til JIT-feilsøkingen som er registrert på datamaskinen,
i stedet for å bli behandlet av denne dialogboksen.
Version 3.0.0 setup
 

Vader

Well-Known Member
Licensed User
this error is due to me publishing the debug version. The only thing that you can do is go back to version 2.7 whilst I prepare the next release.

Apologies to all.
 

Vader

Well-Known Member
Licensed User
All,

Please be aware that I am still working on this. Basically the Community features take a lot more time than I originally envisioned due to the testing required.

On a side note, I have fixed the unicode display problem first reported by Frédéric.

I have also decided to modify the GUI so that it looks more like the Visual Studio Object Browser and provides more screen real-estate.
 
Status
Not open for further replies.
Top