Re: in case you need another reason to love LiveCode...

2019-10-29 Thread Richard Gaskin via use-livecode

Mark Wieder wrote:

> How hard can text editing be?
>
> https://lord.io/blog/2019/text-editing-hates-you-too/

Thank you, Mark. Bookmarked.

LiveCode makes it so easy to take things like text editing for granted.

"Just drop a field onto a card and start typing - what could be so hard?"

And then we read what it takes to make that happen...

--
 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: The Roadmap

2019-10-29 Thread Richard Gaskin via use-livecode

Richmond wrote:

> Of course if certain long-term stuff from the Kickstarters don't
> appear on the Roadmap it is easier to hold LC to account than if
> the Roadmap were to disappear completely.

Which returns us to the question I posted an hour ago about the Roadmap:

   What purpose does it serve?

I can imagine all sorts of reasons one might find a roadmap useful. 
Some may find it useful for planning features down the road for one's 
own products (provided, of course, a solid understanding of what a 
roadmap is, and isn't, is in place); others may find it useful for 
anticipating areas of future contributions to the project (new widget 
opportunities, etc.); others may just find it interesting to see how the 
company envisions growth opportunities as reflected in feature sets.


There are all sorts of really good reasons people might want a roadmap.

And then there's yours:

  "...to hold LC to account..."

If that's your interest, I see no benefit in keeping the Roadmap.

--
 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: encoding woes!?

2019-10-29 Thread Klaus major-k via use-livecode
Hello Hermann,

> Am 29.10.2019 um 23:01 schrieb hh via use-livecode 
> :
> 
>>> Also LiveCode uses a BOM. If there is no UTF-8 BOM it uses 
>>> Mac OS Roman. That is what you see when you type into msg 
>>> put textEncode(the htmltext of widget "Browser", "UTF-8"). 
>> 
>> Which shows exactly the same (with umlauts and stuff) as simply:
>> put the htmltext of widget "Browser" 
> I don't mean the htmltext of the widget that has the file as url.
> Set the htmltext of the widget by script to
> 
> äöüß
> 
> Then do
> put textencode(the htmltext of widget browser,"UTF-8")
> I get then here the MacOS Roman encoding:
> 
> üā
> 
> 
> That describes (somehow) the problem you had and others will have.

thank you, will try to digest this. :-)

At least I got the stack working as I need it!


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: scroll browser widget via script?

2019-10-29 Thread Klaus major-k via use-livecode
Hello Hermann,

> Am 29.10.2019 um 22:45 schrieb hh via use-livecode 
> :
> 
>> Klaus M. wrote:
>> can we (v)scroll a browser widget via script?
> 
> Of course by setting anchors and jumping via URL to there.
> But you don't mean that, so:
> No.

OK, thanks.

> But we have a forum. From post "Scroll my widget (='.'=)"
> http://forums.livecode.com/viewtopic.php?p=156701#p156701
> -- scrolls "to"  horizontally 0 and vertically 400 pixels
> do "window.scrollTo(0,400);" in  widget "browser"

That is great, I can even use an insanely high number to scroll to the bottom
without knowing the exact "formattedheigt" of the widget, just like with LC 
fields.

> -- scrolls "by" (additive) horizontally 10 and vertically 40 pixels
> do "window.scrollBy(10,40);" in widget "browser"
> 
> And your next questions:
> Widget usage example #5: Getting MouseEvents
> http://forums.livecode.com/viewtopic.php?p=154496#p154496
> 
> Widget usage example #5b: Getting MouseEvents (part2).
> http://forums.livecode.com/viewtopic.php?p=174936#p174936

I really did not want to know this (in the moment). :-)

Thanks a lot!


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: scroll browser widget via script?

2019-10-29 Thread hh via use-livecode
> Klaus M. wrote:
> can we (v)scroll a browser widget via script?

Of course by setting anchors and jumping via URL to there.
But you don't mean that, so:

No.
But we have a forum. From post "Scroll my widget (='.'=)"
http://forums.livecode.com/viewtopic.php?p=156701#p156701

-- scrolls "to"  horizontally 0 and vertically 400 pixels
do "window.scrollTo(0,400);" in  widget "browser"
-- scrolls "by" (additive) horizontally 10 and vertically 40 pixels
do "window.scrollBy(10,40);" in widget "browser"

And your next questions:

Widget usage example #5: Getting MouseEvents
http://forums.livecode.com/viewtopic.php?p=154496#p154496

Widget usage example #5b: Getting MouseEvents (part2).
http://forums.livecode.com/viewtopic.php?p=174936#p174936

___
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: encoding woes!?

2019-10-29 Thread Klaus major-k via use-livecode
Hello Hermann,

> Am 29.10.2019 um 22:06 schrieb hh via use-livecode 
> :
> 
> Hi Klaus,
> 
> this is dangerous because the code could have "mixed" encodings
> if you (or your partner) edits the code in texteditors with
> different encoding settings.

we both use the same stack, so no text editor involved.

> I looked again carefully into your first post.
> You use the htmltext of the widget, so your original code is correct.
> It works here as you would like.
> 
> So delete the file test.html and write it new by LC using 
> put textencode(the htmltext of widget "browser","UTF8") \
>  into url("file:" & specialfolderpath("desktop") & "/test.html")
> 
> Possibly there was some problem when you self-created the file.
> I set the default encoding in BBEdit to UTF-8.

I used BBEdit with encoding set to UTF-8 for the "skeletal structure"
of the HTML file, HEADER and a little inline CSS.

> Also LiveCode uses a BOM. If there is no UTF-8 BOM it uses
> Mac OS Roman. That is what you see when you type into msg
> put textEncode(the htmltext of widget "Browser", "UTF-8").

Which shows exactly the same (with umlauts and stuff) as simply:
put the htmltext of widget "Browser"

> If you use later on text from the DOM structure of your HTML,
> have to decode before using in LC/writing to a file.
> handlers.
> I use this always together with base64Encoding (because javascript
> handlers need ONE line of code in quotes).

Well you have a much deeper knowledge about all this stuff than I will ever have
and I hardly understand what you are trying to tell me with these last two 
sentences. :-D

Thanks for you help, very appreciated!


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: encoding woes!?

2019-10-29 Thread hh via use-livecode
Hi Klaus,

this is dangerous because the code could have "mixed" encodings
if you (or your partner) edits the code in texteditors with
different encoding settings.

I looked again carefully into your first post.
You use the htmltext of the widget, so your original code is correct.
It works here as you would like.

So delete the file test.html and write it new by LC using 
put textencode(the htmltext of widget "browser","UTF8") \
  into url("file:" & specialfolderpath("desktop") & "/test.html")
  
Possibly there was some problem when you self-created the file.
I set the default encoding in BBEdit to UTF-8.

Also LiveCode uses a BOM. If there is no UTF-8 BOM it uses
Mac OS Roman. That is what you see when you type into msg
put textEncode(the htmltext of widget "Browser", "UTF-8").

If you use later on text from the DOM structure of your HTML,
have to decode before using in LC/writing to a file.
handlers.

I use this always together with base64Encoding (because javascript
handlers need ONE line of code in quotes).

___
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


scroll browser widget via script?

2019-10-29 Thread Klaus major-k via use-livecode
Hi all,

can we (v)scroll a browser widget via scipt?
Did not find a clue/property in the dictionary.


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: encoding woes!?

2019-10-29 Thread Klaus major-k via use-livecode
Hi all,

I don't really understand this, but this finally does the job:
...
put "" after tText
## NO encoding before setting the htmltext!?
set the htmltext of widget "source" to tText

put textencode(tText,"UTF-8") into tNewText
put tNewText into url("file:" & Kommunikations_ordner() & "kommunikation.html")
...
Now loading that file again into the widget looks as exspected, ph! :-)

> Am 29.10.2019 um 19:44 schrieb Klaus major-k via use-livecode 
> :
> 
> Hallo Hermann,
> 
>> Am 29.10.2019 um 19:14 schrieb hh via use-livecode 
>> :
>> 
>> Did you check the encoding of test.html
>> with BBEdit (should be Unicode (UTF-8))?
> yes, BBEdit shows "Unicode (UTF-8)" in the bottom bar.
> That is what's puzzling me...

Best and thanks to all

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


in case you need another reason to love LiveCode...

2019-10-29 Thread Mark Wieder via use-livecode

How hard can text editing be?

https://lord.io/blog/2019/text-editing-hates-you-too/

--
 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: encoding woes!?

2019-10-29 Thread Klaus major-k via use-livecode
Hallo Hermann,

> Am 29.10.2019 um 20:02 schrieb hh via use-livecode 
> :
> 
> Just saw it now, overlooked that first:
> 
> You script
> put textencode(tTExt,"UTF8") into url ("file": ...)
> 
> This should read
> put textDecode(tTExt,"UTF8") into url ("file": ...)

mhhh, when I have this in fld 1:



-


äÄüÜöÖßßß

###

And do
...
put textDecode(tTExt,"UTF8") into url ("file": ...)
...

The resulting file looks like:



-




###
All umlauts are gone!?

With:
...
put textencode(tText,"UTF8") into url ("file": ...)
...
It looks fine in Safari and a browser widget!?

> But why using files?

Das geht Dich gar nichts an! :-D

Joke aside, the file gets saved in my Dropbox and I share it
with another user of LC!

> If you don't want to type directly in the browser widget
> you can make it "mirroring" a text field.
> 
> Example for a primitve HTML editor:
> 
> 1. Write into fld "HTML"
> 
> [[ht]]
> (You can now hide fld "HTML").
> 
> 2. Then make a field "Tippse" and script it:
> 
> on textchanged
>  put the htmltext of me into ht
>  replace "" with "" in ht
>  replace "" with empty in ht
>  set htmltext of widget "browser" to merge(fld "HTML")
> end textchanged
> 
> on enterInField
>  textchanged
> end enterInField
> 
> Then you can do what your textfield allows
> set textfont (bears some problems), textsize, styles etc.
> and the widget will display it (well, approximately...)
> 
> [Another variant is to write directly into the DOM structure
> of the current HTMLtext.]

Thanks, stored for possible future use. :-)


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: The Roadmap

2019-10-29 Thread Richmond via use-livecode
Of course if certain long-term stuff from the Kickstarters don't appear 
on the
Roadmap it is easier to hold LC to account than if the Roadmap were to 
disappear completely.


On 29.10.19 21:19, hh via use-livecode wrote:

I also think all of them are still valuable targets.

Of course one could say "I know features/repairs that
should be made before that" and advertise for them.

___
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: The Roadmap

2019-10-29 Thread Richmond via use-livecode
Well, even if nothing else, it gives an impression that the folk at 
LiveCode central have some sort
of GANTT chart with deliverables and dependencies, and what can be 
reasonably expected in the near future.


On 29.10.19 21:14, Richard Gaskin via use-livecode wrote:

What purpose does it serve?




___
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: The Roadmap

2019-10-29 Thread hh via use-livecode
I also think all of them are still valuable targets.

Of course one could say "I know features/repairs that
should be made before that" and advertise for them.

___
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: The Roadmap

2019-10-29 Thread Richard Gaskin via use-livecode

What purpose does it serve?

--
 Richard Gaskin


Richmond wrote:
>
> Why would you ditch it?
>
> On 29.10.19 20:59, Richard Gaskin via use-livecode wrote:
>> Richmond wrote:
>>
>> > The Roadmap is more than a year out of date.
>> >
>> > https://livecode.com/resources/roadmap/
>> >
>> > Is there any chance of it being updated?
>>
>> I hope not.
>>
>> If it were up to me I'd ditch it altogether.
>>
>>
>> Lagi wrote:
>> > The silence is deafening. :-(
>>
>> ^ and that's why.
>


___
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: The Roadmap

2019-10-29 Thread Richmond via use-livecode

Why would you ditch it?

On 29.10.19 20:59, Richard Gaskin via use-livecode wrote:

Richmond wrote:

> The Roadmap is more than a year out of date.
>
> https://livecode.com/resources/roadmap/
>
> Is there any chance of it being updated?

I hope not.

If it were up to me I'd ditch it altogether.


Lagi wrote:
> The silence is deafening. :-(

^ and that's why.




___
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: encoding woes!?

2019-10-29 Thread hh via use-livecode
Just saw it now, overlooked that first:

You script
put textencode(tTExt,"UTF8") into url ("file": ...)

This should read
put textDecode(tTExt,"UTF8") into url ("file": ...)

=

But why using files?
If you don't want to type directly in the browser widget
you can make it "mirroring" a text field.

Example for a primitve HTML editor:

1. Write into fld "HTML"

[[ht]]
(You can now hide fld "HTML").

2. Then make a field "Tippse" and script it:

on textchanged
  put the htmltext of me into ht
  replace "" with "" in ht
  replace "" with empty in ht
  set htmltext of widget "browser" to merge(fld "HTML")
end textchanged

on enterInField
  textchanged
end enterInField

Then you can do what your textfield allows
set textfont (bears some problems), textsize, styles etc.
and the widget will display it (well, approximately...)

[Another variant is to write directly into the DOM structure
of the current HTMLtext.]

___
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: The Roadmap

2019-10-29 Thread Richard Gaskin via use-livecode

Richmond wrote:

> The Roadmap is more than a year out of date.
>
> https://livecode.com/resources/roadmap/
>
> Is there any chance of it being updated?

I hope not.

If it were up to me I'd ditch it altogether.


Lagi wrote:
> The silence is deafening. :-(

^ and that's why.

--
 Richard Gaskin
 Fourth World Systems

___
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: encoding woes!?

2019-10-29 Thread Klaus major-k via use-livecode
Hallo Hermann,

> Am 29.10.2019 um 19:14 schrieb hh via use-livecode 
> :
> 
> Did you check the encoding of test.html
> with BBEdit (should be Unicode (UTF-8))?

yes, BBEdit shows "Unicode (UTF-8)" in the bottom bar.
That is what's puzzling me...


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: encoding woes!?

2019-10-29 Thread hh via use-livecode
Did you check the encoding of test.html
with BBEdit (should be Unicode (UTF-8))?



___
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 text chars in an image

2019-10-29 Thread Phil Davis via use-livecode
Thanks for your great ideas Hermann. In my next experiment I think I'll 
start by looking for any scrabble tile by looking for its [known] 
background color, and then work out to its edges. That should give me 
both the grid cell size and a starting point for discovering all cells 
in the grid.


Unless anyone knows of something simpler?

Thanks -
Phil



On 10/28/19 5:43 PM, hh via use-livecode wrote:

Phil D. wrote:
So maybe I should first be asking about detecting the grid
established by the scrabble letters.

You need some criteria to find the topleft of the grid and the
size of one letter: color/transparency/a marker(fixed image part)...
You could also use pattern recognition for that.

Then it's the easy part to get all possible letters by computing the
grid and crop (get from imageData) the grid elements by script.
Then doing the OCR for each single char.

If you need that for a standalone, then 'tesseract' with its huge
language packs is probably not appropriate and 'ocrad' could be
good enough for that.

___
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




--
Phil Davis
503-307-4363


___
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: encoding woes!?

2019-10-29 Thread Klaus major-k via use-livecode
Hi Brian,

> Am 29.10.2019 um 18:44 schrieb Brian Milby via use-livecode 
> :
> 
> Binfile?

tried that, no difference.
The dictionary als uses just FILE in the examples.

> Thanks,
> Brian
> On Oct 29, 2019, 1:33 PM -0400, Klaus major-k via use-livecode 
> , wrote:
>> 
>> 
>>> Am 29.10.2019 um 18:24 schrieb Klaus major-k via use-livecode 
>>> :
>>> 
>>> Hi all,
>>> 
>>> macOS 10.14.6, LC 9.5
>>> 
>>> I have a file created with BBEdit with this content:
>>> --
>>> 
>>> 
>>> -
>>> 
>>> 
>>> äÄüÜöÖßßß
>>> 
>>> ---
>>> Then I set the url of a browser widget to that file.
>>> All fine so far...
>>> 
>>> Now I want to add some more text with umlauts to that file:
>>> ...
>>> ## put the htmltext of widget "browser" into tText
>>> ## Looks exactly like the above in the debugger!
>> 
>> ## it makes NO difference if I first do this instead:
>> put textdecode( the htmltext of widget "browser","Native") into tText
>> ...

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: encoding woes!?

2019-10-29 Thread Brian Milby via use-livecode
Binfile?

Thanks,
Brian
On Oct 29, 2019, 1:33 PM -0400, Klaus major-k via use-livecode 
, wrote:
>
>
> > Am 29.10.2019 um 18:24 schrieb Klaus major-k via use-livecode 
> > :
> >
> > Hi all,
> >
> > macOS 10.14.6, LC 9.5
> >
> > I have a file created with BBEdit with this content:
> > --
> > 
> > 
> > -
> > 
> > 
> > äÄüÜöÖßßß
> > 
> > ---
> > Then I set the url of a browser widget to that file.
> > All fine so far...
> >
> > Now I want to add some more text with umlauts to that file:
> > ...
> > ## put the htmltext of widget "browser" into tText
> > ## Looks exactly like the above in the debugger!
>
> ## it makes NO difference if I first do this instead:
> put textdecode( the htmltext of widget "browser","Native") into tText
> ...
>
> --
> 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


Re: drag'n'drop in text fields

2019-10-29 Thread Klaus major-k via use-livecode
Hi Brian,

> Am 29.10.2019 um 18:34 schrieb Brian Milby via use-livecode 
> :
> 
> In those cases the selection change is a side effect of something else.  The 
> user isn’t changing the selection, the user is doing something else that 
> changes the selection.  As this thread covered, the textchanged message is 
> sent.
> 
> I think it fully makes sense to only send one of those two messages.  

noone wanted to do that. 8-)
I replaced "on selectionchanged" with "on textchanged" and that solved my 
problem.

> Otherwise just about every key press inside a field would generate 2 messages.
> 
> Thanks,
> Brian

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: drag'n'drop in text fields

2019-10-29 Thread Brian Milby via use-livecode
In those cases the selection change is a side effect of something else.  The 
user isn’t changing the selection, the user is doing something else that 
changes the selection.  As this thread covered, the textchanged message is sent.

I think it fully makes sense to only send one of those two messages.  Otherwise 
just about every key press inside a field would generate 2 messages.

Thanks,
Brian
On Oct 29, 2019, 10:59 AM -0400, Paul Dupuis via use-livecode 
, wrote:
> On 10/29/2019 9:47 AM, Brian Milby via use-livecode wrote:
> > It looks like selectionChanged only reacts to explicit user events (mouse 
> > click or cursor moved via keyboard navigation).
> I, for one, would consider user-driven pasting of text or user driven
> drag and drop to be 'explicit user events', so I would still consider
> this an engine bug rather than a documentation bug.
>
> ___
> 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: encoding woes!?

2019-10-29 Thread Klaus major-k via use-livecode


> Am 29.10.2019 um 18:24 schrieb Klaus major-k via use-livecode 
> :
> 
> Hi all,
> 
> macOS 10.14.6, LC 9.5
> 
> I have a file created with BBEdit with this content:
> --
> 
> 
> -
> 
> 
> äÄüÜöÖßßß
> 
> ---
> Then I set the url of a browser widget to that file.
> All fine so far...
> 
> Now I want to add some more text with umlauts to that file:
> ...
> ## put the htmltext of widget "browser" into tText
> ## Looks exactly like the above in the debugger!

## it makes NO difference if I first do this instead:
put textdecode( the htmltext of widget "browser","Native") into tText
...

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


encoding woes!?

2019-10-29 Thread Klaus major-k via use-livecode
Hi all,

macOS 10.14.6, LC 9.5

I have a file created with BBEdit with this content:
--


-


äÄüÜöÖßßß

---
Then I set the url of a browser widget to that file.
All fine so far...

Now I want to add some more text with umlauts to that file:
...
put the htmltext of widget "browser" into tText
## Looks exactly like the above in the debugger!

put "ööääüü" & CR before line -1 of tText
## Last line is the footer -> 
## And when I set the HTMLtext of widget "browser" to tText, all is fine, too
set the htmltext of widget "browser" to tText

## Then I do:
put textencode(tTExt,"UTF8") into url("file:" & specialfolderpath("desktop") & 
"/test.html")
...

When I now load that file into the widget:
...
set the url of widget "browser" to (specialfolderpath("desktop") & "/test.html")
...
Umlauts are gone like -> äÄüÜöÖßßß or worse

If I paste the same content (of tText copied from LC) in BBEdit and save the 
file it looks great
in the browser widget and Safari.

What am I missing or doing wrong?
Clueless... :-/

Thanks a lot in advance!


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


pdf conversion

2019-10-29 Thread Mark Wieder via use-livecode
I just got an email about this pdf-ocr converter. I haven't tried it 
myself, but for the $15 price drop for a lifetime license it seems worth 
checking out. Should be possible to invoke a (OSX) shell command to do 
the conversion.


The usual caveats about ocr accuracy apply, of course.

https://www.macheist.com/sales/pdf-converter-ocr-6-lifetime-license

--
 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: The Roadmap

2019-10-29 Thread Lagi Pittas via use-livecode
The silence is deafening. :-(

On Mon, 28 Oct 2019 at 21:04, Richmond via use-livecode <
use-livecode@lists.runrev.com> wrote:

> The Roadmap is more than a year out of date.
>
> https://livecode.com/resources/roadmap/
>
> Is there any chance of it being updated?
>
> Richmond.
>
> ___
> 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: Need trig & LCB help

2019-10-29 Thread hh via use-livecode
Replace the last part of your handler with the following.

variable tBNum as Number
variable tBCenters as List

put tBigRad - tLilRad into tInnerRad
put the number of elements in mData into tBNum
put regularPoints([tBNum,tInnerRad,tBigX,tBigY]) into tBCenters
repeat with tButtonNumber from 1 up to tBNum
   fill circle path centered at tBCenters[tButtonNumber] \
with radius tLilRad on this canvas
end repeat

-- returns list of N regular (=evenly spaced) circle points 
-- starting at high noon, turning clockwise
-- pL = [numOfPoints,radius,centerX,centerY]
handler regularPoints (in pL as List) returns List
  variable tI as Number
  variable tPi as Number
  variable tPts as List
  put 2*pi/pL[1] into tPi
  put [] into tPts
  repeat with tI from 0 up to pL[1]-1
push point \
[pL[3]+pL[2]*sin(tI*tPi), pL[4]-pL[2]*cos(tI*tPi)] onto tPts
  end repeat
  return tPts
end polyPoints

[Untested, right out of my head, should work.]

___
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: drag'n'drop in text fields

2019-10-29 Thread Bob Sneidar via use-livecode
I disagree. Having these commands allows developrs to precicely control what 
happens during a drag and drop operation, or to prevent drag and drop if they 
want to. 

Bob S


> On Oct 29, 2019, at 07:58 , Paul Dupuis via use-livecode 
>  wrote:
> 
> On 10/29/2019 9:47 AM, Brian Milby via use-livecode wrote:
>> It looks like selectionChanged only reacts to explicit user events (mouse 
>> click or cursor moved via keyboard navigation).
> I, for one, would consider user-driven pasting of text or user driven drag 
> and drop to be 'explicit user events', so I would still consider this an 
> engine bug rather than a documentation bug.


___
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: drag'n'drop in text fields

2019-10-29 Thread Paul Dupuis via use-livecode

On 10/29/2019 9:47 AM, Brian Milby via use-livecode wrote:

It looks like selectionChanged only reacts to explicit user events (mouse click 
or cursor moved via keyboard navigation).
I, for one, would consider user-driven pasting of text or user driven 
drag and drop to be 'explicit user events', so I would still consider 
this an engine bug rather than a documentation bug.


___
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


Need trig & LCB help

2019-10-29 Thread Pink via use-livecode

In a nutshell, I am working on a widget that consists of a wheel with
buttons. Currently I've just manually calculated out where 8 buttons go, 
and
it works well, but I am trying to set it up with a user definable number 
of

buttons contained in array "mData."

Need help checking my math (and LCB syntax.) I took out some of the 
syntax

like setting paints and some other fluff, this is just calculating the
positions of each circle.

-- tBigRad is the radius of the main circle across the widget
if my width > my height then
  put my height/2 into tBigRad
else
  put my width/2 into tBigRad
end if

-- tLilRad is the radius of each small button around the edge
put tBigRad/4 into tLilRad

-- finding the coordinates of the center of the main circle
put my width/2 into tBigX
put my height/2 into tBigY
put point [(my width/2),(my height/2)] into tCenter
fill circle path centered at tCenter with radius tBigRad on this 
canvas


-- create an "inner circle" by subtracting the radius of a button 
from

the radius of the main circle
put tBigRad - tLilRad into tInnerRad
-- calculate angle in radians from the for the center of each button
put (the number of elements in mData)/(2 * pi()) into tButtonAngles

repeat with tButtonNumber from 1 up to the number of elements in 
mData

  put tInnerRad * (tButtonNumber-1 * tButtonAngles) into tAngle
  put tBigX * cos(tAngle * pi()) into tButtonX
  put tBigY * sin(tAngle * pi()) into tButtonY
  put point [tButtonX, tButtonY] into tButtonCenter
  fill circle path centered at tButtonCenter with radius tLilRad on 
this

canvas
end repeat

___
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: drag'n'drop in text fields

2019-10-29 Thread Klaus major-k via use-livecode
Hi Brian,

> Am 29.10.2019 um 14:47 schrieb Brian Milby via use-livecode 
> :
> 
> It looks like selectionChanged only reacts to explicit user events (mouse 
> click or cursor moved via keyboard navigation).  If I select a chunk of text 
> in another app and drag it in, the same thing happens (it is selected but no 
> selectionChanged message).  If I script a button to select a chunk, no 
> message either.  No message is sent when you cut/paste over/delete a chunk of 
> selected text.  When you paste in text, the selection changes (cursor 
> position moves) but no message is sent.
> 
> I did my testing on a Mac.
> 
> I think it is probably more of a documentation issue based on how it works.

yes, maybe, at least this (docs or bug) needs to get fixed. :-)

> Thanks,
> Brian

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: drag'n'drop in text fields

2019-10-29 Thread Brian Milby via use-livecode
It looks like selectionChanged only reacts to explicit user events (mouse click 
or cursor moved via keyboard navigation).  If I select a chunk of text in 
another app and drag it in, the same thing happens (it is selected but no 
selectionChanged message).  If I script a button to select a chunk, no message 
either.  No message is sent when you cut/paste over/delete a chunk of selected 
text.  When you paste in text, the selection changes (cursor position moves) 
but no message is sent.

I did my testing on a Mac.

I think it is probably more of a documentation issue based on how it works.

Thanks,
Brian
On Oct 28, 2019, 5:03 PM -0400, Klaus major-k via use-livecode 
, wrote:
> Hi all,
>
> quick question LC 9.5 on macOS 10.14.6:
>
> We can drag'n'drop text into textfields and
> this works without any scripting.
>
> We can also drag'n'drop one or more files into
> a textfield and the filepath appears in the field
> where we dropped the file(s).
>
> However there does not seem to be any message
> send to the field when dropping a file, but I want
> to catch it.
>
> I tried something like:
> 
> on selectionChanged
> send "doit" to me in 10
> end selectionChanged
>
> command doit
> put the selection
> end doit
> 
> However I can see the pathname is selected but nothing
> appears in the messagebox.
>
> What am I missing or what should I do instead?
>
> Thanks in advance!
>
>
> 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


Re: callbacks in Mac video player?

2019-10-29 Thread hh via use-livecode
> Richard G. wrote:
> I stand corrected: callbacks apparently work in v9.5 under Catalina as well.

True, works here also, sorry all for the wrong info.
[Looked at my earlier tests. The problem there was the msgbox (kept hidden).]

> What do you need from LCB that's missing?

an up-to-date browser widget/libbrowser,
'set my rectangle',
basic keyboard support,
base64Encode/Decode (this is nearly done),
call JS from LCB without using a 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: drag'n'drop in text fields

2019-10-29 Thread Klaus major-k via use-livecode
Hi Hermann,

> Am 29.10.2019 um 13:41 schrieb hh via use-livecode 
> :
> 
>>> I wrote:  Why do you fear "dragxxx"? ;-) 
>> You wrote: I really don't!
> 
> I really know. Was a 'language' joke, sorry.

AHA! Now I get it (I think)! 8-)

Well my first professional job as a musician (bass player) was at "Circus 
Roncalli" 
in 1986, where I spent several months, so anything DRAGxxx related is not new 
to me 
nor something I am afraid of at all, if you know what I mean. :-)


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: drag'n'drop in text fields

2019-10-29 Thread hh via use-livecode
>> I wrote:  Why do you fear "dragxxx"? ;-) 
> You wrote: I really don't!

I really know. Was a 'language' joke, sorry.

___
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: drag'n'drop in text fields

2019-10-29 Thread Klaus major-k via use-livecode
Hallo Hermann,

> Am 29.10.2019 um 13:32 schrieb hh via use-livecode 
> :
> 
>> Klaus M. wrote:
>> Yep, I meant without any "dragxxx" script. 
> Why do you fear "dragxxx"?  ;-)

I really don't! 

But if it works out-of-the box without any dragXXX scripting,
I highly welcome this, lazy moi. :-)


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: drag'n'drop in text fields

2019-10-29 Thread hh via use-livecode
> Klaus M. wrote:
> Yep, I meant without any "dragxxx" script. 

Why do you fear "dragxxx"?  ;-)

___
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: drag'n'drop in text fields

2019-10-29 Thread Klaus major-k via use-livecode
Hi Hermann,

> Am 29.10.2019 um 00:55 schrieb hh via use-livecode 
> :
> 
> Hi Klaus.
> 
>>> I wrote:
>>> on dragDrop
>>>  if "files" is among the keys of the dragData then
>>>put line 1 of the dragData["files"] -- or whatever
>>>  end if
>>> end dragDrop
>>> 
>>> on dragEnter
>>>  set the dragAction to "copy"
>>> end dragenter
> 
>> You wrote:
>> .. also tried that, but then the pathname does not appear in the field.
>> I want to:
>> Drag'n'Drop a file into the field -> works without scripting
>> The pathname appears in the field and is definitively selected!
> 
> Three remarks.
> 1. the filename ends up in the message box if you dont use the "whatever" ;-)

I guessed! 8-)

> 2. textchanged is also a script ;-)

Yep, I meant without any "dragxxx" script. 
CoughnitpickerCough... ;-)

> 3. Your method doesn't work for locked fields, the following does:
> on dragDrop
>  if "files" is among the keys of the dragData then
>put line 1 of the dragData["files"] into fn
>focus on me; put the selectedChunk into sc
>put fn into the selection
>if sc is not empty then select char (word 2 of sc) to \
>  (word 2 of sc +len(fn)-1) of me
>  end if
> end dragDrop
> 
> on dragEnter
>  set the dragAction to "copy"
> end dragenter

Thanks, but my field is unlocked.

I reported the problem that "selectionchanged" does not get triggered:



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: past unformatted & inspector field "styled text"

2019-10-29 Thread Klaus major-k via use-livecode
Hi all,

> Am 28.10.2019 um 19:32 schrieb Klaus major-k via use-livecode 
> :
> 
> Hi Craig,
> 
>> Am 28.10.2019 um 19:24 schrieb dunbarx--- via use-livecode 
>> :
>> 
>> Klaus.
>> All works for me here.
>> It is possible you have not placed a blinking cursor into the inspector 
>> field?
> 
> I can SEE the pasted (unformatted) text in the field, but the text does not 
> make it into
> the field on the cqard. When I switch the TABs in the inspector and get back 
> to "styled text" 
> no text in the field in the inspector.
> 
> One minute later...
> 
> AHA, looks like I need to hit ENTER to "confirm" my pasting!?
> Yep, after hitting ENTER it works as exspected, sheeesh... :-)

reported: 


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