Widget TurnImage89_v100

2019-02-05 Thread hh via use-livecode
TurnImage is a pure LiveCode Builder widget, there is no essential
script access and no use of JavaScript.

The widgets lets you
= turn an image horizontally or vertically with a 2D-perspective view,
= switch from an image to a second image while turning or rotating.

Thus it is essentially an animation tool for displaying LC objects.
For example two groups of same size that make up the front and back of
a turning "card". Just try the demo in the sample stack.

The widget is fast enough to "turn" a video by grabbing frames from it.
For this we need to use a browser widget to play the video (just play,
nothing else) because the LC player object is essentially blocking.

TurnImage is a "fat" widget that works with LC 8 and LC 9 identically
and also in all LC editions, from community up to business.

This sample stack includes buttons to install (or remove) the widget
to/from both LC 8 and 9.
And it containes several examples for scripting the widget's properties.

Download it from "Sample Stacks" or
http://livecodeshare.runrev.com/stack/929/

The widget is free for non-commercial use. For commercial use please
give a (small) fee to the LC developer help fund.

The source code (lcb-file) is not included.


___
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


editing data grid column via scrip

2019-02-05 Thread Hershel F via use-livecode
Hi everyone, i searched high and low for this without success.
Question, i have a data grid (trying to to set up an invoice form),
columns, costumer_id, product_id, company_name, product_name, price. etc.
option menus in product name and company name, 
Now when i use the options to select a product name, (product_name col.) i want 
to put the product id  into the product_id column by selecting the option menu 
btn, i tried many ways even when it went in it didn’t show up in the send 
"printkeys" to group  “data_grid_0” . all help would appreciate it.

Thanks in advanced. Hershel F
___
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: Re: How to tell if a field is "closed"?

2019-02-05 Thread Paul Dupuis via use-livecode

Thank you everyone especially Geoff and Mark.

I ended up making some UI improvements, using a flag, and the focus tip 
from Mark so now the "Import" button is only enable when all fields are 
closed AND validated!


I should have thought of most of this myself, but some days you have to 
write code when your brain would rather not.


___
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 tell if a field is "closed"?

2019-02-05 Thread dunbarxx via use-livecode
I think you had it right when you mentioned that you should redesign the
interface. There are many threads, especially on the forum, debating the
merits of live validation of user input as opposed to anything else at all.

I always, always recommend never letting invalid data be typed or pasted,
whatever, into a field where such data will break something down the road.

Rewrite. I bet is not too onerous a task.

Craig Newman



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
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 tell if a field is "closed"?

2019-02-05 Thread Mark Waddingham via use-livecode

On 2019-02-05 20:25, Paul Dupuis via use-livecode wrote:

I have a problem for which I should probably redesign the user
interface, but would rather not do so for many reasons.

The problem is this:

1) There are some fields on a card. Each field has a "closeField"
handler that checks the fields content for validity and presents
appropriate error messages (via a standard 'answer" command).
2) There is an "Import" button that collects the field values and lots
of other data and does a task in my application.
3) If a user edits a fields and enters an invalid value and does not
click, tab, or press the return key to "close" the field and trigger
the "closeField" message, but immediately clicks on the "import"
button, my import script starts using the invalid value from the open
field while at the same time a closeField message does get send and an
answer dialog appears telling what is invalid about the entry.

However, I am wondering if anyone in the LiveCode brain trust has
figured out a better way to handle something like this?


How about this...

In your closeField handlers, if the field fails validation do:

  if  then
answer "Field failed validation" with "Oops - I'll correct it" or 
"Cancel"

if it is "Cancel" then
  exit to top
end if
focus on me
exit closeField
  end if

Then in your import button do:

  on mouseUp
focus on nothing
if the selectedField is not empty then
  exit mouseUp
end if
answer "Go!"
  end mouseUp

This should mean the import step won't run until a closeField handler 
has successfully finished.


Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
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 tell if a field is "closed"?

2019-02-05 Thread Geoff Canyon via use-livecode
I'm sure someone else will come up with something better, but at the least,
don't set a custom property for each field; instead, in the openField set
one custom property for the card or group that the fields are in, something
like "isOpen", with the long id of the open field; then empty that property
on exitField. That way when you import you just have to check that one
property, and if it contains a long id, validate that field.

On Tue, Feb 5, 2019 at 11:25 AM Paul Dupuis via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I have a problem for which I should probably redesign the user
> interface, but would rather not do so for many reasons.
>
> The problem is this:
>
> 1) There are some fields on a card. Each field has a "closeField"
> handler that checks the fields content for validity and presents
> appropriate error messages (via a standard 'answer" command).
> 2) There is an "Import" button that collects the field values and lots
> of other data and does a task in my application.
> 3) If a user edits a fields and enters an invalid value and does not
> click, tab, or press the return key to "close" the field and trigger the
> "closeField" message, but immediately clicks on the "import" button, my
> import script starts using the invalid value from the open field while
> at the same time a closeField message does get send and an answer dialog
> appears telling what is invalid about the entry.
>
> However, my import routine is off and and running with bad data. I need
> a way at the start of the import routine to ensure all fields are closed
> - i.e. that their closeField handlers have ensured the field values are
> correct.
>
> In a worst case, I could solve this by a custom property for each field
> - say valueOK - and set it to false on openField and true on closeFIeld
> or exitFIeld if the edited value valid. The import button would then
> check for any instances where the custom property 'vaueOK' is false, and
> if there are any, exit without running and with an appropriate message.
>
> However, I am wondering if anyone in the LiveCode brain trust has
> figured out a better way to handle something like this?
>
> ___
> 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: How to tell if a field is "closed"?

2019-02-05 Thread Clarence Martin via use-livecode
I think that you are on the right track.
I would have a tPending variable  with a true value that changes to false
when the field is complete. "OnLeave" or "exitField". This variable would
not allow any other task as long as the tPending variable is true.

Sincerely,

Clarence Martin
Email: chi...@themartinz.com
Cell: 626 696-5561

-Original Message-
From: use-livecode  On Behalf Of Paul
Dupuis via use-livecode
Sent: Tuesday, February 05, 2019 11:25 AM
To: use-livecode@lists.runrev.com
Cc: Paul Dupuis 
Subject: How to tell if a field is "closed"?

I have a problem for which I should probably redesign the user interface,
but would rather not do so for many reasons.

The problem is this:

1) There are some fields on a card. Each field has a "closeField" 
handler that checks the fields content for validity and presents appropriate
error messages (via a standard 'answer" command).
2) There is an "Import" button that collects the field values and lots of
other data and does a task in my application.
3) If a user edits a fields and enters an invalid value and does not click,
tab, or press the return key to "close" the field and trigger the
"closeField" message, but immediately clicks on the "import" button, my
import script starts using the invalid value from the open field while at
the same time a closeField message does get send and an answer dialog
appears telling what is invalid about the entry.

However, my import routine is off and and running with bad data. I need a
way at the start of the import routine to ensure all fields are closed
- i.e. that their closeField handlers have ensured the field values are
correct.

In a worst case, I could solve this by a custom property for each field
- say valueOK - and set it to false on openField and true on closeFIeld or
exitFIeld if the edited value valid. The import button would then check for
any instances where the custom property 'vaueOK' is false, and if there are
any, exit without running and with an appropriate message.

However, I am wondering if anyone in the LiveCode brain trust has figured
out a better way to handle something like this?

___
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


How to tell if a field is "closed"?

2019-02-05 Thread Paul Dupuis via use-livecode
I have a problem for which I should probably redesign the user 
interface, but would rather not do so for many reasons.


The problem is this:

1) There are some fields on a card. Each field has a "closeField" 
handler that checks the fields content for validity and presents 
appropriate error messages (via a standard 'answer" command).
2) There is an "Import" button that collects the field values and lots 
of other data and does a task in my application.
3) If a user edits a fields and enters an invalid value and does not 
click, tab, or press the return key to "close" the field and trigger the 
"closeField" message, but immediately clicks on the "import" button, my 
import script starts using the invalid value from the open field while 
at the same time a closeField message does get send and an answer dialog 
appears telling what is invalid about the entry.


However, my import routine is off and and running with bad data. I need 
a way at the start of the import routine to ensure all fields are closed 
- i.e. that their closeField handlers have ensured the field values are 
correct.


In a worst case, I could solve this by a custom property for each field 
- say valueOK - and set it to false on openField and true on closeFIeld 
or exitFIeld if the edited value valid. The import button would then 
check for any instances where the custom property 'vaueOK' is false, and 
if there are any, exit without running and with an appropriate message.


However, I am wondering if anyone in the LiveCode brain trust has 
figured out a better way to handle something like this?


___
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: AW: weird video screenshot problem

2019-02-05 Thread Mark Waddingham via use-livecode

On 2019-02-05 17:06, Tiemo Hollmann TB via use-livecode wrote:

Hello Hermann,

that was my first idea also, when a customer came up with this.
But that doesn't explains, why on my computer two different LC stacks 
show

different results - beside of there is any "hidden" LC option, which
interferes with the video card drivers, which I have set differently in 
my

two stacks and don't remember


The only setting I can think of 'Enable Hi-DPI Scaling' in the 
standalone settings on the Windows platform tab.


Failing that - have you tried running the two apps in a fresh/new/clean 
user account on your machine? (This is to discount that windows has, for 
some reason, set some piece of unknown state on a per-app-per-user basis 
which is causing the problem).


Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
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: AW: weird video screenshot problem

2019-02-05 Thread J. Landman Gay via use-livecode

Did you set the resizeQuality maybe? Or the jpegQuality?

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On February 5, 2019 10:11:41 AM Tiemo Hollmann TB via use-livecode 
 wrote:



Hello Hermann,

that was my first idea also, when a customer came up with this.
But that doesn't explains, why on my computer two different LC stacks show
different results - beside of there is any "hidden" LC option, which
interferes with the video card drivers, which I have set differently in my
two stacks and don't remember

Thanks
Tiemo


-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag
von hh via use-livecode
Gesendet: Dienstag, 5. Februar 2019 14:08
An: use-livecode@lists.runrev.com
Cc: hh 
Betreff: Re: weird video screenshot problem


This has nothing to do with LiveCode, is only influenced by Windows
and the user's graphics card.

Did the user already try
Settings > Advanced settings > Let windows try to fix apps so they're
not blurry: ON ?

You could also compare with system screenshots (win+print).


Sorry, the menu line above should read:

Settings > Display > Advanced scaling settings > Let windows try to fix apps
so they're not blurry: ON

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


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





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

AW: weird video screenshot problem

2019-02-05 Thread Tiemo Hollmann TB via use-livecode
Hello Hermann,

that was my first idea also, when a customer came up with this.
But that doesn't explains, why on my computer two different LC stacks show
different results - beside of there is any "hidden" LC option, which
interferes with the video card drivers, which I have set differently in my
two stacks and don't remember

Thanks
Tiemo


-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag
von hh via use-livecode
Gesendet: Dienstag, 5. Februar 2019 14:08
An: use-livecode@lists.runrev.com
Cc: hh 
Betreff: Re: weird video screenshot problem

> This has nothing to do with LiveCode, is only influenced by Windows 
> and the user's graphics card.
> 
> Did the user already try
> Settings > Advanced settings > Let windows try to fix apps so they're 
> not blurry: ON ?
> 
> You could also compare with system screenshots (win+print).

Sorry, the menu line above should read:

Settings > Display > Advanced scaling settings > Let windows try to fix apps
so they're not blurry: ON

___
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: Enhancement: transparently persist/retrieve large amounts of array data as JSON

2019-02-05 Thread Brian Milby via use-livecode
If you want to build from source, you can test it now.  It is in the 
develop-9.0 branch.

Thanks,
Brian
On Feb 5, 2019, 12:34 AM -0500, Bernard Devlin via use-livecode 
, wrote:
> As far as I can see, providing this enhancement is (in essence) no more
> than the addition of one line to Livecode's compilation process.
>
> Details here:
>
> https://quality.livecode.com/show_bug.cgi?id=21821
>
> Seems to me to be a huge gain for virtually no effort. Array data could be
> stored and indexed outside of a stack.
>
> Regards
> Bernard
> ___
> 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: weird video screenshot problem

2019-02-05 Thread hh via use-livecode
> This has nothing to do with LiveCode, is only influenced
> by Windows and the user's graphics card.
> 
> Did the user already try
> Settings > Advanced settings > Let windows try to fix apps so
> they're not blurry: ON ?
> 
> You could also compare with system screenshots (win+print).

Sorry, the menu line above should read:

Settings > Display > Advanced scaling settings > Let windows try
to fix apps so they're not blurry: ON

___
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: weird video screenshot problem

2019-02-05 Thread hh via use-livecode
This has nothing to do with LiveCode, is only influenced
by Windows and the user's graphics card.

Did the user already try
Settings > Advanced settings > Let windows try to fix apps so
they're not blurry: ON ?

You could also compare with system screenshots (win+print).

___
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


weird video screenshot problem

2019-02-05 Thread Tiemo Hollmann TB via use-livecode
Hello,

I am experiencing a very weird problem, taking a screenshot from a video on
Windows. Perhaps anybody has an idea where to look for?

 

I have two programs, where I am playing the same mp4 videos. The user can
make screenshots from the paused video and store them as JPGs/PNGs. If the
user has the windows display settings text size at 100%, everything works
fine in both programs. When setting the windows display text size to 125% or
above, the quality of the screenshot in one of the both programs gets almost
unusable. The image is corrupted by many bad pixels (red, black and lost
pixels). The other program still shows a fine screenshot.

 

My first idea was, that there must be a difference in the build of the
standalones, so I tested the two stacks in the same LC 9.0.2 (and down to LC
8) IDE with the same result. I compared the two stacks and didn't found a
relevant difference in displaying the video and taking the screenshot. Both
codes are almost the same here. The relevant code looks like:

set the alwaysBuffer of player "VideoPlayer" to false

start player "VideoPlayer"

stop player "VideoPlayer"

export snapshot from rect (globalLoc(topLeft of player "VideoPlayer") ,
globalLoc(bottomRight of player "VideoPlayer")) to gScreenshot as PNG

put gScreenshot into img "ScreenshotImg"

 

Here you can download an example of the two screenshots in a pdf:
http://www.kestner.de/material/screenshot-test.pdf

 

Has anybody ever seen such a phenomenon? Any idea what could cause this
issue in combination with the text size of > 100%? And for what difference I
could look for in my two programs what could cause this issue in one of
them?

 

Thanks for any ideas

Tiemo

 

 

___
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