[ANN] This Week in LiveCode 97

2017-09-11 Thread panagiotis merakos via use-livecode
Hi all,

Read about new developments in LiveCode open source and the open source
community in today's edition of the "This Week in LiveCode" newsletter!

Read issue #97 here: https://goo.gl/vynPjy

This is a weekly newsletter about LiveCode, focussing on what's been
going on in and around the open source project. New issues will be
released weekly on Mondays. We have a dedicated mailing list that will
deliver each issue directly to you e-mail, so you don't miss any!

If you have anything you'd like mentioned (a project, a discussion
somewhere, an upcoming event) then please get in touch.

-- 
Panagiotis Merakos 
LiveCode Software Developer

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: Apps monetizing

2017-09-11 Thread Sean Cole (Pi) via use-livecode
I 'was' working on a widget that runs MobFox (which acts as an agent to all
of the other ad providers), but had to abandon it as MobFox suddenly with
no warning removed their Javascript and CURL access so now you can only use
iOS and Android native SDKs. That would require more than LC8 can deliver,
it needs the new Language tools in LC9.

I've now been looking at propellerads.com. They have a DirectLink feature
that works on all platforms using browser tech and your own personalized
URL (or set-of for multiple clients). This seems one of the best options at
the moment. Here's how:


   1. Register (Use the Get Started button on their page)
   2. After registration is authorised you'll be taken to your account page
   and asked to enter your website. Ignore this and use the Direct Link button.
   3. In the first step for Direct Link there is only one option available
   at the moment, Native Direct Ads. Select it and go next.
   4. Give it a name and select next
   5. Use the https button to get a secure signed link. Copy/paste it
   somewhere safe like a constant var in your app.

It's not the best way but it is 'a' way to monetise for now. Until the
final release of LC9 with full Android and iOS native language integration.

All the best

Sean Cole
*Pi Digital Productions Ltd*
www.pidigital.co.uk
'Don't try to think outside the box. Just remember the truth: There is no
box!'
'For then you realise it is not the box you are trying to look outside of,
but it is yourself!'

eMail Ts & Cs    Pi Digital
Productions Ltd is a UK registered limited company, no. 5255609

On 9 September 2017 at 22:06, Jose Enrique Montero via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi experts, do you know if LIVECODE solved some way to monetize the
> app, using ads?
>
>
> best regards
>
> JE.Montero
> ___
> 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


Livecode docset for Dash

2017-09-11 Thread James Hale via use-livecode
I have just uploaded a stack "Make DocSet" to revonline that creates a 
"LiveCode.docset" for use in the documentation/snippet manager Dash
https://kapeli.com/dash 

>From the revOnline entry:

"Dash" is a documentation and snippet manager for MacOs and iOS.

The MacOS version of Dash is a paid for app.

The iOS version of Dash is FREE!

This stack was made using LC 8.

"Make DocSet" will extract all the guides, images and all the dictionary 
entries in the IDE and format them intto "html".

It will then construct a docset package on your desktop with all the html 
files, images and SQlite index required by Dash.

To install into Dash (assuming you have a copy) just double click.

to install on yout iOS device, trnasfer the file via iTunes to the Dash app.

As the docs are updated in each release of LiveCode you can use the stack 
regenerate the docset, should you wish, to ensure your copy is up to date.



You can try out Dash and see if it is helpful.
It can access/download over 150 documentation sets.


James







___
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 docset for Dash

2017-09-11 Thread Bob Sneidar via use-livecode
Thanks James that sounds useful, if by snippet you mean common code snippets. 
I'll give that a look see. 

Bob S


> On Sep 11, 2017, at 09:57 , James Hale via use-livecode 
>  wrote:
> 
> I have just uploaded a stack "Make DocSet" to revonline that creates a 
> "LiveCode.docset" for use in the documentation/snippet manager Dash
> https://kapeli.com/dash 
> 
> From the revOnline entry:
> 
> "Dash" is a documentation and snippet manager for MacOs and iOS.
> 
> The MacOS version of Dash is a paid for app.
> 
> The iOS version of Dash is FREE!
> 
> This stack was made using LC 8.
> 
> "Make DocSet" will extract all the guides, images and all the dictionary 
> entries in the IDE and format them intto "html".
> 
> It will then construct a docset package on your desktop with all the html 
> files, images and SQlite index required by Dash.
> 
> To install into Dash (assuming you have a copy) just double click.
> 
> to install on yout iOS device, trnasfer the file via iTunes to the Dash app.
> 
> As the docs are updated in each release of LiveCode you can use the stack 
> regenerate the docset, should you wish, to ensure your copy is up to date.
> 
> 
> 
> You can try out Dash and see if it is helpful.
> It can access/download over 150 documentation sets.
> 
> 
> James
> 
> 
> 
> 
> 
> 
> 
> ___
> 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: Livecode docset for Dash

2017-09-11 Thread Matthias Rebbe via use-livecode
James,

thank you so much for this. I was looking for such a docset for so long know. 

Regards,
Matthias

Matthias Rebbe
+49 5741 31
‌wirmachen.software ‌

> Am 11.09.2017 um 18:57 schrieb James Hale via use-livecode 
> mailto:use-livecode@lists.runrev.com>>:
> 
> I have just uploaded a stack "Make DocSet" to revonline that creates a 
> "LiveCode.docset" for use in the documentation/snippet manager Dash
> https://kapeli.com/dash   >
> 
> From the revOnline entry:
> 
> "Dash" is a documentation and snippet manager for MacOs and iOS.
> 
> The MacOS version of Dash is a paid for app.
> 
> The iOS version of Dash is FREE!
> 
> This stack was made using LC 8.
> 
> "Make DocSet" will extract all the guides, images and all the dictionary 
> entries in the IDE and format them intto "html".
> 
> It will then construct a docset package on your desktop with all the html 
> files, images and SQlite index required by Dash.
> 
> To install into Dash (assuming you have a copy) just double click.
> 
> to install on yout iOS device, trnasfer the file via iTunes to the Dash app.
> 
> As the docs are updated in each release of LiveCode you can use the stack 
> regenerate the docset, should you wish, to ensure your copy is up to date.
> 
> 
> 
> You can try out Dash and see if it is helpful.
> It can access/download over 150 documentation sets.
> 
> 
> James
> 
> 
> 
> 
> 
> 
> 
> ___
> 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: Livecode docset for Dash

2017-09-11 Thread James Hale via use-livecode
Hi Bob,

Actually I might mean macro.
I had entered a snippet called "sw" which was a three case switch template.

While coding the stack I went to type "Answer" but couldn't get past "Answ" 
before the switch statement was inserted.
I hadn't realized Dash would pick this up and act on it.

My main reason for doing this was to get a copy of the documentation (mainly 
the dictionary) on to my iPad as I often want to look something up, especially 
if reading the list or forum. The online API doesn't function on touch devices 
and this just works.

Of course the added bonus is the access to all the other doc sets.

It came in quite handy as I need to look up both HTML and CSS while coding the 
conversions to html.

James

> Bob Sneidar via use-livecode 
> <https://www.mail-archive.com/search?l=use-livecode@lists.runrev.com&q=from:%22Bob+Sneidar+via+use%5C-livecode%22>
>  Mon, 11 Sep 2017 10:06:22 -0700 
> <https://www.mail-archive.com/search?l=use-livecode@lists.runrev.com&q=date:20170911>
> Thanks James that sounds useful, if by snippet you mean common code snippets. 
> I'll give that a look see. 

___
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: Apps monetizing

2017-09-11 Thread Jose Enrique Montero via use-livecode
after I had the link, how I can use it in the stack?

With a browser  widget ?


Thanks again
JE

2017-09-11 8:16 GMT-04:00 Sean Cole (Pi) via use-livecode <
use-livecode@lists.runrev.com>:

> I 'was' working on a widget that runs MobFox (which acts as an agent to all
> of the other ad providers), but had to abandon it as MobFox suddenly with
> no warning removed their Javascript and CURL access so now you can only use
> iOS and Android native SDKs. That would require more than LC8 can deliver,
> it needs the new Language tools in LC9.
>
> I've now been looking at propellerads.com. They have a DirectLink feature
> that works on all platforms using browser tech and your own personalized
> URL (or set-of for multiple clients). This seems one of the best options at
> the moment. Here's how:
>
>
>1. Register (Use the Get Started button on their page)
>2. After registration is authorised you'll be taken to your account page
>and asked to enter your website. Ignore this and use the Direct Link
> button.
>3. In the first step for Direct Link there is only one option available
>at the moment, Native Direct Ads. Select it and go next.
>4. Give it a name and select next
>5. Use the https button to get a secure signed link. Copy/paste it
>somewhere safe like a constant var in your app.
>
> It's not the best way but it is 'a' way to monetise for now. Until the
> final release of LC9 with full Android and iOS native language integration.
>
> All the best
>
> Sean Cole
> *Pi Digital Productions Ltd*
> www.pidigital.co.uk
> 'Don't try to think outside the box. Just remember the truth: There is no
> box!'
> 'For then you realise it is not the box you are trying to look outside of,
> but it is yourself!'
>
> eMail Ts & Cs    Pi Digital
> Productions Ltd is a UK registered limited company, no. 5255609
>
> On 9 September 2017 at 22:06, Jose Enrique Montero via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > Hi experts, do you know if LIVECODE solved some way to monetize the
> > app, using ads?
> >
> >
> > best regards
> >
> > JE.Montero
> > ___
> > 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


Phone Number Validation Function

2017-09-11 Thread Bob Sneidar via use-livecode
Hi all. 

Since I needed to write one, I thought I would share this phone number 
validation function. NOTE: it only works for phone numbers of the following 
format:

-- pure numbers
nnn
nn

-- formatted numbers
nnn-
nnn-nnn-
(nnn) nnn-

It will also accept a space delimited extension so long as it begins with x, ex 
or ext. 

Anyone who wants to massage it into shape for European or other phone number 
formats can do so. The range checking is somewhat coarse, because I had 
difficulty determining what the lowest and highest area code and prefix can be, 
and also it may change in the future. Enjoy! 

Bob S

function isPhoneNum pValue
   /*
   A phone number is a value whose raw numeric value is between 100 and 
999, or 10 and 
   99, with an optional numeric value delimited by a space. 
Additionally, the first and fifth characters
   can be ( and ) respectively, in which case the 6th character must be a space 
and the tenth character must be 
   a dash. 
   */
   put pValue into tPhoneNumber -- preserve initial value
   put last word of tPhoneNumber into tExtension
   
   if first char of tExtension is "x" or char 1 to 3 of tExtension is "ext" 
then 
  delete last word of tPhoneNumber -- lose the extension
   else 
  put empty into tExtension -- it's not a valid extension
   end if
   
   -- range check
   put cleanAscii(tPhoneNumber, "numbers") into tPhnValue
   
   if tPhnValue > 999 then
  if tPhnValue < 10 or tPhnValue > 99 then
 return false
  end if
   else
  if tPhnValue < 100 then
 return false
  end if
   end if
   
   -- pure numbers are OK
   if tPhoneNumber = tPhnValue then return true
   
   -- allowed characters
   if length(tPhnValue) = 7 then
  -- length must be 8 chars and char 4 must be a dash
  if length(tPhoneNumber) <> 8 or char 4 of tPhoneNumber is not "-" then
 return false
  end if
   else
  -- length must be 14, 1st char must be (, 5th char must be ), 6th char 
must be space and 10th char must be -
  -- or else length must be 12, 4th char must be - and 8th char must be -
  if length(tPhoneNumber) <> 14 or length(tPhoneNumber) <> 12 then 
 return false
  end if
  
  if length(tPhoneNumber) is 14 then
 if char 1 of tPhoneNumber is not "(" or \
   char 5 of tPhoneNumber is not ")" or \
   char 6 of tPhoneNumber is not space or \
   char 10 of tPhoneNumber is not "-" then 
return false
 end if
  else
 if char 4 of tPhoneNumber is not "-" or \
   char 8 of tPhoneNumber is not "-" then 
return false
 end if
  end if
   end if
   return true
end isPhoneNum
___
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: Apps monetizing

2017-09-11 Thread Pi Digital via use-livecode
Exactly. Make sure that your widget has some sort of way for them to close it 
eventually. If you have it steered through your own website (rather than direct 
link) then you could set up banners for display in a smaller browser window. It 
depends on what suits you or your clients the most. There is a considerable 
amount of chatter about the morality of the adverts (a great number of them are 
for fitness pills or scamware) but those seem to be the only ones who are 
advertising. It’s very rare for the likes of Disney, Chanel or other big brands 
to advertise on these platforms. 

I just found that InMobi are still making available their JavaScript tags so 
they are an alternative. Their disclaimer is that “even though it is possible 
to use InMobi JavaScript tags with mobile applications instead of mobile 
websites, results may vary and InMobi will not be able to provide support.”

Sean Cole
Pi Digital

> On 11 Sep 2017, at 18:51, Jose Enrique Montero via use-livecode 
>  wrote:
> 
> after I had the link, how I can use it in the stack?
> 
> With a browser  widget ?
> 
> 
> Thanks again
> JE
> 
> 2017-09-11 8:16 GMT-04:00 Sean Cole (Pi) via use-livecode <
> use-livecode@lists.runrev.com>:
> 
>> I 'was' working on a widget that runs MobFox (which acts as an agent to all
>> of the other ad providers), but had to abandon it as MobFox suddenly with
>> no warning removed their Javascript and CURL access so now you can only use
>> iOS and Android native SDKs. That would require more than LC8 can deliver,
>> it needs the new Language tools in LC9.
>> 
>> I've now been looking at propellerads.com. They have a DirectLink feature
>> that works on all platforms using browser tech and your own personalized
>> URL (or set-of for multiple clients). This seems one of the best options at
>> the moment. Here's how:
>> 
>> 
>>   1. Register (Use the Get Started button on their page)
>>   2. After registration is authorised you'll be taken to your account page
>>   and asked to enter your website. Ignore this and use the Direct Link
>> button.
>>   3. In the first step for Direct Link there is only one option available
>>   at the moment, Native Direct Ads. Select it and go next.
>>   4. Give it a name and select next
>>   5. Use the https button to get a secure signed link. Copy/paste it
>>   somewhere safe like a constant var in your app.
>> 
>> It's not the best way but it is 'a' way to monetise for now. Until the
>> final release of LC9 with full Android and iOS native language integration.
>> 
>> All the best
>> 
>> Sean Cole
>> *Pi Digital Productions Ltd*
>> www.pidigital.co.uk
>> 'Don't try to think outside the box. Just remember the truth: There is no
>> box!'
>> 'For then you realise it is not the box you are trying to look outside of,
>> but it is yourself!'
>> 
>> eMail Ts & Cs    Pi Digital
>> Productions Ltd is a UK registered limited company, no. 5255609
>> 
>> On 9 September 2017 at 22:06, Jose Enrique Montero via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> 
>>> Hi experts, do you know if LIVECODE solved some way to monetize the
>>> app, using ads?
>>> 
>>> 
>>> best regards
>>> 
>>> JE.Montero
>>> ___
>>> 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
___
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: Phone Number Validation Function

2017-09-11 Thread Bob Sneidar via use-livecode
WHOOPS! Change this line to 
 if length(tPhoneNumber) <> 14 AND length(tPhoneNumber) <> 12 then 

> On Sep 11, 2017, at 11:20 , Bob Sneidar via use-livecode 
>  wrote:
> 
>  if length(tPhoneNumber) <> 14 or length(tPhoneNumber) <> 12 then 


___
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: Phone Number Validation Function

2017-09-11 Thread JB via use-livecode
Thanks Bob.

JB


> On Sep 11, 2017, at 11:20 AM, Bob Sneidar via use-livecode 
>  wrote:
> 
> Hi all. 
> 
> Since I needed to write one, I thought I would share this phone number 
> validation function. NOTE: it only works for phone numbers of the following 
> format:
> 
> -- pure numbers
> nnn
> nn
> 
> -- formatted numbers
> nnn-
> nnn-nnn-
> (nnn) nnn-
> 
> It will also accept a space delimited extension so long as it begins with x, 
> ex or ext. 
> 
> Anyone who wants to massage it into shape for European or other phone number 
> formats can do so. The range checking is somewhat coarse, because I had 
> difficulty determining what the lowest and highest area code and prefix can 
> be, and also it may change in the future. Enjoy! 
> 
> Bob S
> 
> function isPhoneNum pValue
>   /*
>   A phone number is a value whose raw numeric value is between 100 and 
> 999, or 10 and 
>   99, with an optional numeric value delimited by a space. 
> Additionally, the first and fifth characters
>   can be ( and ) respectively, in which case the 6th character must be a 
> space and the tenth character must be 
>   a dash. 
>   */
>   put pValue into tPhoneNumber -- preserve initial value
>   put last word of tPhoneNumber into tExtension
> 
>   if first char of tExtension is "x" or char 1 to 3 of tExtension is "ext" 
> then 
>  delete last word of tPhoneNumber -- lose the extension
>   else 
>  put empty into tExtension -- it's not a valid extension
>   end if
> 
>   -- range check
>   put cleanAscii(tPhoneNumber, "numbers") into tPhnValue
> 
>   if tPhnValue > 999 then
>  if tPhnValue < 10 or tPhnValue > 99 then
> return false
>  end if
>   else
>  if tPhnValue < 100 then
> return false
>  end if
>   end if
> 
>   -- pure numbers are OK
>   if tPhoneNumber = tPhnValue then return true
> 
>   -- allowed characters
>   if length(tPhnValue) = 7 then
>  -- length must be 8 chars and char 4 must be a dash
>  if length(tPhoneNumber) <> 8 or char 4 of tPhoneNumber is not "-" then
> return false
>  end if
>   else
>  -- length must be 14, 1st char must be (, 5th char must be ), 6th char 
> must be space and 10th char must be -
>  -- or else length must be 12, 4th char must be - and 8th char must be -
>  if length(tPhoneNumber) <> 14 or length(tPhoneNumber) <> 12 then 
> return false
>  end if
> 
>  if length(tPhoneNumber) is 14 then
> if char 1 of tPhoneNumber is not "(" or \
>   char 5 of tPhoneNumber is not ")" or \
>   char 6 of tPhoneNumber is not space or \
>   char 10 of tPhoneNumber is not "-" then 
>return false
> end if
>  else
> if char 4 of tPhoneNumber is not "-" or \
>   char 8 of tPhoneNumber is not "-" then 
>return false
> end if
>  end if
>   end if
>   return true
> end isPhoneNum
> ___
> 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: Livecode docset for Dash

2017-09-11 Thread J. Landman Gay via use-livecode

On 9/11/17 12:27 PM, James Hale via use-livecode wrote:

The online API doesn't function on touch devices


It works on my Android with Chrome, but it is painfully slow and you 
have to wait for the popup ad to display, then dismiss it, and then you 
can type. The initial filtering on the first character of the term hangs 
for a few seconds, then each successive character takes a little less 
time as the filtered list gets smaller.


So yeah, it's hard to use, but it can be done with some patience on 
Android at least.


--
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: Apps monetizing

2017-09-11 Thread Sean Cole (Pi) via use-livecode
I've also just found that Millenial Media uses Javascript too.
http://docs.onemobilesdk.aol.com/mmadlib/index.html
The link to the InMobi MobileWeb guide is
https://support.inmobi.com/monetize/mobile-web/

InMobi seems the most popular and bigger or the two with more features as
well.

To use either of these, you create a dummy html file using the javascript
code from the guides and store it within your app resources. Call it when
you create a browser to display the ad. It will need to be able to respond
to taps and other javascript calls. You'll also likely need to have some
sort of timeout features with a 'close browser' method of some sort so that
it can be manually or automatically removed somehow. You can set up a test
account to give it a play.

All the best

Sean Cole
*Pi Digital Productions Ltd*
www.pidigital.co.uk
'Don't try to think outside the box. Just remember the truth: There is no
box!'
'For then you realise it is not the box you are trying to look outside of,
but it is yourself!'

eMail Ts & Cs    Pi Digital
Productions Ltd is a UK registered limited company, no. 5255609

On 11 September 2017 at 19:27, Pi Digital via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Exactly. Make sure that your widget has some sort of way for them to close
> it eventually. If you have it steered through your own website (rather than
> direct link) then you could set up banners for display in a smaller browser
> window. It depends on what suits you or your clients the most. There is a
> considerable amount of chatter about the morality of the adverts (a great
> number of them are for fitness pills or scamware) but those seem to be the
> only ones who are advertising. It’s very rare for the likes of Disney,
> Chanel or other big brands to advertise on these platforms.
>
> I just found that InMobi are still making available their JavaScript tags
> so they are an alternative. Their disclaimer is that “even though it is
> possible to use InMobi JavaScript tags with mobile applications instead of
> mobile websites, results may vary and InMobi will not be able to provide
> support.”
>
> Sean Cole
> Pi Digital
>
> > On 11 Sep 2017, at 18:51, Jose Enrique Montero via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > after I had the link, how I can use it in the stack?
> >
> > With a browser  widget ?
> >
> >
> > Thanks again
> > JE
> >
> > 2017-09-11 8:16 GMT-04:00 Sean Cole (Pi) via use-livecode <
> > use-livecode@lists.runrev.com>:
> >
> >> I 'was' working on a widget that runs MobFox (which acts as an agent to
> all
> >> of the other ad providers), but had to abandon it as MobFox suddenly
> with
> >> no warning removed their Javascript and CURL access so now you can only
> use
> >> iOS and Android native SDKs. That would require more than LC8 can
> deliver,
> >> it needs the new Language tools in LC9.
> >>
> >> I've now been looking at propellerads.com. They have a DirectLink
> feature
> >> that works on all platforms using browser tech and your own personalized
> >> URL (or set-of for multiple clients). This seems one of the best
> options at
> >> the moment. Here's how:
> >>
> >>
> >>   1. Register (Use the Get Started button on their page)
> >>   2. After registration is authorised you'll be taken to your account
> page
> >>   and asked to enter your website. Ignore this and use the Direct Link
> >> button.
> >>   3. In the first step for Direct Link there is only one option
> available
> >>   at the moment, Native Direct Ads. Select it and go next.
> >>   4. Give it a name and select next
> >>   5. Use the https button to get a secure signed link. Copy/paste it
> >>   somewhere safe like a constant var in your app.
> >>
> >> It's not the best way but it is 'a' way to monetise for now. Until the
> >> final release of LC9 with full Android and iOS native language
> integration.
> >>
> >> All the best
> >>
> >> Sean Cole
> >> *Pi Digital Productions Ltd*
> >> www.pidigital.co.uk
> >> 'Don't try to think outside the box. Just remember the truth: There is
> no
> >> box!'
> >> 'For then you realise it is not the box you are trying to look outside
> of,
> >> but it is yourself!'
> >>
> >> eMail Ts & Cs    Pi Digital
> >> Productions Ltd is a UK registered limited company, no. 5255609
> >>
> >> On 9 September 2017 at 22:06, Jose Enrique Montero via use-livecode <
> >> use-livecode@lists.runrev.com> wrote:
> >>
> >>> Hi experts, do you know if LIVECODE solved some way to monetize the
> >>> app, using ads?
> >>>
> >>>
> >>> best regards
> >>>
> >>> JE.Montero
> >>> ___
> >>> 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
>

Re: Apps monetizing

2017-09-11 Thread Jose Enrique Montero via use-livecode
Thanks Sean, its work but I´m worried about the adverts themes.  Do you
have try SMAATO.com ?

best regards
JE

2017-09-11 14:27 GMT-04:00 Pi Digital via use-livecode <
use-livecode@lists.runrev.com>:

> Exactly. Make sure that your widget has some sort of way for them to close
> it eventually. If you have it steered through your own website (rather than
> direct link) then you could set up banners for display in a smaller browser
> window. It depends on what suits you or your clients the most. There is a
> considerable amount of chatter about the morality of the adverts (a great
> number of them are for fitness pills or scamware) but those seem to be the
> only ones who are advertising. It’s very rare for the likes of Disney,
> Chanel or other big brands to advertise on these platforms.
>
> I just found that InMobi are still making available their JavaScript tags
> so they are an alternative. Their disclaimer is that “even though it is
> possible to use InMobi JavaScript tags with mobile applications instead of
> mobile websites, results may vary and InMobi will not be able to provide
> support.”
>
> Sean Cole
> Pi Digital
>
> > On 11 Sep 2017, at 18:51, Jose Enrique Montero via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > after I had the link, how I can use it in the stack?
> >
> > With a browser  widget ?
> >
> >
> > Thanks again
> > JE
> >
> > 2017-09-11 8:16 GMT-04:00 Sean Cole (Pi) via use-livecode <
> > use-livecode@lists.runrev.com>:
> >
> >> I 'was' working on a widget that runs MobFox (which acts as an agent to
> all
> >> of the other ad providers), but had to abandon it as MobFox suddenly
> with
> >> no warning removed their Javascript and CURL access so now you can only
> use
> >> iOS and Android native SDKs. That would require more than LC8 can
> deliver,
> >> it needs the new Language tools in LC9.
> >>
> >> I've now been looking at propellerads.com. They have a DirectLink
> feature
> >> that works on all platforms using browser tech and your own personalized
> >> URL (or set-of for multiple clients). This seems one of the best
> options at
> >> the moment. Here's how:
> >>
> >>
> >>   1. Register (Use the Get Started button on their page)
> >>   2. After registration is authorised you'll be taken to your account
> page
> >>   and asked to enter your website. Ignore this and use the Direct Link
> >> button.
> >>   3. In the first step for Direct Link there is only one option
> available
> >>   at the moment, Native Direct Ads. Select it and go next.
> >>   4. Give it a name and select next
> >>   5. Use the https button to get a secure signed link. Copy/paste it
> >>   somewhere safe like a constant var in your app.
> >>
> >> It's not the best way but it is 'a' way to monetise for now. Until the
> >> final release of LC9 with full Android and iOS native language
> integration.
> >>
> >> All the best
> >>
> >> Sean Cole
> >> *Pi Digital Productions Ltd*
> >> www.pidigital.co.uk
> >> 'Don't try to think outside the box. Just remember the truth: There is
> no
> >> box!'
> >> 'For then you realise it is not the box you are trying to look outside
> of,
> >> but it is yourself!'
> >>
> >> eMail Ts & Cs    Pi Digital
> >> Productions Ltd is a UK registered limited company, no. 5255609
> >>
> >> On 9 September 2017 at 22:06, Jose Enrique Montero via use-livecode <
> >> use-livecode@lists.runrev.com> wrote:
> >>
> >>> Hi experts, do you know if LIVECODE solved some way to monetize the
> >>> app, using ads?
> >>>
> >>>
> >>> best regards
> >>>
> >>> JE.Montero
> >>> ___
> >>> 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
> ___
> 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: Apps monetizing

2017-09-11 Thread Sean Cole (Pi) via use-livecode
Smaato was one of my early options because you can link it to AdMob and
DoubleClick accounts but they, like many others, only have native iOS and
Android SDKs which requires LC9 (which even now doesn't fully support iOS
Obj-C Frameworks just yet). https://wiki.smaato.com/display/IN/Ad+Tag

Sean Cole
*Pi Digital Productions Ltd*
www.pidigital.co.uk
'Don't try to think outside the box. Just remember the truth: There is no
box!'
'For then you realise it is not the box you are trying to look outside of,
but it is yourself!'

eMail Ts & Cs    Pi Digital
Productions Ltd is a UK registered limited company, no. 5255609

On 11 September 2017 at 20:48, Jose Enrique Montero via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Thanks Sean, its work but I´m worried about the adverts themes.  Do you
> have try SMAATO.com ?
>
> best regards
> JE
>
> 2017-09-11 14:27 GMT-04:00 Pi Digital via use-livecode <
> use-livecode@lists.runrev.com>:
>
> > Exactly. Make sure that your widget has some sort of way for them to
> close
> > it eventually. If you have it steered through your own website (rather
> than
> > direct link) then you could set up banners for display in a smaller
> browser
> > window. It depends on what suits you or your clients the most. There is a
> > considerable amount of chatter about the morality of the adverts (a great
> > number of them are for fitness pills or scamware) but those seem to be
> the
> > only ones who are advertising. It’s very rare for the likes of Disney,
> > Chanel or other big brands to advertise on these platforms.
> >
> > I just found that InMobi are still making available their JavaScript tags
> > so they are an alternative. Their disclaimer is that “even though it is
> > possible to use InMobi JavaScript tags with mobile applications instead
> of
> > mobile websites, results may vary and InMobi will not be able to provide
> > support.”
> >
> > Sean Cole
> > Pi Digital
> >
> > > On 11 Sep 2017, at 18:51, Jose Enrique Montero via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> > >
> > > after I had the link, how I can use it in the stack?
> > >
> > > With a browser  widget ?
> > >
> > >
> > > Thanks again
> > > JE
> > >
> > > 2017-09-11 8:16 GMT-04:00 Sean Cole (Pi) via use-livecode <
> > > use-livecode@lists.runrev.com>:
> > >
> > >> I 'was' working on a widget that runs MobFox (which acts as an agent
> to
> > all
> > >> of the other ad providers), but had to abandon it as MobFox suddenly
> > with
> > >> no warning removed their Javascript and CURL access so now you can
> only
> > use
> > >> iOS and Android native SDKs. That would require more than LC8 can
> > deliver,
> > >> it needs the new Language tools in LC9.
> > >>
> > >> I've now been looking at propellerads.com. They have a DirectLink
> > feature
> > >> that works on all platforms using browser tech and your own
> personalized
> > >> URL (or set-of for multiple clients). This seems one of the best
> > options at
> > >> the moment. Here's how:
> > >>
> > >>
> > >>   1. Register (Use the Get Started button on their page)
> > >>   2. After registration is authorised you'll be taken to your account
> > page
> > >>   and asked to enter your website. Ignore this and use the Direct Link
> > >> button.
> > >>   3. In the first step for Direct Link there is only one option
> > available
> > >>   at the moment, Native Direct Ads. Select it and go next.
> > >>   4. Give it a name and select next
> > >>   5. Use the https button to get a secure signed link. Copy/paste it
> > >>   somewhere safe like a constant var in your app.
> > >>
> > >> It's not the best way but it is 'a' way to monetise for now. Until the
> > >> final release of LC9 with full Android and iOS native language
> > integration.
> > >>
> > >> All the best
> > >>
> > >> Sean Cole
> > >> *Pi Digital Productions Ltd*
> > >> www.pidigital.co.uk
> > >> 'Don't try to think outside the box. Just remember the truth: There is
> > no
> > >> box!'
> > >> 'For then you realise it is not the box you are trying to look outside
> > of,
> > >> but it is yourself!'
> > >>
> > >> eMail Ts & Cs    Pi Digital
> > >> Productions Ltd is a UK registered limited company, no. 5255609
> > >>
> > >> On 9 September 2017 at 22:06, Jose Enrique Montero via use-livecode <
> > >> use-livecode@lists.runrev.com> wrote:
> > >>
> > >>> Hi experts, do you know if LIVECODE solved some way to monetize the
> > >>> app, using ads?
> > >>>
> > >>>
> > >>> best regards
> > >>>
> > >>> JE.Montero
> > >>> ___
> > >>> 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
> > >>

put after

2017-09-11 Thread Bob Sneidar via use-livecode
Okay so if a field only has 1 word, and I state 

put tWord after word 2 of me into me

Shouldn't that create a second word? It doesn't it simply appends tWord to the 
end of word 1. 

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: put after

2017-09-11 Thread Mike Bonner via use-livecode
seems like it should.  In fact it should work with " into " also, but that
has the same behavior


On Mon, Sep 11, 2017 at 3:11 PM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Okay so if a field only has 1 word, and I state
>
> put tWord after word 2 of me into me
>
> Shouldn't that create a second word? It doesn't it simply appends tWord to
> the end of word 1.
>
> 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: put after

2017-09-11 Thread Sean Cole (Pi) via use-livecode
Put "two" after word 1 of "word"

result: "wordtwo"

put "two" after word 2 of "word"

result: "wordtwo"

'after word' basically counts white space. eg, "word,word,word" is counted
as one word". "word   word" with several spaces counts as
two words. "word " still counts as one word. There is no word two
here so it will always append after the same as if it was 'after word 53'!

But when you use put x *after* word y of z *into* z, with z being "word", x
being "two" and y being 2, you are using after out of syntax because you
wouldn't use **after** and **into** in the same 'put' line

Sean Cole
*Pi Digital Productions Ltd*
'Don't try to think outside the box. Just remember the truth: There is no
box!'
'For then you realise it is not the box you are trying to look outside of,
but it is yourself!'

eMail Ts & Cs    Pi Digital
Productions Ltd is a UK registered limited company, no. 5255609

On 11 September 2017 at 22:11, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Okay so if a field only has 1 word, and I state
>
> put tWord after word 2 of me into me
>
> Shouldn't that create a second word? It doesn't it simply appends tWord to
> the end of word 1.
>
> 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: put after

2017-09-11 Thread Randy Hengst via use-livecode
It doesn’t change your question, but you don’t need ‘into me’ at the end each 
line

put "four" into word 1 of me

put space & "help" after word 1 of me



> On Sep 11, 2017, at 4:50 PM, Sean Cole (Pi) via use-livecode 
>  wrote:
> 
> Put "two" after word 1 of "word"
> 
> result: "wordtwo"
> 
> put "two" after word 2 of "word"
> 
> result: "wordtwo"
> 
> 'after word' basically counts white space. eg, "word,word,word" is counted
> as one word". "word   word" with several spaces counts as
> two words. "word " still counts as one word. There is no word two
> here so it will always append after the same as if it was 'after word 53'!
> 
> But when you use put x *after* word y of z *into* z, with z being "word", x
> being "two" and y being 2, you are using after out of syntax because you
> wouldn't use **after** and **into** in the same 'put' line
> 
> Sean Cole
> *Pi Digital Productions Ltd*
> 'Don't try to think outside the box. Just remember the truth: There is no
> box!'
> 'For then you realise it is not the box you are trying to look outside of,
> but it is yourself!'
> 
> eMail Ts & Cs    Pi Digital
> Productions Ltd is a UK registered limited company, no. 5255609
> 
> On 11 September 2017 at 22:11, Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Okay so if a field only has 1 word, and I state
>> 
>> put tWord after word 2 of me into me
>> 
>> Shouldn't that create a second word? It doesn't it simply appends tWord to
>> the end of word 1.
>> 
>> 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

___
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: put after

2017-09-11 Thread Bob Sneidar via use-livecode
Actually that was a typo. Put tWord after word 2 of me is what I meant. 

Bob S


> On Sep 11, 2017, at 14:11 , Bob Sneidar via use-livecode 
>  wrote:
> 
> put tWord after word 2 of me into me


___
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: put after

2017-09-11 Thread Bob Sneidar via use-livecode
Curiously then, you can have a string with 1 item, then put tWord into item 3 
of tString, and it will happily create an empty item 2 so that there is an item 
3 to put something into. ex.

put "test" into tString;put "test3" into item 3 of tString;put tString 
produces: test,,test3

put "test" into tString;put "test3" into word 3 of tString;put tString
produces: testtest3

Doesn't that seem like an anomaly to anyone?

Bob S

. 


> On Sep 11, 2017, at 15:05 , Bob Sneidar via use-livecode 
>  wrote:
> 
> Actually that was a typo. Put tWord after word 2 of me is what I meant. 
> 
> Bob S
> 
> 
>> On Sep 11, 2017, at 14:11 , Bob Sneidar via use-livecode 
>>  wrote:
>> 
>> put tWord after word 2 of me into me
> 
> 
> ___
> 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: put after

2017-09-11 Thread Phil Davis via use-livecode
You already know this, but you can also put tWord after tContainer (or 
after text of me) - no chunk expression needed.


Phil Davis


On 9/11/17 3:05 PM, Bob Sneidar via use-livecode wrote:

Actually that was a typo. Put tWord after word 2 of me is what I meant.

Bob S



On Sep 11, 2017, at 14:11 , Bob Sneidar via use-livecode 
 wrote:

put tWord after word 2 of me into me


___
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



--
Phil Davis


___
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: put after

2017-09-11 Thread Monte Goulding via use-livecode

> On 12 Sep 2017, at 8:10 am, Bob Sneidar via use-livecode 
>  wrote:
> 
> put "test" into tString;put "test3" into word 3 of tString;put tString
> produces: testtest3
> 
> Doesn't that seem like an anomaly to anyone?

Hmm… yes this should probably fail with an execution error I suspect as it’s 
impossible to do. Can you please report it.

Cheers

Monte
___
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: put after

2017-09-11 Thread Sean Cole (Pi) via use-livecode
This is exactly what I'd expect as 'item' uses a delimiter. If you had
'space' as the delimiter you could then use:

set the itemdel to space; put "test" into tString; put "test3" into item 3
of tString; put tString
result: test  test3
(with 2 spaces between the two words)

now:
put the number of words in tString
result: 2

And this is still correct. Look at the definitions of item, word,

I would want LC to put "test3" directly after "test" even if I did for some
bizarre reason decide to put it after word 63556 of tString as this would
be expected behavior. I would not want it to throw back an error or place
several spaces between the two words.



Sean Cole
*Pi Digital Productions Ltd*
www.pidigital.co.uk
+44(1634)402193
+44(7702)116447
'Don't try to think outside the box. Just remember the truth: There is no
box!'
'For then you realise it is not the box you are trying to look outside of,
but it is yourself!'

eMail Ts & Cs    Pi Digital
Productions Ltd is a UK registered limited company, no. 5255609

On 11 September 2017 at 23:10, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Curiously then, you can have a string with 1 item, then put tWord into
> item 3 of tString, and it will happily create an empty item 2 so that there
> is an item 3 to put something into. ex.
>
> put "test" into tString;put "test3" into item 3 of tString;put tString
> produces: test,,test3
>
> put "test" into tString;put "test3" into word 3 of tString;put tString
> produces: testtest3
>
> Doesn't that seem like an anomaly to anyone?
>
> Bob S
>
> .
>
>
> > On Sep 11, 2017, at 15:05 , Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Actually that was a typo. Put tWord after word 2 of me is what I meant.
> >
> > Bob S
> >
> >
> >> On Sep 11, 2017, at 14:11 , Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >>
> >> put tWord after word 2 of me into me
> >
> >
> > ___
> > 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: Phone Number Validation Function

2017-09-11 Thread Sean Cole (Pi) via use-livecode
Read this:
https://stackoverflow.com/questions/123559/a-comprehensive-regex-for-phone-number-validation

You can then filter by these Regular Expressions (RegEx) really simply.
More importantly, it is one or two lines of code instead of 53.

Sean Cole
*Pi Digital Productions Ltd*

'Don't try to think outside the box. Just remember the truth: There is no
box!'
'For then you realise it is not the box you are trying to look outside of,
but it is yourself!'

eMail Ts & Cs    Pi Digital
Productions Ltd is a UK registered limited company, no. 5255609

On 11 September 2017 at 20:04, JB via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Thanks Bob.
>
> JB
>
>
> > On Sep 11, 2017, at 11:20 AM, Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Hi all.
> >
> > Since I needed to write one, I thought I would share this phone number
> validation function. NOTE: it only works for phone numbers of the following
> format:
> >
> > -- pure numbers
> > nnn
> > nn
> >
> > -- formatted numbers
> > nnn-
> > nnn-nnn-
> > (nnn) nnn-
> >
> > It will also accept a space delimited extension so long as it begins
> with x, ex or ext.
> >
> > Anyone who wants to massage it into shape for European or other phone
> number formats can do so. The range checking is somewhat coarse, because I
> had difficulty determining what the lowest and highest area code and prefix
> can be, and also it may change in the future. Enjoy!
> >
> > Bob S
> >
> > function isPhoneNum pValue
> >   /*
> >   A phone number is a value whose raw numeric value is between 100
> and 999, or 10 and
> >   99, with an optional numeric value delimited by a space.
> Additionally, the first and fifth characters
> >   can be ( and ) respectively, in which case the 6th character must be a
> space and the tenth character must be
> >   a dash.
> >   */
> >   put pValue into tPhoneNumber -- preserve initial value
> >   put last word of tPhoneNumber into tExtension
> >
> >   if first char of tExtension is "x" or char 1 to 3 of tExtension is
> "ext" then
> >  delete last word of tPhoneNumber -- lose the extension
> >   else
> >  put empty into tExtension -- it's not a valid extension
> >   end if
> >
> >   -- range check
> >   put cleanAscii(tPhoneNumber, "numbers") into tPhnValue
> >
> >   if tPhnValue > 999 then
> >  if tPhnValue < 10 or tPhnValue > 99 then
> > return false
> >  end if
> >   else
> >  if tPhnValue < 100 then
> > return false
> >  end if
> >   end if
> >
> >   -- pure numbers are OK
> >   if tPhoneNumber = tPhnValue then return true
> >
> >   -- allowed characters
> >   if length(tPhnValue) = 7 then
> >  -- length must be 8 chars and char 4 must be a dash
> >  if length(tPhoneNumber) <> 8 or char 4 of tPhoneNumber is not "-"
> then
> > return false
> >  end if
> >   else
> >  -- length must be 14, 1st char must be (, 5th char must be ), 6th
> char must be space and 10th char must be -
> >  -- or else length must be 12, 4th char must be - and 8th char must
> be -
> >  if length(tPhoneNumber) <> 14 or length(tPhoneNumber) <> 12 then
> > return false
> >  end if
> >
> >  if length(tPhoneNumber) is 14 then
> > if char 1 of tPhoneNumber is not "(" or \
> >   char 5 of tPhoneNumber is not ")" or \
> >   char 6 of tPhoneNumber is not space or \
> >   char 10 of tPhoneNumber is not "-" then
> >return false
> > end if
> >  else
> > if char 4 of tPhoneNumber is not "-" or \
> >   char 8 of tPhoneNumber is not "-" then
> >return false
> > end if
> >  end if
> >   end if
> >   return true
> > end isPhoneNum
> > ___
> > 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: put after

2017-09-11 Thread Bob Sneidar via use-livecode
Setting the itemdelimiter to space and using items instead of words would 
certainly work around it, thanks for that tip. 

But by way of discussion, when we talk about string manipulation in this 
list/forum, and how words are "delimited" we actually use the word "delimiter" 
to talk about the spaces, with the one difference that there is no 
wordDelimiter property that we can change, while there is for lines and items, 
so that:

put "test" into tString;put "test3" into line 3 of tString;put tString
produces: 
test

test3

As you would expect. I guess that means that spaces are the bastard children of 
the string manipulation world. :-)

I will file a report anyway as requested. 

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: Phone Number Validation Function

2017-09-11 Thread Sean Cole (Pi) via use-livecode
There are currently 342 expressions on the regexlibrary:
http://www.regexlib.com/Search.aspx?k=phone&AspxAutoDetectCookieSupport=1

Some eliminate erroneous numbers too like those begining with 123 or 555
and so on.

Sean Cole
*Pi Digital Productions Ltd*
www.pidigital.co.uk
+44(1634)402193
+44(7702)116447
'Don't try to think outside the box. Just remember the truth: There is no
box!'
'For then you realise it is not the box you are trying to look outside of,
but it is yourself!'

eMail Ts & Cs    Pi Digital
Productions Ltd is a UK registered limited company, no. 5255609

On 11 September 2017 at 23:33, Sean Cole (Pi)  wrote:

> Read this:
> https://stackoverflow.com/questions/123559/a-
> comprehensive-regex-for-phone-number-validation
>
> You can then filter by these Regular Expressions (RegEx) really simply.
> More importantly, it is one or two lines of code instead of 53.
>
> Sean Cole
> *Pi Digital Productions Ltd*
>
> 'Don't try to think outside the box. Just remember the truth: There is no
> box!'
> 'For then you realise it is not the box you are trying to look outside of,
> but it is yourself!'
>
> eMail Ts & Cs    Pi Digital
> Productions Ltd is a UK registered limited company, no. 5255609
>
> On 11 September 2017 at 20:04, JB via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> Thanks Bob.
>>
>> JB
>>
>>
>> > On Sep 11, 2017, at 11:20 AM, Bob Sneidar via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> >
>> > Hi all.
>> >
>> > Since I needed to write one, I thought I would share this phone number
>> validation function. NOTE: it only works for phone numbers of the following
>> format:
>> >
>> > -- pure numbers
>> > nnn
>> > nn
>> >
>> > -- formatted numbers
>> > nnn-
>> > nnn-nnn-
>> > (nnn) nnn-
>> >
>> > It will also accept a space delimited extension so long as it begins
>> with x, ex or ext.
>> >
>> > Anyone who wants to massage it into shape for European or other phone
>> number formats can do so. The range checking is somewhat coarse, because I
>> had difficulty determining what the lowest and highest area code and prefix
>> can be, and also it may change in the future. Enjoy!
>> >
>> > Bob S
>> >
>> > function isPhoneNum pValue
>> >   /*
>> >   A phone number is a value whose raw numeric value is between 100
>> and 999, or 10 and
>> >   99, with an optional numeric value delimited by a space.
>> Additionally, the first and fifth characters
>> >   can be ( and ) respectively, in which case the 6th character must be
>> a space and the tenth character must be
>> >   a dash.
>> >   */
>> >   put pValue into tPhoneNumber -- preserve initial value
>> >   put last word of tPhoneNumber into tExtension
>> >
>> >   if first char of tExtension is "x" or char 1 to 3 of tExtension is
>> "ext" then
>> >  delete last word of tPhoneNumber -- lose the extension
>> >   else
>> >  put empty into tExtension -- it's not a valid extension
>> >   end if
>> >
>> >   -- range check
>> >   put cleanAscii(tPhoneNumber, "numbers") into tPhnValue
>> >
>> >   if tPhnValue > 999 then
>> >  if tPhnValue < 10 or tPhnValue > 99 then
>> > return false
>> >  end if
>> >   else
>> >  if tPhnValue < 100 then
>> > return false
>> >  end if
>> >   end if
>> >
>> >   -- pure numbers are OK
>> >   if tPhoneNumber = tPhnValue then return true
>> >
>> >   -- allowed characters
>> >   if length(tPhnValue) = 7 then
>> >  -- length must be 8 chars and char 4 must be a dash
>> >  if length(tPhoneNumber) <> 8 or char 4 of tPhoneNumber is not "-"
>> then
>> > return false
>> >  end if
>> >   else
>> >  -- length must be 14, 1st char must be (, 5th char must be ), 6th
>> char must be space and 10th char must be -
>> >  -- or else length must be 12, 4th char must be - and 8th char must
>> be -
>> >  if length(tPhoneNumber) <> 14 or length(tPhoneNumber) <> 12 then
>> > return false
>> >  end if
>> >
>> >  if length(tPhoneNumber) is 14 then
>> > if char 1 of tPhoneNumber is not "(" or \
>> >   char 5 of tPhoneNumber is not ")" or \
>> >   char 6 of tPhoneNumber is not space or \
>> >   char 10 of tPhoneNumber is not "-" then
>> >return false
>> > end if
>> >  else
>> > if char 4 of tPhoneNumber is not "-" or \
>> >   char 8 of tPhoneNumber is not "-" then
>> >return false
>> > end if
>> >  end if
>> >   end if
>> >   return true
>> > end isPhoneNum
>> > ___
>> > 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
>> >
>>
>>
>> ___
>> us

Re: put after

2017-09-11 Thread Paul Dupuis via use-livecode
Think about it:

Items ate comma (a single character) delimited, so if a container
contains a single string (no commas) and you "put tString after item 3
of tContainer", LiveCode can logically create an "empty" item 2 and
empty item 3 using ",," and place (concatenate) tString on to the end of
empty item 3.

Words are whitespace (any whitespace) delimited, so if a container
contains a single string and you "put tString after word 3 of
tContainer", LiveCode can not create an empty word. If it tried 2
spaces, that is still a single whitespace delimiter for words. The only
choices are fail (execution error) or concatenate on to the end of the
last word it can find.

xTalk/LiveCode script tries to be a forgiving language from its
Hypercard roots and so it concatenates on to teh end of the last word it
can find.



___
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: put after

2017-09-11 Thread Sean Cole (Pi) via use-livecode
Because a word is defined as 'a number of characters together in a string
separated either or both sides by a white space'. So it doesn't actually
count the white spaces but the number of actual strings of characters
separated by them. The actual glossary term is not fully expressive by
saying "A chunk of text that is delimited by spaces, tabs, or returns."

Sean Cole
*Pi Digital Productions Ltd*
www.pidigital.co.uk
+44(1634)402193
+44(7702)116447
'Don't try to think outside the box. Just remember the truth: There is no
box!'
'For then you realise it is not the box you are trying to look outside of,
but it is yourself!'

eMail Ts & Cs    Pi Digital
Productions Ltd is a UK registered limited company, no. 5255609

On 11 September 2017 at 23:36, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Setting the itemdelimiter to space and using items instead of words would
> certainly work around it, thanks for that tip.
>
> But by way of discussion, when we talk about string manipulation in this
> list/forum, and how words are "delimited" we actually use the word
> "delimiter" to talk about the spaces, with the one difference that there is
> no wordDelimiter property that we can change, while there is for lines and
> items, so that:
>
> put "test" into tString;put "test3" into line 3 of tString;put tString
> produces:
> test
>
> test3
>
> As you would expect. I guess that means that spaces are the bastard
> children of the string manipulation world. :-)
>
> I will file a report anyway as requested.
>
> 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: Phone Number Validation Function

2017-09-11 Thread Bob Sneidar via use-livecode
Thanks Sean, but reading through that article, I think it makes the arguement 
for NOT using RegEx, seeing all the arguments back and forth about what is 
wrong with each other's regex, and one guy pooh poohing all of them in favor of 
a procedural approach. 

My goal is not to simply allow certain characters and numbers (I have a 
function that does that already) of a given length, but to enforce data 
consistency across my apps. That means that while certain numbers are 
acceptably formatted phone numbers according to some international standard, 
having +1 at the beginning for example, I don't necessarily want that. Periods 
are valid delimiters, but I don't want that either. 

Now the google api looks promising, but if I have to tie it to a google account 
and active internet connection, I will probably stick to rolling my own. 

Bob S


> On Sep 11, 2017, at 15:33 , Sean Cole (Pi) via use-livecode 
>  wrote:
> 
> Read this:
> https://stackoverflow.com/questions/123559/a-comprehensive-regex-for-phone-number-validation
> 
> You can then filter by these Regular Expressions (RegEx) really simply.
> More importantly, it is one or two lines of code instead of 53.
> 
> Sean Cole


___
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: put after

2017-09-11 Thread Richard Gaskin via use-livecode

Bob Sneidar wrote:

> put tWord after word 2 of me
>
> Shouldn't that create a second word?

No.  It will append the string tWord after the chunk element specified 
in the target expression, "word 2 of me".


It may be clearer to consider lines:

  put "Something" after line 2 of tContainer

With that you wouldn't expect it to create a new line, but to add 
"Something" to the end of the specified line.


And so it is with other delimiters.

If you want to add a new chunk, you'll have to make that explicit:

  put tWord into word (the number of words of me + 1) of me

--
 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: Phone Number Validation Function

2017-09-11 Thread Stephen MacLean via use-livecode
Hi Bob,

Last year I released a sample library for base functions like this:

https://github.com/renegadesteve/rsIsValid 


You can use the LCS version, or build a widget library for your version of LC 9.

It does use RegEx, but you can Sean said, there are many ways to do what you 
are looking to do.

Since it seems that you are looking for consistency across you app, however you 
get there, it can be done in multiple ways. RegEx is a valid way to do.

As always, YMMV.

Best,

Steve MacLean

> On Sep 11, 2017, at 6:48 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> Thanks Sean, but reading through that article, I think it makes the arguement 
> for NOT using RegEx, seeing all the arguments back and forth about what is 
> wrong with each other's regex, and one guy pooh poohing all of them in favor 
> of a procedural approach. 
> 
> My goal is not to simply allow certain characters and numbers (I have a 
> function that does that already) of a given length, but to enforce data 
> consistency across my apps. That means that while certain numbers are 
> acceptably formatted phone numbers according to some international standard, 
> having +1 at the beginning for example, I don't necessarily want that. 
> Periods are valid delimiters, but I don't want that either. 
> 
> Now the google api looks promising, but if I have to tie it to a google 
> account and active internet connection, I will probably stick to rolling my 
> own. 
> 
> Bob S
> 
> 
>> On Sep 11, 2017, at 15:33 , Sean Cole (Pi) via use-livecode 
>>  wrote:
>> 
>> Read this:
>> https://stackoverflow.com/questions/123559/a-comprehensive-regex-for-phone-number-validation
>> 
>> You can then filter by these Regular Expressions (RegEx) really simply.
>> More importantly, it is one or two lines of code instead of 53.
>> 
>> Sean Cole
> 
> 
> ___
> 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: Android Audio Playback & Recording

2017-09-11 Thread Sannyasin Brahmanathaswami via use-livecode
Aloha Peter


I think we also want ot have the voice recognition option here so that we could 
record short notes, or issue commands 

Maybe that is OT for your use case, but  I have some users interest in this.  

BR

 

On 9/10/17, 11:06 AM, "use-livecode on behalf of Peter Reid via use-livecode" 
 wrote:

Hi,

I'm making an app for Android in the form of an Amazon Fire 7 tablet (2017 
version).  I'm doing the development with LC 9-dp8 and a Mac running macOS 
10.12.6.

A key part of this app requires the user to say a word or two, which will 
be recorded by the tablet and saved for subsequent comparison with a speech 
fragment played earlier.  What I'm looking for is the way to include the output 
of a word or short phrase, as spoken text; followed by speech input from the 
user, and then compared with the original speech recorded previously.

Andy suggestions please?

Thanks.

Peter
--
Peter Reid
Loughborough, UK

___
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


Using the property inspector

2017-09-11 Thread hh via use-livecode
It was not heard there, so I ask here:
http://forums.livecode.com/viewtopic.php?p=157993#p157993


___
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