On 12/16/04 5:42 PM, Frank D. Engel, Jr. wrote:

Except that you need to delete the last "cr" before putting it into the list, or you will have a blank line at the bottom; just add one line to the code:

function FindData pStringToFind, pDataToSearch
  repeat for each line tLine in pDataToSearch
     if pStringToFind is in tLine then put tLine &cr after tFoundData
  end repeat

delete the last char of tFoundData

  return tFoundData
end FindData

Sometimes, but it depends on what you're doing. Revolution is forgiving enough that a lot of the time it doesn't matter. For example, "the number of lines" will return the same number whether the carriage return is at the end or not.


This has come up before, and it isn't a bug, it's a feature. Commas work the same way.


On Dec 16, 2004, at 6:32 PM, Richard Gaskin wrote:

D.Rothe wrote:

Hi,
I have a tab delimited list I want to be able to search, say I have a list of names for example;
Father Xmas Is Drunk
New Years Is after Xmas
Rudolph The Reindeer
Merry Xmas To all
I want to search for ALL instances of Xmas and display the whole matching line of each found in a list field.
So far I can get it to display the first line only ( Father Xmas Is Drunk) ! Any help would appreciated!!! I have checked the tutorials for help but couldn't find what I was looking for,
is there an example stack or notes anyone may know of?


For short lists (<50,000 lines) you may be pleasantly surprised by the speed of what might look like clunkly Transcript:


function FindData pStringToFind, pDataToSearch repeat for each line tLine in pDataToSearch if pStringToFind is in tLine then put tLine &cr after tFoundData end repeat return tFoundData end FindData


You can call it simply enough:

on mouseUp
  put FindData("Xmas", fld "stuff")
end mouseUp


-- Richard Gaskin Fourth World Media Corporation __________________________________________________ Rev tools and more: http://www.fourthworld.com/rev _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution


-----------------------------------------------------------
Frank D. Engel, Jr.  <[EMAIL PROTECTED]>

$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.
$




___________________________________________________________
$0 Web Hosting with up to 120MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution





--
Jacqueline Landman Gay         |     [EMAIL PROTECTED]
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to