Re: Persistant Insertion Point

2020-09-11 Thread Roger Guay via use-livecode
Thank you, Alex. That’s just what I need!

Roger

> On Sep 11, 2020, at 4:58 PM, Alex Tweedly via use-livecode 
>  wrote:
> 
> You can save the insertion point (i.e. the selectedchunk) when you leave the 
> second field, and then provide a handler to insert text at that saved point; 
> and of course call that handler when needed
> 
> e.g.   in your "second field, have
> 
>> local sChunk
>> on exitfield
>>put the selectedchunk into sChunk
>>put schunk &CR after msg
>> end exitfield
>> 
>> on closefield
>>put the selectedchunk into sChunk
>>put schunk &CR after msg
>> end closefield
>> 
>> on acceptText pText
>>do "put" && pText && "into" && sChunk
>>put "accepted" && schunk & Cr after msg
>> end acceptText
> and in the other field have something like
> 
>> ON selectionchanged
>>local tmp
>>put "here" &Cr after msg
>>put the mousetext into tmp
>>dispatch "accepttext" to fld 2 with tmp
>>put "disp" && it && the result &Cr after msg
>> end selectionchanged
> Alex.
> 
> On 12/09/2020 00:16, Roger Guay via use-livecode wrote:
>> I have 2 fields, the first from which I take the mouseText, the second  into 
>> which I place that text. Trouble is, I want the placed text to be at the 
>> insertion point I had before clicking outside that field.
>> Can someone suggest a way to preserve the insertion point in a field as one 
>> clicks into another field?
>> 
>> I appreciate any help
>> ___
>> 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: Possible : stack with transparent backgound?

2020-09-11 Thread Jim Lambert via use-livecode
Here's an example:
go stack url "https://netrin.on-rev.com/misc/TransparentStack.livecode";


JimL
___
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: Persistant Insertion Point

2020-09-11 Thread Alex Tweedly via use-livecode
You can save the insertion point (i.e. the selectedchunk) when you leave 
the second field, and then provide a handler to insert text at that 
saved point; and of course call that handler when needed


e.g.   in your "second field, have


local sChunk
on exitfield
   put the selectedchunk into sChunk
   put schunk &CR after msg
end exitfield

on closefield
   put the selectedchunk into sChunk
   put schunk &CR after msg
end closefield

on acceptText pText
   do "put" && pText && "into" && sChunk
   put "accepted" && schunk & Cr after msg
end acceptText

and in the other field have something like


ON selectionchanged
   local tmp
   put "here" &Cr after msg
   put the mousetext into tmp
   dispatch "accepttext" to fld 2 with tmp
   put "disp" && it && the result &Cr after msg
end selectionchanged

Alex.

On 12/09/2020 00:16, Roger Guay via use-livecode wrote:

I have 2 fields, the first from which I take the mouseText, the second  into 
which I place that text. Trouble is, I want the placed text to be at the 
insertion point I had before clicking outside that field.
Can someone suggest a way to preserve the insertion point in a field as one 
clicks into another field?

I appreciate any help
___
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


Persistant Insertion Point

2020-09-11 Thread Roger Guay via use-livecode
I have 2 fields, the first from which I take the mouseText, the second  into 
which I place that text. Trouble is, I want the placed text to be at the 
insertion point I had before clicking outside that field. 
Can someone suggest a way to preserve the insertion point in a field as one 
clicks into another field?

I appreciate any help
___
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: Possible : stack with transparent backgound?

2020-09-11 Thread matthias rebbe via use-livecode
Thanks for the hint to import the snapshot from the group. I followed Jim's 
instructions w/o success and was a little disappointed.


-
Matthias Rebbe
Life Is Too Short For Boring Code

> Am 12.09.2020 um 00:32 schrieb Marty Knapp via use-livecode 
> :
> 
> I was just tinkering with this and it wouldn’t work until I changed the 
> “import snapshot" from card to “import snapshot” from the group. But that’s a 
> very cool trick! Thanks Jim.
> 
> Marty
> 
>> On Sep 11, 2020, at 11:04 AM, Jim Lambert via use-livecode 
>>  wrote:
>> 
>>> DavidB wrote:
>>> 
>>> the text and some other elements to be visible but the stack background to 
>>> be transparent 
>> 
>> 
>> Start with a card having a field and a button.
>> 1. Create a GRC retangle the same rect as the card.
>> 
>> 2. Set its opaque to false.
>> 
>> 3. Set its linesize to 0.
>> 
>> 4. Send it to back.
>> 
>> 5. Group it with the field and a button.
>> 
>> 6. Set the threeD of the Group to false.
>> 
>> 7. Set both the borderwidth and margins of the group to 0.
>> 
>> 8. Import snapshot from this card.
>> 
>> 9. Hide last image.
>> 
>> 10. Set the windowshape of this stack to the id of the last image.
>> 
>> 
>> This results in the field and button 'floating independently' over whatever 
>> else is on your screen. That is, the rest of the card is invisible.
>> ___
> 
> 
> ___
> 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: Possible : stack with transparent backgound?

2020-09-11 Thread Marty Knapp via use-livecode
I was just tinkering with this and it wouldn’t work until I changed the “import 
snapshot" from card to “import snapshot” from the group. But that’s a very cool 
trick! Thanks Jim.

Marty

> On Sep 11, 2020, at 11:04 AM, Jim Lambert via use-livecode 
>  wrote:
> 
>> DavidB wrote:
>> 
>> the text and some other elements to be visible but the stack background to 
>> be transparent 
> 
> 
> Start with a card having a field and a button.
> 1. Create a GRC retangle the same rect as the card.
> 
> 2. Set its opaque to false.
> 
> 3. Set its linesize to 0.
> 
> 4. Send it to back.
> 
> 5. Group it with the field and a button.
> 
> 6. Set the threeD of the Group to false.
> 
> 7. Set both the borderwidth and margins of the group to 0.
> 
> 8. Import snapshot from this card.
> 
> 9. Hide last image.
> 
> 10. Set the windowshape of this stack to the id of the last image.
> 
> 
> This results in the field and button 'floating independently' over whatever 
> else is on your screen. That is, the rest of the card is invisible.
> ___


___
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: Possible : stack with transparent backgound?

2020-09-11 Thread Jim Lambert via use-livecode
> DavidB wrote:
> 
>  the text and some other elements to be visible but the stack background to 
> be transparent 


Start with a card having a field and a button.
1. Create a GRC retangle the same rect as the card.

2. Set its opaque to false.

3. Set its linesize to 0.

4. Send it to back.

5. Group it with the field and a button.

6. Set the threeD of the Group to false.

7. Set both the borderwidth and margins of the group to 0.

8. Import snapshot from this card.

9. Hide last image.

10. Set the windowshape of this stack to the id of the last image.


This results in the field and button 'floating independently' over whatever 
else is on your screen. That is, the rest of the card is invisible.
___
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: Issue with dropbox

2020-09-11 Thread Jimmieson, Phil via use-livecode
Hi Charles,
if this is on a Mac, it’s a security feature - apps cannot access folders 
outside of their own bundle unless the user explicitly grants permission. If 
you add an "answer folder”  command to your program, and ask the user to select 
folder B, then your app will be granted access to it and everything will work 
as it should.

Downloaded apps (even if you download them in a zip file) are flagged as being 
insecure and are not allowed to access your Mac’s filesystem.

I had this problem with an app of mine. An alternative approach I took there 
was to put folders of required supporting files into the app’s own bundle - 
using the standalone builder’s copy files tab. Apps are allowed to access files 
in their own bundle (but should not change them if your app is digitally 
signed).

--
Phil Jimmieson
University of Liverpool, Computer Science Department
Ashton Bldg, Ashton Street, Liverpool. L69 3BX
0151 795 4236

On 10 Sep 2020, at 23:33, Charles Lachat via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

Hi everybody,

A friend has accepted to test my new desktop app. I upload the app to dropbox 
and send a link, by e-mail, to my friend.

My app is in a folder "A" containing :

** the app
** a folder "B" containing several text files the app needs

The folder "A" is zipped before uploading.

After downloading (friend side) and unzipping, all the files are there but the 
app behaves as if there were no folder "B".

Most of the time.

What am I doing wrong ? Any idee ?




Thanks
Charles Lachat

===
iMac 2019
macOS 10.14
Livecode 9.6.0



___
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