[Gambas-user] Explicitly load a library

2017-05-28 Thread adamn...@gmail.com
Is there any way to explicitly load a library similar to loading a component via Component.Load(name as String)? I want to load a library used by another project and determine the exposed classes in the library. It's for a code generator. So, my "target" project, say "AuctionCalendar" uses the

Re: [Gambas-user] Reg expression still beating me up

2017-05-28 Thread Tobias Boege
On Sun, 28 May 2017, Fernando Cabral wrote: > In the piece of code bellow, RegExp.Replace will never return. > > Sentencas[i] = "Test string." > Print "Before replacing" > Sentencas[i] = RegExp.Replace(Sentencas[i], "[.:!?;]*[ ]*?\n*?", "", > RegExp.UTF8) > Print "After replacing" > > It beats me

[Gambas-user] Reg expression still beating me up

2017-05-28 Thread Fernando Cabral
In the piece of code bellow, RegExp.Replace will never return. Sentencas[i] = "Test string." Print "Before replacing" Sentencas[i] = RegExp.Replace(Sentencas[i], "[.:!?;]*[ ]*?\n*?", "", RegExp.UTF8) Print "After replacing" It beats me, because what it should do is very simple: optionally find on

Re: [Gambas-user] rdir returns unwanted directories

2017-05-28 Thread Gianluigi
Finally, it's all clear to me as well. In my example, just change the code like this: Print File.Name(s) Thank you Tobias Regards Gianluigi 2017-05-28 19:29 GMT+02:00 Tobias Boege : > On Sun, 28 May 2017, Gianluigi wrote: > > Hi Tobias, > > if I have in my home a directory named image with a s

Re: [Gambas-user] rdir returns unwanted directories

2017-05-28 Thread Tobias Boege
On Sun, 28 May 2017, Gianluigi wrote: > Hi Tobias, > if I have in my home a directory named image with a subfolder named > my-image, containing both images, and I write: > > Public Sub Main() > > Dim sFileArray As String[] > Dim s As String > Dim sPath As String = "~/image" > ' Run direct

Re: [Gambas-user] rdir returns unwanted directories

2017-05-28 Thread Gianluigi
Hi Tobias, if I have in my home a directory named image with a subfolder named my-image, containing both images, and I write: Public Sub Main() Dim sFileArray As String[] Dim s As String Dim sPath As String = "~/image" ' Run directory e sub-directory sFileArray = RDir(sPath, "*.{png,jpg

Re: [Gambas-user] rdir returns unwanted directories

2017-05-28 Thread Tobias Boege
On Sun, 28 May 2017, Charlie wrote: > I presume you just want the file name not the folder details. If so try this, > sFiles will contain just the file name: - > *Public Sub Form_Open() > Dim sFileArray As New String[] > Dim sFiles As New String[] > Dim sTemp As String > sFileArray = RDir(User.Home

Re: [Gambas-user] rdir returns unwanted directories

2017-05-28 Thread Gianluigi
now I understand the question :-) Regards Gianluigi 2017-05-28 15:05 GMT+02:00 Charlie : > I presume you just want the file name not the folder details. If so try > this, > sFiles will contain just the file name: - > *Public Sub Form_Open() > Dim sFileArray As New String[] > Dim sFiles As New St

Re: [Gambas-user] rdir returns unwanted directories

2017-05-28 Thread bill-lancaster
Thank you Charlie, In fact I'm looking for all the image files in the sPathThumbs folder -- View this message in context: http://gambas.8142.n7.nabble.com/rdir-returns-unwanted-directories-tp59204p59209.html Sent from the gambas-user mailing list archive at Nabble.com.

Re: [Gambas-user] rdir returns unwanted directories

2017-05-28 Thread Charlie
I presume you just want the file name not the folder details. If so try this, sFiles will contain just the file name: - *Public Sub Form_Open() Dim sFileArray As New String[] Dim sFiles As New String[] Dim sTemp As String sFileArray = RDir(User.Home, "*", gb.File) For Each sTemp In sFileArray sF

Re: [Gambas-user] rdir returns unwanted directories

2017-05-28 Thread bill-lancaster
By specifying only files of type png or jpg directories would be excluded any way. So this would produce the same result:- sFileArray = RDir(sPathThumbs, "*.{png,jpg}") Any way, I must thank you because I'd been looking for a way to specify multiple file types and you've answered my question! Bi

Re: [Gambas-user] rdir returns unwanted directories

2017-05-28 Thread Gianluigi
If you do not want to search in the sub directories use Dir Regards Gianluigi 2017-05-28 12:00 GMT+02:00 bill-lancaster : > This line of code returns files AND directories > > sFileArray = RDir(sPathThumbs, "*", gb.File) > > Any ideas would be welcome > > Gambas 3.9.2 > Kubuntu 16.10 > > > > --

Re: [Gambas-user] rdir returns unwanted directories

2017-05-28 Thread Gianluigi
You mean this? sFileArray = RDir(sPathThumbs, "*.{png,jpg}", gb.File) Regards Gianluigi 2017-05-28 12:00 GMT+02:00 bill-lancaster : > This line of code returns files AND directories > > sFileArray = RDir(sPathThumbs, "*", gb.File) > > Any ideas would be welcome > > Gambas 3.9.2 > Kubuntu 16.10

[Gambas-user] rdir returns unwanted directories

2017-05-28 Thread bill-lancaster
This line of code returns files AND directories sFileArray = RDir(sPathThumbs, "*", gb.File) Any ideas would be welcome Gambas 3.9.2 Kubuntu 16.10 -- View this message in context: http://gambas.8142.n7.nabble.com/rdir-returns-unwanted-directories-tp59204.html Sent from the gambas-user mailin