Re: Responsive Layout and Opencard (James At The Hales)

2023-09-08 Thread James Hale via use-livecode
Never mind, my error.

James

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


SUB-to-SRT updated to convert YouTube transcripts

2022-10-08 Thread James Hale via use-livecode
Hi all,

I have just updated the sample stack "sub-to-srt" to now convert YouTube's 
transcripts (sbv extension) to set files.

Perhaps it is age, but I am increasingly finding it difficult to catch all the 
words spoken in videos.
The LivdCode videos posted on YouTube being a case in point. Although I have 
subscribed to most of the "global" events, and watch them when I can given the 
timezone differences, I find myself usually waiting until they are posted in my 
account page.
Previously I would then download the YouTube version in order to have closed 
captions.
Unfortunately the apps I use to download YouTubes no longer capture the 
captions.
However while on YouTube you can show the transcript and copy the text.
Doing so and saving the text file with a ".sbv" extension the "sub-to-srt" 
stack will now convert this into a correctly formatted ".srt" file which most 
media players can access.

I use "sub-to-srt" as a standalone app on my Mac.

To see the transcript of a YouTube video;
Turn on captions, if not already turned on. It's the "CC" icon at the bottom of 
the video.
Click the gear icon to adjust any available settings.
At the end of the line of icons with "like" "dislike" etc you will see an 
ellipsis "…"
Click on this and select "show transcript".
It will appear to the right of the video.
Simply select and copy the text.

James



___
use-livecode mailing list
use-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: variable window not applying changes

2021-11-24 Thread James Hale via use-livecode
Double clicking on the line in the variable list only opens a single watcher 
window.

If I do this in my current project I make a change, click "apply" and the 
previous value (before I made the change) returns!

I have since made a test stack to see if the problem persists.
It doesn't.
Making a change in a variable of the test stack worked as expected.

So whatever is happening is confined to my current project.
Very strange.

Restarting LC does not solve the issue.
Right now it is just an inconvenience but I am intrigued as to what is present 
in my current project that makes this happen.

When I complete it I will test again and if still present send the stack to LC 
(in a bug report.) and see if Panos can illuminate me.

Thanks for the comments.

James

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


variable window not applying changes

2021-11-23 Thread James Hale via use-livecode
Hi,

I have been tracing a script and while stepping through notice an error in a 
variable.
I double clicked on the value in the variable list at the bottom of the SE 
window and brought up the variable window.
Made the  correction and clicked "apply".

Nothing happened.

This used to work, didn't it??

James



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


Big Sur and Drag and drop

2020-09-15 Thread James Hale via use-livecode
Hi, 

Just a question to others using Big Sur on their Macs.

I have an app which uses drag and drop to place a list of files in a field.

I drag the folder containing the files over the list, release the mouse and 
boom the list of files appear.

Today I went to use this app on my main Mac which is also running the latest 
Big Sur beta.

Dragging over the field and the cursor turns to a grey circle with diagonal 
line, i.e. no entry/go

Launching LC and opening the original stack and sure enough, the same thing.

My question, if you are using Big Sur and have an app that uses drag and drop 
in this way (to get a listing of files in a folder) could you please see if it 
still works?

If not I will submit a bug report.

Thanks in advance.

James




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


Dash docset for LC now at 1.76, Make_DocSet on Livecode Share updated

2019-05-14 Thread James Hale via use-livecode
I just added the docs from LC 9.04 Stable to the DASH repository. 

DASH users simply go to the preferences pane and update the user contributed 
docs.
As usual, this release has some additional dictionary entries/mods.

I have also updated Make_DocSet on Livecode Share.
the previous version somehow lost the syntax coloring

James




___
use-livecode mailing list
use-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: Regex replacements (\1, \2) not matching

2018-11-11 Thread James Hale via use-livecode


You can do quite a lot with LC's chunk expressions as well as with the 
matchtext and matchchunk functions.

If you are willing to put a bit of time using these functions and arrays you 
can pretty much make up for LC's shortcomings in this area.

If you have an Indy or Business license of LC then you might also want to look 
at Thierry's "SunnYrex" .
even if you choose not to use that Thierry himself (who is on the list) is 
extremely generous with his time in answering questions about regex and how to 
use it in LC.

James






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


Re: How to tell if the page displayed in the Browser widget has scrolle

2018-11-09 Thread James Hale via use-livecode
Hi Hermann,

Thanks for your patience :-)

I did as you suggested but no dice.

I added the jsNotify handler to the widget script.
I put the jsNotify call into the javascript handlers of the widget.
I then checked that they were indeed there, they were.
I added the "window.onscroll" function definition to the same handler I use to 
adjust the font-size of the page being displayed as I know that works there.
but when I load a page, nothing happens when I scroll to the bottom.

I tried with jsNotify putting into a field and just putting.
Still no joy.

I even found an example closer to what I want to do (with the call to jsNotify 
in place)...
https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_navbar_hide_scroll


So I see that this function works. Just apparently not in the current widget 
browser. Well at least on my Mac.

Does one of your samples stacks have something like this? Maybe I could compare 
and try to see what is different in mine?

James





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


Re: How to tell if the page displayed in the Browser widget has scrolled

2018-11-08 Thread James Hale via use-livecode
Many thanks Hermann.

I can follow this (logic wise) as well as the forum links you provided.
But I didn't quite follow the implementation.
For now I will put it on the "it would be nice but not required" list, else I 
will not finish.

And yes, I will ask on the forum should I have a potentially long thread.
I have been on the use list since its inception in 2001 so it is automatically 
my first point of call.

James




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


How to tell if the page displayed in the Browser widget has scrolled

2018-11-07 Thread James Hale via use-livecode
Is there a way (are you there Hermann?) of telling if a page being displayed in 
a browser widget has been scrolled down at all.

It doesn't seem there are any widget properties for this.

Hermann's solution to changing the font size was I think in effect injecting a 
javascript function/setting in the displayed document.

Is there a similar bit of code that can ask for the window scroll AND return an 
answer?

e.g. in pseudo pseudo code
 do "this function which reports the vertical scroll of the browser" in widget 
"browser" and put the answer into tBVScroll

Then, depending on whether  tBVScroll is 0 or not I can do other things to the 
controls around the browser.


James



___
use-livecode mailing list
use-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 update a css file when using the Browser widget

2018-11-05 Thread James Hale via use-livecode
hh wrote:
> Say you have the font-size declaration in the css for body.
> 
> Then script, for example:
> do "document.body.style.fontSize = '110%';" in widget "Browser"

Brilliant!
Thank you so much Hermann.

Putting the script in a button worked like a charm

Putting it in the handler that loads the page sort of works.

putting in an "on browserDocumentLoadComplete" handler works, full stop.


James





___
use-livecode mailing list
use-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 update a css file when using the Browser widget

2018-11-04 Thread James Hale via use-livecode
@brian - yes I am on a Mac. I wondered if it was webkit too. However Safari 
performs as expected. 
I load the page in Safari, then change the css and then reload the page in 
Safari (using the reload button in the address field) and the page reloads 
using the modified css.

@Phil - no joy with the extra argument either. I went one step further and made 
a second different page and differently called css.
I then loaded my first page. Changed the css. Loaded the second page (which 
called a third, differently named css) and then reloaded my original page.
It loaded but still used the original (but no longer present) css. And I tried 
this with both normal load and widget deletion/recreation too.

This is one sticky css!

James



___
use-livecode mailing list
use-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 update a css file when using the Browser widget

2018-11-03 Thread James Hale via use-livecode
Further exploring from my previous post.
Making a standalone of the stack.
Simply reloading the html page still does not use the modified css (as was the 
case in the IDE)
But, deleting the browser widget and recreating it before loading the page and 
the modified css is recognised.

So the deletion/creation will work but can only be seen in a standalone which 
is a pain, but not a deal breaker.

Still, it would be nice to know what's going on.

James




___
use-livecode mailing list
use-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 update a css file when using the Browser widget

2018-11-03 Thread James Hale via use-livecode
Recently I have been exploring modifying a css file so as to change the 
appearance of an html file being displayed in the browser widget.

Simply, I thought.

Load a page that uses a css file.

Modify the css file and rewrite it to disk.

Re-load the page from before, assuming it would use the newly modified css 
settings.

It doesn't work.
The html page continues to use the css from before.
This is even after closing and removing the stack from memory and reopening it.

I even tried deleting and re-creating the widget to see if this "refreshed" the 
css.

No. Finally I quit and relaunched LC.

On reopening the stack and reloading the page the new CSS was being read.

It would appear the css is being cached by LC and not the widget.

Has anyone else come across this before and if so, did you find a 
solution/workaround?

Context: I want to be able to change the font-size displayed in the browser. 
The pages being displayed all use the same external css. I thought that by 
changing the font-size definition with the css and saving it back to disk, a 
reload of the page would use the new setting. This works with desktop browsers.


James







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


Docset Reader released and updates to Make Docset and Livecode.Docset

2018-11-01 Thread James Hale via use-livecode
One of my other stacks "Make Docset" produces a Livecode package containing the 
complete dictionary API as well as all the guides that ship with each version 
of Livecode. This package can be read by DASH compatible readers that accept 
user contributed sources.

However not all platforms currently have such apps.

I have made "Docset Reader" to fill that void.

I am hoping it will be simple enough for users to make as a standalone for 
their platform of choice.

(Note: I am making this available for personal/non commercial use.)

It is available on LivecodeShare.

Note: it was made with LC 9.01

I have also updated "Make Docset" to V3.3 which finally corrects all 
"Associations" links.
The DASH user-contributed version is now at v1.7.3 and has the corrected 
"Associations" as well.

James



___
use-livecode mailing list
use-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: Interactive Tutorials - Where are they?

2018-10-30 Thread James Hale via use-livecode
Found them.

They are (well it is) available via the Start Center.

Took me a while as the Start Center doesn't remain on the screen if you have 
any plugins set to open on start up.


James





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


Interactive Tutorials - Where are they?

2018-10-30 Thread James Hale via use-livecode
Whatever happened to the interactive tutorial that was introduced with LC 8?

I can't seem to find any link/menu item of preference to bring it/them up. I 
have checked LC 8.1.8 as well and can't find them

I deleted my copies of LC pre 8.1 and so had started to download LC 8.0 but it 
is only downloading a 235kps (!!!).

Given I have a 50Mps line I think the company server is having trouble.


So, do any of you know how i can find them?

James



___
use-livecode mailing list
use-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: ?Make Docset? updated to 3.1, DASH docset for LC now at 1.7.1

2018-10-27 Thread James Hale via use-livecode
>From Mike
> First of all, thanks a lot for doing this.  Dash is now my default way to
> access the docs, on both my ipad and mac.  I love it.
> Second, I have auto-updates turned on for both platforms, but they both
> show the LC docs at 1.6.1

I am glad it is useful. I to really like the presentation of Dash, especially 
on my ipad.

It is now actually version 1.7.2

As for the update.
It would seem that updates to user contributions are not quite automatic.
(This could be as I leave one previous version in place.)

On the Mac go to Preferences.
Click on the "Check and Install Now" button at the bottom to jog an update OF 
THE LISTING.
Select the "User-Contributions" section in the lefthand pane.
In the search area above the list of user contributed docsets, type "livecode".
On the right of the entry for LivCode there is a popup menu which allows you to 
choose which docset to install.

On the iPad go to "Settings" and click on "User Contributed docsets" and then 
on the "Update" button at the top of the screen.
At least on the iPad it seems to grab the latest (one with the higher version 
number.)

I am still getting all the "Associations" links to work so there will be a 
1.7.3 in the near future.


James



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


LiveCode 1.6.1 docset now available

2018-08-29 Thread James Hale via use-livecode
The "LiveCode 1.6.1" documentation set for Dash and Dash compatible is now 
available via the normal update mechanism for user contributed docsets.

This version was compiled from the 9.01rc2 release of Livecode and includes all 
the guides for the widgets.

James





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


"Make Docset" updated to version 2.8

2018-08-26 Thread James Hale via use-livecode
With the release of 9.01 the "Guides" section of the dictionary now includes 
guide for the widgets. 
These guides come from documentation within the widget folder (within the 
Extensions folder of the LC package.)

I have now added the code to the "Make Docset" stack on LiveCodeShare to 
generate the appropriate guide files for inclusion into the DASH LiveCode 
docset.

The online DASH repository should be updated with this docset later this week. 
If you want it sooner just download the "Make Docset" stack and roll your own.

James





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


Re: some thoughts on version 9.0.0

2018-04-20 Thread James Hale via use-livecode
My error.

Yes the first badge takes you to the now empty behavior button.

BUT the second badge does indeed open the script only stack.

no bug, just me not moving further along the chain of badges.

The badges follow along the chain as advertised.



>> On 20 Apr 2018, at 1:41 pm, James At The Hale via use-livecode 
>> > wrote:
>> 
>> One downer I have noticed with the advent of behaviors being in script only 
>> stacks is you lose the ability to edit them when you click on the behavior 
>> badge.
>> 
>> If the behavior resides in a button, as before, all is well.
> 
> That sounds like a bug which we can fix. Could you report it.



James





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


Dash LiveCode Docset and "Make Docset" stack updated

2018-03-15 Thread James Hale via use-livecode
The Livecode Dash Docset has been updated to version 1.5 and has been compiled 
from the LC 9.0.0 rc1 documentation.

The "Make Docset" stack on LivecodeShare has been updated to version 2.6 
(modified version algorithm to catch fully the LC 9 series.)
http://livecodeshare.runrev.com/stack/845/Make-DocSet

Enjoy.

James



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


Sub-to-srt updated

2018-02-19 Thread James Hale via use-livecode
The Sub-to-srt stack on Livecode share has now been updated.

The interface has been simplified and frame rate conversions can now be applied 
to converted ssa and sub files.

For those who came in late...(apologies to L Falk)

Sub-to-srt is a conversion utility ofr subtitles.
It will convert either "sub" or "ssa" subtitle files to the more common "srt" 
format.
It will also change the timing of "srt" subtitles to a different frame rate, if 
required. 
For example your subtitle might be from a NTSC broadcast (30 fps) but your 
video file might be from a PAL video source (25 fps)
Most subtitles available on www.opensubtitles.org will indicate the frame rate 
of their source.

enjoy!


James






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


update to Mkvmerger

2018-02-07 Thread James Hale via use-livecode
I have updated Mkvmerger on the livecodeshare.

#1 Updated to correct output file error when both lists used.

Sorry about that, not sure how that error was left there.
#2 Added command to extract first subtitle from file

The ability to extract the first subtitle (usually the one I want) from the 
video file has been added. Originally I played around with changing the 
synchronization of the subtitle track by adding the appropriate output file 
option ( -- sync: msecs) but I am not convinced this actually works. At least 
on the players I use. So I hard coded a call to "mkvextract" (also part of the 
mkvtoolnix app) to simply extract track 2 so that I could times hift it by 
other means.

The track ID's are usually :
0: Video
1: Audio
2: sub/srt

If you usually deal with multilingual files which have extra audio tracks or 
you want a different subtitle track the just modify the tracks number in this 
line:
put mkvmergepath && file1 && "tracks 2:" & sq & oFile & sq into commandline

 in the "doSomething2" handler

James



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


Make Docset updated to v2.5, Docset updated to 1.4.2

2018-02-01 Thread James Hale via use-livecode
Hi,

Recently I went looking for some LCB details and discovered that the 
nomenclature for the widget libraries had changed. 
They are now of type "Module". This meant that the cross referencing for these 
modules no longer worked and details of their contents were no longer displayed 
when they were selected. 
The Make Docset stack V2.5 now accommodates this change. 
It also changes a capitalization issue for "Control Structures" so the they are 
appropriately grouped in Dash.

Make Docset v2.5 is currently on LiveCode Share and V1.4.2 of the LiveCode 
Docset should be available within the next 24 hours.


James



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


Update to FMaker utility stack

2017-12-13 Thread James Hale via use-livecode
FMaker - a utility to make folders based on a list.

Updated FMaker to use "revCopyFile" rather than  when moving 
files to newly created folder. 
This means the files do not need to be read into memory to be moved. 
This speeds up the process considerably, especially if you are moving large 
files, or the files reside on a network drive.

To access go to livecodeshare  or click on the 
 "sample stacks" button on toolbar in IDE.

The name of the stack is "FMaker"

James







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


Dash Docs and Docset Creator updates.

2017-12-13 Thread James Hale via use-livecode
I have just updated the Dash Docset to version 1.2 and the Dash Docset maker 
(Dash docset creator for LiveCode 
) to 2.2

The main change is to include a linked summary of all messages and properties 
associated with the object entries within the dictionary. This is to match what 
the IDE dictionary provides (only just realised.)

For those using Dash or one of its variants, the updated docset (LiveCode 1.2) 
should be available for auto or manual update/download.

James




___
use-livecode mailing list
use-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: New Books/Dictionary

2017-11-27 Thread James Hale via use-livecode
For those wanting to read the docs in an i-device Dash for iOS is FREE.

I have posted some screenshots on the forum if you want to see how the docs 
look.

http://forums.livecode.com/viewtopic.php?f=16=29745=160713#p160712 



James



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


mkvMerge - batch processing stack for mkvToolnix

2017-10-25 Thread James Hale via use-livecode
Hi,

I have just uploaded a stack "mkvmerge" to livecodeshare.

I manipulate lots of video files from different sources.
In doing so I have on occassion need to use the main mkv processing app 
"mkvToolnix".

Anyone who has used this app knows how powerful it is.

mkvToolnix has a batch file processing capability and where I need to make 
individual changes to the settings, depending on the files concerned, this is 
the way to go.

However there are many occassions where I wish to apply the same settings to 
each file in the "batch" I have.

Enter "mkvMerger" 

mkvMerger will take a list of files (or two) and apply the same mkvmerge 
command to each one.

The files are saved to a newly created directory either next to the original 
first directory (if processing from two directories) or within the the first 
directory (if processing from that alone.)

It will save 5 sets of settings/arguments for the mkvmerge binary but comes 
with three of them already set.

1. The first will simply remux the supplied files into a "mkv" container.

2. The second will take subtitles from one mkv file and transfer to another.

3. The third will take an srt file and mux it into the mkv file.

This has been made on a Mac but I think the filepaths etc should work on Win or 
Linux.

If you wish to make a standalone (I have) you will need to make a splash stack 
and then call this stack as I save all the settings as custom properties in 
this stack.

Of course, this stack requires the mkvMerge binary to run.

The simplest way to get this is to download the mkvToolnix app from the site:

https://mkvtoolnix.download/index.html

This stack was saved using LC9DP10


Enjoy

James






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


SOLVED Re: HELP - Script debugger out of sync

2017-10-21 Thread James Hale via use-livecode
After i sent my post I wondered if perhaps there were unseen gremlins in the 
script.

I copied it out and pasted into BBEDIT and  "Zap(ped) gremlins" (one of my 
favourite BBEDT commands).

Pasted the zapped script back into LC and everything was back in sync.

How I ended up with some unseen characters in the script I do not know but they 
are gone now and all is well.

Sorry for the disturbance.


James





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


HELP - Script debugger out of sync

2017-10-21 Thread James Hale via use-livecode
I have been modifying one of my utility apps and have hit a strange glitch.

While trying to debug the script I find the visual feedback of where I am in 
the script to be out of sync by, it appears, 4 lines.

For those interested in how this looks I have uploaded a video of same.

http://www.thehales.id.au/samples/lag%20debug.mkv 


For those not wanting to watch the symptoms are...

1. enter the debug mode of the script editor.
2. step into the handler
3. actually shown at the end of the handler (or more correctly 4 lines in)
4. stepping through script into other handlers I remain 4 lines out of sync 
with what is actually displayed.

I have now tried this in LC versions 8.16, 8.17, 8.20, 9dp9

All do the same thing.

I have deleted the preference files

They still do the same thing.

AURGH!!!

what is going on?

James




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


LiveCode documentation set now available for Dash compatible readers

2017-10-03 Thread James Hale via use-livecode
There is now a documentation set (currently at LC 9 dp 9) available in the 
"user-contribution" category for Dash compatible readers.

The set includes all the Guides and the dictionary (API) entries.
Also included in this version are summary listing of all associated entries 
under their respective libraries. so, type in "clock", select the 
"com.livecode.widget.clock" entry and you will see the two properties 
associated with this widget.

I will maintain the set against the LC 9 releases. Depending on your 
preferences this should auto update your copy as I update the the repository.

To install:
Simply go to the docset downloading section within your app's prefs and select 
"user-contributions" -> LiveCode
(Apologies to non Mac readers, you will need to check your apps instructions.)

Roll your own:
For those wishing to make their own documentation set, the "Make Docset" stack 
(available on LiveCodeShare) has been updated to version 2.0

• Complete reworking of extraction and formatting code. Now works directly on 
dictionary array
• All library and Widget entries now include a summary list of associated 
dictionary entries
• All Datagrid entries summarised under "Datagrid"
* Removed links in descriptions where multiple entries were possible and 
correct one was ambiguous. 


Dash compatible Readers:
- MacOS and iOS Dash 
- Windows: Velocity <‪http://velocity.silverlakesoftware.com/>
- Linux (and Windows): Zeal <‪http://zealdocs.org/>- 
Android: LovelyDocs <‪https://apkmonk.com/app/com.lovelyhq.android.lovelydocs/>

Plugins: 
The Mac, Windows and Linux readers all support various plugins to enable you to 
access the documentation set from other programs.
Some of those supported include: Atom, Sublime Text, BBedit, Text Wrangler, 
Emacs, VIM etc. Check the particular reader's web site for details.

Enjoy!

James






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

FMaker is a utility stack to make folders/directories.

2017-09-27 Thread James Hale via use-livecode
Just uploaded to "sample stacks" (button on toolbar in IDE or 


 FMaker is a utility stack to make folders/directories.

It will take a list of files from a directory (or a text file) and create 
folders with the same names as are in the list.

Once loaded:
• the list can be edited within the stack,
• the list entries can have text removed or replaced
* GREP can be used
• if the list comes from a directory listing the files can be moved into the 
  newly created folders.
• it uses a couple of SVG widgets so hopefully you will see them.

I actually use it as a standalone on my Mac.

Origin.
I handle quite a few media files which, after processing, need to be placed in 
a folder having the same (or similar) name.
Given I do this a lot this was definately a task that could be automated in 
some way.

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

Update to Dash "docset" creator stack

2017-09-26 Thread James Hale via use-livecode
I have just updated the Make DocSet stack to version 1.8

This adds:
• Script colorization in the Syntax and Example sections.
• Tidied up some formatting.
• Links to terms and other entries now limited to Summary, Changes, Description 
and Related sections
James
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Dash "Make DocSet" stack version 1.6. and non-Mac Dash readers

2017-09-18 Thread James Hale via use-livecode
The Dash "Make DocSet" stack has been updated to version 1.6. 

See the details below. Hopefully this will be the final update, although I see 
Monte has been modifying some doc formats. See below.

I have also noticed that Dash like readers exist on other platforms. Some paid 
for, some free. Given I do not have these platforms I can't report on how good 
they are, or not.

Windows: 
Velocity  

Linux (and Windows): 
Zeal   

Android: 
LovelyDocs


Version 1.6
• Reworked formatting scripts to to handle Description block as well as 
description blocks in Parameter and Value sections.
• Description blocks now handle correctly formatted code snippets.
• Description blocks now format lists (up to 2 levels) correctly.
• Reworked Examples section formatting to correctly group blocks of code.
• Added "Tags" values

Doc updates and formatting.
Those of you who have looked at the documentation files on GitHub may have 
noticed a certain lack of consistency in how they are formatted. Indeed when I 
put together the Data Grid guide I was at a loss as to how some things needed 
to be formatted as although they are mainly markdown they aren't completely.
Looking at the non doc files (xxx.ldoc) as well as the self generating aspects 
of widget docs and you can appreciate parsing these files is not always simple.
The work done on "LiveCode Documentation Format Reference" has really been a 
great help here.
However there are still many files that will need tweaking along the way.
Consequently the appearance of a document in Dash (or compatible reader) is 
very much dependant on the original source adhering to what is now understood 
re formatting. Of course this goes for my understanding of the formatting too 
:-)
Should there be any major changes I will endeavour to incorporate them in an 
update to "Make DocSet"


James






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

Version 1.4 of Dash DocSet creator posted

2017-09-14 Thread James Hale via use-livecode
Version 1.4
• format for description section now correct.
* correct keyword lookup where multiple exists works again.
  Note - dependent on a type being included in text as in 
* Logo copyright info added.

I think I have finally covered all the holes.
Please let me know if you find either a link not working or text missing.
Given there are still errors in the actual source documents it may not be 
something that can be addressed by the stack.

The next version of Dash should also include all the missing entry types for 
the LiveCode docs.

control_structure
expression
glossary
handler
iterator
message
widget

Currently these all seem to be dumped under "Statements"

James





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

New "Make Docset" stack uploaded

2017-09-13 Thread James Hale via use-livecode
Uploaded a new revision to "Make DocSet"

Any users should download the new version and remake your docset.
Please remember to delete the old docset from the list of docsets in the 
preferences of Dash before loading the new one.

Version 1.2

Note: Currently Dash does not recognise "glossary" nor "Control Structure" as 
an entry type.
These entries are currently shown under the "Variables" entry in Dash.
I have written to ask these types be included.

• Bug fix on dictionary links appearing in description texts.

• Adjusted filenaming convention to correctly handle $ & [ and other characters 
that require encoding but that does not interfere with hrefs.

• Special case for <>,<,>,<=,>= in sqlite index

• Modified interface, added release notes, moved plist and css to own pages

• Add ability to set location of docset

• Now deletes any previous docsets

* Progress indication.

• Really correctly corrected embarassing typo!




James





___
use-livecode mailing list
use-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: Livecode docset for Dash

2017-09-12 Thread James Hale via use-livecode
New version of "Make DocSet" uploaded.

Changes in version 1.1

• LC icon added.
• Table of contents added for Guides. 
  They will appear in the left pane when viewing a guide.

James




___
use-livecode mailing list
use-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: Livecode docset for Dash

2017-09-11 Thread James Hale via use-livecode
Hi Bob,

Actually I might mean macro.
I had entered a snippet called "sw" which was a three case switch template.

While coding the stack I went to type "Answer" but couldn't get past "Answ" 
before the switch statement was inserted.
I hadn't realized Dash would pick this up and act on it.

My main reason for doing this was to get a copy of the documentation (mainly 
the dictionary) on to my iPad as I often want to look something up, especially 
if reading the list or forum. The online API doesn't function on touch devices 
and this just works.

Of course the added bonus is the access to all the other doc sets.

It came in quite handy as I need to look up both HTML and CSS while coding the 
conversions to html.

James

> Bob Sneidar via use-livecode 
> 
>  Mon, 11 Sep 2017 10:06:22 -0700 
> 
> Thanks James that sounds useful, if by snippet you mean common code snippets. 
> I'll give that a look see. 

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


Livecode docset for Dash

2017-09-11 Thread James Hale via use-livecode
I have just uploaded a stack "Make DocSet" to revonline that creates a 
"LiveCode.docset" for use in the documentation/snippet manager Dash
https://kapeli.com/dash 

>From the revOnline entry:

"Dash" is a documentation and snippet manager for MacOs and iOS.

The MacOS version of Dash is a paid for app.

The iOS version of Dash is FREE!

This stack was made using LC 8.

"Make DocSet" will extract all the guides, images and all the dictionary 
entries in the IDE and format them intto "html".

It will then construct a docset package on your desktop with all the html 
files, images and SQlite index required by Dash.

To install into Dash (assuming you have a copy) just double click.

to install on yout iOS device, trnasfer the file via iTunes to the Dash app.

As the docs are updated in each release of LiveCode you can use the stack 
regenerate the docset, should you wish, to ensure your copy is up to date.



You can try out Dash and see if it is helpful.
It can access/download over 150 documentation sets.


James







___
use-livecode mailing list
use-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: Correct img format for browser widget.

2017-07-16 Thread James Hale via use-livecode
Thank you so much Hermann and Jonathan

It took me a little time but I worked out what to do after looking at your 
suggestions.

The fact that setting the htmltext of the browser widget breaks the img URL's 
makes sense from a security and logical point of view.

I then tried Jonathan's technique of using the image data. 
This worked a treat but for some files was quite slow on my larger files.
e.g. one html had 200 images. It took some 20 secs for the browser to load.

So I thought I would try Hermann's later suggesting of just saving the file as 
an html and setting the URL of the browser to it.
The conversion from markdown left the img tags in the correct format for a 
browser to locate the files.

After finding Trevor's function for correctly URL encoding the file name I was 
able to successfully load the files into the browser widget and display the 
images.
The 200 image file loaded in less than a second which was good.

The final issue was the varying width of the images.
I simply loaded an array keyed on the file names with a single value, image 
width.
I didn't want any widths greater than 800 pixels so a simply if statement set 
all widths > 800 to 800
Then a simple replace loop using the image size array "gimagescale"...
repeat for each key ikey in gimagescale

 replace ikey&" " with ikey&" width = 
"[ikey] in nfile

end repeat

and the img tags were in a format I wanted.

Loading into the browser widget was fast and the images all fitted in the 
browser's width.

Setting the htmltext of a field was my first choice. But the html of the 
converted markdown docs was more than LC's htmltext function could handle.
And to be honest, the browser's rendering looked better.
Had the html been simpler, using a field would have been just as fast.

Anyway, my issue is resolved.

Thank you both again for your help.

James






___
use-livecode mailing list
use-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: Correct img format for browser widget.

2017-07-15 Thread James Hale via use-livecode
hh wrote:

> ... Or in case you meant simple HTML load (not canvas2d):
> 
> 
> where src = "full http-path to image" (local server is running)
> or src = "relative path to image"

Actually I am not loading a file from a server, I am setting the htmltext of 
the widget.

The file I am loading is actually a markdown which I convert to xhtml using 
mergMarkdownToXHTML.
I then set the htmltext of the widget to this converted content.
Now the text etc all display fine as I would expect, however the images don't.
The image tags in the markdown are correctly converted to  but 
obviously the path to the image file is not being correctly interpreted by LC.
If I was to display this in a text field (by setting its htmltext) I would need 
to change the img tag's src attribute to include the "binfile:/" prefix.
When I do this the image displays as expected in the text field.

However, this displays the images at the size they exist on disk.

I notice the dictionary (which is using the browser widget) does not do this. 
It actually scales the images down where required.
So I thought rather than set the htmltext of the field, let me set the htmltext 
of a browser widget.
However none of the forms of the URL for the images that I have tried work.
I do not know javascript and while I can sort of follow the logic behind the 
guide display in the dictionary I can't fathom how it actually works.
It is taking the markdown, converting it the a form of html and it correctly 
shows the text and the images.
I am trying to do this without the javascript.


James





___
use-livecode mailing list
use-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: Widget course

2017-07-10 Thread James Hale via use-livecode
OK, looked at actual widgets and see they have metadata items so I added these 
and the error disappeared.

1. Seems the minimum requirements for the Extension Builder have changed since 
the course first written

(BTW I am using 8.1.5, when I tried in 9dp7 there were even more errors.)

Full of confidence I click the "install" button.
I am duly asked for icons and click cancel on each request.
Log entries seem to have a stutter (repeat everything) but not actual errors 
reported.
open message box and type "put the loadedextensions"
scroll through the list - nada
magically type "put sayhello()" in message box to be greeted by error.
seems LC knows nothing of my library.
Check my "Extensions
"folder and it is there so am at a loss.
Quit LC and reopen.
open message box and type "put the loadedextensions" - success
type "put sayhello()" in message box - success

2. It seems you need to quit and relaunch LC after installing a library. Not 
the best.


James

ja...@thehales.id.au

Tel: +61 3 9386 2516
Fax: +61 3 9386 1387




___
use-livecode mailing list
use-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: GLX apps and 8.15

2017-06-26 Thread James Hale via use-livecode
Hi Monte,

Thank you so much for that quick response and solution.

I modified the frontscript mainly because my knowledge of GLX's inner workings 
is limited.

Down the track I might venture into the window management routines (to see if I 
really need them) or even consider moving to Levure, although that might be a 
too big ask.

However would it be possible to spell out in a bit more detail why the 
mentioned pull request blew this up?

I would really like to know.


James




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


Porridge (was Re: English Like?)

2017-05-24 Thread James Hale via use-livecode
Richard wrote:
> For those who like salt in their porridge there's LiveCode, and for 
> those who prefer sugar, or syrup, or prunes in their porridge
> there are other puddings on offer.

I actually like both. Couldn't imagine not putting salt in the porridge. Then 
once it is cooked, add sugar and usually sultanas (occasionally a banana.)
Of course I am speaking of rolled oat porridge and made using full cream milk.
(Yes, I like it rich, creamy and sweet.)

Delicious 

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


Printed dictionary (was Re: send mouseup to control)

2017-05-24 Thread James Hale via use-livecode
In following them discussion on execution contexts Richard wrote:
> The executionContexts is documented, though in all fairness that Dict 
> entry includes a note about not relying on the format of its contents. 


Normally I would moan to myself about how I would like to look that up but as I 
am reading this email (and nearly all others) on my iPad I cannot use the 
online dictionary as it can't handle a touch interface (the mothership is aware 
that they do have a non mobile friendly resource for a mobile capable product).

But this morning the printed dictionary arrived! 

So I looked up executionContexts

Where I read...
'' A common use of the executionContexts is to obtain the name of the object 
and handler that called the current handler, this information is available as 
line -2 of the executionContexts."

BTW there was no mention of any caveats in using this property.

James

___
use-livecode mailing list
use-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: Writing Extensions

2017-05-16 Thread James Hale via use-livecode
This is why the LiveCode Infinity project had such attraction to me. 

There were to be fully documented examples.

Oh well.

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


\"System\" font on Mac - diff between LC 8 and LC 9??

2017-04-12 Thread James Hale via use-livecode
So, in LC8 changes were made to the UI font themes and the System font was one 
new addition.
According to the dictionary...
 
 The list of font names includes a set of special-purpose names which
automatically select the matching font for the platform. You can use 
these to request "the font used for buttons" without having to hard-code
platform-specific font names. These fonts are:
- (Text) - the font used for fields and other controls with editable content
- (Menu) - the font used for menu items
- (Message) - the font used for buttons, labels and other communication from 
the app
- (Styled Text) - the font used by default for rich text
- (System) - the font for controls not covered by another category
- (Tooltip) - the font used for displaying tooltips
- (Default) - selects one of the UI fonts automatically based on the control 
type

Given what I am seeing is on the latest MacOS and there seems to be a 
difference between LC8 and LC9 it would seem that as the underlying OS is the 
same LC9 is picking a different font for "System" than LC8.

Judging by f/b this only occurs for MacOS 10.11 or later.

Perhaps LC9 is picking a different font than LC8 which only becomes apparent in 
these later OS's
Perhaps LC9 has a bug and is falling back on some other mechanism to allocate 
the actual font to the "System".

It would probably be good to know, one way or the other in case it reverts or 
breaks again with the next OS release.





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


\"System\" font on Mac - diff between LC 8 and LC 9?

2017-04-11 Thread James Hale via use-livecode
Hmm.
Seems this has been sort of noted but no mention is made of the fix.
http://quality.livecode.com/show_bug.cgi?id=17344
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


"System" font on Mac - diff between LC 8 and LC 9??

2017-04-11 Thread James Hale via use-livecode
Could other with a Mac please give this a go to see if my observation is local 
to my machine alone?

Create a new stack in LC8 and place a field.
Open the message box and enter...
 set the htmltext of fld 1 to "this is bold and this is 
italic"

You should see 
  this is bold and this is italic
(assuming the styles survive the emailing)
Now open the PI for the field and click on the FONT tab.
I think by default the font is called "Text" and it is one of the Lc named 
options.
Now change the font to "system".

Do the styles remain visible in the field?

Repeat the above with LC 9

For me...
With LC8 the styles disappear.
With LC9 they don't.



James




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


DPReleases I have missed (was Re: tsNet docs?)

2017-04-04 Thread James Hale via use-livecode
Richard wrote:
>I'm running LC v9dp76 Indy on Ubuntu 14.04.

And I am only on dp6.

James


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


SVG for HTML5 on Mac

2017-03-30 Thread James Hale via use-livecode
macSVG is a MIT-licensed  
open-source macOS application for designing and editing Scalable Vector 
Graphics (SVG) content for HTML5  web 
pages, mobile apps, animation design, and general graphics usage.


very nice.

http://macsvg.org 


James


___
use-livecode mailing list
use-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: iOS SDK Question

2017-03-25 Thread James Hale via use-livecode
The other way to be sure about your particular case is to visit your account 
page on the LiveCode site. The login link is in the upper right of the page.

When I visit mine I see all my licenses and can tell from the version pop-up 
associated with each one what is actually licensed.

I have 4

>From the oldest to the newest they go:
LiveCode Personal- the pop up shows 4.6.4 and the deployment tab indicates it 
is for iOS 
LiveCode Commercial - the pop up shows 5.5.5 and the deployment tab indicates 
three platforms (Mac Windows and Linux) versions 4.5.x to 5.5.x
LiveCode Commercial - the pop up shows 8.1.3 down to 6.1.0 and the deployment 
tab shows 7 platforms valid for all versions. This is a perpetual license from 
the kickstarter.
LiveCode Business - the pop up shows 8.1.3 down to 6.1.0 and the deployment tab 
shows 6 platforms valid as follows: valid for all versions while your 
subscription remains active.
So, while I have a perpetual commercial license my business license needs to be 
renewed annually. This means if I do not renew it I can no longer use, 
maintain, develop or release using the business edition.

If you examine what you have listed under your account page on the LiveCode 
site you will be able to answer you questions.

___
use-livecode mailing list
use-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: iOS SDK Question

2017-03-25 Thread James Hale via use-livecode
On the "pricing" page of the Livecode site, towards the bottom, there is an FAQ.
The first question there is indeed what you are asking.
The answer given is:
"To build closed source apps you must have a valid current Indy, Business or 
other commercial license. If you do not renew this license your access to 
LiveCode will revert to the Open Source edition and you will no longer be able 
to build closed source apps."

Fairly clear.

James

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


nabble babble

2017-03-23 Thread James Hale via use-livecode
With the change in how nabble reports posts to the list I have now gone across 
to google's archive.
https://www.mail-archive.com/use-livecode@lists.runrev.com/
Seems just as functional and clearly shows who posted what.
To submit to the list I still prefer to use my mail client.
To search the lists I prefer to do so locally. I download the monthly archives 
and import them into Eaglefiler (I am on a Mac). 
It provides very good searching functionality and a clear listing of hits etc.

James
___
use-livecode mailing list
use-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: OSX module file error when building standalone with LC 8 on mac

2017-03-17 Thread James Hale via use-livecode
Solved.

I had included an LC9 only widget in my stack. It obviously was not there in 
LC8 when I went to compile.
So it seems...

"There was an error while saving the
> standalone application
> Build failed for MacOSX x86-32: could not
> open module file"

is telling me the widget module was no where to be found (among the LC8 
resources.) 

I must have made the original stack in LC9 and forgot :-(


@Bob Thanks for your suggestions. I had actually tried them all.


James





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


OSX module file error when building standalone with LC 8 on mac

2017-03-14 Thread James Hale via use-livecode
I just went to recompile a little utility I have and came across this error.

The stack is simple and just gets the user to select file(s) or a folder or a 
text list to create folders somewhere else.

I had compiled a standalone before but now am unable to with LC8.

It gets all the way to building MacOS components and then...

"There was an error while saving the
standalone application
Build failed for MacOSX x86-32: could not
open module file"

I originally was compiling 64 bit, then I tried both, then just 32 bit.
Same error in each case.

Has anyone else experienced this?
Does anyone know what it means?

Tried with 
8.1.3 indy and business
8.1.0 Indy

Then tried with a couple of the 9DPs
These all worked!

So it seems to be only with the LC 8s that I have.

James


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


Nightly builds

2017-03-09 Thread James Hale via use-livecode
I just noticed one of the benefits to membership of the open source community 
is access to nightly builds.

Can anyone tell me how this is possible?
Is it only for the community version?
Is there a link or is one expected to make the build oneself?
Or is this just smoke and mirrors?

James

___
use-livecode mailing list
use-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: Download LC Community: trapped.

2017-03-09 Thread James Hale via use-livecode
Richard wrote:
> Most SEO brings people to the .com site, so those on the .org site are 
> the subset who specifically went there to get the open source edition of 
> LiveCode.  The conversion rate there is understandably much lower than 
> on the .com site.
> 
> After all, someone at the .com site is there to look for a proprietary 
> product.  Their interests are very different from the subset who move on 
> to .org.  The visitors at .com expect that if they like what they see in 
> LiveCode they'll pay.  They're predisposed to conversion.

I still don't understand why this distinction was made.
Although my professional buying was in the tertiary sector I always went to  a 
.com sites unless it didn't exist. Many of the solutions we investigated over 
the years were both open source and no cost to education as well as proprietary 
for commercial use (which may include education depending on the context of 
usage.) None that I can remember had two websites. Indeed it was always of 
value to be able to directly compare the no-cost to cost versions to see if the 
propriety offer was more suitable.
This is no longer possible on the LC .com site. It used to be.
The last time I looked at the .org site it was very much a poor cousin to the 
.com site.
None of the resource pages were to be seen, just a list of the community 
communication channels.

The membership option is new. (Well recycled) and a great idea.
Although I did notice one component being access to nightly builds.
!!!
Is this true?

James

___
use-livecode mailing list
use-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: MacOS Sierra - Tab Bar showing in Stack and IDE windows?

2017-02-20 Thread James Hale via use-livecode
Check you Dock preferences.

When Sierra came out I too was looking forward to this feature having gotten 
use to tabs in other apps. 
One app I use quite a lot is Nisus and having tabbed windows rather than 
multiple windows was going to be a real plus, or so i thought.
Sadly tabbed windows was not present and so I wrote to their support asking if 
it would be.
They said they would add the request for a possible future update but also 
added

> One tip: apparently you can adjust how Sierra's tabs behave in all 
> application, including Nisus Writer, in your system Dock preferences. You can 
> change the setting for "Prefer tabs when opening documents" so tabs are more 
> often retained. This doesn't cover all your requests, but might help you 
> improve your workflow.

And so I did, setting it to "Always" and voila, tabbed windows.
A few days later I opened LC and was dismayed to see exactly what you have 
described.
I played around with different windows etc but quickly realised that having all 
new docs open in a tabbed window was not something LC liked.

I turned this "dock" preference to "In Full Screen Only" and have not had the 
issue return (I do not use fullscreen mode for LC)

So perhaps your Dock settings and the way you are using LC are triggering this 
feature of Sierra.

James

ja...@thehales.id.au

Tel: +61 3 9386 2516
Fax: +61 3 9386 1387




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


OT - video compression HEVC woo cool!

2017-02-14 Thread James Hale via use-livecode
Recently in a discussion on the data grid someone mentioned Trevor's DG 
presentations at runrev09. Grabbing my revLive09 disks I loaded up the relevant 
DVD.
However I am not a great fan of DVDs these days and thought I would copy onto 
my hard disk. I also am not that keen on the Mac DVD player so I thought I 
would rip and compress. The DVD was single sided so took about 4.3GB.
I decided to use Handbrake which I had recently modified to use the 10 bit x265 
(HEVC) libraries. I processed the three presentations on the disk and ended up 
with three files totaling 480MB. The settings I used were not very aggressive 
as I used my std settings for bd's. I know x265 is good. I also know x264 would 
have done a passable job but not of the same order.
In short, if you have a need to compress/convert video to h264 I would consider 
trying h265. Of course it depends on your use but it really is impressive.
Btw I use the 10bit versions of the binaries as they seem to offer a better 
looking image at the same settings as 8bit compressions even when the source is 
8bit.
For those on the Mac, "iffMpeg" is a really nice interface for FFMPEG. One of 
the sites providing precompiled Mac binaries of FFMPEG consented to compiling a 
10 bit x264/265 binary as well. So either handbrake (free) or iffmpeg (not 
free) are really great choices to get great compression with little loss of 
quality.

James

BTW re the quality. The files I rip to place as back ups on my server I view on 
a 55" HD screen. Trust me, I would know if the x265s were not as good as an 
x264 version. The size reduction x264->x265 is one quarter to one third. E.g 
x264 at 3.7GB -> x265 910bit) at 800MB I have yet to pick a difference 
visually. You can of course compress more aggressively but then you would 
notice.

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


Subject: Re: Subject - LiveCode - I'm not a very happy Bunny

2017-01-04 Thread James Hale
Richmond wrote:
> What this message should tell the people on the mother-ship is that they 
> need to shout a bit louder about the Open Source version, instead of having a 
> green button "buried"  at the bottom of a scroll-down on the title page.

+1

In fact a green button that takes you to a site with no resources (docs, 
lessons, tunes) or comparison to licensed versions. One of the silliest ideas 
they have come up with.





___
use-livecode mailing list
use-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 9 has all the improvements of the LC 8.1 series, yes?

2016-11-29 Thread James Hale
Thanks Panos.
I thought that the case but just wanted to be sure.

James

___
use-livecode mailing list
use-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 9 has all the improvements of the LC 8.1 series, yes?

2016-11-29 Thread James Hale
Just want to confirm that all the LC 9 releases contain the bug fixes and 
improvements that are in the current LC 8.x rc series.

Peter or Ali or anyone?

James

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


Subject: Re: Subject: Re: What speed advantage comes from a private handler?

2016-11-09 Thread James Hale
> 
> Oh! I thought private handlers were ones only accessible by handlers in the 
> same script

They are. Perhaps my expression was clumsy. 

James

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


Subject: Re: What speed advantage comes from a private handler?

2016-11-09 Thread James Hale
Monte wrote:
> Private handlers are called directly rather than giving all the frontscripts 
> a chance to handle them.

Thanks Monte,

The send and despatch restrictions do not apply in the cases I am considering.
These are support handlers and functions outside the main handler within a 
script library. 

James

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


What speed advantage comes from a private handler?

2016-11-08 Thread James Hale
In a reply to a post on loop speed Mark made this aside...
> the aData array (also making sure explodeRow is private will help too)
Can someone explain why making a handler private speeds up a script?
Should I be making more of my handlers private?

Really intrigued. 

James

___
use-livecode mailing list
use-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: Searching text external to Livecode

2016-08-19 Thread James Hale
 Richard asked
> Maybe the simplest solution for somewhat large collections would be the 
> free-text indexing built into SQLite. Anyone here know if we have a 
> means of using that from within LC?


Yes and no.
The Full text search extension to SQLite is indeed in the current compilation 
and is really very good. Index creation doesn't take much time and the actual 
searching very very fast. 
Unfortunately there was mention of Chinese.
While SQLite itself is Unicode compliant the FTS4 module isn't unless the 
binary is compiled with the Unicode library. It isn't. This is not on the 
immediate horizon. The way things currently are, it would entail adding, in 
effect a second Unicode library. There was some discussion on the possibility 
of exposing the already included Unicode library (so as to make it available to 
SQLite) but this is not at all a priority.
I
James




___
use-livecode mailing list
use-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: Customize Tree Lists/Indexes

2016-07-31 Thread James Hale
The web address for rTree is http://tapirsoft.on-rev.com/rtree/

It does work in LC 8 although I think there was one or two changes made.

I contacted Mats last year to get the modified version.

Think it was on mats.wilstr...@tapirsoft.com

James

___
use-livecode mailing list
use-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: Re: (Re: Apply an SVG Widget as a single object in a st....)

2016-06-19 Thread James Hale
Firstly sorry about the subject less post and secondly for my double post 
(seeing I didn't see my first post due to it having no subject. Phew!)

Anyway, rjd318 asked...

> Ah! What's the library stack that does the svg path conversion?


The latest version is included on the last post to this thread.

http://forums.livecode.com/phpBB2/viewtopic.php?f=8=27202

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


[no subject]

2016-06-19 Thread James Hale
My app had some 20 or so buttons, each with a carefully drawn and saved png (in 
multiple sizes) that sorted of looked ok in LC7.
Once I moved over to LC8 I immediately went looking for svg icons, modifying 
them or making my own. Extracted the path (really not that difficult, there is 
even a library stack now that will do it for you) and replaced all my png'd 
buttons with SVG widgets.
The widgets, quite happily respond to the mouseup handlers and now I have 
really nice looking icons that respond to user interaction and will look great 
no matter what the screen resolution of the device they are being shown on.
Sure they are monochrome, but I actually prefer them that way.
I will take monochrome clarity over a colored blur any day ;-)

James

Richard, in replying to...
> Sannyasin Brahmanathaswami who wrote:
> 
>> With images we can import a raster "object" and then set the icon
>> of a button to that image.
>> 
>> Wouldn't it be nice to be able to do the same with a SVG file?
> 
> We can't?
> 
> What's the point of an SGV Icon object if it can't be used as an icon?
___
use-livecode mailing list
use-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: Another way of approaching LC8

2016-06-09 Thread James Hale
I concur with all the previous posters on this.
Just jump in.
I have been working slowly on an app since V6.
Hey, I'm retired and this is something I do to amuse myself.
Anyway, I have continued developing this app, adding bits and pieces to it 
through all of lc6 and lc7. I would occasionally open it in one of the lc8dp's 
to see how things were going but never really moved over to lc8 until dp16.
This is not because of issues with the engine, more bugs in the IDE that got in 
my way.
Indeed, it took about a dozen DP releases before I could get past the first 
screen of my app.
Anyway, each time I tried I would find a bug here or there, submit a report and 
then go back to lc7 until the next dp.
Since dp16 I have been satisfied that most of the issues have been sorted.
This has enabled me to begin to take advantage of lc8 only features such as 
widgets. In fact the SVG widget being my favorite thus far as it has allowed me 
to replace all my png graphics I had been using for button icons with nice 
clean scalable ones.
In the process I have also been able to find a few bugs in the widget and get 
them repaired.
This is probably the most rewarding aspect of using 8, being able to help with 
ironing out remaining problems.
Well that plus knowing my app is using the best LC has to offer.
There are still some issues that need addressing but there will always be 
something won't there.

Just grab one of your current apps that you have a fondness for, open it in 8 
and start going though it. As Richard said, you will learn what you need to 
learn, as you need it. That's part of the fun, isn't it?

James

___
use-livecode mailing list
use-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: Confusion over builds.

2016-05-24 Thread James Hale
Hi Richmond,
Sorry about the confusion, Peter was very quick to remove the entries I had 
referred to.

As for leaving things, you are a bit confused. The versions I referred to were 
in fact "milestones" on GitHub. I was making no comment at all on the download 
page only the  work in progress pages of GitHub.

However Peter's post offered a complete picture of how they are trying to 
manage these items and clarified, somewhat, my concerns and questions.

James

> I honestly don't know what you are talking about. Here:
> 
> http://downloads.livecode.com/livecode/
> 
> I can see 8.0.1 STABLE  and 8.1.0 RC1
> 
> So, there is no "8.0.2" and no "8.10"
> 
> Over in GitHub things are, by the nature of GitHub, likely to be 
> somewhat more confusing.
> 
> This is one of the main reasons when I want to find out the way the 
> numbering of Livecode
> releases is going I stick to the download page.
> 
> Certainly, I can see that one could, carelessly, mistake "8.1.0" for 
> "8.10", but, then, things are always
> worth a second look.
> 
> "start with removing those builds that are actually released"
> 
> No, let's NOT, and let's use them as the road-map, and not the others: 
> otherwise we'd still all
> be sitting around waiting for Hypercard 3.0.

___
use-livecode mailing list
use-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: Confusion over builds.

2016-05-24 Thread James Hale
Thanks for the explanation Peter.

James

___
use-livecode mailing list
use-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: Confusion over builds.

2016-05-24 Thread James Hale
Well someone was quick.

;-)

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


Confusion over builds.

2016-05-24 Thread James Hale
Now that 8 is out,things on GitHub should be simpler, right?
No, not really.
We still have 8.01rc1 sitting there.
We have 802rc1 sitting there.
8.10dp1 AND 8.10dp2 AND 8.10 future?

While I really like the action happening I wish we could collapse things a bit 
and get the different branches consistent.
For instance let's start with removing those builds that are actually released.

That would leave us with 8.02rc1, 8.1dp2 and 8.10 future (whatever this is 
supposed to mean).

Then could be get some guidance as to whether 8.1 contains the fixes in 8.02 or 
not.
In other words, if 8.02 fixes something we wanted fixed but we also want to 
test against 8.1, can we count on not having worry about a missing fix?

Which gets me to my main hope. Could we perhaps release the rc' a bit more 
frequently? I mean there was only one rc for 8.01 and now we are already almost 
up to 8.02rc1 but before it was released we get an 8.1dp1.
Can't you move the unfinished bits of 8.02rc1 into a future 8.02rc2 and get 
8.02rc1 out?
Will there be an 8.02rc2 or will you jump to 8.03rc1? Sort makes the 'rc' 
labels superfluous. 

James

___
use-livecode mailing list
use-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: Matchchunk and the variables list

2016-05-07 Thread James Hale
Thanks Mark.

Missed the parentheses in the notes.

James

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


Matchchunk and the variables list

2016-05-06 Thread James Hale
When I try this 

  put "hello there" into tstring 
   put "llo" into tfind 
   put 0 into ss 
   put 0 into se 
   if matchchunk(tstring,tfind,ss,se) then 
  put tstring 
   end if 


I expect to get... 
   hello there 
   3 
   5 

Whereas I get 
   hello there 

The matchchunk expression worked (I got to the put statement) but the variable 
list was ignored. 

What am I missing (apart from the start and end variables) 

James 

P.S. Posting via the babble interface seems to have a gotcha in that if you do 
not paste to the sub-forum the post doesn't seem to get to the list.

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


VLC and GPL and LC on iOS (was: Re: MergEXT now included with Indy/Business IDE)

2016-05-04 Thread James Hale
In the referenced thread Monte mentioned something about fmpeg and it 
associated libraries and licensing.
Today I was notified of an update the VLC and remembered how that is now 
available on the App Store.
Looking at Videolan's site, VLC is GPL 2.
How is it that it can be distributed under Apple's terms and conditions and 
still be adhering to its GPL terms and conditions?
Leaving the fact that there is a conflict here the more interesting question to 
me is why didn't Apple stop it. I know they did pull it when it first came out 
for iOS and then a second time but it has been back for a while now. I haven't 
been able to find anything on the Videolan's site to suggest their license has 
changed so what gives?
Is their wiggle room here for LC community apps to get up on the App Store?

James

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


Re: [ANN] Release 8.0.0

2016-05-04 Thread James Hale
Hmm, does this mean that LC6 and LC7 are now eol. (Apart from bug fixes or will 
these also cease)?

James

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


Standalone (and stack in IDE) getting larger on each launch

2016-04-07 Thread James Hale
I have an app that stores the height of the main stack as a custom property. 
This main stack is called from a splash stack in the standalone.
During preopencard I check the property and set the size of the mainstack  
accordingly.
If there is no cp I set it to a default value.
The user can change this and the app will store the new value.
This almost works in that the cp is set and if the size is changed the stack 
does remember there is a change.
However every time it opens it gets bigger by what I think is 22 pixels.
I am on a Mac.
What's weird is that if I check the cp value, it is as expected.
If I check the stack height (in the property inspector,) it is as expected.
It is the bottom of the stack that moves, all controls staying correct in their 
relationship to the top of the window.
Now interestingly, if I use the resizing function to set the height of the 
stack to what I thought it should be, and what the cp and the property 
inspector of the stack (height) tells me it is, the stack shrinks back to what 
it should be and the stack height as displayed in the property inspector 
remains the same!

Can anyone suggest what might be happening?
Given the increase looks suspiciously like the menu at height could this be 
playing a part? I have discounted that as only the bottom of the stack seems to 
move. All controls stay put.

James



___
use-livecode mailing list
use-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: Script Only Stack Architecture

2016-04-01 Thread James Hale
Mark wrote:
> 
> In addition, the Project Browser that I'm usually kicking has a very 
> nice feature in that if there is a behavior object associated with a 
> stack or control you will see that indicated to the left of the script 
> lines, and it also shows the number of lines in the behavior script. 
> Right-click or control-click on that and you can directly edit the 
> behavior script.

Or just double-click (I am on a Mac)
Use it all the time.
Can't remember the last time I have actually gone to my card with the behavior 
buttons.

James

___
use-livecode mailing list
use-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: Script Only Stack Architecture

2016-03-31 Thread James Hale
I fail to see the inclusion of examples of the syntax to a dictionary entry as 
bloat.
I may be one of only a few but I find many of the dictionary entries opaque to 
say the least.
Ali's example of how one would employ a script only stack as a behavior is a 
case in point. It immediately makes employing this method accessible and 
understandable.
It would have also saved a lot of head scratching on the part of the OP as well 
as a lot of divergent discussion, which although helpful in explaining 
behaviors to the uninitiated (thank you Richard), still was,no where near as 
clear as Ali's (corrected) example in answering the original question.

James

___
use-livecode mailing list
use-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: IMG resize advice wanted

2016-03-30 Thread James Hale
 Tom asked

> Nice script! 
The script was present when I previewed the post. Had it between  
tags.
> 
> 1) What method are you using to embed those images in your field? 
The text being displayed was xhtml stripped of everything that wasn't needed as 
it was being displayed in a field using the htmltext property.
So the images were  tags which LC interprets as a CHARACTER 
replacement. Hence my putting a  around the  to ensure the 
image was on a line by itself to ensure I had the full field width for display. 
As it is a character replacement, as far as a field is concerned, the 'fixed 
line height' needs to be false or the height of any image will be whatever line 
height setting the field has.
> 2) For smaller images, are you able to inset them within the text and have
> text wrap around, such as a small picture inset at the start of a paragraph?
> (I've been able to place the image at the start, but not able to get the
> paragraph of text to wrap it.)
Text wrap around is not possible using this method as the image is being 
treated as a character by the field. Indeed I am not aware of any way to have 
this just happen. Text fields in LC do an awful lot of things but not that.  
For the case you mention, a bit like a pictorial drop cap, it could be fudged 
with three fields but it would require you to know the size of the image and 
then split the text into a first line (with image) then the lines to take you 
to the end of the image, displayed in a second field placed appropriately and 
finally the rest of the text in a third field from the bottom of the other two.
Messy. Also would not be able to select text across these lines at the top 
across the fields.
> 

James

___
use-livecode mailing list
use-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: Script Only Stack Architecture

2016-03-30 Thread James Hale
> what is the equivalent of
> 
> set the behavior of tNewGroup to the long id of button "Widget" of card 
> "Behaviors"
> 
> where "the long id of button" points instead to a script only stack?

I think it is simply...
 set the behavior of tNewGroup to stack "myScriptOnlyStack"

If you check some of the IDE scripts in GitHub you should find some examples.




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


Ah, the power of regex - was: using the SHELL function to GREP a body of text

2016-03-21 Thread James Hale
Recently I asked about using the shell function to access back reference 
feature of REGEX that I thought I needed to parse an aspect of HTML/XHTML files.
Given the response I thought about it some more and realised that the 
"matchchunk" function with multiple search expressions could, with the aid of 
some livescript do what I wanted.

In the process I discovered how picky the LC parser is about what you try to 
tell it is REGEX.
I also discovered the wonderful RegEx builder plugin by F Rinaldi.
Rather than type my working regexs into the script editor I found that entering 
them into (NOT PASTING) the RegEx builder plugin allowed me to use it, to 
construct and insert the correctly formed "matchchunk" script snippet.

Buoyed by my success I was then able to construct a sequence of matchchunk 
expressions to reveal anchor text of interest.
So far I have discovered that far from the simple



form I was familiar with, the ePubs I was looking at also used

  -- this required converting from the XHTML form to the 
HTML form.
--??!!

 ('X' being an integer)

There are probably more variants (one text I am using has a ID attribute in 
every tag!) but none so far that are actually being used as actual anchors.

I then wrote a cascading set of 'if then else" statements and was able to use 
various matchunks to correctly expose all the anchors of interest.

While working on this in the early hours of the morning here in Oz, Thierry 
Douez contacted me and offered to have a look at what I wanted saying that 
although parsing a complete HTML file is indeed a fool's errand (my words, not 
his) parsing particular snippets is not.

I sent Thierry details of my requirements and the code I had written.

He sent me back a stack to compare his version.

Thierry was able to collapse my nested matchchunks that relied on multiple 
search expressions within each one to a single matchchunk using a single REGEX 
search expression. It was also 30% faster.
Of particular note, the REGEX used some options which struck me a really useful 
such as allowing spaces in the expression to be ignored (great for not getting 
lost), parenthesizing parts of the expression without them being counted as a 
distinct 'found' string and the ability to operate a broken line (ie has aline 
break in the middle of the desired text string.)

for those interested in the actual REGEX

 "(?msxi) ( < (?: [ap] | h[1-6] )\b  .*? \b (?:id|name)=theTextID   [^>]*  > 
(?: )? )"



James



___
use-livecode mailing list
use-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: leap to future

2016-02-23 Thread James Hale
Soon after HTML5 was released I too remembered Kevin's announcement and 
wondered why I was not seeing HTML5 in my license.
I wrote to support and soon after HTML5 appeared in my license for all LC8's.
So I am not sure what to make of the response from support stating they are 
separate as for me, and I guess quite a few others, they are not.

James
___
use-livecode mailing list
use-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 progress to user during long handler

2016-02-23 Thread James Hale
Ok, so no lockscreens anywhere in the routines being called from start to end.
Guess the problem lies elsewhere.
I put in a few BEEPs at each 'progressive step and they all fired ok but there 
was still no update to the text in my splash stack.
I am using the glx framework and it might be that it is getting in the way.
Frustrating.
___
use-livecode mailing list
use-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 progress to user during long handler

2016-02-23 Thread James Hale
I have a splash stack that loads and calls the main stack before closing.
While the splash is being displayed the preopen handler in my main stack asks 
for a file to locate.
Once located it then loads and processes the file before it takes over.

The processing takes some time and I have been trying to work out a way of 
informing the user of what it taking place.
I have a field on the splash stack which contains info text for the user and I 
would like to change this text as the processing is going on.

I thought I could use something like this...

put "Extracting epub" into mupdate
send "updateme mupdate" to stack "splash"
wait 0 milliseconds with messages

at different places within the processing handler and it would send the text 
off an update the splash stack field. 
(updateme is a handler in the splash stack script which simply enters "mupdate" 
into the field.)

Obviously this doesn't work.

First, can I do what I want?
Second, where am I going wrong?

Any help would be appreciated.


James






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


Accessing handler in LC resource stack

2016-02-07 Thread James Hale
Hi,

I am using the GLX framework with LC7 and have hit a snag.
Its application builder calls a handler in an LC resource stack 
"revStandaloneSettings.rev" which no longer exists.
Looking at the LC package I think it has been replaced by  
"revsaveasstandalone.livecodescript".
How do I address the handler from this script only stack file?
What is its path/syntax required?

James
___
use-livecode mailing list
use-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: Using Imagemagick

2016-02-04 Thread James Hale
IDraw is now called AutoDesk Graphic, http://graphic.com

And yes, it is really quite good.

James

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


Two SQLITE RevBD questions

2015-12-26 Thread James Hale
I am moving my app from LC6 to LC7 (in prep for LC8) and have a couple of 
questions regarding some changes I have made in the way I use SQLITE.

1. Escaping quotes when using binding variables

Originally I was doing the standard INSERT into the DB where I constructed my 
SQL and then used "revExecuteSQL"
   put "INSERT INTO content "& sq_cols & sq_values into tsql
   revExecuteSQL db_conn_id,tsql

Where sq_cols was a string of the columns in the content table and sq_vals was 
a concatenated string of the actual values (each enclosed in quotes).
I also escaped any quotes within these values.

I decided to change this to the binding form where I now placed the values into 
an array and simply bound them to the column names as in...

  put "INSERT INTO content "_cols&" VALUES(:1,:2,:3,:4,:5,:6)" into tsql
  revExecuteSQL db_conn_id,tsql,"varray"

Where "varray" is an array with 6 values.

My question is: Do I need to escape quotes in these values?

2. All text data us UTF8 encoded having been read in from their original source 
via "textDecode(variable,"UTF8") (LC7 version)
The values I store and read into my db will only be read by my app.
Do I need to encode them before storing and then decode them on reading given 
my app is the only access?


James





___
use-livecode mailing list
use-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: SQLite conundrum - Solved

2015-12-16 Thread James Hale
Luckily one cannot see your red face behind an email.

My app keeps master copies of the dbs I use and as a new book is added copies 
the master to the user's folder, renames it and proceeds to populate it.
It has been quite some time since I last read in a book as I have been editing 
the app using my initial book as my raw data.
I had recently made changes to this book and decided to read in the new version.
That is when my problem appeared.
After much testing of my routines I was ready to give up in despair when I 
noticed my master copy of the db was rather large. Some 13mb compared to the 
18k it should have been.
Sure enough, although I had been copying and renaming my master copy, sometime 
in the last 10 months something changed in my code and I had populated the 
master copy instead of the renamed copy.
So when I looked to inspect the changes I had made in the book (yes, numbering 
paragraphs) I couldn't see them because I was looking in the wrong place. I was 
looking at the pre-existing data from the master copy, not the newly added 
stuff.

I still have the problem of populating the master, but at least that is no 
where near as serious as the problem I thought I had.

Something to engage with tomorrow.

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


SQLite conundrum

2015-12-15 Thread James Hale
I have an array of text values (actually book chapters) that I am adding to a 
database.
The text is a mixture of alphabetic and numerals.
For some of it I have line numbers at the beginning of each paragraph.
E.g 
blah blah1. Blah blah more blah.2. Some more blah

After I insert this text into my database the line numbers have been deleted.
If I look at the db record I see...
blah blahBlah blah more blah.Some more blah

Yet other numbers contained within the text are still present.

If I examine the SQL values I pass to the INSERT statement the numbers are 
still present.
 In the text.
They just don't appear in the db!

I thought it might be a general thing  such as a number followed by a period is 
rejected, but I also create some FTS tables which have entries for each of 
these lines. In this case it is without the HTML tags but each line 
(corresponding to a paragraph of text) begins with a number as in...
   1. Blah blah more blah.
And these are correctly stored in the table.

Does anyone have any idea as to what might be deleting the numbers?

James
___
use-livecode mailing list
use-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: Formatting a number with two or more decimal points

2015-11-11 Thread James Hale
You could just use the replace function.

function newnum pnum
   put offset(".",pnum,3) into trem
   if trem = 0 then --only a single decimal
  return pnum
   else
  --we have more than on decimal, remove good number for later
  put char 1 to trem+2 of pnum into newnum
  delete char 1 to trem+2 of pnum
  --fix remaining numbers
  replace "." with " 0." in pnum
  --return the lot
  return newnum 
  end if
end newnum

This assumes the numbers to unpack are less than 100 (i.e. 99.99 is the 
largest).

If not, you would need to adjust the initial conditional to work out if there 
was a compaction.

James





___
use-livecode mailing list
use-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: Tab control-multiple cards or hidden groups?

2015-11-09 Thread James Hale
Thanks you all for your thoughtful replies.

@Paul Yes this is the direction my thinking has been heading. I think when I 
first toyed with this I didn't really find the application browser accessible 
(in a meaningful way to me) and thought multiple groups just too messy. But 
with the Project Browser and use of other plugins (lcStackBrowser and 
flcControlManager, both excellent alternatives) the overwhelming aspect of 
multiple groupings on a single card are no longer there.

@Peter Thanks for the example of the picker to use should I go this way.

@Bill Thankfully I do not have shifting fields between my tabs. Where a field 
is shared (well duplicated at this time) it is located basically in the same 
place. The coding side might take me a bit to get my head around in bringing 
all the individual cards scripts into one. open card handlers will need to be 
rewritten as well as ensuring no clashes in variables that were local within 
the confines of one script now having to share that same domain. I guess the 
upside is that there will be room to economize.

@Mike That is how I originally thought. It just seemed simpler to have multiple 
cards. It is only now after reading the initial thread and realising the 
maintenance of all these seperate cards scripts might not be the optimal 
approach.

@Scott Thankfully my app does not have hundreds of controls. And although they 
do probably number in the dozens the ability to show/hide them by a click in 
the appropriate browser makes that management well, manageable.

I am more convinced this is worth pursuing/exploring.


James




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


Tab control-multiple cards or hidden groups?

2015-11-08 Thread James Hale
Recently there was some discussion concerning the use of hidden groups with the 
tab control. An app I am working on currently uses a tab control with five tabs 
that currently go to different cards. The cards concerned all share a number of 
other controls responsible for about 60% of their area with the tabbed panel 
taking the rest. Some of the panels are simply variations of another (e.g. 
Simple vs complex search).
I am now wondering whether there would be an advantage in reducing these five 
cards down to one and use the hidden group method.
Given I am not starting from scratch my question is, would there be advantages 
to me in making this transition?
So for those of you employing this method, why do you?
Is it having a single card script?
Is it keeping the stack structure simple?
Is it...?
I would be very interested in your thoughts.

James
___
use-livecode mailing list
use-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: Learning Materials

2015-10-09 Thread James Hale
I honestly am not sure what LC are thinking or where they get their marketing 
advice but I am failing to see a positive in this unless you are completely new 
to the platform.
Why? 
Simply because if what has happened with the create-it course is indicative of 
how LC does things one has to be concerned.
As has been mentioned, the create-it course is both incomplete and buggy. Yet 
it was announced with much fanfare and figured prominently on the site. It is 
now even offered to all. Well that is obviously a problem now. 

"Here, you get free access to a buggy incomplete course which will...well get 
you started, but if you really want something good, buy this new improved (but 
untested) course for $75!"

Why would anyone think this new, improved course will be any different?
Talk about parading one's failures.
Wouldn't it have been better to get the create-it course right and perhaps 
offer a more advanced course?
I think anyone who actually paid for the create-it course would be feeling a 
bit p*ssed off.

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


DP6 more strict?

2015-10-04 Thread James Hale
In running some stacks against DP6 I came across a script error on opening one.
The stack in question was simply a copy of a stack I have run without error 
since lc5.5.
The error was well and truly an error.
I had a repeat loop which I inadvertently entered as...
   Repeat for X = 1 to aNumber
 
  End repeat 

I guess it is a hang up from other languages I used in the past and I normally 
catch myself and enter the correct form...

Repeat with X = 1 to aNumber
 
  End repeat 

However this time I didn't.
I hadn't since I first wrote this script way back then.

The point of this post is that not only did I miss this but Livecode missed it 
through every version until LC 8.

Try it out, put the first, incorrect form into a LC7 script and see if it 
compiles.
Now try the same in LC 8 dp6 or dp5

I can't speak for the other DP's as I have only thought to test this stack 
against the current release.

As has been posted some plugins are interfering with the correct function of 
the IDE and I wonder if this "stricter" (well more correct) behavior of the 
script engine in picking up errors is the cause. Perhaps there are quite a few 
scripts with errors that have slipped through in the past but will now stand 
out like the proverbial?

As an aside, I suggest you remove any plugins from your initial play with the 
latest DP, at least until you are happy with the behavior of the IDE just in 
case this new diligence on the part of the engine catches you out.

James



___
use-livecode mailing list
use-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: Text Flow

2015-09-16 Thread James Hale
One way is to have a hidden field the dimensions you want. Put the text into 
this field first and then get the pageranges of this field. It will return a 
list of character ranges, one per line, for each field (of the hidden field's 
size) required.
So the number of lines will tell you how many fields, the character ranges, 
what to put into them.
E.g. (Watch for line wraps)
Put mytext into field "hidden"
Put the pageRanges of field "hidden" into tranges
Put the number of lines of tranges into requiredFields
--put the code to make or display the requisite number of fields here..
--I have assumed fields are called "display1", "display2", etc
   Repeat with fnum = 1 to requiredFields
   Put item 1 of line fnum of tranges into tstart
   Put item 2 of line fnum of tranges into tend
   Put char (tstart) to (tend) of mytext into field ("display")
  Next repeat

James



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


  1   2   >