Re: "send" vs "dispatch"

2018-10-08 Thread Monte Goulding via use-livecode
One of the main reasons I implemented send and call with params in the PR that 
has been mentioned is because it allows for referenced parameters. The 
following is an error:

on mouseUp
   local tBar
   send “foo tBar” to me
   answer tBar
end mouseUp

on foo @rBar
   put “Howdy" into rBar
end foo

While this works:

on mouseUp
   local tBar
   send “foo” to me with tBar
   answer tBar // answers “Howdy"
end mouseUp

Of course you can’t use referenced params like this using send in time form.
___
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: "send" vs "dispatch"

2018-10-08 Thread Tom Glod via use-livecode
ever since I learned that you can pass a whole array using the send command
the dispatch doesn't seem that much more convenient at all..i do alot of in
time commands so this is very convenient to my needs / style

send "mymessage myarray" to this stack

for years I thought using this form 'myarray' is sent as a string, but it
is actually the whole array and all its data) ..no need to concatenate the
variables.




On Mon, Oct 8, 2018 at 8:54 PM Mark Wieder via use-livecode <
use-livecode@lists.runrev.com> wrote:

> On 10/08/2018 04:41 PM, Bob Sneidar via use-livecode wrote:
>
> Another nice feature of dispatch is that if the handler does not exist
> in the target, it will silently and gracefully fail, continuing to
> execute code after the call.
>
> Yeah, that's a double-edged doohickey, though. I *do* use it that way
> sometimes as well, but note that if you don't check the result then you
> won't know if the dispatch succeeded when you want it to.
>
> Sometimes silently failing is good, sometimes not so much. YMMV.
>
> --
>   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


Sandbox - a Levure Helper for working with files in the macOS sandbox

2018-10-08 Thread Trevor DeVore via use-livecode
Hi,

I've posted a new Levure helper on GitHub called "sandbox". It adds support
for working with file references across multiple app sessions in the macOS
sandbox. It requires LiveCode 9 as it uses the Foreign Function Interface
(aka FFI) to wrap Objective-C APIs.

If you distribute your apps through the Mac App Store then it is required
that you sandbox your application. When an application is sandboxed the
user has to give you explicit permission to open any files that reside
outside of your applications container. For example, a user can do this by
selecting a file using the `answer file` dialog or dragging a file onto
your application. Your application will then have permission to access that
file for the rest of the app session.

The next time your application launches, however, your application will not
have permission to open the files again unless you implement
security-scoped bookmarks and security-scoped urls. The helper uses an LCS
library wrapped around an LCB extension to try and hide the complexity.

To learn more visit the GitHub page:

https://github.com/trevordevore/levurehelper-sandbox

If you don't use Levure but are interested in the LCB FFI code here is a
direct link to that file:

https://github.com/trevordevore/levurehelper-sandbox/blob/master/macos_sandbox.lcb

-- 
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: "send" vs "dispatch"

2018-10-08 Thread Mark Wieder via use-livecode

On 10/08/2018 04:41 PM, Bob Sneidar via use-livecode wrote:

Another nice feature of dispatch is that if the handler does not exist 
in the target, it will silently and gracefully fail, continuing to 
execute code after the call.


Yeah, that's a double-edged doohickey, though. I *do* use it that way 
sometimes as well, but note that if you don't check the result then you 
won't know if the dispatch succeeded when you want it to.


Sometimes silently failing is good, sometimes not so much. YMMV.

--
 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: Stacks whose names start with "rev"

2018-10-08 Thread J. Landman Gay via use-livecode
I checked that early on and again today, cantEdit is false. The style was 
reported as toplevel but I set it again anyway in the message box. The 
command that opens the stack is a plain "go stack", the same as all the 
others in the suite that open normally. GRevDevolppment is true.



The only difference between this stack and hundreds of others is the name, 
as far as I can see.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On October 8, 2018 5:35:27 PM Richard Gaskin via use-livecode 
 wrote:



J. Landman Gay wrote:

> I was able to look at this again today. The style of the stack is
> toplevel, it is visible and frontmost, but the mode is 2. This is true
> whether gRevDevelopment is true or false. Show IDE stacks in Lists is
> turned on.
>
> It's stuck that way. LC 9.0.1.

The style is the persistent property which governs mode when opened
using "open" or "go"; the mode is the current actual mode, which can
differ from the style if opened using a mode name as a command (e,g,
"palette ").

When the mode is 2 that usually means the cantEdit has been set.  This
may have been set somewhere in the IDE, thinking it's an IDE stack.

What happens if you set the cantEdit of the stack to false?

--
 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: Will it ever be possible place controls over browser widget?

2018-10-08 Thread Bob Sneidar via use-livecode
Did that once long ago. Browser object (not widget) overlaid the button. I am 
saying I think the widget is just the browser object wrapped in a widget. 

Bob S


> On Oct 4, 2018, at 15:05 , Brian Milby via use-livecode 
>  wrote:
> 
> Native layers are drawn above all LC layers regardless of what layer the 
> object is in. This would go for native buttons and other controls as well. An 
> interesting experiment would be to try a native button over the browser 
> widget.


___
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: Breakpoints Failing / Crashes

2018-10-08 Thread Bob Sneidar via use-livecode
Yes the dreaded red dot, fixed for a while, is now rearing it's ugly head 
again. If I use red dots, I remove and re-add after every compile (which I do 
often). 

Bob S


> On Oct 5, 2018, at 07:12 , Sannyasin Brahmanathaswami via use-livecode 
>  wrote:
> 
> breakpoint  -- either entered by "red dot" or explicitly placed
> "breakpoint" in the code  and frequently "non-observed" and just now had
> a crash are click the breakpoint dot (which was not working) and
> attempting to insert "breakpoint"
> 
> anyone else having to trouble,
> 
> Mac OS X , LC 9.0.1 stable (not really stable at all!)
> 
> ___
> 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: Will it ever be possible place controls over browser widget?

2018-10-08 Thread Bob Sneidar via use-livecode
Nice. I never thought to do that. DOH!

Bob S


> On Oct 5, 2018, at 14:30 , Jim Lambert via use-livecode 
>  wrote:
> 
>> Herman wrote:
>> 
>> See my demo here:
>> 
>> http://forums.livecode.com/viewtopic.php?p=152773#p152773 
>> 
>> 
>> Overlays the widget while this plays a video.
> 
> So floating a second stack over the browser as I suggested does work and is 
> beautifully demonstrated in Herman’s DemoVideoBack.livecode.zip.
> 
> Jim Lambert
> ___
> 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: "send" vs "dispatch"

2018-10-08 Thread Bob Sneidar via use-livecode
I like the dispatch form, separating parameters out from the command. The 
reason is given stepping into this code, 

send "test ha" to button 1 

I cannot point to the variable "ha" and see the value it contains. But if, 

dispatch "test" to button 1 with ha

I can. I only use send anymore when I need to send in time, otherwise 
everything is dispatch. Another nice feature of dispatch is that if the handler 
does not exist in the target, it will silently and gracefully fail, continuing 
to execute code after the call. This means I can use dispatch in a behavior, 
and then have the handler only in the targets that need it, without having to 
check for the existence of the handler, or wrapping the code in a try catch 
statement. Send will throw an error if the handler does not exist. 

Bob S


> On Oct 5, 2018, at 15:15 , Tom Glod via use-livecode 
>  wrote:
> 
> I've written over 30 000 lines of code in livecode.
> 
> used dispatch  once. :)
> 
> 
> 
> 
> 
> On Fri, Oct 5, 2018 at 6:09 PM Geoff Canyon via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> A word to the wise (mostly for IDE and extension developers): this will
>> successfully compile:
>> 
>>   send "test" to button 1 with "ha"
>> 
>> And then if the IDE is swallowing up your error messages (as it does for
>> extensions like Navigator) it will even deliver the message "test" to
>> button 1, just without any arguments, and then die silently.
>> 
>> Outside of "rev" stacks, it will deliver the message without arguments and
>> then throw an error saying there is no handler "with". I just checked, and
>> amazingly this will work:
>> 
>> on mouseUp
>>   send "test" to button 1 with "ha"
>> end mouseUp
>> 
>> on with
>>   answer "WTH?"
>> end with
>> 
>> But that's obviously unlikely. Far more likely if you're dealing with
>> code you wrote before you became aware of "dispatch" (or maybe before
>> "dispatch" was a thing -- I think Navigator predates LC 3.5) is that you
>> decide to add an argument to a remote call and don't notice that it's a
>> "send" rather than a "dispatch", and then spend half an hour trying to
>> figure out why your arguments aren't passing through .
>> ___
>> 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: Most Efficient Way To "Blink"

2018-10-08 Thread Bob Sneidar via use-livecode
Ooh that's cool! A per domain setting. I wonder if Apple Mail can do that??

Bob S


> On Oct 6, 2018, at 19:57 , Mark Wieder via use-livecode 
>  wrote:
> 
> On 10/06/2018 07:38 PM, Sannyasin Brahmanathaswami via use-livecode wrote:
> 
>> I am recently switched to Thunderbird for mail, it is entering the
>> asterisk in code.  Sorry about that.
> 
> Look in TBird Preferences at Account Settings | Composition & Addressing and 
> make sure 'Compose messages in HTML format' is unchecked. I think that should 
> fix it.
> 
> Or look at the Composition tab in File | Preferences and select the Send 
> Options... button. Either check 'Send messages as plain text if possible' or 
> add livecode.com to the Plain Text Domains panel.
> 
> Otherwise idk... I've been using TBird for years without that problem.
> 
> -- 
> 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: Stacks whose names start with "rev"

2018-10-08 Thread Richard Gaskin via use-livecode

J. Landman Gay wrote:

> I was able to look at this again today. The style of the stack is
> toplevel, it is visible and frontmost, but the mode is 2. This is true
> whether gRevDevelopment is true or false. Show IDE stacks in Lists is
> turned on.
>
> It's stuck that way. LC 9.0.1.

The style is the persistent property which governs mode when opened 
using "open" or "go"; the mode is the current actual mode, which can 
differ from the style if opened using a mode name as a command (e,g, 
"palette ").


When the mode is 2 that usually means the cantEdit has been set.  This 
may have been set somewhere in the IDE, thinking it's an IDE stack.


What happens if you set the cantEdit of the stack to false?

--
 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: Stacks whose names start with "rev"

2018-10-08 Thread J. Landman Gay via use-livecode
I was able to look at this again today. The style of the stack is 
toplevel, it is visible and frontmost, but the mode is 2. This is true 
whether gRevDevelopment is true or false. Show IDE stacks in Lists is 
turned on.


It's stuck that way. LC 9.0.1.

On 10/4/18 12:32 AM, J. Landman Gay via use-livecode wrote:
I won't be able to check it for a few days. The problem isn't so much 
that I couldn't change the stack but how it got assigned as mode two in 
the first place. It was a regular topstack when it was created back in 
LC 8.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On October 3, 2018 6:44:34 PM Richard Gaskin via use-livecode 
 wrote:



J. Landman Gay wrote:
> The main thing I needed to know is whether there was an easier way to
> edit the stack than what we were doing. It seems there isn't.

If "toplevel " doesn't work for you then it doesn't work for
the folks at LC Ltd.

I can understand if you don't have time to investigate this, but now I'm
intrigued and wish we knew what made the stack you're working on so
unusually difficult beyond the naming conventions.

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.com    http://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




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