Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


filesearch keyword


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-16-2007, 01:35 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,343
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

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote
  #2 (permalink)  
Old 05-16-2007, 02:44 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
Default

The first parameter (files in your example) should be an ArrayList.
Reply With Quote
  #3 (permalink)  
Old 05-16-2007, 03:35 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,343
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

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote
  #4 (permalink)  
Old 05-16-2007, 03:45 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
Default

That is correct.
Reply With Quote
  #5 (permalink)  
Old 05-16-2007, 04:01 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,343
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

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote
  #6 (permalink)  
Old 05-16-2007, 04:14 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
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, 06:44 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,343
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Thanks Erel,

Now I see were I was going wrong...
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
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 On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 04:18 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0