Android Tutorial B4X Object Browser - new thread

Vader

Well-Known Member
Licensed User
Longtime User
I have updated the parser for Method to handle this. I also needed to update the DocumentMethod method to ensure the end-result read correctly - i.e. see the above screen shot that showed:
1. Return Value title, but no value (it should have been "void")
2. Method syntax showing

"AnalogWriteRange(Range as Uint) As",

again without "void"

It now behaves as per the following:


@Erel should a return type always be specified?

@Starchild : for your information
 
Last edited:

Vader

Well-Known Member
Licensed User
Longtime User
Also found and fixed another minor issue where in B4r, the type for "void" isn't actually "void", but "B4R::void". This meant that if you didn't want to see void in the method documentation (i.e. under the View menu, you did not enable "Show Void in usage") you were ok, until you viewed methods "returning" a B4R void.
 
Last edited:

Vader

Well-Known Member
Licensed User
Longtime User
Until/unless I find that this situation is ok, I will flag this as an issue with the Method.

 

Vader

Well-Known Member
Licensed User
Longtime User
I found that whilst working with the XML files, I needed to easily get the path to the Library so I could then open that folder to view the file contents.

This led me to add the following features to the right-click menu:
Open folder in Explorer
Open XML file

Note: "Open XML file" will launch your computer's default application for XML files. This could be Notepad, a Web browser, or something like Notepad++. It all depends on what you have configured.

 

Vader

Well-Known Member
Licensed User
Longtime User
B4x Browser 4.20.5.1 has been released. There is a small bug in that "DesignerProperty" is shown, however the detail font is the same color as the background so you can't see the actual details yet.

Believe it or not, it's been a tricky bug to fix

All other changes are as per the Releasenotes.htm, viewable when AutoUpdate kicks off, (or see the link below).

Hint: the latest release notes are always available here.
 

Sandman

Expert
Licensed User
Longtime User
How come you're using Visual Studio instead of B4J? I'm sure you're more used to VS, but are there features in B4J that you're missing, it something like that? (Not judging, just curious.)
 

Vader

Well-Known Member
Licensed User
Longtime User
How come you're using Visual Studio instead of B4J? I'm sure you're more used to VS, but are there features in B4J that you're missing, it something like that? (Not judging, just curious.)
By your question, I gather you've at least read the release notes. Does that mean you have also got the new version? I hope so. I like to help people, it's kind of my Ethos.

Regarding your question, to be completely honest, it's because I'm a Visual Studio developer by day, so it's easy to just continue the way I have been. I'm a Judo [assistant] coach also, but I can't do any Judo at the moment

I've been a member here for a long time, and I was only thinking today that I should really rewrite B4X Browser in a B4 language. Language and IDE differences aside, I don't know how I would go about doing packaging, installing, updates etc. Is there something that does that for B4J? I don't know.

And really, because I don't know, it's just easier to continue doing what I know.
 

agraham

Expert
Licensed User
Longtime User
Thanks for the update. I have been using your B4ABrowser up to now as B4X Browser didn't seem to show the overall library description.

A minor UI bugette however. I have a Surface Studio which has a HiDpi screen running at 200% scaling. If I resize the browser window then open the Options dialog by the toolbar button when I close the Options dialog the windows resizes back to what it was before resizing it. This doesn't happen if I open the Options dialog using main menu Tools -> Options.

Also a more major problem. Once I have added my B4A additional libraries folder I see no entries in the Classes pane, even after closing and restarting. It also kills the B4J Classes pane although I haven't added my B4J additional folders. I have to remove my B4A additional folders path and restart the browser to get the Classes pane filled again.
The path is "C:\Users\Andy\Documents\B4A\AdditionalLibraries". The library list is however correct, including both the main B4A and my additional libraries, in the list shown in Help -> About -> Libraries with B4A selected in the toolbar.
 

agraham

Expert
Licensed User
Longtime User
I've discovered, entirely by accident, that if I add my additional libraries path and check View -> Load XML On Demand then when I restart the browser all the libraries are shown. Then unchecking Load XML On Demand will immediately lose all the classes in the Classes pane.
 

Sandman

Expert
Licensed User
Longtime User
By your question, I gather you've at least read the release notes.
That is correct. I used B4XOB quite a bit when I started to wrap my head around B4X.
Does that mean you have also got the new version? I hope so. I like to help people, it's kind of my Ethos.
Sorry, no. Only because I'm focusing on other areas of coding at the moment. I do plan to get back into app development within a month or so, and at that point I will sink my teeth into your new version. I can already tell that my own b4xlibs will be a central thing for me, so I'm extra interested in trying out that area. And it's a nice ethos.

I don't have a real opinion whether it's correct or not to use VS or B4J, I was only interested. However, if you decide to take the plunge and remaking it in B4J, I would recommend documenting things along the way and make screenshots. I can imagine that people would be interested and willing to pay for an ebook where you go through it all. (I would probably be, at least.)
 

Vader

Well-Known Member
Licensed User
Longtime User
Thanks for the update. I have been using your B4ABrowser up to now as B4X Browser didn't seem to show the overall library description.

Is it ok now?


Thanks for that. The toolbar button wasn't calling a SaveScreenLayout() method. It does now.


I had a quick look at this (I'm about to start work for the day), and all the right controls are in the right places, linked to the right methods, so I don't know why this is happening. Yet.

I'll have a better look in about 8 hours.
 

Vader

Well-Known Member
Licensed User
Longtime User

One thing you can do to see if it helps understand what's going on is to check the config that has been saved:
  • Go into B4x OB and make some small change. Maybe windows size or position.
  • Close B4x OB.
  • Then open %localappdata%\Vader_Consulting. You will see a few folders (this will be unique to your PC) starting with "Browser.exe_".
  • One of them will be changed today, and will contain a folder called "4.20.5.1". Open this folder and you will find "user.config".


The contents should be self explanatory, but see what is happening in there and let me know what you have found.

 

agraham

Expert
Licensed User
Longtime User
The user.config looks fine but I didn't think the problem was there because, as I noted above,the list of libraries in the Help dialog is correct so it is finding the libraries, just not displaying them. As the problem was cured by checking Load XML On Demand I postulated that maybe the problem was in the content of the the additional libraries folder so I created a copy and started deleting things and found that it is this attached xml file that causes the problem. Playing further with Load XML On Demand checked and so displaying the list of classes I got this uncaught exception when I clicked on ScaleImageView.

B4X:
************** Exception Text **************
System.FormatException: Input string was not in a correct format.
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   at System.Convert.ToInt32(String value)
   at Browser.frmMain.LoadXMLFileData(String Filename, TreeNode RootNode, Library ParentLibrary)
   at Browser.frmMain.SelectLibraryOrClassTreeNode()
   at Browser.frmMain.tvwClasses_AfterSelect(Object sender, TreeViewEventArgs e)
   at System.Windows.Forms.TreeView.OnAfterSelect(TreeViewEventArgs e)
   at System.Windows.Forms.TreeView.TvnSelected(NMTREEVIEW* nmtv)
   at System.Windows.Forms.TreeView.WmNotify(Message& m)
   at System.Windows.Forms.TreeView.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
 

Attachments

  • ScaleImageView.xml
    29.8 KB · Views: 309

Vader

Well-Known Member
Licensed User
Longtime User



I'll get onto this straight away.
 

Vader

Well-Known Member
Licensed User
Longtime User
I should have taken more notice of the information that Erel sent me. That's a string field, not numeric.

 

Vader

Well-Known Member
Licensed User
Longtime User
I have been thinking about cleaning the interface up, and I was shown a mockup that I liked.

@Sandman

So, this is what it looks like now:



It isn't finished yet - I still have to redo the menu options. You will see the DesignerProperties are there though.

Also, I was asked a long time ago (by @Shagratt, but it seems that he's gone missing in action) if I could do something about the font size. Well, as it so happens, I can. Hopefully this helps some of you out.

 

Vader

Well-Known Member
Licensed User
Longtime User
This is just a quick note to say that I haven't forgotten anything. There is a major rewrite coming...

@Sandman convinced me that the UI needed a refresh.

Here's a preview:

(The Google page will be replaced by HTML representing a HTML version of the documentation for the selected class)



For those of you that prefer the Windows Dark theme, I have that covered also



Initially, English only. Multiple translations will be added later.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…