Re: Put data in lines
Well, update the big array and republish it. Not sure why the union command won't do that. I guess I don't know the code your using and what you are expecting. Jim Ault Las Vegas On 5/7/07 5:07 AM, "Camm29" <[EMAIL PROTECTED]> wrote: > Played with Union Command , still no luck. > Any other method ? > > Regards > > - Original Message - > From: "Jim Ault" <[EMAIL PROTECTED]> > To: "How to use Revolution" > Sent: Sunday, May 06, 2007 8:45 PM > Subject: Re: Put data in lines > > > You probably have the union command working in reverse. > > > On 5/6/07 11:43 AM, "Camm29" <[EMAIL PROTECTED]> wrote: > >> Hi . >> >> Had it working , sort of ! >> >> When data for a given line stops changing , the old original value appears > ? >> Then I found i'd missed "put it into currDataArr" >> Now with "put it into currDataArr" the old unchanging data lines vanish >> with only the new changing data lines displayed ! >> >> Trying to do the following , >> >> The first data received is always 999 lines with data , from then only > lines >> with changing data is received. >> >> I always need to display the 999 lines of received data , with updating > data >> for given lines received. >> >> Also when receiving data , It's not possible to move the Scrollbar ? >> >> Thanks in advance !! >> >> Regards >> Camm >> >> >> >> - Original Message - >> From: "Jim Ault" <[EMAIL PROTECTED]> >> To: "How to use Revolution" >> Sent: Saturday, May 05, 2007 7:18 PM >> Subject: Re: Put data in lines >> >> >> Pretty simple if you use an array. >> Lookup Union in the docs and it is a one-liner >> >> Use the 'union' command to combine two arrays, eliminating duplicate >> elements. >> you may have to play with the union command to get it just right (not >> checked) >> >> script goes something like this... >> -- >> local currDataArr >> >> put incomingStr into incmgArr >> split incmgArr by ":" and "=" --it is now an array >> >> get currDataArr >> union it with incmgArr >> combine it by cr and space -- (or tab, if you prefer) >> put it into currDataArr --local var that will keep this value >> --the local var is faster than reading the field into a var >> >> sort it by word 1 numeric of each >> put it into fld display >> -- >> >> Jim Ault >> Las Vegas >> >> >> On 5/5/07 10:58 AM, "Camm29" <[EMAIL PROTECTED]> wrote: >> >>> Thanks , >>> Jim , Björnke and Mark for your comments and solution. >>> >>> It's work great and fast ! >>> >>> One issue is that the next data string received may be longer or shorter > , >>> but it still must appear in the correct line ! >>> (the system only sends changed data for a given line) >>> >>> So , first 999 lines could be sent , then only 2 lines. >>> 999 lines of data need to stay displayed then only 2 lines data to > change >> ! >>> >>> the line number is before the = >>> the data is after the = >>> >>> Regards >>> Camm >>> >>> - Original Message - >>> From: "Jim Ault" <[EMAIL PROTECTED]> >>> To: "How to use Revolution" >>> Sent: Saturday, May 05, 2007 5:56 PM >>> Subject: Re: Put data in lines >>> >>> >>>> A problems with using arrays like that is that i will shuffle the lines >>>> around somewhat randomly. Also note that my approach is about 7 times >>>> faster (not sure if it's the itemDelimiter stuff, or the array handling >>>> itself that is slower). >>> >>> I find that the array method as shown by Mark will work a bit faster than >>> the replace delimeters method, but you have to use a data list of about >>> 10,000 to see the difference. At 5 lines of data, the replace takes >>> 9-10 ticks, and the array method takes 6-7 ticks. At 4000 lines, both >> will >>> show 0 ticks elapsed, which means less than half a tick. Tick is about >>> 1/60th of a second. >>> >>> Mac G5 Duo, Rev 2.7.2 build 261 >>> >>> Jim Ault >>> Las Vegas >>> >>> >>> O
Re: Put data in lines
Played with Union Command , still no luck. Any other method ? Regards - Original Message - From: "Jim Ault" <[EMAIL PROTECTED]> To: "How to use Revolution" Sent: Sunday, May 06, 2007 8:45 PM Subject: Re: Put data in lines You probably have the union command working in reverse. On 5/6/07 11:43 AM, "Camm29" <[EMAIL PROTECTED]> wrote: > Hi . > > Had it working , sort of ! > > When data for a given line stops changing , the old original value appears ? > Then I found i'd missed "put it into currDataArr" > Now with "put it into currDataArr" the old unchanging data lines vanish > with only the new changing data lines displayed ! > > Trying to do the following , > > The first data received is always 999 lines with data , from then only lines > with changing data is received. > > I always need to display the 999 lines of received data , with updating data > for given lines received. > > Also when receiving data , It's not possible to move the Scrollbar ? > > Thanks in advance !! > > Regards > Camm > > > > ----- Original Message - > From: "Jim Ault" <[EMAIL PROTECTED]> > To: "How to use Revolution" > Sent: Saturday, May 05, 2007 7:18 PM > Subject: Re: Put data in lines > > > Pretty simple if you use an array. > Lookup Union in the docs and it is a one-liner > > Use the 'union' command to combine two arrays, eliminating duplicate > elements. > you may have to play with the union command to get it just right (not > checked) > > script goes something like this... > -- > local currDataArr > > put incomingStr into incmgArr > split incmgArr by ":" and "=" --it is now an array > > get currDataArr > union it with incmgArr > combine it by cr and space -- (or tab, if you prefer) > put it into currDataArr --local var that will keep this value > --the local var is faster than reading the field into a var > > sort it by word 1 numeric of each > put it into fld display > -- > > Jim Ault > Las Vegas > > > On 5/5/07 10:58 AM, "Camm29" <[EMAIL PROTECTED]> wrote: > >> Thanks , >> Jim , Björnke and Mark for your comments and solution. >> >> It's work great and fast ! >> >> One issue is that the next data string received may be longer or shorter , >> but it still must appear in the correct line ! >> (the system only sends changed data for a given line) >> >> So , first 999 lines could be sent , then only 2 lines. >> 999 lines of data need to stay displayed then only 2 lines data to change > ! >> >> the line number is before the = >> the data is after the = >> >> Regards >> Camm >> >> - Original Message - >> From: "Jim Ault" <[EMAIL PROTECTED]> >> To: "How to use Revolution" >> Sent: Saturday, May 05, 2007 5:56 PM >> Subject: Re: Put data in lines >> >> >>> A problems with using arrays like that is that i will shuffle the lines >>> around somewhat randomly. Also note that my approach is about 7 times >>> faster (not sure if it's the itemDelimiter stuff, or the array handling >>> itself that is slower). >> >> I find that the array method as shown by Mark will work a bit faster than >> the replace delimeters method, but you have to use a data list of about >> 10,000 to see the difference. At 5 lines of data, the replace takes >> 9-10 ticks, and the array method takes 6-7 ticks. At 4000 lines, both > will >> show 0 ticks elapsed, which means less than half a tick. Tick is about >> 1/60th of a second. >> >> Mac G5 Duo, Rev 2.7.2 build 261 >> >> Jim Ault >> Las Vegas >> >> >> On 5/5/07 9:28 AM, "Björnke von Gierke" <[EMAIL PROTECTED]> wrote: >> >>> I always found arrays to be confusing, that's why I prefer this method : >>> >>> on mouseUp >>>put "Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: " & CRLF >>> into x >>>replace ":" with return in x >>>replace "=" with space in x >>>put line 2 to -2 of x >>> end mouseUp >>> >>> A problems with using arrays like that is that i will shuffle the lines >>> around somewhat randomly. Also note that my approach is about 7 times >>> faster (not sure if it's the itemDelimiter stuff, or the array handling >>> itself that is slower). >>> >>> have fun
Re: Put data in lines
You probably have the union command working in reverse. On 5/6/07 11:43 AM, "Camm29" <[EMAIL PROTECTED]> wrote: > Hi . > > Had it working , sort of ! > > When data for a given line stops changing , the old original value appears ? > Then I found i'd missed "put it into currDataArr" > Now with "put it into currDataArr" the old unchanging data lines vanish > with only the new changing data lines displayed ! > > Trying to do the following , > > The first data received is always 999 lines with data , from then only lines > with changing data is received. > > I always need to display the 999 lines of received data , with updating data > for given lines received. > > Also when receiving data , It's not possible to move the Scrollbar ? > > Thanks in advance !! > > Regards > Camm > > > > - Original Message ----- > From: "Jim Ault" <[EMAIL PROTECTED]> > To: "How to use Revolution" > Sent: Saturday, May 05, 2007 7:18 PM > Subject: Re: Put data in lines > > > Pretty simple if you use an array. > Lookup Union in the docs and it is a one-liner > > Use the 'union' command to combine two arrays, eliminating duplicate > elements. > you may have to play with the union command to get it just right (not > checked) > > script goes something like this... > -- > local currDataArr > > put incomingStr into incmgArr > split incmgArr by ":" and "=" --it is now an array > > get currDataArr > union it with incmgArr > combine it by cr and space -- (or tab, if you prefer) > put it into currDataArr --local var that will keep this value > --the local var is faster than reading the field into a var > > sort it by word 1 numeric of each > put it into fld display > -- > > Jim Ault > Las Vegas > > > On 5/5/07 10:58 AM, "Camm29" <[EMAIL PROTECTED]> wrote: > >> Thanks , >> Jim , Björnke and Mark for your comments and solution. >> >> It's work great and fast ! >> >> One issue is that the next data string received may be longer or shorter , >> but it still must appear in the correct line ! >> (the system only sends changed data for a given line) >> >> So , first 999 lines could be sent , then only 2 lines. >> 999 lines of data need to stay displayed then only 2 lines data to change > ! >> >> the line number is before the = >> the data is after the = >> >> Regards >> Camm >> >> - Original Message - >> From: "Jim Ault" <[EMAIL PROTECTED]> >> To: "How to use Revolution" >> Sent: Saturday, May 05, 2007 5:56 PM >> Subject: Re: Put data in lines >> >> >>> A problems with using arrays like that is that i will shuffle the lines >>> around somewhat randomly. Also note that my approach is about 7 times >>> faster (not sure if it's the itemDelimiter stuff, or the array handling >>> itself that is slower). >> >> I find that the array method as shown by Mark will work a bit faster than >> the replace delimeters method, but you have to use a data list of about >> 10,000 to see the difference. At 5 lines of data, the replace takes >> 9-10 ticks, and the array method takes 6-7 ticks. At 4000 lines, both > will >> show 0 ticks elapsed, which means less than half a tick. Tick is about >> 1/60th of a second. >> >> Mac G5 Duo, Rev 2.7.2 build 261 >> >> Jim Ault >> Las Vegas >> >> >> On 5/5/07 9:28 AM, "Björnke von Gierke" <[EMAIL PROTECTED]> wrote: >> >>> I always found arrays to be confusing, that's why I prefer this method : >>> >>> on mouseUp >>>put "Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: " & CRLF >>> into x >>>replace ":" with return in x >>>replace "=" with space in x >>>put line 2 to -2 of x >>> end mouseUp >>> >>> A problems with using arrays like that is that i will shuffle the lines >>> around somewhat randomly. Also note that my approach is about 7 times >>> faster (not sure if it's the itemDelimiter stuff, or the array handling >>> itself that is slower). >>> >>> have fun >>> Björnke >>> >>> On 05 May 2007, at 16:46, Mark Smith wrote: >>> >>>> This works for the given string, and should be quick even with 999 >>>> values: >&
Re: Put data in lines
Hi . Had it working , sort of ! When data for a given line stops changing , the old original value appears ? Then I found i'd missed "put it into currDataArr" Now with "put it into currDataArr" the old unchanging data lines vanish with only the new changing data lines displayed ! Trying to do the following , The first data received is always 999 lines with data , from then only lines with changing data is received. I always need to display the 999 lines of received data , with updating data for given lines received. Also when receiving data , It's not possible to move the Scrollbar ? Thanks in advance !! Regards Camm - Original Message - From: "Jim Ault" <[EMAIL PROTECTED]> To: "How to use Revolution" Sent: Saturday, May 05, 2007 7:18 PM Subject: Re: Put data in lines Pretty simple if you use an array. Lookup Union in the docs and it is a one-liner Use the 'union' command to combine two arrays, eliminating duplicate elements. you may have to play with the union command to get it just right (not checked) script goes something like this... -- local currDataArr put incomingStr into incmgArr split incmgArr by ":" and "=" --it is now an array get currDataArr union it with incmgArr combine it by cr and space -- (or tab, if you prefer) put it into currDataArr --local var that will keep this value --the local var is faster than reading the field into a var sort it by word 1 numeric of each put it into fld display -- Jim Ault Las Vegas On 5/5/07 10:58 AM, "Camm29" <[EMAIL PROTECTED]> wrote: > Thanks , > Jim , Björnke and Mark for your comments and solution. > > It's work great and fast ! > > One issue is that the next data string received may be longer or shorter , > but it still must appear in the correct line ! > (the system only sends changed data for a given line) > > So , first 999 lines could be sent , then only 2 lines. > 999 lines of data need to stay displayed then only 2 lines data to change ! > > the line number is before the = > the data is after the = > > Regards > Camm > > - Original Message - > From: "Jim Ault" <[EMAIL PROTECTED]> > To: "How to use Revolution" > Sent: Saturday, May 05, 2007 5:56 PM > Subject: Re: Put data in lines > > >> A problems with using arrays like that is that i will shuffle the lines >> around somewhat randomly. Also note that my approach is about 7 times >> faster (not sure if it's the itemDelimiter stuff, or the array handling >> itself that is slower). > > I find that the array method as shown by Mark will work a bit faster than > the replace delimeters method, but you have to use a data list of about > 10,000 to see the difference. At 5 lines of data, the replace takes > 9-10 ticks, and the array method takes 6-7 ticks. At 4000 lines, both will > show 0 ticks elapsed, which means less than half a tick. Tick is about > 1/60th of a second. > > Mac G5 Duo, Rev 2.7.2 build 261 > > Jim Ault > Las Vegas > > > On 5/5/07 9:28 AM, "Björnke von Gierke" <[EMAIL PROTECTED]> wrote: > >> I always found arrays to be confusing, that's why I prefer this method : >> >> on mouseUp >>put "Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: " & CRLF >> into x >>replace ":" with return in x >>replace "=" with space in x >>put line 2 to -2 of x >> end mouseUp >> >> A problems with using arrays like that is that i will shuffle the lines >> around somewhat randomly. Also note that my approach is about 7 times >> faster (not sure if it's the itemDelimiter stuff, or the array handling >> itself that is slower). >> >> have fun >> Björnke >> >> On 05 May 2007, at 16:46, Mark Smith wrote: >> >>> This works for the given string, and should be quick even with 999 >>> values: >>> >>> on mouseUp >>> put "Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: " & CRLF >>> into tRec >>> set the itemDelimiter to ":" >>> delete item 1 of tRec >>> delete item -1 of tRec >>> >>> split tRec by ":" and "=" >>> combine tRec by cr and space -- (or tab, if you prefer) >>> put tRec >>> end mouseUp >>> >>> Best, >>> >>> Mark >>> >>> On 5 May 2007, at 11:18, Camm29 wrote: >>> >>>> Hi , >>>> >>>> I'm using read from socket >>>> >>>> example reply ,
Re: Put data in lines
Jim , Great , thanks ! Camm - Original Message - From: "Jim Ault" <[EMAIL PROTECTED]> To: "How to use Revolution" Sent: Saturday, May 05, 2007 7:18 PM Subject: Re: Put data in lines Pretty simple if you use an array. Lookup Union in the docs and it is a one-liner Use the 'union' command to combine two arrays, eliminating duplicate elements. you may have to play with the union command to get it just right (not checked) script goes something like this... -- local currDataArr put incomingStr into incmgArr split incmgArr by ":" and "=" --it is now an array get currDataArr union it with incmgArr combine it by cr and space -- (or tab, if you prefer) put it into currDataArr --local var that will keep this value --the local var is faster than reading the field into a var sort it by word 1 numeric of each put it into fld display -- Jim Ault Las Vegas On 5/5/07 10:58 AM, "Camm29" <[EMAIL PROTECTED]> wrote: > Thanks , > Jim , Björnke and Mark for your comments and solution. > > It's work great and fast ! > > One issue is that the next data string received may be longer or shorter , > but it still must appear in the correct line ! > (the system only sends changed data for a given line) > > So , first 999 lines could be sent , then only 2 lines. > 999 lines of data need to stay displayed then only 2 lines data to change ! > > the line number is before the = > the data is after the = > > Regards > Camm > > - Original Message - > From: "Jim Ault" <[EMAIL PROTECTED]> > To: "How to use Revolution" > Sent: Saturday, May 05, 2007 5:56 PM > Subject: Re: Put data in lines > > >> A problems with using arrays like that is that i will shuffle the lines >> around somewhat randomly. Also note that my approach is about 7 times >> faster (not sure if it's the itemDelimiter stuff, or the array handling >> itself that is slower). > > I find that the array method as shown by Mark will work a bit faster than > the replace delimeters method, but you have to use a data list of about > 10,000 to see the difference. At 5 lines of data, the replace takes > 9-10 ticks, and the array method takes 6-7 ticks. At 4000 lines, both will > show 0 ticks elapsed, which means less than half a tick. Tick is about > 1/60th of a second. > > Mac G5 Duo, Rev 2.7.2 build 261 > > Jim Ault > Las Vegas > > > On 5/5/07 9:28 AM, "Björnke von Gierke" <[EMAIL PROTECTED]> wrote: > >> I always found arrays to be confusing, that's why I prefer this method : >> >> on mouseUp >>put "Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: " & CRLF >> into x >>replace ":" with return in x >>replace "=" with space in x >>put line 2 to -2 of x >> end mouseUp >> >> A problems with using arrays like that is that i will shuffle the lines >> around somewhat randomly. Also note that my approach is about 7 times >> faster (not sure if it's the itemDelimiter stuff, or the array handling >> itself that is slower). >> >> have fun >> Björnke >> >> On 05 May 2007, at 16:46, Mark Smith wrote: >> >>> This works for the given string, and should be quick even with 999 >>> values: >>> >>> on mouseUp >>> put "Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: " & CRLF >>> into tRec >>> set the itemDelimiter to ":" >>> delete item 1 of tRec >>> delete item -1 of tRec >>> >>> split tRec by ":" and "=" >>> combine tRec by cr and space -- (or tab, if you prefer) >>> put tRec >>> end mouseUp >>> >>> Best, >>> >>> Mark >>> >>> On 5 May 2007, at 11:18, Camm29 wrote: >>> >>>> Hi , >>>> >>>> I'm using read from socket >>>> >>>> example reply , can be max 999 values. >>>> >>>> >>>> Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: CRLF >>>> >>>> I wish to display in a updating field with the values shown as , >>>> >>>> 0234 >>>> 1456789 >>>> 2657483 >>>> 34 >>>> 43456473 >>>> 51 >>>> 60 >>>> >>>> I must be missing something , i used a repeat but its very slow on >>>> updating ? >>>> >>>> Thanks in advance >>>&g
Re: Put data in lines
Pretty simple if you use an array. Lookup Union in the docs and it is a one-liner Use the 'union' command to combine two arrays, eliminating duplicate elements. you may have to play with the union command to get it just right (not checked) script goes something like this... -- local currDataArr put incomingStr into incmgArr split incmgArr by ":" and "=" --it is now an array get currDataArr union it with incmgArr combine it by cr and space -- (or tab, if you prefer) put it into currDataArr --local var that will keep this value --the local var is faster than reading the field into a var sort it by word 1 numeric of each put it into fld display -- Jim Ault Las Vegas On 5/5/07 10:58 AM, "Camm29" <[EMAIL PROTECTED]> wrote: > Thanks , > Jim , Björnke and Mark for your comments and solution. > > It's work great and fast ! > > One issue is that the next data string received may be longer or shorter , > but it still must appear in the correct line ! > (the system only sends changed data for a given line) > > So , first 999 lines could be sent , then only 2 lines. > 999 lines of data need to stay displayed then only 2 lines data to change ! > > the line number is before the = > the data is after the = > > Regards > Camm > > - Original Message - > From: "Jim Ault" <[EMAIL PROTECTED]> > To: "How to use Revolution" > Sent: Saturday, May 05, 2007 5:56 PM > Subject: Re: Put data in lines > > >> A problems with using arrays like that is that i will shuffle the lines >> around somewhat randomly. Also note that my approach is about 7 times >> faster (not sure if it's the itemDelimiter stuff, or the array handling >> itself that is slower). > > I find that the array method as shown by Mark will work a bit faster than > the replace delimeters method, but you have to use a data list of about > 10,000 to see the difference. At 5 lines of data, the replace takes > 9-10 ticks, and the array method takes 6-7 ticks. At 4000 lines, both will > show 0 ticks elapsed, which means less than half a tick. Tick is about > 1/60th of a second. > > Mac G5 Duo, Rev 2.7.2 build 261 > > Jim Ault > Las Vegas > > > On 5/5/07 9:28 AM, "Björnke von Gierke" <[EMAIL PROTECTED]> wrote: > >> I always found arrays to be confusing, that's why I prefer this method : >> >> on mouseUp >>put "Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: " & CRLF >> into x >>replace ":" with return in x >>replace "=" with space in x >>put line 2 to -2 of x >> end mouseUp >> >> A problems with using arrays like that is that i will shuffle the lines >> around somewhat randomly. Also note that my approach is about 7 times >> faster (not sure if it's the itemDelimiter stuff, or the array handling >> itself that is slower). >> >> have fun >> Björnke >> >> On 05 May 2007, at 16:46, Mark Smith wrote: >> >>> This works for the given string, and should be quick even with 999 >>> values: >>> >>> on mouseUp >>> put "Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: " & CRLF >>> into tRec >>> set the itemDelimiter to ":" >>> delete item 1 of tRec >>> delete item -1 of tRec >>> >>> split tRec by ":" and "=" >>> combine tRec by cr and space -- (or tab, if you prefer) >>> put tRec >>> end mouseUp >>> >>> Best, >>> >>> Mark >>> >>> On 5 May 2007, at 11:18, Camm29 wrote: >>> >>>> Hi , >>>> >>>> I'm using read from socket >>>> >>>> example reply , can be max 999 values. >>>> >>>> >>>> Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: CRLF >>>> >>>> I wish to display in a updating field with the values shown as , >>>> >>>> 0234 >>>> 1456789 >>>> 2657483 >>>> 34 >>>> 43456473 >>>> 51 >>>> 60 >>>> >>>> I must be missing something , i used a repeat but its very slow on >>>> updating ? >>>> >>>> Thanks in advance >>>> Camm > > > ___ > use-revolution mailing list > use-revolution@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.446 / Virus Database: 269.6.2/785 - Release Date: 02/05/2007 > 14:16 > > > > ___ > use-revolution mailing list > use-revolution@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Put data in lines
Thanks , Jim , Björnke and Mark for your comments and solution. It's work great and fast ! One issue is that the next data string received may be longer or shorter , but it still must appear in the correct line ! (the system only sends changed data for a given line) So , first 999 lines could be sent , then only 2 lines. 999 lines of data need to stay displayed then only 2 lines data to change ! the line number is before the = the data is after the = Regards Camm - Original Message - From: "Jim Ault" <[EMAIL PROTECTED]> To: "How to use Revolution" Sent: Saturday, May 05, 2007 5:56 PM Subject: Re: Put data in lines > A problems with using arrays like that is that i will shuffle the lines > around somewhat randomly. Also note that my approach is about 7 times > faster (not sure if it's the itemDelimiter stuff, or the array handling > itself that is slower). I find that the array method as shown by Mark will work a bit faster than the replace delimeters method, but you have to use a data list of about 10,000 to see the difference. At 5 lines of data, the replace takes 9-10 ticks, and the array method takes 6-7 ticks. At 4000 lines, both will show 0 ticks elapsed, which means less than half a tick. Tick is about 1/60th of a second. Mac G5 Duo, Rev 2.7.2 build 261 Jim Ault Las Vegas On 5/5/07 9:28 AM, "Björnke von Gierke" <[EMAIL PROTECTED]> wrote: > I always found arrays to be confusing, that's why I prefer this method : > > on mouseUp >put "Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: " & CRLF > into x >replace ":" with return in x >replace "=" with space in x >put line 2 to -2 of x > end mouseUp > > A problems with using arrays like that is that i will shuffle the lines > around somewhat randomly. Also note that my approach is about 7 times > faster (not sure if it's the itemDelimiter stuff, or the array handling > itself that is slower). > > have fun > Björnke > > On 05 May 2007, at 16:46, Mark Smith wrote: > >> This works for the given string, and should be quick even with 999 >> values: >> >> on mouseUp >> put "Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: " & CRLF >> into tRec >> set the itemDelimiter to ":" >> delete item 1 of tRec >> delete item -1 of tRec >> >> split tRec by ":" and "=" >> combine tRec by cr and space -- (or tab, if you prefer) >> put tRec >> end mouseUp >> >> Best, >> >> Mark >> >> On 5 May 2007, at 11:18, Camm29 wrote: >> >>> Hi , >>> >>> I'm using read from socket >>> >>> example reply , can be max 999 values. >>> >>> >>> Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: CRLF >>> >>> I wish to display in a updating field with the values shown as , >>> >>> 0234 >>> 1456789 >>> 2657483 >>> 34 >>> 43456473 >>> 51 >>> 60 >>> >>> I must be missing something , i used a repeat but its very slow on >>> updating ? >>> >>> Thanks in advance >>> Camm ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 269.6.2/785 - Release Date: 02/05/2007 14:16 ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Put data in lines
This is a good point, though it could be fixed with a theCombinedArray numeric>, but Björnke's method is simpler and clearer. Best, Mark On 5 May 2007, at 17:28, Björnke von Gierke wrote: A problems with using arrays like that is that it will shuffle the lines around somewhat randomly. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Put data in lines
> A problems with using arrays like that is that i will shuffle the lines > around somewhat randomly. Also note that my approach is about 7 times > faster (not sure if it's the itemDelimiter stuff, or the array handling > itself that is slower). I find that the array method as shown by Mark will work a bit faster than the replace delimeters method, but you have to use a data list of about 10,000 to see the difference. At 5 lines of data, the replace takes 9-10 ticks, and the array method takes 6-7 ticks. At 4000 lines, both will show 0 ticks elapsed, which means less than half a tick. Tick is about 1/60th of a second. Mac G5 Duo, Rev 2.7.2 build 261 Jim Ault Las Vegas On 5/5/07 9:28 AM, "Björnke von Gierke" <[EMAIL PROTECTED]> wrote: > I always found arrays to be confusing, that's why I prefer this method : > > on mouseUp >put "Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: " & CRLF > into x >replace ":" with return in x >replace "=" with space in x >put line 2 to -2 of x > end mouseUp > > A problems with using arrays like that is that i will shuffle the lines > around somewhat randomly. Also note that my approach is about 7 times > faster (not sure if it's the itemDelimiter stuff, or the array handling > itself that is slower). > > have fun > Björnke > > On 05 May 2007, at 16:46, Mark Smith wrote: > >> This works for the given string, and should be quick even with 999 >> values: >> >> on mouseUp >> put "Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: " & CRLF >> into tRec >> set the itemDelimiter to ":" >> delete item 1 of tRec >> delete item -1 of tRec >> >> split tRec by ":" and "=" >> combine tRec by cr and space -- (or tab, if you prefer) >> put tRec >> end mouseUp >> >> Best, >> >> Mark >> >> On 5 May 2007, at 11:18, Camm29 wrote: >> >>> Hi , >>> >>> I'm using read from socket >>> >>> example reply , can be max 999 values. >>> >>> >>> Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: CRLF >>> >>> I wish to display in a updating field with the values shown as , >>> >>> 0234 >>> 1456789 >>> 2657483 >>> 34 >>> 43456473 >>> 51 >>> 60 >>> >>> I must be missing something , i used a repeat but its very slow on >>> updating ? >>> >>> Thanks in advance >>> Camm ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Put data in lines
I always found arrays to be confusing, that's why I prefer this method : on mouseUp put "Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: " & CRLF into x replace ":" with return in x replace "=" with space in x put line 2 to -2 of x end mouseUp A problems with using arrays like that is that i will shuffle the lines around somewhat randomly. Also note that my approach is about 7 times faster (not sure if it's the itemDelimiter stuff, or the array handling itself that is slower). have fun Björnke On 05 May 2007, at 16:46, Mark Smith wrote: This works for the given string, and should be quick even with 999 values: on mouseUp put "Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: " & CRLF into tRec set the itemDelimiter to ":" delete item 1 of tRec delete item -1 of tRec split tRec by ":" and "=" combine tRec by cr and space -- (or tab, if you prefer) put tRec end mouseUp Best, Mark On 5 May 2007, at 11:18, Camm29 wrote: Hi , I'm using read from socket example reply , can be max 999 values. Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: CRLF I wish to display in a updating field with the values shown as , 0234 1456789 2657483 34 43456473 51 60 I must be missing something , i used a repeat but its very slow on updating ? Thanks in advance Camm -- official ChatRev page: http://chatrev.bjoernke.com Chat with other RunRev developers: go stack URL "http://homepage.mac.com/bvg/chatrev1.3.rev"; ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Put data in lines
This works for the given string, and should be quick even with 999 values: on mouseUp put "Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: " & CRLF into tRec set the itemDelimiter to ":" delete item 1 of tRec delete item -1 of tRec split tRec by ":" and "=" combine tRec by cr and space -- (or tab, if you prefer) put tRec end mouseUp Best, Mark On 5 May 2007, at 11:18, Camm29 wrote: Hi , I'm using read from socket example reply , can be max 999 values. Arb.rec:0=234:1=456789:2=657483:3=4:4=3456473:5=1:6=0: CRLF I wish to display in a updating field with the values shown as , 0234 1456789 2657483 34 43456473 51 60 I must be missing something , i used a repeat but its very slow on updating ? Thanks in advance Camm ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution