Re: regex backreferences

2021-12-14 Thread J. Landman Gay via use-livecode
I wish it did, but replaceText doesn't support back references. The 
parameters at the end are treated as literals, whether as actual quoted 
literals or variables containing a value.


If there isn't a feature request for it, there should be.
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On December 14, 2021 6:03:12 PM Devin Asay via use-livecode 
 wrote:



Hi all,

Does the replaceText() function allow the use of backreferences to retain 
groupings of text between matches. For example, if I have some text like this:


Good stuff here.

I want to end up something like this:

Good stuff here.”

In BBedit I can search for (.*) and 
replace it with \1 and it preserves the run of text designated by 
parentheses.
(I know, I can get more fancy on matching the runs of html tags, but I’m 
mainly interested in retaining the text, not in regex madness.)


In LC this does not work:

  put replaceText(myText,"  style=“cruft”>(.*)”,”\1”) into myText


I just end up with \1, when I want Good stuff here.

Can replaceText even do this?

- Devin


Devin Asay
Office of Digital Humanities
Brigham Young University

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

http://lists.runrev.com/mailman/listinfo/use-livecode





___
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


regex backreferences

2021-12-14 Thread Devin Asay via use-livecode
Hi all,

Does the replaceText() function allow the use of backreferences to retain 
groupings of text between matches. For example, if I have some text like this:

Good stuff here.

I want to end up something like this:

Good stuff here.”

In BBedit I can search for (.*) and replace 
it with \1 and it preserves the run of text designated by parentheses.
(I know, I can get more fancy on matching the runs of html tags, but I’m mainly 
interested in retaining the text, not in regex madness.)

In LC this does not work:

   put replaceText(myText,"(.*)”,”\1”) into myText

I just end up with \1, when I want Good stuff here.

Can replaceText even do this?

- Devin


Devin Asay
Office of Digital Humanities
Brigham Young University

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


Re: [ANN] Release 10.0.0 DP-1

2021-12-14 Thread matthias rebbe via use-livecode
Mark,

i've just filed bug #23485
https://quality.livecode.com/show_bug.cgi?id=23485 


I noticed that as soon as the keyword URL is in a script, even if the line is a 
comment, the remote access, for example to set the filename of an image to a 
remote url as Kevin showed in the Webcamp presentation, does not work anymore.

Regards,

Matthias



> Am 14.12.2021 um 15:59 schrieb Mark Waddingham via use-livecode 
> :
> 
> On 2021-12-14 13:50, Rolf Kocherhans via use-livecode wrote:
>> First of all thanks for the WebAssembly HTML5 implementation. This is
>> really great stuff !
>> For instance all my URL stuff (loading a stack on same domain) is
>> unfortunately not working anymore.
>> Also, all the PHP scripts which I used to access, which downloaded
>> stuff from other domains and then displayed
>> the result in the Browser don't work anymore.
>> Is this just me - or is it just not implemented yet ?
> 
> I don't think it is only you - at least one other person has mentioned on the 
> forums that their URL operations are not working either.
> 
> What url operations are you using?
> 
> The reason I ask is because the engine only has built-in support for `load 
> url` currently - the other syntax is implemented by a libURL 'driver' and I 
> have a suspicion that the latter may be currently broken.
> 
> Warmest Regards,
> 
> Mark.
> 
> P.S. And yes, this is high on the list to investigate in more depth and fix!
> 
> -- 
> Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
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: [ANN] Release 10.0.0 DP-1

2021-12-14 Thread Andre Garzia via use-livecode
Double check if this is not CORS related. It is very easy to have a request
fail because of wrong CORS headers.

On Tue, 14 Dec 2021 at 15:00, Mark Waddingham via use-livecode <
use-livecode@lists.runrev.com> wrote:

> On 2021-12-14 13:50, Rolf Kocherhans via use-livecode wrote:
> > First of all thanks for the WebAssembly HTML5 implementation. This is
> > really great stuff !
> >
> > For instance all my URL stuff (loading a stack on same domain) is
> > unfortunately not working anymore.
> >
> > Also, all the PHP scripts which I used to access, which downloaded
> > stuff from other domains and then displayed
> > the result in the Browser don't work anymore.
> >
> >
> > Is this just me - or is it just not implemented yet ?
>
> I don't think it is only you - at least one other person has mentioned
> on the forums that their URL operations are not working either.
>
> What url operations are you using?
>
> The reason I ask is because the engine only has built-in support for
> `load url` currently - the other syntax is implemented by a libURL
> 'driver' and I have a suspicion that the latter may be currently broken.
>
> Warmest Regards,
>
> Mark.
>
> P.S. And yes, this is high on the list to investigate in more depth and
> fix!
>
> --
> Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
https://www.andregarzia.com 
Want to support me? Buy me a coffee at https://ko-fi.com/andregarzia
___
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: How to extract whole text from a PDF file with the PDF

2021-12-14 Thread Paul McClernan via use-livecode
Ah, OK thanks for the clarification. I hadn’t realize PDFium has been
around as long as it has been.
I wouldn’t sweat the naming conflict, there’s at least three “PDFKit”
libraries so you’re not alone.

On Tue, Dec 14, 2021 at 11:01 AM Paul Dupuis via use-livecode <
use-livecode@lists.runrev.com> wrote:

> On 12/14/2021 10:33 AM, Paul McClernan via use-livecode wrote:
> > I was fairly certain that XPDF external was/is based on this XPDF:
> > https://en.m.wikipedia.org/wiki/Xpdf
> > Which has both GPL and Proprietary Licensing options available.
>
> Nope. My company (Researchware) and I paid for the development of the
> XPDF External shipped with LiveCode. Monte did the code for us when he
> was an independent LiveCode developer, paid directly by Researchware. It
> is based on the C++ "external" API template, calling the Google PDFium
> library. Researchware then transferred the license to LiveCode when
> Monte went to work for them. I called it XPDF because it was an eXternal
> for PDFs. I was unaware (at the time) for anything else using the XPDF
> name. And yes, I am to blame (or credit) for the majority of the syntax
> for messages, commands, and functions of the XPDF external (with Monte
> correcting me when I had a really stupid syntax specified)
>
> >
> > The newer (> 9.6.3) PDF Widget is based on PDFium which is an offshoot
> > project that spawned from Google’s Chromium project. I’m not sure about
> the
> > licensing involved with that.
> >
> > If you’re running macOS I released a (semi-complete) library that uses
> > Apple PDFKit (not to be confused with several other PDFKits that are out
> > there, such as this JS PDFKit: https://pdfkit.org ). That can extract
> text
> > from PDF, per-document or per-page.
> >
> > At some point I may update that library, adding the ability to extract
> RTF
> > styled text and also make iso it can use UIView, which would make
> available
> > on iOS devices too, but I’m really busy right now so that’s not likely to
> > get attention from me anytime soon.
> >
> >
> > On Mon, Dec 13, 2021 at 12:47 PM Richard Gaskin via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> >
> >> Richmond wrote:
> >>
> >>   > On 12.12.21 21:33, Richard Gaskin wrote:
> >>   >> Stam Kapetanakis wrote:
> >>   >> > i presume the pdf widget in pro is the opensource xpdfReader but
> >>   >> > don’t know for sure.
> >>   >>
> >>   >> If it is that would be problematic, as the open source edition of
> >>   >> xpdfReader is licensed under GPL, and LC no longer has an edition
> >>   >> compatible with GPL.
> >>   >
> >>   > The consequences are endless.
> >>
> >> Note my "if".
> >>
> >> In the next message in this thread Paul clarified that the component is
> >> not derived from a GPL-governed work, so the rights and responsibilities
> >> of the GPL do not apply here:
> >>
> http://lists.runrev.com/pipermail/use-livecode/2021-December/266435.html
> >>
> >> --
> >>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
> >>
> > ___
> > 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: How to extract whole text from a PDF file with the PDF

2021-12-14 Thread Paul Dupuis via use-livecode

On 12/14/2021 10:33 AM, Paul McClernan via use-livecode wrote:

I was fairly certain that XPDF external was/is based on this XPDF:
https://en.m.wikipedia.org/wiki/Xpdf
Which has both GPL and Proprietary Licensing options available.


Nope. My company (Researchware) and I paid for the development of the 
XPDF External shipped with LiveCode. Monte did the code for us when he 
was an independent LiveCode developer, paid directly by Researchware. It 
is based on the C++ "external" API template, calling the Google PDFium 
library. Researchware then transferred the license to LiveCode when 
Monte went to work for them. I called it XPDF because it was an eXternal 
for PDFs. I was unaware (at the time) for anything else using the XPDF 
name. And yes, I am to blame (or credit) for the majority of the syntax 
for messages, commands, and functions of the XPDF external (with Monte 
correcting me when I had a really stupid syntax specified)




The newer (> 9.6.3) PDF Widget is based on PDFium which is an offshoot
project that spawned from Google’s Chromium project. I’m not sure about the
licensing involved with that.

If you’re running macOS I released a (semi-complete) library that uses
Apple PDFKit (not to be confused with several other PDFKits that are out
there, such as this JS PDFKit: https://pdfkit.org ). That can extract text
from PDF, per-document or per-page.

At some point I may update that library, adding the ability to extract RTF
styled text and also make iso it can use UIView, which would make available
on iOS devices too, but I’m really busy right now so that’s not likely to
get attention from me anytime soon.


On Mon, Dec 13, 2021 at 12:47 PM Richard Gaskin via use-livecode <
use-livecode@lists.runrev.com> wrote:


Richmond wrote:

  > On 12.12.21 21:33, Richard Gaskin wrote:
  >> Stam Kapetanakis wrote:
  >> > i presume the pdf widget in pro is the opensource xpdfReader but
  >> > don’t know for sure.
  >>
  >> If it is that would be problematic, as the open source edition of
  >> xpdfReader is licensed under GPL, and LC no longer has an edition
  >> compatible with GPL.
  >
  > The consequences are endless.

Note my "if".

In the next message in this thread Paul clarified that the component is
not derived from a GPL-governed work, so the rights and responsibilities
of the GPL do not apply here:
http://lists.runrev.com/pipermail/use-livecode/2021-December/266435.html

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


___
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: How to extract whole text from a PDF file with the PDF

2021-12-14 Thread Paul McClernan via use-livecode
I was fairly certain that XPDF external was/is based on this XPDF:
https://en.m.wikipedia.org/wiki/Xpdf
Which has both GPL and Proprietary Licensing options available.

The newer (> 9.6.3) PDF Widget is based on PDFium which is an offshoot
project that spawned from Google’s Chromium project. I’m not sure about the
licensing involved with that.

If you’re running macOS I released a (semi-complete) library that uses
Apple PDFKit (not to be confused with several other PDFKits that are out
there, such as this JS PDFKit: https://pdfkit.org ). That can extract text
from PDF, per-document or per-page.

At some point I may update that library, adding the ability to extract RTF
styled text and also make iso it can use UIView, which would make available
on iOS devices too, but I’m really busy right now so that’s not likely to
get attention from me anytime soon.


On Mon, Dec 13, 2021 at 12:47 PM Richard Gaskin via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Richmond wrote:
>
>  > On 12.12.21 21:33, Richard Gaskin wrote:
>  >> Stam Kapetanakis wrote:
>  >> > i presume the pdf widget in pro is the opensource xpdfReader but
>  >> > don’t know for sure.
>  >>
>  >> If it is that would be problematic, as the open source edition of
>  >> xpdfReader is licensed under GPL, and LC no longer has an edition
>  >> compatible with GPL.
>  >
>  > The consequences are endless.
>
> Note my "if".
>
> In the next message in this thread Paul clarified that the component is
> not derived from a GPL-governed work, so the rights and responsibilities
> of the GPL do not apply here:
> http://lists.runrev.com/pipermail/use-livecode/2021-December/266435.html
>
> --
>   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
>
___
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: [ANN] Release 10.0.0 DP-1

2021-12-14 Thread Mark Waddingham via use-livecode

On 2021-12-14 13:50, Rolf Kocherhans via use-livecode wrote:

First of all thanks for the WebAssembly HTML5 implementation. This is
really great stuff !

For instance all my URL stuff (loading a stack on same domain) is
unfortunately not working anymore.

Also, all the PHP scripts which I used to access, which downloaded
stuff from other domains and then displayed
the result in the Browser don't work anymore.


Is this just me - or is it just not implemented yet ?


I don't think it is only you - at least one other person has mentioned 
on the forums that their URL operations are not working either.


What url operations are you using?

The reason I ask is because the engine only has built-in support for 
`load url` currently - the other syntax is implemented by a libURL 
'driver' and I have a suspicion that the latter may be currently broken.


Warmest Regards,

Mark.

P.S. And yes, this is high on the list to investigate in more depth and 
fix!


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

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


Re: [ANN] Release 10.0.0 DP-1

2021-12-14 Thread Rolf Kocherhans via use-livecode
First of all thanks for the WebAssembly HTML5 implementation. This is really 
great stuff !

I already played with it a lot and found that some things work better others 
don't.

For instance all my URL stuff (loading a stack on same domain) is unfortunately 
not working anymore.

Also, all the PHP scripts which I used to access, which downloaded stuff from 
other domains and then displayed
the result in the Browser don't work anymore.


Is this just me - or is it just not implemented yet ?

And if it is not only me, is this something high on the list ?


___
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: IOS 15.0

2021-12-14 Thread Mark Smith via use-livecode
Correct, in this case I think it’s complaining I don’t have the correct SDK in 
the build. The LC docs (including release notes for 9.6.5) only go up to 14.5 
so rather than experiment I was hoping someone already had a tried and true 
formula for working with 15.0. I'm afraid this is entirely my own fault. It’s a 
newish iPhone and I forgot to turn off auto-update.

Mark



> On Dec 13, 2021, at 10:13 PM, J. Landman Gay via use-livecode 
>  wrote:
> 
> On 12/13/21 4:09 PM, J. Landman Gay via use-livecode wrote:
>> On 12/13/21 12:57 PM, Mark Smith via use-livecode wrote:
>>> Thanks  Mike. What macOS and Xcode have you been using? Apple upgraded my 
>>> iOS to 15.0 and now all my builds have stopped working… (“developer of this 
>>> app needs to upgrade it to work with this version of iOS).
>> Have you notarized and stapled the app? I thought that's what the error 
>> means.
> 
> Oops, notarization only applies to apps you are distributing outside the Mac 
> App store. So, since you're doing iOS it doesn't apply.
> 
> -- 
> 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


___
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: How to paste into a form element in the browser widget

2021-12-14 Thread Tore Nilsen via use-livecode
Ah, I see! Wel,l back to redesigning the whole application to include the menus 
then. Thanks!

Best Regards
Tore

> 14. des. 2021 kl. 13:04 skrev Mark Waddingham via use-livecode 
> :
> 
> On 2021-12-14 11:41, Tore Nilsen via use-livecode wrote:
>> I have a problem pasting into a form element on a web page in the
>> browser widget. This works well in the IDE, but not in a standalone
>> application. The application has no menus, but I have included a
>> pasteKey script to handle paste shortcuts. This does not seem to do
>> the trick in the browser widget. I have tried to put the script in the
>> stack script, the card script and even in the widget itself, although
>> I wouldn’t expect the latter to work. Are there anyone who has run
>> across this problem before and may offer a solution?
> 
> I think you'll need to include an Edit menu with the normal shortcuts 
> (Cut/Copy/Paste) - make sure the tag of the items is correct as the engine 
> uses those to map them to the internal (Cocoa) references. e.g.
> 
>  (Cu /X|cut
>  ( /C|copy
>  ( /V|paste
> 
> Cocoa-based controls (which the browser widget uses the WebView variant of) 
> don't respond to shortcuts directly, but only via menu item accelerators - so 
> the browser widget needs the menu items present for such shortcuts to work.
> 
> Warmest Regards,
> 
> Mark.
> 
> -- 
> Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
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: How to paste into a form element in the browser widget

2021-12-14 Thread Mark Waddingham via use-livecode

On 2021-12-14 11:41, Tore Nilsen via use-livecode wrote:

I have a problem pasting into a form element on a web page in the
browser widget. This works well in the IDE, but not in a standalone
application. The application has no menus, but I have included a
pasteKey script to handle paste shortcuts. This does not seem to do
the trick in the browser widget. I have tried to put the script in the
stack script, the card script and even in the widget itself, although
I wouldn’t expect the latter to work. Are there anyone who has run
across this problem before and may offer a solution?


I think you'll need to include an Edit menu with the normal shortcuts 
(Cut/Copy/Paste) - make sure the tag of the items is correct as the 
engine uses those to map them to the internal (Cocoa) references. e.g.


  (Cu /X|cut
  ( /C|copy
  ( /V|paste

Cocoa-based controls (which the browser widget uses the WebView variant 
of) don't respond to shortcuts directly, but only via menu item 
accelerators - so the browser widget needs the menu items present for 
such shortcuts to work.


Warmest Regards,

Mark.

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

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


How to paste into a form element in the browser widget

2021-12-14 Thread Tore Nilsen via use-livecode
I have a problem pasting into a form element on a web page in the browser 
widget. This works well in the IDE, but not in a standalone application. The 
application has no menus, but I have included a pasteKey script to handle paste 
shortcuts. This does not seem to do the trick in the browser widget. I have 
tried to put the script in the stack script, the card script and even in the 
widget itself, although I wouldn’t expect the latter to work. Are there anyone 
who has run across this problem before and may offer a solution?

Best regards
Tore Nilsen
___
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