Re: script for redo/undo text?

2019-07-10 Thread Nicolas Cueto via use-livecode
Thank you everyone for the various options/suggestions.

--
N.C.

On Wed, 10 Jul 2019 at 07:24, Mark Wieder via use-livecode <
use-livecode@lists.runrev.com> wrote:

> On 7/8/19 8:05 PM, Nicolas Cueto via use-livecode wrote:
> > Good day eh.
> >
> > To quote a post from "User Experience Stack Exchange
> > <https://ux.stackexchange.com/questions/12629/undo-history-why-limit-it
> >":
> >
> > " undo/redo is one of the biggest implementation, testing and
> > maintenance headaches   in any significantly sized application"
> >
> > And yet I ask...
> >
> > Would someone care to volunteer a redo/undo script that works on text in
> a
> > text-field object? ... especially a script that provides (almost) full
> undo
> > history?
>
> The Undo section of my refactor plugin is almost completely
> self-contained, so you should be able to extract those handlers (look
> for the "--> Undo handlers" tag near line 2750) and use them with any
> field. Since they're designed to work with the Script Editor, I think
> the only changes you need to make would be to create your own
> scriptFromEditor() function to grab the field text and your own
> CurrentObject() handler to return the long id of the field.
>
> At any rate, this should get you started. And I'm compressing the text
> before storing it in an array, but as Sean points out, this could get
> out of hand.
>
> <
> https://github.com/mwieder/revRefactor/blob/master/stack_revRefactor_.livecodescript
> >
>
> --
>   Mark Wieder
>   ahsoftw...@gmail.com
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
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


can't do Find/Search on LC UI stacks (bug?) [was "script for redo/undo text?"]

2019-07-10 Thread Nicolas Cueto via use-livecode
"Find and Replace" is warning me that "... To search a LiveCode UI stack
you must first select 'Show IDE Stacks in Lists' from the View menu."  But,
I did select "Show IDE Stacks" in "View"!

Something I've overlooked or a bug?

The reason I want to search LC UI stacks? To understand Mark Wieder's
stack/suggestion on how to do "undo/redo" (thank you, Mark!), it seems I
have to dig there for functions and such.

Thank you.

--
Nicolas Cueto
___
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


can't do Find/Search on LC UI stacks (bug?)

2019-07-10 Thread Nicolas Cueto via use-livecode
Even though "View > "Show IDE Stacks in Lists" is checked, am still getting
a "
___
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


script for redo/undo text?

2019-07-08 Thread Nicolas Cueto via use-livecode
Good day eh.

To quote a post from "User Experience Stack Exchange
":

" undo/redo is one of the biggest implementation, testing and
maintenance headaches   in any significantly sized application"

And yet I ask...

Would someone care to volunteer a redo/undo script that works on text in a
text-field object? ... especially a script that provides (almost) full undo
history?

(Note: Just changes to text. Not to LC objects themselves.)

Ta.
--
Nicolas Cueto
___
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: localization/localisation/ of LC Community version's GUI?

2019-03-20 Thread Nicolas Cueto via use-livecode
The replies so far---for which, many thanks---are also off topic.

I want to change the language of LC "itself", i.e., the development
environment.

Its menus, such as for opening/ saving stacks, or for creating/ copying/
pasting/ deleting objects.

Its windows, such as properties, the toolbar, the script editor.

But NO localization of the script language, NOR the LC dictionary.

And NO localization of stacks themselves.

I am not asking for help with multi-lingual software development.

LC stacks, LC Windows standalones, and LC Android apps, I've created in the
past, with Japanese-only language support. And most of those stacks and
standalones were made even before LC went completely Unicode.

Hope my wording was clear enough this time.

Thank you as always.
--
Nicolas Cueto



On Tue, Mar 19, 2019, 09:19 Nicolas Cueto  wrote:

> In short, if my aim is to translate LC Community's GUI (for youngish
> Japanese students learning to program) , where might I start?
>
> Now, if something terrifyingly named "GitHub" should be part of the
> answer, all I know about that is it's a discussion start-off point for LC
> "gurus", plus a cue for me to leave the room.
>
> And, of course the Forums got a thorough going-thru. Couldn't find much,
> tho. One thing was, to emphasize that I am NOT after localization of the
> LC script language. As confusingly happened to Forum thread "Multi-Lingual
> LiveCode?
> "
> (Craig Newman, April 2014). Though that thread was nonetheless useful,
> especially for its introduction of a multi-lingual translation project for
> Telegram .
>
> Also on the Forum, though unrelated to the GUI, was Forum topic "Android
> app localization
> "
> (Max V, May 2013). Especially when the ever-helpful Brian Milby stepped
>  in, advising to (or, at least, I think he was?) modify LC stack's
> themselves (e.g., revSaveAsStandalone, revCommonLibrary). BUT that's not
> what I'm after? or is it? I don't know. Like I say, all very new.
>
> In either case, GitHub familiarization or LC stack modifications,
> please!!! a lot of hand-holding and stating the obvious.
>
> As always, thank you for any advise---perhaps including a mnemonic for
> "advise [v.?] vs. advice [n.?]".
> --
> Nicolas Cueto
>
>
>
>
___
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


localization/localisation/ of LC Community version's GUI?

2019-03-18 Thread Nicolas Cueto via use-livecode
In short, if my aim is to translate LC Community's GUI (for youngish
Japanese students learning to program) , where might I start?

Now, if something terrifyingly named "GitHub" should be part of the answer, all
I know about that is it's a discussion start-off point for LC "gurus", plus
a cue for me to leave the room.

And, of course the Forums got a thorough going-thru. Couldn't find much,
tho. One thing was, to emphasize that I am NOT after localization of the LC
script language. As confusingly happened to Forum thread "Multi-Lingual
LiveCode?
"
(Craig Newman, April 2014). Though that thread was nonetheless useful,
especially for its introduction of a multi-lingual translation project for
Telegram .

Also on the Forum, though unrelated to the GUI, was Forum topic "Android
app localization
"
(Max V, May 2013). Especially when the ever-helpful Brian Milby stepped  in,
advising to (or, at least, I think he was?) modify LC stack's themselves
(e.g., revSaveAsStandalone, revCommonLibrary). BUT that's not what I'm
after? or is it? I don't know. Like I say, all very new.

In either case, GitHub familiarization or LC stack modifications, please!!! a
lot of hand-holding and stating the obvious.

As always, thank you for any advise---perhaps including a mnemonic for
"advise [v.?] vs. advice [n.?]".
--
Nicolas Cueto
___
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: who has experience with mp4 videos on windows?

2019-03-18 Thread Nicolas Cueto via use-livecode
Tiemo,

My advice is probably of no use but...

Could it be the solution is updating the codecs?

What you described reminded me very much of "MX Player" updates (a
popular video player for Android). Every time after an update, some
videos open up with no sound and a "This Audio Format AC3 Is Not
Supported" error  message. Updating the codecs is always the
(irksome!) solution; licensing issues, I think?

Anyway, my 3 yen's worth... which is what's hanging around in my
wallet now... and getting rid of 1-yen coins is only a little less of
a pain than Googling for the latest codecs.

--
Nicolas Cueto

On Mon, 18 Mar 2019 at 18:09, Tiemo Hollmann TB via use-livecode
 wrote:
>
> Hello,
>
> I still have trouble playing mp4-h.264 videos on some windows machines since
> some time. I have installed the LAV-filters, which work fine for h.264 on
> windows. Where my program can play my videos on most windows machines
> without any problems, there are some single computers, where the video
> screen just stays black and nothing happens. (tested with/without
> buffering).
>
>
>
> This occurred with LC 8. Building a standalone with LC 9.0 my same program
> could play the videos immediately. And now again, my same program without
> any changes, build with LC 9.0.2 doesn't plays the videos on some machines
> again anymore.
>
>
>
> This is very annoying for some of my customers, when they accept my
> automatic update and the programs doesn't plays the videos anymore after the
> update.(Playing videos is the essential task of my program)
>
>
>
> I discussed this already with Panos in Sep. 2018 and his guess where two new
> header includes in w32-ds-player.cpp(d3d9.h and vmr9.h)in LC 9 what have
> made it work in LC 9. But now in LC 9.0.2 the videos are broken again on
> some computers and I guess the headers are still included. This is very hard
> to track down, because either Panos nor me can't reproduce this issue.
>
>
>
> Is there anybody, who also works with mp4-h.264 videos on windows?
>
> Any experiences? Any ideas what to check for?
>
>
>
> 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

___
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 on Chromebook?

2018-09-25 Thread Nicolas Cueto via use-livecode
Thank you, Brian.

Well, following Brian's lead, I've now learnt (to my regret!) the
importance of the term "kernel" (plus, the Chromebook term "channels")
because, the Linux capability of any particular Chromebook depends on the
Linux kernel version number -- currently 4.4 for Linux-on-Chrome, and with "no
plans to support Linux 3.14 or older
<https://chromium.googlesource.com/chromiumos/docs/+/master/containers_and_vms.md#Hardware-Requirements>
".

Fingers crossed for an update (and soon!) of Linux-on-Chrome, to verify
whether or not LC can run on my newish-model-but-3.18-kernel-hamstrung
Chromebook...

On Tue, 18 Sep 2018 at 11:21, Brian Milby via use-livecode <
use-livecode@lists.runrev.com> wrote:

>
> https://www.howtogeek.com/363331/how-to-set-up-and-use-linux-apps-on-chrome-os/
>
>
> https://www.androidpolice.com/2018/08/19/install-linux-applications-chrome-os/
>
> It may be possible according to this new capability to run Linux apps.
> I’ve not seen any reported successes though.
>
> Thanks,
> Brian
> On Sep 17, 2018, 9:15 PM -0500, Nicolas Cueto via use-livecode <
> use-livecode@lists.runrev.com>, wrote:
> > Not for running apps. For programming.
> >
> > Is there ANY way to get LC running on a Chromebook?
> >
> > One possibility is a cloud service (MacInClud or Frame). But there´s a
> fee
> > -- unless someone knows of a limited trial service? -- plus, when not on
> > wifi, my connection is thru hotspotting onto a limited dataplan?
> >
> > Thank you.
> >
> > --
> > Nicolás Cueto
> > ___
> > 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 to know 2 monitors are in use?

2018-09-25 Thread Nicolas Cueto via use-livecode
Thank you, Paul.

Using "screenrects" as Paul suggested, here, for future reference, is a
script snippet that places a stack on the right monitor:

 put the screenrects into tScrRects
 if the environment is "development" and the number of lines in tScrRects >
1 then
  -- CENTRE THE STACK ON THE RIGHT MONITOR
  put line 2 of tScrRects into tRMon -- right monitor rect
  put ((item 3 of tRMon - item 1 of tRMon) / 2 + item 1 of tRMon) &
comma & \
((item 4 of tRMon - item 2 of tRMon) / 2) into tRect
  set the loc of this stack to tRect
   else
  -- CENTRE THE STACK ON TE LEFT MONITOR
  set the loc of this stack to the screenloc
   end if
--
Nicolas Cueto

On Wed, 26 Sep 2018 at 10:03, Paul Dupuis via use-livecode <
use-livecode@lists.runrev.com> wrote:

> "the screenrects" will return the rectangles of all active monitors with
> the default monitor as the 1st line.
>
> Unfortunately, "the screenLoc" only returns the center of the default
> monitor. You would need to get the rect of any other monitor and
> calculate the center for centering a dialog on other monitors.
>
>
>
>  On 9/25/2018 8:52 PM, Nicolas Cueto via use-livecode wrote:
> > During "development" on Windows with 2 monitors, how to use "set the loc
> of
> > this stack to the screenloc" so that a stack centres in on one or the
> other
> > monitor? (And, if not in the development environment? say, a standalone?)
> >
> > Thanks.
> >
> > --
> > Nicolas Cueto
> > ___
> > 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


how to know 2 monitors are in use?

2018-09-25 Thread Nicolas Cueto via use-livecode
During "development" on Windows with 2 monitors, how to use "set the loc of
this stack to the screenloc" so that a stack centres in on one or the other
monitor? (And, if not in the development environment? say, a standalone?)

Thanks.

--
Nicolas Cueto
___
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


LC on Chromebook?

2018-09-17 Thread Nicolas Cueto via use-livecode
Not for running apps. For programming.

Is there ANY way to get LC running on a Chromebook?

One possibility is a cloud service (MacInClud or Frame). But there´s a fee
--  unless someone knows of a limited trial service? -- plus, when not on
wifi, my connection is thru hotspotting onto a limited dataplan?

Thank you.

--
Nicolás Cueto
___
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: editing & combining sound files?

2018-08-22 Thread Nicolas Cueto via use-livecode
Well, maybe some day I'll put the time in to study Geoff's and Tom's
solutions. But, for future reference, below is my easier-for-me solution.

First, use a sound-editor (Goldwave) to convert all AU files to RAW (i.e.,
snd).

Second, run this LC script to merge those converted files (interleaved with
silence) into a new .snd file:

 put URL "binfile:C:/the_path/faster/{file ID}.snd" into tNewSnd
 put URL "binfile:C:/the_path/1_sec_silence.snd" after tNewSnd
 put URL "binfile:C:/the_path/slow/{file ID}.snd" after tNewSnd
 put tNewSnd into URL  "binfile:C:/the_path/CD/{file ID}.snd"

Third, use the sound-editor again, this time to convert those new .snd
files into .mp3.

That's it. But if someone wants to post exact details of how to LC script
what Geoff suggests, i.e., stripping headers from an .au (or any!) sound
file type, I'm still all ears.

Cheers.

--
Nicolas Cueto

On 23 August 2018 at 13:40, Tom Glod via use-livecode <
use-livecode@lists.runrev.com> wrote:

> sox is good for this kind of stuff, you can automate the command-lines
> using livecodebut you can skip some of the bs you would probably
> encounter with LC and audio "processing".
>
> http://sox.sourceforge.net/
>
> On Wed, Aug 22, 2018 at 10:30 PM Geoff Canyon via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > I did something very much like this way, way, way long ago (in the
> MetaCard
> > days...). I don't remember the sound format, and it was mono, not stereo,
> > but it turned out that the format for the sound file was *really*
> simple: a
> > few bytes of easily-managed header, a bunch of binary data that
> represented
> > the sound file data, and a few bytes of footer.
> >
> > So the steps above would be roughly:
> >
> > 1. Read in the binary data from the sound file, strip the header/footer.
> > 2. Figure out what the "silence" value is for that sound format, append a
> > certain number of that value to the data.
> > 3,4. Read in the binary data from the second file, strip the
> header/footer
> > and append to the data.
> > 5. ??? Not sure how to do this. Instead, might add the appropriate
> > header/footer and write out the data in the same format as the input
> files.
> > 6. Close the access to the original files.
> >
> > If MP3 isn't comprehensible, then you could bulk convert the resulting
> > files from AU to MP3 using any number of tools.
> >
> > gc
> >
> >
> > On Wed, Aug 22, 2018 at 5:14 PM Nicolas Cueto via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> >
> > > Hello List,
> > >
> > > I wish to automate a repetitive (and tedious!) process that's now being
> > > done manually using a sound-file editor (Goldwave).
> > >
> > > The process is:
> > >
> > > 1. Open an AU sound file.
> > > 2. Append 1 second of silence to that file.
> > > 3. Open a 2nd AU sound file.
> > > 4. Copy and append that 2nd file to the 1st file.
> > > 5. Save as MP3 with a new title that now-modified 1st file.
> > > 6. Close that 1st file unmodified.
> > > 7. [Repeat 1-6.]
> > >
> > > If this is possible (easily possible!) with LC, what LC commands ought
> I
> > be
> > > studying/using?
> > >
> > > Many thanks.
> > >
> > > --
> > > Nicolas Cueto
> > > ___
> > > 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
>
___
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 & combining sound files?

2018-08-22 Thread Nicolas Cueto via use-livecode
Hello List,

I wish to automate a repetitive (and tedious!) process that's now being
done manually using a sound-file editor (Goldwave).

The process is:

1. Open an AU sound file.
2. Append 1 second of silence to that file.
3. Open a 2nd AU sound file.
4. Copy and append that 2nd file to the 1st file.
5. Save as MP3 with a new title that now-modified 1st file.
6. Close that 1st file unmodified.
7. [Repeat 1-6.]

If this is possible (easily possible!) with LC, what LC commands ought I be
studying/using?

Many thanks.

--
Nicolas Cueto
___
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


button action different on Android

2018-05-29 Thread Nicolas Cueto via use-livecode
Developing a stack on windows, which has two groups of 30 buttons
contiguosly placed, and each button's settings are:

'''
style=standard

autohilite, sharedhilite, focuswithkeyboard, focusborder,
defaultbutton,disabled = FALSE

visible, opaque, show name, 3-D, showborder=TRUE
''

On Android, after a button is tapped, its appearance is inconsistent. It
looks either:
1. first depressed (inset?) and then un-depressed
2. first depressed and remains depressed

It seems the difference in appearance depends on the time length of the
tap, and perhaps too on how narrow/small the buttons are (my fingertip is
almost larger than the button height). If a tap is very brief, the button
returns to an un-depressed state; if longishly held, the button stays
depressed.

However on windows, the buttons show no depressed-undepressed change. They
remain as they appear when mouse-clicked.

So, how can I get those buttons to work on Android the same as they do on
Windows, i.e, no depressed-undepressed appearance change?

Thank you.

--
Nicolás Cueto
___
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 copy a card?

2018-03-08 Thread Nicolas Cueto via use-livecode
Thanks, Jacque.

Also figured out it can be done with the Project Browser.

--
Nicolas Cueto

On 8 March 2018 at 15:38, J. Landman Gay via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Use:
>
> clone this card
> set the name of it to ""
>
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
>
>
>
> On March 8, 2018 12:24:58 AM Nicolas Cueto via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> ?Need a new card, and want it to be an exact copy (other than the card
>>
>> title) of an existing card. How yo do this in LC?
>>
>> Thank you.
>>
>> --
>> Nicolas Cueto
>>
>> ?
>> ___
>> 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


how to copy a card?

2018-03-07 Thread Nicolas Cueto via use-livecode
​Need a new card, and want it to be an exact copy (other than the card
title) of an existing card. How yo do this in LC?

Thank you.

--
Nicolas Cueto

​
___
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: position of text-curson within field

2018-02-19 Thread Nicolas Cueto via use-livecode
Thanks, Mark.

Strange, during devpt I couldn't press "apply" in the script editor when I
had the line "pass backspaceKey"... Maybe I misspelt...

--
Nicolas Cueto

On 20 February 2018 at 10:42, Mark Wieder via use-livecode <
use-livecode@lists.runrev.com> wrote:

> On 02/19/2018 05:01 PM, Nicolas Cueto via use-livecode wrote:
>
> As you can see, the reason I'm interrupting the backspace key is to find
>> out the number of lines in a field after a char is deleted.
>>
>
> I would do that differently:
>
> local sHowManyLines
>
> on backspaceKey
>   send "howManyLinesNow" to me in 0 milliseconds
>   pass backspaceKey
> end backspaceKey
>
> on howManyLinesNow
>   put the number of lines of me into sHowManyLines
> end howManyLinesNow
>
> --
>  Mark Wieder
>  ahsoftw...@gmail.com
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
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


position of text-curson within field

2018-02-19 Thread Nicolas Cueto via use-livecode
I'm trying to script a special backspace script.

As is the usual backspace behavior, I still want the char to the left of
the flashing cursor to be deleted. Wherever that cursor happens to be.

But because the backscape key cannot get passed, it seemsI have to manually
delete that character to the left of the flashing cursor (wherever the
cursor happens to be).

So, how do I find out in terms of relative character position (eg. char 275
of field x) where within a text field is the flashing cursor?

Something like:

on backspaceKey
 put the <> in field x into tPos
 -- e.g. tPos = char 275 of field x
 delete char tPos of field x
 put the number of lines in field x into field "Nr of lines"
end backspaceKey

As you can see, the reason I'm interrupting the backspace key is to find
out the number of lines in a field after a char is deleted.

--
Nicolas Cueto
___
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


updating LC on Windows breaks SDK path

2018-02-14 Thread Nicolas Cueto via use-livecode
A previously working setup for Android development on Windows has suddenly
stopped working. Again!

Twice this has happened. First, back in January, when updating from 8.1.0
to 8.1.8, and now this morning, from 8.1.8 to 8.1.9.

First sign of a problem is I can't point LC 8.1.9 after installation to the
same SDK path that worked fine with LC 8.1.8. The newer LC says it's
invalid.

So, I try to continue my Android work by going back to LC 8.1.8. But I
can't! Because the SDK path there has been erased from Preferences > Mobile.

Why was it erased? It had been working fine for months?!?

Finally, I try to re-enter the EXACT SAME SDK path into LC 8.1.8 -- a path
that I made sure to copy down in a txt file beforehand -- but LC tells me
it's now invalid.

How can a previously working SDK (and JDK) path suddenly be invalid?
Nothing in my Windows setup has changed between 9AM and 12PM.

BTW, on my Mac setup, no problem. I likewise updated to LC8.1.9 this
morning. And though the license can't be activated -- the forums are down
too so maybe there's a server problem at livecode.com -- at least I can
continue my Android work on my Mac because, in LC8.1.8, the SDK path wasn't
erased.

But maybe it will be after activation?!?!?!

Anyway, while I await this magically resolving itself like it did with the
8.1.0 to 8.1.8 change, I thought I'd post here and see if someone can help.

Thanks.

--
Nicolas Cueto
___
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: discrepancy between official device metric and LC stack size

2018-02-14 Thread Nicolas Cueto via use-livecode
​Ok. Took Jacque's advice​, and my stack's working screenRect is
0,24,360,592.

Now I'm unsure whether my stack's size is 360 x 592, or (width = item 3 -
item) x (height = item 4 -item 2).

Thanks.

--
Nicolas Cueto



On 2 February 2018 at 17:53, J. Landman Gay via use-livecode <
use-livecode@lists.runrev.com> wrote:

> On 1/31/18 5:23 PM, Nicolas Cueto via use-livecode wrote:
>
>> I test my mobile stacks on a Nexus 5, and, in portrait orientation, many
>> bottom pixels are offscreen, even though for width and height I follow
>> exactly the numbers given in dp at the website Device Metrics
>> <https://material.io/devices/> .
>>
>> Why is it cut off? And how can I avoid this? Is there an LC keyword, like
>> "effective" or "working", that I should be including if so, how?
>>
>
> Probably the area occupied by the status bar is pushing the stack down.
> Get "the working screenrect" to find out the actual screen dimensions your
> stack can use.
>
> Since every Android device is different, it's usually easier to set the
> fullscreenMode to "showAll" and let the LC engine adjust the size.
>
>
> --
> 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
>
___
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 format text for copy-pasting as a spreadsheet table

2018-02-08 Thread Nicolas Cueto via use-livecode
Paul, thank you!

And no offense taken. I work so intermittenly with LC that whenever I take
up a new project I feel like a beginner, having to recall things I once
knew.

I'm very grateful to have this list as a resource.

--
Nicolas Cueto

On 9 February 2018 at 10:42, Paul Hibbert via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Nicolas, please don’t give up just yet, I don’t think this is too
> difficult. I’ve posted a sample in the user forum [
> http://forums.livecode.com/viewtopic.php?f=7&t=30584 <
> http://forums.livecode.com/viewtopic.php?f=7&t=30584> ] that I think may
> work for what you describe.
>
> The example I tried uses HTML to paste into a word type document and it
> works fine here, but I’m on a Mac so you will need to test carefully.
>
> Please don’t be offended that I posted it in the beginners section, that
> was just because I felt it may be useful to others, and exposing new LC
> users to this type of action may help someone else too.
>
> Paul
>
> > On 8 Feb 2018, at 15:11, Nicolas Cueto via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> >
> > I guess I should just give up...
> >
> > Thanks anyway.
> >
> > --
> > Nicolas Cueto
> ___
> 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 format text for copy-pasting as a spreadsheet table

2018-02-08 Thread Nicolas Cueto via use-livecode
Craig wrote:

> I should be able to paste directly into any spreadsheet.

One would think it should, but long experience copy-pasting from/to LC
confirms "directly" just doesn't work. An intermediary step, such as a text
editor app, is always needed.

Brian wrote:

> If you are talking about getting an actual table,

Yes, that's what I'm after. Not merely a bit of tab- and cr-delimited text,
as Craig exampled, that I can copy-paste into a spreadsheet. But a bit of
text that includes not only the tab/cr-delimited text but also, for
example, indicators to show cell-borders and to centre text within a cell
vertically/horizontally.

I imagine this is somehow possible. Because, as I can do in my 3-step
method, when I copy-paste from a spreasheet doc to a word doc, not only
does the pasted text appear as an actual table but much of the cell
formatting is retained too. However, if I copy-paste that same spreadsheet
data into a text app like Notepad++, then all that appears as far as
formatting is of course the tabs and crs.

And Brian, as always, thank you for the code. I had a look, but I don't
think it achieves my final goal, i.e., getting an actual table. It's code
for cleaning up the formatting, right?

I guess I should just give up...

Thanks anyway.

--
Nicolas Cueto






On 8 February 2018 at 23:40, dunbarx via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi.
>
> Not sure I understand. If I make a list:
>
> put "cat" & tab & "dog" & tab & "eel" & return & "red" & tab & "blue" & tab
> & "yellow" into myList
> set the clipBoardData to myList
>
> I should be able to paste directly into any spreadsheet.
>
> There is a thread that describes an issue pasting into google docs,
> depending on the version of LC, but I do not think this ever affected
> Excel.
>
> 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
>
___
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 format text for copy-pasting as a spreadsheet table

2018-02-07 Thread Nicolas Cueto via use-livecode
To make bingo grids, I'm using LC to randomize and arrange a list of words
(tabs between words, cr between lines).

What I then have to do to end up with an actual spreadsheet-style grid is:

(1st) Copy-paste the LC generated text into a notepad app (Notepad++);

(2nd) Copy-paste from the notepad app to a spreadsheet app (LibreCalc);

(3rd) Copy-paste from the spreadsheet app to a document app (MS-Publisher).

My question is, can LC format text so I can skip steps 1/2 and paste the
formatted text directly into the document app and still have it appearing
as a spreadsheet grid?

And, if so, what would such formatted text look like? Some kind of HTML? If
so, please! an example.

Fingers crossed...

--
Nicolas Cueto
___
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 how-to for DG2 & swipe scrolling

2018-02-07 Thread Nicolas Cueto via use-livecode
On the LC forum there's a thread
 with
sample stacks but only for iOS.

Could someone explain, or know of some LC reference, or, even better yet,
have a sample stack for Android that covers using DG2 for making a
swipeable datagrid form?

Thank you.

--
Nicolas Cueto
___
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


discrepancy between official device metric and LC stack size

2018-01-31 Thread Nicolas Cueto via use-livecode
I test my mobile stacks on a Nexus 5, and, in portrait orientation, many
bottom pixels are offscreen, even though for width and height I follow
exactly the numbers given in dp at the website Device Metrics
 .

Why is it cut off? And how can I avoid this? Is there an LC keyword, like
"effective" or "working", that I should be including if so, how?

Thanks.

--
Nicolas Cueto
___
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 refer to a custom prop that is a multidimensional array

2018-01-23 Thread Nicolas Cueto via use-livecode
Thanks, Brian and Craig.

Two lines of code? Then, I'll skip using multidimensional custom props.

--
Nicolas Cueto

On 23 January 2018 at 23:02, dunbarx via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Oh.  Now I see. You want to retrieve "interior" elements of an array
> directly
> from a single call to a custom property. As said, I think you have to
> retrieve the property, and then retrieve the element. Two lines of code.
>
> Craig
>
>
>
> --
> 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
>
___
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 refer to a custom prop that is a multidimensional array

2018-01-22 Thread Nicolas Cueto via use-livecode
My stack has a custom prop "cKweto" which has various elements. For now,
elements (arrays?) are single. But next I want to add multidimensional
elements (arrays?). The proble is I do not how to refer to those
multidimendional elements, say within a button script.

For single elements, no problem. E.g., a value (360) is returned when my
script has:

put the cKweto["height_landscape_default"] of this stack

But when I try ...
put the cKweto["landscape","height"] of this stack
... or
put the cKweto["landscape"]["height"] of this stack
.. no values are retrieved, even though I can see them in the Property
Inspector.

What should I be doing?

Thank you.

--
Nicolas Cueto
___
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


The "Property Profile Pane" -- where's it gone to? -- or, should profiles be avoided completely?

2018-01-22 Thread Nicolas Cueto via use-livecode
Did not know until a week ago anything about the concept of LC profiles, as
in revSetCardProfile, revSetStackProfile, or revSetStackFileProfile.

So, looked at the LC doc and found this: "You create a profile for an
object, and give it a name, using the PROPERTY PROFILES PANE in the
object's PROPERTY INSPECTOR."

However, even with the example on the LC wiki of an image showing this pane
 ,
neither on Mac or Windows 8.1.8, and neither in the Property Inspector or
any other LC menu couId see anything called PROPERTY PROFILES PANE or
resembling what that image shows.

Then, searching the LC forum, in the thread Creating property profiles

(2014.01.25),
Jacque wrote "The "create profiles automatically" option is in LIVECODE
PREFERENCE in the PROFILES PANE."

However, not only does Jacque's profile pane look nothing like the Wiki
image's, but the former only allows naming the "master profile" and has a
checkbox for "Create profiles automatically".

Is this a LC version problem? Or is it it simply that I don't know how to
work with profiles?

If the latter, I'd sure appreciate detailed examples of how to create a
couple of profiles, and then implement them.

On the other hand, in the LC forum thread Property Profiles and
revSetStackFileProfile

(2010.04.23),
Klaus warns against using profiles and instead use CustomProperties and
CustomPropertySets. He even offers a sample stack
 "CP-Sets1" (scroll down the
page) showing how that works.

So, my other question is, avoid profiles completely?

--
Nicolas Cueto
___
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: resizing and rescaling an object: Is this math/logic ok?

2018-01-22 Thread Nicolas Cueto via use-livecode
Brian Milby wrote:

The GM avoids the cumulative error problem by storing positioning as fixed
numbers in the GM custom properties.  It will either store absolute pixel
positions or relative % of card dimension positions.  Positions are based
on either a card edge or another control edge.  So for your situation, you
would want to calculate the offset % for each side and then just use the
new card dimensions to calculate the new control rect.

Took days to figures out and test but that worked! Thank you, Brian.

Thank you Brian too for your stack "MobileProfile", which I found on a
forum thread

when
searching for anything having to do with rescaling/resizing. That stack
(which is way over my head), besides a source of ideas for resizing, was
also my first introduction to "profiles".

BTW and OTT, Brian, about your use of "profiles" in that stack, I was
especially and idiotically mesmerized by how those three graphic objects
become not only repositioned but colored in when in landscape profile, as
oposed to transparent when in portrait profile. Not knowing diddly-squat
about "profiles", I thought I might use LC's "Find & replace" to find
somehow a refence (by object name or background color) to those three
graphic objects, and thereby hit upon the contents of your stack's
"profiles". But, like I say, diddly-squat. Perhaps a few pointers about
"profiles", especially how they're used in "MobileProfile", when you have a
few spare moments? Sorry to ask directly, but, as I say, how your stack
works seems magical to these eyes.

Anyway, thank you all for the help. Now, onto the other recaling problems,
such as text size.

--
Nicolas Cueto

On 20 January 2018 at 01:26, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> To demonstrate, the following formula:
>
> 5 * 3 * .5 * .66 = 4.95 (not 5)
>
> hence the need to store a base size and always work your math from that.
>
> Bob S
>
>
> > On Jan 19, 2018, at 07:53 , Brian Milby via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > The calculations that you are making are sound, but as Ralph said, after
> > repeated changes it may end up "off".
> >
> > The type of positioning that you are doing is one of the things that the
> > current Geometry Manager (GM) Property Inspector (PI) will not allow
> (when
> > you resize a control, the left/top can only be fixed to the card edge and
> > not proportional).  But, the method that the GM uses is helpful to know.
> >
> > The GM avoids the cumulative error problem by storing positioning as
> fixed
> > numbers in the GM custom properties.  It will either store absolute pixel
> > positions or relative % of card dimension positions.  Positions are based
> > on either a card edge or another control edge.  So for your situation,
> you
> > would want to calculate the offset % for each side and then just use the
> > new card dimensions to calculate the new control rect.
>
>
> ___
> 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


resizing and rescaling an object: Is this math/logic ok?

2018-01-18 Thread Nicolas Cueto via use-livecode
Given these values...

original STACK-width is tOSW
original stack-height is tOSH

resized stack-width is tRSW
resized stack-height of stack is tRSH

original  OBJECT rect is tOOR  (i.e., left,top,right,bottom)

... and assuming I'm right that ...

ratio of stack's width change is tRSWC and equals
round(tRSW / tOSW,2)

ratio of stack's height change is tRSHC and equals
round(tRSH / tOSH,2)




... then how (further?) wrong am I in assuming that, if I want the original
object resized and repositioned to scale on the new stack size, the NEW
RECT of that object therefore equals ...

round(item 1 of tOOR * tRSWC,0) , round(item 2 of tOOR * tRSHC,0) ,
round(item 3 of tOOR * tRSWC,0), round(item 4 of tOOR * tRSHC,0)


Sorry if that was painful. For what it's worth, I'm embarassed posting it,
but...

--
Nicolas Cueto
___
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: deploying to multiple mobile devices

2018-01-16 Thread Nicolas Cueto via use-livecode
> Is this a classroom you work with directly, or a product for others to
use in their own classrooms?

Directly.


On 17 January 2018 at 12:38, Richard Gaskin via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Nicolas Cueto wrote:
>
> > Some of my stacks are for a classroom situation, so would like to
> > deploy to the various smartphones of  class sizes of 3 to 20 students
> >  (1) preferably cable-free (Wifi?), (2) easily for the end-user, and
> > (3) as simultaneously as possible.
>
> Is this a classroom you work with directly, or a product for others to use
> in their own classrooms?
>
> --
>  Richard Gaskin
>  Fourth World Systems
>  Software Design and Development for the Desktop, Mobile, and the Web
>  
>  ambassa...@fourthworld.comhttp://www.FourthWorld.com
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
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


deploying to multiple mobile devices

2018-01-16 Thread Nicolas Cueto via use-livecode
Some of my stacks are for a classroom situation, so would like to deploy to
the various smartphones of  class sizes of 3 to 20 students  (1) preferably
cable-free (Wifi?), (2) easily for the end-user, and (3) as simultaneously
as possible.

On Mac and for iOS, it seems the best (only?) choice is Jacqueline Landman
Gay's AirLaunch ,
specially since it does so from withing LC itself.

But for Android? and on Windows?

--
Nicolas Cueto
___
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: Android devpt on Mac OS -- your setup?

2018-01-15 Thread Nicolas Cueto via use-livecode
Can now test on Android device from Mac. Hooray.

Thanks, Andrew. But went with what LC recommends. Kind of.

--
Nicolas Cueto

On 15 January 2018 at 22:50, Andrew Bell via use-livecode <
use-livecode@lists.runrev.com> wrote:

>
> ::: Mac OS version :::
>>
> 10.11.5 on MBP
> 10.12.6 on iMac
> school IT just forced me to update the iMac to 10.13.2 but I haven't
> compiled anything since then (thanks Apple for not backwards applying
> Meltdown/Spectre patches)
>
>
> ::: LC version(s) :::
>>
> 8.1.8 Business until the pesky "could not open module" bug crept into my
> stack. Now I'm using 9dp11 (I feel like this is dg2 related, but can't
> pinpoint that so it may be fake news)
>
>
> ::: Java JDK :::
>>
> 1.8.0_121 on MBP
> It's a holiday and the school is closed so I can't comment on the iMac,
> but since that was a clean install about 3 months ago the process is pretty
> fresh. I had to do something funky to get the JDK, and I think it was
> this... https://www.ihash.eu/2015/11/how-to-install-java-jre-8-on-ma
> c-os-x-10-11-el-capitan/
>
>
> ::: Android SDK :::
>>
>> That LC lesson advices the full Android Studio for LC post-8.1.5. Do you
>> agree?
>>
> I'm pretty sure that's the only way now. The old method didn't have a
> flashy interface (not that Android Studio does either, or is intuitive) but
> seemed to work fine for my needs.
>
>
> ::: Android SDK platform :::
>>
>> Again, that LC lesson advices the Android 4.0.3 package. Yes?
>>
> I think 4.0.3 is a must, but for some reason I also think that 4.2 and/or
> 4.2.2 was a critical breakthrough for me when I first setup this system
> about 2 years ago.
>
>
> --Andrew Bell
>
>
>
> ___
> 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


Mac path to Android SDK?

2018-01-15 Thread Nicolas Cueto via use-livecode
To configure Mobile prefs on Mac, where might the Android SDK be?

LC states "The root directory may look something like: ...android-sdk-mac",
so I'll try searching for that in the meantime.

Thank you.

--
Nicolas Cueto
___
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


Android devpt on Mac OS -- your setup?

2018-01-14 Thread Nicolas Cueto via use-livecode
I want to configure a new Mac mini running 10.13.2 for Android development.
But, as I've learnt these last two weeks, LC advise can be out-of-date, and
what works on one setup may not on another. At least, that's been the case
on Windows.

So, if you are on a Mac OS ++and++ have succesfully tested a stack on an
Android device -- preferably one using LC's  Internet library -- please
post details about your:

::: Mac OS version :::

::: LC version(s) :::

::: Java JDK :::

About downloading the JDK. Where specifically should I click on the downloading
a JDK 
webpage
referred to by the LC Lesson "How do I become an Android developer on Mac?
"
--- the "JDK Download" button inside table Java SE 8u151/ 8u152?

I ask to be doubly-sure and because recent list messages warn against
updating from 8.0 to 9.0​. Plu

::: Android SDK :::

That LC lesson advices the full Android Studio for LC post-8.1.5. Do you
agree?

::: Android SDK platform :::

Again, that LC lesson advices the Android 4.0.3 package. Yes?


Thank you. I sure would like to get things working well straight out of the
box!

--
Nicolas Cueto
___
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: Android build executable on test device fails

2018-01-13 Thread Nicolas Cueto via use-livecode
And now a new problem. The SDK and JDK paths have disappeared.

Just now installed 8.0.2, pointed it to the SDK root path that worked with
8.1.8, but got the error "chosen folder not a valid Android SDK".

And, opening 8.1.8 to confirm the SDK rooth path, the SDK field there has
become blank and the JDK path has returned to "(none)".

Why?!?  Argh!!!

--
Nicolas Cueto


On 14 January 2018 at 09:43, MWCM via use-livecode <
use-livecode@lists.runrev.com> wrote:

>
> > Date: Sun, 14 Jan 2018 09:15:48 +0900
> > From: Nicolas Cueto 
> > To: How to use LiveCode 
> > Subject: Re: Android build executable on test device fails
> > Message-ID:
> >
> > Content-Type: text/plain; charset="UTF-8"
> >
> > The problem is on 8.1.8.
> >
> > Any idea what the subject of that thread was?
> >
>
> I was hoping I would be able to get something useful as I had a similar
> problem but the user found the problem object on their own.
>
> http://lists.runrev.com/pipermail/use-livecode/2018-January/244253.html
>
> --Andrew Bell
> ___
> 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: Android build executable on test device fails

2018-01-13 Thread Nicolas Cueto via use-livecode
Found the thread ("Error while saving standalone 8 & 9"), and, yes, widget
problem. But my stack is simply a field and two buttons. No widgets.

So, still stuck.

--
Nicolas Cueto

On 14 January 2018 at 09:15, Nicolas Cueto  wrote:

> The problem is on 8.1.8.
>
> Any idea what the subject of that thread was?
>
> --
> Nicolas Cueto
>
> On 13 January 2018 at 20:15, MWCM via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>>
>> > Testing on an Android device, the "Standalone builder progress" window
>> > shows first "Building classes" and then for a brief moment "Building
>> > executable", after which an error window reads "Unable to build app for
>> > testing: could not open module file".
>> >
>> > Searched the forums but no mention at all of this problem.
>> >
>> > --
>> > Nicolas Cueto
>> >
>>
>> Someone else on the list had this problem within the week, but had a
>> different subject for the thread. I believe their issue was some code or
>> widget lurking around without proper inclusions.
>>
>> What version of Livecode are you compiling with? I’ve had the same
>> problem recently with a stack that I’ve tried to compiler in 8.1.8. I fear
>> I opened this in 9dp11 to see the new dataGrid2 in action and saved the
>> stack without backwards compatibility. This isn’t strictly Android as I was
>> building for iOS when the error manifested.
>>
>> —Andrew Bell
>>
>> ___
>> 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: Android build executable on test device fails

2018-01-13 Thread Nicolas Cueto via use-livecode
The problem is on 8.1.8.

Any idea what the subject of that thread was?

--
Nicolas Cueto

On 13 January 2018 at 20:15, MWCM via use-livecode <
use-livecode@lists.runrev.com> wrote:

>
> > Testing on an Android device, the "Standalone builder progress" window
> > shows first "Building classes" and then for a brief moment "Building
> > executable", after which an error window reads "Unable to build app for
> > testing: could not open module file".
> >
> > Searched the forums but no mention at all of this problem.
> >
> > --
> > Nicolas Cueto
> >
>
> Someone else on the list had this problem within the week, but had a
> different subject for the thread. I believe their issue was some code or
> widget lurking around without proper inclusions.
>
> What version of Livecode are you compiling with? I’ve had the same problem
> recently with a stack that I’ve tried to compiler in 8.1.8. I fear I opened
> this in 9dp11 to see the new dataGrid2 in action and saved the stack
> without backwards compatibility. This isn’t strictly Android as I was
> building for iOS when the error manifested.
>
> —Andrew Bell
>
> ___
> 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

Android build executable on test device fails

2018-01-12 Thread Nicolas Cueto via use-livecode
Testing on an Android device, the "Standalone builder progress" window
shows first "Building classes" and then for a brief moment "Building
executable", after which an error window reads "Unable to build app for
testing: could not open module file".

Searched the forums but no mention at all of this problem.

--
Nicolas Cueto
___
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


libUrlDownloadToFile: desktop ok, Android no

2018-01-11 Thread Nicolas Cueto via use-livecode
Hello.

Below is the script used to download a text file. Which works on the
Windows desktop. But on my Nexus 5, "error" is returned by the  script
commands "log" and "logflushbuffer".

Why oh why ...

Help! please.

---

BUTTON SCRIPT

on mouseUp
   put empty into the last field
   libUrlDownloadToFile binURL(), specialFolderPath("documents") \
 & slash & "dictionary.txt", "urlDownloadStatus"
   log "started download of" && binURL()
end mouseUp

on urlDownloadStatus pUrl, pStatus
   log pStatus && pUrl
end urlDownloadStatus


CARD SCRIPT

local sLogBuffer
local sLogBuffering="false"

on log pMsg
   put pMsg & return after sLogBuffer
   if not sLogBuffering then logFlushBuffer
end log

on logFlushBuffer
   put sLogBuffer after field "logField"
   put empty into sLogBuffer
   set the vscroll of field "logfield" to 65536
end logFlushBuffer

on clearLog
   put empty into field "logField"
   put empty into sLogBuffer
end clearLog

on logStartBuffer
   put true into sLogBuffering
end logStartBuffer

on logEndBuffer
   logFlushBuffer
   put false into sLogBuffering
end logEndBuffer



on preOpenCard
   if the environment is not "mobile" then
  libUrlSetStatusCallback "urlProgressCallback", the long ID of me
   end if
   pass preOpenCard
end preOpenCard

on closeCard
   if the environment is not "mobile" then
  libUrlSetStatusCallback
   end if
end closeCard

on urlProgressCallback pStatus, pURL
   urlProgress (item 1 of pStatus), pURL, (item 2 of pStatus), (item 3 of
pStatus)
end urlProgressCallback

on urlProgress pURL, pStatus, pRecieved, pTotal
   if pStatus is "loading" then
  logStartBuffer
   else
  logEndBuffer
   end if
   log pStatus && pURL && pRecieved && pTotal
end urlProgress

local sURL = "http://webserver.com/docs/UTF8_file.txt";

function binURL
   return sURL
end binURL
___
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: updating text of a mobile app (newbie)

2018-01-10 Thread Nicolas Cueto via use-livecode
Noob again.

This works on the dektop but not on an Android device:

on mouseUp
   put url "http://mysite.com/dir/file.txt"; into tTextToDecode
   put textDecode(tTextToDecode,"UTF-8") into field "the text"
end mouseUp

I looked in LC dictionary "put" but only thing was "Note: The Android and
iOS engines do not support 'libUrl' but do allow you to use put in the
background. "



On 9 January 2018 at 12:01, Nicolas Cueto  wrote:

> A goal this year is to get an app (for foreign language learning) on the
> Android and iOS stores. To this end, I have begun to re-study LC8's app
> building course; LC itself I've been using for decades.
>
> Let's say my original app gets approved. In that app is a datagrid object
> list consisting of 10 vocabulary categories, the contents of  which are
> read in from a text file in specialFolderPath("documents"). A few months
> later, however, I discover more vocabulary categories are needed.
>
> What do I do? Can I somehow "download" a new text file into
> specialFolderPath("documents")? Do I have to completely update my app? Or
> something else?
>
> In the past what I've done for my desktop Windows standalones is to
> download data from my webserver over the internet. But, I imagine mobile
> apps must work differently.
>
> Hand holding very much welcome!
>
> --
> Nicolas Cueto
>
___
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


updating text of a mobile app (newbie)

2018-01-08 Thread Nicolas Cueto via use-livecode
A goal this year is to get an app (for foreign language learning) on the
Android and iOS stores. To this end, I have begun to re-study LC8's app
building course; LC itself I've been using for decades.

Let's say my original app gets approved. In that app is a datagrid object
list consisting of 10 vocabulary categories, the contents of  which are
read in from a text file in specialFolderPath("documents"). A few months
later, however, I discover more vocabulary categories are needed.

What do I do? Can I somehow "download" a new text file into
specialFolderPath("documents")? Do I have to completely update my app? Or
something else?

In the past what I've done for my desktop Windows standalones is to
download data from my webserver over the internet. But, I imagine mobile
apps must work differently.

Hand holding very much welcome!

--
Nicolas Cueto
___
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: screenloc not actually centered after changing scalefactor (was Screen Resolution for Desktop Apps)

2018-01-03 Thread Nicolas Cueto via use-livecode
Jacqueline yet again saves the day. Thank you!

--
N.

On 2 January 2018 at 08:34, J. Landman Gay via use-livecode <
use-livecode@lists.runrev.com> wrote:

> On 12/31/17 7:31 PM, Nicolas Cueto via use-livecode wrote:
>
>> To do "some calculations", I thought of comparing the loc to the
>> scalefactor. So ran the standalone on three devices, but saw no consistent
>> corelation between the differing locs and the scalefactor.
>>
>> So, still no clue what to use for these calculations...
>>
>
> My math skills are terrible so we need someone more clever to fix my
> calculation. But this seems to work for most scalefactors until you get
> down to about 0.6 or lower:
>
> on setloc pScale
>   -- pScale = the desired scaleFactor
>   put the screenloc into tSLoc
>   if pScale <= 1 then
> put 1 + (1-pScale) into tRatio
>   else
> put 1/pScale into tRatio
>   end if
>   put item 1 of tSLoc * tRatio into item 1 of tNewLoc
>   put item 2 of tSLoc * tRatio into item 2 of tNewLoc
>   set the scalefactor of this stack to pScale
>   set the loc of this stack to tNewLoc
> end setloc
>
> I'm pretty sure there's a way to calculate the ratio without the "if"
> clause so that it works for both large and small scales and I'm not sure
> why it breaks at about 0.6. Hopefully one of our math gurus can advise.
>
>
> --
> 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
>
___
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: screenloc not actually centered after changing scalefactor (was Screen Resolution for Desktop Apps)

2017-12-31 Thread Nicolas Cueto via use-livecode
> You may have to do some calculations based on the scalefactor, in order
to adjust the visual location.

Thanks Jacqueline, but still confused.

To do "some calculations", I thought of comparing the loc to the
scalefactor. So ran the standalone on three devices, but saw no consistent
corelation between the differing locs and the scalefactor.

So, still no clue what to use for these calculations...

On a perhaps related topic. Every time I start LC on that devpt PC
(Windows), the LC menu bar opens mostly hidden offscreen. So I have to drag
it left to be fully onscreen.

So, I guess if LC itself can't get it right, what hope is there for moi.

 ¡Feliz año nuevo!

​--
Nicolas Cueto​
___
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: delete the customproperty (of a card)

2017-12-31 Thread Nicolas Cueto via use-livecode
The answer for what I was after:

 set the customPropertySets of this card to empty

Thanks all. Particularly, Glen Bojsza for the offlist sample stack and
explanatory video.

--
N. Cueto

On 1 January 2018 at 10:14, Nicolas Cueto  wrote:

> The answer for what I was after:
>
>
> On 1 January 2018 at 02:03, Richmond Mathewson via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> Fegs!
>>
>> delete the customKeys of card id 1002
>>
>> warked :-*
>>
>> Richmond.
>>
>>
>>
>> On 31/12/2017 6:59 pm, Richmond Mathewson wrote:
>>
>>> If you know the name of the customProp . . .
>>>
>>> one can EMPTY the customProp very easily indeed:
>>>
>>> set the "XYZ" of card id 1002 to empty
>>>
>>> that does, howeve, mean that the prop "XYZ" is still 'there':
>>> I'm not sure whether that is important.
>>>
>>> In the DICTIONARY is states this:
>>>
>>> "You can delete an object's custom property sets by setting the object's
>>> customPropertySets to empty."
>>>
>>> So I wonder why this:
>>>
>>> set the customPropertySets of card id 1002 to empty
>>>
>>> divn't work?
>>>
>>> At this point I would generally start sending 'slightly offensive'
>>> remarks to Mark & Kevin,
>>> but for a variety of reasons just the now I'll content mysen by sending
>>> them
>>>
>>> "Hae a gae guid Hogmanay, chiels!"
>>>
>>> Yours aye, Richmond,
>>> an Ah'll stick the knife intil ye in the new towmond ;-)
>>>
>>>
>>>
>>>
>>> On 31/12/2017 6:02 pm, hh via use-livecode wrote:
>>>
 Dictionary > customKeys

 ___
 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: delete the customproperty (of a card)

2017-12-31 Thread Nicolas Cueto via use-livecode
The answer for what I was after:


On 1 January 2018 at 02:03, Richmond Mathewson via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Fegs!
>
> delete the customKeys of card id 1002
>
> warked :-*
>
> Richmond.
>
>
>
> On 31/12/2017 6:59 pm, Richmond Mathewson wrote:
>
>> If you know the name of the customProp . . .
>>
>> one can EMPTY the customProp very easily indeed:
>>
>> set the "XYZ" of card id 1002 to empty
>>
>> that does, howeve, mean that the prop "XYZ" is still 'there':
>> I'm not sure whether that is important.
>>
>> In the DICTIONARY is states this:
>>
>> "You can delete an object's custom property sets by setting the object's
>> customPropertySets to empty."
>>
>> So I wonder why this:
>>
>> set the customPropertySets of card id 1002 to empty
>>
>> divn't work?
>>
>> At this point I would generally start sending 'slightly offensive'
>> remarks to Mark & Kevin,
>> but for a variety of reasons just the now I'll content mysen by sending
>> them
>>
>> "Hae a gae guid Hogmanay, chiels!"
>>
>> Yours aye, Richmond,
>> an Ah'll stick the knife intil ye in the new towmond ;-)
>>
>>
>>
>>
>> On 31/12/2017 6:02 pm, hh via use-livecode wrote:
>>
>>> Dictionary > customKeys
>>>
>>> ___
>>> 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


delete the customproperty (of a card)

2017-12-31 Thread Nicolas Cueto via use-livecode
Very simple question, I guess. But from the documentation I've only figured
out :

set the customKeys["myCP"] of this card to empty

How do I completely delete the customProp myCP itself? Bettery yet, how
could I delete at once all customProps, even if I don't know their names?!

Thanks. (And "akemashite omedeto!")

--
Nicolas Cueto
___
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


preloading an mages dimensions

2017-12-27 Thread Nicolas Cueto via use-livecode
Before setting the filename of an image object, how do I get the original
dimensions of an image (jpg)?

Thank you.

--
Nicolas Cueto
___
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


screenloc not actually centered after changing scalefactor (was Screen Resolution for Desktop Apps)

2017-12-27 Thread Nicolas Cueto via use-livecode
Following upon Jacqueline's advice on the original thread, here is my stack
script for modifying scalefactor based on monitor screenrect differences
(i.e., between the monitor I developed the stack and other monitors):

///
on preopenstack
   defaultStackAppearance
end preopenstack

on defaultStackAppearance
   lock screen
   set the fullscreen of this stack to false
   set the width of this stack to 1126
   set the height of this stack to 627

   -- Set to the lower of two screenrect-based ratios.
   -- On the monitor I developed this app,
   -- 1152 was item 3 (width) of the working screenrect and
   -- 682 was item 4 (height) of the working screenrect.

   put round((item 3 of the working screenrect) / 1152,2) into ratio_width
   put round((item 4 of the working screenrect) / 682,2) into ratio_height
   if ratio_width > ratio_height then
  -- current monitor is wider then devpt monitor, so set to height ratio
  set the scalefactor of this stack to ratio_height
   else
  -- current monitor is taller than devpt monitor, so set to width ratio
  set the scalefactor of this stack to ratio_width
   end if
   set the loc of this stack to the screenloc
   unlock screen
end defaultStackAppearance
///

Problem is, after opening the standalone on different PCs the rescaling
fits the monitor, but the window is not centered despite the "set the loc
to screenloc" command.

Suggestions?

Thank you.

--
Nicolas Cueto
___
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: incrementing a decimal...

2017-11-07 Thread Nicolas Cueto via use-livecode
Monte Goulding's solution was what I was after.

Thank you.

--
Nicolas Cueto

On 8 November 2017 at 09:45, Monte Goulding via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Something like:
>
> put “3.33.007" into tValue
> set the itemDelimiter to "."
> put format("%s.%03d", item 1 to 2 of tValue, item 3 of tValue + 1) into
> tNextValue
>
> > On 8 Nov 2017, at 11:22 am, Nicolas Cueto via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > I'm after an easy way to convert span 3.33.007-3.33.012 into this
> > incremental cr-del list:
> >
> > 3.33.007
> > 3.33.008
> > 3.33.009
> > 3.33.010
> > 3.33.011
> > 3.33.012
> >
> > From experience, I know if I add 1 to "07" the result is "8" and not
> "08".
> >
> > Thank you.
> >
> > --
> > Nicolas
> > ___
> > 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

incrementing a decimal...

2017-11-07 Thread Nicolas Cueto via use-livecode
I'm after an easy way to convert span 3.33.007-3.33.012 into this
incremental cr-del list:

3.33.007
3.33.008
3.33.009
3.33.010
3.33.011
3.33.012

>From experience, I know if I add 1 to "07" the result is "8" and not "08".

Thank you.

--
Nicolas
___
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: filter? replace? wildcard? reg exp? help please!

2017-05-10 Thread Nicolas Cueto via use-livecode
> Totally OT, but is this Dante, in Spanish??

Yes, and yes. From the verse translation of Ángel Crespo.

--
Nicolas Cueto

On 10 May 2017 at 19:57, Graham Samuel via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Totally OT, but is this Dante, in Spanish??
>
> Just askin’. I am not good with languages, as you can probably tell.
>
> Graham
>
> > On 10 May 2017, at 06:33, J. Landman Gay via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > On 5/9/17 11:16 PM, J. Landman Gay via use-livecode wrote:
> >> On 5/9/17 10:41 PM, Nicolas Cueto via use-livecode wrote:
> >>> Given this snippet...
> >>>
> >>> ---
> >>> CANTO XXXIV
> >>> CÍRCULO IX: TRAIDORES.
> >>> «Vexilla regis prodeunt[307] del Abismo
> >>> hacia nosotros[308], mas delante mira
> >>> 3—dijo el maestro— y los verás tú mismo.»
> >>> ---
> >>>
> >>> ... how do I use LC to remove the square-brackets and any string within
> >>> them, so that the snippet becomes...
> >>>
> >>> ---
> >>> CANTO XXXIV
> >>> CÍRCULO IX: TRAIDORES.
> >>> «Vexilla regis prodeunt del Abismo
> >>> hacia nosotros, mas delante mira
> >>> 3—dijo el maestro— y los verás tú mismo.»
> >>> ---
> >>
> >> This is about the only thing I know how to do with regext. :)
> >>
> >> on fix
> >>  put fld 1 into tText
> >>  put "\[.*\]" into tRegEx
> >>  put replacetext(tText,tRegEx,empty) into fld 2
> >> end fix
> >>
> >
> > You'd probably want it to be a function though:
> >
> > function removeBrackets pString
> >  return replacetext(pString,"\[.*\]",empty)
> > end removeBrackets
> >
> > --
> > 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
>
>
> ___
> 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: filter? replace? wildcard? reg exp? help please!

2017-05-09 Thread Nicolas Cueto via use-livecode
​Thank you everyone. Went with ​Jacqueline's, cause fastest.

--
N. Cueto
___
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

filter? replace? wildcard? reg exp? help please!

2017-05-09 Thread Nicolas Cueto via use-livecode
Given this snippet...

---
CANTO XXXIV
CÍRCULO IX: TRAIDORES.
«Vexilla regis prodeunt[307] del Abismo
hacia nosotros[308], mas delante mira
3—dijo el maestro— y los verás tú mismo.»
---

... how do I use LC to remove the square-brackets and any string within
them, so that the snippet becomes...

---
CANTO XXXIV
CÍRCULO IX: TRAIDORES.
«Vexilla regis prodeunt del Abismo
hacia nosotros, mas delante mira
3—dijo el maestro— y los verás tú mismo.»
---

Muchas gracias.

--
Nicolás Cueto
___
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: align field scrolls

2017-03-06 Thread Nicolas Cueto via use-livecode
Mike Bonner's solution -- using selectedLoc to set vScroll -- matches
exactly the scrolling effect I'm after.

Thank you, everyone. And, thank you Mike!

--
Nicolas Cueto


On 7 March 2017 at 00:40, Mike Bonner via use-livecode <
use-livecode@lists.runrev.com> wrote:

> An alternate solution..
> If you
> put item 2 of the selectedloc of the first field - item 2 of the
> selectedloc of the second field into tScroll
>
> -- you can then
> set the vscroll of field "your second field" to the vscroll of field "your
> second field" - tScroll
>
> On Mon, Mar 6, 2017 at 8:27 AM, Paul Dupuis via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > You need 3 controls: 2 fields with the vertical scrollbars turned off
> > and a vertical scroller
> > 
> >
> > Set the min of the vertical scrollbar to 0 and the max to the "max(the
> > formattedHeight of field X,formattedHeight of field Y)
> >
> > In the scrollbar, add the script:
> >
> > on scrollbarDrag newPosition
> >   set the vScroll of field X to newPosition
> >   set the vScroll of field Y to newPosition
> > end scrollbarDrag
> >
> >
> > On 3/6/2017 9:39 AM, Rick Harrison via use-livecode wrote:
> > > Hi Nicolas,
> > >
> > > Does the number of lines increase or decrease between executions?
> > >
> > > Have you tried to add or subtract a constant to adjust for the
> > difference?
> > >
> > > Rick
> > >
> > >> On Mar 5, 2017, at 9:45 PM, Nicolas Cueto via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> > >>
> > >>> Provided both fields have the same number of lines...
> > >>
> > >> ​I should've added that the fields do not contain the same number of
> > >> lines.  They are identical, though, in size and text properties.
> > >>
> > >> Thanks, Paul.
> > >>
> > >> --
> > >> Nicolas Cueto
> > >>
> > >>
> > >> On 6 March 2017 at 11:26, Paul Hibbert via use-livecode <
> > >> use-livecode@lists.runrev.com> wrote:
> > >>
> > >>> I have a stack that does a similar thing, but with numbers and I just
> > use
> > >>> the following script in the main field;
> > >>>
> > >>> on scrollBarDrag pScroll
> > >>>   set the vScroll of fld  “lineNumbers" to pScroll
> > >>>
> > >>> end scrollBarDrag
> > >>>
> > >>> Provided both fields have the same number of lines and the text
> > properties
> > >>> are identical they should stay aligned correctly.
> > >>>
> > >>> Or a simpler version would be;
> > >>> set the vScroll of fld 2 to the vScroll of fld 1
> > >>>
> > >>> Paul
> > >>>
> > >>>
> > >>>
> > >>>> On Mar 5, 2017, at 6:00 PM, Nicolas Cueto via use-livecode <
> > >>> use-livecode@lists.runrev.com> wrote:
> > >>>> Hi.
> > >>>>
> > >>>> The part I've got working...
> > >>>>
> > >>>> Two clickable scrolling fields (fld1, fld2), same height and width.
> > >>> Click a
> > >>>> fld1 line and fld2 SCROLLs and HILITEDLINEs to visually reveal a
> > matching
> > >>>> line. (fld1 is French text, fld2 is an English gloss.)
> > >>>>
> > >>>> The part I would welcome your help with...
> > >>>>
> > >>>> If, say, the hilited line on fld1 is kinda halfway down, how do I
> get
> > the
> > >>>> hilited line on fld2 to also be kinda halfway down?
> > >>>>
> > >>>> Here's my scrolling-magic script:
> > >>>>
> > >>>> set the scroll of fld2 to (tMatchingLineNr - 1) * \
> > >>>>   the textHeight of fld2 - the textHeight of fld2
> > >>>> set the hilitedline of fld2 to tMatchingLineNr
> > >>>>
> > >>>> Of course, this ends up with the hilited line of fld2 being at the
> > top.
> > >>>> How do I get it to scroll just that little bit more so that it
> aligns
> > >>> with
> > >>>> the hilited line as seen in fld1?
> > >>>>
> > >>>>
> > >>>> Thank you.
> > >>>>
> > >>>> 

Re: align field scrolls

2017-03-05 Thread Nicolas Cueto via use-livecode
> Provided both fields have the same number of lines...


​I should've added that the fields do not contain the same number of
lines.  They are identical, though, in size and text properties.

Thanks, Paul.

--
Nicolas Cueto


On 6 March 2017 at 11:26, Paul Hibbert via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I have a stack that does a similar thing, but with numbers and I just use
> the following script in the main field;
>
> on scrollBarDrag pScroll
>set the vScroll of fld  “lineNumbers" to pScroll
>
> end scrollBarDrag
>
> Provided both fields have the same number of lines and the text properties
> are identical they should stay aligned correctly.
>
> Or a simpler version would be;
> set the vScroll of fld 2 to the vScroll of fld 1
>
> Paul
>
>
>
> > On Mar 5, 2017, at 6:00 PM, Nicolas Cueto via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Hi.
> >
> > The part I've got working...
> >
> > Two clickable scrolling fields (fld1, fld2), same height and width.
> Click a
> > fld1 line and fld2 SCROLLs and HILITEDLINEs to visually reveal a matching
> > line. (fld1 is French text, fld2 is an English gloss.)
> >
> > The part I would welcome your help with...
> >
> > If, say, the hilited line on fld1 is kinda halfway down, how do I get the
> > hilited line on fld2 to also be kinda halfway down?
> >
> > Here's my scrolling-magic script:
> >
> >  set the scroll of fld2 to (tMatchingLineNr - 1) * \
> >the textHeight of fld2 - the textHeight of fld2
> >  set the hilitedline of fld2 to tMatchingLineNr
> >
> > Of course, this ends up with the hilited line of fld2 being at the top.
> > How do I get it to scroll just that little bit more so that it aligns
> with
> > the hilited line as seen in fld1?
> >
> >
> > Thank you.
> >
> > --
> > Nicolas Cueto
> > ___
> > 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

align field scrolls

2017-03-05 Thread Nicolas Cueto via use-livecode
Hi.

The part I've got working...

Two clickable scrolling fields (fld1, fld2), same height and width. Click a
fld1 line and fld2 SCROLLs and HILITEDLINEs to visually reveal a matching
line. (fld1 is French text, fld2 is an English gloss.)

The part I would welcome your help with...

If, say, the hilited line on fld1 is kinda halfway down, how do I get the
hilited line on fld2 to also be kinda halfway down?

Here's my scrolling-magic script:

  set the scroll of fld2 to (tMatchingLineNr - 1) * \
the textHeight of fld2 - the textHeight of fld2
  set the hilitedline of fld2 to tMatchingLineNr

Of course, this ends up with the hilited line of fld2 being at the top.
How do I get it to scroll just that little bit more so that it aligns with
the hilited line as seen in fld1?


Thank you.

--
Nicolas Cueto
___
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