Cross-platform Bluetooth and Speech to text

2020-03-27 Thread R.H. via use-livecode
For an interactive learning app using audio and video, I received a request
to use Bluetooth to control the player remotely.  Also this app shall be
extended later to speech commands such as: "Go back", "Go forward", "Stop",
"Next lesson", "Repeat section" etc.

Cross-platform Blootooth

I see that there is mergeBLE for Blootooth for iOS and OS X, but not for
Windows and Android. Since the mergeBLE Bluetooth API is not supported on
Android, Windows, Linux, would it be possible to use LCB to develop such
interface? Does anyone of you know of any plans to support the full set of
Bluetooth (up to version 5) on all or at least the major platforms? Maybe
there are some cross-platform libraries that could be used? There are Java
and Objective-C libraries I know. But I would not know how to make them
available to LiveCode.

Cross-platform Speech to Text

Has anybody ever implemented "speech to text" (not TTS)? It should be
possible with the browser widget using web API's: Microsoft Cognitive
Serrvices, IBM Watson, Speechmatics...? But ideally, it would not depend on
available Internet connection and use some good enough text recognition
engine.

Here I would like to use it for commands, but in general, I guess, it is an
interface that is used more and more also to simply bring speech to text in
all major languages.

Roland
___
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: DataGrid question: Suggestions for further enhancements

2020-04-02 Thread R.H. via use-livecode
@Bernd Niggemann

The ModTableField is a great tool when the DG datagrid is an overkill. It
works very well for me. Thank you very much for the contribution, dear
Bernd.

+ Selecting columns:

What I added was the possibility to also select columns (hilite columns)
which is done using an overlay graphic rect that automatically is adjusting
to the height of the and width of the column in the table field and sits on
top with a certain transparency. Well, of course, it also is a workaround
only and requires some scripting if users should be able to also edit cells
- mpt as easy as it sounds first. To select more than one column would then
require more than just one overlay rectangles.

Here it requires using some additional space for a selection handler on top
of each column since the current behaviour is to sort columns with
mouseDown/Up on column headers. Therefore, I would go by most standards
which is clicking on a column header selects the column, and there is an
additional icon to allow for sorting. The sorting type depends on the
content (column formats).

+ Dragging and dropping columns and rows

It would also be possible to move columns dragging and dropping them with
visual feedback. Here the known technique is in taking a screen shot of the
row or column, letting it attach to the mouse while moving, and creating an
insertion line for a column or row passing over rows/columns allowing users
to drop the selection wherever desired in the table field. To also allow
this in scrolling fields (letting the field scroll moving the mouse towards
the edges of the table field) requires quite some scripting.

+ Freezing rows and/or columns:

The other enhancement, as discussed here before, is to "freeze" 1..n
columns or rows. To my mind, this can only be done using separate fields
attached to the left or top of the table field. Again, such fields must
change size depending on the size of the basic table fields and they must
update quickly with changes and be in synchrony with the main table field.

+ Icons / images

Also nicely shown in the ModTableField. It is possible using SVG graphics
turned into an image to be used as the image source of a chracter? I think
it is, but never tried it yet.

+ Field display formats

Then there is a need to most developers setting the format of rows or
columns or individual cell to either text, date/time format, number format,
percentage, custom format and whatever. It would be a nice add-on to have
this available as a "standard" instead of each developer scripting his own.
I actually did this, but of course not in such a general way that it would
be using locales, support all international format and usable to everyone.

(I personally think that it should be a property of fields in general to
allow to set it's display format for text, date, time, number, etc. It
would be really great if there is a "display format" and a raw data storage
automatically -- no need for custom properties in such case. Since LC is
supporting the Android version of Filemaker, that is the property of fields
in Filemaker anyway.)

So, almost we end up scripting a data grid based on the table field)
Thanks to all contributions.

Enjoy ... Roland
___
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: Cross-platform Bluetooth and Speech to text

2020-04-02 Thread R.H. via use-livecode
+ STT Speech to Text

@ Paul Dupuis  ... Thank you very much for your valuable hint regarding the
STT (speech to text) link from the work of Trevor
https://github.com/trevordevore/lc-pocketsphinx who I admire for his
fantastic contributions and skills. I am already looking into this.

+ Bluetooth on Windows and Android

What I am still looking for is if anybody of you knows how to approach the
question of using Bluetooth on Windows and Android. (I am no longer an
Apple enthusiast I used to be long ago. None in general business is
using OSX anyway. Maybe 10% are using iPhones though.)

Thanks again, Roland
___
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: DataGrid question: Suggestions for further enhancements (Bob Sneidar)

2020-04-03 Thread R.H. via use-livecode
@ Bob S

Sure, you are right that the DG data grid supports most of what users might
wish to have.

My point was that there is a nice enhancement to the table field from Bernd
Niggemann and that it could even be further enhanced -- without arguing
about DG vs table field. Even if that would only be an exercise.

Would yor argument not also mean that you simple could skip the table
field? I still use it.

For a long time I have been using Filemaker as a database and application
tool. The ease of use in just dragging all kinds of objects to the portal
(similar to the data grid row template) is compelling in terms of user
friendliness. But there is  a DataGrid helper...  by
https://www.aslugontheroad.com/

So, maybe we could then argue about how the DG could be improved? )

Roland
___
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: Trying to use the Segmented Control

2020-11-30 Thread R.H. via use-livecode
Basically, I think, it is a nice widget.

--- But sometimes, I would like to show text with icons together, or each
icon in a different color. Possible?

--- Then I would like to import whatever icon or image and individually set
its size, and margins individually. I like to have access to the details of
each segment and it's look and feel. Even each segment's rect and other
details should be modifiable. I would like to be able to define the size
and the color of each object's border and dividing lines. The only way
around is scripting lines or whatever to be used as an overlay -- which is
a kludge. But is it possible using LCB to address individual parts and
define a more detail-grained API?

--- Messages: I do not understand why not standard mouse messages would
work here and are not supported.  Other messages than just "hilitedChange"
should be detected. But it would be important, in my opinion, to allow each
and every graphical widget to detect mouseWithin, mouseMove, mouseDown,
mouseUp, mouseEnter, mouseLeave, etc.

Is there anybody working on such widgets and updating them to newer
versions? Is there a version history for each widget?

The documentary of the widget (widgets) in the Dictionary could be enhanced
with a first date of appearance and dates of new versions as well as
enhancement requests or planned enhancements? I assume the author is
LiveCode Ltd.?

Roland
___
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: Trying to use the Segmented Control

2020-12-03 Thread R.H. via use-livecode
@ Ralf

Hi Ralf

Your link and what I can see looks very promising. I will certainly try
this out.

Thanks a lot. At first glance, it looks very professional. I guess it is
... )))

Roland
___
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: Trying to use the Segmented Control

2020-12-03 Thread R.H. via use-livecode
@ Richmond

Richmond, to be honest, I am quite ignorant about developing widgets. I
never took the time to dig deep into them. It is certainly my fault.

So, I cannot say whether or not it is hard work and how much work. But from
a user (developer) perspective, I think we can freely formulate our wishes?
If this is ignorant -- then, yes, I am in this case ) -- so even if this is
the case, I am trying to create (my) a wishlist.

(1) To me, most widgets make sense only when they can be used universally.
This also means that they work on all platforms LiveCode is supporting. I
guess that it is hard, but the fundaments were provided by LiveCode Ltd.

(3) I understand that certain widgets are based on DLLs or functions of the
OS that might be different on different platforms or not available at all.
I do not like it, but I have to accept this fact. But any widget that
breaks the universal rule stands out breaching the promise of
platform-interoperability.

(3) For widgets, I wish that it should be possible during development to
simply enable or disable all messages that also other controls in LiveCode
receive. At least a list of checkboxes that enables the developer to work
all types of messages when enabled. For example, why this segmented control
does not receive a mouseDown message, I cannot explain. I do not understand
it. I have to script around it and that should not be.

(4) I think that a standard widget must support all properties as in all
other controls, but the list of properties might be limited to the specific
use, of course. If a widget is not visual then it makes no sense to change
it's rect. But if visual, then it usually has the properties and way for
manipulation as at least other such controls.

(5) A well documented API to access properties and functions that is based
on a standard. I guess this is more or less already the case?

(5) One of my biggest wishes for all LCS controls (fields, buttons, ...) is
the same as for all widgets: Enable to manipulate details as they are found
using CSS (at least a good-enough subset), and that includes settings for
individual borders, etc. If that would be the case, even using CSS could be
parsed in such a way that it would reflect in our graphical objects. When
scripting in CSS and HTML, I really have quite some detailed control.

(6) If (5) would work then it would also be possible to script an "engine"
to transform LC into a webpage using CSS. The problem would still exist to
transform LiveCode Script into JavaScript. Probably, that is not really
possible. The platforms are very different. But again, we are allowed to
express wishful thinking...) -- I am not now going into the "HTML"
possibility. The user opinions are quite obvious.

Slowly, I am working on a general usage product to eventually sell, I am
thinking ahead to offer solutions for the major platforms (Android,
Windows, iOS, OSX and Linux). But definitely, there also must be a web
application. So far, I only worked either in-house (hobby, private usage),
or for very specific solutions in a vertical market.

So, big thanks for your comment. I just tried to elaborate a bit.

If you or others can correct me -- that is fine. I am always eager to learn.

Wishing all here the best
Roland
___
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


Keeping soft line break and using clipboard data

2020-12-04 Thread R.H. via use-livecode
I am using Windows 10, LiveCode Indy 9.6.1

Here is a question I tried to solve using clipBoardData, fullClipBoardData
and rawClipboardData. I am aware that there is nothing in Livecode that
represents soft line breaks, for example as a Unicode character (unless I
could not find anywhere). But I need to preserve such existing soft line
breaks since I need to copy text from a word processor into other programs
that support such soft returns.

For example, in most email apps the key-combination Shift-Return breaks the
line, but it is not a hard LFCR (depending on platform) and the paragraph
is not touched. It HTML it would be a " instead of .  But pasting
such text into LCS will only convert those soft returns to hard returns.

So, I thought to use the clipboard, getting the binary data of the text
file (UTF8-encoded including soft returns) with an URL(binfile:),
encoding them in one way or the other, and the user will then be able to
paste the copied text including those hidden soft returns into the target
application. In this way, I hoped to circumvent the LCS text representation.

Unfortunately, I did not get it to work one way or the other. Is it
possible at all? Did anybody ever had such a need and solved it?

Roland
___
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: Some sad news

2020-12-04 Thread R.H. via use-livecode
Oh, I am shocked. I deeply felt condolences to his family and friends.

I had a chat with him at the beginning of the year, and I was thinking of
calling him since he seemed to be grumpy that we did not follow up fast
enough to meet his demands. Now this... (

Yes, he was brilliant. May he have fun looking at us from above...

Roland
___
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: Trying to use the Segmented Control

2020-12-10 Thread R.H. via use-livecode
@ Ralf Bitter

Dear Ralf, I downloaded your segmented control from:
https://github.com/revig/universal-button-widget/releases/tag/1.0.1

and I installed the widget using the Extension Manager in the IDE.

It looks very nice. Exactly what allows control and even change the
behavior. First time users should know that the custom properties (as
described by you) are custom properties of the group "menuBtnGrp". For a
first time, two visible switches would probably allow users to just test
without having to look under the hood.

Since I must build such button groups dynamically (users can add or remove
modules which then appear put on the navigation bar that is constiung of
such "buttons") I will just need to script this a bit in more detail.

I also wrote my own bar using a table field where I mimic the hiliting and
hover (mouseover) effect when moving the mouse over lines or using arrow
keys (up and down. It looks like a button bar when using an image source
for a first character. But it does not work for SVG as far as I know. And
it only works for vertical "bars". On the other hand, it is very easy to
dynamically create and remove lines. Actually, I track the mousemove and
detect the line number and then place a transparent graphic over the
selected line. This gives more control than using the built-in hilited
property.  If someone is interested, I can send...

So, thanks a lot to you for providing this, and I am sure I will have fun
using it...

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


Parsing properties in Link- and Internet Shortcut files

2021-02-12 Thread R.H. via use-livecode
I am on Windows 10 (but answer will apply to MacOS as well).

I am trying to read the URL property of a file that I create simply
dragging-dropping the Internet address from my browser to the Desktop and
then storing this file. There are thousands now!!!

Some of such files are readable text files with the readable content
"[internetshortcut], URL: xxx etc." -- but most Internet shortcut files on
Windows with the invisible .url or .ink extension are empty when trying to
read with using a text editor or opening them in LiveCode.

In such Windows file's there is a property url: that contains the web
address. It is visible when opening using the right mouse button (context
menu) and then selecting the "properties" item. When double-clicking such
file, the default browser will open and open the web page directed to.

But I want to read this URL property as text directly and use it from
within LiveCode.

I assume that these Internet shortcuts store the URL information not in the
file itself, or I just cannot get to this information.

I found one batch file script that promises such a solution. Such batch
text file can be called through the SHELL() command and will then execute.
It has the file extension ".bat".

#-- START BATCH SCRIPT
echo off
setlocal enableextensions enabledelayedexpansion
pushd %1
for %%F in (%1\*.url) do (
   echo %%~dpnxF
   call :findurl "%%~dpnxF"
)
popd
goto end
:findurl inputfile
set url=
for /f "tokens=2 delims==" %%i in ('findstr URL %1') do set url=%%i
echo %url%
echo -
:end
#-- END BATCH SCRIPT

Unfortunately, my knowledge of such batch scripts is very limited.

I get error messages when calling the batch file through the shell
function. Maybe there is someone here who can interpret this script? To me
it would be sufficient to simply call shell("location of the file and file
name of the url-file .. shell commands") and receive back the URL property
as text. Or is there any other way to get to this information?

Since LC is cross-platform, such solution also would be nice to have for
OSX and Linux?

Regards, Roland
___
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: Parsing properties in Link- and Internet Shortcut files -- SOLVED for Windows 10

2021-02-12 Thread R.H. via use-livecode
Tested on Windows 10:

I now found and tested the batch file script that works now:

Create a batch file, for example "GetURL.bat"
Edit the file with a text editor (Notepad++ or whatever)

Put the following script into this file:

:: START OF SCRIPT -- comment line
@echo off
setlocal enableextensions enabledelayedexpansion
pushd %1
for %%F in (%1\*.url) do (
   echo %%~dpnxF
   call :findurl "%%~dpnxF"
)
popd
goto end
:findurl inputfile
set url=
for /f "tokens=2 delims==" %%i in ('findstr URL %1') do set url=%%i
echo %url%
echo ---
:end
:: END OF SCRIPT -- comment line

Save the file and place it for this demo in the C:\folder (which is
accessible for admins only. Otherwise use a "documents/..." folder.

-- Usage
When calling the .bat file here we assume that the .bat file is in the C:\
directory .

...Calling from Windows CMD opened with Administrator rights:
 C:\GetURL.bat "C:\Users\\Desktop\Links"

This assumes that there is a folder "Links" on the desktop containing the
Internet shortcut file (hidden file extension .url) and that you want to
read the content of the URL plus the filename.

-- Now, we can call the .bat file from LiveCode with a little script in a
test button:

on mouseUp
# Example script to call the .bat file:
   set the hideconsolewindows to true
   put "C:\GetURL.bat" into tCmd -- Calling the commands in the .bat file
   put "C:\Users\Rolan\Desktop\Links" into tFolder -- The folder containing
Internet Shortcut files .url
   put tCMD && tFolder into tCommand
   put shell (tCommand) into msg --x Could be messages box or any field...
end mouseUp

-- Example output in the message box  (a list of .url files with the
content of their url)

The script in the .bat file looks at all files with a .url extension in the
folder specified and returns the name and the URL content of that file.
Each record is separated by three "---".

C:\Users\Roland\Desktop\Links\simultaneous multiple database access -
LiveCode Forums.url
https://forums.livecode.com/viewtopic.php?t
---
C:\Users\Roland\Desktop\Links\Sons of Thunder Software - Developer
Resources - LiveCode.url
http://www.sonsothunder.com/devres/livecode/livecode.htm
---
C:\Users\Roland\Desktop\Links\Sons of Thunder Software - Products.url
http://www.sonsothunder.com/products/products.htm

---

Please, if there is anything for Mac (OSX) and Linux, we could publish this
in the Forum.


Roland

P.S: I will also check how to read the local .ink files that are shortcuts
to files and folder in Windows. It should also be possible using this for
".ini" files.
___
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: Parsing properties in Link- and Internet Shortcut files -- SOLVED for Windows 10 -- Added remarks

2021-02-12 Thread R.H. via use-livecode
Hi there

Windows 10:

The .bat file is required for those .url files that do not give you a text
when opening (and that was the problem).
Some of the .url files can also simply be read using this sample script.
(And these specific files cannot be read with the .bat file as I seem to
recognize. Further testing is needed.)

on mouseUp  local tFilePath
 ask "Please paste the file path"
 if it is not empty then put it into tFilePath
 put URL("binfile:"&tFilePath) into msg
end mouseUp

You must provide the filepath with the filename.
The result (as an example):

Example output for .url file (same file not readable with the .bat)
   [InternetShortcut]
   URL=https://cosi.lino-framework.org/tour/index.html

Greetings, Roland


On Fri, Feb 12, 2021 at 11:11 PM R.H.  wrote:

> Tested on Windows 10:
>
> I now found and tested the batch file script that works now:
>
> Create a batch file, for example "GetURL.bat"
> Edit the file with a text editor (Notepad++ or whatever)
>
> Put the following script into this file:
>
> :: START OF SCRIPT -- comment line
> @echo off
> setlocal enableextensions enabledelayedexpansion
> pushd %1
> for %%F in (%1\*.url) do (
>echo %%~dpnxF
>call :findurl "%%~dpnxF"
> )
> popd
> goto end
> :findurl inputfile
> set url=
> for /f "tokens=2 delims==" %%i in ('findstr URL %1') do set url=%%i
> echo %url%
> echo ---
> :end
> :: END OF SCRIPT -- comment line
>
> Save the file and place it for this demo in the C:\folder (which is
> accessible for admins only. Otherwise use a "documents/..." folder.
>
> -- Usage
> When calling the .bat file here we assume that the .bat file is in the C:\
> directory .
>
> ...Calling from Windows CMD opened with Administrator rights:
>  C:\GetURL.bat "C:\Users\\Desktop\Links"
>
> This assumes that there is a folder "Links" on the desktop containing the
> Internet shortcut file (hidden file extension .url) and that you want to
> read the content of the URL plus the filename.
>
> -- Now, we can call the .bat file from LiveCode with a little script in a
> test button:
>
> on mouseUp
> # Example script to call the .bat file:
>set the hideconsolewindows to true
>put "C:\GetURL.bat" into tCmd -- Calling the commands in the .bat file
>put "C:\Users\Rolan\Desktop\Links" into tFolder -- The folder
> containing Internet Shortcut files .url
>put tCMD && tFolder into tCommand
>put shell (tCommand) into msg --x Could be messages box or any field...
> end mouseUp
>
> -- Example output in the message box  (a list of .url files with the
> content of their url)
>
> The script in the .bat file looks at all files with a .url extension in
> the folder specified and returns the name and the URL content of that file.
> Each record is separated by three "---".
>
> C:\Users\Roland\Desktop\Links\simultaneous multiple database access -
> LiveCode Forums.url
> https://forums.livecode.com/viewtopic.php?t
> ---
> C:\Users\Roland\Desktop\Links\Sons of Thunder Software - Developer
> Resources - LiveCode.url
> http://www.sonsothunder.com/devres/livecode/livecode.htm
> ---
> C:\Users\Roland\Desktop\Links\Sons of Thunder Software - Products.url
> http://www.sonsothunder.com/products/products.htm
>
> ---
>
> Please, if there is anything for Mac (OSX) and Linux, we could publish
> this in the Forum.
>
>
> Roland
>
> P.S: I will also check how to read the local .ink files that are shortcuts
> to files and folder in Windows. It should also be possible using this for
> ".ini" files.
>
>
>
___
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: Parsing properties in Link- and Internet Shortcut files

2021-02-26 Thread R.H. via use-livecode
Dear Hakan

Thank you very much for this information. As you may have noticed, I had
solved the problem using the Batch file the same day I posted the question
for Windows.

For Mac, I had no idea and your input is highly appreciated. For Linux I
also do not know.

Actually, these special files on Windows (with the hidden ".url" extension)
are usually fine to read simply using URL("binfile:" & tFilePath ). My
problem has be with a number of files that returned empty for unknown
reasons.

It is a more difficult to parse "shortcut" or ".lnk" files in Windows since
they have a binary format and to extract relevant information requires
knowing the detailed file structure and reading relevant bytes or trying a
hack to extract the readable links they represent without (which I did so
far). Also for these files, Windows hides the extension ".lnk", but it is
visible when calling files (tFolderpath) in LiveCode.

Happy weekend
Roland

On Fri, Feb 26, 2021 at 2:52 PM  wrote:

> On macOS URL link files are stored as a plist-file like:
> 
>  http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
> 
> 
> URL
> https://lessons.livecode.com/
> 
> 
>
> So you can open the file as text and then parse the content.
>
> :-Håkan
> On 12 Feb 2021, 18:55 +0100, R.H. via use-livecode <
> use-livecode@lists.runrev.com>, wrote:
>
> I am on Windows 10 (but answer will apply to MacOS as well).
>
> I am trying to read the URL property of a file that I create simply
> dragging-dropping the Internet address from my browser to the Desktop and
> then storing this file. There are thousands now!!!
>
> Some of such files are readable text files with the readable content
> "[internetshortcut], URL: xxx etc." -- but most Internet shortcut files on
> Windows with the invisible .url or .ink extension are empty when trying to
> read with using a text editor or opening them in LiveCode.
>
> In such Windows file's there is a property url: that contains the web
> address. It is visible when opening using the right mouse button (context
> menu) and then selecting the "properties" item. When double-clicking such
> file, the default browser will open and open the web page directed to.
>
> But I want to read this URL property as text directly and use it from
> within LiveCode.
>
> I assume that these Internet shortcuts store the URL information not in the
> file itself, or I just cannot get to this information.
>
> I found one batch file script that promises such a solution. Such batch
> text file can be called through the SHELL() command and will then execute.
> It has the file extension ".bat".
>
> #-- START BATCH SCRIPT
> echo off
> setlocal enableextensions enabledelayedexpansion
> pushd %1
> for %%F in (%1\*.url) do (
> echo %%~dpnxF
> call :findurl "%%~dpnxF"
> )
> popd
> goto end
> :findurl inputfile
> set url=
> for /f "tokens=2 delims==" %%i in ('findstr URL %1') do set url=%%i
> echo %url%
> echo -
> :end
> #-- END BATCH SCRIPT
>
> Unfortunately, my knowledge of such batch scripts is very limited.
>
> I get error messages when calling the batch file through the shell
> function. Maybe there is someone here who can interpret this script? To me
> it would be sufficient to simply call shell("location of the file and file
> name of the url-file .. shell commands") and receive back the URL property
> as text. Or is there any other way to get to this information?
>
> Since LC is cross-platform, such solution also would be nice to have for
> OSX and Linux?
>
> Regards, Roland
> ___
> 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. Parsing properties in Link- and Internet Shortcut files

2021-02-26 Thread R.H. via use-livecode
@ Matthias

Windows 10 with "ink" and "url" files:

Thank you very much for the link regarding ".lnk" files. I did not see this
before. I will look into it. I also checked the binary format as published
by Microsoft. I just answered Hakan without having read your suggestion. )
Sorry that I did not read your message before.

Regarding the empty files (maybe they could just not be read in LC for
whatever reason): Unfortunately, I have deleted them all. They had
assembled for years and I extracted their links with the Batch and stored
the links in a database.

Testing with different browsers dragging the Internet links, for the moment
there is no problem reading with such ".url" files. So, the problem may
have be very specific to my system and may not need further attention. If I
still find such file then I will it send to you. No problem.

Thanks to all here for attending
Roland
___
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: Parsing properties in Link- and Internet Shortcut files

2021-02-27 Thread R.H. via use-livecode
@ Hagan
@ Matthias

I posted my hack on the forum also mentioning our discussion here:

https://forums.livecode.com/viewtopic.php?f=7&t=35458

Of course, if some one has clean solution to actually read Window's binary
".lnk" file, it would be another lesson to enjoy. Unfortunately, I cannot
do it now because of time constraints. But the solution works (for me).

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


[ANN] New Book: Development Oriented Development

2021-03-16 Thread R.H. via use-livecode
Hi Andre

I have purchased your new book and downloaded the three versions (very
clever in three formats!).

https://payhip.com/b/18eH

With me is also your other book published first. Somewhere I read that you
updated that version. Can I download that somewhere as well? Or is there
some update price?

This purchasing page looks very professional and nice. But there is no link
to your other products or possibilities to contact you from that page.
Maybe a small preview would also possibly attract more readers? Anyway..
the price is very modest.

Regards, Roland
___
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: Unreliable File Deletion

2021-03-28 Thread R.H. via use-livecode
@ Peter Reid

Your message found my attention.
Also I am working on Windows 10 and have the same problem using LC 9.6.1
Indy version.

The problem with copying text to the clipboard and then pasting it into
other applications results in inserting double lines. I think there was a
discussion about the clipboard on the forum or here recently. Instead of
directly copying the text, I create a temp file temp.txt, insert the text
to be copied, then read the file and then I can paste the text reliably.
The file is then deleted.

The similar or same problem as you have: I want to delete the text file.
The command I issue is "detele file ". The error it returns:
"Can't delete file".

So, I tried using a forced Shell command which did not work (probably it
needs Admin rights). But the standard Shell command deletes the file.

Here is the script snippet:

// The original purpose of using this script as part of a larger script is
to copy column names of a database table to the clipboard and insert them
anywhere.

## Script snippet calling Shell (Windows 10/64)
// Save data to external file to get rid of wrong carriage returns in
Windows
// Copy data as text to the clipboard
// Space are replaced by "." for this message list
// A temporary text file is created and shall be deleted after usage
// tOut contains the resulting data from before...
//  myMsg is a separate custom message handler that directs messages either
to the message box, writes to a log file or places the message into a
field, or all together...)

... local tOut
... local tFilePath
... local tResult
... local tCmd

... put specialfolderpath("resources") &"/temp.txt" into tFilePath
... put tOut into URL("binfile:"&tFilePath)
... put URL("binfile:"&tFilePath) into tOut
... set the clipboarddata["text"] to tOut

... // Delete temp file
... delete file ("binfile:"&tFilePath)
... put the result into tResult
... if "can't delete that file" is in tResult then

.. myMSG tHInfo & "File could not be deleted." &CR& tFilePath --> My
message handler
.. if the platform is "win32" then
. set the hideConsoleWindows to true
. replace "/" with "\" in tFilePath
. put quote & tFilePath & quote into tFilePath
. put "del "&tFilePath into tCmd -- this shell command works for me
. put shell(tCmd) into tResult
. put CR& the result after tResult
. /* Comment: Error messages appear when using "rmdir /s /q"
. to force delete the file
. Error message: Invalid switch - "Users".  */
. myMSG tHInfo & tResult --> My message handler
.. end if
... end if
##/ End script snipped

So, if other users have the problem that a file cannot be deleted with the
"delete file" command (even though it he file tit is not flagged as part of
another process or flagged as "cant delete") then this seems to be a bug.

I would report it if I am not the only one seeing the problem.

Roland
___
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: Unreliable File Deletion

2021-03-30 Thread R.H. via use-livecode
Referring Date: 2021-03-29 09:04:04 +0100
From: Mark Waddingham 
Subject: Re: Unreliable File Deletion
Message-ID: 

Environment: Windows 10, 64bit
LC: Version 9.6.1

Dear Mark, Richard and all

Thank you for your replies ))).

Your comments are -- of course -- right, but I made a mistake in posting
something that was incorrectly typed.

Your wrote:
> ll cases of people reporting bugs with 'delete file' on Windows that I
> have seen fall into one of two cases:
> 1) The path they give to 'delete file' is wrong.
> 2) The file they are trying to delete is open by the app, or by another
app.

I am using URL ("binfile:"&) to read and write from and to the
file.
For deleting I was and I am using and always have been using "delete file
".

Unfortunately, I stated this incorrectly when retyping it to compose it as
part of my message as I changed the original statement here and there, but
it is not in the actual statement. This is my mistake to post it as such
and I apologize.

The file is in a writeable/readable location. It is neither protected, nor
is it used by any other service/app.

On my system (Windows 10) asking for specialfolderpath("resources") result
in the following path: "C:/Users/Roland/Documents/LC-Recent/LSP_App". This
is so because I put it there.

It is in the DOCUMENTS folder and therefore should not give problems.
But the same problem with deleting appears also when using
specialfolderpath("documents").

At other times, it worked! It is not something that is very transparent for
now.

Since on the Desktop and in any such user directory I can delete files
without assigning Admin rigths, the problem should not be a system problem.
I can also issue a shell command, as I posted, to delete and it works well
without problems. This at least is my fallback in case LC does not delete
my temporary file/s. So, actually, I use my function and do not care as it
solves what it needs to solve (just replace the wrong "delete file
(binfile.." part and put "delete file ").

I know that other apps can use files and then it will be possible to delete
such files for good reasons. But that is not the case here.

I can investigate other possibilities, but nevertheless, it should work in
such directory. If I find the time to check out the error also looking at
the system message, I will do and post if there is anything that makes it
more clear.

Thanks Richard for posting your additional error investigation. I will
check it out later as currently I am in a rush job.

Your posting:
> delete file tFile
>  if the result is not empty then
>  answer the result &" ("& sysError() &")"
>  end if

Regards to everyone here
Roland
___
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


Bug? Specific binary character throws errors in scripts (even when commented out)

2021-04-21 Thread R.H. via use-livecode
I am reading binary data from a .LNK file on Windows 10 using LC 9.6.1.

There is a character that looks visually like a dot ".", but it is not, and
using the chartonum() function or placing it in a script (even when
commented out) results in an error message. The whole script will not work
and be interpreted.

I overcame the problem using this fragment in my parseSymbolicLink()
function.

...put URL("binfile:"&pFilePath) into tContent1
...put binaryDecode("a*",tContent1,tContent2)
...repeat for each char tChar in tContent1
.put chartonum(tChar) into n
.if n > 31 then put tChar after tContent3
...end repeat

But nevertheless, it made me be curious.

Also, probably everyone has seen this, sometimes, especially in list
fields, characters scramble up in one place and become unreadable, this
happens with some characters it seems, but also just with usual ASCII in
long strings. It happens from time to time and I see it at least for the
last 10 years...

Are there such codepoints/characters that are known to stop the system from
working in a script and using any function on them?

Roland
___
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: Stuck on native database functions

2021-07-13 Thread R.H. via use-livecode
@Bob Sneidar

Hello Bob

The documentation bug was resolved in the latest version:
https://quality.livecode.com/show_bug.cgi?id=23074

It was also tricky for me until I found out how to quote variables and
arrays that point to data when sending data to my mySQL database as the
documentation was not quite up to the point.

Hope you solved your problem.

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


How to suppress the Modal Purge dialog? -- Name space conflict

2021-09-19 Thread R.H. via use-livecode
Hi everyone

I have a need to programmatically open about 200 stacks, do something, and
the close them. In this case, for documentation reasons, I take a
screenshot from every stack, every card, and every substack and their cards
to export it.

My problem is that there are number of stacks that have the same stack name
(apart from a different file name), and loading them into memory (opening
them) sometimes creates a naming conflict if a stack with the same name
already is loaded -- and these are library stacks, etc.

The known modal dialog appears to allow to purge such stack. This dialog
seems to appear before even any error message could be intercepted.

Can this purging be automated and the dialog be suppressed? I found no way
(using the "try" construct, locking messages, etc.) to suppress this dialog
and just do the purge from script.

I assume that it could eventually be done messing with the strack in the
IDE that generates the dialog. But I do not really want to do this for
principle reasons.

Another way is to make sure that there are never same stack names (which
are only known after opening), but that is almost impossible to control and
might break certain stack relationships -- and I am not just talking about
my own stacks, but also stacks from third parties, and opens sources.

Of course, I can make sure that there are is never more than the main stack
in memory before opening any other stack -- except the IDE stacks. But in
my special case this is not a good solution as the app relies heavily on a
number of open stacks. At least, I am still trying to find a better
solution.

Maybe a good feature for future would be to support name spaces as in other
development environments so that such naming conflicts may be avoided.
Stacks and other resources could then share a name space, and then there is
only the need to have unique names within such name space. Some people
(including myself) already mimic this using prefixes to a name. But that is
just a starting point and difficult to control. The concept of name spaces
goes beyond that.

Any ideas ? )))

have fun...
Roland
___
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


Win 11

2021-11-04 Thread R.H. via use-livecode
@Mike Kerner

I am using Win 11. I had no issues so far. All works as expected, but I
have only be using the IDE.

Now, after switching to a 1 TB SSD and 16 MB Ram, also the script editor
becomes usable under Windows. What a difference... Wow.

Have fun )

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


win 11

2021-11-05 Thread R.H. via use-livecode
@ Bob Sneidar

Hi Bob, well, I am sorry, but I am not using any Apple systems, so I cannot
test on a Mac... I can test on Win-10 and Win-11.
I have some old equipment (Win-10) and some newer Win-11.

Nobody in serious business still uses Win-8, Win-7, and before. If at all,
then people switch to Linux for older equipment. And I would do so as well.

So, if anybody needs some testing, and if time allows, I can offer my help
with Windows 10,11.

Kind regards ... Roland
___
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


Funding

2022-03-17 Thread R.H. via use-livecode
I did not receive any letter regardings any funding.

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


fontName woes

2022-10-23 Thread R.H. via use-livecode
I can confirm that on my Windows 64bit no font substyles are working in
LiveCode.

This really needs to be addressed, but may not be of such high priority, I
assume.

The text engine used is not bad but probably outdated. Or, maybe I am
wrong? Or are there just name conflicts?

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


Cross-platform font comparison (Neville Smythe

2023-01-29 Thread R.H. via use-livecode
A really great and sophisticated analysis. Thank you so much.

I am mainly on Win 11. It is true that in LC on Windows font styles are not
accessable, and never were. The italic and bold are probably just computed
and not taken from the actual style.

I hope for one day that working with fonts will be on pair with other
cross-platform tools, even if there will never be a 100% compatibility. But
at least the various font family styles must render.

Roland
___
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: How to loop through stacks with same name?

2023-04-06 Thread R.H. via use-livecode
I had all the same problems running through hundreds of stacks with the aim
to take snapshots of each to easily identify a stack visually. The dialog
for stacks with name conflicts always popped up. None of the methods worked
for me. But I will try again.

I have a lot of stacks with different versions, same name, and I do not
want to change the stack name since a stack is mostly not isolated and
needs a fixed name to communicate with other stacks. My changes of version
numbers are visible in the label name only.

One solution would be if it were possible to address a stack by id. But
that does not work even though a stack has an id. And if it were possible,
how to ensure that each id is unique?

The name conflict could probably only be solved by the Livecode team? It is
annoying frequently. But there a side effects to any solution to think
about first.

But I will try whatever may work.

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


A spinner that keeps spinning

2023-05-03 Thread R.H. via use-livecode
Andreas, a very nice work and helpful for many projects.

I habe tested your stack briefly on Windows 11 and so far, all is working
very well. I have never tested several browser widgets at once on one card.

Thank you.

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


mySQL question party

2023-05-12 Thread R.H. via use-livecode
Look up Google for the party entity relationships diagram or schema.

A "party" is either a "person" or a "organisation" (company, org) The party
is an entity ( table) that has an id. The org or person tables have a
foreign key to the party id. It is a mutual exclusive relationship. A party
must never be both.

Through the party id you have access to org and person.

The party interacts through a role and relationship table. So party "Smith"
with the role "employee" is employed by employer party "My company Ltd."
with the role "employer".

If you need the "role" entity is something you must decide. But the
relationship table is essential. Any relationship can be created with this
many-to-many table.

These are starting steps... )

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


How to search this list

2023-08-20 Thread R.H. via use-livecode
I also can not use Google search. It finds nothing in the list. If Google
is not the culprit then it deserves a bug report.
___
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: PDF

2018-05-13 Thread R.H. via use-livecode
To extract text from a PDF document, I am using a command line tool on
Windows which is available also for Linux based systems called Xpdf.

It was working well, using shell() on LiveCode Community 8x, but tested
only in the IDE on Windows.

It should work with Linux and Mac as well.

If PDFs just contain images where the text is in the image, you need to
first run it through character recognition program. Since I found that
different tools generate different results when converting image characters
in PDF to embedded text, I still find that Acrobat from Adobe is doing the
best job.

I needed this since some people had sent huge lists of numerical data in
PDF which were impossible to extract, and the manual method could taken
weeks. Also, it is helpful for building Document Management Systems where
words within associated documents need to be indexed.

Converting PDF to .docx formats (Word) usually does not give good results.
The resulting documents are quite unclean. Extracting the text also does
not necessarily result in a meaningful text if the original PDF is not
structured with clearly separated paragraphs, headlines, etc. ideally in
one top-to-bottom and left-to-right flow. So, a lot of manual work will
often be required.

Nevertheless, I can not see that PDF will lose ground as the standard for
many years to come. There are possibly billions of documents in PDF around?
What should replace it? And people are still printing.

Xpdf can generate a pure text file that can be read from LiveCode and
processed further.

*Open Source Xpdf*

http://www.xpdfreader.com/download.html

https://en.wikipedia.org/wiki/Pdftotext
Command line tools in Xpdf

The open source Xpdf toolkit also includes several command line tools which
perform various functions on PDF files:

   - *pdftotext*: converts PDF to text
   - *pdftops*: converts PDF to PostScript
   - *pdftoppm*: converts PDF pages to netpbm (PPM/PGM/PBM) image files
   - *pdftopng*: converts PDF pages to PNG image files
   - *pdftohtml*: converts PDF to HTML
   - *pdfinfo*: extracts PDF metadata
   - *pdfimages*: extracts raw images from PDF files
   - *pdffonts*: lists fonts used in PDF files
   - *pdfdetach*: extracts attached files from PDF files

Cross-platform

All of Xpdf tools are available for Linux, Windows, and Mac.

The viewer (xpdf / XpdfReader) uses the Qt toolkit.
Roland
___
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

2018-05-13 Thread R.H. via use-livecode
 Thank you, Richard, for your enlightening discussion on the ePub format
and that we should start thinking that direction.

  > Given PDF's role as a delivery vehicle, it's most commonly an extra
step
  > added to the end of a publishing process.

  > Have you asked that data provider if they have the data available in
the
  > format it was in before they went to that extra final step to convert
it
  > to PDF?

Sure, but it is rarely possible to receive such lists in table format (PDF)
or in any other format unless specially authorized and getting in contact
with developers. So, more often than less, all that is available are PDF's
when it comes to the corporate world. As long as there is a structure in
the PDF documents helping to identify for example columns and rows,
paragraphs, and chapters, it can still be part of a workflow. Otherwise,
pull your hairs. )

And otherwise, even with a lot of clutter in the output of such pdf to
text, LiveCode came to help to add some more extraction and formatting
logic -- and here LiveCode is really worth using. It can detect spaces and
easily create rows and columns for example.

  > Postel's Law is worth quoting here:

  >  "Be liberal in what you accept,
  >  and conservative in what you send."

Exactly

Then, fully accepting your logic, would it not be conceivable that LiveCode
would support a native production of ePub documents? And also convert it to
printable formats?

Since ePub is responsive, the user would have to define the output page
format when printing. Because in our world printing will continue at least
to the remaining days of my life.

We would currently have to instruct receivers of such documents to install
an ePub reader (if browsers do not yet support it) -- the Adobe Reader is
freely installed on almost every system and printing is part of the
printing process when printing to PDF as a standard.

For printing ePub, we convert ePub to PDF? Right? So, again, PDF?

Maybe invent something new for printing ePub?

I found one link that goes into more details here:
https://manual.calibre-ebook.com/conversion.html#converting-to-pdf

I even think after having a brief look at "heuristic processes" in this
article, that whatever is done here, could be done using LiveCode.

Using LESS paper, saving trees (which would otherwise be cut to burn them
as fuel?), but I still can not really get away with some paper and still
like to read books that give a tactile feeling and paper that is on your
"desktop" to consult. Old books even have a "smell", a history, a
tradition. Right? Mimic that through an electronic device?

But of course, we use our mobile phone to read and need to adjust to that
common usage today.

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


Data Grid does not work in resizeStack handler

2018-05-15 Thread R.H. via use-livecode
In LC 8 and 9 (latest versions) and on Windows 10 I tried to have a DG
adjust to the width and height of the resized window using other controls
as upper and lower borders.

All works fine without the data grid group. But when the group it is
included in the script of the handler, the resizeStack handler will neither
correctly render other controls such as buttons and fields, nor the data
grid itself.

I know that the resizeStack handler, unfortunately, does not complain about
controls/objects that are not existing, and it just may silently fail, but
this is all checked. Also, the result is empty.

Did I overlook something?

It seems that the DG group with its subgroups eats up all the processing
power when users are resizing the window, and the script fails
prematurely.

Help is highly welcome.

Roland
___
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. Data Grid does not work in resizeStack handler

2018-05-16 Thread R.H. via use-livecode
> Tom Glod wrote: "   can you post your resize script?"

Dear Tom, here is the script where the data grid fails and I do not know
why.
Thank you for taking notice.

on resizeStack w,h
## Datagrid is the "master", a list of project names.
## There is a detail form on top that opens when user clicks on a row
## The script is a card script

local tLeft=0
---

set the width of graphic "h1" to w
set the left of graphic "h1" to 0
---
set the width of graphic "r1" to w
set the top of graphic "r1" to the bottom of graphic "h1"
set the left of graphic "r1" to 0
---
put the left of graphic "h2" into tLeft
set the width of graphic "h2" to the width of graphic "h1" - tLeft - 240
if the width of graphic "h2" < 160 then set the width of graphic "h2"
to 160
set the left of graphic "h2" to tLeft
--
set the bottomright of widget "add" to w-35 &comma& h-35
set the loc of widget "cross" to the loc of widget "add"
---
set the right of field "logout" to w-15
---
set the height of graphic "v1" to h - ( the bottom of graphic "r1" )
set the top of graphic "v1" to the bottom of graphic "r1"
set the left of graphic "v1" to the left of graphic "h2"
---

## If this DG group is used then the resizeStack handler breaks
## with unpredictable results of controls:

set the width of group "dg1" to ( w - the right of graphic "v1" )
set the height of group "dg1" to ( h - the bottom of graphic "r1" )
set the topleft of group "dg1" to \
  (the right of graphic "v1") &comma& (the bottom of graphic "r1")
---

## This is a detail form on top of the table view opening
## when the user clicks a row:

set the width of graphic "project_group_header" to the width of group
"project_group"
set the width of graphic "project_group_underline" to the width of
group "project_group"
set the bottom of graphic "project_group_header" to the top of group
"project_group"
set the top of graphic "project_group_underline" to the bottom of group
"project_group"
set the left of graphic "project_group_header" to the left of group
"project_group"
set the left of graphic "project_group_underline" to the left of group
"project_group"
set the loc of field "project_group_title" to the loc of graphic
"project_group_header"
set the left of field "project_group_title" to the left of graphic
"project_group_header" +15
set the loc of group "project_group" to the loc of this card
set the top of group "project_group" to the top of \
group "project_group" - the height of graphic "project_group_header"
---

end resizeStack

Regards, Roland
___
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


Material Design - any plans to allow more granularity in design?

2018-05-16 Thread R.H. via use-livecode
Over 80% of my work in LiveCode is dedicated to user interface design.

I would like to support Material Design which is well supported by tools
such as Angular JS Material in Javascript -- and such framework (or similar
ones) give the idea of modern UIX.

I think it is worth reading for professional developers:
https://material.io/design/
https://material.angularjs.org/

Since it is a continued requirement to have more control over properties of
fields, buttons, and widgets including for example:

- Top, bottom, right and left borders
- their colors, thickness (weight), etc.
- leading, etc. or
- rounded borders to any degree
- animated visual effects for buttons/fields
- icons leading or trailing fields/buttons as part of the control
- etc.

I wanted to ask if there are any plans to implement such additional
properties for standard controls (including for widget customization) in
LiveCode?

The standard here could be: What is doable using CSS should be doable in
LiveCode "out of the box".

I can work around things more or less using graphic elements such as lines,
boxes, ovals, icons etc. , in front or behind other controls, but it adds
to the number of controls to manage, and/or it creates an inflation of
grouped controls. And animated visual effects must be supported on all
platforms.

And of course, I assume, we all want the whole toolbox to be cross-platform
which currently does not seem to be possible (native fields.. in Android,
iOS)

And widgets so far seem to be very limited to customization of their
appearance. For this very reason, they sometimes become useless to me (for
example, the tree view widget, and others). Often, I turn back to just
grouped controls which I can control much better in LCS than widgets using
LiveCode Script (LCS).

Maybe I really must try to understand LCB and go deeply into it?

And could there not be standard requirements that widgets must pass in
order to be accepted to be delivered to the community?

If I could contribute to achieving such aims, ... )

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


Windows 10 and LC9.0

2018-05-24 Thread R.H. via use-livecode
There have been some remarks regarding LiveCode 9.0 in Windows 10. I am
exclusively using Windows 10. Since Windows worked not well changing from
Windows 7/8 to 10, I can only suggest making a "clean install" whoever is
using another version. But Windows 10 is otherwise promising and not bad.

So, if you like, share my remarks and observations from a more simple user
point of view (not so technical):

Opening LiveCode 9.0 on my computer (8MB RAM, 2 years old, Acer Aspire)
takes about 30 seconds. "Saving as..." is acceptable within a second (I did
not try really big stacks yet). In general, LiveCode 9.0 is working as
expected and seems to be a bit faster even.

Before using LC9.0 I strongly suggest deleting the preferences file. It
caused lots of problems when changing the version to me. Even I had strange
effects such as when opening LiveCode 9.0, it would just only appear for
milliseconds and then close. Only much later it dawned on me that possibly
I should kill the preferences. The preferences are visible when turning on
"invisible files" and then going to
C:\Users\Username\AppData\Roaming\Runrev\Preferences\livecode7.rev. Delete
the file. It will be rebuilt.

The biggest problem I face is using the Script Editor in LC9. The text
cursor tends to hang and it happens frequently that it may take a second
until even a character is placed.

The kluge is turning off everything that is offered to support script
hiliting and debugging such as bracket completions, etc. etc.. I only keep
"Variable Checking", "Autoformat" and "Control Structure Completion".
Still, it behaves sticky. The longer the script, the more sticky it
becomes. Some users suggested to keep Project Browser closed and even the
message box closed. In the message box I also activated "Auto update
pending messages". I am rarely using the Project Browser anyway.

Another real problem is when lots of controls are selected (maybe more than
10). Moving the selection using arrow keys is a pain. Even moving the
selected controls with the mouse can make the system unusable. It can take
30 seconds to move even one pixel. Grouping controls and moving the group
is the only option in such case and then working well. This has been the
same problem in previous versions.

In previous versions, there have been also big problems showing menus on
secondary monitors. This is fixed in the current version and I am more than
grateful for this fix. Before, it could happen that menus were not visible
at all because they opened at a distant place in the not visible space.

Also fixed is the bug that it was almost impossible to place new controls
from the Tools palette to the IDE stack using drag-and-drop. It had been an
uncontrollable trial-and-error thing. Often enough I had to try several
times to "hit" the stack window and place the control So, I am happy about
the fix very much.

There has been a problem with the "Find and Replace" window in previous
versions. This problem still exists. Do not touch the window in trying to
resize it. It will then suddenly shrink to a strange width and becomes
unusable. The only way to change this is a restart of LiveCode. Just never
resize this window!!! (I am not going to touch the IDE stacks)

What is now a new problem with 9.0, and a bit of an annoyance, is the fact
that the property inspector does not keep the resized value when changing
when selecting another control. Each time, the window falls back to some
default size and then it must be resized again, or the scroll bar must be
used. Again, it is not critical but hinders work-flow very much. For
example, I prefer to look at layer numbers in the property inspector, and
just go through each control with an open property inspector without having
to resize the window or scroll it all the time.

Fonts generally render much better in 9.0 and the printed type is looking
good. But also be reminded that the default Segoe font may not be installed
on any Windows 7 and prior versions where Arial was predominant. Then the
font metrics will not match your field widths or heights and you should
leave much more space than you think you need. (Arial uses much more space.
Or change the default font to Arial.)

On screen, a page to be printed looks pretty small. For example, Arial 10
printed is quite readable, and 11 is already big. In LiveCode, it looks
tiny. For that reason, I am changing the scale factor to 1.1 or 1.2 ("set
the scalefactor of this stack to 1.1"). This is good and had been there in
older versions. If it is not too much work, I would prefer, as an
alternative, being able to have a window frame and the scale is only
applied to everything inside this frame. Scaling programmatically all
controls with their relative distances and changing text fonts is too much
to do. But I guess this is not a priority.

The new data grid on my system definitely does not resize correctly on
Windows 10 when its resizing is part of a "resizeStack" handler. I believe
it is a bug. When using simp

Windows 10 and LC9.0

2018-05-26 Thread R.H. via use-livecode
Hello all

I do think that it is right to say that everything is broken or not
working.

Also not in Windows 10.

And to survive in such market with such a highly ambitious project such as
LiveCode -- I consider it almost a wonder that LiveCode is still around.
Imagine having to support so many platforms and different interests in
business, games, education, and whatever.

I am also not happy with everything Google is pushing out, or Microsoft, or
Apple, Amazon, or whoever you name, but they have UNLIMITED funding and
thousands of developers. In comparison -- LiveCode is doing very very very
well.

But in one thing I agree fully: CONSOLIDATE first and then go ahead.

If time would be spent to just fix all the pending bugs first (at least 80%
maybe) and  a team would be forced to develop even one BIG-ENOUGH SAMPLE
PROJECT (not just a small little gadget) on ALL platforms (Windows, Apple,
Linux) and FOR all platforms (Desktop, Mobile, Brwoser) using ONE CODE BASE
and touching all the 80% of what a typical application of today's world
would need, all those little things would come to light, and maybe most of
it will be fixed "on the fly" -- while we as users would not be able to do
that.

Maybe such SAMPLE PROJECT could even solve a real word's problem and hit
the markets more than any of the development parts?

What could it be -- this sample project -- speaking for the quality of
LiveCode, using it to really test LiveCode in real life, released to the
world? Multi-language, multi-theme, multi-platform, multi-user, ...
something EVERYBODY will like to have all over the world? Be it a game, the
world's best address book, a tool to make money, helping children in third
world countries, ... I remember when Skype appeared the first time and how
people were just grabbing it. When sold to Microsoft, the developers took
almost 2 billion dollars home.

Michelin 3 stars to restaurants are not given for the process of cooking,
but for the overall outcome.

// NOTE //

I do not want to make the impression that I am qualified to tell Kevin or
anybody here what best to do. I am not. I also do not want to rant.
Everybody here expressing annoyances is doing this out of love for LiveCode
and this community, wishing the best to push forward. A natural process.

Everbody was touched by Sean's unfortunate situation, we all were worried,
but it should then not flip to the other side. We can learn from his
experience and be better prepared when it comes to mission-critical apps,
but never ever things will always land safely and as desired. Mother
Nature, possibly by intention, is imperfect in its very heart in order to
be able to progress. Evolution depends on imperfection. We can only just
strive for the stars. And we are measured for our ability to stand up each
time we fall.
___
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: Windows 10 and LC9.0

2018-05-26 Thread R.H. via use-livecode
I like to add two more observations for Windows 10 and LC9:

I wrote that before LC9 on a secondary monitor menus tend to move into
Nirvana as they open not at the location of the menu. This is correct with
one exception: The Script Editor's menus are still behaving the old way,
maybe not as drastically, but moving the Script Editor to the left side of
the secondary monitor (my first main monitor is placed on the right side),
menus open outside of the full window's visible rectangle.

Another observation: I got used writing almost all scripts as behavior
scripts, also the stack script is a behavior script. Usually, writing a new
handler will not be recognized by the system when compiling. Too often, but
not always, they fail. Saving several times the script window does not
help. Sometimes it helps to close the Script Editor and to reopen it.
Sometimes it is necessary to quit and then restart LiveCode. Then it
usually always works as expected.

Once a new handler is recognized, it works and also changes will be
recognized.

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


Windows 10 and LC9.0

2018-05-28 Thread R.H. via use-livecode
Monte, I really appreciate that you want to put attention on Windows.
Creating a list of all bug reports and assigning bug number to them --
maybe I can do it, or others are already doing it. But that would be work
that should actually come out of the database of bug reports? It is
something that possibly would be better to do on your side? It makes no
sense if 10 people do the same.

Naturally, everybody is looking subjectively on things that seem to be most
critical.

Here is my personal view in terms of criticality and what I would like to
see fixed first.

1. Menus must open in any case at the location of the originating button,
not somewhere else. This affects end users who are using TWO monitors, or
even three... and makes applications nearly unusable in some cases, or
developers must avoid menus altogether. I assume that this is easy and a
matter of minutes maybe to fix. I reported it also last year and it was
confirmed.

2. The script editor is a delicate issue and almost all the time we spend
using it as Sean correctly stated. There are many reports about it. I like
to add that sometimes (not always) added scripts are not recognized and do
not compile if defined in a behavior button on my machine. It can mean
restarting LiveCode for LiveCode to recognize the script handler. I am not
sure it is reported, but it is one of the problems that suffer from the
demonstration-effect - when demonstrated, it does not show.

3. Long scripts (maybe not too powerful machines) tend to make it very hard
to script, open the script editor, typing, checking, saving ... the whole
cycle turns out to be a time waster. It leads to frustration because we
think and type 3x faster than the engine is following. (So, this also has
to do with continuously saving the stack and the saving time.) I assume
that fixing something deep within will fix everything else.

4. Error reporting: Very often on my side, no error is shown, but the
script has typing errors. My impression is that in earlier versions error
checking was much stronger. Sometimes, no error is shown, but the list of
handlers on the left side is not showing up. Then there is some handler not
working. Still the script shows that there is no error. Often enough even
referring to objects that do not exist, there is no error reported. The
resize-handler, for example, does not recognize any not existing objects,
but this is not limited to resizeHandler. It happens at other times as
well. Fixing in resizeHandler, maybe it fixes everywhere else as well?
Sometimes scripts silently fail without reporting and it is almost
impossible to find what went wrong. That is hardest to find, trying to
memorize when this behavior appeared the first time. Sometimes (actually
quite often) there is an error that pops up in the IDE error window (not in
the script editor), but this window is not visible. There is only a 1-pixel
wide line on my monitor. Hard to see even. When I touch it, it can be
scaled to become the visible window.

5. Selecting many controls and then trying to move them using the arrow
keys is a pain. I wrote my own selectObject() handlers in my own library
(rawkeyup message with optionkey down) to move objects around, resize them,
align them... I do not know if it is just a small IDE thing. It seems to
also affect other platforms.

6. Drag-and-drop of controls from the palette to the IDE window -- test it
again using TWO monitors. I believe the system is affected when using two
monitors (or more). Maybe it is easy to fix and reminds me of the menus
showing up somewhere in space.

7. Opening LiveCode, whether IDE or standalone, takes 30 seconds on my
machine. It is too long I believe. It may not be so critical, but most
other programs, except Photoshop and such beasts, open much faster. Of
course, a RAM disk would help. But if the issues are Windows-related then I
do not see why it works so much slower on Windows compared to other
platforms.

8. Standalone made with my Windows-10 system do not save correctly on
Windows-7 systems using a Splash-stack setup. I asked the user to change to
Windows-10. Nevertheless, it also happened to me sometimes, and when during
saving a copy of the stack file is made with the "tilde" in the name, it
fails to complete the saving. The tilde can be removed and all is as
before. But it is not a solution. How to find out what the error could be?

Use a slow machine for testing and a fast one for fixing ).

Looking forward to version 9.1 )))

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


Translation Service Deepl.com

2018-06-24 Thread R.H. via use-livecode
I like to draw your attention to DeepL Translator - an online translation
service that does much better than anything before, including Google,
Microsoft or whatever. There is a free service and a paid one as well.

Right now it supports English, Spanish, Italian, French, German, Polish and
Dutch.

https://www.deepl.com

They provide an API and I wonder how we could enable this. I am trying to
get it to work in LiveCode. Or, maybe, someone has been doing this already?

https://www.deepl.com/pro.html

It says: "
As a DeepL Pro user, not only are you able to translate on our website, but
you are also able to integrate DeepL’s JSON-based REST API into your own
products and platforms. This allows you to incorporate the world’s best
machine translation technology into a variety of new applications. For
example, a company could have their international service enquiries
instantly translated by DeepL Pro, greatly simplifying business procedures
and improving customer satisfaction.
"

(I am not affiliated with DeepL and just give the information after I found
that the job it does is really amazing.)

Roland
___
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: windows defender issues? & other AV issues

2019-01-15 Thread R.H. via use-livecode
Failed saving onWindows 10 (all latest versions of LiveCode)

I am talking about a compiled business related stack (small compiled
splash, main stack not compiled in a resource folder and various resources)
that goes to clients.

Some of my clients experience that the main stack is not saving and will
leave two files in a state that does not allow to reopen them again. One of
the files is renamed with a tilde character "~" at the end of the filename.
This is the file "in progress" to be saved from file A to B and when the
saving was successful, the old file is removed.

The saving process takes very long (from 15 seconds and more). Sometimes
over 30 seconds -- with or without this problem.

If I ask the client to remove the tilde "~" then the stack can be reopened.
Otherwise not. Of course, I can not ask clients to do this in a production
environment or ask him to delete the installation and always install again.

Somewhere during the saving process, something happens that stops the
process and ends with a failure.

There are no error messages. I can not replicate the behaviour on my own
computer. But I can see it on client's machines (not just one).

I am wondering if this could also be something that occurs because of
interference of Windows Defender or some AV? Did anybody ever experience
something similar on Windows?

Kind regards and thanks for replies
Roland
___
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: windows defender issues? & other AV issues

2019-01-16 Thread R.H. via use-livecode
Windows: Regarding the many replies to the question of allowing saving a
stack file I would like to thank everybody for the answers by Matthias,
Bob, Alex, Jacqueline, JJS ...

The problem was that a stack file used by a compiled splash stack does not
save on some client's computers with Windows systems >= 7 and can only be
run once leaving an unsaved file that is renamed with a tilde character.

===

I am distributing the executing splash stack (compiled stack) in a folder
together with subfolders offering for download as a zip file. Users move
the zip to the desktop, unzips and uses. There is nothing stored in
inaccessible "system" or whatever non-user directories. It is a very simple
setup.

In one subfolder of the executable, the actual data stack is residing.

Yes, I am aware that I could save data outside of the stack and not save
the stack itself, but I agree with Richard that it must be possible to
store data in the stack itself in principle. For now, it would require a
new version if I stored data outside. But it is a good hint and I might
consider for later.

Another solution put forward by Alex was to rename the stack file from the
splash stack that failed to save and remove the tilde from the filename. In
fact, it could be a workaround and I have to test it, but it is ugly and it
would not allow saving after all. I will test it though as a quick solution.

Another question was whether user rights on client's computers might
disallow them to save the stack. But then, I checked and they usually use
Admin rights, then also the executable splash stack would not run. The data
stack is just a file to the system, nothing more. And why would it be
permitted on some machines and other not? (I checked that nobody is using
forbidden directories.)

The problem may be a bit deeper. I am also considering that if the stack
file is too big and the process of saving takes so long as in this case
(always > 15 secs, often 30 secs and more, even though no data was changed
at all) and Windows Defender might detect such activity and stop it because
of a time out. Just wild speculations...

Another speculation is that the stack file is somehow corrupted (not
detectable by me) and maybe the LiveCode team can check it's integrity. Or
is there a way to check this as well? I have started a ticket to look at
the problem.

I will report when I found a solution. I see that other users here might
not have encountered such problem on Windows machines and this in itself is
also valuable information.

Thanks to all
Roland
___
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: windows defender issues? & other AV issues

2019-01-17 Thread R.H. via use-livecode
Well, thanks for all the comments regarding failing to save the data stack
distributed with a compiled splash stack. Each case is different. In this
case, I have to actually go by my promise to not install anything on the
target machine that is not visible inside my app folder. The user can just
remove the folder and that's it - by agreement. So, that actually disallows
even storing anything else in any writable directory in this particular
case.

The data stack uses data separated from UI and data is read-only. The user
saves data to a text file. That all works well. The saving of the "data"
stack that includes the separate UI has mainly one purpose: to allow the
user starting from where he/she stopped working with the application. But
this is not crucial and I will simply not save anything. The stack will be
as is.

I just feel that we should know what the problem is that corrupts the stack
when saving and the original stack filename is appended with the tilde
character? Well, corruption is a big word here since the stack itself is
not corrupted or does not appear to be, but something is not right. It is
more a principle question now. As Curry mentioned, it happens elsewhere.

Is there any way to detect and catch an error when saving?

We are deviating a bit from the subject here which is "Windows Definer and
AV software". Still, there could be an issue related.

Saving either from the IDE or saving the compiled in any case (with or
without corruption) takes way too long time. My tests disabling Windows
Defender did not change this but I still do not rule out that there could
be something related to AV. It needs further testing, maybe also on other
machines.

And I can not ask clients to disable Windows Defender or change the
Defender settings anyway. I have no control over such machines and it is a
big company with some users using my app. They are mostly illiterate even
to open Windows Defender or they are not permitted to change any settings.

But generally said, I would also prefer to go with a proper installation
tool, read from and write to files in the AppData or Documents directory
and keep data separate from the stack -- even though if this is possible in
principle, it should not create problems also using stacks for data
storage. In many cases, it is a very simple straight-forward solution as
everything is easily accessible. A stack is just not a good database
solution if data is well structured and there is a lot of data.

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


AW: Script Editor Slow on Windows

2019-01-17 Thread R.H. via use-livecode
I must also agree that the SE (script editor) in Windows with latest
versions of LiveCode tends to be nearly unusable -- at least for
professional work.

Also, I turn off the messages box when using the SE but using a field
displaying messages instead. I am not using Navigator.

When I add a new handler, in the "end handler" statement of the previous
handler (the handler above) parts of the word "end" are deleted without me
doing anything. It happened not only once.

As many others here, I can also say that I have turned off most helpers
supposed to support with scripting. I type 10 x faster myself and make
corrections than using any of such helpers; they block my workflow even
though I still use automatic indentation. It will probably be a lot of work
to fix this for Windows so that it is not obstructing work instead of
supporting it.

Even I started using a separate text editor (Notepad++) for writing scripts
and I insert the script later into the SE.

The turn-around time between script changes and saving them is way too
long. Turning Defender off does not make a difference for me, but I need to
test more to come to a conclusion.

My main problem is that saving the stack while scripting may take three
times as much time than writing code. I feel like wasting time a lot
waiting for the save process to end. This does not happen with freshly
started stacks, but quickly after inserting more than just 100/200 lines of
code the problem appears. I did not exactly measure when the problem starts
to show up.

Also, I have the feeling that script errors in earlier versions of LiveCode
had been identified better. Regularly, the reported errors are simply
wrong. And often enough, the debugger does not see any error even though
there is one. Kind of a mystery.

I started to use strict mode declaring all variables. It helped a lot. It
should be recommended much more. It adds discipline and clarity and avoids
errors that are hard to detect otherwise. Even beginners can learn it
easily and understanding will even be better.
___
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: windows defender issues? & other AV

2019-01-19 Thread R.H. via use-livecode
Ref. To Mark Waddingham's suggestion:

/* Dear Mark, let me make this side note: Your insight and your comments
here, also in general, cannot be praised enough. I am a fast typer and a
slow reader, so I have to discipline myself to carefully read. But your
comments always catch my attention and I always read very carefully what
you are writing. You know about the engine and details with a fantastic
ability to let others understand important details based on a huge
knowledge base you have acquired. I needed to say this. We are writing here
because all users of fantastic LiveCode should profit. */

Regarding the crashing stack in Windows when not saving correctly ON SOME
USER MACHINES, unfortunately not on mine, I already have sent the stack to
Heather two weeks ago. I just wanted to read all the comments before I pay
(payment is by the hour). She has already quickly tested the main stack on
a Mac (not Windows) and did not find issues. I try to investigate more
before actually submitting an order.

My main stack has 58 cards. The stack has two small sub-stacks also used as
UI for settings. There is one card dedicated to internal resources (images,
etc.), two cards are user interface cards, the rest are data cards for a
technical product and "read-only". The user only sees the UI cards of
course. The stack script has 1500 lines of code. There are additional maybe
1000 lines of card scripts and really only some other scripts in buttons
(often behaviours), I am not using script-only stacks. The size of the
stack file is nearly 4 GB, probably mainly because of some technical images.

Testing the "save" process: I have no error when saving on my machine. It
is difficult for me to ask clients to test. But they are lazy. I asked
already.

Observation in the IDE and SE: The time for saving in the IDE seems to
depend on the amount of time spent with the SE open and making changes. The
longer I am working with the SE, the slower saving tends be.

New observation with the "quit" command: Now, being in the IDE, saying this
and also testing, when I "quit" then interestingly enough this takes up to
30 seconds, never less than 15 seconds. Why is the blue Windows system
wheel rotating for such a long time when force-quitting? When I force
quit from the Windows Task Manager then there is no such delay.

Maybe the saving & quitting problem actually is with the quit command?
Could that be? I never thought about this before. Quitting without saving
and locked messages should be an almost instantaneous quit.

I can not check the result of the "quit" command. Whatever line of script
comes after the quit is no longer recognized.

Kind regards
Roland


-- Start of Quote:
When the engine saves a stackfile when it has previously been saved to
the same place...

It first moves the existing file at  to ~. If this
step fails (e.g. because it can't move the file) then the save command
stops and returns an error indicating that in 'the result'.

Next it attempts to save the stackfile to .

If there is an error whilst writing the stackfile then the save command
stops, deletes the partially written stackfile at , moves the
~ back to  and returns an appropriate error in 'the
result'.

If the engine crashes during saving, you will be left with a partially
written  and a copy of the stackfile as it was successfully
last saved at ~. Obviously in this case the engine has
crashed, so there is no 'the result' to check.

If saving successfully completes, then the engine deletes ~
and returns empty in 'the result'.

So - assuming the engine isn't crashing (although the long save time
sounds odd - if you can submit a report/send a stackfile which takes
ages to re-save we can take a look!), then you should be able to find
out why the save is failing, or not happening as expected by checking
'the result' after the save command which is initiating the save.

Hope this helps!

Warmest Regards,

Mark.
-- End of Quote
___
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


Fwd: windows defender issues? & other AV

2019-01-19 Thread R.H. via use-livecode
Sorry, I must send a correction, I meant MegaBytes, not Giga Bytes (typing
too fast)...

This is sentence needs correction:
"The size of the stack file is nearly 4 MB, probably mainly because of some
technical images."

Regards
Roland

-- Forwarded message -
From: R.H. 
Date: Sa., 19. Jan. 2019 um 13:56 Uhr
Subject: Re: windows defender issues? & other AV
To: LiveCode Runrev.Com 


Ref. To Mark Waddingham's suggestion:

/* Dear Mark, let me make this side note: Your insight and your comments
here, also in general, cannot be praised enough. I am a fast typer and a
slow reader, so I have to discipline myself to carefully read. But your
comments always catch my attention and I always read very carefully what
you are writing. You know about the engine and details with a fantastic
ability to let others understand important details based on a huge
knowledge base you have acquired. I needed to say this. We are writing here
because all users of fantastic LiveCode should profit. */

Regarding the crashing stack in Windows when not saving correctly ON SOME
USER MACHINES, unfortunately not on mine, I already have sent the stack to
Heather two weeks ago. I just wanted to read all the comments before I pay
(payment is by the hour). She has already quickly tested the main stack on
a Mac (not Windows) and did not find issues. I try to investigate more
before actually submitting an order.

My main stack has 58 cards. The stack has two small sub-stacks also used as
UI for settings. There is one card dedicated to internal resources (images,
etc.), two cards are user interface cards, the rest are data cards for a
technical product and "read-only". The user only sees the UI cards of
course. The stack script has 1500 lines of code. There are additional maybe
1000 lines of card scripts and really only some other scripts in buttons
(often behaviours), I am not using script-only stacks. The size of the
stack file is nearly 4 GB, probably mainly because of some technical images.

Testing the "save" process: I have no error when saving on my machine. It
is difficult for me to ask clients to test. But they are lazy. I asked
already.

Observation in the IDE and SE: The time for saving in the IDE seems to
depend on the amount of time spent with the SE open and making changes. The
longer I am working with the SE, the slower saving tends be.

New observation with the "quit" command: Now, being in the IDE, saying this
and also testing, when I "quit" then interestingly enough this takes up to
30 seconds, never less than 15 seconds. Why is the blue Windows system
wheel rotating for such a long time when force-quitting? When I force
quit from the Windows Task Manager then there is no such delay.

Maybe the saving & quitting problem actually is with the quit command?
Could that be? I never thought about this before. Quitting without saving
and locked messages should be an almost instantaneous quit.

I can not check the result of the "quit" command. Whatever line of script
comes after the quit is no longer recognized.

Kind regards
Roland


-- Start of Quote:
When the engine saves a stackfile when it has previously been saved to
the same place...

It first moves the existing file at  to ~. If this
step fails (e.g. because it can't move the file) then the save command
stops and returns an error indicating that in 'the result'.

Next it attempts to save the stackfile to .

If there is an error whilst writing the stackfile then the save command
stops, deletes the partially written stackfile at , moves the
~ back to  and returns an appropriate error in 'the
result'.

If the engine crashes during saving, you will be left with a partially
written  and a copy of the stackfile as it was successfully
last saved at ~. Obviously in this case the engine has
crashed, so there is no 'the result' to check.

If saving successfully completes, then the engine deletes ~
and returns empty in 'the result'.

So - assuming the engine isn't crashing (although the long save time
sounds odd - if you can submit a report/send a stackfile which takes
ages to re-save we can take a look!), then you should be able to find
out why the save is failing, or not happening as expected by checking
'the result' after the save command which is initiating the save.

Hope this helps!

Warmest Regards,

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


Help needed / corrupted application stack after quit through splash stack

2018-02-23 Thread R.H. via use-livecode
Using Indy 8.1.9 desktop standalone without encryption (same problem
with earlier versions and community version), Windows 7, 8, 10, different
machines and different users of a large company.

Before filing a bug report or sending a help request, maybe there is a help
here...

This is an urgent question as it is highly critical for the in-house
distribution of this LiveCode application to the sales team of a large
company right now.

I can not really reproduce the problem using my own machine, but it
happened on my machine, on other peoples machines, more or less often.

I developed the app using the splash stack method (small login stack that
is made to be a standalone and actual application stack in a subfolder
called). It works. At least for all users when opening the first time.

Problems appear when opening the app through the splash screen login stack
a second time after quitting. The compiled LiveCode engine of the splash
stack often enough cannot find the application stack any longer because it
is corrupted.

Analyzing the situation, I think, it seems to be a problem quitting the
standalone app resulting in a corrupt application stack (the splash screen
standalone is not affected).

In case of corruption of the application stack, I then find two visible
files in the subfolder with the original filename of the application stack,
one shows a tilde "̃̃˜" at the end of the filename (an indication of
corruption).

Currently, I do not know how to generate a detailed error report for such
standalone. I have a friend who experiences this problem each time, and
each time he wants to use my app, he then takes a fresh copy that is good
only for a 1-time-usage ))).

The quit command is sent from the application stack.

Here are the handlers in the application stack:

on closeStack
saveAndQuit
pass closeStack /* goes to splash stack, engine ... tested with and
without. */
end closeStack

command saveAndQuit
   lock cursor /* Tested with and without locking and showing cursor */
   set the cursor to watch
   save this stack /* auto save, takes a long time, between 10-30 secs */
   wait 100 milliseconds with messages /* does it help? Probably not. */
   unlock cursor /* Testing with or without*/
   lock messages /* Force quit. Tested with and without. */
   quit /* Should quit safely and not corrupt the stack, but stack
sometimes is corrupted */
end saveAndQuit


Any suggestions I highly appreciated.

Thanks to all
Roland
___
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

Quit Command corrupts standalone (stack called by standalone splash)

2018-02-23 Thread R.H. via use-livecode
 // Quit Command corrupts standalone (stack called by standalone splash)
Using Indy 8.1.9 desktop standalone without encryption (same problem with
earlier versions and community version), Windows 7, 8, 10, different
machines and different users of a large company. //

Before filing a bug report or sending a help request, maybe there is a help
here...

This is an urgent question as it is highly critical for the in-house
distribution of this LiveCode application to the sales team of a large
company right now.

I can not really reproduce the problem using my own machine, but it
happened on my machine, on other peoples machines, more or less often.

I developed the app using the splash stack method (small login stack that
is made to be a standalone and actual application stack in a subfolder
called). It works. At least for all users when opening the first time.

Problems appear when opening the app through the splash screen login stack
a second time after quitting. The compiled LiveCode engine of the splash
stack often enough cannot find the application stack any longer because it
is corrupted.

Analyzing the situation, I think, it seems to be a problem quitting the
standalone app resulting in a corrupt application stack (the splash screen
standalone is not affected).

In case of corruption of the application stack, I then find two visible
files in the subfolder with the original filename of the application stack,
one shows a tilde "̃̃˜" at the end of the filename (an indication of
corruption).

Currently, I do not know how to generate a detailed error report for such
standalone. I have a friend who experiences this problem each time, and
each time he wants to use my app, he then takes a fresh copy that is good
only for a 1-time-usage ))).

The quit command is sent from the application stack.

Here are the handlers in the application stack:

on closeStack
saveAndQuit
pass closeStack /* goes to splash stack, engine ... tested with and
without. */
end closeStack

command saveAndQuit
   lock cursor /* Tested with and without locking and showing cursor */
   set the cursor to watch
   save this stack /* auto save, takes a long time, between 10-30 secs */
   wait 100 milliseconds with messages /* does it help? Probably not. */
   unlock cursor /* Testing with or without*/
   lock messages /* Force quit. Tested with and without. */
   quit /* Should quit safely and not corrupt the stack, but stack
sometimes is corrupted */
end saveAndQuit


Any suggestions I highly appreciated.

Thanks to all
Roland
___
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

Quit Command corrupts standalone (stack called by standalone splash)

2018-02-26 Thread R.H. via use-livecode
Thanks, Phil and Tom

I already replied, but I cannot see my first reply to your answers.

Did it appear in the list?


Phil:
>> "quitMe" should be sent before 'saveMe' is executed, because the 'save'
command is blocking. It would prevent 'quitMe' from being sent until (in
this case) 1 second after 'saveMe' has finished.

Well, it is blocking. Issuing "quit" just quits if messages are locked.So,
to quit before save would require not to force a quit. Right? I will test.

The main problem is that the IDE is ok, even though saving takes a long
time, but no errors I can see. The standalones are the culprit, and I have
limited to access to other peoples computers using my standalones. And on
my machine the problem does not appear regularly.

// I hope this message appears, otherwise I will have to check what is
wrong sending messages to the list. //

Thanks
Roland
___
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: Quit Command corrupts standalone (stack called by standalone splash)

2018-02-27 Thread R.H. via use-livecode
Hi Richard and all contributing...

Thanks a lot for all answer...)))

I have received the corrupted files from clients (original stack that is
split into two files during save I guess) and will prepare a bug report
attaching them together with the original stack.

It is very difficult to know about which machines are creating the problem.
Definitely, it happens on other peoples machines using Windows 7 and 10,
and it happened before on my own.

The standalone will start showing strange behaviors especially when the
user clicks the standard Windows close button on the upper left corner.
That should usually invoke the "closeStack" handler. Using my own "Quit"
menu seems to be safer. Using try and catch and various ways of quitting
and saving did not make any difference. The error message using "catch" in
the "try" statement should have been written to a separate file on the
client's machine, but it did not even create a file. In the IDE there are
no errors visible.

What happens is that on the user's machine the blueish mouse wheel is
turning and then there is no longer any mouse action even on the Desktop
and the window turns white and the app becomes non-responsive. After a
while, about 30 seconds to 1 minute, the app disappears and also there is
no longer any process visible.

I will once again try sending a copy without any "save" and just a forced
quit and see what happens. Then user would have to save manually before
closing -- if that could be a reason for the corrupted file.

This is using Indy 8.1.9 but happened in earlier versions as well.

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


IDE Cursor icon often hangs on windows

2018-02-28 Thread R.H. via use-livecode
I have this same problem of hanging cursor on Windows in the Script Editor.

Clicking outside of the SE changes the cursor to normal behavior. But it is
a bit annoying, yes.

A bug report would be nice.

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


Standalone compile problem including more than two stack files to the mainstack

2018-03-07 Thread R.H. via use-livecode
Window 10, LC 8.1.9, Trying to compile a standalone with more than just one
application file to the main file (mainfile = splash screen stack).

I have a problem and working on this for many hours now. I am using a
splash stack as the "main stack" for compilation and I am including the
application stack using the dialogs in the "Stacks" pane of the "Standalone
Application Settings" window.

When I add this one application stack file all is fine. It compiles.

Now I want to add a library stack using the same "Stacks" pane just adding
this other stack to the same subfolder "resources" which also contains the
app file.

Compilation completely fails when adding this library stack (or any other
stack file I tested). During such compile, only the resources folder is
created and one of the included stacks is placed in there. Then the
compilation process quits without error.

I tried everything I could imagine to find out what is going wrong. Maybe
there is some script error in the application file or the splash stack. But
I have no idea as it all works in the IDE and it works in the limited
setting just using this one app file. An also in debugging mode nothing can
be detected. But somehow LiveCode does not like any additional brother or
sister for my application file.

When I do this with completely independent stack files it works though. I
made some test stacks to find out whether is a general problem. But
there... all is ok.

Maybe someone had similar experiences?

How can we check what is going wrong during compilation?

I am at the end of my wisdom. Sigh.

Roland
___
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: Standalone compile problem including more than two stack files to the mainstack

2018-03-12 Thread R.H. via use-livecode
I like to thank everyone for help and suggestions !)

The suggestion from Jaqueline Landman gave me the workaround that I was
knowing that it would work: Using the "Copy Files" pane in the Standalone
Settings instead of using "Stacks".

So, thank you especially for this hint that saved me.

(For new and casual users: After compiling at least 50 x to find my error
and to know about errors generated in the Standalone and NOT in the IDE, I
created a handler that would receive information from each and every
statement writing "the result" and other information to a text file on disk
with a timestamp and some execution details. Simply setting a flag using a
hidden checkbox would stop executing this error catching. So, I am using a
"command catchError pMessage" handler in the lowest (or highest?) message
level (in my case library stack) that can be invoked from anywhere and
opens the error text file for append and immediately closes it. This works
pretty well even in a standalone for debugging purposes. The overhead is
manageable. Even on mobile that should work.)

I found one error in my code that had some bad influence. When the main
stack is opened from the complied splash stack and turning focus to the
main stack, trying to execute further instructions in the same handler
reverts back to the Splash stack and may find it impossible to execute.
Once the main stack is opened and control is given to it, Splash stack must
simply close and do nothing more.

Context Sensitive Help Suggestion

I was thinking of what especially new users might benefit from. I think it
is mainly information that might be missing. For example, what is the
meaning of a field "Destination Folder:" when it does not allow to enter a
path selected from disk? Or it should explain that these folders are
folders inside the specialfolderpath("resources") folder and that this
specialfolderpath("resources") changes for the compiled version, of course.
But what seems obvious is not always so obvious to a casual or new user.

The meaning and consequences of certain settings for compilation work (and
elsewhere) should ideally be available with a context-sensitive help right
at the spot describing more than just giving a title, and it could be
realized simply using a pop-up pane or opening a help window or opening an
appropriate help page in the browser. I would favor a context-sensitive
webpage help. This is a task that could be assigned to us in the community
may be. I would at least try to spend some time here.

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


Drag-and-Drop with Desktop Files

2019-03-08 Thread R.H. via use-livecode
Desktop and IDE, mainly Windows 10 (could be any OS), LiveCode lastest
version.

Drag-and-Drop on Windows works as expected. But I have another request and
do not know how to handle it so far.

The OS should know which file a user has selected. Is there are a command
or Shell function to know which files are selected in the Operating System
to receive their file path back in LiveCode without much user interaction.
The user shall NOT move the file as in Drag-and-Drop, but just click a
button to know about these selected files and folders and process them as
desired.

Speaking about Windows, only folders and files in a current folder can be
user-selected. So, if we had the information about the currently selected
folder and the selected files and folders inside, it would be a huge
advantage for the application I am working on.

Thanks for any hint if this is conceivable.

P.S. Windows users: Does anybody of you has a beginners script of using
Powershell instead of VBScript on Windows? As far as I know, VBScript is
deprecated. How would we call Powershell and receive information in LC back
from Powershell? Powershell does not appear in the list of supported
scripting languages of the OS when calling "alternateLanguages".
___
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


Drag-and-Drop with Desktop Files

2019-03-13 Thread R.H. via use-livecode
Jacqueline:
   on dragDrop -- check for file paths
  get the dragData["files"]...
   pass dragDrop end dragDrop

Jacqueline, thank you. I know this and wrote about it.

Here I want to know the filename and path which is
user-selected in the OS (on Windows File Explorer) without dragging
and dropping
it to the LiveCode window.

I am looking for a Powershell function that can be
invoked in LiveCode. I failed to do this so far even though trying.

How do we call Powershell in LiveCode? I can do it with Shell functions and
with outdated VBScript.

If I get it working myself, I will post it.

Thanks, Roland
___
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


Drag-and-Drop with Desktop Files

2019-03-14 Thread R.H. via use-livecode
 I am referring to:
Message: 17, Date: Thu, 14 Mar 2019 00:44:05 +0100, From: hh 

Regarding MacOS I can not say much, but I use Windows, and IT WORKS.

'hh ' = Hermann's contribution, right? This fantastic. I never expected
anybody to have a solution. I had searched Git and whatever.

Well, first it did not actually work because spaces in the folder- and
filenames are breaking the script. There will be an error message. So, I
have added these script lines to what 'hh' had posted:

-- Button script
on mouseUp
set the hideConsoleWindows to true -- Hide console window
put the effective filename of this stack into p
set the itemdelimiter to slash
put "wscript1.js" into last item of p -- Or construct any other valid
file path
--replace slash with backslash in p  -- Not needed, works without
backslash conversion
put quote & p & quote into p -- Required if file- or folder names
contain spaces, and mostly they do
put shell ("wscript "&p) into msg -- or any field, ...
end mouseUp

Tested:
Operating system: Windows 10, the latest version
OS scripting language: Wscript (Microsoft Windows Script Host File)
Filename of script file: "wscript.js"
Location: Here the call file is placed inside the stack folder (could be
any other location)
Script of the file as given by Hermann:

var shellWindows = new ActiveXObject("Shell.Application").Windows();
for (var i = 0; i < shellWindows.Count; i++) {
var w = shellWindows.Item(i);
WScript.StdOut.WriteLine(w.LocationName);
var sel = w.Document.SelectedItems();
for (var j = 0; j < sel.Count; j++) {
var item = sel.Item(j);
WScript.StdOut.WriteLine(item.Name);
WScript.StdOut.WriteLine(item.Path);
}
}

Biggest THANK YOU.  You solved the client request in a very elegant way and
I create this script file "on the fly" from within LiveCode and execute it
on the client's Windows system.

Thanks for all contributions
Roland
___
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-and-Drop with Desktop Files

2019-03-14 Thread R.H. via use-livecode
hh, I have one more question for Windows: Selecting a file through
Microsoft File Explorer on Windows 10 works for all selected files with
your wscript, also when it is a Desktop file accessed through the dialogue.

The problem I have is when the user selects a file _directly_ visible on
the Desktop, wscript will not catch the file. Is there a way to find such
selected files on the Desktop when users just selected files there? I am
not familiar yet with wscript.

And I can not catch this attribute using the
files(specialfolderpath("desktop","detailed")) function in LiveCode.

Thanks, Roland


> I am referring to:
> Message: 17, Date: Thu, 14 Mar 2019 00:44:05 +0100, From: hh <
> h...@hyperhh.de>
>
> Regarding MacOS I can not say much, but I use Windows, and IT WORKS.
>
> 'hh ' = Hermann's contribution, right? This fantastic. I never expected
> anybody to have a solution. I had searched Git and whatever.
>
> Well, first it did not actually work because spaces in the folder- and
> filenames are breaking the script. There will be an error message. So, I
> have added these script lines to what 'hh' had posted:
>
> -- Button script
> on mouseUp
> set the hideConsoleWindows to true -- Hide console window
> put the effective filename of this stack into p
> set the itemdelimiter to slash
> put "wscript1.js" into last item of p -- Or construct any other valid
> file path
> --replace slash with backslash in p  -- Not needed, works without
> backslash conversion
> put quote & p & quote into p -- Required if file- or folder names
> contain spaces, and mostly they do
> put shell ("wscript "&p) into msg -- or any field, ...
> end mouseUp
>
> Tested:
> Operating system: Windows 10, the latest version
> OS scripting language: Wscript (Microsoft Windows Script Host File)
> Filename of script file: "wscript.js"
> Location: Here the call file is placed inside the stack folder (could be
> any other location)
> Script of the file as given by Hermann:
>
> var shellWindows = new ActiveXObject("Shell.Application").Windows();
> for (var i = 0; i < shellWindows.Count; i++) {
> var w = shellWindows.Item(i);
> WScript.StdOut.WriteLine(w.LocationName);
> var sel = w.Document.SelectedItems();
> for (var j = 0; j < sel.Count; j++) {
> var item = sel.Item(j);
> WScript.StdOut.WriteLine(item.Name);
> WScript.StdOut.WriteLine(item.Path);
> }
> }
>
> Biggest THANK YOU.  You solved the client request in a very elegant way
> and I create this script file "on the fly" from within LiveCode and execute
> it on the client's Windows system.
>
> Thanks for all contributions
> Roland
>
___
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


Drag-and-Drop with Desktop files

2019-03-18 Thread R.H. via use-livecode
Sub-Subject: Detecting user selected files/folders in Windows and other
OSes.

I like to refer to the last message from -hh (see reference below)
regarding Windows possibility of detecting selected items (folders, files,
icons as such) on the Windows Desktop. The solution -hh already provided
when items are selected in any Windows Explorer. The Desktop is not part of
that and basically a special Windows ListView control.

It is correct that items selected on the Windows Desktop are deselected
when another window is becoming active. So, using LiveCode would not work
this way.

What could work though is a service that is running in Windows OS and
detects selected items of the Windows Desktop and their status of type,
selection and position, etc. The service could be started when opening
LiveCode and shut down when closing it. Data would be saved to a temporary
file.

So, switching focus to the LiveCode window would allow reading the temp
file with the list of selected items that have been selected BEFORE the
user activated the LiveCode window.

It is too much of a hassle at the moment for me writing such a program that
runs in the background. Nevertheless, for C/C++ and C# there are some code
fragments around that are public and doing just that.

For my clients, it is a very good solution to be enabled now to select
files/folders and read their path into LiveCode. For Desktop items in
Windows, I just tell them to move them into a folder and select them within
this folder (which is then an Explorer window). So, that works with scripts
-hh provided.

THIS IS MORE CONVENIENT THAN DRAG-AND-DROP of files/folders even though I
also support drag-and-drop plus the standard file/folders selection window.

Many thanks again. And I hope the same will work on MacOS and Linux as -hh
also provided solutions there, and I saw others providing. (I am not using
both others OSes since my clients are 100% Windows only.)

--Message: 16
--Date: Thu, 14 Mar 2019 21:33:32 +0100
--From: hh 

--But there is NO method to get the selectedItems from the virtual desktop
folder.
--Moreover, as you may notice, the selected items are deelected when you
activate
--another window (as for example a LC window or an explorer window).
--The only workaround I can see (besides using an answer file dialog or
dragDrop) is:

--1. launch document specialFolderPath("Desktop") --> open desktop folder
in explorer
--2. User should select the files in that window.
--3. Use the already working method for explorer windows.

Kind regards and thanks to all
Roland
___
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


Localisation - Internationalization Package

2019-03-20 Thread R.H. via use-livecode
Being "international" I also have lots of need for localization from German
to English, French, Italian, Russian. UTF-8 is my friend, first of all.

For example, in Switzerland, there are four languages and the German part
of Switzerland uses different decimal/currency number settings compared to
Germany. So, a language-specific locale read from a system does not fully
help. It is required to know about regional settings and user settings
since some users change the default settings of the OS.

By default in LiveCode, only the English/US date and number settings are
recognized as valid. A date format such as dd.mm. would not be a valid
date.

A bigger problem is that the date can be ambiguous. How to know if a month
and day is actually a month or day using mm/dd/ instead of dd/mm/?
You need to know the source of the date string to be able to convert it to
the local settings in such cases. And no system will tell you that.

If you can not read the setting from the OS regarding locale specific week
day names, month names, etc, the only way is to provide them in your
LiveCode application yourself. For me, the English always is my system
language. So, providing the English name as the key parameter will always
generate the associated language text. A function calls the array which
stores the language-specific week/month or whatever name.

When dealing with such situations, there should be an internal/system
storage and an external presentation layer. As in Excel, a date can be
formatted the way you like and presented, but internally it should be saved
and managed in a way that is presentation-independent.

For translations, I never worked with YAML files and I have to look at how
that would work. (More information may be interesting.)

I am using arrays that can be saved as files and be loaded, even put into a
database such as MySQL.

It is easy to name controls in LiveCode and change their label looking up
the path to the control and changing the label name to be
language-specific. When the user changes the language, all labels are
changed immediately. The same is true for the text in fields that can also
easily be changed the same way.

For any dialogues (ask, answer, ...) I am using an English abbreviation
that is uniquely identifying a dialogue. It helps to identify a dialogue by
name. So again, the actual text of the dialogue is associated with this
unique key, and the translation can be found in the associated array
combining the key and the language code (de_ch for German in Switzerland,
de_de for German in Germany -- they quite different).

The same I do with all error messages that are visible to the user. They
are passed to a handler which looks up the language-specific text.

Even though I like defaults taken from the OS system settings, they may not
apply to individual users.

A US citizen may travel to Europe and use a computer with a European
locale. What to do?

I always give the user the choice to select what the user wants to see. So,
there is no way around having your own layer of settings for translations,
number format, date formats, etc.

Since setting up such a locale-aware system is still a lot of work, I would
find it helpful for international users of LiveCode if we had such an
Internationalization Package to ease the work. Best practice should be
applied. It is not as trivial as it may look at first. There are many ways
of achieving the same aim using LiveCode, but a standard way of doing
things would be more helpful to everybody.

If you plan internationalization, then the best is to start setting it up
before you actually do the application specific work.

-- Think of languages you need
-- Think of date formats (language independent)
-- Think of number formats (language independent)
-- Think of other regional specifics

One consideration is that it is best practice storing values always only
once (as defined in Normalization rules of SQL databases). For example,
working with decimal numbers and their formatting, never use the displayed
format for calculations, but only the internal number format. The internal
number value is the only valid value. The displayed value is calculated
value always. For example, how will you add numbers formatted as
"10.000.000,00" as used in many European countries if you do not store the
actual value as a text-string of the number in the form of "1000.00"
internally?

(You could, of course, convert such number/date strings all the time, but
it would end up in more processing time used, and ambiguous number
representations for export/import or any outside-dealing with data. Using
several formats can mess up your whole application.)

The system looking up values or settings must be extendable and flexible,
never hard-coded. If the user changes the language, number formats, date
formats, the system should automatically respond if such settings are
supported. It should then not only present the new settings, but also allow
the user entering 

Re: Localisation - Internationalization Package

2019-03-21 Thread R.H. via use-livecode
Dear Richard

Thanks a lot for the input regarding the dateFormat function. Very nice.

To add: It is also helpful to

... set the useSystemDate to true...

and then also the local date format such as dd.mm. evaluates to true
when asking if it is a date, or not.

The problem here is that thinking about different formats on different
local systems with different users who may wish to see their preferred
date/time or number formats, unifying all this under the hood may sometimes
be very important.

It is a many-to-many relationship. Looking a decimal numbers as an example:
You receive various formats of decimal numbers and must convert them to
various other formats of decimal numbers in real-time within your
application. So, you need a common ground connecting both.

That is why an internal format (system format based on how LiveCode handles
dates, numbers by default) is needed, avoiding the programmatic use of
date/time/number representations that are user level representations. Here
we have "seconds" or "dateitems" and plain text representations of numbers.

One additional remark: For translations, I have set up a separate
independent stack that allows entering, editing and displaying the content
of translation arrays (or files, lists, whatever you use for translated
strings) in which I store all translations.

Very often good and correct translations depend on context. Just
translating a term does not mean that the translated term will fit the
context for a given user interface. For such cases, I also supply a
screenshot to the translator and have it stored in the array as well, or I
describe the context with some more details.

Use descriptive keys identifying content to be translated (I use English
text strings), not numbers. Otherwise, you have to always look up what
means what.

My application is used by a large corporation that has divisions, and it is
multilingual and multi-client and therefore also muli-"locale" for the
configuration of a technical product. Users are from at least 10 different
countries using 10 different languages and different date/time and number
formats for presentation and input.

So, internationalization is a strong need in business application
development.

Thanks to all for contributions
Roland
___
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.0.4 RC-2

2019-03-30 Thread R.H. via use-livecode
Dear Panos

My impression fixing the disk access for the script editor (SE) for
Windows in this version 9.0.4 RC-2 seems to have changed everything to me.
I only had a short review. But already I can see and feel that text entries
appear to be so much faster and smoother.

If this good behavior persists then I can not thank you and the team too
much. The script editor on Windows was almost unworkable before. I even
hated to start any scripting.

But now.. fun again. )))

Thanks
Roland
___
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


IDE 9.0.4 and 9.0.5rc1 getting slow again on win10?

2019-05-23 Thread R.H. via use-livecode
Well  I noticed it too in 9.0.4, but did not try 9.0.5rc1 yet -- waiting to
hear that it is stable enough. Script editor performance is again below
normal. Crossing fingers it will be ok in the upcoming version.
Roland
___
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


Dictionary

2019-05-23 Thread R.H. via use-livecode
I agree that the dictionary often leaves guess work.

The biggest problem I have with the dictionary is forgetting the name of a
function and trying to guess the name. If there were lots of tags to look
for... but... You must know at least the beginning of a name.

And how can you even search not knowing what to search for when you only
know what you want to solve? (Well, search elsewhere...)

But it would be really very good if editors would put themselves into the
shoes of newbies assuming no prior knowledge about any of the many
acronyms, and providing links for further study or simply more explanation
when a function is not trivial.

I know, it is hard work. If such task could be structured and we were
invited as editors to contribute in a more user-friendly way? But too many
editors may also spoil the soup.

W3School is s great example of how to combine tutorials with reference
lists (dictionary).

The dictionary is a central point of focus for every developer. Probably,
there is just not enough knowledgable manpower to not just do the absolute
minimum.

When Mark is explaining something here, then often I get a picture of what
is behind the hood. He cannot be, but should be editor-in-chief... )
___
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


FFI & VLC Player

2019-05-30 Thread R.H. via use-livecode
I would be very happy if VLC could be used in LC and if we had high level
access to those functions on ALL platforms. It would be a huge
contribution. I would pay for it.

Imagine the number of add-ons that could easily be made using LC.

Roland
___
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: Is there a way to use custom icons in the navbar widget?

2019-06-17 Thread R.H. via use-livecode
To me the nav-bar is pretty much useless the way it is.

It is a problem with widgets in general that they often do not allow fine
grained customization as long as they do not give access to all properties
and other settings and di what all other controls can do. And writing
myself a nav-bar with LCB? It limits rather than is expanding. Or will we
all go for LCB doing everything "there"?

A standard "group" with some nice SVG icons does the trick of a nav-bar
easily and under full control.

(By the way, what is this HTML button widget meant to do? I searched 40
minutes and still have no clue... Is this my fault to scratch my head?)

I would rather like to see standard controls with the enhancement of fully
matching CSS-3 specs. That would be controlling UIX on the level of today's
expectations.

Why do I have to mimick padding, full control of each side of rects, box
models etc.? That should be available "out of the box". CSS is the guide.

And the IDE mostly looks ugly. Tons of beautifully designed interfaces are
competing. As a newbie, I would be distracted looking at today's LiveCode
IDE.

A cramped toolbar, black-white. Ugly looking controls... ... I stop here.
It needs a designer.

There is flat design, Windows new UIX guides, Apples UIX guides, Googles
material UIX... But we still use default buttons that remind me of 10-20
years ago. I do change them. But why are there no really cool default
themes packed with the product? Several modern styles of buttons?
Predefinde fields with labels, It is not so much work to do.

"You can all do this yourself..." -- is not the answer. I do that already.

But an intelligent thoughtful default design of all our controls would
sell. And the stack window needs a customizable scroller, vertical and
horizontal, not a group doing that. It is expected standard.

For beginners, the choice is about what looks "col" first of all, not
understanding anything behind the curtain yet.

Color and form lead to a choice. They signal the level of promise, and if
the promise is fulfilled, the product shines and will be promoted by users.

There are millions of webdesigners, not really programmers. A huge market.
Would they not like to involve LiveCode and even pay for it? They all learn
HTML, CSS and ... JavaScript, or they are quickly out of business. Where is
the bridge? Designing for the web in LC? Translating to JavaScript source
code? (Our web HTML solution does not seem to take off and takes too much
time to download and is too much limited. I could not recommend to serious
customers.)

So, what does LC offer to those millions?

Hard-core developers will continue looking down on LC thinking of it to be
a kind of toy. (It is not.)

Sorry for going beyond the nav-bar.

Who needs LC?

I have answers, but fear that they are no longer convincing enough.

With appreciation and love for LiveCode. But I am concerned.

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


This week in LiveCode

2019-08-20 Thread R.H. via use-livecode
Hello Panos

Thanks for explaining. I assume, not being focused on Filemaker, that the
majority of users relies on your weekly information. I am subscribed to the
forum and this user list. I guess many others as well reading on a regular
basis.

I do not think that it is a bad idea to also mention "work in progress",
maybe in a seperate section. It could also mention if it is for a paid or
for the community or FM usage.

Regards, Roland
___
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


Another list test

2019-08-27 Thread R.H. via use-livecode
I am still not receiving any message through email since last week.

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


Forum messages no longer distributed?

2019-09-03 Thread R.H. via use-livecode
Since August 31st I do no longer receive daily email messages from the
Forum. Am I the only one?

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


Subject: Re: ...and Livecode... where are we now

2019-10-03 Thread R.H. via use-livecode
Some of the rants are leading nowhere.

I do not think that anybody writing as Richmond did has ever been involved
in keeping up a company with such little assumed revenue to pay from for
salaries. And I would love to see such guys running a company and make
money. They will all fail. But to make money is what a company needs to do.
Any constructive suggestion?

A free community version does not generate income. And rants about
"community" is unfair and the words used are unpleasant to read for users
on the list. They do not convey understanding but express personal anger.
Who shall deal with that?

There are many parts and waiting bugs that can be addressed, but LiveCode
is a huge endeavor addressed by limited resources. I ran over 100
developers for business solutions with my own company and know what I am
talking about.

Put a million dollars in, outsource bug fixing and testing, anticipate a
business model that works. It is very difficult, even impossible, unless
supported by giants nobody here wants to see on board.

If you can do better, come up with suggestions that do not put everbody
down. There is also a responsibilty when writing to a public group. If you
want politics, go to politics. There is enough hate I do not want to see it
here.

I never felt and saw that the LiveCode dev team is not serious and not
trying their very best. Nobody in software development can fully predict
how things will work out. It is an inherent problem due to the complexity
of the subject.

In my company, when I counted estimated development time, I multiplied it
by the factor 4. But who will pay? Only big companies pay serious money for
bug fixing and for each new release. So, I moved main funding to getting
paid for hours spent then. Not so possible here.

I also paid to the LC fundraising campagne and was already satisfied with
the support for Unicode. I never expected that everything would be possible
to fully do for such relatively small amount of money. I never had such
attitude. And nobody else could have done it. The team worked dedicated and
hard. But they also have to live.

Hundreds of millions are lost by companies for that complexity reason in
development. It is easy to break down and very hard to build up.

And in comparison to all those I know as well trying, LC does a fantastic
job for do many years. Thanks to such wonderful team.

To be on the edge of everything, pay dozens of millions monthly! Not even
Adobe or Microsoft can do it and fail often enough.

Be decent!

Roland
___
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: Recommended specs for Windows Development computer.

2019-10-05 Thread R.H. via use-livecode
Windows on dedicated hardware is my choice.  Only then you really can say
that you tested on Windows. The brand of the hardware (metal) is not
important in this case. You are not confined to a closed system as with
Apple.

I am exlusively using Windows 10 and I am quite happy with it. I do not
even want more fancy staff.

Windows XP and Windows 7 are outdated. It makes no sense using outdated
systems, unsupported, probably vulnerable. Go for Windows 10, 64bit, latest
version -- regularly updated and upgraded by Microsoft.

8 MB RAM should really be minimum standard. Better are 16. Have at least
200 GB extra space on your harddrive.

The problem with LiveCode's IDE on Windows is that the script editor is not
optimized, even though improved. So, a faster computer and more memory and
a SSD are quite helpful. But I do not want to open the bug box.

And I cannot resist saying that the IDE on Windows does not provide the
user interface (even when using the local theme) that today's users expect.
That is extra work to implement modern themes (Microsoft, Google, etc.)
with expected functionality built-in -- and it should come out of the box
(in an ideal world).

Most time I spend is with user interface design when I count my developing
hours.

Also, I am now using an extra wide screen instead of two separate monitors.
I would not go back to two separate monitors. For development work, I can
only recommend an extra wide single screen --but do not buy the cheapest
model.

All customers I know use Windows. There is not really any choice.

If I purchased a server, I would go for Unix based systems. But there are
so many inexpensive providers of server space that I did not see the
immediate need.

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


Where do we want LiveCode to go? (was "Re: Where LiveCode is Now")

2019-10-05 Thread R.H. via use-livecode
I always appreciate Richards insight and clear expressions. Thank you
Richard.

What do we really want LiveCode to be?

Honestly, I would enjoy LiveCode to replace JavaScript and would put this
as CHOICE NUMBER ONE, ONE and ONE.

And, of course, I know, this will not work.

Let us face the fact that today's browsers are capable of almost
everything you want to do with a rich application. Why should I develop
even desktop applications and mobile apps if pretty much the same can be
done in a modern browser? OK, it only has a single page interface, but do
people care? Already, even in LC, I am mostly developing for single page
interface design anyway and do not use separate windows.

Probably, any other language faces the same dilemma. Maybe it could be
possible using LiveCode to translate LC source code to source code in
JavaScript? But probably not, since JavaScript heavily relies on the DOM in
the browser and LC basically has nothing to do with a browser and its
objects.

So, I am out of ideas.

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


Video-Player LiveCode on Windows

2019-10-21 Thread R.H. via use-livecode
I am using Windows 10, 64bit, latest update. I am using an Indy license.
I am working with LC v9.5.0 Build 15503.

Until Christmas I need to develop a small application for music performers
and highly controlled playing of video and audio. I am not too experienced
with LC's video/audio player capabilities. So i tested.

Since I am almost exclusively using the MP4 format, I tried to display
videos that work on all other players (Windows Media Player, VLC, Movies &
TV, any HTML player), in LC they do not play. Everwhere else, they do.

The provided sample video of the player "C:/Program Files/RunRev/LiveCode
Indy 9.5/Resources/Sample.mpg" works. But it is an .mpg file. If nothing
else works, I have to convert all videos to MPEG?

OK. I installed a separat codec on my Windows system. MP4 partially started
to work. But most of the time, it does not. Only sound is played, but no
video. But even with installed codec that support all kinds of video and
audio formats, the LC player does not play .akp or .webm files.

In my application it is essential to loop through segments of the video
multiple times. The "loop" function cannot be used here as it can not be
defined to loop a specified number of times through a segment defined by
start-time and stop-time and be user controlled. I just tried a repeat loop
that calls the player repeatedly. First, it did not work. But then the
solution: The player first must have stopped and must have sent a stop
message that can be retrieved from the handler "on playstopped" to start
playing again. I am setting a global gVideoEnded. Then starting another
play segment loop is possible with a "wait with messages" command waiting
for the global flag set to be true. The solution worked with some small MP4
files.

But bigger video files (also smaller ones) seem to create problems. For the
first time, the video may (or may not) play, but then it may completely
stop and not play again. No other video then can be played. Even reloading
the same video file will not work then.

Often, at this point, the LC IDE stops working and I have to force-quit and
restart.

Also, from a huge number of local MT4 videos, only a small part will show
video while the sound usually plays.

To me it appears that either this new version of LC is not working with
this player on Windows the way it should, or it is a general bug with the
player, or something is wrong with me.

I am just asking if anybody experienced problems playing MP4 videos on
Windows. I am really interested to know. If it the current player is too
buggy then I have to use a Javascript player or play with ffmeg (very nice
utility). I cannot spend days or weeks trying to find out what is going
wrong. Any experiences playing video in the browser widget?

Any other experiences with playing .webm or .akp video files?

If others here have same or similar problems and there is no bug report, I
will post a bug report. I could not find recent bugs for the player object
on Windows describing this problem.

Roland
___
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 Video Player LiveCode on Windows

2019-10-23 Thread R.H. via use-livecode
@ Paul Dupuis

Thank you very much, Paul, for your detailed answer. I removed my other
Codec package and installed the LAV package as recommended by you. It works
well! Great. All the videos I have in MP4, etc. are playing now. This makes
me happy.

But the other biggest problem:

My IDE starts hanging (Windows 64, Version Indy 9.05 and 9.5) when working
with the player and being in edit mode, mainly using the script editor.
This happens all the time. There is no exact recipe. After some time, I
already notice LC is slowing down (it takes long time for anything to
happen) , and soon after that all freezes, and then I have to force-quit
and restart all over again.

As long as the user mode is on and as long as the player is just playing,
it seems to be ok . Except, of course, there is a huge bug list that you
mentioned.

If anybody else has experienced hanging/freezing LiveCode using the player
in edit mode, I would then create a but report because I could not find a
similar report there. Unfortunately, there is no very clear recipe yet.

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


Decoding "quoted-printable" -- Help needed

2019-11-12 Thread R.H. via use-livecode
Even with a lot of research and comparing functions in C# and Javascript, I
do understand it yet.

In E-Mail-bodies, the content parts are often either based64-encoded, no
problem with that, but there are also other encodings called
"quoted-printable". This is text that in my case needs to be converted to
UTF-8.

Now, here all characters that are not pure ASCII are marked with a equal
sign "=" (similar to the "%" in an URL encoded string) and the following
two characters define the byte value in Hex notation. There can be one, two
and even three separate byte values for a character encoded in UTF-8.

Example: "F=C3=BCr". This translates to the German Umlaut and would render
to the string "für". The "ü" is not part of the pure ASCII and therefore it
is encoded this way. It is an encoding specific for UTF-8.

Now, as you can see, there is not just one byte represented with "=C3".
There are actually two bytes "=C3=BC": represented in Hex by "C3" and "BC"
each individually converted to decimal notation as 195 and 188. If you
URL-encode the single bytes using "%" instead of "=" such as "%U3" it will
give it's own character whith will be "À". The URL-encoding of "%BC" gives
"Ä". So, this does not help. I have to somenow look at the two bytes
together.

Converting pure ASCI to Hex gives the correct result in other programs:
-- Link: https://www.rapidtables.com/convert/number/ascii-to-hex.html:
-- Enter: "ü"
-- Result: "C3,BC" --- what we are looking for when encoding: Two separate
byte representations.
-- But it only works when the character encoding is UTF-8.

How do I come from "=C3=BC" to codepoint("ü") = 252? What do I need to
calculate?
How do we  decode such "quoted-printable" encoded string to UTF-8?

Thanks in advance...)
Roland
___
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


Decoding "quoted-printable" -- Help needed -- Solved

2019-11-14 Thread R.H. via use-livecode
For those interested:

With the help of a privately received message hinting at a solution used
prior to LC7 I was able to construct the required functions for LC 7 and
above.

I must say that I am not really aware of all the many functions LiveCode
presents, I did not even know about baseConvert() before doing a lot of
research. I guess, each of us must go through all the commands and
functions LC provides and study them. It is difficult to find when not
knowing how and what to search for. Also, I had to try to understand what
codepoints are.

Here I am not using the actual quoted-printable format of codepoints in Hex
presentation each with a equal sign "=" as a prefix. That is easy to
retrieve or construct using LiveCode chunk expressions. Instead I am using
comma delimited items.

// The encoding priot to LC7 according to Mark (still works even today)
-- put unidecode(uniencode("e","english"),"UTF8") into x
-- put chartonum(char 1 of x) && chartonum(char 2 of x) into y

// Encoding and decoding UTF-8 for quoted-printable chars (as they may
appear in certain e-mail parts)
set the itemdelimiter to ","
put "€" into tChar -- Using the Euro symbol which is encoded with 3
codepoints (there can be up to 4 for quoted-printable).

// Encode a UTF-8 character to a quoted-printable ASCII encoding
put textEncode( tChar ,"UTF-8") into tCodedChar
repeat for each codePoint tCodePoint in tCodedChar
   put BaseConvert ( codePointToNum (tCodePoint) , 10 , 16 ) &"," after
tEncoded
end repeat
delete last char of tEncoded
put tEncoded &CR into msg -- just for testing

// Decode a quoted-printable ASCII string to UTF-8
put empty into tDecoded
repeat for each item tItem in tEncoded
   put numToCodePoint ( BaseConvert ( tItem , 16, 10 ) ) after tDecoded
end repeat
put textDecode (tDecoded , "UTF-8") after msg -- just for testing

// Result in message box
-- E2,201A,AC -- In actual quoted-printable that would be: "=E2=201A=AC"
and our items must be converted accordingly
-- €

Roland
___
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: Decoding "quoted-printable" -- Help needed -- Reopened

2019-11-14 Thread R.H. via use-livecode
Oh, sorry, I was too quick declaring a solution.

Even though the code of the function works fine, the result also converts
back, but the "quoted-printable" or "UTF-8" code expects that each
codepoint is encoded in Hex with just two ASCII letters representing a
codepoint.

For example, for the Euro symbol "€" we have three codepoints.
The function below converts to "=E2=201A=AC" while it must be "=E2=82=AC".
The "=" sign is just a delimiter in quoted-printable.

Now, I do not know what is wrong in my thinking as I am not getting quite
the same results.
(The result is ok for other symbols such as 'ü'.)

EXAMPLE:

put "€" into tChar
   // First encode to UTF-8:
put textEncode(tChar,"UTF-8") into tCodedChar
   // Repeat for each codepoint in the UTF-8 char
repeat for each codePoint tCodePoint in tCodedChar
   // Encode each codepoint to its integer expression and convert to
Hex value:
  put "="& BaseConvert ( codePointToNum (tCodePoint) , 10 , 16 ) after
tEncoded
end repeat
put tEncoded into field "Show Codepoints" -- Expected ASCII representing
Hex numbers
-- Result: "=E2=201A=AC" -- Instead of "=E2=82=AC" , but valid and working.

The actual "correct" UTF-8 result can be tested here:
http://www.endmemo.com/unicode/unicodeconverter.php

What am I missing?

Thanks a lot
Roland
___
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: Decoding "quoted-printable" -- Help needed -- Reopened - Solved 2nd

2019-11-14 Thread R.H. via use-livecode
I am very sorry that I am overstressing this list. I keep on answering my
own questions.

The function needs to address bytes. I found this looking at some similar
C# code:

# Code snippet from C#
# Source:
https://stackoverflow.com/questions/32083334/consecutive-control-characters-in-quoted-printable-not-decoding-correctly
---
string sHex = input;
sHex = sHex.Substring(i + 1, 2);
int hex = Convert.ToInt32(sHex, 16);
byte b = Convert.ToByte(hex);
output.Add(b);
i += 3;
---

I oversaw that the value must be a byte value. Anyway, that is all new to
me.
So, the correct and tested converting to and from "quoted-printable" with
encoded UTF8 in LiveCode >7 is:

---
local tChar
local tItem
local tCodedChar
local tCodePoint
local tEncoded
local tDecoded

set the itemdelimiter to "="

// ENCODE EXAMPLE
put "€" into tChar
put textEncode ( tChar , "UTF-8" ) into tCodedChar
repeat for each codePoint tCodePoint in tCodedChar
  put "="& baseConvert ( byteToNum ( tCodePoint ) , 10 , 16 ) after
tEncoded
end repeat
put tEncoded into msg --->  "=E2=82=AC" - the quoted-printable UFT-8
encoding of the Euro symbol "€"

// DECODE EXAMPLE
put "=E2=82=AC" into tEncoded
delete char 1 of tEncoded
repeat for each item tItem in tEncoded
  put numToByte ( BaseConvert ( tItem , 16 , 10 ) ) after tDecoded
end repeat
put textDecode ( tDecoded , "UTF-8" ) into msg --> the Euro symbol "€"
---

Thanks to all.

Given a bit of time, I will post a solution for UTF8 quoted-printable
encoded E-Mail blocks of text in the Forum.

Roland


---

Am Do., 14. Nov. 2019 um 20:41 Uhr schrieb R.H. :
>
> Oh, sorry, I was too quick declaring a solution.
>
> Even though the code of the function works fine, the result also converts
back, but the "quoted-printable" or "UTF-8" code expects that each
codepoint is encoded in Hex with just two ASCII letters representing a
codepoint.
>
> For example, for the Euro symbol "€" we have three codepoints.
> The function below converts to "=E2=201A=AC" while it must be "=E2=82=AC".
> The "=" sign is just a delimiter in quoted-printable.
>
> Now, I do not know what is wrong in my thinking as I am not getting quite
the same results.
> (The result is ok for other symbols such as 'ü'.)
>
> EXAMPLE:
>
> put "€" into tChar
>// First encode to UTF-8:
> put textEncode(tChar,"UTF-8") into tCodedChar
>// Repeat for each codepoint in the UTF-8 char
> repeat for each codePoint tCodePoint in tCodedChar
>// Encode each codepoint to its integer expression and convert to
Hex value:
>   put "="& BaseConvert ( codePointToNum (tCodePoint) , 10 , 16 )
after tEncoded
> end repeat
> put tEncoded into field "Show Codepoints" -- Expected ASCII representing
Hex numbers
> -- Result: "=E2=201A=AC" -- Instead of "=E2=82=AC" , but valid and
working.
>
> The actual "correct" UTF-8 result can be tested here:
http://www.endmemo.com/unicode/unicodeconverter.php
>
> What am I missing?
>
> Thanks a lot
> Roland
___
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


Valentina -- Reporting for LiveCode 50% Off Last Day Cyber Monday 2019

2019-12-06 Thread R.H. via use-livecode
@Lynn Fredricks

I missed this message about Valentina and offer. Well, no problem.

May I ask about the basic principle of Valentina database and Valentina
Reports for LiveCode?

I assume that the Report Engine is built on the SQL engine and not into
LiveCode itself?

Years ago I personally met the original developer of Valentina in Kherson
in Ukraine. There are very smart people, often mathematicians by university
education, and highly skilled in low-level programming, in C, C++,
Assembler, and whatever. I always thought that such people could be ideal
supporting the core of the LiveCode engine. I had good experiences and very
happy customers in Switzerland, USA and elsewhere.

So far I use LiveCode itself for printing reports. It is a lot of work, but
also it is getting the job done. Many pages of reports can be created "on
the fly" using as many cards as there are pages to also be able to know
page numbers and programmatically format each page according to certain
rules with sub summaries and a grand summary. Also, this rendering on each
page allows for a good preview. It is something like the DataGrid with
details of varying height. After the report is printed, all cards are
deleted. But again, it is really lot of work doing it well.

So, Valentina Report may be a better way. Another question: Why should we
use Valentina when we have SQLite?

Regards, Roland
___
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: Valentina -- Reporting for LiveCode

2019-12-06 Thread R.H. via use-livecode
Oh, thank you Lynn.

That is nice from you to write detailed.

Please, my greetings to Ruslan. He may not remember me, already how man
years passed? I think 16 or 17 years. I had a group of developers in
Kherson.

I think it will be good to address your product more strongly on the list.
And people are LiveCoder's, but only some of them really know software
development deeply. So, it does not hurt to assume that you are talking to
non-developers.

I know that Valentina is excellent. Also, I had in mind to raise the
question for a little wider audience, not just for myself.

In my opinion, LC needs some really good developers working on the core
engine. But I do not think that there is money. )

Regards, Roland



Am Fr., 6. Dez. 2019 um 21:34 Uhr schrieb Lynn Fredricks <
lfredri...@proactive-intl.com>:

> > I missed this message about Valentina and offer. Well, no problem.
> >
> > May I ask about the basic principle of Valentina database and
> > Valentina Reports for LiveCode?
>
> Yes, and I will also cc to the list as these are good questions that others
> may be interested in as well.
>
>
> > I assume that the Report Engine is built on the SQL engine
> > and not into LiveCode itself?
>
> There isn't actually a 'SQL engine' but a kind of language.
>
> The Valentina ADK includes its own SQL interpreter that is highly optimized
> C++ for speed.
>
> The Reporting portion works with most major databases: MS SQL Server,
> MySQL,
> MariaDB, PostgreSQL as well as SQLite and Valentina DB. A report then
> passes
> queries to database sources to pull in the data needed to populate the
> reports.
>
>
>
> > Years ago I personally met the original developer of
> > Valentina in Kherson in Ukraine. There are very smart people,
> > often mathematicians by university education, and highly
> > skilled in low-level programming, in C, C++, Assembler, and
> > whatever. I always thought that such people could be ideal
> > supporting the core of the LiveCode engine. I had good
> > experiences and very happy customers in Switzerland, USA and
> > elsewhere.
>
> The team is very talented, thanks!
>
>
> > So far I use LiveCode itself for printing reports. It is a
> > lot of work, but also it is getting the job done. Many pages
> > of reports can be created "on the fly" using as many cards as
> > there are pages to also be able to know page numbers and
> > programmatically format each page according to certain rules
> > with sub summaries and a grand summary. Also, this rendering
> > on each page allows for a good preview. It is something like
> > the DataGrid with details of varying height. After the report
> > is printed, all cards are deleted. But again, it is really
> > lot of work doing it well.
>
> LiveCode is an excellent front end for so many different kinds of apps.
> Like
> other tools, you can create a reporting system in it, as you can with other
> tools. As with any tool though, and this includes historic examples of
> solutions like FileMaker, there are many reasons why you might want to keep
> your data and different renderings of data outside of your application
> (stack).
>
> In regards to Valentina Reports though, there is a bit more to it.
>
> - You can use Valentina Reports ADK to render a report in many formats,
> including PDF, graphics, HTML and the like, using its own very fast,
> compiled engine.
>
> - You can upload a Valentina Project to Valentina Server and 'serve' the
> report from there, and leverage other languages in the process. Valentina
> Server is a very flexible and powerful solution that combines the following
> 'sub' servers:
>
> Valentina Reports Server
> Valentina DB Server (for our own ultra-fast database)
> Valentina SQLite Server (our own implementation of SQLite so you can easily
> upscale your SQLite apps to true client-server)
> (New) Valentina Forms Server (more on that later if you want to know more)
>
> For reports, you can use any of the external data sources mentioned as well
> as the sub-server databases on the server, Valentina DB Server and
> Valentina
> SQLite Server.
>
> It is also possible to use our free Valentina Studio as a 'client' for
> Valentina Reports (and Forms), making it possible to run a report, print it
> to PDF and the like, without any ADK or Server. You can build reports in
> Valentina Studio Pro and then share the resulting project with users of
> free
> Valentina Studio. You can also build parameters into the report to give the
> end user some flexibility in what is displayed within Studio.
>
> > So, Valentina Report may be a better way. Another question:
> > Why should we use Valentina when we have SQLite?
>
> There are a lot of different databases on the market, some of which are
> free
> and others are not. We support SQLite with Valentina SQLite Server because
> it is quite popular and it does what many need. In our experience, those
> that do may eventually switch to Valentina DB once they figure out how it
> would benefit them.
>
> SQLite has its own m

Re: OAuth2 was Re: google sheets - anybody doing anything besides mergGoogle

2020-03-13 Thread R.H. via use-livecode
If this would help...

I am using OAuth2 with the Google Calendar with a stack that was originally
developed by Denver77 and had been posted the stack "GoogleCalendarTest" to
the Forum in 2018. It explains clearly how to use Google's oAuthClient and
actually, I was able to receive the client id, the client secret and use
Google's OAuth2 protocol.

Similar, it should work for Google Sheets, Contacts, GMail, etc.

And it works very well up to date. Only, the token needed to be renewed,
and Google requires that the user logs in passing all the authentication
and permission tests if the app has not been registered with Google. A
Google account is required

I will ask permission to post this LiveCode Calendar
"GoogeCalendarTest.livecode" solution again. Or is it still somewhere? I
could not find on the Forum and other places. I made some changes to it.

Otherwise, I would try to recreate it if there is a need and also try to
test it with Google sheets (which I am also using as some clients require
them).

Using any Google apps, some basic JavaScript knowledge is usually helpful
since Google Apps Script (based on JavaScript) is the predominant user
language working with Google apps and it will have to be used in most cases
if server work is needed. Google App Script is not client-side.

https://developers.google.com/apps-script/overview

Sure, I think, we should develop specialized LC OAuth2 libraries to access
the apps of the big players and make them available for

- Google
- Microsoft
- Apple
- Amazon
- etc.

in a straight-forward way, or at least a step-by-step instruction how to
use their products with LC -- which also needs constant monitoring and
updating for changes such big players introduce from time to time.

Which end user in the corporate world does not work with GMail, GMail
contacts, Microsoft Outlook, etc? At least these are standards in the
corporate world and could increase the attractiveness of LC very much if LC
would offer help for specialized tasks using such apps as their base.

Roland
___
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: OAuth2 was Re: google sheets - anybody doing anything besides mergGoogle

2020-03-14 Thread R.H. via use-livecode
@Matthias: "i found a forum post from mimu which included also a
GoogleCalendarTest stack.  http://forums.livecode.com/viewtopic.php?t=31840";

Yes, correct. Thanks for the hint! This is the one I am using. The scripts
are very good and allow to expand the idea of connecting to Google
Services. It needs some work first understanding the scripts. The main one
is in the card, but well documented.

Again, I think it would be more than helpful for all LC users and the
visibility of LiveCode on the market if there is something  "out of the
box" to connect to all kinds of OAuth2 main services since integration
becomes a major subject. I am not sure I can do this (giving time
constraints, otherwise I would). We will see...

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


Resetting ids

2024-09-27 Thread R.H. via use-livecode
 @jbv@souslelogo.c om You can reassign id's to your
controls: "Set the id of control x to 200" will work if no other control
has such id.


>
> Hi list,
>
> I have a script that creates various controls on the fly
> and then groups some of them for a rather sophisticated layout.
> As I had to make many tests, modify my script many times
> and save the stack each time, the ids of the controls now
> reach astronomical values (above 40).
> Is there a way to reset the ids to minimum values before
> building the final standalone, or will they be reset
> automatically when the standalone is built ?
> My fear is that, when running the standalone, new created
> controls ids will get even greater values and might
> finally reach a maximum...
>
> Thank you in advance.
> jbv
>
>
>
> --
>
> Subject: Digest Footer
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> --
>
> End of use-livecode Digest, Vol 252, Issue 14
> *
>
___
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