Re: sorting words ?

2015-12-12 Thread Mark Waddingham

On 2015-12-12 13:48, Mark Waddingham wrote:

1) Find the ranges of the things you want to sort in the string.

2) Compute the new order of the substrings (from the ranges) based on
the requested sort.

3) Rebuild the string replacing the original ranges in the original
string with the reordered substrings.


So the outcome of this very useful discussion doesn't get 'lost' in 
amongst the list archives, I've updated Hermann's enhancement request 
for more powerful 'sort' with the above: 
http://quality.livecode.com/show_bug.cgi?id=16569


Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
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


Re: Script Indenting?

2015-12-12 Thread Scott Rossi
Thanks for the pointer.  I want to format script text that lives in a
standard LC field for easier readability.  The script gets executed by a
"do script" command.

Thanks & Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 12/12/15, 2:32 AM, "use-livecode on behalf of Peter TB Brett"
 wrote:

>On 2015-12-12 11:22, Scott Rossi wrote:
>> Anyone know where the script/rules for indenting a LiveCode script
>> resides
>> in the IDE?
>
>Hi Scott,
>
>The scriptFormat handler might be a good starting point:
>
>https://github.com/livecode/livecode-ide/blob/develop/Toolset/palettes/scr
>ipt%20editor/behaviors/revseeditorbehavior.livecodescript#L1052
>
>What do you have in mind?
>
> Peter
>
>-- 
>Dr Peter Brett 
>LiveCode Open Source Team
>
>LiveCode on reddit! 
>
>___
>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


Re: LC 8 DP 11

2015-12-12 Thread Peter TB Brett

On 2015-12-11 23:30, sa...@hrz.uni-kassel.de wrote:

Livecode 8 DP 11 apparently cannot be installed on Windows 7/ 32 .

I tried an installation twice, both times the installation stopped
(was not completed) after clicking the "Finish"-button, even after the
first installation attempt I had deleted the previous DP 11 version
from my machine.


Hi Wilhelm (and Hermann),

By the way, I have now tested LiveCode 8.0.0-dp-11 (both Community and 
Business) on my Windows 7 workstation at home, and I was able to 
successfully install the IDE, activate it and run it.  I did have to 
wait a very long time with a full progress bar before the final screen 
with the "Finish" button appeared.


So that the problems that you are encountering can be fixed, please give 
me some more information about exactly what settings you are using to 
install.  A screenshot of the stage which is broken would be helpful to.


Peter

--
Dr Peter Brett 
LiveCode Open Source Team

LiveCode on reddit! 

___
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


Script Indenting?

2015-12-12 Thread Scott Rossi
Anyone know where the script/rules for indenting a LiveCode script resides
in the IDE?

Thanks & Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design



___
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


Re: Script Indenting?

2015-12-12 Thread Peter TB Brett

On 2015-12-12 11:22, Scott Rossi wrote:
Anyone know where the script/rules for indenting a LiveCode script 
resides

in the IDE?


Hi Scott,

The scriptFormat handler might be a good starting point:

https://github.com/livecode/livecode-ide/blob/develop/Toolset/palettes/script%20editor/behaviors/revseeditorbehavior.livecodescript#L1052

What do you have in mind?

Peter

--
Dr Peter Brett 
LiveCode Open Source Team

LiveCode on reddit! 

___
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


Re: Script Indenting?

2015-12-12 Thread Lyn Teyla
Peter TB Brett wrote:

> When I have the time, I'd really like to split the script indenting & 
> formatting code out from the script editor into a separate library.
> 
> That would make it much easier for people to use and re-use, not only in IDE 
> extensions etc. but also in other applications.  It might make it easier to 
> test/improve/maintain too!

Some years back, pressing the  key to trigger indenting used to affect the 
entire script, but then it got changed to only affect the current handler for 
some reason.

This could be a good opportunity to revive the previous behavior, which was a 
time-saver when triggered after pasting unformatted scripts containing multiple 
handlers.

Would this be considered a bug? If so, I could submit a bug report.

Lyn



___
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


Re: Probably a pointless question about using sort to search..

2015-12-12 Thread Peter M. Brigham
Just to be clear, it's not my function, it came from someone else on the list. 
It could easily be revised to handle the case of cr's within data chunks, 
though.

-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig

On Dec 11, 2015, at 6:51 PM, Alex Tweedly wrote:

> 
> I haven't read everything in this thread, so I don't know if Peter's function 
> handled this or not ...
> 
> 
> On 11/12/2015 23:32, Geoff Canyon wrote:
>> On Thu, Dec 10, 2015 at 12:47 PM, Peter Brigham  wrote:
>> 
>>> Someone on this list at some point posted an array sorting function that
>>> might be relevant here for some applications. See below.
>>> 
>> ​Why would anyone make a separate handler ​for this, and even more so, why
>> make it a function that takes a value by reference and then hands a value
>> back rather than a handler that changes the value in place?
>> 
>> But back to the first point, this function can be eliminated in three lines
>> of code:
>> 
>> combine someArray using cr
>> sort lines of someArray -- however you like
>> split someArray by cr
>> 
> Ummm ...
>   put "abc" & CR & "def" into somearray[1]
>   put "ghj" into somearray[2]
> and then try the above 3-line code snippet.
> 
> -- Alex.
> 
> ___
> 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

Re: Script Indenting?

2015-12-12 Thread Peter M. Brigham
A while back, Mark Wieder posted a snippet of code that I use in my library 
stack that does this very thing, calling some obscure IDE handlers:

  -- colorize script
  -- thanks to Mark Wieder, of the useRev listserv
  -- how he figured this out, I don't know
  put the number of lines of field "script" into tNum
  -- the following 2 lines are only necessary if no script has been opened 
yet in this
  --   session of LC
  -- and they will throw an error for later versions of LC
  try
 send "sePrefInit" to stack "revNewScriptEditor"
 send "revSEColorize thisScript,default" to stack "revNewScriptEditor"
  end try
  _internal script colorize line 1 to tNum of field "script"

If this doesn't point you in the right direction, maybe Mark knows more.

-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig

On Dec 12, 2015, at 5:37 AM, Scott Rossi wrote:

> Thanks for the pointer.  I want to format script text that lives in a
> standard LC field for easier readability.  The script gets executed by a
> "do script" command.
> 
> Thanks & Regards,
> 
> Scott Rossi
> Creative Director
> Tactile Media, UX/UI Design
> 
> 
> 
> 
> On 12/12/15, 2:32 AM, "use-livecode on behalf of Peter TB Brett"
>  peter.br...@livecode.com> wrote:
> 
>> On 2015-12-12 11:22, Scott Rossi wrote:
>>> Anyone know where the script/rules for indenting a LiveCode script
>>> resides
>>> in the IDE?
>> 
>> Hi Scott,
>> 
>> The scriptFormat handler might be a good starting point:
>> 
>> https://github.com/livecode/livecode-ide/blob/develop/Toolset/palettes/scr
>> ipt%20editor/behaviors/revseeditorbehavior.livecodescript#L1052
>> 
>> What do you have in mind?
>> 
>>Peter

___
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


Re: Script Indenting?

2015-12-12 Thread Peter TB Brett

On 2015-12-12 11:37, Scott Rossi wrote:

Thanks for the pointer.  I want to format script text that lives in a
standard LC field for easier readability.  The script gets executed by 
a

"do script" command.


When I have the time, I'd really like to split the script indenting & 
formatting code out from the script editor into a separate library.


That would make it much easier for people to use and re-use, not only in 
IDE extensions etc. but also in other applications.  It might make it 
easier to test/improve/maintain too!


 Peter

--
Dr Peter Brett 
LiveCode Open Source Team

LiveCode on reddit! 

___
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


Re: sorting words ?

2015-12-12 Thread Mark Waddingham

On 2015-12-12 02:39, Kay C Lan wrote:

So the 3 possibilities are:

1) The example I gave in my last post. However many tabs and spaces 
would

remain the same, they would be ordered, tabs before spaces, segments
(words) would be placed between them. There would only be one white 
space
between each segment (word) so some segments might have tabs between 
them

and others spaces.You might end up with multiple tab/spaces at the
beginning of the output, just as you end up with multiple empty items 
at
the beginning of a sorted List if there are multiple empty items. This 
is

ugly.


I think this one perhaps rules itself out by virtue of the fact it does 
(as you say) seem 'ugly' and also reorders the whitespace in (from any 
one particular point of view in terms of what you might want to achieve) 
a fixed, but arbitrary order. It doesn't preserve structure between 
parts which is perhaps what you would want if you want to do 'something' 
with the whitespace.



2) The List is outputted with a single space between each segment. This
would mean that if there happened to be tabs or multiple spaces between
certain segments, these would be removed/converted. This is helpful.


This is certainly the simplest option (implementation wise), however it 
does 'hide' the fact that you are losing information when you do a 'sort 
words'.



3) A straight reshuffle, where the actual segments are reordered whilst
preserving the white space location:

[tab][tab]Mark[space][space]Geoff[tab]Kevin[space][tab]Richard[space][space]

would become:

[tab][tab]Geoff[space][space]Kevin[tab]Mark[space][tab]Richard[space][space]

This last case, although less helpful to me, would arguable be the 
computer
logical thing to do, all you've done is asked to sort the segments 
(words);
the number of characters remains the same, the location of the white 
space

has remained the same, the only thing that has changed is the order in
which the words appear - and that's what you asked for. When you think
about it, that's really all that sort by line or item does, it leaves 
the

CRs and commas in place and just shuffles things about.


This approach occurred to me the other day but I couldn't think of a 
use-case at the time. However, your example of processing text 
structured tables and such does suggest that it could well be useful in 
some circumstances. It also has the advantage of being the natural 
extension of what line/item delimiter sort (should) do - the case of 
preserving a trailing delimiter is a direct extension of the idea that 
sort does the following:


1) Find the ranges of the things you want to sort in the string.

2) Compute the new order of the substrings (from the ranges) based on 
the requested sort.


3) Rebuild the string replacing the original ranges in the original 
string with the reordered substrings.


It also means that whether or not a text chunk is 'sortable' (in the 
sense I described in a previous email) is immaterial as the output 
string is directly derived from the input string. (There would still be 
the caveat that you might break the invariants I previously described 
though for some chunks - such as sentence).


All LC has to do is pick one, implement it and then publish it. If 
people
don't like the choice then they have to roll their own, but they have 
to

roll their own now anyway. Whilst I'd think most people needing to sort
words would like the 'benefits' of option 2, I hate to say it, but I 
think

option 3 would be the 'safer' road LC could go down.


It is possible to potentially have your cake and eat it here.

We could have a string sort (as we do now), which does its best to 
preserve original structure (as described in your option 3) - as you say 
this would do *precisely* what you asked, but you have to be aware of 
some edge cases which might bite you in some cases.


In addition we could add explicit chunk splitting and combine 
operations, and a sort which could act on a numerically keyed array. In 
this case, option 2 becomes:


  split tValue by word
  sort tValue
  combine tValue using space

Here you would be able to choose explicitly what delimiter you want to 
use in the output string.


If we made it so that you could do:

  split  by item
  combine  by item

Then 'sort string' for items would actually be:

  split tValue by item
  sort tValue
  combine tValue by item

The subtlety here is that the 'by item' forms would understand trailing 
delimiter rules (which is essentially that if your string-list's last 
item is empty, then you must have a trailing delimiter). Note that you 
can only have 'combine' for strict delimited chunks (which item and line 
are) for the reasons we have been discussing - there isn't an 'obvious' 
choice for the delimiter for things like word.


Of course, I've just realized that the proposed invariant rules for sort 
don't even hold for item and line - since you can now have 
multi-character item and line delimiters:


  set the itemDelimiter to 

Re: Script Indenting?

2015-12-12 Thread Mark Wieder

On 12/12/2015 06:40 AM, Peter M. Brigham wrote:

Sorry, read your post too fast, you want to do indenting, not colorizing. But 
it sounds as if Mark Wieder has delved into some aspects of the script editor 
scripts, so maybe he can chime in.


Actually, glx2 does its own indenting, which I am quite thankful for, 
given the way that the LC8 editor has screwed up indenting. Originally, 
if my memory is correct on this, this was done because a) switch 
statements weren't being indented correctly and b) block comments would 
(and still do) override any internal formatting. So no, I don't have 
anything useful to add here about the current indenting functions.


...and I really have no recollection about that colorizing snippet. I'm 
happy to take credit for it if you say so... did I really write a try 
construct without a catch clause? You'd think I'd know better.


--
 Mark Wieder
 ahsoftw...@gmail.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


Re: LC 8 DP 11

2015-12-12 Thread [-hh]
Peter,

I can now confirm that it installs on Win 7 --- after a very
long time, as you say.

A fresh copy of the Indy-version needed here (3 GHz, Win 7-32Bit).

(Times instead of screenshots of the progress bar)

1 minute to start
plus 5 minutes to com to a 50% progress bar
plus 6 minutes to come to a 100% progress bar
plus 1 minutes to come to the "Finish" display
plus 7 minutes past the "Finish" button.

The community-version was 5 minutes faster.

Perhaps Wilhelm gave up, being accustomed to have a 1-2 minutes
(in sum) installer. I killed at the first trial the installer
after 5 minutes or so of waiting (and switched the OS and machine).

By the way, I like the automatic feature "uninstall previous versions"
(of the current one to install) of the installer very much. This part
of the installer worked for me always without problems and very fast.

Hermann


> Wilhelm S. wrote:
>> Livecode 8 DP 11 apparently cannot be installed on Windows 7/ 32 . 
>> 
>> I tried an installation twice, both times the installation stopped 
>> (was not completed) after clicking the "Finish"-button, even after 
>> the first installation attempt I had deleted the previous DP 11
>> version from my machine.
> 
> Peter B. wrote:  
> Hi Wilhelm (and Hermann), By the way, I have now tested LiveCode
> 8.0.0-dp-11 (both Community and Business) on my Windows 7 workstation
> at home, and I was able to successfully install the IDE, activate it
> and run it. I did have to wait a very long time with a full progress
> bar before the final screen with the "Finish" button appeared. So that
> the problems that you are encountering can be fixed, please give me some
> more information about exactly what settings you are using to install.
> A screenshot of the stage which is broken would be helpful to.




___
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


Re: Probably a pointless question about using sort to search..

2015-12-12 Thread Geoff Canyon
On Sat, Dec 12, 2015 at 7:40 AM, Peter M. Brigham  wrote:

> Just to be clear, it's not my function


​I got that.​
___
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

Re: Probably a pointless question about using sort to search..

2015-12-12 Thread Geoff Canyon
I'll take another swing at the horse. My objection to this handler/function
at this point is that it's replacing (at most) six lines of code:

put the itemDel into savedDelimiter
set the itemDel to someDelimiter
combine someArray with someDelimiter
sort items of someArray 
split someArray with someDelimiter
set the itemDel to savedDelimiter

with a call to a handler that doesn't (yet) support escaping the delimiter
or all the parameters sort supports. Supporting "by word 4 of each" for
example would drive you batty trying to support it.


On Sat, Dec 12, 2015 at 10:21 AM, Peter M. Brigham  wrote:

> At this point probably beating a dead horse, but here's a cleaned up
> handler that handles cr's in the data. Geoff is right that the basic idea
> can be done in 3 lines, but this automates choosing an alternate delimiter
> and specifying the sort mode in a one-line call.
>
> The original handler came from one of the LC lessons, and was used to
> prepare an array for a function to search the contents of an array that
> scales logarithmically rather than linearly.
>
> -- Peter
>
> Peter M. Brigham
> pmb...@gmail.com
> http://home.comcast.net/~pmbrig
>
> ---
>
> on sortArray @pArray, pSortMode, pDelim
>-- sort the values of an array, returning an integer-keyed array
>--   whose values increase as the keys increase
>-- pArray is referenced, so the original array will be changed
>--   note that the original keys of the array will be discarded,
>--   thus most useful for transforming numerically-keyed arrays
>-- pSortMode = {"text"|"textCaseSens"|"numeric"|"dateTime"}
>--textCaseSens sets caseSensitive to true before sorting by text
>--if sortMode = empty, defaults to numeric
>-- specify a delimiter pDelim if the elements of the array contain cr's
>-- you can use this to prepare an array for the logarithmicSearch()
> function
>-- not sure who wrote the original,
>--cleaned up and expanded by Peter M. Brigham, pmb...@gmail.com,
>--with help from the use-LC list
>
>if pSortMode = empty then put "numeric" into pSortMode
>if pDelim = empty then put cr into pDelim
>combine pArray with pDelim
>-- now pArray is a pDelim-delimited list of values
>-- sort the list as directed
>set the linedel to pDelim
>switch pSortMode
>   case "textCaseSens"
>  set the casesensitive to true
>   case "text"
>  sort lines of pArray
>  break
>   case "numeric"
>  sort lines of pArray numeric
>  break
>   case "dateTime"
>  sort lines of pArray dateTime
>  break
>end switch
># transform the sorted list back to a numerically indexed array
>split pArray with pDelim
> end sortArray
>
>
> On Dec 11, 2015, at 7:34 PM, Geoff Canyon wrote:
>
> > On Fri, Dec 11, 2015 at 6:51 PM, Alex Tweedly  wrote:
> >
> >>
> >> I haven't read everything in this thread, so I don't know if Peter's
> >> function handled this or not ...
> >>
> >> On 11/12/2015 23:32, Geoff Canyon wrote:
> >>
> >>> On Thu, Dec 10, 2015 at 12:47 PM, Peter Brigham 
> wrote:
> >>>
> 
>  But back to the first point, this function can be eliminated in three
> >>> lines
> >>> of code:
> >>>
> >>> combine someArray using cr
> >>> sort lines of someArray -- however you like
> >>> split someArray by cr
> >>>
> >>> Ummm ...
> >>   put "abc" & CR & "def" into somearray[1]
> >>   put "ghj" into somearray[2]
> >> and then try the above 3-line code snippet.
> >>
> >> -- Alex.
> >
> >
> > From the function:
> >
> > repeat for each line k in keyList
> >  put pArray[k] & cr after valueList
> >
> > It doesn't.
> > ​
> > ___
> > 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
>
___
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

Re: Script Indenting?

2015-12-12 Thread Peter M. Brigham
Sorry, read your post too fast, you want to do indenting, not colorizing. But 
it sounds as if Mark Wieder has delved into some aspects of the script editor 
scripts, so maybe he can chime in.

-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig

On Dec 12, 2015, at 5:37 AM, Scott Rossi wrote:

> Thanks for the pointer.  I want to format script text that lives in a
> standard LC field for easier readability.  The script gets executed by a
> "do script" command.
> 
> Thanks & Regards,
> 
> Scott Rossi
> Creative Director
> Tactile Media, UX/UI Design
> 
> 
> 
> 
> On 12/12/15, 2:32 AM, "use-livecode on behalf of Peter TB Brett"
>  peter.br...@livecode.com> wrote:
> 
>> On 2015-12-12 11:22, Scott Rossi wrote:
>>> Anyone know where the script/rules for indenting a LiveCode script
>>> resides
>>> in the IDE?
>> 
>> Hi Scott,
>> 
>> The scriptFormat handler might be a good starting point:
>> 
>> https://github.com/livecode/livecode-ide/blob/develop/Toolset/palettes/scr
>> ipt%20editor/behaviors/revseeditorbehavior.livecodescript#L1052
>> 
>> What do you have in mind?
>> 
>>Peter
>> 
>> -- 
>> Dr Peter Brett 
>> LiveCode Open Source Team
>> 
>> LiveCode on reddit! 
>> 
>> ___
>> 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


___
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


Re: Probably a pointless question about using sort to search..

2015-12-12 Thread Peter M. Brigham
At this point probably beating a dead horse, but here's a cleaned up handler 
that handles cr's in the data. Geoff is right that the basic idea can be done 
in 3 lines, but this automates choosing an alternate delimiter and specifying 
the sort mode in a one-line call.

The original handler came from one of the LC lessons, and was used to prepare 
an array for a function to search the contents of an array that scales 
logarithmically rather than linearly.

-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig

---

on sortArray @pArray, pSortMode, pDelim
   -- sort the values of an array, returning an integer-keyed array
   --   whose values increase as the keys increase
   -- pArray is referenced, so the original array will be changed
   --   note that the original keys of the array will be discarded,
   --   thus most useful for transforming numerically-keyed arrays
   -- pSortMode = {"text"|"textCaseSens"|"numeric"|"dateTime"}
   --textCaseSens sets caseSensitive to true before sorting by text
   --if sortMode = empty, defaults to numeric
   -- specify a delimiter pDelim if the elements of the array contain cr's
   -- you can use this to prepare an array for the logarithmicSearch() function
   -- not sure who wrote the original,
   --cleaned up and expanded by Peter M. Brigham, pmb...@gmail.com,
   --with help from the use-LC list
   
   if pSortMode = empty then put "numeric" into pSortMode
   if pDelim = empty then put cr into pDelim
   combine pArray with pDelim
   -- now pArray is a pDelim-delimited list of values
   -- sort the list as directed
   set the linedel to pDelim
   switch pSortMode
  case "textCaseSens"
 set the casesensitive to true
  case "text"
 sort lines of pArray
 break
  case "numeric"
 sort lines of pArray numeric
 break
  case "dateTime"
 sort lines of pArray dateTime
 break
   end switch
   # transform the sorted list back to a numerically indexed array
   split pArray with pDelim
end sortArray


On Dec 11, 2015, at 7:34 PM, Geoff Canyon wrote:

> On Fri, Dec 11, 2015 at 6:51 PM, Alex Tweedly  wrote:
> 
>> 
>> I haven't read everything in this thread, so I don't know if Peter's
>> function handled this or not ...
>> 
>> On 11/12/2015 23:32, Geoff Canyon wrote:
>> 
>>> On Thu, Dec 10, 2015 at 12:47 PM, Peter Brigham  wrote:
>>> 
 
 But back to the first point, this function can be eliminated in three
>>> lines
>>> of code:
>>> 
>>> combine someArray using cr
>>> sort lines of someArray -- however you like
>>> split someArray by cr
>>> 
>>> Ummm ...
>>   put "abc" & CR & "def" into somearray[1]
>>   put "ghj" into somearray[2]
>> and then try the above 3-line code snippet.
>> 
>> -- Alex.
> 
> 
> From the function:
> 
> repeat for each line k in keyList
>  put pArray[k] & cr after valueList
> 
> It doesn't.
> ​
> ___
> 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

Printing Problem

2015-12-12 Thread Peter Haworth
I have a form with two fields on it:

- A field control that contains the text to be used as a heading
- A scrolling list field with the main text to be printed.

I'm using the following to print :

revPrintText (the htmlText of field "AttendeeList"),(the htmlText of field
"Heading")

The printed document shows the heading OK. It prints the contents of the
scrolling list field down to the bottom of the first page.  At the top of
the second page, the last 8 lines of the first page are repeated before
printing the rest of the scrolling list field contents.

Trying to figure out why the repeated lines are being printed.

This is on OSX 10.10 and LC8 DP11



Pete
lcSQL Software 
Home of lcStackBrowser  and
SQLiteAdmin 
___
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


Re: Printing Problem

2015-12-12 Thread Peter Haworth
I'd also add to this that I used the htmltext of the field because some
text in it is in bold.  HOwever the bold does not show up on the printed
version.

Pete
lcSQL Software 
Home of lcStackBrowser  and
SQLiteAdmin 

On Sat, Dec 12, 2015 at 10:20 AM, Peter Haworth  wrote:

> I have a form with two fields on it:
>
> - A field control that contains the text to be used as a heading
> - A scrolling list field with the main text to be printed.
>
> I'm using the following to print :
>
> revPrintText (the htmlText of field "AttendeeList"),(the htmlText of field
> "Heading")
>
> The printed document shows the heading OK. It prints the contents of the
> scrolling list field down to the bottom of the first page.  At the top of
> the second page, the last 8 lines of the first page are repeated before
> printing the rest of the scrolling list field contents.
>
> Trying to figure out why the repeated lines are being printed.
>
> This is on OSX 10.10 and LC8 DP11
>
>
>
> Pete
> lcSQL Software 
> Home of lcStackBrowser  and
> SQLiteAdmin 
>
___
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


Re: Printing Problem

2015-12-12 Thread dunbarx
Hi.


When you say "... It prints the contents of the
> scrolling list field down to the bottom of the first page"


Do you mean simply that the printed page is filled, that is, those last eight 
lines are not printed? Or that those eight lines appear on both pages?


Craig Newman



-Original Message-
From: Peter Haworth 
To: How to use LiveCode 
Sent: Sat, Dec 12, 2015 2:08 pm
Subject: Re: Printing Problem

I'd also add to this that I used the htmltext of the field because some
text in it is in bold.  HOwever the bold does not show up on the printed
version.

Pete
lcSQL Software 
Home of lcStackBrowser  and
SQLiteAdmin 

On Sat, Dec 12, 2015 at 10:20 AM, Peter Haworth  wrote:

> I have a form with two fields on it:
>
> - A field control that contains the text to be used as a heading
> - A scrolling list field with the main text to be printed.
>
> I'm using the following to print :
>
> revPrintText (the htmlText of field "AttendeeList"),(the htmlText of field
> "Heading")
>
> The printed document shows the heading OK. It prints the contents of the
> scrolling list field down to the bottom of the first page.  At the top of
> the second page, the last 8 lines of the first page are repeated before
> printing the rest of the scrolling list field contents.
>
> Trying to figure out why the repeated lines are being printed.
>
> This is on OSX 10.10 and LC8 DP11
>
>
>
> Pete
> lcSQL Software 
> Home of lcStackBrowser  and
> SQLiteAdmin 
>
___
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


Re: My App is fitting to 320x480

2015-12-12 Thread Colin Holgate
From your dimensions I’m guessing it’s for iPhone 5, 6, 6s 6 bus, etc. You need 
to include the splash screens. default-5...@2x.png for example.



___
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