Date: Sat, 12 May 2012 12:22:38 -0400
>> From: "Peter M. Brigham, MD"
>> To: How to use LiveCode
>> Subject: Re: Sort of a problem
>> Message-ID: <50a823d6-005e-47de-9a05-4b7ba094e...@gmail.com>
>> Content-Type: text/plain; charset=us-ascii
&g
t; >
> > Message: 2
> > Date: Sat, 12 May 2012 12:22:38 -0400
> > From: "Peter M. Brigham, MD"
> > To: How to use LiveCode
> > Subject: Re: Sort of a problem
> > Message-ID: <50a823d6-005e-47de-9a05-4b7ba094e...@gmail.com>
> > Content-Type: text
except I'm sure they don't use a bubble sort.
Jim
>
> Message: 2
> Date: Sat, 12 May 2012 12:22:38 -0400
> From: "Peter M. Brigham, MD"
> To: How to use LiveCode
> Subject: Re: Sort of a problem
> Message-ID: <50a823d6-005e-47de-9a05-4b7ba094e...@g
> that I never really caught on to.
>
> Jim
>
>
>> Date: Thu, 10 May 2012 21:23:36 -0700
>> From: Jerry Jensen
>> To: How to use LiveCode
>> Subject: Re: Sort of a problem
>>
>> This seems to do the job. No polish, b
: 5
>> Date: Thu, 10 May 2012 21:23:36 -0700
>> From: Jerry Jensen
>> To: How to use LiveCode
>> Subject: Re: Sort of a problem
>> Message-ID:
>> Content-Type: text/plain; charset=us-ascii
>>
>> This seems to do th
Thanks Jerry. That is what I was looking for.
There is some magic going on behind the scenes with that "by ... of each" that
I never really caught on to.
Jim
>
> Message: 5
> Date: Thu, 10 May 2012 21:23:36 -0700
> From: Jerry Jensen
> To: How to use LiveCode
There ya go. :-)
Bob
On May 10, 2012, at 9:23 PM, Jerry Jensen wrote:
> This seems to do the job. No polish, but you'll get the idea.
> .Jerry
>
> Aw, crap, forgot about no attachments. Here's the code:
>
>
>
> on mouseUp
> local tList
> p
Loop through each line putting the actual street name in item 2, sort by item 2
of each, loop through and delete item 2 of every line. Bit clunky, but
effective. Another way would be to have a function and sort by the returned
value of the function. Not sure that is possible but I think I saw th
Because I live in a world of exceptions I thought I'd throw together a
function that allowed the easy integration of them:
First a new List;
Northern Rd
Nth South St
So Ave
Main St
South Rd
Northwest Ct
West East Ave
Oak Ave
East West Ave
N Auburn
W Clinton Blvd
Kimberly Ct
No St
Sth Broadway
S R
Yeah, but it fails if a street is named "SEW Rd" 8)
A better line would be:
If word 1 of pName is among the words of "N S E W" then
On May 10, 2012, at 9:25 PM, stephen barncard wrote:
> that's the one!
>
> On Thu, May 10, 2012 at 9:23 PM, Jerry Jensen wrote:
>
>> This seems to do the job. No
that's the one!
On Thu, May 10, 2012 at 9:23 PM, Jerry Jensen wrote:
> This seems to do the job. No polish, but you'll get the idea.
> .Jerry
>
> Aw, crap, forgot about no attachments. Here's the code:
>
>
>
> on mouseUp
> local tList
> put fl
This seems to do the job. No polish, but you'll get the idea.
.Jerry
Aw, crap, forgot about no attachments. Here's the code:
on mouseUp
local tList
put fld "Streets" into tList
sort lines of tList by pickStreet(each)
put tList into fld
This seems to do the job. No polish, but you'll get the idea.
.Jerry
On May 10, 2012, at 8:46 PM, Jim Hurley wrote:
> I have a list of streets:
>
> Main St
> Oak Ave
> N Auburn
> Kimberly Ct
> S Rector Rd
> Maple Ave
> W Pine St
> Fairmont Ave
>
> I want to sort them, but ignoring the compass
How about this...
function sortAddresses pAddresses
put empty into tOutput
repeat for each line tAddress in pAddresses
if word 1 of tAddress is in "NSEW" then
put tAddress &cr after tOutput
else
put "~ "&tAddress &cr after tOutput
the first thing I'd try would be to use 'repeat for each' on both repeat
loops and increment the indexes using "add 1 to"
On Thu, May 10, 2012 at 8:46 PM, Jim Hurley wrote:
> I have a list of streets:
>
> Main St
> Oak Ave
> N Auburn
> Kimberly Ct
> S Rector Rd
> Maple Ave
> W Pine St
> Fairmont
I have a list of streets:
Main St
Oak Ave
N Auburn
Kimberly Ct
S Rector Rd
Maple Ave
W Pine St
Fairmont Ave
I want to sort them, but ignoring the compass prefix (N E S W) to give:
N Auburn
Fairmont Ave
Kimberly Ct
Main St
Maple Ave
Oak Ave
W Pine St
S Rector Rd
The best I have come up with is p
16 matches
Mail list logo