Android Question Beginner - missing functions - installation issue?

Kevin Moloney

Member
Licensed User
Hello. I recently made a new installation of B4A on a new computer. After creating a new program, I am struggling to get the most basic functions visible in intellisense (I use the left function in my example below, but most other basic functions are missing).

I start a new program and try to type in the left function, but it doesn't appear in intellisense:
noleftfuntion.png

After finishing typing the function anyway, I get the following error:
undeclaredfunction.png


This feels like a missing library function, but I think I downloaded the necessary files and configured paths correctly, although I admit I was a bit confused by the download process. Here are my paths:


paths.png

Any help would be appreciated.
 

drgottjr

Expert
Licensed User
Longtime User
your configuration dialog is missing the location of your additional libraries folder. fill that in.
hopefully you brought that folder with you from the old machine. if not, you'll have to bring each additional library in one by one as needed...

anyway, this is what you were probably looking for:

string functions library:
Dim sf As StringFunctions  
Dim f As String
f = sf.Left("kevin",3)
 
Upvote 0

Kevin Moloney

Member
Licensed User
I added an new empty folder "C:\Additional Libraries" and set the (optional) path directory accordingly. It had no effect on the issue.

additional.png


Thank you for your reply.
 
Upvote 0

Kevin Moloney

Member
Licensed User
I guess I was assuming such basic functions such as "left" would be in the core library. Where would I locate the "stringFunctions" library?
 
Upvote 0

mangojack

Well-Known Member
Licensed User
Longtime User
Where would I locate the "stringFunctions" library?
I find the easiest way to locate a missing lib is to use the search feature (top right next to your account name/avatar.)

Results for "String Functions"


This might be of interest as well , regarding the suggested / proper method of storing additional librarys.

I have my base folder also in the Documents folder which is backup'd / synced using Dropbox.
 
Upvote 0

MarcoRome

Expert
Licensed User
Longtime User
I guess I was assuming such basic functions such as "left" would be in the core library. Where would I locate the "stringFunctions" library?


For anything you can do a search on the site. Surely (99%) you will find the answer to your question

1633234942184.png



 
Upvote 0

Kevin Moloney

Member
Licensed User
Success! đź–•

I downloaded the stringfunctions2 library files and added them to my "additional directory" folder, then checked it in the libraries manager.

librarires manager.png


And this works great...
this works thanks.png


The only thing I worry about is what other additional libraries might I need to do basic functions? Some time ago (I'm talking several B4X versions ago) it seems that something as simple as a left function didn't require the declaration of an additional library object ... it seemed to be built into the core language. Was this an effort to streamline the core? Or has my recollection been tainted with age? :mad:

Thanks so much for your help!!!
 

Attachments

  • this works thanks.png
    this works thanks.png
    8.2 KB · Views: 110
Upvote 0

Kevin Moloney

Member
Licensed User
Erel, I cut and pasted your reply ...
Dim s As String = "Kevin".SubString2(0, 3)

It works, although the lack of the left, right, mid functions will take some getting used to. When were these functions deprecated (or am I misremembering their existence in B4A)?

Thanks
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
When were these functions deprecated
Never. You probably used the not-recommended StringFunctions library in the past.

B4X:
Dim Kevin As String = "Kevin"
'Left
Dim s As String = Kevin.SubString2(0, 3)
Log(s)

'Right
Dim s As String = Kevin.SubString(Kevin.Length - 3)
Log(s)

'Mid
Dim s As String = Kevin.SubString2(1, 4)
Log(s)
 
Upvote 0
Top