xml help viewers

klaus

Expert
Licensed User
Longtime User
@agraham and Vader
Since B4A version 2.5 we can compile classes to libraries.
Trying to display such libraries on both xml help viewers gives following:
One example is the HttpUtils2 class which is a library since version 2.70.
Attached the xml and jar files of one of my library.

@agraham
In your viewer the comments are not displayed.
It seems that when the name definition is like below the comments are not displayed.
B4X:
<name DesignerName="Complete">_complete</name>
<comment>Called by the service when job completes</comment>
it works fine with this:
B4X:
<name>ReduceColors</name>
@Vader
In your viewer selecting HttpUtile2 library throws the error below.

And another wish.
For these libraries the Class_Globals routine is displayed.
The setXX and getXX routines to define properties are also displayed.
These routines are of no real use for the user, could these be skipped?

Could you please update the viewers, thank you in advance.

Best regards.
 

Attachments

  • LimitBar.zip
    5 KB · Views: 184
  • ErrorMessage.png
    ErrorMessage.png
    65.1 KB · Views: 248

agraham

Expert
Licensed User
Longtime User
I now use Vaders ObjectBrowser exclusively. It is a much more elegant implementation than mine which was a quick hack that grew incrementally, and not very gracefully, as the early beta versions of Baic4andoid were developed. I haven't updated mine for over two years now so I would recommend you to switch too.
 

Vader

Well-Known Member
Licensed User
Longtime User
@agraham and Vader
Since B4A version 2.5 we can compile classes to libraries.
Trying to display such libraries on both xml help viewers gives following:
One example is the HttpUtils2 class which is a library since version 2.70.
Attached the xml and jar files of one of my library.

@agraham
In your viewer the comments are not displayed.
It seems that when the name definition is like below the comments are not displayed.
B4X:
<name DesignerName="Complete">_complete</name>
<comment>Called by the service when job completes</comment>
it works fine with this:
B4X:
<name>ReduceColors</name>
@Vader
In your viewer selecting HttpUtile2 library throws the error below.

And another wish.
For these libraries the Class_Globals routine is displayed.
The setXX and getXX routines to define properties are also displayed.
These routines are of no real use for the user, could these be skipped?

Could you please update the viewers, thank you in advance.

Best regards.

I will look into this over this weekend and report back here.
 

Vader

Well-Known Member
Licensed User
Longtime User
And another wish.
For these libraries the Class_Globals routine is displayed.
The setXX and getXX routines to define properties are also displayed.
These routines are of no real use for the user, could these be skipped?

How exactly would you like this done? What if people call a method by those names that are actually important to be seen?

Do I add an option to ignore all methods with those names?
 

Vader

Well-Known Member
Licensed User
Longtime User
Klaus, what version of the B4a Object Browser are you using?

I don't see the error you have reported.

Dave
 

agraham

Expert
Licensed User
Longtime User
This was in reply to post#7 above. Post #8 arrived in the meantime.

When the XML is produced for a jar compiled in Eclipse the BADoclet that produces it ignores any methods prefixed with lower-case "get", as long as the method takes no parameters, or "set", as long as the method takes one parameter and returns void, and produces the appropriately named property entry. As long as the library author didn't use the "set" or "get" prefix on non-property methods you won't see any methods in the XML prefixed with lower-case "get" or "set". For my part my libraries use upper-case "Set " or "Get" as a prefix if I want or need to so avoiding possible confusion.

It looks like the XML that the IDE produces includes both the required property and also the associated "get" and "set" methods. I don't know if it needs to or if this is an oversight, though if it does need to I can't immediately see why

For the mod I have just done I ignore "Class_Globals" and anything starting with lower-case "get" or "set". The only time I can see it failing is if a library author didn't conform to my convention outlined above. I guess the same thing is true for a module author compiling to a library in the IDE although I haven't actually tried it.
 

klaus

Expert
Licensed User
Longtime User
@Vader
Klaus, what version of the B4a Object Browser are you using?
I used version 3.2.1.0 which I downloaded yesterday. It showed the error message for all libraries.
Now l downloaded version 3.2.0.0 which works OK.

Coming back to the libraries generated with the IDE:
In my LimitBar library I want a Max property.
To read the property I defined a Sub getMax As Int routine
To set the property I defined a Sub setMax(cMax As Int)
That's the new method to handle CustomView properties.
In the browser you see getMax, setMax and Max but for the library user only Max is useful.
The routines Class_Globals and the DesignerCreateView are of no use for the library user.
The DesignerCreateView is used internaly with the Designer to handle CustomViews.
To give the library user the possibility to add the CustomView in code he needs to write a specific routine to add the view to a parent view, AddView in my LimitBar example.

Best regards.

EDIT: 2013.05.25 removed an error in the text.
 
Last edited:

Vader

Well-Known Member
Licensed User
Longtime User
I used version 3.2.1.0 which I downloaded yesterday. It showed the error message for all libraries.
Now l downloaded version 3.2.0.0 which works OK.

Please check the version you are using. It should be 3.2.4.4.
 

Vader

Well-Known Member
Licensed User
Longtime User
I will get back to this in the morning - it's almost midnight here.

I had to translate a couple of extra menu options into each of the 20 languages :sign0089:
 

klaus

Expert
Licensed User
Longtime User
I modified post #10 because there was an error.
The Initialize routine IS NECESSARY to initialize the CustomView.

New text:
The routines Class_Globals and the DesignerCreateView are of no use for the library user.
The DesignerCreateView is used internaly with the Designer to handle CustomViews.
To give the library user the possibility to add the CustomView in code he needs to write a specific routine to add the view to a parent view, AddView in my LimitBar example.
The original text was:
The routines Class_Globals, the DesignerCreateView and even the Initialize routine are of no use for the library user.
DesignerCreateView and Initialize are used internaly with the Designer to handle CustomViews.
To give the library user the possibility to add the CustomView in code he needs to write a specific Initialize routine. Initialize2 in my LimitBar example.
Best regards.
 
Last edited:

Vader

Well-Known Member
Licensed User
Longtime User
Don't worry, no hurry.

Best regards.

I just put the new version up. If you open the Browser now, it will update to Version 3.2.5.0.

This version has two extra options to display Class_Globals and Property Get and Property Set.

Edit: The settings do take into account the search functionality.
 
Top