CreateMobileAudioPlayer - Fails on Mobile 9.6.0.dp1

2019-11-28 Thread Sannyasin Brahmanathaswami via use-livecode
Rather than file a bug report, I think we can air this out here on the list 
first. then if it is a bug will file it.

This work on in 9.5.1 rc 1, but is failing on 9.6 dp1. I immediately crashes 
the app as soon as we pass the parameters to it. We are not using and the 
"no-longer-available"  commands noted in the release notes
"iOS mobile player control updated to use AVKit"

command createMobileAudioPlayer pURL, pPlayerName, pRect
local tHeight,tPlayloc 
if pPlayerName is among the lines of mobileControls() then
mobileControlDelete pPlayerName -- init
end if
mobileControlCreate "player", pPlayerName
put the result into sPlayerId
if pRect is empty then
put the rect of player pPlayerName into pRect 
end if

# set the play control without a controller present 
-- adjust location for mobile:--### FIND OUT IF THIS IS NEEDED ON iOS
if the platform is "android" then
if the short name of this card is "surprise_audio" then
subtract 70 from item 2 of pRect
else
-- android player controls appear above the player; 
adjust
-- with controller it's about 4x rect of cd player so 
align the bottom edges:
# this is hard wired to the bottom of the card for now.
put item 4 of pRect - item 2 of pRect into tHeight
put CardHeight() - safeBottomMargin() - 70 into item 4 
of pRect
put (item 4 of pRect) - tHeight - 50 into item 2 of 
pRect
end if
end if
put pRect into sPlayerRect
mobileControlSet pPlayerName, "visible", false 
mobileControlSet pPlayerName, "showcontroller", false
mobileControlSet pPlayerName, "rect", pRect
--mobileControlSet pPlayerName, "showController", true 
mobileControlSet pPlayerName, "filename", pURL 
if pURL begins with "https" then
showBusyIndicator true, "Loading audio..."
-- add loading indicator until duration is available
end if
if mobileIdleTimerLocked() is false then
mobileLockIdleTimer --jg: disallow screen lock
end if


Do you see anything wrong?

___
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 Server - Email

2019-11-28 Thread Sannyasin Brahmanathaswami via use-livecode
I have a email CGI from a very old cgi for the days when "revolution" was the 
server

Now with LiveCode server, Ubuntu 18+  does have 

/usr/sbin/sendmail

installed, at least I see that, but this old process does not work

put "/usr/sbin/sendmail -t" into mprocess
open process mprocess for write
write "From:" && (urlDecode (tDataIn["from"]))& cr to process mprocess
write "To:" &&   tRecipients  &  cr to process mprocess
write "Subject:" &&   (urlDecode (tDataIn["subject"]))   &  cr & cr to 
process mprocess
write(urlDecode (tDataIn["body"])) &  cr to process mprocess
close process mprocess   
if the result is not empty then 
 put the result into tResponse
else 
put tResponse
end if

I think we don't use "open process" anymore. What is the LiveCode server method 
now?

BR


___
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 9.6.0 DP-1

2019-11-28 Thread Sannyasin Brahmanathaswami via use-livecode
Aloha Panos

1) Right, the IOS INVALID ENTITLEMENTS were the ones I was looking. I’ll be 
sure the save them where I can find them again

2) Yes, I will file a bug report after I am sure that the library (which Jacque 
made originally) is using the correct code for the AVfoundation,  something may 
have changed.

3) Terminal
@ xcode-select -p
[returns]
/Applications/Xcode.app/Contents/Developer

# when I installed Xcode, I was prompted for "additional tools" to download and 
install, which I did. So, I think we are good. 

Thanks for all that you do!

BR





Hello Brahmanathaswami,

Not sure which terminal commands you are referring to, maybe these:

```
IOS INVALID ENTITLEMENTS

1. Use the codesign tool to check the entitlements on the .app bundle:
Type in a terminal:

codesign -d --entitlements :- /path/to/yourApp.app

2. Use the security tool to check the entitlements of the app's embedded
provisioning profile:
Type in a terminal:

security cms -D -i /path/to/yourApp.app/embedded.mobileprovision

- Then see if there is an entitlement that is present in (1) but not in (2).

```
Now, regarding the crash you still get with mobileControlCreate, I would
suggest you file a bug report with a sample stack and audio file.

I had tested the new iOS player with both audio and video before releasing
9.6 dp1, with both local and remote files, and had no issues.

BTW I suggest you make sure the command line tools you use are the ones of
Xcode 11.1.

What is the output of this terminal command?

xcode-select -p

Best,
Panos

___
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 9.6.0 DP-1

2019-11-28 Thread panagiotis merakos via use-livecode
Hello Brahmanathaswami,

Not sure which terminal commands you are referring to, maybe these:

```
IOS INVALID ENTITLEMENTS

1. Use the codesign tool to check the entitlements on the .app bundle:
Type in a terminal:

codesign -d --entitlements :- /path/to/yourApp.app

2. Use the security tool to check the entitlements of the app's embedded
provisioning profile:
Type in a terminal:

security cms -D -i /path/to/yourApp.app/embedded.mobileprovision

- Then see if there is an entitlement that is present in (1) but not in (2).

```
Now, regarding the crash you still get with mobileControlCreate, I would
suggest you file a bug report with a sample stack and audio file.

I had tested the new iOS player with both audio and video before releasing
9.6 dp1, with both local and remote files, and had no issues.

BTW I suggest you make sure the command line tools you use are the ones of
Xcode 11.1.

What is the output of this terminal command?

xcode-select -p

Best,
Panos

On Thu, Nov 28, 2019, 22:12 Sannyasin Brahmanathaswami via use-livecode <
use-livecode@lists.runrev.com> wrote:

> > =
> > Your application failed code-signing
> > check. Check your certificates,
> > provisioning profiles, and bundles ids.
> > 
>
> @Brahmanathaswami
>
> When do you get this error? When building the standalone, or when
> installing it to device?
>
> Regards,
> Panos
> --
>
> When try to install it to device, I thought worked before in 9.5.1 (rc 1)
>
> I looked over all your posts to the list and found one which suggest we
> use a iOS development profile
>
> So I made a new certificate and create a development profile, installed
> that and chose it from the SA panel.
> No go…. same error. Next I read the release note…. since XCode 10.1 was
> supported I tried that… 11.1,SDK 12.1 "green" - 10.1 SKD 12.1 now to "red"
> e.g. not accepted on mobile preferences. I went back to 11.1, and using the
> Development profile (I turned off "Beta Text") . I got the "intuition" that
> I should shut down after reboot. This time trying with the iOS development
> tool it went through and asked for a pass word to allow LC to use the
> certificate … (it is doing "sudo" in the background) I gave it my admin
> pass word and "always allows" and it installed on the phone. Yay!
>
> But to my "dismay" the mobileCreatePlayer causes the app to crash….  which
> was the whole purpose of my grade, to get audio work on iPhone 7 and 8…
>
> Anyway:
>
> If you installed Catalina. Don’t make the mistake in thinking that your
> KeyChain has been ported automatically. You should re-install your
> certificates, reboot, then things will start to work. (my guess)
>
> Meanwhile, can you post again the  terminal command for check the
> profiles. I have lost them somewhere and don't find them 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
>
___
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 9.6.0 DP-1

2019-11-28 Thread Sannyasin Brahmanathaswami via use-livecode
> =
> Your application failed code-signing
> check. Check your certificates,
> provisioning profiles, and bundles ids.
> 

@Brahmanathaswami

When do you get this error? When building the standalone, or when
installing it to device?

Regards,
Panos
--

When try to install it to device, I thought worked before in 9.5.1 (rc 1)

I looked over all your posts to the list and found one which suggest we use a 
iOS development profile

So I made a new certificate and create a development profile, installed that 
and chose it from the SA panel.
No go…. same error. Next I read the release note…. since XCode 10.1 was 
supported I tried that… 11.1,SDK 12.1 "green" - 10.1 SKD 12.1 now to "red" e.g. 
not accepted on mobile preferences. I went back to 11.1, and using the 
Development profile (I turned off "Beta Text") . I got the "intuition" that I 
should shut down after reboot. This time trying with the iOS development tool 
it went through and asked for a pass word to allow LC to use the certificate … 
(it is doing "sudo" in the background) I gave it my admin pass word and "always 
allows" and it installed on the phone. Yay!

But to my "dismay" the mobileCreatePlayer causes the app to crash….  which was 
the whole purpose of my grade, to get audio work on iPhone 7 and 8…

Anyway:

If you installed Catalina. Don’t make the mistake in thinking that your 
KeyChain has been ported automatically. You should re-install your 
certificates, reboot, then things will start to work. (my guess)

Meanwhile, can you post again the  terminal command for check the profiles. I 
have lost them somewhere and don't find them 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: Identifying Un-used functions and commands

2019-11-28 Thread Mark Wieder via use-livecode

On 11/28/19 9:52 AM, J. Landman Gay via use-livecode wrote:
We should verify whether we're looking for orphaned handlers or orphaned 
calls. If it's handlers I'd do something like:


Scan all scripts for "end" & space to get a list of handlers
Remove duplicates
Scan all scripts for each handler name and keep a count

If there's only two instances of the handler name, it's an orphan.


Um. No. It's a bit more complicated.
Removing duplicates without keeping track of the object script wouldn't 
catch handlers of the same name in different scripts. And you'd want to 
eliminate system messages from the list so that a closeStack handler, 
for instance, wouldn't show up as an orphan.


--
 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: Identifying Un-used functions and commands

2019-11-28 Thread J. Landman Gay via use-livecode
We should verify whether we're looking for orphaned handlers or orphaned 
calls. If it's handlers I'd do something like:


Scan all scripts for "end" & space to get a list of handlers
Remove duplicates
Scan all scripts for each handler name and keep a count

If there's only two instances of the handler name, it's an orphan.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On November 28, 2019 11:05:56 AM Mark Wieder via use-livecode 
 wrote:



On 11/28/19 8:25 AM, Richard Gaskin via use-livecode wrote:

Quentin Long wrote:

 > Finding explicit function/command calls seems like it should be a
 > fairly straightforward task. However, the "do" keyword can also be
 > a source of function/command calls, which complicates matters a
 > wee bit. You'll also need to evaluate all the non-cleartext components
 > that can go into "do" statements—
 > do (VariableName)
 > do (the WhateverProp of ThisObject)
 > do (line 4 of fld "ThisField")
 > —etc etc etc.

There are many reasons to resort to "do" only after all other more
with-the-grain approaches cannot be made to work.

That it eludes static code analysis is just one more.

If I get around to tidying up my old orphan-finder and adding it to
other code base management tools in devolution, I wouldn't bother
attempting to handle "do" cases.  Low ROI, and not handling them helps
draw attention to the technical debt many uses of "do" accrue.



Somewhat similar problem with "send" and "dispatch" commands as well.
You can alleviate this a bit during parsing by seeing if what follows
the "do" or "send" or "dispatch [function]" command is a quoted string.

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





___
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 Un-used functions and commands

2019-11-28 Thread Mark Wieder via use-livecode

On 11/28/19 8:25 AM, Richard Gaskin via use-livecode wrote:

Quentin Long wrote:

 > Finding explicit function/command calls seems like it should be a
 > fairly straightforward task. However, the "do" keyword can also be
 > a source of function/command calls, which complicates matters a
 > wee bit. You'll also need to evaluate all the non-cleartext components
 > that can go into "do" statements—
 > do (VariableName)
 > do (the WhateverProp of ThisObject)
 > do (line 4 of fld "ThisField")
 > —etc etc etc.

There are many reasons to resort to "do" only after all other more 
with-the-grain approaches cannot be made to work.


That it eludes static code analysis is just one more.

If I get around to tidying up my old orphan-finder and adding it to 
other code base management tools in devolution, I wouldn't bother 
attempting to handle "do" cases.  Low ROI, and not handling them helps 
draw attention to the technical debt many uses of "do" accrue.




Somewhat similar problem with "send" and "dispatch" commands as well. 
You can alleviate this a bit during parsing by seeing if what follows 
the "do" or "send" or "dispatch [function]" command is a quoted string.


--
 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: remove DEFAULTMENUBAR?

2019-11-28 Thread Klaus major-k via use-livecode
Hi all,

> Am 28.11.2019 um 17:27 schrieb Klaus major-k via use-livecode 
> :
> Hi Richard,
>> Am 28.11.2019 um 17:20 schrieb Richard Gaskin via use-livecode 
>> :
>> I pondered this myself some years ago, and was unable to find a way to clear 
>> the default menubar.
> 
> ah, OK, thank you, I thought I had missed something.
>> Perhaps setting it to a group you then delete might do it, but that seems 
>> wonkier than we would expect for a tool like LC.
>> So we might instead ask: why doesn't the engine offer a means of easily 
>> clearing the default menubar?
>> Or to put it another way:  What benefit is there to the end-user to do that, 
>> to have an incomplete menubar whenever a stack is brought forward that has 
>> no menu group?
>> It's kinda nice that macOS will provide at least some basic menu items when 
>> no menubar is established by the app, but I've never shipped an app where 
>> that sparse set could be satisfying to my users.
>> If it's enough for your app, perhaps an enhancement request may be in order.
> Yes, will do now!

Done: 


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-28 Thread Klaus major-k via use-livecode
Hi Richard,

> Am 28.11.2019 um 17:20 schrieb Richard Gaskin via use-livecode 
> :
> 
> I pondered this myself some years ago, and was unable to find a way to clear 
> the default menubar.

ah, OK, thank you, I thought I had missed something.

> Perhaps setting it to a group you then delete might do it, but that seems 
> wonkier than we would expect for a tool like LC.
> So we might instead ask: why doesn't the engine offer a means of easily 
> clearing the default menubar?
> Or to put it another way:  What benefit is there to the end-user to do that, 
> to have an incomplete menubar whenever a stack is brought forward that has no 
> menu group?
> 
> It's kinda nice that macOS will provide at least some basic menu items when 
> no menubar is established by the app, but I've never shipped an app where 
> that sparse set could be satisfying to my users.
> 
> If it's enough for your app, perhaps an enhancement request may be in order.

Yes, will do now!

> -- 
> Richard Gaskin

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: Identifying Un-used functions and commands

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

Quentin Long wrote:

> Finding explicit function/command calls seems like it should be a
> fairly straightforward task. However, the "do" keyword can also be
> a source of function/command calls, which complicates matters a
> wee bit. You'll also need to evaluate all the non-cleartext components
> that can go into "do" statements—
> do (VariableName)
> do (the WhateverProp of ThisObject)
> do (line 4 of fld "ThisField")
> —etc etc etc.

There are many reasons to resort to "do" only after all other more 
with-the-grain approaches cannot be made to work.


That it eludes static code analysis is just one more.

If I get around to tidying up my old orphan-finder and adding it to 
other code base management tools in devolution, I wouldn't bother 
attempting to handle "do" cases.  Low ROI, and not handling them helps 
draw attention to the technical debt many uses of "do" accrue.


--
 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: remove DEFAULTMENUBAR?

2019-11-28 Thread Richard Gaskin via use-livecode
I pondered this myself some years ago, and was unable to find a way to 
clear the default menubar.


Perhaps setting it to a group you then delete might do it, but that 
seems wonkier than we would expect for a tool like LC.


So we might instead ask: why doesn't the engine offer a means of easily 
clearing the default menubar?


Or to put it another way:  What benefit is there to the end-user to do 
that, to have an incomplete menubar whenever a stack is brought forward 
that has no menu group?


It's kinda nice that macOS will provide at least some basic menu items 
when no menubar is established by the app, but I've never shipped an app 
where that sparse set could be satisfying to my users.


If it's enough for your app, perhaps an enhancement request may be in order.

--
 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: remove DEFAULTMENUBAR?

2019-11-28 Thread Klaus major-k via use-livecode
Hi Hermann,

> Am 28.11.2019 um 16:07 schrieb hh via use-livecode 
> :
> 
> As I understand this:
> 
> the menubar of this stack is a container (containing a group reference),
> the defaultmenubar is itself a (may be referenced) group.

OK, but there MUST be a way to remove that defaultmenubar!
Having to force-quit LC for this is definitively a no-go!

Panos, Mark, or someone else from the mothership?

>> Klaus M. wrote:
>> hm, I was hoping for a ONE-Liner, that can easily be executed via script.
> 
> You could use semicolons ;-)

LOL! OK, convinced. :-D


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-28 Thread hh via use-livecode
As I understand this:

the menubar of this stack is a container (containing a group reference),
the defaultmenubar is itself a (may be referenced) group.


> Klaus M. wrote:
> hm, I was hoping for a ONE-Liner, that can easily be executed via script.

You could use semicolons ;-)

___
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-28 Thread Klaus major-k via use-livecode
Hallo Hermann,

> Am 28.11.2019 um 15:42 schrieb hh via use-livecode 
> :
> 
> The defaultmenubar is a GROUP.
> Empty is not a group.

so is "the menubar of stack xyz", but we can:
...
set the menubar of this stack to EMPTY
...
Why does that not work for the "defaultmenubar", empty is also no group here!?

> So you could try:
> 
> create a new group
> set the defaultmenubar to that empty group
> delete that empty group

hm, I was hoping for a ONE-Liner, that can easily be executed via script.
Anyway, thank you!


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-28 Thread hh via use-livecode
The defaultmenubar is a GROUP.
Empty is not a group. So you could try:

create a new group
set the defaultmenubar to that empty group
delete that empty group

___
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-28 Thread Klaus major-k via use-livecode
Hi all,

> Am 22.11.2019 um 14:33 schrieb 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?

noone? Really? :-/


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: Identifying Un-used functions and commands

2019-11-28 Thread Quentin Long via use-livecode
> Date: Tue, 12 Nov 2019 12:12:47 -0500
> From: Stephen MacLean 
> To: How to use LiveCode 
> Subject: Identifying Un-used functions and commands
> Message-ID: 
> Content-Type: text/plain; charset=utf-8
> 
> Hi All,
> 
> I?m wondering if anyone has a way or code to identify any un-used functions 
>and commands in a set of stacks?

Finding explicit function/command calls seems like it should be a fairly 
straightforward task. However, the "do" keyword can also be a source of 
function/command calls, which complicates matters a wee bit. You'll also need 
to evaluate all the non-cleartext components that can go into "do" statements—
do (VariableName)
do (the WhateverProp of ThisObject)
do (line 4 of fld "ThisField")
—etc etc etc.
___
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