Re: Help Wrapping HTMLTidy in LCB

2019-11-22 Thread Trevor DeVore via use-livecode
On Fri, Nov 22, 2019 at 5:31 PM Richard Gaskin via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Trevor DeVore wrote:
>
>  > HTML may be placed on the clipboard when copying text and images
>  > from web browsers or by our good friend Microsoft Word. Microsoft
>  > Word places some very "interesting" HTML on the clipboard that
>  > needs to be massaged quite a bit before running it through revXML.
>
> Are you suggesting Microsoft has trouble reading open and
> well-documented standards?  Why, I never! ;)


It’s not them, it’s me. Clearly I’m expecting too much.

- -
Trevor DeVore
ScreenSteps

>
___
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: WebP-Tool v103

2019-11-22 Thread Sannyasin Brahmanathaswami via use-livecode
We really appreciate you staying on the "bleeding" edge ahead of us, Herman!
 Tried the stack, works amazing well.  A 1.2MB img →129K (at 1024 px wide) Look 
fabulous in Google Chrome!

" so you can use webp images in your stacks…" 
that is using the  pngOUT images in our stacks? Right?

Disclaimer: probably not doable: I guess to use on Mobile app we need to 
include binary code in our package and they unpack the WebP image before show 
them as PNG. Obviously would be get the user in trouble by unpacking too many 
large PNG (app could take up enormous space on the phone).. 
 
Brahmanathaswami

Sorry, the download links had a wrong path. Here are correct ones.

[Download] Currently I cannot upload to "SampleStacks/livecodeshare".
So please use from the message box
(EU) go stack url ("http://hyperhh.de/xstacks/webP-Tool_v103.livecode;)
(US) go stack url ("http://hh.on-rev.com/xstacks/webP-Tool_v103.livecode;)
or download
(EU) http://hyperhh.de/xstacks/webP-Tool_v103.livecode.zip
(US) http://hh.on-rev.com/xstacks/webP-Tool_v103.livecode.zip

When using go stack url, as a first action please SAVE the stack, we need
the stack path for writing out helpers and creating folders for conversion.

___
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: Help Wrapping HTMLTidy in LCB

2019-11-22 Thread Richard Gaskin via use-livecode

Trevor DeVore wrote:

> HTML may be placed on the clipboard when copying text and images
> from web browsers or by our good friend Microsoft Word. Microsoft
> Word places some very "interesting" HTML on the clipboard that
> needs to be massaged quite a bit before running it through revXML.

Are you suggesting Microsoft has trouble reading open and 
well-documented standards?  Why, I never! ;)


--
 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: Help Wrapping HTMLTidy in LCB

2019-11-22 Thread Trevor DeVore via use-livecode
On Fri, Nov 22, 2019 at 2:25 PM Richard Gaskin via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Trevor DeVore wrote:
>
>  > While looking at solutions for converting HTML into XHTML that can be
>  > parsed by revXML I decided to test HTMLTidy which has an option to
>  > output the input as XHTML. While I could bundle up the tidy command
>  > line tool and include it with my app, I prefer to wrap things up in
>  > LCB if possible.
>
> Is conversion to XHTML the way to go?
>
> I've tried using the XML external to parse even RSS files -- ostensibly
> pure XML -- only to find it choke on some of them.  I've gone back to
> hand-crafted pull-parsers.
>

There are definitely other ways to approach the problem I'm trying to
solve. In fact, in other areas of my app I will extract parts of HTML by
without relying on revXML.

In this particular case I already have some LC code that parses HTML placed
on the clipboard and converts it into data structure used by the
application. This was originally implemented using the revXML callback
feature (no tree is created in memory) and that API has worked well for the
conversions I need to make. HTML may be placed on the clipboard when
copying text and images from web browsers or by our good friend Microsoft
Word. Microsoft Word places some very "interesting" HTML on the clipboard
that needs to be massaged quite a bit before running it through revXML.
There is a speed hit that occurs when running some of the regex patterns on
the Word HTML that are used to strip out some markup and do things such as
add quotes around attributes.

Given the code that I have in place already, I would prefer to leverage
HTMLTidy rather than fix every potential "gotcha" or spend time trying to
optimize the code. I'm betting that HTMLTidy can do it better and faster
given how mature it is.

-- 
Trevor DeVore
ScreenSteps
www.screensteps.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: Help Wrapping HTMLTidy in LCB

2019-11-22 Thread Richard Gaskin via use-livecode

Trevor DeVore wrote:

> While looking at solutions for converting HTML into XHTML that can be
> parsed by revXML I decided to test HTMLTidy which has an option to
> output the input as XHTML. While I could bundle up the tidy command
> line tool and include it with my app, I prefer to wrap things up in
> LCB if possible.

Is conversion to XHTML the way to go?

I've tried using the XML external to parse even RSS files -- ostensibly 
pure XML -- only to find it choke on some of them.  I've gone back to 
hand-crafted pull-parsers.


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


Help Wrapping HTMLTidy in LCB

2019-11-22 Thread Trevor DeVore via use-livecode
Hello,

While looking at solutions for converting HTML into XHTML that can be
parsed by revXML I decided to test HTMLTidy which has an option to output
the input as XHTML. While I could bundle up the tidy command line tool and
include it with my app, I prefer to wrap things up in LCB if possible.

Unfortunately I haven't gotten very far with HTMLTidy and I'm
hoping someone else might be able to figure out what I'm doing wrong. If
you are up for loading up an LCB project in LC 9 on macOS and looking at
some C files then please read on:

RESOURCES

- Github repo with LCB file, a test stack, and compiled HTMLTidy dylib for
testing on macOS: https://github.com/trevordevore/lc-htmltidy
- HTMLTidy github repo where source files are located:
https://github.com/htacg/tidy-html5

WHAT WORKS

In the htmltidy.lcb file I've wrapped some of the simple APIs that return
strings: tidyReleaseDate(), tidyLibraryVersion(), and tidyPlatform(). Those
all work.

WHAT DOESN'T WORK?

tidyHTMLToXHTML() in the htmltidy.lcb file has some test code in it that
isn't working. As a test I want to call `tidyOptGetIdForName()` from the
htmltidy C library and get a valid value returned. I expect the following
code to log `0` but it is logging `104`. I don't think I am creating
the Ctmbstr pointer properly but I don't really know. Here is code from the
htmltidy.lcb file along with links to the ctmbstr definition in the
HTMLTidy source code:

```
variable tCStr as Pointer

-- Attempting to create a Ctmbstr from a LiveCode string
-- ctmbstr:
https://github.com/htacg/tidy-html5/blob/next/include/tidyplatform.h#L607
MCStringConvertToCString("TidyUnknownOption", tCStr)
-- The next handler is logging `104` which is N_TIDY_OPTIONS (error)
-- Appears that tCStr is not the right format.
log c_tidyOptGetIdForName(tCStr)
```

MCStringConvertToCString is defined as follows in the htmltidy.lcb file:

```
foreign handler MCStringConvertToCString(in pString as String, out rCString
as Pointer) returns CBool binds to ""
```

If anyone can provide some pointers or a PR I would really appreciate it.

-- 
Trevor DeVore
ScreenSteps
www.screensteps.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: remove DEFAULTMENUBAR?

2019-11-22 Thread Klaus major-k via use-livecode
Hi Craig,

> Am 22.11.2019 um 14:54 schrieb dunbarx--- via use-livecode 
> :
> 
> Hi Klaus. 
> 
> I never have worked at all with this group, and was surprised that it was a 
> LC stack in the first place. 

no, a menubar is a group of buttons, not a stack.
It CAN be a stack however, but not if you want an Apple macOS menubar.

> So I do not know why one cannot set it to empty, except maybe that something 
> inside LC prevents that. 

Anyway, thank you for your moral support! :-)

I had to force-quit LC, after saving everything via the message box, then I 
switched to:
...
set the defaultmenubar of this stack to "my menu group here"
...
Then I can:
...
set the defaultmenubar of this stack to EMPTY
...

> On a completely tangential note, my defaultMenubar contains ten buttons, the 
> first one being button "File", and the last one (after button "help") being 
> button "divider". No idea where that button is, or what it does. 

It divides, right? 8-)

> Craig

Best

Klaus

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


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


Re: remove DEFAULTMENUBAR?

2019-11-22 Thread dunbarx--- via use-livecode
Hi Klaus. 

I never have worked at all with this group, and was surprised that it was a LC 
stack in the first place. 

So I do not know why one cannot set it to empty, except maybe that something 
inside LC prevents that. 

On a completely tangential note, my defaultMenubar contains ten buttons, the 
first one being button "File", and the last one (after button "help") being 
button "divider". No idea where that button is, or what it does. 

Craig


-Original Message-
From: Klaus major-k via use-livecode 
To: LiveCode Runrev.Com 
Cc: Klaus major-k 
Sent: Fri, Nov 22, 2019 8:34 am
Subject: remove DEFAULTMENUBAR?

Hi friends,

we can:
...
set the defaultmenubar to "name of any group"
...

But when I try to remove the menubar again with 
...
set the defaultmenubar to EMPTY
...
I get an error: Cannot find group (or something)

However I can set the defaultmenubar of a specific stack to EMPTY!?
...
set the defaultmenubar of this stack to EMPTY
...

So how can we remove a defaultmenubar NOT tied to a stack?
What am I missing?


Best

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


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


remove DEFAULTMENUBAR?

2019-11-22 Thread Klaus major-k via use-livecode
Hi friends,

we can:
...
set the defaultmenubar to "name of any group"
...

But when I try to remove the menubar again with 
...
set the defaultmenubar to EMPTY
...
I get an error: Cannot find group (or something)

However I can set the defaultmenubar of a specific stack to EMPTY!?
...
set the defaultmenubar of this stack to EMPTY
...

So how can we remove a defaultmenubar NOT tied to a stack?
What am I missing?


Best

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


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


Re: New app update: four errors in plist

2019-11-22 Thread William de Smet via use-livecode
Hi there,

Another app update with the same errors.
And another 'ITMS-90683: Missing Purpose String in Info.plist'
This time 'NSBluetoothAlwaysUsageDescription' (and the app doesn't use
Bluetooth).

Did several updates this week and only one got this error back.
But within a day approved.
So from now on I wait for the review before uploading a new binary.


greetings,

William




Op vr 15 nov. 2019 om 20:56 schreef Sannyasin Brahmanathaswami via
use-livecode :

> FYI, you click "Beta Test" in standalone settings and you will get the
> "beta entitlement", properly installed , which is required if you want to
> use Test Flight.
>
>
>
>
>
> In standalone settings I see three options: Required, Prohibited, n/a.
> Do you mean the plist always contains a location option even if "n/a" is
> selected? That doesn't seem right.
>
> On 11/15/19 4:47 AM, William de Smet via use-livecode wrote:
> Hi Jacqueline,
> One of the two options is always selected.
> You can't select none.
> The 'problem' is that there is one required key missing now so you have to
> add it yourself bij editing the plist.
> After editing the plist the app update was approved within 6 hours #quick
> greetings,
> William
> Op vr 15 nov. 2019 om 02:07 schreef J. Landman Gay via use-livecode <
> mailto:use-livecode@lists.runrev.com>:
> Is the location key included in the plist if you don't select location
> services in standalone settings? (I haven't built for iOS in a long time.)
>
> --
> Jacqueline Landman Gay | mailto:jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> On November 14, 2019 3:05:17 PM Ralph DiMola via use-livecode
>  wrote:
>
> ITMS-90339: from iOS 12(or 13?) an app automatically does NOT exit on
> suspend. You need this key for legacy OS versions. You will not be
> rejected
> for this(yet).
> ITMS-90078: will also not get you rejected. This is caused by some
> library
> binding issue that Mark explained a while back.
> ITMS-90191: Also a warning. This is for Beta testing. You can enable the
> beta entitlement when generating a provisioning profile.
> ITMS-90683: This is the one that will get you rejected. For example if
> you
> use location services you will have to hack the IDE to change the text of
> the location request text. This can be a pain because you have to do it
> every time the IDE is started. What I do:
> 1) In the message box ==> "put the script of "revSaveAsIosStandalone"
> into
> url ("/somePath/someFilename")
> 2) Edit the text file(See QCC 22150)
>
> After that every time you want to submit to the app store do this in the
> message box ==> set the script of "revSaveAsIosStandalone" to url
> ("/somePath/someFilename")
>
> Ralph DiMola
> IT Director
> Evergreen Information Services
> mailto:rdim...@evergreeninfo.net
>
> -Original Message-
> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On
> Behalf
> Of William de Smet via use-livecode
> Sent: Thursday, November 14, 2019 2:00 PM
> To: How to use LiveCode
> Cc: William de Smet
> Subject: New app update: four errors in plist
>
> Hi there,
>
> Today I uploaded an update for one of my apps to the App Store.
> Now I have four errors coming back from Apple.
> Still need to edit the info.plist but it'd easy to make a mistake with
> this.
> When will this be fixed?
>
> -
> Got this notification back:
> ITMS-90339: Deprecated Info.plist Key - The Info.plist contains a key
> 'UIApplicationExitsOnSuspend' in bundle shutthebox [shutthebox.app] that
> will soon be unsupported. Remove the key, rebuild your app and resubmit.
>
> ITMS-90078: Missing Push Notification Entitlement - Your app appears to
> register with the Apple Push Notification service, but the app
> signature's
> entitlements do not include the "aps-environment" entitlement. If your
> app
> uses the Apple Push Notification service, make sure your App ID is
> enabled
> for Push Notification in the Provisioning Portal, and resubmit after
> signing
> your app with a Distribution provisioning profile that includes the
> "aps-environment" entitlement. Xcode does not automatically copy the
> aps-environment entitlement from provisioning profiles at build time.
> This
> behavior is intentional. To use this entitlement, either enable Push
> Notifications in the project editor's Capabilities pane, or manually add
> the
> entitlement to your entitlements file. For more information, see
>
>
> https://developer.apple.com/library/content/documentation/NetworkingInternet
>
>
> /Conceptual/RemoteNotificationsPG/HandlingRemoteNotifications.html#//apple_r
> ef/doc/uid/TP40008194-CH6-SW1
> .
>
> ITMS-90191: Missing beta entitlement - Your app does not include the
> beta-reports-active entitlement. If you intend to distribute this build
> via
> TestFlight for beta testing, please re-build this app with an App Store
> Distribution provisioning profile. Do not use ad-hoc profiles.
>
> ITMS-90683: Missing Purpose String in Info.plist -