OK I think I see what is going on here and it IS a bug! Filter is treating all the lines the way LC normally does, the line without the carriage return. The bug is that if the last character is a carriage return, it is being included with the filtered text! I am going to submit it to the QCC unless someone can explain why this is reasonable behavior.
Bob On Feb 20, 2012, at 1:45 PM, Pete wrote: > I think I see the difference. My code didn't have a final return after the > last line, yours did. If I change my code to include the final return, the > return IS included in the result of the filter, even though it's the first > line that is in there, not the last one!! That is very strange and just > reinforces my feeling that the definition os a line is not consistant. > Pete > > On Mon, Feb 20, 2012 at 1:15 PM, Bob Sneidar <b...@twft.com> wrote: > >> That is very odd. I put this in a button: >> >> ON mouseUp pMouseBtnNo >> put "test 1" & cr & "test 2" & cr into theText >> filter theText WITH "test 1" >> put return is in theText >> breakpoint >> END mouseUp >> >> I get true and the return is in the variable in the debugger. But when I >> execute the code you use, I get your results!!! Apparently there is a >> difference between return and cr as concerns the filter command! Is this a >> bug or is it intentional? >> >> Bob >> >> >> On Feb 20, 2012, at 12:09 PM, Pete wrote: >> >>> Maybe I'm misunderstanding what you're saying but I don't see this. >>> >>> ** >>> >>> *on mouseUp* >>> * >>> >>> put "line1" & return & "line2" into myLines >>> >>> answer information (return is in myLines) >>> >>> filter myLines with "line1" >>> >>> answer information (return is in myLines) >>> >>> end mouseUp >>> * >>> >>> >>> The first answer returns true and the second returns false, no matter >> which >>> line I filter for so the return is not included. >>> >>> On Mon, Feb 20, 2012 at 9:10 AM, Bob Sneidar <b...@twft.com> wrote: >>> >>>> It IS a fact however, that if you filter the lines of something and >> there >>>> is only one line that matches the filter, the carriage return will be >>>> included! >>> >>> >>> >>> >>> -- >>> Pete >>> Molly's Revenge <http://www.mollysrevenge.com> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode@lists.runrev.com >>> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >>> http://lists.runrev.com/mailman/listinfo/use-livecode >> >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> >> > > > -- > Pete > Molly's Revenge <http://www.mollysrevenge.com> > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode