Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

filesearch keyword

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-16-2007, 12:35 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default filesearch keyword

Hi

As I understood from the help file, the filesearch keyword provides two variable, one being an array that contains the filenames, and the number of files found...
How do I code this?

I tryed:

n=filesearch(files,apppath&"\imageset","*.dll")

this gives me a null reference error..
For the moment the dir is empty, so if should return 0, shouldn't it?
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #2 (permalink)  
Old 05-16-2007, 01:44 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The first parameter (files in your example) should be an ArrayList.
Reply With Quote
  #3 (permalink)  
Old 05-16-2007, 02:35 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

You mean that I need to add the array list before i call the filesearch keyword, right?
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #4 (permalink)  
Old 05-16-2007, 02:45 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

That is correct.
Reply With Quote
  #5 (permalink)  
Old 05-16-2007, 03:01 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

I still can't gett it to work...

I want to pass to labels the filenames found in the directory.
Can you exemplify how to pass the array...please!
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #6 (permalink)  
Old 05-16-2007, 03:14 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Try this:
Code:
Sub Globals

End Sub

Sub App_Start
    Form1.Show
    AddArrayList(
"al1")
    FileSearch(al1,AppPath,
"*.jpg")
    
For i = 0 to al1.Count - 1
        ListBox1.Add(FileName(al1.Item(i))) 
'Omit the FileName if you need the complete path.
    Next
End Sub
Reply With Quote
  #7 (permalink)  
Old 05-16-2007, 05:44 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Thanks Erel,

Now I see were I was going wrong...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
find keyword lijingtong Questions (Windows Mobile) 2 06-20-2008 09:05 AM
Auto Keyword im4retro Questions (Windows Mobile) 2 06-06-2008 03:45 PM
FileSearch Bobbes German Forum 21 05-31-2008 01:38 PM
fileSearch derez Questions (Windows Mobile) 2 02-20-2008 10:12 AM
Comment after Do keyword Erel Bug Reports 1 07-24-2007 08:33 PM


All times are GMT. The time now is 08:47 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0