Re: Not able to use the clipboard with HTML5 deployment

2016-02-21 Thread Sannyasin Brahmanathaswami
"Over to another web page"

Ok well that's a different game for sure and would require clipboard

BR

( from my mobile )




On Sun, Feb 21, 2016 at 7:25 PM -0800, "Terry Judd" 
> wrote:

So, I want to copy the formatted text from my LC HTML5 app to a text field
in another webpage that is independent of my HTML5 app and over which I
have no control. I don¹t think that¹s possible without using the clipboard
as an intermediary - is it?

Regards,

Terry...

On 22/02/2016 2:10 pm, "use-livecode on behalf of Sannyasin
Brahmanathaswami"  wrote:

>Until that is working, why not just set a local (or possibly you will
>need a global)  variable and as the selections are made, append to the
>global variable, then when ready they user clicks a button and the global
>variable containing the data is inserted into the comments?  You can
>emulate a "copy" by just save the selectedText... and passing this to
>your global...
>
>Why is the clipboard mission critical to the architecture? Especially if
>the series of statements can each be contained in a single line, then you
>can really do this easily with a locked field and clicks on the lines...
>I can think of about 8 different ways to accomplish this without the
>clipboard (depends on how the assessment rubric data is
>formated/presented, of course)
>
>BR
>
>
>On February 21, 2016 at 3:05:03 PM, Terry Judd
>(terry.j...@unimelb.edu.au) wrote:
>
>I¹m trying to create a relatively simple HTML5 Œapplet' that allows the
>user to select from a series of statements (an assessment rubric) to
>generate a basic feedback report that they can paste into an existing
>comments box within one of the bits of our learning management system.
>Seemed like a relatively straightforward test for LC¹s new HTML5 export
>feature except that despite what the dictionary says setting the
>clipboardData doesn¹t work. This seems to be confirmed by a search of the
>quality control centre (unresolved bug 16251 from October last year).
>Does anyone have any information on if and when clipboard support will be
>added? I¹m pretty much stuck without it.
>
>Regards,
>
>TerryŠ
>___
>use-livecode mailing list
>use-livecode@lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode


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


Re: Not able to use the clipboard with HTML5 deployment

2016-02-21 Thread [-hh]
> Terry J. wrote:
> OK, thanks hh. It’s probably a little too clunky for my purpose
> (I don’t think I can expect users to manually replace placeholder
> characters with returns) but nice to know that there is a
> workaround of sorts.

If the webpage that receives the text (page) accepts 'styled' text
you could -- before delivering the text -- juggle with
   case RTFtext: \par, \line or \softline
   case HTMLtext: ,  or space
so that the copied text (if it's not too long) becomes one line
for using the Ask dialog??

hh
___
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: Finding UTC

2016-02-21 Thread [-hh]
> Peter H. wrote:
> I don;t have the link to hand but there's a Youtube video that's been
> posted on this list before about what a nightmare it is to handle all
> the scenarios involving what date and time it is in different parts of
> the world and keeping up to date with changes. Pete 

> Kay C.L. wrote:
> I don;t have the link to hand but there's a Youtube video
> https://www.youtube.com/watch?v=-5wpm-gesOY

Here are several other approaches also discussed. Especially good
pro and contra for TAI, CUT and 'internet time'(Swatch).

http://www.timeanddate.com/topics/timekeeping

___
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: Not able to use the clipboard with HTML5 deployment

2016-02-21 Thread Terry Judd
OK, thanks hh. It’s probably a little too clunky for my purpose (I don’t
think I can expect users to manually replace placeholder characters with
returns) but nice to know that there is a workaround of sorts.

Great set of LC HTML5 demos BTW!

Terry…

On 22/02/2016 2:59 pm, "use-livecode on behalf of [-hh]"
 wrote:

>> So, I want to copy the formatted text from my LC HTML5 app to a
>> text field in another webpage that is independent of my HTML5
>> app and over which I have no control. I don¹t think that¹s
>> possible without using the clipboard as an intermediary - is it?
>> Regards, Terry...
>
>Hi Terry (and BR)
>this is currently the one and only way available for communication
>with a HTML5 standalone: The Ask dialog.
>
>I made a demo, available at hh.on-rev-com/html5/ (= overview)
>called 'Copy/Paste Text'-Test
>
>It's made with dp9 in November, nothing related to that changed
>in dp10-14, stack is downloadable.
>[Use Chrome, Opera or Safari.
>Firefox: yes < v44, NO v44, yes > v44 (coming soon)]
>
>hh
>___
>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: Not able to use the clipboard with HTML5 deployment

2016-02-21 Thread [-hh]
> So, I want to copy the formatted text from my LC HTML5 app to a
> text field in another webpage that is independent of my HTML5
> app and over which I have no control. I don¹t think that¹s
> possible without using the clipboard as an intermediary - is it? 
> Regards, Terry...

Hi Terry (and BR)
this is currently the one and only way available for communication
with a HTML5 standalone: The Ask dialog.

I made a demo, available at hh.on-rev-com/html5/ (= overview)
called 'Copy/Paste Text'-Test

It's made with dp9 in November, nothing related to that changed
in dp10-14, stack is downloadable.
[Use Chrome, Opera or Safari.
Firefox: yes < v44, NO v44, yes > v44 (coming soon)]

hh
___
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: Finding UTC

2016-02-21 Thread Kay C Lan
On Mon, Feb 22, 2016 at 5:50 AM, Peter Haworth  wrote:

> I don;t have the link to hand but there's a Youtube video


https://www.youtube.com/watch?v=-5wpm-gesOY
___
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: Not able to use the clipboard with HTML5 deployment

2016-02-21 Thread Terry Judd
So, I want to copy the formatted text from my LC HTML5 app to a text field
in another webpage that is independent of my HTML5 app and over which I
have no control. I don¹t think that¹s possible without using the clipboard
as an intermediary - is it?

Regards,

Terry...

On 22/02/2016 2:10 pm, "use-livecode on behalf of Sannyasin
Brahmanathaswami"  wrote:

>Until that is working, why not just set a local (or possibly you will
>need a global)  variable and as the selections are made, append to the
>global variable, then when ready they user clicks a button and the global
>variable containing the data is inserted into the comments?  You can
>emulate a "copy" by just save the selectedText... and passing this to
>your global...
>
>Why is the clipboard mission critical to the architecture? Especially if
>the series of statements can each be contained in a single line, then you
>can really do this easily with a locked field and clicks on the lines...
>I can think of about 8 different ways to accomplish this without the
>clipboard (depends on how the assessment rubric data is
>formated/presented, of course)
>
>BR
>
>
>On February 21, 2016 at 3:05:03 PM, Terry Judd
>(terry.j...@unimelb.edu.au) wrote:
>
>I¹m trying to create a relatively simple HTML5 Œapplet' that allows the
>user to select from a series of statements (an assessment rubric) to
>generate a basic feedback report that they can paste into an existing
>comments box within one of the bits of our learning management system.
>Seemed like a relatively straightforward test for LC¹s new HTML5 export
>feature except that despite what the dictionary says setting the
>clipboardData doesn¹t work. This seems to be confirmed by a search of the
>quality control centre (unresolved bug 16251 from October last year).
>Does anyone have any information on if and when clipboard support will be
>added? I¹m pretty much stuck without it.
>
>Regards,
>
>TerryŠ
>___
>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: Not able to use the clipboard with HTML5 deployment

2016-02-21 Thread Sannyasin Brahmanathaswami
Until that is working, why not just set a local (or possibly you will need a 
global)  variable and as the selections are made, append to the global 
variable, then when ready they user clicks a button and the global variable 
containing the data is inserted into the comments?  You can emulate a "copy" by 
just save the selectedText... and passing this to your global...

Why is the clipboard mission critical to the architecture? Especially if the 
series of statements can each be contained in a single line, then you can 
really do this easily with a locked field and clicks on the lines... I can 
think of about 8 different ways to accomplish this without the clipboard 
(depends on how the assessment rubric data is formated/presented, of course)

BR


On February 21, 2016 at 3:05:03 PM, Terry Judd 
(terry.j...@unimelb.edu.au) wrote:

I’m trying to create a relatively simple HTML5 ‘applet' that allows the user to 
select from a series of statements (an assessment rubric) to generate a basic 
feedback report that they can paste into an existing comments box within one of 
the bits of our learning management system. Seemed like a relatively 
straightforward test for LC’s new HTML5 export feature except that despite what 
the dictionary says setting the clipboardData doesn’t work. This seems to be 
confirmed by a search of the quality control centre (unresolved bug 16251 from 
October last year). Does anyone have any information on if and when clipboard 
support will be added? I’m pretty much stuck without it.

Regards,

Terry…
___
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

Not able to use the clipboard with HTML5 deployment

2016-02-21 Thread Terry Judd
I’m trying to create a relatively simple HTML5 ‘applet' that allows the user to 
select from a series of statements (an assessment rubric) to generate a basic 
feedback report that they can paste into an existing comments box within one of 
the bits of our learning management system. Seemed like a relatively 
straightforward test for LC’s new HTML5 export feature except that despite what 
the dictionary says setting the clipboardData doesn’t work. This seems to be 
confirmed by a search of the quality control centre (unresolved bug 16251 from 
October last year). Does anyone have any information on if and when clipboard 
support will be added? I’m pretty much stuck without it.

Regards,

Terry…
___
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: LC 8 dp 14 Browser Widget not "obeying" position instructions

2016-02-21 Thread Sannyasin Brahmanathaswami
 February 21, 2016 at 12:59:16 PM, Ali Lloyd 
(ali.ll...@livecode.com(mailto:ali.ll...@livecode.com)) wrote:

> I have seen something like this too, but haven't yet got a recipe - looks 
> like a redraw issue though. 

Indeed, I think you are right. I just now added to the ticket

bug 16965(http://quality.livecode.com/show_bug.cgi?id=16965)  

as it turns out the browser widget frame *is* obeying the set position command. 
 

if I navigate to the card with the browse tool selected... we see the html 
content is shifted down (top of html content is at about 320 in the vertical 
card height of 414).  
but if you then query, before doing anything else, in the msg box

put the top of widget "sivaBrowser"  

# result: 20  

Ahha! the html content is, as you surmise, not being redrawn from the new top 
x,y coords of the widget window.  

OK! your idea worked. Here's my hackaround for now..:

on preopencard
setOrientation
set the top of widget "SivaBrowser" to 20
end preopencard


on opencard
   choose pointer tool
choose browser tool
end opencard

very minute flicker there barely noticeable.. and it lets me continue on dev in 
8!


Still a bug though.. and it would be "nice" if the html content did not 
disappear under the pointer tool

BR

___
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: LC 8 dp 14 Browser Widget not "obeying" position instructions

2016-02-21 Thread Ali Lloyd
I have seen something like this too, but haven't yet got a recipe - looks
like a redraw issue though. Perhaps to do with setting the rect under lock
screen, or changing the tool under lock screen/messages or something like
that.

On Sun, 21 Feb 2016 at 03:51, Sannyasin Brahmanathaswami 
wrote:

>
> working in LC 8 DP 14 now...
>
> See my other thread appropo and app archtecture requiring changing from
> portrait to landscape and back again as we move through the stack/cards --
> in the absence of any "best practices" I'm hacking this from ground zero
>
> set custom prop for each card:
>
> uOrientation | Portrait #or
> uOrientation | Landscape #
>
> Stack Script:
>
>
> ## Orientation Change Ups
>
> on setOrientation
> if the uOrientation of this card is "Landscape" then
> set the width of this stack to 736
> set the height of this stack to 414
> else
> set the width of this stack to 414
> set the height of this stack to 736
> end if
> end setOrientation
>
> CARD: webBrowserLandscape
>
> objects:
> 1 webBrowser Widget "sivaBrowser" set to 0,20,736,414, location locked
> 1 field "emulator" set to 0,20,736,414
>
> Card Script:
>
> on preopencard
>setOrientation
> end preopencard
>
>
> on resizeStack x,y
>set the top of fld  "emulater" to 20
>set the top of widget "sivaBrowser" to 20
> end resizeStack
>
>
> Result: fld Emulater appears in the correct location after the resizeSTack
> finishes and unlocks the screen
>
> widget is stuck way down the card and does not move.
>
> I've tried various methods, but the clincher is that even in running this
> in the message box
>
>  set the top of widget "sivaBrowser" to 20
>
> the widget is unresponsive
>
> BUT, if I click out to the pointer tool the widget suddenly a) loses the
> html of the page it is on and b) jumps into the proper position.
>
> I think this is a bug.
>
> Can anyone confirm.
>
>
>
>
>
> ___
> 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 do I enable scrolling of a group ?

2016-02-21 Thread Alex Tweedly


On 21/02/2016 14:21, [-hh] wrote:

 "Doing Touch scroll by rawkeyDown" 
will be interesting for a lot of readers. Would be great if you share
your solution with a script snippet at the end of this thread ...




Sure - though it turns out to be so trivial a snippet it's almost 
embarrassing :-)


I haven't figured out a way to tell what the correct step size should be 
(whether to vary it by formattedsize vs actualsize, or ), so I 
guessed a fixed figure, and it seems OK for all the (smallish number) of 
cases I've tried.


-- Scroll a group according to touch (e.g. two-finger movement on Mac 
OSX trackpad)


constantkVStep = 10, kHstep = 10

on rawKeyDown p
  switch p
case 65308
   setthevscrollofmetothevscrollofme+ kVStep
break
case 65309
setthevscrollofmetothevscrollofme- kVStep
break
case 65310
setthehscrollofmetothehscrollofme+ kHStep
break
case 65311
setthehscrollofmetothehscrollofme- kHStep
break
   default
  end switch
end rawKeyDown

Thanks again to everyone who helped.
-- Alex.




___
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: Finding UTC

2016-02-21 Thread Peter Haworth
I don;t have the link to hand but there's a Youtube video that's been
posted on this list before about what a nightmare it is to handle all the
scenarios involving what date and time it is in different parts of the
world and keeping up to date with changes.

Pete

On Sun, Feb 21, 2016 at 1:10 PM [-hh]  wrote:

> Sorry, typo in link, should read
> http://hh.on-rev.com/html5/countUpOrDown-8.0.0-dp-9X.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
>
___
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: Finding UTC

2016-02-21 Thread [-hh]
Sorry, typo in link, should read
http://hh.on-rev.com/html5/countUpOrDown-8.0.0-dp-9X.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: Programmatically determine the average greyscale

2016-02-21 Thread Sannyasin Brahmanathaswami


The buttons use a pattern so they are not transparent.

Yes, we are very familiar with the drop shadow technique also...

 Yes, we could use field + group methods, but I would prefer to keep is simple 
so that I can dynamically swap out the background patterns and, eventually, 
dynamically add and delete buttons  to the group. if we still with just the 
button template, then this keeps it simple.  200,200,200 seems to cover almost 
all cases so far.  A small JSON file with just the button names, links, and the 
ID of background patter  could be easily run on a repeat loop to instantiated 
the group of buttons after setting the btn template...  dynamically. Adding a 
field into that mix starts to get messy.

On the larger main card images/title I do have a field and I will  give the 
shadow a shot.




On February 20, 2016 at 5:57:30 PM, J. Landman Gay 
(jac...@hyperactivesw.com) wrote:

Shadows work on button names/labels the same as they do for fields if
the button is transparent. The shadow affects only the text.
___
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: Finding UTC

2016-02-21 Thread [-hh]
> Graham S. wrote
> Thanks to all those who replied - ‘the internet date’ was the
> answer I needed, since I then didn’t have to get out of my
> LiveCode comfort zone to do the calculation. I’m thinking of
> time-stamping some interactions that are going to go through
> a program I’m running on LiveCode Server. Right now I have it
> running on DreamHost, whose servers presumably stay in one
> place, but I wanted an invariant time stamp not depending on
> the location of the server or of any particular user, so I
> saw UTC as the way to go. My issue was that I didn’t know of
> a command that I could run on the server, or a url to a public
> time server, that would just give me UTC in its simplest form
> without leaving LiveCode - probably very lazy of me, but I want
> to keep things as simple as I can. I have now written a little
> homegrown routine that uses ‘the internet date’ which seems to
> work fine. Thanks again Graham

One remark to the internet date (which is the date format I
always use and then convert to dateItems if needed for
calculations).

If using recent or future dates one should have in mind that
"the internet date" respects **daylight saving offsets** of
the dates.

You can see that with a HTML5 standalone
http://hh-onrev.com/html5/countUpOrDown-8.0.0-dp-9X.html
that counts up to the LC meeting. Click at the bottom field
to change the date from August to March and you(?) will see
the UTC offset changing by -1 hour.
[Use Safari, Chrome or Opera.
Currently NOT Firefox (v45, again with v46)]

hh
___
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 do I enable scrolling of a group ?

2016-02-21 Thread J. Landman Gay

On 2/21/2016 7:32 AM, Alex Tweedly wrote:

In the Message watcher, when positioned over a field, I see rawKeyDown,
cRevGeneral and scrollbarDrag events
But when positioned over a group - only the rawKeyDown events fire.

So - am I just over-optimistic, and it is expected that any group
scrolling is not handled by default ?


I suspect it's the cRevGeneral handlers in the IDE frontscript that 
manage scrolling for a field. Besides rawKeyDown, the group also 
receives a scrollbarDrag message when manually scrolled, but that's not 
what you're looking for. It does look like you'll have to script the 
group scroll yourself.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

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


BUG? console error message with send in time on LC server

2016-02-21 Thread Bernard Devlin
Hi all,

I have started to look at LC server, just for command line scripts at the
moment (seems LC has got wired into my brain, and other scripting languages
just don't come so readily to me any more).

I wanted to do some processing, where the processing would occur at
different times of days and different intervals. I know I could use cron
for this, but again, knocking something up in LC is easier for me than all
the fiddling involved in cron jobs and different scripts to perform
different functions.

At first, it looked like "send in time" did not work with the server. I
went to the forum, and found a thread that seemed to say just that. So I
mocked up the simplest test, and "send in time" works.



However, it outputs the error message in the title:

GLib-WARNING **: g_main_context_iteration(): main loop already active in
another thread

This doesn't seem to impair the script working, and there's nothing freaky
happening with the running processes.  But after a quick google, it appears
that this is an error message which occurs with GUI Linux apps. So, I'm
wondering if there's not something amiss in the code which is conditionally
compiled into the server engine.

I thought about using the "-ui" command line parameter, but the server does
not seem to take any parameters other than the LC file name it is to
process.

This is with LiveCodeCommunityServer-8_0_0_dp_14 32bit.

This console error probably isn't going to be difficult for me to ignore,
however, I can imagine it would be annoying if it ended up in log files for
those who use "send in time".  Is it worth reporting as a bug?

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


Re: Finding UTC

2016-02-21 Thread Graham Samuel
Thanks to all those who replied - ‘the internet date’ was the answer I needed, 
since I then didn’t have to get out of my LiveCode comfort zone to do the 
calculation. I’m thinking of time-stamping some interactions that are going to 
go through a program I’m running on LiveCode Server. Right now I have it 
running on DreamHost, whose servers presumably stay in one place, but I wanted 
an invariant time stamp not depending on the location of the server or of any 
particular user, so I saw UTC as the way to go.

My issue was that I didn’t know of a command that I could run on the server, or 
a url to a public time server, that would just give me UTC in its simplest form 
without leaving LiveCode - probably very lazy of me, but I want to keep things 
as simple as I can. I have now written a little homegrown routine that uses 
‘the internet date’ which seems to work fine.

Thanks again

Graham

> On 20 Feb 2016, at 19:09, Sannyasin Brahmanathaswami  wrote:
> 
> On February 20, 2016 at 6:50:55 AM, Earthednet-wp 
> (proth...@earthednet.org) wrote:
> This will of course put the time as perceived by the server where in the 
> world my copy of LCS happens to be hosted. Given that this is arbitrary from 
> the point of view of a user of the server, it would be easier for me if I 
> could show the time as UTC, or what us Brits used to call Greenwich Mean Time.
> 
> I may be missing thing, but unless your server is a nomad, it is always 
> exactly X numbers away from UTC...  sothen what is the issue?
> 
> Forgive me if I'm stating the obvious and don't grasp your problem:
> 
> UTC is UTC wherever you are.  If I query for UTC in Hawaii, or California or 
> London, we get the same value...So all you need is a small API script on the 
> server to return UTC to you... and typically you have control over the time 
> setting on your "box"  so if you want the server to return UTC...you have to 
> be sure (unix/linux) tzdata(cmd line app) is installed.. run that and you 
> will be prompted to set your time zone. set "GST-0"  and you are good to go.
> 
> This assumes of course that's what you want...it may not be... I prefer, e.g. 
> that the server return the time of the place where it lives (otherwise I get 
> crazy confused)... this is, as you say, arbitrary, since we have users all 
> over the planet in all time zones... but though I am in Hawaii, I like the 
> server in California to be on California time... as this is how we think out 
> here in the middle of the Pacific...CA is three hours ahead, Texas is 4, 
> Chicago 5, NY 6  etc.. (depends on DLS)  if I want my LCS on the server to 
> return UTC, then I just add the offset to PST  (+8) since he lives in 
> Californai and is not moving around.
> 
> https://codeghar.wordpress.com/2007/12/06/manage-time-in-ubuntu-through-command-line/https://en.wikipedia.org/wiki/List_of_UTC_time_offsets
> 
> if you do not have control of the server box/instance then you only have the 
> option to add the offset to GMT to the server time... a simple "add" in your 
> script...  Through the years, in my experience, default installations of web 
> server OS's often have some odd time default, and you only discover this one 
> day when you see weird time stamps.. so you have to go in and correct it. 
> This is getting better with cloud computing, but in the old days the 
> "instance" on a box was initiated by loading an image from a CD, and the 
> service selling you the web services didn't even bother to check that the 
> image had some wrong TZ for the location where it was being installed.
> 
> BR
> ___
> 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 do I enable scrolling of a group ?

2016-02-21 Thread Scott Rossi
Ok, reading your description, I've seen what you're talking about in browsers 
on iOS -- you can use two finger touch to scroll a text region independently of 
a web page.  And I believe this works because the control is essentially a 
field, which is known to the browser to be scrollable, unlike groups in LC 
which Safari knows nothing about. So my guess would be like your comment, to 
use rawKeyDown or similar to enable scrolling.

If you haven't already, you could try enabling scrollbars on the group as a 
test, and see if that enables scrolling, but my guess is a control being a 
text-containing-field is what tells the OS that the control can be scrolled.

Regards,

Scott Rossi
Creative Director
Tactile Media UX/UI Design

> On Feb 21, 2016, at 5:32 AM, Alex Tweedly  wrote:
> 
> Thanks to you , and Scott R.
> 
> However, I guess I need to explain myself better  :-)
> 
> If I have a field which
> - is enabled
> - has a formatted size that exceeds the actual size
> - has scroollbars enabled
> THEN - the field will respond to the user scrolling (in this case by using 
> two finger touch on the trackpad of a Macbook) and swiping / moving their 
> fingers.
> 
> No script needed - it just responds the way a user would expect; it's the 
> default behaviour /operation for a field.
> 
> I would *expect* that a group which meets similar criteria would respond 
> similarly - i.e. without any scripting.
> 
> In the Message watcher, when positioned over a field, I see rawKeyDown, 
> cRevGeneral and scrollbarDrag events
> But when positioned over a group - only the rawKeyDown events fire.
> 
> So - am I just over-optimistic, and it is expected that any group scrolling 
> is not handled by default ?
> 
> Or do I need to process rawKeyDowns (as for a mouse scroll wheel) and do my 
> own scrolling ?
> 
> (Hmmm - just typing this message makes me convinced the answer is that I do 
> my own scrolling in response to rawkeydowns. So thanks for letting me think 
> out loud - but do correct me if I'm wrong :-)
> 
> -- Alex.
> 
>> On 21/02/2016 03:52, [-hh] wrote:
>> This is essentially the same technique that Scott R. suggested.
>> New is the MOVE-TO-SCROLL-FACTOR, in case you prefer that.
>> 
>> ** The scroll respects here the group's relative to card's size. **
>> ** Thus scrolling becomes "parallel" to the mouseMove distances. **
>> For example if you move your fingers/the mouse from (20,70) to (50,30)
>> then the hscroll of the the group changes by +30
>> and the vscroll of the the group changes by -40.
>> Of course you may moreover scale these factors (fw0, fh0 below) to
>> your needs, for example to an increase for a large display.
>> 
>> -- In group's script.
>> -- Here given for hscroll and vscroll, mostly I use only one of both.
>> -- Also I give it for mouseMove, you change this to your need
>> -- (touchMove ...) better than I do.
>> 
>> local d0=false, x0=0, y0=0, h0=0, w0=0, fh0=1, fw0=1
>> 
>> on mouseEnter; put false into d0; end mouseEnter
>> on mouseUp; put false into d0; end mouseUp
>> on mouseRelease; put false into d0; end mouseRelease
>> 
>> on mouseMove x,y
>>   if not d0 then exit mouseMove
>>   set hscroll of me to w0+fw0*(x-x0)
>>   set vscroll of me to h0+fh0*(y-y0)
>> end mouseMove
>> 
>> on mouseDown
>>   put (the height of this card) div (the height of me) into fh0
>>   put (the width of this card) div (the width of me) into fw0
>>   put true into d0; put the clickV into y0; put the clickH into x0
>>   put the vscroll of me into h0 ; put the hscroll of me into w0
>> end mouseDown
>> 
>> I also have sometimes, in order to have a 'static' scrollbar size,
>> a transparent (for example by using ink 'noop") object, may also be
>> disabled, of card's (half) size in the group.
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

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


Re: How do I enable scrolling of a group ?

2016-02-21 Thread [-hh]
Alex,

sorry, I know from your posts which I read long before writing to
this list that you don't need help for the scrolling per se.
I just wanted
to add my MOVE-TO-SCROLL-FACTOR as a whole. inside of a working script.
I don't like to scroll with 5 long moves until the targeted loc is
reached and may be I'll use your app. :-)

The point with the scrolling is probably given in the dictionary entry
to "scrollbarDrag":
"Sent to a field, scrollbar, or group when the user drags the scrollbar
thumb **or when a text selection causes a field to scroll**"

The "or-part" may be the explanation why scrolling works with the text
field and not with the group. Without 'autohilite' a textfield may also
not scroll.

 "Doing Touch scroll by rawkeyDown" 
will be interesting for a lot of readers. Would be great if you share
your solution with a script snippet at the end of this thread ...

Hermann


___
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 do I enable scrolling of a group ?

2016-02-21 Thread Alex Tweedly

Thanks to you , and Scott R.

However, I guess I need to explain myself better  :-)

If I have a field which
 - is enabled
 - has a formatted size that exceeds the actual size
 - has scroollbars enabled
THEN - the field will respond to the user scrolling (in this case by 
using two finger touch on the trackpad of a Macbook) and swiping / 
moving their fingers.


No script needed - it just responds the way a user would expect; it's 
the default behaviour /operation for a field.


I would *expect* that a group which meets similar criteria would respond 
similarly - i.e. without any scripting.


In the Message watcher, when positioned over a field, I see rawKeyDown, 
cRevGeneral and scrollbarDrag events

But when positioned over a group - only the rawKeyDown events fire.

So - am I just over-optimistic, and it is expected that any group 
scrolling is not handled by default ?


Or do I need to process rawKeyDowns (as for a mouse scroll wheel) and do 
my own scrolling ?


(Hmmm - just typing this message makes me convinced the answer is that I 
do my own scrolling in response to rawkeydowns. So thanks for letting me 
think out loud - but do correct me if I'm wrong :-)


-- Alex.

On 21/02/2016 03:52, [-hh] wrote:

This is essentially the same technique that Scott R. suggested.
New is the MOVE-TO-SCROLL-FACTOR, in case you prefer that.

** The scroll respects here the group's relative to card's size. **
** Thus scrolling becomes "parallel" to the mouseMove distances. **
For example if you move your fingers/the mouse from (20,70) to (50,30)
then the hscroll of the the group changes by +30
and the vscroll of the the group changes by -40.
Of course you may moreover scale these factors (fw0, fh0 below) to
your needs, for example to an increase for a large display.

-- In group's script.
-- Here given for hscroll and vscroll, mostly I use only one of both.
-- Also I give it for mouseMove, you change this to your need
-- (touchMove ...) better than I do.

local d0=false, x0=0, y0=0, h0=0, w0=0, fh0=1, fw0=1

on mouseEnter; put false into d0; end mouseEnter
on mouseUp; put false into d0; end mouseUp
on mouseRelease; put false into d0; end mouseRelease

on mouseMove x,y
   if not d0 then exit mouseMove
   set hscroll of me to w0+fw0*(x-x0)
   set vscroll of me to h0+fh0*(y-y0)
end mouseMove

on mouseDown
   put (the height of this card) div (the height of me) into fh0
   put (the width of this card) div (the width of me) into fw0
   put true into d0; put the clickV into y0; put the clickH into x0
   put the vscroll of me into h0 ; put the hscroll of me into w0
end mouseDown

I also have sometimes, in order to have a 'static' scrollbar size,
a transparent (for example by using ink 'noop") object, may also be
disabled, of card's (half) size in the group.

___
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