POST on mobile apps

2020-03-14 Thread J. Landman Gay via use-livecode

The dictionary entry for POST contains this about mobile apps:

"Cross-platform note: On iOS and Android, the post command is implemented in the engine. 
Therefore the Internet library is not needed to ensure the command works in a mobile standalone 
application. If included, the Internet library implementation will be used instead of the 
engine implementation. Note: The Android and iOS engines do not support 'libUrl' but do allow 
you to use post in the background."


This seems contradictory. The internet library is not required since POST is implemented in the 
engine. But if it's included, it will be used. But mobile doesn't support it.


I've included both the Internet library and TSNet in my mobile app, which needs POST and get 
URL. I see now that I can eliminate the Internet library. Do I still need TSNet for mobile "get 
URL"?


We're seeing crashes on iOS when the app sends data to a server. I wonder if there's a conflict 
having both these extensions included in the build.


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


Finding words with diacriticals

2020-03-14 Thread Peter Bogdanoff via use-livecode
Hi,

I have a text search that in which I’m trying to improve the UI.

I have this text:

Edgard Varèse (Poème électronique) was a pioneer in the application of tape 
recording technology to composition.

The search database, built with Scott McDonald’s rrpSearch plugin, can only be 
searched using the exact characters. So, I’m building a supplementary array of 
words with alternate spellings that the user might type in the search box. I 
would reference the array to get an equivalent word and so provide the user 
with a usable result.

So if the user types in “poeme” — I would find “poeme” in the array and its 
equivalent “Poème” and I would actually search for “Poème” — and the user would 
get a result that included “Poème”.


So I want to build this array of word equivalents. The search database is built 
by rrpSearch from text on cards, so I have to go back to these cards to get my 
data. I’m using the find command to search cards to find every instance of  “è” 
or “é” or “ü” or “î” or whatever. There are many non-English words in the text. 
The foundText function should give me the words that contain that 
character—except it doesn’t in every case. It only finds words that BEGIN with 
the search text. So

électronique — found (char begins the word)
Varèse — not found (char is in middle of the word)
Poème — not found (char is in middle of the word)

I’m using “find” and “the foundText” which returns the whole word that contains 
the search character. No other form of find will return the whole word. The 
dictionary for foundText:



Is there another relatively simple way to get the whole word in which the 
desired characters live? There are dozens of fields on thousands of cards to 
search.

(I realize that there are far better ways to handle a search, and in the 
future, I will have a database that I will design myself--but not yet.)

Thanks,

Peter Bogdanoff
ArtsInteractive





___
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: Where is André ? André says "goodbye"

2020-03-14 Thread Mark Wieder via use-livecode

On 3/14/20 6:29 AM, Paul Dupuis via use-livecode wrote:


You still just get Andr - the é is removed

I think revXMLText may convert all non-ASCII characters to HTML entities


I think urlEncode/urlDecode is your friend here (watch the wordwrap):

on mouseUp
   local idID

   put 
revXMLCreateTree("",false,true,false) 
into idID
   revXMLPutIntoNode idID, "/identity/name",  urlEncode(field 
"name_source") -- fld contains "André"
   put urlDecode(revXMLText(idID,,true)) into URL 
("file:"&specialFolderPath("desktop")&slash&"myFile.xml")

end mouseUp

--
 Mark Wieder
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: OAuth2 was Re: google sheets - anybody doing anything besides mergGoogle

2020-03-14 Thread R.H. via use-livecode
@Matthias: "i found a forum post from mimu which included also a
GoogleCalendarTest stack.  http://forums.livecode.com/viewtopic.php?t=31840";

Yes, correct. Thanks for the hint! This is the one I am using. The scripts
are very good and allow to expand the idea of connecting to Google
Services. It needs some work first understanding the scripts. The main one
is in the card, but well documented.

Again, I think it would be more than helpful for all LC users and the
visibility of LiveCode on the market if there is something  "out of the
box" to connect to all kinds of OAuth2 main services since integration
becomes a major subject. I am not sure I can do this (giving time
constraints, otherwise I would). We will see...

Roland
___
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: Where is André ? André says "goodbye"

2020-03-14 Thread Paul Dupuis via use-livecode



It s revXMLText (idID) that converts high ASCII characters to HTML 
entities, so I don't think file vs binfile will make much difference.


___
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: Where is André ? André says "goodbye"

2020-03-14 Thread Drs Mark Schonewille via use-livecode
It looks like url("file:...") still makes some conversion. I think we 
should still use binfile to avoid conversion and before we do so, we 
need to make sure we get the encoding right.


Mark Schonewille
Economy-x-Talk
https://ecxtalk.nl
https://www.nt2.nu

Programming LiveCode for the Real Beginner
http://www3.economy-x-talk.com/file.php?node=programming-livecode-for-the-real-beginner

Op 14-3-2020 om 14:29 schreef Paul Dupuis via use-livecode:

On 3/14/2020 3:58 AM, Matthias Rebbe via use-livecode wrote:
revXMLPutIntoNode idID, "/identity/name", textEncode (field  
"name_source" ,"UTF8") -- fld contains "André"


When I write the XML file:

put revXMLText (idID) into URL **myFile.xml**

… I don’t find André any longer, but André


First, é is HTML for é which is correct, just encoded as an HTML 
character value.


If you code it as (below) with the textEncode to UTF8 removed

on mouseUp
  put 
revXMLCreateTree("",false,true,false) 
into idID
  revXMLPutIntoNode idID, "/identity/name",  field  "name_source" -- 
fld contains "André"
  put revXMLText (idID) into URL 
("file:"&specialFolderPath("desktop")&slash&"myFile.xml")

end mouseUp

You just get Andr - the é is removed

on mouseUp
  put 
revXMLCreateTree("",false,true,false) 
into idID
  revXMLPutIntoNode idID, "/identity/name",  field  "name_source" -- 
fld contains "André"
  put textEncode(revXMLText (idID),"UTF-8") into URL 
("file:"&specialFolderPath("desktop")&slash&"myFile.xml")

end mouseUp

You still just get Andr - the é is removed

I think revXMLText may convert all non-ASCII characters to HTML entities

Some of the rev* libraries are not fully Unicode aware, for example, 
for revZIP, I filed this confirmed bug: 
https://quality.livecode.com/show_bug.cgi?id=22202


Either by design or as a bug, any accented characters (non-ASCII) you 
may have to deal with HTTML encodings for


And a search of the LiveCode Quality Center shows the exact bug you 
are running into is: https://quality.livecode.com/show_bug.cgi?id=18927


___
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: Where is André ? André says "goodbye"

2020-03-14 Thread Paul Dupuis via use-livecode

On 3/14/2020 3:58 AM, Matthias Rebbe via use-livecode wrote:

revXMLPutIntoNode idID, "/identity/name",  textEncode (field  "name_source" ,"UTF8") -- 
fld contains "André"

When I write the XML file:

put revXMLText (idID) into URL **myFile.xml**

… I don’t find André any longer, but André


First, é is HTML for é which is correct, just encoded as an HTML 
character value.


If you code it as (below) with the textEncode to UTF8 removed

on mouseUp
  put 
revXMLCreateTree("",false,true,false) 
into idID
  revXMLPutIntoNode idID, "/identity/name",  field  "name_source" -- 
fld contains "André"
  put revXMLText (idID) into URL 
("file:"&specialFolderPath("desktop")&slash&"myFile.xml")

end mouseUp

You just get Andr - the é is removed

on mouseUp
  put 
revXMLCreateTree("",false,true,false) 
into idID
  revXMLPutIntoNode idID, "/identity/name",  field  "name_source" -- 
fld contains "André"
  put textEncode(revXMLText (idID),"UTF-8") into URL 
("file:"&specialFolderPath("desktop")&slash&"myFile.xml")

end mouseUp

You still just get Andr - the é is removed

I think revXMLText may convert all non-ASCII characters to HTML entities

Some of the rev* libraries are not fully Unicode aware, for example, for 
revZIP, I filed this confirmed bug: 
https://quality.livecode.com/show_bug.cgi?id=22202


Either by design or as a bug, any accented characters (non-ASCII) you 
may have to deal with HTTML encodings for


And a search of the LiveCode Quality Center shows the exact bug you are 
running into is: https://quality.livecode.com/show_bug.cgi?id=18927


___
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: Where is André ? André says "goodbye"

2020-03-14 Thread Matthias Rebbe via use-livecode
To be honest, I didn‘t read your post after reading the topic. I really thought 
you were asking where Andre ( Garcia) is. (A longtime member of the LC 
community. )
Perhaps a more meaningful term would have led to more answers. 

Matthias 

Von meinem iPhone gesendet

> Am 14.03.2020 um 08:01 schrieb J. Landman Gay via use-livecode 
> :
> 
> Not at all, the most likely reason is that no one was sure of the answer. Or 
> maybe your post got lost in the fog. But re-reading your post, it looks like 
> you're doing the textEncode at the wrong time. Storing encoded text in LC can 
> give unexpected results, instead try putting the textEncode function directly 
> into the line that writes the file.
> 
> put textEncode(revXMLText (idID), "UTF8") into URL **myFile.xml**
> 
> The general rule is that encoding should happen when data leaves LC, and 
> should be decoded when data comes in. Data manipulated inside LC shouldn't be 
> changed.
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
>> On March 14, 2020 1:40:06 AM Charles Lachat via use-livecode 
>>  wrote:
>> 
>> I feel André is not welcomed as an outsider in this list.
>> 
>> Too bad.
>> 
>> CL, not enough philosophical, not enough Catalina
>> 
>> 
>> 
>> 
 Le 11 mars 2020 à 23:48, Charles Lachat via use-livecode 
  a écrit :
>>> 
>>> Hi,
>>> 
>>> Let’s say I build an XML tree in LiveCode; part of it is:
>>> 
>>> revXMLPutIntoNode idID, "/identity/name",  textEncode (field  "name_source" 
>>> ,"UTF8") -- fld contains "André"
>>> 
>>> When I write the XML file:
>>> 
>>> put revXMLText (idID) into URL **myFile.xml**
>>> 
>>> … I don’t find André any longer, but André
>>> 
>>> How can I fix this using LiveCode tools ?
>>> (I mean without using i.e. *replace oldString with newString in container* 
>>> for each accented character)
>>> 
>>> Thanks.
>>> 
>>> CL
>>> ===
>>> full example at:
>>> https://forums.livecode.com/viewtopic.php?f=7&t=33761
>>> 
>>> 
>>> 
>>> ___
>>> 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: Where is André ? André says "goodbye"

2020-03-14 Thread J. Landman Gay via use-livecode
Not at all, the most likely reason is that no one was sure of the answer. 
Or maybe your post got lost in the fog. But re-reading your post, it looks 
like you're doing the textEncode at the wrong time. Storing encoded text in 
LC can give unexpected results, instead try putting the textEncode function 
directly into the line that writes the file.


put textEncode(revXMLText (idID), "UTF8") into URL **myFile.xml**

The general rule is that encoding should happen when data leaves LC, and 
should be decoded when data comes in. Data manipulated inside LC shouldn't 
be changed.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On March 14, 2020 1:40:06 AM Charles Lachat via use-livecode 
 wrote:



I feel André is not welcomed as an outsider in this list.

Too bad.

CL, not enough philosophical, not enough Catalina




Le 11 mars 2020 à 23:48, Charles Lachat via use-livecode 
 a écrit :


Hi,

Let’s say I build an XML tree in LiveCode; part of it is:

revXMLPutIntoNode idID, "/identity/name",  textEncode (field  "name_source" 
,"UTF8") -- fld contains "André"


When I write the XML file:

put revXMLText (idID) into URL **myFile.xml**

… I don’t find André any longer, but André

How can I fix this using LiveCode tools ?
(I mean without using i.e. *replace oldString with newString in container* 
for each accented character)


Thanks.

CL
===
full example at:
https://forums.livecode.com/viewtopic.php?f=7&t=33761



___
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