Android build executable on test device fails

2018-01-12 Thread Nicolas Cueto via use-livecode
Testing on an Android device, the "Standalone builder progress" window
shows first "Building classes" and then for a brief moment "Building
executable", after which an error window reads "Unable to build app for
testing: could not open module file".

Searched the forums but no mention at all of this problem.

--
Nicolas Cueto
___
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: Identifying empty lines of text

2018-01-12 Thread hh via use-livecode

> hh wrote:
> You could try to use (respects UCI word boundaries):
> if the num of trueWords in myString is 0
> Works here in LC 7 and later.

Sorry: ICU - International Components for Unicode (not UCI).

>> I use “the number of words in myString = 0” to test whether
>> a line of text appears empty, since I want a line with only
>> space characters to be understood as empty.
>> But a line of text I pasted from elsewhere contained an
>> invisible character whose charToNum value is 202, and this
>> was counted as a word by my script.
>> Is there a better way to test for a line of text that has no
>> visible characters?
>> Many thanks.
>> 
>> David Epstein


___
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: Identifying empty lines of text

2018-01-12 Thread hh via use-livecode
You could try to use (respects UCI word boundaries):

if the num of trueWords in myString is 0

Works here in LC 7 and later.

> I use “the number of words in myString = 0” to test whether
> a line of text appears empty, since I want a line with only
> space characters to be understood as empty.
> But a line of text I pasted from elsewhere contained an
> invisible character whose charToNum value is 202, and this
> was counted as a word by my script.
> Is there a better way to test for a line of text that has no
> visible characters?
> Many thanks.
> 
> David Epstein


___
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: Identifying empty lines of text

2018-01-12 Thread Phil Davis via use-livecode

I wonder if the 202 value would disappear if you did this:

   put textDecode(the clipboarddata["text"], "utf8") into field 1

I don't know the answer, just putting it out there.

Phil Davis


On 1/12/18 4:48 PM, David Epstein via use-livecode wrote:

I use “the number of words in myString = 0” to test whether a line of text 
appears empty, since I want a line with only space characters to be understood 
as empty.
But a line of text I pasted from elsewhere contained an invisible character 
whose charToNum value is 202, and this was counted as a word by my script.
Is there a better way to test for a line of text that has no visible characters?
Many thanks.

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

Identifying empty lines of text

2018-01-12 Thread David Epstein via use-livecode
I use “the number of words in myString = 0” to test whether a line of text 
appears empty, since I want a line with only space characters to be understood 
as empty.
But a line of text I pasted from elsewhere contained an invisible character 
whose charToNum value is 202, and this was counted as a word by my script.
Is there a better way to test for a line of text that has no visible characters?
Many thanks.

David Epstein
___
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: Problem pasting from Livecode to Mac Mail

2018-01-12 Thread Brian Milby via use-livecode
That is precisely why we are having this conversation.  An assumption was
made that creating an HTML version of plain text was needed for the
clipboard.

On Fri, Jan 12, 2018 at 4:51 PM Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Non- starter. Can't make assumptions about the end user's intent. What if
> what he was copying was SUPPOSED to have double line breaks or carriage
> returns? The complaint would be that LC was taking liberties with user's
> data!
>
> Bob S
>
>
> > On Jan 12, 2018, at 09:42 , Brian Milby via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > If it was changed to use  for single line breaks and only assuming a
> > paragraph when there are 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
>
___
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: Problem pasting from Livecode to Mac Mail

2018-01-12 Thread Bob Sneidar via use-livecode
Non- starter. Can't make assumptions about the end user's intent. What if what 
he was copying was SUPPOSED to have double line breaks or carriage returns? The 
complaint would be that LC was taking liberties with user's data! 

Bob S


> On Jan 12, 2018, at 09:42 , Brian Milby via use-livecode 
>  wrote:
> 
> If it was changed to use  for single line breaks and only assuming a
> paragraph when there are 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: Getting datagrid content from other stack in Standalone

2018-01-12 Thread Bob Sneidar via use-livecode
The last one is possible. As far as substacks getting moved and breaking 
references, the Standalone Builder takes that into account I believe. Also, if 
the stack files are contained in the folder the SB creates for them, I 
*believe* that the engine will upon failing to find a stack reference, check 
that folder, otherwise the SB would have to change the references in the code 
wherever it found them, and that wouldn't account for stack paths stored as 
properties. I'm pretty sure the engine resolves those things on the fly. 

Bob S


> On Jan 12, 2018, at 08:54 , Mike Bonner via use-livecode 
>  wrote:
> 
> Oh, as to the OP, my first thought on why it wasn't working, is that the
> stack wasn't open (hence the need to address it's on disk location), but
> another thought occurred to me.  I'm wondering if the standalone auto
> inclusions can be affected by moving substacks into separate stackfiles
> Perhaps the datagrid support libraries aren't being included?


___
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: Getting datagrid content from other stack in Standalone

2018-01-12 Thread Bob Sneidar via use-livecode
If the script of an object is running, the stack it belongs to is open. If you 
reference an object in a closed stack (correct me if I am wrong) LC will load 
the stack the object belongs to into memory. 

Bob S


> On Jan 12, 2018, at 08:54 , Mike Bonner via use-livecode 
>  wrote:
> 
> Would this work with a stack on disk that hasn't been opened yet?


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


Re: LC Global schedule is online

2018-01-12 Thread Mark Wieder via use-livecode

On 01/11/2018 12:19 PM, Heather Laine via use-livecode wrote:

Well, indeed, Mr TBA is currently overworked. Would anyone like to step up and 
relieve him of the pressure?


I have attended several TBA sessions at various conferences over the 
years, and I can attest to the intriguing and often surprising content. 
I have rarely come away disappointed. Highly recommended.


--
 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: Problem pasting from Livecode to Mac Mail

2018-01-12 Thread Brian Milby via use-livecode
So there are 2 issues with how LiveCode is handling placing text onto the
clipboard:
- converting plain text to HTML on the clipboard
- using  tags for each line break when converting to HTML

I’m not sure of the reasoning behind the first issue. I understand wanting
to have the native LC format for rich text, but if placing plain text on
the clipboard, I think that the user wants plain text and not HTML.

The second issue may take some additional thought/discussion. Looking at
the code, it uses the  tag to wrap attributes, so eliminating it
globally isn’t an option. Magic happens here:

fieldhtml.cpp / export_html_emit_paragraphs
fieldh.cpp / MCField::doexport

If it was changed to use  for single line breaks and only assuming a
paragraph when there are 2, that would probably take care of it in most
cases. Paragraphs are split by /n here (internal LC styled text
representation):

fieldh.cpp / MCField::texttoparagraphs

Still digging...
On Fri, Jan 12, 2018 at 3:23 AM Peter Reid via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Sorry, forgot to change Subject in previous posting...
>
> Hi Richard
>
> I found this problem was particularly annoying when trying to extract info
> from vCards exported from Contacts on the Mac, so I developed a tiny app in
> LC called vCardClipper.
>
> I've put together a web page about this app together with download links
> to a Mac App and the source code.  Here's the link to this web page, help
> yourself:
>
> https://www.reid-it.co.uk/downloads/downvcclip.htm
>
> The key is to paste HTML format text into Mail replacing RETURN with
> "" and replacing spaces with "". The code is in the following
> handler (which is in the stack script):
>
> on loadClipboard pPlainText, pPasteMode
>-- pPasteMode: HTML or text
>set itemDelimiter to "."
>put item 1 of the version into tLCversion
>lock the clipboard
>if tLCversion >= "8" then
>   -- for LC 8.x or later:
>   set the fullClipboardData to empty
>   switch pPasteMode
>  case "HTML"
> put pPlainText into tHTMLtext
> replace return with "" in tHTMLtext
> replace space with "" in tHTMLtext
> set the fullClipboardData["HTML"] to "" & tHTMLtext & ""
> break
>  case "text"
> set the fullClipboardData["text"] to pPlainText
> break
>   end switch
>else
>   -- for LC 7.x or earlier:
>   switch pPasteMode
>  case "HTML"
> put pPlainText into tHTMLtext
> replace return with "" in tHTMLtext
> replace space with "" in tHTMLtext
> set the clipboardData["HTML"] to "" & tHTMLtext & ""
> break
>  case "text"
> set the clipboardData["text"] to pPlainText
> break
>   end switch
>end if
>unlock the clipboard
> end loadClipboard
>
>
> Peter
> --
> Peter Reid
> Loughborough, UK
>
> > On 10 Jan 2018, at 9:38am, use-livecode-requ...@lists.runrev.com wrote:
> >
> > Message: 5
> > Date: Tue, 9 Jan 2018 10:09:51 -0800
> > From: Richard Burkett 
> > To: use-livecode@lists.runrev.com
> > Subject: Problem pasting from Livecode to Mac Mail
> > Message-ID: 
> > Content-Type: text/plain; charset=utf-8
> >
> > Does anyone have a solution to this problem: I set the clipboard in
> LiveCode to the text of a field or variable that has returns after each
> line. When I paste that into Mac Mail, the text appears double-spaced as if
> it has two returns, but clearly there is just one (or a combination of CR
> and LF?). I?ve tried all the keys for setting the clipboard and also
> writing a script to delete line feeds, or CR characters, but nothing works.
> It?s either no returns, or what appears to be double-spaced returns.
> >
> > If I paste the text first into Text Edit, then copy it, and paste into
> Mac Mail it?s fine - single line spacing. What?s LiveCode adding to each
> line that causes Mac Mail to show the pasted text as double spaced? Is
> there a way to filter/remove that?
> >
> > Richard Burkett
> > richard.burk...@sbcglobal.net
>
>
>
> ___
> 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: Getting datagrid content from other stack in Standalone

2018-01-12 Thread Mike Bonner via use-livecode
Would this work with a stack on disk that hasn't been opened yet?

Definitely stealing your functions thx. :)

Oh, as to the OP, my first thought on why it wasn't working, is that the
stack wasn't open (hence the need to address it's on disk location), but
another thought occurred to me.  I'm wondering if the standalone auto
inclusions can be affected by moving substacks into separate stackfiles
 Perhaps the datagrid support libraries aren't being included?

On Fri, Jan 12, 2018 at 9:08 AM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Don't you mean:
>
> put the dgdata of grp 1 of CARD 1 OF stack "path/to/dgstack.livecode" into
> tDataA
>
> If you are going to be using full paths for this, I recommend using my
> fine functions getParentCard() and getParentStack().
>
> function getParentCard pObjectID
>put offset("card id", pObjectID) into tStartChar
>put char tStartChar to -1 of pObjectID into tCardID
>return tCardID
> end getParentCard
>
> function getParentStack pObjectID
> put offset("stack ", pObjectID) into tStartChar
> put char tStartChar to -1 of pObjectID into tParentStack
> return tParentStack
> end getParentStack
>
> As you can see they are very basic. Pass a long id of the calling object
> and it returns the long card ID or the long name of the parent stack. Now
> you can do this:
>
> put getParentCard(the long id of me) into tThisCard
> put the dgData of grp 1 of tThisCard into tDataA
>
> Bob S
>
>
> > On Jan 11, 2018, at 09:28 , Mike Bonner via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Have you tried something like this?  It works for me.  (though I just set
> > the folder to the stacks location and use only the filename of the stack)
> > put the dgdata of grp 1 of stack "path/to/dgstack.livecode" into tDataA
>
>
> ___
> 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: Using this list

2018-01-12 Thread Bob Sneidar via use-livecode
> On Jan 11, 2018, at 15:17 , Warren Samples via use-livecode 
>  wrote:
> 
>>  I get the list as an eMail in my inbox.  If I want to reply, you click 
>> “Reply”.  Then you have to change the name of the eMail, then copy and paste 
>> the text from the thread you want to reply to, then you have to spend some 
>> time reformatting the text.  There must be a better way.
> 
> 
> It sounds like you're receiving the digest version. That would cause all of 
> these difficulties.
> 
> I would suggest a better way is to just subscribe to receive individual 
> messages as they are posted and have your email client filter them to a 
> folder devoted to just this list's messages. 


You can do that???!?  ;-0

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: Getting datagrid content from other stack in Standalone

2018-01-12 Thread Bob Sneidar via use-livecode
Don't you mean:

put the dgdata of grp 1 of CARD 1 OF stack "path/to/dgstack.livecode" into 
tDataA

If you are going to be using full paths for this, I recommend using my fine 
functions getParentCard() and getParentStack(). 

function getParentCard pObjectID
   put offset("card id", pObjectID) into tStartChar
   put char tStartChar to -1 of pObjectID into tCardID
   return tCardID
end getParentCard

function getParentStack pObjectID
put offset("stack ", pObjectID) into tStartChar
put char tStartChar to -1 of pObjectID into tParentStack
return tParentStack
end getParentStack

As you can see they are very basic. Pass a long id of the calling object and it 
returns the long card ID or the long name of the parent stack. Now you can do 
this:

put getParentCard(the long id of me) into tThisCard
put the dgData of grp 1 of tThisCard into tDataA

Bob S


> On Jan 11, 2018, at 09:28 , Mike Bonner via use-livecode 
>  wrote:
> 
> Have you tried something like this?  It works for me.  (though I just set
> the folder to the stacks location and use only the filename of the stack)
> put the dgdata of grp 1 of stack "path/to/dgstack.livecode" into tDataA


___
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


Server-side xml validator anyone ?

2018-01-12 Thread jbv via use-livecode
Hi list,
I have several server-side LC scripts that transform text and data
uploaded by end users on web pages into xml to be stored in a database and
used later in other web pages or apps.
The problem is, despite all the correction scripts I have added, that
sometimes the uploaded content corrupts the xml structure. This happens
for instance when some weird UTF-8 text is uploaded.
Is there a ready-to-use piece of code that would check the conformity of
some xml data that I could include in my LC scripts ?

Thanks in advance,
jbv


___
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: Problem pasting from Livecode to Mac Mail

2018-01-12 Thread Peter Reid via use-livecode
Sorry, forgot to change Subject in previous posting...

Hi Richard

I found this problem was particularly annoying when trying to extract info from 
vCards exported from Contacts on the Mac, so I developed a tiny app in LC 
called vCardClipper.

I've put together a web page about this app together with download links to a 
Mac App and the source code.  Here's the link to this web page, help yourself:

https://www.reid-it.co.uk/downloads/downvcclip.htm

The key is to paste HTML format text into Mail replacing RETURN with "" and 
replacing spaces with "". The code is in the following handler (which is 
in the stack script):

on loadClipboard pPlainText, pPasteMode
   -- pPasteMode: HTML or text
   set itemDelimiter to "."
   put item 1 of the version into tLCversion
   lock the clipboard
   if tLCversion >= "8" then
  -- for LC 8.x or later:
  set the fullClipboardData to empty
  switch pPasteMode
 case "HTML"
put pPlainText into tHTMLtext
replace return with "" in tHTMLtext
replace space with "" in tHTMLtext
set the fullClipboardData["HTML"] to "" & tHTMLtext & ""
break
 case "text"
set the fullClipboardData["text"] to pPlainText
break
  end switch
   else
  -- for LC 7.x or earlier:
  switch pPasteMode
 case "HTML"
put pPlainText into tHTMLtext
replace return with "" in tHTMLtext
replace space with "" in tHTMLtext
set the clipboardData["HTML"] to "" & tHTMLtext & ""
break
 case "text"
set the clipboardData["text"] to pPlainText
break
  end switch
   end if
   unlock the clipboard
end loadClipboard


Peter
--
Peter Reid
Loughborough, UK

> On 10 Jan 2018, at 9:38am, use-livecode-requ...@lists.runrev.com wrote:
> 
> Message: 5
> Date: Tue, 9 Jan 2018 10:09:51 -0800
> From: Richard Burkett 
> To: use-livecode@lists.runrev.com
> Subject: Problem pasting from Livecode to Mac Mail
> Message-ID: 
> Content-Type: text/plain; charset=utf-8
> 
> Does anyone have a solution to this problem: I set the clipboard in LiveCode 
> to the text of a field or variable that has returns after each line. When I 
> paste that into Mac Mail, the text appears double-spaced as if it has two 
> returns, but clearly there is just one (or a combination of CR and LF?). I?ve 
> tried all the keys for setting the clipboard and also writing a script to 
> delete line feeds, or CR characters, but nothing works. It?s either no 
> returns, or what appears to be double-spaced returns. 
> 
> If I paste the text first into Text Edit, then copy it, and paste into Mac 
> Mail it?s fine - single line spacing. What?s LiveCode adding to each line 
> that causes Mac Mail to show the pasted text as double spaced? Is there a way 
> to filter/remove that?
> 
> Richard Burkett
> richard.burk...@sbcglobal.net



___
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