Android Tutorial Getting help for Object and methods

The IDE Intellisense is wonderful for actually writing code but for browsing the available objects to see what is on offer it is a bit tedious so this afternoon I have knocked up this pretty awful bit of code (in Basic4ppc of course :)) to help. It's a bad (good!) example of a bit of code that grew like Topsy to fill a need - however that sort of code is often the most fun to write even if the end result is not to be proud of.

It needs my RichTextDesktop library.

EDIT :- Updated to version 1.1. See post #2 for details.

EDIT: - There is now a ready compiled version in the archive with RichTextDesktop merged into the exe.

EDIT :- Version 1.2 posted. See post #8 for details.

EDIT :- Version 1.3 posted. See post #9 for details.

EDIT :- Version 1.4 posted. See post #10 for details.

EDIT :- Version 1.5 posted. See post #12 for details.

EDIT :- Version 1.6 posted. See post #15 for details.

EDIT :- Version 1.7 posted. See post #17 for details.
 

Attachments

  • B4AHelp1.7.zip
    55.6 KB · Views: 447
Last edited:

mtw

Member
Licensed User
Longtime User
Can you post your library here, I cannot download your library from the link you posted

mtw, you do not have permission to access this page. This could be due to one of several reasons:
 

agraham

Expert
Licensed User
Longtime User
I'm a bit more pleased with version 1.4. It's tidied up and a lot faster. Now displayed is whether an instance of a class is an Activity or a Process object and if the class is a wrapper the Android class that it wraps is also displayed.
 
Last edited:

klaus

Expert
Licensed User
Longtime User
Hi Andrew,
I have a problem with version 1.4
Clicking the first time on the Browse button OK.
Clicking a second time to select another file I get the attached error.
I don't know if this happened in version1.3 I hadn't downloaded it.

Would you mind to still share the source code, I made some changes for my personal use, but it is with version 1.2. Added a ComboBox to select the xml files. The last xml file read is memorized when leaving the program and at the next start the user finds the last state.

Best regards.
 

Attachments

  • Error.jpg
    Error.jpg
    13.3 KB · Views: 239

agraham

Expert
Licensed User
Longtime User
Sorry, a bug slipped in to version 1.4 when I changed to caching the positions of each class in the xml. Now fixed in version 1.5.

Version 1.5 now displays the library version number and any event comments in the xml file are now displayed on a separate line. The only event with a comment in Core.xml is Activity_KeyPress.
 

klaus

Expert
Licensed User
Longtime User
Hi Andrew,
Attached version 1.52 with some user interface changes.
I hope that you agree with these changes and would take them over in futur versions.

Best regards.
 

Attachments

  • B4AHelp1_52.zip
    29.1 KB · Views: 258
Last edited:

agraham

Expert
Licensed User
Longtime User
There are two paths that the B4A IDE searches for libraries. The standard installation Libraries folder and another defined in Tools -> Configure Paths. The intention is that officially distributed libraries will be in the installation Libraries folder and user added libraries will be on the additional path which can be located somewhere that does not need Administrator permission to access which is a pain in Basic4ppc under Vista and Windows 7.

Once you have clicked on your Browse button and committed to a folder there is no way to access an alternate path without starting a new instance of the program. I don't know about your system but mine remembers the folder where the open dialog was last used and reopens it when I press the Browse button so it is just as easy as selecting from a Combo box and I can still change folders if I want as I envisage changing my Additional Path quite often when coding a library to point to the Eclipse Project folder as that is where I will get Eclipse and Javadoc (the thing that makes the xml file) to put the jar and the xml files.

Erel has let me have a beta copy of the "doclet" that Eclipse and Javadoc use to create the xml file and I have been experimenting with it while writing this program to try to cover all the possible entries that it might make in the xml. The data in the xml files, including the descriptions, are generated from the library source code itself and from comments included in the source file so the code and the help are maintained together in the one source file.

The compiler uses the xml file data to tell it what to compile and Intellisense uses the xml for the help. There is much less separation between the compiler and external libraries in Basic4Android than there was in Basic4ppc.
 

klaus

Expert
Licensed User
Longtime User
Sorry if I bothered you.

For me the B4AHelp program is mostly not open and I found it anoying having to look for the right folder every time I start it.
Now I have left the browse button available all time so it is possible to look for another folder.
But I can also remove the zip file if you prefer.

Best regards.
 

agraham

Expert
Licensed User
Longtime User
I'm getting quite pleased with what started out as a quick and dirty hack to explore the library xml description files.

Version 1.6 now has two browse buttons that remember their paths, one for the official library path and one for for additional libraries. Also I have stolen Klaus' idea for a button to link to the Android package documentation on the web. The app now uses visual styles which give larger combo box dropdowns that make navigation and selection easier.

I haven't posted the source as the app uses a custom library for the file open dialog.
 

tremara1

Active Member
Licensed User
Longtime User
This is a real help to me

Thanks for this great tool, it now gives me ready reference instead of trial and error coding. This is particularly useful during the beta phase as things change between versions, sometimes a couple of times a week. This was highlighted with a small app I wrote which worked fine. I went to edit the ap a day after updating B4a version and a method had been replaced and my app was broken. Whilst this was solved in the forum I now do not have to annoy you for every little change, again thanks.............
Trevor
Ballarat
Victoria
Australia
 

agraham

Expert
Licensed User
Longtime User
Thanks Trevor, I find it pretty useful too! :)

Version 1.7 is nearing the end of the development road for this application. It has been polished (inside where you can't see), a couple of bugs squashed and it now tries to automatically set the Libraries and Additional Libraries paths on startup. It also now sports a search facility to find, in the loaded XML file, classes that implement a named member.
 

robert black

Member
Licensed User
Longtime User
The IDE Intellisense is wonderful for actually writing code but for browsing the available objects to see what is on offer it is a bit tedious so this afternoon I have knocked up this pretty awful bit of code (in Basic4ppc of course :)) to help. It's a bad (good!) example of a bit of code that grew like Topsy to fill a need - however that sort of code is often the most fun to write even if the end result is not to be proud of.

It needs my RichTextDesktop library.

EDIT :- Updated to version 1.1. See post #2 for details.

EDIT: - There is now a ready compiled version in the archive with RichTextDesktop merged into the exe.

EDIT :- Version 1.2 posted. See post #8 for details.

EDIT :- Version 1.3 posted. See post #9 for details.

EDIT :- Version 1.4 posted. See post #10 for details.

EDIT :- Version 1.5 posted. See post #12 for details.

EDIT :- Version 1.6 posted. See post #15 for details.

EDIT :- Version 1.7 posted. See post #17 for details.
 
Top