Re: Don't amputate numberFormat (was: affecting array keys???)

2017-04-21 Thread Bob Sneidar via use-livecode
A couple years ago I had a look at format. I gave up after I got the headache. 
I tried again today. Same results. I cannot even begin to fathom the printf() C 
rules! I read and read and read, try examples etc. but NOTHING can get me to 
the point where I can make "1.1" into "01.10" never mind "10.2.1.6" into 
"010.002.001.006". 

My workaround fixes my issue, and Jacque's works also, provided you put the 
numberFormat into a separate function so that you do not have to continually 
keep resetting the numberformat everytime it might affect *ANY* numeric value 
as text. 

Bob S


> On Apr 21, 2017, at 18:23 , Mike Kerner via use-livecode 
>  wrote:
> 
> I tend to agree.  There is nothing about "format" that is intuitive to the
> non-initiated.


___
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: The selectedObjects - is it a container or not?

2017-04-21 Thread Curry Kenworthy via use-livecode

Richard:
> I wholeheartedly agree.
...
> I'm putting together a little plan to move that vision
> forward for a new generation of programmers.

Good! That's what we need. Although HC itself is history, the reasons 
for its success can hold a lot of promise for the future.


Best wishes,

Curry K.

___
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: The selectedObjects - is it a container or not?

2017-04-21 Thread Richard Gaskin via use-livecode

Curry Kenworthy wrote:

> Richard:
>> What LiveCode brings to the modern world is a high-level
>> scripting language distinguished not by any conformance to
>> the rules of English, but by being among the very few that
>> include support for GUI controls as inherent language elements.
>
> Just a brief reply here to note that there's more to the story.
> LiveCode's implementation of English-like scripting has some
> extremely special features, it is indeed a valuable syntax for those
> seeking an intuitive language or English-like language, and that fact
> hasn't changed, despite the world having more options today. There
> are very sound reasons why this particular language (or language
> family) could be valuable to a new generation of coders.

I wholeheartedly agree.  You may have noticed I use LiveCode. :)

In fact, I agree that the potential for LiveCode to achieve its rightful 
place among the world's great language is so strong that I'm putting 
together a little plan to move that vision forward for a new generation 
of programmers.


More on that very soon

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.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: Don't amputate numberFormat (was: affecting array keys???)

2017-04-21 Thread Mike Kerner via use-livecode
I tend to agree.  There is nothing about "format" that is intuitive to the
non-initiated.

On Fri, Apr 21, 2017 at 8:51 PM, Curry Kenworthy via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Mark Waddingham:
> > I think this is perhaps more evidence that 'numberFormat'
> > should probably be deprecated - or at least marked as
> > 'present for HyperCard compatibility only and shouldn't
> > be used in new code'.
>
> I emphatically disagree.
>
> There's nothing wrong with numberFormat as a binary to text option. On the
> contrary, it's a splendid way to present the formatting to users. The array
> key example is an outlier case to watch out for, but it's also easy to use
> an alternate formatting option or careful coding for those rare cases.
>
> The numberFormat is very easy to read and clean, similar to formatting
> systems used by Excel and others. (Naturally SpreadLib uses it too.) People
> understand the representation intuitively, and it's also extremely popular.
>
> It provides a consistent shortcut compared to using a function several
> times, for clean code with one statement to edit, so it is compatible with
> KISS philosophy.
>
> I prefer numberFormat for most tasks and would detest having it
> deprecated. Obviously the show must go on when someone concatenates text
> with a number, so a default behavior would have to be in place for that
> regardless (unless LC would throw an error), but we would lose the
> customizable aspect. LiveCode will be disfigured if we hack off all the
> pleasant parts.
>
> It will also be less "English-like" than before if we remove the wrong
> parts. I've been working on materials for my new fluency method for
> teaching LiveCode's syntax, based on proven language learning methods and
> enhanced with my own additional techniques geared to CS and LC.
>
> This is such a readable sentence to teach and use:
>
> set the numberformat to "0.00"
>
> Although I don't have time to be as vocal an advocate as some others here
> on LC trends and directions, there's so much to be said on the subject of
> LC's English-like language, how to optimize learning and coding around it,
> and what the result offers compared to other computing languages. (But I'll
> say most of that in my upcoming book rather than here on the list.)
>
> I sure don't intend to teach the best parts of LC as deprecated or
> denigrated, so I hope the language stays intact without self-mutilation. :)
>
> Best wishes,
>
> Curry K.
>
> ___
> 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
>



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
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: The selectedObjects - is it a container or not?

2017-04-21 Thread Curry Kenworthy via use-livecode

Richard:

What LiveCode brings to the modern world is a high-level
scripting language distinguished not by any conformance to
the rules of English, but by being among the very few that
include support for GUI controls as inherent language elements.


Just a brief reply here to note that there's more to the story. 
LiveCode's implementation of English-like scripting has some extremely 
special features, it is indeed a valuable syntax for those seeking an 
intuitive language or English-like language, and that fact hasn't 
changed, despite the world having more options today. There are very 
sound reasons why this particular language (or language family) could be 
valuable to a new generation of coders.


Best wishes,

Curry K.

___
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


Don't amputate numberFormat (was: affecting array keys???)

2017-04-21 Thread Curry Kenworthy via use-livecode

Mark Waddingham:
> I think this is perhaps more evidence that 'numberFormat'
> should probably be deprecated - or at least marked as
> 'present for HyperCard compatibility only and shouldn't
> be used in new code'.

I emphatically disagree.

There's nothing wrong with numberFormat as a binary to text option. On 
the contrary, it's a splendid way to present the formatting to users. 
The array key example is an outlier case to watch out for, but it's also 
easy to use an alternate formatting option or careful coding for those 
rare cases.


The numberFormat is very easy to read and clean, similar to formatting 
systems used by Excel and others. (Naturally SpreadLib uses it too.) 
People understand the representation intuitively, and it's also 
extremely popular.


It provides a consistent shortcut compared to using a function several 
times, for clean code with one statement to edit, so it is compatible 
with KISS philosophy.


I prefer numberFormat for most tasks and would detest having it 
deprecated. Obviously the show must go on when someone concatenates text 
with a number, so a default behavior would have to be in place for that 
regardless (unless LC would throw an error), but we would lose the 
customizable aspect. LiveCode will be disfigured if we hack off all the 
pleasant parts.


It will also be less "English-like" than before if we remove the wrong 
parts. I've been working on materials for my new fluency method for 
teaching LiveCode's syntax, based on proven language learning methods 
and enhanced with my own additional techniques geared to CS and LC.


This is such a readable sentence to teach and use:

set the numberformat to "0.00"

Although I don't have time to be as vocal an advocate as some others 
here on LC trends and directions, there's so much to be said on the 
subject of LC's English-like language, how to optimize learning and 
coding around it, and what the result offers compared to other computing 
languages. (But I'll say most of that in my upcoming book rather than 
here on the list.)


I sure don't intend to teach the best parts of LC as deprecated or 
denigrated, so I hope the language stays intact without self-mutilation. :)


Best wishes,

Curry K.

___
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: OT (?): Bookmarking GPS coords

2017-04-21 Thread Alex Tweedly via use-livecode


I was working on a Mobile app to allow a user to set the location of a 
named address within a UK Postcode. For various reasons, I'm not able to 
spend much time on it - and I discovered that although the process of 
starting to develop an Android app looks reasonable, there are many 
details you need to get right.


I'm kind of busy in other things right now, so although I do have some 
time to work on this, I can only manage very brief sessions on Livecode 
(10 minutes here, 20 minutes another time, ...) and it's just not 
working well for learning a new environment. That's my fault, not 
Livecode's Android/mobile process.


So I looked around for other easier ways to achieve a similar app - and 
stumbled into one.


I've been looking at Telegram for messaging - mainly because it runs on 
all major platforms, and syncs my actions between them - so I get to 
send my instant messages using my MacBook - i.e. typing on a real 
keyboard and looking at a decent size screen, etc. but can also use my 
iPhone etc. when I'm out and about.


Other features are :
 - Telegram has a good api and docs for creating Bots
 - these allow you to create a custom keyboard
 - and allow you to provide user's location (if known).

So I used this to implement a very basic ChatBot-based app.

1. you specify a postcode
2. you are presented with a set of buttons for the addresses within that 
postcode
3. click on any one, and you are then asked to click when in the right 
location - and the GPS location will be associated with the property 
address chosen.


I have posted this as a sample to "Sample Stacks" called "Telegram Chatbot"

Note some caveats !!
1. all developed on 9.0.0DP6
2. if you wish to run his stack, you need to become a Telegram user, 
then to register your own Bot
(see https://core.telegram.org/bots) and replace the string "YOUR 
TOKEN HERE" with your actual token. (line 11 on card script).
3. I removed the 'save' function before I uploaded the stack - so no-one 
can accidentally over-write my own data.


To run it (once you have done the above),
1. click "start"
2. click "Main"
(it should run forever - if you want to pause it to examine code, etc. 
click on"STOP", and subsequently "Main" again.)


Then in your Telegram client,
1. open a chat to @PropertyLocatorBot
2. send command /start
3. choose a postcode   e.g.  /location,PA34 4XD(Note that comma !!)
4. then you will see the list of addresses within that post code (for 
which I do not yet have a precise location). You can set them - but not 
save that info - and you should see those whose location is set 
disappear from the list.

5a. click / touch an address
5. when prompted, click "Set location" (it will take your current location)
6. you will then see the reduced list without that address

It should be reasonably easy to understand, even if minimally 
documented. Any questions just ask me either here on the list, or 
directly.  (I should probably put this info / stack onto a forum, but I 
couldn't figure out which one was appropriate.


-- 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


Re: List of available SVG icons, name AND icon?

2017-04-21 Thread J. Landman Gay via use-livecode

On 4/21/17 2:46 PM, Klaus major-k via use-livecode wrote:

OK, find a quick and nice looking SVG viewer stack here:

Please drop a line if the Dropbox links does not work!

This is just a VIEWER with all 369 icons and names in it, black on white.
I was using a datagrid, have fun.


This is *way* better, even just as a viewer. Thank you.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: List of available SVG icons, name AND icon?

2017-04-21 Thread Devin Asay via use-livecode

On Apr 21, 2017, at 1:51 PM, Klaus major-k via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

Hi all,

Am 21.04.2017 um 21:46 schrieb Richmond Mathewson via use-livecode 
mailto:use-livecode@lists.runrev.com>>:

Well, here's some sort of a start: 
http://forums.livecode.com/viewtopic.php?f=10&t=29163#p153534
At least it should help those of us who find peering at "that thing" (the 
transparent menu) a pain-in-the-opticals.

I just added my stack to the same thread in the forum, see link above.


And I added one that lets you choose from a filterable list of icon names. I’ve 
always found the scrolling grid of icons too busy to focus on.

Added to the same forum thread.

Devin


Devin Asay
Director
Office of Digital Humanities
Brigham Young University

___
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: List of available SVG icons, name AND icon?

2017-04-21 Thread Klaus major-k via use-livecode
Hi all,

> Am 21.04.2017 um 21:46 schrieb Richmond Mathewson via use-livecode 
> :
> 
> Well, here's some sort of a start: 
> http://forums.livecode.com/viewtopic.php?f=10&t=29163#p153534
> At least it should help those of us who find peering at "that thing" (the 
> transparent menu) a pain-in-the-opticals.

I just added my stack to the same thread in the forum, see link above.

> Richmond.

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
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: List of available SVG icons, name AND icon?

2017-04-21 Thread Klaus major-k via use-livecode
Hi all,

> Am 21.04.2017 um 20:44 schrieb J. Landman Gay via use-livecode 
> :
> 
> On 4/21/17 12:48 PM, Klaus major-k via use-livecode wrote:
>> anyone knows of a way to see all available SVG icons for e.g. the SVG
>> and "Navigation Bar" widgets in another way than the very unhandy popup
>> with the VERY narrow scrollbar?
> 
> Not to mention the transparency which makes the icons nearly invisible 
> against some backgrounds. I have a terrible time with that popup list, I 
> almost always get irritated. The team forgets that not everyone has great 
> vision. I require high contrast.
> 
> One of the first things I did was find this: 
> It has far more icons than LC provides, and you can search it and use a 
> conversion web site to create SVGs.
> Will very much look forward to your stack!

OK, find a quick and nice looking SVG viewer stack here:

Please drop a line if the Dropbox links does not work!

This is just a VIEWER with all 369 icons and names in it, black on white.
I was using a datagrid, have fun.

Hint:
I also found that setting the HSCROLLBAR of a datagrid does not work in LC 9 
dp6!?
So I set the min and max width of that stack to 1034 pixels.


Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
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: List of available SVG icons, name AND icon?

2017-04-21 Thread Richmond Mathewson via use-livecode
Well, here's some sort of a start: 
http://forums.livecode.com/viewtopic.php?f=10&t=29163#p153534


At least it should help those of us who find peering at "that thing" 
(the transparent menu) a pain-in-the-opticals.


Richmond.

On 4/21/17 9:44 pm, J. Landman Gay via use-livecode wrote:

On 4/21/17 12:48 PM, Klaus major-k via use-livecode wrote:

anyone knows of a way to see all available SVG icons for e.g. the SVG
and "Navigation Bar" widgets in another way than the very unhandy popup
with the VERY narrow scrollbar?


Not to mention the transparency which makes the icons nearly invisible 
against some backgrounds. I have a terrible time with that popup list, 
I almost always get irritated. The team forgets that not everyone has 
great vision. I require high contrast.


One of the first things I did was find this: 



It has far more icons than LC provides, and you can search it and use 
a conversion web site to create SVGs.


Will very much look forward to your stack!



___
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: List of available SVG icons, name AND icon?

2017-04-21 Thread Richmond Mathewson via use-livecode
If all the SVGs for the SVG widget are derived from a font . . . . 
fontawesome.ttf


Livecode/Contents/Tools/Toolset/resources/supporting_files/fonts/fontawesome.ttf

and one knows their Unicode glyph addresses . . . .

0xE600 - 0xE60B, 0xF000 - 0xF1E2

Richmond.

On 4/21/17 8:48 pm, Klaus major-k via use-livecode wrote:

Hi there,

anyone knows of a way to see all available SVG icons for e.g. the SVG
and "Navigation Bar" widgets in another way than the very unhandy popup
with the VERY narrow scrollbar?

I see myself rather looking at the scrollbar to not miss it with the mouse
than actually looking at the icons themselves. 8-)

Or a script to create this list with icons by myself?
Know what I mean?

Thanks a lot in advance!


Best

Klaus
--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
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: List of available SVG icons, name AND icon?

2017-04-21 Thread Richmond Mathewson via use-livecode

Where is the popup (8.1.3)?

Richmond.

On 4/21/17 8:48 pm, Klaus major-k via use-livecode wrote:

Hi there,

anyone knows of a way to see all available SVG icons for e.g. the SVG
and "Navigation Bar" widgets in another way than the very unhandy popup
with the VERY narrow scrollbar?

I see myself rather looking at the scrollbar to not miss it with the mouse
than actually looking at the icons themselves. 8-)

Or a script to create this list with icons by myself?
Know what I mean?

Thanks a lot in advance!


Best

Klaus
--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
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: List of available SVG icons, name AND icon?

2017-04-21 Thread J. Landman Gay via use-livecode

On 4/21/17 12:48 PM, Klaus major-k via use-livecode wrote:

anyone knows of a way to see all available SVG icons for e.g. the SVG
and "Navigation Bar" widgets in another way than the very unhandy popup
with the VERY narrow scrollbar?


Not to mention the transparency which makes the icons nearly invisible 
against some backgrounds. I have a terrible time with that popup list, I 
almost always get irritated. The team forgets that not everyone has 
great vision. I require high contrast.


One of the first things I did was find this: 

It has far more icons than LC provides, and you can search it and use a 
conversion web site to create SVGs.


Will very much look forward to your stack!

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: Livecode cross platform delight

2017-04-21 Thread J. Landman Gay via use-livecode

On 4/21/17 6:03 AM, David V Glasgow via use-livecode wrote:

With some anxiety I launched the Windows version on XP, Vista and 10
(the terrible testing trio), and ……  it worked perfectly.  I just sat
there, thinking how truly  amazing , really, really amazing that is.



I am constantly amazed at this. I run Windows under emulation, and only 
rarely, so every time I have to test it takes forever for Windows to 
update itself. As a result I rely on LC's ability to "just work" so that 
I don't have to go through that too often. And except for the rare 
glitch now and then, it always does.


We mostly take this for granted, which speaks to the talents of the LC team.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: List of available SVG icons, name AND icon?

2017-04-21 Thread Klaus major-k via use-livecode
Hi all,

> Am 21.04.2017 um 19:48 schrieb Klaus major-k via use-livecode 
> :
> 
> Hi there,
> 
> anyone knows of a way to see all available SVG icons for e.g. the SVG 
> and "Navigation Bar" widgets in another way than the very unhandy popup
> with the VERY narrow scrollbar?
> 
> I see myself rather looking at the scrollbar to not miss it with the mouse
> than actually looking at the icons themselves. 8-)
> 
> Or a script to create this list with icons by myself?
> Know what I mean?
> 
> Thanks a lot in advance!

after some digging in the dictionary, I think I found a way! :-)
Will create a stack for this later.


Best

Klaus
--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
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


List of available SVG icons, name AND icon?

2017-04-21 Thread Klaus major-k via use-livecode
Hi there,

anyone knows of a way to see all available SVG icons for e.g. the SVG 
and "Navigation Bar" widgets in another way than the very unhandy popup
with the VERY narrow scrollbar?

I see myself rather looking at the scrollbar to not miss it with the mouse
than actually looking at the icons themselves. 8-)

Or a script to create this list with icons by myself?
Know what I mean?

Thanks a lot in advance!


Best

Klaus
--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
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: numberFormat affecting array keys???

2017-04-21 Thread Bob Sneidar via use-livecode
Sly Kitty. :-)

Bob S


> On Apr 21, 2017, at 09:53 , J. Landman Gay via use-livecode 
>  wrote:
> 
> Alternately, put a space after pSourceString to force it to text, which will 
> apply numberformat, and then return word 1 of it.
> 
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.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: numberFormat affecting array keys???

2017-04-21 Thread J. Landman Gay via use-livecode
Alternately, put a space after pSourceString to force it to text, which 
will apply numberformat, and then return word 1 of it.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com



On April 21, 2017 11:31:36 AM Bob Sneidar via use-livecode 
 wrote:


Okay this is why they call me Sly Dawg. I used the engine quirk against it 
to produce this:


on mouseUp
   repeat with i = 1 to 10
  put formatNumber(i, "00") into myArray [i]
   end repeat
   breakpoint
end mouseUp

function formatNumber pSourceString, pFormat
   set the numberFormat to pFormat
   put pSourceString into aArray [pSourceString]
   put the keys of aArray into tResult
   return tResult
end formatNumber

Booyah!

Bob S
___
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: numberFormat affecting array keys???

2017-04-21 Thread Bob Sneidar via use-livecode
Okay this is why they call me Sly Dawg. I used the engine quirk against it to 
produce this:

on mouseUp
   repeat with i = 1 to 10
  put formatNumber(i, "00") into myArray [i]
   end repeat
   breakpoint
end mouseUp

function formatNumber pSourceString, pFormat
   set the numberFormat to pFormat
   put pSourceString into aArray [pSourceString]
   put the keys of aArray into tResult
   return tResult
end formatNumber

Booyah!

Bob S
___
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: Livecode cross platform delight

2017-04-21 Thread Devin Asay via use-livecode
+1 in behalf of my students deploying to iOS and Android devices for the first 
time!

Devin

On Apr 21, 2017, at 5:03 AM, David V Glasgow via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

I have been so busy recently developing an app (on Mac), I completely failed to 
keep up testing Windows version, probably going back 20 or so builds.  I had 
scripted several platform dependent variants, but never tested the features.  
Stupid.

Suddenly I find myself faced with very soon running a training workshop on the 
app, using a mixture of BYOD machines.  Today  I woke in the early hours 
panicking, sweatily picturing bugs in the Windows version popping up mid 
workshop.

With some anxiety I launched the Windows version on XP, Vista and 10 (the 
terrible testing trio), and ……  it worked perfectly.  I just sat there, 
thinking how truly  amazing , really, really amazing that is.

Just in case anyone out there has started to take it for granted,  Livecode 
*is* truly amazing.

Best wishes,

David G



___
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

Devin Asay
Director
Office of Digital Humanities
Brigham Young University

___
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: numberFormat affecting array keys???

2017-04-21 Thread Mike Kerner via use-livecode
Here's an interesting case I ran into:  long time - hours can be single
digits, e.g. "8", but minutes and seconds are always two digits, e.g. "00",
and, of course, setting the numberFormat does not affect anything.
___
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: numberFormat affecting array keys???

2017-04-21 Thread Bob Sneidar via use-livecode
I could, but I will have to figure out how to convert a numberFormat string 
like "#0.00" to a format incantation, as the dictionary puts it. The goal is to 
convert ANY number to ANY numeric format, not just solve this one little issue 
which I could just code around if I wanted. This sort of thing makes my head 
hurt, but I'll give it a go just for the mental exercise. 

Bob S


> On Apr 21, 2017, at 09:01 , Paul Dupuis via use-livecode 
>  wrote:
> 
>> It really doesn't matter though, because the bottom line is that I need to 
>> create my own number formatting function, which is no big deal. If it's any 
>> good I'll post it for review and refinement. 
> 
> Why not use the existing format(baseString[,valuesList]) function
> instead of scripting you own?


___
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: numberFormat affecting array keys???

2017-04-21 Thread Bob Sneidar via use-livecode
Sorry. Change that to:
put formatNumber(i, "00") into myArray [i]
and it does NOT work. adding 0 to the value with numberFormat set to "00" does 
NOT format the number. SHEESH!

Working on it. 

Bob S


> On Apr 21, 2017, at 08:58 , Bob Sneidar via use-livecode 
>  wrote:
> 
> Okay simple solution: 
> 
> on mouseUp
>   repeat with i = 1 to 10
>  put formatNumber(i) into myArray [i]
>   end repeat
>   breakpoint
> end mouseUp
> 
> function formatNumber pSourceString, pFormat
>   set the numberFormat to pFormat
>   add 0 to pSourceString
>   return pSourceString
> end formatNumber
> 
> This works because numberFormat gets reset once the handler exits. DOH! 
> 
> Bob S
> 
> 
> 
> ___
> 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: numberFormat affecting array keys???

2017-04-21 Thread Paul Dupuis via use-livecode
On 4/21/2017 11:34 AM, Bob Sneidar via use-livecode wrote:
> It really doesn't matter though, because the bottom line is that I need to 
> create my own number formatting function, which is no big deal. If it's any 
> good I'll post it for review and refinement. 

Why not use the existing format(baseString[,valuesList]) function
instead of scripting you own?



___
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: numberFormat affecting array keys???

2017-04-21 Thread Bob Sneidar via use-livecode
Okay simple solution: 

on mouseUp
   repeat with i = 1 to 10
  put formatNumber(i) into myArray [i]
   end repeat
   breakpoint
end mouseUp

function formatNumber pSourceString, pFormat
   set the numberFormat to pFormat
   add 0 to pSourceString
   return pSourceString
end formatNumber

This works because numberFormat gets reset once the handler exits. DOH! 

Bob S



___
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: numberFormat affecting array keys???

2017-04-21 Thread Bob Sneidar via use-livecode
OIC. NumberFormat is a STRING function. So then...:
set the numberFormat to "00"; put 1+1 into tValue; put tValue produces "02" 
because livecode converts EVERYTHING to a string before outputting it. It makes 
more sense I suppose to put it that way. I have gotten into the habit of 
thinking that numbers are numbers because it happens so seamlessly. 

It really doesn't matter though, because the bottom line is that I need to 
create my own number formatting function, which is no big deal. If it's any 
good I'll post it for review and refinement. 

Bob S


> On Apr 21, 2017, at 08:18 , Mark Waddingham via use-livecode 
>  wrote:
> 
> Yes - i is a number (as it is the index of the for loop) so the value
> of the array element is a number, and so appears as '1' (not affected
> by numberFormat).
> 
> However, array keys are *always* strings, so when you set the array key
> numberFormat comes into play and the key is '01' and not '1'.
> 
> 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: numberFormat affecting array keys???

2017-04-21 Thread Mark Waddingham via use-livecode

On 2017-04-21 16:33, Bob Sneidar via use-livecode wrote:

I got that wrong. I could say I expected the value to be 01. Also if
you see  the value of i in the debugger, it indicates that the value
of i is 1 and NOT 01. So it HAS to be the array designation that is
doing it.


Yes - i is a number (as it is the index of the for loop) so the value
of the array element is a number, and so appears as '1' (not affected
by numberFormat).

However, array keys are *always* strings, so when you set the array key
numberFormat comes into play and the key is '01' and not '1'.

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: taking a screenshot fails - video experience needed

2017-04-21 Thread Bob Sneidar via use-livecode
Anti Virus. Some malware is designed to take screen shots and ship them off.

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=13&cad=rja&uact=8&ved=0ahUKEwjuj5zR4rXTAhVps1QKHYrjD0wQFghSMAw&url=https%3A%2F%2Fsecurity.stackexchange.com%2Fquestions%2F126433%2Fdetecting-when-a-screenshot-is-taken-by-a-software-spyware-in-windows&usg=AFQjCNFV1qZmN6uQFyAfMdxw5aAvbaCUoQ&sig2=3WyqWfhyd5Te2CpGuPw1hQ

Bob S


On Apr 20, 2017, at 23:51 , Tiemo Hollmann TB via use-livecode 
 wrote:

Hi Bob,

what do you mean with "their AV software"? the drivers of their video
adapter? Or do you think of any other?
And what do you mean with "feature"? to suppress the ability of making
screenshots in general? Ever heard of something like this?

Tiemo

___
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: numberFormat affecting array keys???

2017-04-21 Thread Bob Sneidar via use-livecode
I got that wrong. I could say I expected the value to be 01. Also if you see  
the value of i in the debugger, it indicates that the value of i is 1 and NOT 
01. So it HAS to be the array designation that is doing it.

Bob S


On Apr 21, 2017, at 07:31 , Bob Sneidar via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

I could put it the otherway. I could say I expected the VALUE to ALSO be 1 
because this is how numberFormat shoud work, and it isn'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


Re: numberFormat affecting array keys???

2017-04-21 Thread Bob Sneidar via use-livecode
Again, the VALUE is not being converted by numberFormat, so it ISN'T the LOOP 
calculation that is doing it! Otherwise the VALUE would ALSO be 1! I loop is 
using i and it clearly contains 1 and not 01 because that is what shows up in 
the value. I could put it the otherway. I could say I expected the VALUE to 
ALSO be 1 because this is how numberFormat shoud work, and it isn't.

But I agree numberFormat should be deprecated. Time to work on that 
formatNumber function!

Bob S


On Apr 21, 2017, at 24:26 , Mark Waddingham via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

As others have already said, this isn't a bug - just a consequence of
the rules previously mentioned. The engine is doing this:

 repeat with i = strToNum(1) to strToNum(10)
   put i into myArray[numToStr(i)]
 end repeat

So, the value of the key is put into the array as a number but array
keys are always strings, so it is converted to a string before indexing
the array.

___
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: numberFormat affecting array keys???

2017-04-21 Thread Bob Sneidar via use-livecode
Now I have you! It's NOT doing math in the loop! I know this because the VALUE 
is 1 and NOT 01.

Bob S


On Apr 20, 2017, at 17:32 , hh via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

Bob S. wrote:
Okay THAT has GOT to be a bug!!! Why the hell is numberformat modifying the
name of the array element?? I haven't done ANY math on it.

"repeat with i=1 to 10" uses i to count from 1 up to 10 step 1: That's a lot
of math you've done to i.

Whereas this doesn't touch the numbers:

 set the numberFormat to "00"
 put 1 into myArray[1]
 put 2 into myArray[2]

___
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: AW: Which code signing authority?

2017-04-21 Thread Jonathan Lynch via use-livecode
I will check them out.

Maybe LiveCode could become a Comodo cert distributor? That would be a nice 
plus and a little extra revenue for them.

Sent from my iPhone

> On Apr 21, 2017, at 9:17 AM, tbodine via use-livecode 
>  wrote:
> 
> I've been using K Software's Comodo certs to sign Windows standalones and
> installers for at least five years. The support provided by the owner of K
> Software is quite good. (Example: http://certhelp.ksoftware.net/support/home
> )
> 
> Tom B.
> 
> 
> 
> --
> View this message in context: 
> http://runtime-revolution.278305.n4.nabble.com/Which-code-signing-authority-tp4714079p4714101.html
> Sent from the Revolution - User mailing list archive at Nabble.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


Re: AW: Which code signing authority?

2017-04-21 Thread tbodine via use-livecode
I've been using K Software's Comodo certs to sign Windows standalones and
installers for at least five years. The support provided by the owner of K
Software is quite good. (Example: http://certhelp.ksoftware.net/support/home
)

Tom B.



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Which-code-signing-authority-tp4714079p4714101.html
Sent from the Revolution - User mailing list archive at Nabble.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: taking a screenshot fails - video experience needed

2017-04-21 Thread Trevor DeVore via use-livecode
On Fri, Apr 21, 2017 at 1:53 AM Tiemo Hollmann TB via use-livecode <
use-livecode@lists.runrev.com> wrote:

> And what do you mean with "feature"? to suppress the ability of making
> screenshots in general? Ever heard of something like this?


I've seen Webroot affect what can be captured on the screen.

http://help.screensteps.com/m/authoring/l/549303-why-is-the-screen-black-when-i-try-to-capture-the-screen-on-windows

-- 
Trevor DeVore

>
___
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


Livecode cross platform delight

2017-04-21 Thread David V Glasgow via use-livecode
I have been so busy recently developing an app (on Mac), I completely failed to 
keep up testing Windows version, probably going back 20 or so builds.  I had 
scripted several platform dependent variants, but never tested the features.  
Stupid.

Suddenly I find myself faced with very soon running a training workshop on the 
app, using a mixture of BYOD machines.  Today  I woke in the early hours 
panicking, sweatily picturing bugs in the Windows version popping up mid 
workshop.

With some anxiety I launched the Windows version on XP, Vista and 10 (the 
terrible testing trio), and ……  it worked perfectly.  I just sat there, 
thinking how truly  amazing , really, really amazing that is.  

Just in case anyone out there has started to take it for granted,  Livecode 
*is* truly amazing.  

Best wishes,

David G



___
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: numberFormat affecting array keys???

2017-04-21 Thread Mark Waddingham via use-livecode

On 2017-04-21 01:51, Bob Sneidar via use-livecode wrote:

Put this into a button:

on mouseUp
   set the numberFormat to "00"
   repeat with i=1 to 10
  put i into myArray [i]
  breakpoint
   end repeat
end mouseUp

At the breakpoint examine the array. There will be a 1 in an element
with the name... ready??? "01"

Okay THAT has GOT to be a bug!!! Why the hell is numberformat
modifying the name of the array element?? I haven't done ANY math on
it. Apparently the engine DOES!


As others have already said, this isn't a bug - just a consequence of
the rules previously mentioned. The engine is doing this:

  repeat with i = strToNum(1) to strToNum(10)
put i into myArray[numToStr(i)]
  end repeat

So, the value of the key is put into the array as a number but array
keys are always strings, so it is converted to a string before indexing
the array.

I think this is perhaps more evidence that 'numberFormat' should 
probably
be deprecated - or at least marked as 'present for HyperCard 
compatibility

only and shouldn't be used in new code'.

Indeed, even the latter is somewhat misleading as (due to the IEEE 
double

internal representation used for numbers in LiveCode), numberFormat does
not and cannot work the same.

(The reason it cannot work the same is that the numberFormat expresses
precision in decimal places, but doubles use binary representation - so
a double can only approximate a decimal number to a certain number of
decimal places, it can't faithfully represent it except for a subset
of values).

My general recommendation is:

  1) Don't use numberFormat in new code.

  2) Use format() to format your numbers *when you want to display 
them*.


  3) Use round() to control the precision of your numbers.

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