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: Livecode on iPod

2017-07-16 Thread Mike Kerner via use-livecode
Yes, and good luck deploying to it.

On Sun, Jul 16, 2017 at 3:25 PM, Sannyasin Brahmanathaswami via
use-livecode  wrote:

> UDID
>
> FFF "fake"
>
> ?
>
> But developer.apple.com device portal accepts them…
>
> ??
>
> BR
>
>
>
> On 7/15/17, 4:24 PM, "use-livecode on behalf of Colin Holgate via
> use-livecode"  use-livecode@lists.runrev.com> wrote:
>
> I would bet yes, but UDIDs that start with  are fake.
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
use-livecode mailing list
use-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: Help Testing Small Script Editor Enhancement

2017-07-16 Thread Mark Wieder via use-livecode

On 07/16/2017 03:50 PM, Bob Hall via use-livecode wrote:



On Jul 16, 2017, at 6:01 PM, Mark Wieder via use-livecode 
 wrote:

Well, as I noted, it *does* affect linux, but not in a bad way. Control-tab 
continues to iterate through the tabs as long as the script editor is in front, 
and continues to switch modes when it's not.


That’s a bug that I need to address. I missed the point Mark W. made that 
control-tab cycled through the tabs on Linux. That should not happen with the 
Linux SE. My intent is that only MacOS SE users would have the option.

I’m in the process of getting a Debian system up on a VM to see what’s going 
on. I’ll go through my code and figure out what I need to fix this so it works 
as I intended. Thanks Mark for finding this.


Er... wait... what?... I wasn't reporting a bug.
Everything works the way I thought it would.
Control-tab cycles through tabs with and without the patch, and the 
patch doesn't interfere with switching modes when the script editor 
isn't in the foreground.


--
 Mark Wieder
 ahsoftw...@gmail.com

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

Re: intersect . . . invisible images

2017-07-16 Thread Mark Wieder via use-livecode

On 07/16/2017 05:41 PM, Jeff Reynolds via use-livecode wrote:

I think it's not quark and dryer spins that take away those lost locks but an 
intersection of this universe with another existing in the same space but 
different dimensions. And if the infinite number of universes theory is true 
the one universe must be the recipient of all said lost socks from all the 
other infinite number of universes and that is a shocking universe to 
contemplate.


Ah... the fabled socksth dimension...

--
 Mark Wieder
 ahsoftw...@gmail.com


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


Re: intersect . . . invisible images

2017-07-16 Thread Jeff Reynolds via use-livecode
I think it's not quark and dryer spins that take away those lost locks but an 
intersection of this universe with another existing in the same space but 
different dimensions. And if the infinite number of universes theory is true 
the one universe must be the recipient of all said lost socks from all the 
other infinite number of universes and that is a shocking universe to 
contemplate.

So Richmond be careful the intersections you try to map or you may find 
yourself in an episode of the twilight zone trying to find a little lost girl...

Cheers,

Jeff


Jeffrey Reynolds
6620 Michaels Dr
Bethesda, MD  20817
301.469.8562

___
use-livecode mailing list
use-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: Bug? ResizeControl Triggers From Outside of CustomControl with Assigned Behavior

2017-07-16 Thread Monte Goulding via use-livecode

> On 17 Jul 2017, at 9:42 am, Sannyasin Brahmanathaswami via use-livecode 
>  wrote:
> 
> I can't any use case where you would want any group to trap a mouse event 
> outside its rect. 

It sounds like you want sharedBehavior on and backgroundBehavior off

If it’s a background it behaves like it’s a layer between card and stack so all 
card messages travel through it. That’s the way backgrounds work and changing 
that would break a _lot_ of code!

Cheers

Monte
___
use-livecode mailing list
use-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: Bug? ResizeControl Triggers From Outside of CustomControl with Assigned Behavior

2017-07-16 Thread Sannyasin Brahmanathaswami via use-livecode
I'm hitting this again… in order to stylize a widget I  grouped it (by itself) 
now we get to do the cool effects/inks to make it look good.

But it also is used as a button. and I place the group on all the cards in the 
stack,

Now we have 3 different backgrounds all of which expect mouse events.

I can't any use case where you would want any group to trap a mouse event 
outside its rect. 

Seems only to introduce chaos. Especially where many custom controls may want 
to be shared on multiple cards… it "goes crazy"  and debugging the msg path and 
hacking around this issue, starts to get nightmarish

BR

 

On 7/15/17, 5:46 AM, "use-livecode on behalf of J. Landman Gay via 
use-livecode"  wrote:

I saw this recently. It isn't a bug, the navigation group is a background 
group so it will catch any message that isn't blocked earlier in the 
message path. You can put an empty resizecontrol handler in objects that 
shouldn't respond, or check in the group script that the target is one of 
the group members, as you did.



___
use-livecode mailing list
use-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: Help Testing Small Script Editor Enhancement

2017-07-16 Thread Bob Hall via use-livecode

> On Jul 16, 2017, at 6:01 PM, Mark Wieder via use-livecode 
>  wrote:
> 
> Well, as I noted, it *does* affect linux, but not in a bad way. Control-tab 
> continues to iterate through the tabs as long as the script editor is in 
> front, and continues to switch modes when it's not.

That’s a bug that I need to address. I missed the point Mark W. made that 
control-tab cycled through the tabs on Linux. That should not happen with the 
Linux SE. My intent is that only MacOS SE users would have the option.

I’m in the process of getting a Debian system up on a VM to see what’s going 
on. I’ll go through my code and figure out what I need to fix this so it works 
as I intended. Thanks Mark for finding this.

Bob
___
use-livecode mailing list
use-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: Mobile - missing? files added in copy files pane of standalone builder

2017-07-16 Thread Terry Judd via use-livecode
Thanks for the advice Jacqueline - I use the resources folder for writing/ 
reading files to/from all the time but haven't been in the habit of using the 
copy files pane for adding resources. I'll give all that a go.

Terry...

Sent from my iPhone

> On 17 Jul 2017, at 7:58 am, J. Landman Gay via use-livecode 
>  wrote:
> 
> The app structure respects the folder hierarchy you had during development. 
> For easiest access everywhere, put your folders inside the one that holds the 
> mainstack.
> 
> Then use specialFolderPath("resources") in your scripts to refer to the 
> subfolders. That function will return the mainstack's folder during 
> development, and the path to the subfolders in a standalone on any platform.
> 
> Macs no longer allow assets in the engine folder, so 
> specialFolderPath("resources") translates to the place where your subfolders 
> actually reside. That is, even if your script refers to the engine folder, 
> the function will look in the resources folder.
> 
> You don't need to create a resources folder on your hard drive, that is done 
> automatically when the standalone is built. Just make the other folders 
> sub-directories of the mainstack's folder and include them in the copy files 
> pane.
> 
>> On 7/16/17 3:09 PM, Terry Judd via use-livecode wrote:
>> Ok, so when adding files in the ‘copy files’ pane I can only include files 
>> that are in the same folder (on disk) as the stack file if I want them to 
>> end up in the engine/home folder? I though assuming that the paths that are 
>> listed in the ‘Non-stack files in the application’ represent the location of 
>> the original file but that when the standalone was built they are all be 
>> copied into the same folder in the app? I thought I’d added externals this 
>> way in the past and had them work for example.
>> Terry...
>> On 17/07/2017 5:27 am, "use-livecode on behalf of J. Landman Gay via 
>> use-livecode" > use-livecode@lists.runrev.com> wrote:
>> On 7/15/17 8:05 PM, Terry Judd via use-livecode wrote:
>> > If I add files that are in the same folder as the stack file in the 
>> copy and then in the app (simulator or real device) if I ‘put the files’, 
>> then the added files are included in the listing. However, if the added 
>> files are in a different folder (e.g. “stuff/test.pdf”) then they don’t show 
>> up. Should they, or is there something that I’m missing?
>> >
>> > LC 8.1.6 (rc1)
>>  That's expected behavior, the files function isn't recursive. By
>> default, it returns only files in the default folder but you can specify
>> a different folder by adding an optional folder parameter.
>>  Over the years a few people have posted recursive directory walk
>> scripts, but since you already know the folders included in the
>> standalone it's probably easier to just ask for each listing
>> individually if there aren't too many.
>>  --
>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>> HyperActive Software   | http://www.hyperactivesw.com
>>   ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your 
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Help Testing Small Script Editor Enhancement

2017-07-16 Thread Mark Wieder via use-livecode

On 07/16/2017 01:33 PM, Bob Hall via use-livecode wrote:


The control-tab “fix” I’m proposing will only effect MacOS users and I would 
not expect Linux or Windows users to be effected at all by the MacOS 
control-tab. If you are on Linux/Windows it should not matter whether the 
Script Editor is top window or not.


Well, as I noted, it *does* affect linux, but not in a bad way. 
Control-tab continues to iterate through the tabs as long as the script 
editor is in front, and continues to switch modes when it's not.


--
 Mark Wieder
 ahsoftw...@gmail.com


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

Re: Mobile - missing? files added in copy files pane of standalone builder

2017-07-16 Thread J. Landman Gay via use-livecode
The app structure respects the folder hierarchy you had during 
development. For easiest access everywhere, put your folders inside the 
one that holds the mainstack.


Then use specialFolderPath("resources") in your scripts to refer to the 
subfolders. That function will return the mainstack's folder during 
development, and the path to the subfolders in a standalone on any platform.


Macs no longer allow assets in the engine folder, so 
specialFolderPath("resources") translates to the place where your 
subfolders actually reside. That is, even if your script refers to the 
engine folder, the function will look in the resources folder.


You don't need to create a resources folder on your hard drive, that is 
done automatically when the standalone is built. Just make the other 
folders sub-directories of the mainstack's folder and include them in 
the copy files pane.


On 7/16/17 3:09 PM, Terry Judd via use-livecode wrote:

Ok, so when adding files in the ‘copy files’ pane I can only include files that 
are in the same folder (on disk) as the stack file if I want them to end up in 
the engine/home folder? I though assuming that the paths that are listed in the 
‘Non-stack files in the application’ represent the location of the original 
file but that when the standalone was built they are all be copied into the 
same folder in the app? I thought I’d added externals this way in the past and 
had them work for example.

Terry...

On 17/07/2017 5:27 am, "use-livecode on behalf of J. Landman Gay via use-livecode" 
 wrote:

 On 7/15/17 8:05 PM, Terry Judd via use-livecode wrote:
 > If I add files that are in the same folder as the stack file in the copy 
and then in the app (simulator or real device) if I ‘put the files’, then the 
added files are included in the listing. However, if the added files are in a 
different folder (e.g. “stuff/test.pdf”) then they don’t show up. Should they, or 
is there something that I’m missing?
 >
 > LC 8.1.6 (rc1)
 
 That's expected behavior, the files function isn't recursive. By

 default, it returns only files in the default folder but you can specify
 a different folder by adding an optional folder parameter.
 
 Over the years a few people have posted recursive directory walk

 scripts, but since you already know the folders included in the
 standalone it's probably easier to just ask for each listing
 individually if there aren't too many.
 
 --

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

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


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




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


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

Re: Help Testing Small Script Editor Enhancement

2017-07-16 Thread J. Landman Gay via use-livecode

On 7/16/17 3:33 PM, Bob Hall via use-livecode wrote:



On Jul 16, 2017, at 3:37 PM, J. Landman Gay via use-livecode 
> wrote:

This is going to totally screw up a macro I've been using for 15+ years. I know 
I'm a voice in the wilderness but if this gets officially implemented I hope 
there's an option to turn it off, or supply your own key combination.



LOL. I haven’t been using the control-tab for 15 years to switch between edit 
and run modes. However, I had been using it for 3 years. Yes it was painful for 
me to switch my favorite key sequence. But it had to be done.

The control-tab “fix” I’m proposing will only effect MacOS users and I would 
not expect Linux or Windows users to be effected at all by the MacOS 
control-tab. If you are on Linux/Windows it should not matter whether the 
Script Editor is top window or not.

I don’t expect an easy adoption of this “new” key combination by Livecode. If 
adopted, I would also not expect an option to turn it on/off or change the 
combo as the behavior is considered to be a standard key combo of MacOS, right?

If you are using control-tab with a custom macro, see if control-` might work 
for you. If not, possibly option-tab?


I used Cmd-tab for 20 years, which was the HC standard before LC, and 
painfully switched to Control-tab when Apple stole that key combo from 
us. I don't want to do that again.


But since the change only affects the script editor, it isn't as drastic 
as I was afraid of.


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


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

Re: Help Testing Small Script Editor Enhancement

2017-07-16 Thread Bob Hall via use-livecode

> On Jul 16, 2017, at 3:37 PM, J. Landman Gay via use-livecode 
> > wrote:
> 
> This is going to totally screw up a macro I've been using for 15+ years. I 
> know I'm a voice in the wilderness but if this gets officially implemented I 
> hope there's an option to turn it off, or supply your own key combination.
> 

LOL. I haven’t been using the control-tab for 15 years to switch between edit 
and run modes. However, I had been using it for 3 years. Yes it was painful for 
me to switch my favorite key sequence. But it had to be done. 

The control-tab “fix” I’m proposing will only effect MacOS users and I would 
not expect Linux or Windows users to be effected at all by the MacOS 
control-tab. If you are on Linux/Windows it should not matter whether the 
Script Editor is top window or not.

I don’t expect an easy adoption of this “new” key combination by Livecode. If 
adopted, I would also not expect an option to turn it on/off or change the 
combo as the behavior is considered to be a standard key combo of MacOS, right?

If you are using control-tab with a custom macro, see if control-` might work 
for you. If not, possibly option-tab?

Bob
___
use-livecode mailing list
use-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: Help Testing Small Script Editor Enhancement

2017-07-16 Thread J. Landman Gay via use-livecode

On 7/16/17 2:50 PM, Mark Wieder via use-livecode wrote:

On 07/16/2017 12:37 PM, J. Landman Gay via use-livecode wrote:

This is going to totally screw up a macro I've been using for 15+ 
years. I know I'm a voice in the wilderness but if this gets 
officially implemented I hope there's an option to turn it off, or 
supply your own key combination.


I use control-tab to switch between edit and browse mode because the 
built-in combo is impossible for me to reach comfortably. You can 
imagine how ingrained that is by now. Please give us some control over 
the behavior.




I do the same in PowerTools. No problem.

The patch is implemented in a behavior script of the script editor, so 
unless you're trying to switch modes while the editor is in front 
there's no conflict. I was worried about that too, so it was the first 
thing I tested.




I suppose I could live with that. As it is now, switching to browse mode 
with the script editor in focus brings the defaultstack to the front 
automatically and you're set to go. I didn't set that up myself, so I 
assumed it was part of the IDE. I guess I could click the stack manually.


I wonder if any others would be affected by the change.

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

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


Re: Mobile - missing? files added in copy files pane of standalone builder

2017-07-16 Thread Terry Judd via use-livecode
Ok, so when adding files in the ‘copy files’ pane I can only include files that 
are in the same folder (on disk) as the stack file if I want them to end up in 
the engine/home folder? I though assuming that the paths that are listed in the 
‘Non-stack files in the application’ represent the location of the original 
file but that when the standalone was built they are all be copied into the 
same folder in the app? I thought I’d added externals this way in the past and 
had them work for example.

Terry...

On 17/07/2017 5:27 am, "use-livecode on behalf of J. Landman Gay via 
use-livecode"  wrote:

On 7/15/17 8:05 PM, Terry Judd via use-livecode wrote:
> If I add files that are in the same folder as the stack file in the copy 
and then in the app (simulator or real device) if I ‘put the files’, then the 
added files are included in the listing. However, if the added files are in a 
different folder (e.g. “stuff/test.pdf”) then they don’t show up. Should they, 
or is there something that I’m missing?
> 
> LC 8.1.6 (rc1)

That's expected behavior, the files function isn't recursive. By 
default, it returns only files in the default folder but you can specify 
a different folder by adding an optional folder parameter.

Over the years a few people have posted recursive directory walk 
scripts, but since you already know the folders included in the 
standalone it's probably easier to just ask for each listing 
individually if there aren't too many.

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


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


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

Re: Help Testing Small Script Editor Enhancement

2017-07-16 Thread Mark Wieder via use-livecode

On 07/16/2017 12:37 PM, J. Landman Gay via use-livecode wrote:

This is going to totally screw up a macro I've been using for 15+ years. 
I know I'm a voice in the wilderness but if this gets officially 
implemented I hope there's an option to turn it off, or supply your own 
key combination.


I use control-tab to switch between edit and browse mode because the 
built-in combo is impossible for me to reach comfortably. You can 
imagine how ingrained that is by now. Please give us some control over 
the behavior.




I do the same in PowerTools. No problem.

The patch is implemented in a behavior script of the script editor, so 
unless you're trying to switch modes while the editor is in front 
there's no conflict. I was worried about that too, so it was the first 
thing I tested.


--
 Mark Wieder
 ahsoftw...@gmail.com


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


Re: intersect . . . invisible images

2017-07-16 Thread Bob Sneidar via use-livecode

> On Jul 16, 2017, at 12:42 , Bob Sneidar via use-livecode 
>  wrote:
> 
> said owner failed to take into account an extremely obscure BUG


___
use-livecode mailing list
use-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: intersect . . . invisible images

2017-07-16 Thread Bob Sneidar via use-livecode
It's not a theory. It's a demonstrable fact. I cannot comment on the status of 
Jacque'a missing sock though, as a certain cat I once had who himself professed 
to have been "sent back" by a future owner of Jacques Time Travel stack to test 
it's veracity, was unable to return to his own time because said owner failed 
to take into account an extremely obscure but involving recursion in said time 
travel stack. The cat, who had evolved to the point that he could actually 
communicate psychically, had nevertheless not lost his primal instinct to tear 
to shreads anything in his immediate vicinity when vexed, proceeded to 
"unweave" an item of clothing that may or may not have matched the description 
of Jacque's missing sock. 

Bob S


> On Jul 14, 2017, at 23:32 , J. Landman Gay via use-livecode 
>  wrote:
> 
>>  And of course, this dovetails nicely into Jacque's disappearing socks
>> theory.
> 
> I lost a sock about six years ago and it still hasn't shown up. I've kept the 
> single remaining one of the pair in hopes that the missing one would hone in 
> on it and find its way home.
> 
> So now you're saying it's been in the dryer the whole time and I haven't 
> found the right way to intersect with it yet? Great. I don't know how to 
> change its visible property.
> 
> I loved that sock.
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com


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


Re: Weird variable thing in 8.1.5

2017-07-16 Thread Alex Tweedly via use-livecode



On 16/07/2017 18:49, Jonathan Lynch via use-livecode wrote:


In 14 years with LC I have never used that option.



You should try it :-)

Can be a bit of a pain to add all the local variable declarations - BUT 
every so often it will help you discover a typo in a variable name, and 
suddenly you've fixed a potential bug that was lurking in your code. And 
the cost of the time to add those declarations is nothing compared to 
diagnosing and fixing bugs reported by distant users.


-- Alex.
P.S. of course, YMMV.
My taping skulls are bid, so I often spill thongs wring - maybe you 
don't hive that problem :-)



___
use-livecode mailing list
use-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: Help Testing Small Script Editor Enhancement

2017-07-16 Thread J. Landman Gay via use-livecode

On 7/16/17 2:11 PM, Mark Wieder via use-livecode wrote:

On 07/16/2017 08:47 AM, Bob Hall via use-livecode wrote:
The enhancement is for MacOS Users enabling control+tab to cycle the 
tabs in the script editor (command-tab is OS reserved on MacOS). I’m 
not going to go into how to apply the fix but this should be attempted 
only by more advanced users. The code works on 9.0.0dp8 ONLY. Some 
re-factoring of the SE has gone on so this fix is for 9dp8 only.


You can see my proposed changes on Github at:
https://github.com/livecode/livecode-ide/compare/develop...bhall2001:bugfix/20096?expand=1 
 



Work fine here after patching LC9dp8.
Linux Mint 17.2 cinnamon (control-tab to cycle)



This is going to totally screw up a macro I've been using for 15+ years. 
I know I'm a voice in the wilderness but if this gets officially 
implemented I hope there's an option to turn it off, or supply your own 
key combination.


I use control-tab to switch between edit and browse mode because the 
built-in combo is impossible for me to reach comfortably. You can 
imagine how ingrained that is by now. Please give us some control over 
the behavior.


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


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

Re: Mobile - missing? files added in copy files pane of standalone builder

2017-07-16 Thread J. Landman Gay via use-livecode

On 7/15/17 8:05 PM, Terry Judd via use-livecode wrote:

If I add files that are in the same folder as the stack file in the copy and 
then in the app (simulator or real device) if I ‘put the files’, then the added 
files are included in the listing. However, if the added files are in a 
different folder (e.g. “stuff/test.pdf”) then they don’t show up. Should they, 
or is there something that I’m missing?

LC 8.1.6 (rc1)


That's expected behavior, the files function isn't recursive. By 
default, it returns only files in the default folder but you can specify 
a different folder by adding an optional folder parameter.


Over the years a few people have posted recursive directory walk 
scripts, but since you already know the folders included in the 
standalone it's probably easier to just ask for each listing 
individually if there aren't too many.


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


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

Re: postgres table query not getting all names

2017-07-16 Thread Bob Sneidar via use-livecode
If there is a built in function for getting the schema of the particular 
database, I would use that. For instance you can query sqLite master database 
for a list of tables using:

SELECT * FROM my_db.sqlite_master

mySQL can be queried using SHOW TABLES

Googling this indicates that for postgres the syntax is:

SELECT table_name FROM information_schema.tables WHERE table_schema='public' 
AND table_type='BASE TABLE';

Bob S

> On Jul 14, 2017, at 16:13 , Mark Wieder via use-livecode 
>  wrote:
> 
> On 07/14/2017 03:48 PM, Dr. Hawkins via use-livecode wrote:
>> Sometime  ago, I wrote my own getTableNames() because
>> revDatabaseTableNames() would consistently fail to find them all.
>> Now, it to is filing.
>> It is, in essence,
>> *put* "SELECT table_name FROM information_schema.tables ;" \
>> & cr into dcmd
>> *put* revDataFromQuery(,cr,db,dcmd) into tabList
>> *return* tabList
>> I have another chunk of code which is now acting up:
>> *put* getTableNames(dhbkSrvrDb) into dhSrvTbls
>> *put* "dhStatTbl" into dhtbl_stat
>> *if* dhtbl_stat is not among the words of dhSrvTbls *then*
>> *put* "CREATE TABLE " & dhtbl_stat  . . . blah blah blah
>> table dhStatTbl already exists, yet the conditional is reached.  It
>> executes, and throws an error because this table is already there.
>> This is, to be mild, a brutal bug.
>> Might there be something I'm missing?
> 
> Just a guess, but the concept of 'word' is pretty slippery.
> You might try 'true words' or make a comma-separated list and look among the 
> items or...
> 
> -- 
> Mark Wieder
> ahsoftw...@gmail.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Re: Livecode on iPod

2017-07-16 Thread Sannyasin Brahmanathaswami via use-livecode
UDID  

FFF "fake"  

?

But developer.apple.com device portal accepts them…   

??

BR

 

On 7/15/17, 4:24 PM, "use-livecode on behalf of Colin Holgate via use-livecode" 
 wrote:

I would bet yes, but UDIDs that start with  are fake. 

___
use-livecode mailing list
use-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: Help Testing Small Script Editor Enhancement

2017-07-16 Thread Mark Wieder via use-livecode

On 07/16/2017 08:47 AM, Bob Hall via use-livecode wrote:

I’m looking for testing help. The work I did is for MacOS but I would love 
Linux and Windows users to also try out the changes looking for side effects. I 
don’t have the resources to perform adequate testing of the changes and need a 
little help before I submit my pull request.

The enhancement is for MacOS Users enabling control+tab to cycle the tabs in 
the script editor (command-tab is OS reserved on MacOS). I’m not going to go 
into how to apply the fix but this should be attempted only by more advanced 
users. The code works on 9.0.0dp8 ONLY. Some re-factoring of the SE has gone on 
so this fix is for 9dp8 only.

You can see my proposed changes on Github at:
https://github.com/livecode/livecode-ide/compare/develop...bhall2001:bugfix/20096?expand=1
 



Work fine here after patching LC9dp8.
Linux Mint 17.2 cinnamon (control-tab to cycle)

--
 Mark Wieder
 ahsoftw...@gmail.com


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

Re: Weird variable thing in 8.1.5

2017-07-16 Thread Jonathan Lynch via use-livecode
That was it - must have gotten clicked by accident.

In 14 years with LC I have never used that option.



Sent from my iPhone

> On Jul 16, 2017, at 1:43 PM, ** Clarence P Martin ** via use-livecode 
>  wrote:
> 
> Check in your script editor window under the Edit Sub-menu and look to see
> if "variable checking" is checked. That means that you need to declare any
> variables before you can use them. If you uncheck this, LiveCode will not
> require you to declare variables.
> Some people don't use variable checking and other do. That is a personal
> preference. Look up variable checking in the manual and you can decide what
> to do.
> 
> Sincerely,
> 
> Clarence Martin
> Email: chi...@themartinz.com
> Cell: 626 6965561
> 
> -Original Message-
> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
> Of Jonathan Lynch via use-livecode
> Sent: Sunday, July 16, 2017 8:07 AM
> To: use-livecode@lists.runrev.com
> Cc: jonathandly...@gmail.com
> Subject: Weird variable thing in 8.1.5
> 
> I just created a button with this script:
> 
> On mouseup
>  Put "test" into tTest
> End mouseUp
> 
> It would not compile, producing the following error:
> 
> Compilation error at line 2 (Chunk: can't create a variable with that name
> (explicitVariables?)) near "tTest", char 15
> 
> Why would this happen?
> 
> Nobody would ever be able to use 8.1.5 if that always happened, so what
> would make it happen now?
> 
> Sent from my iPhone
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

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


RE: Weird variable thing in 8.1.5

2017-07-16 Thread ** Clarence P Martin ** via use-livecode
Check in your script editor window under the Edit Sub-menu and look to see
if "variable checking" is checked. That means that you need to declare any
variables before you can use them. If you uncheck this, LiveCode will not
require you to declare variables.
Some people don't use variable checking and other do. That is a personal
preference. Look up variable checking in the manual and you can decide what
to do.

Sincerely,

Clarence Martin
Email: chi...@themartinz.com
Cell: 626 6965561

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
Of Jonathan Lynch via use-livecode
Sent: Sunday, July 16, 2017 8:07 AM
To: use-livecode@lists.runrev.com
Cc: jonathandly...@gmail.com
Subject: Weird variable thing in 8.1.5

I just created a button with this script:

On mouseup
  Put "test" into tTest
End mouseUp

It would not compile, producing the following error:

Compilation error at line 2 (Chunk: can't create a variable with that name
(explicitVariables?)) near "tTest", char 15

Why would this happen?

Nobody would ever be able to use 8.1.5 if that always happened, so what
would make it happen now?

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


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


Should RunRev create a testing circle for developers?

2017-07-16 Thread Jonathan Lynch via use-livecode
I don't know if this is a good idea or not, but thought I would throw it out 
there.

Would it be helpful if the Mothership had a group activity where developers 
could put in a certain number of hours testing others' apps, and then cash in 
for an equal number of hours from other developers getting their own apps 
tested?

Sent from my iPhone
___
use-livecode mailing list
use-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 Testing Small Script Editor Enhancement

2017-07-16 Thread Bob Hall via use-livecode
I’m looking for testing help. The work I did is for MacOS but I would love 
Linux and Windows users to also try out the changes looking for side effects. I 
don’t have the resources to perform adequate testing of the changes and need a 
little help before I submit my pull request.

The enhancement is for MacOS Users enabling control+tab to cycle the tabs in 
the script editor (command-tab is OS reserved on MacOS). I’m not going to go 
into how to apply the fix but this should be attempted only by more advanced 
users. The code works on 9.0.0dp8 ONLY. Some re-factoring of the SE has gone on 
so this fix is for 9dp8 only.

You can see my proposed changes on Github at:
https://github.com/livecode/livecode-ide/compare/develop...bhall2001:bugfix/20096?expand=1
 


For anyone who takes the time to install these changes especially on 
Linux/Windows I thank you!!!

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

Re: Weird variable thing in 8.1.5

2017-07-16 Thread Jonathan Lynch via use-livecode
Thanks Panos

It is amazing how many options LC has. :)



Sent from my iPhone

> On Jul 16, 2017, at 11:14 AM, panagiotis merakos via use-livecode 
>  wrote:
> 
> Hi Jonathan,
> 
> This is because you have enabled Strict Compilation Mode. To fix that error:
> 
> 1) add "local tTest" before "Put "test" into tTest"
> 
> OR
> 
> 2) Disable strict compilation (LC Preferences -> Script Editor -> Strict
> Compilation Mode)
> 
> Best,
> Panos
> --
> 
> On Sun, Jul 16, 2017 at 4:06 PM, Jonathan Lynch via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> I just created a button with this script:
>> 
>> On mouseup
>>  Put "test" into tTest
>> End mouseUp
>> 
>> It would not compile, producing the following error:
>> 
>> Compilation error at line 2 (Chunk: can't create a variable with that name
>> (explicitVariables?)) near "tTest", char 15
>> 
>> Why would this happen?
>> 
>> Nobody would ever be able to use 8.1.5 if that always happened, so what
>> would make it happen now?
>> 
>> Sent from my iPhone
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

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


Re: Weird variable thing in 8.1.5

2017-07-16 Thread panagiotis merakos via use-livecode
Hi Jonathan,

This is because you have enabled Strict Compilation Mode. To fix that error:

1) add "local tTest" before "Put "test" into tTest"

OR

2) Disable strict compilation (LC Preferences -> Script Editor -> Strict
Compilation Mode)

Best,
Panos
--

On Sun, Jul 16, 2017 at 4:06 PM, Jonathan Lynch via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I just created a button with this script:
>
> On mouseup
>   Put "test" into tTest
> End mouseUp
>
> It would not compile, producing the following error:
>
> Compilation error at line 2 (Chunk: can't create a variable with that name
> (explicitVariables?)) near "tTest", char 15
>
> Why would this happen?
>
> Nobody would ever be able to use 8.1.5 if that always happened, so what
> would make it happen now?
>
> Sent from my iPhone
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Livecode on iPod

2017-07-16 Thread Dave Kilroy via use-livecode
I’ve used www.getudid.io  in the past and sometimes 
received non-functioning UDIDs - and bad UDIDs are a pain to deal with…

Of course maybe the website works now - however I recommend that people connect 
their iOS devices to a machine running the latest version of iTunes and use 
that to get their UDIDs - and in my experience iTunes provides 100% reliable 
UDIDs

Kind regards

Dave

PS: and yes, LiveCode apps run fine on iPods



> I would bet yes, but UDIDs that start with  are fake. There are many ways 
> to get the real UDID, if you want to create a build for them that they are 
> included in the provisioning file. Look at this site as an example: 
> 
> https://www.getudid.io 
> 
> Settings wise is should be like iPhone. 
> 
> > On Jul 15, 2017, at 7:20 PM, Sannyasin Brahmanathaswami via use-livecode 
> > <[hidden email] 
> > >
> >  wrote: 
> > 
> > I have a young user that was given an iPod by his family. 
> > 
> > UDID: 5C 
> > OS: iPhone OS 10.3.2 
> > Device: iPod7,1 (iPod7,1) 
> > Capacity: 14.9 GB 
> > 
> > will LiveCode apps run on this? the SA builder does not show "iPod" under 
> > iOS. 
> > 
> > BR 
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Weird variable thing in 8.1.5

2017-07-16 Thread Jonathan Lynch via use-livecode
I just created a button with this script:

On mouseup
  Put "test" into tTest
End mouseUp

It would not compile, producing the following error:

Compilation error at line 2 (Chunk: can't create a variable with that name 
(explicitVariables?)) near "tTest", char 15

Why would this happen?

Nobody would ever be able to use 8.1.5 if that always happened, so what would 
make it happen now?

Sent from my iPhone
___
use-livecode mailing list
use-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 hh via use-livecode
An option for James could be to put ONE html-file in the images folder
with content:



And then set any image of that images folder by changing the HTML by
javascript:

on mouseUp
  put "flower2.png" into nn -- give the name directly
  put line 42 of myImages into nn -- a list containing the image names
  setImage nn,400,300
end mouseUp

on setImage iName,iWidth,iHeight
  put  "var jh = document.getElementById('jh');" & \
   "jh.setAttribute('src','" & iName & "');" & \
   "jh.setAttribute('width','" & iWidth & "');" & \
   "jh.setAttribute('height','" & iHeight & "');" & \
   "jh.setAttribute('alt','"&"');" into js
  do js in widget "browser"
end setImage

(If there are several images to be displayed at once then simply replicate
the id in the html and correspondingly the js in the handler.)


___
use-livecode mailing list
use-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 Jonathan Lynch via use-livecode
James - if you look at the example stack on LiveCode share "browser widget 
image manipulator" it has some LC code for creating a dataURl for an image.

Use that to create the data URL for the image.  

Basically:

Get the image info from the image file like this:

Put URL "binfile:imagepath" into timageinfo

Put base64encode(timageinfo) into timageinfo 

Replace linefeed with empty in timageinfo


Then you follow the example in the stack for putting that base 64 image 
information into the SRC of the image.

Then you replace your old SRC with the new SRC in the htmltext.

Then you set the HTML text of your widget with the adjusted HTMLtext.

In this way you won't have to use JavaScript and it should display well.

If this does not work, let me know and I will write out the script.



Sent from my iPhone

On Jul 16, 2017, at 9:37 AM, hh via use-livecode 
 wrote:

>> Jonathan wrote:
>> Is this part of the same-source policy for web pages? The HTML file and the 
>> image file
>> needing to be in the same folder?
> 
> No. I wrote this only because the example used a relative path pointing to 
> the same folder:
> 
>> Example htmltext of the widget or text of the file "flower2b.html":
>> 
> 
> But the same-source-policy is becoming more and more strong.
> The browser (or webkit repspectively) wants a clear "base-url" when making 
> the decision
> whether 'same-source' is fulfilled.
> This may be a problem here because such a "base-url" is derived by also 
> checking the
> html-file origin. And in the case of an empty URL of the widget (htmltext 
> only is set)
> there is no file origin ...
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

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


Re: Correct img format for browser widget.

2017-07-16 Thread hh via use-livecode
> Jonathan wrote:
> Is this part of the same-source policy for web pages? The HTML file and the 
> image file
> needing to be in the same folder?

No. I wrote this only because the example used a relative path pointing to the 
same folder:

> Example htmltext of the widget or text of the file "flower2b.html":
> 

But the same-source-policy is becoming more and more strong.
The browser (or webkit repspectively) wants a clear "base-url" when making the 
decision
whether 'same-source' is fulfilled.
This may be a problem here because such a "base-url" is derived by also 
checking the
html-file origin. And in the case of an empty URL of the widget (htmltext only 
is set)
there is no file origin ...



___
use-livecode mailing list
use-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 Jonathan Lynch via use-livecode
So - thinking about this dime more - the browser widget uses a dummy URL if not 
told to load a specific URL, and the dummy URL would not have permission to 
access local drives, for security reasons.

That would mean the "file:///" prefix would not work either.

So he would have to either save the HTML file to the local disk, or convert to 
dataURLs.

Fortunately, it is only a few lines of code to convert to a dataURL, and he can 
build it into his HTML without having to use JavaScript.

Sent from my iPhone

> On Jul 16, 2017, at 9:10 AM, jonathandly...@gmail.com wrote:
> 
> Hi Hermann,
> 
> Is this part of the same-source policy for web pages? The HTML file and the 
> image file needing to be in the same folder?
> 
> Sent from my iPhone
> 
>> On Jul 16, 2017, at 5:45 AM, hh via use-livecode 
>>  wrote:
>> 
>> You can have that without a (local) server when using a browser widget.
>> 
>> Although you can NOT display an image from disk without javascript by
>> only setting the htmltext with a correct filepath, for example as follows.
>> (This is a browser engine thing, can not be influenced by the widget.)
>> 
>> Example htmltext of the widget or text of the file "flower2b.html":
>> 
>> 
>> But it works if you set the URL of the widget to a (local) html-file that
>> has exactly this text as html (if 'flower.png' is in the same folder).
>> *** Then the htmltext of the widget is 'anchored' in the local file system
>> and can use a full or relative path.
>> 
>> BTW. To display an image "/home/jh/images/flower.png" from disk in a field
>> for example at size 80x60 at char 42:
>> 
>> 1. create an img "i1"
>> 2. set the filename of img "i1" to "/home/jh/images/flower.png"
>> 3. set the width of img "i1" to 80; set the height of img "i1" to 60
>> 4. set the imagesource of char 42 of fld 1 to "i1"
>> 
>>> James H. wrote:
 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.
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode

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


Re: Correct img format for browser widget.

2017-07-16 Thread Jonathan Lynch via use-livecode
Hi Hermann,

Is this part of the same-source policy for web pages? The HTML file and the 
image file needing to be in the same folder?

Sent from my iPhone

> On Jul 16, 2017, at 5:45 AM, hh via use-livecode 
>  wrote:
> 
> You can have that without a (local) server when using a browser widget.
> 
> Although you can NOT display an image from disk without javascript by
> only setting the htmltext with a correct filepath, for example as follows.
> (This is a browser engine thing, can not be influenced by the widget.)
> 
> Example htmltext of the widget or text of the file "flower2b.html":
> 
> 
> But it works if you set the URL of the widget to a (local) html-file that
> has exactly this text as html (if 'flower.png' is in the same folder).
> *** Then the htmltext of the widget is 'anchored' in the local file system
> and can use a full or relative path.
> 
> BTW. To display an image "/home/jh/images/flower.png" from disk in a field
> for example at size 80x60 at char 42:
> 
> 1. create an img "i1"
> 2. set the filename of img "i1" to "/home/jh/images/flower.png"
> 3. set the width of img "i1" to 80; set the height of img "i1" to 60
> 4. set the imagesource of char 42 of fld 1 to "i1"
> 
>> James H. wrote:
>>> 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.
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

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


Re: Correct img format for browser widget.

2017-07-16 Thread Jonathan Lynch via use-livecode
One other solution...

You can convert the image source to a data URL. You can construct the htmltext 
for the dataurl in LC, and replace the current image SRC information with 
dataURL SRC information. Then, when you set the htmltext of the browser widget, 
the images will show up without needing to access the local file from within 
the widget.



Sent from my iPhone

> On Jul 16, 2017, at 8:53 AM, jonathandly...@gmail.com wrote:
> 
> Hi James,
> 
> Can you post an example of your actual filepath?
> 
> With HTML, the first part of the path to the local disk usually looks like 
> this:
> 
> "file:///C:/users/pictures/mypicture.png"
> 
> LC should be able to give you the right full path to a document- but make 
> sure to try using the "file:///" prefix inside the HTML text of the browser 
> widget.
> 
> I have not tested this, but it has worked for me in the past.
> 
> Sent from my iPhone
> 
> On Jul 16, 2017, at 1:53 AM, James Hale via use-livecode 
>  wrote:
> 
>> 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
> 
> Sent from my iPhone
> 
>> On Jul 16, 2017, at 1:53 AM, James Hale via use-livecode 
>>  wrote:
>> 
>> 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 
>> 

Re: Correct img format for browser widget.

2017-07-16 Thread Jonathan Lynch via use-livecode
Hi James,

Can you post an example of your actual filepath?

With HTML, the first part of the path to the local disk usually looks like this:

"file:///C:/users/pictures/mypicture.png"

LC should be able to give you the right full path to a document- but make sure 
to try using the "file:///" prefix inside the HTML text of the browser widget.

I have not tested this, but it has worked for me in the past.

Sent from my iPhone

> On Jul 16, 2017, at 1:53 AM, James Hale via use-livecode 
>  wrote:
> 
> 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

Sent from my iPhone

> On Jul 16, 2017, at 1:53 AM, James Hale via use-livecode 
>  wrote:
> 
> 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
___
use-livecode mailing list
use-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 hh via use-livecode
You can have that without a (local) server when using a browser widget.

Although you can NOT display an image from disk without javascript by
only setting the htmltext with a correct filepath, for example as follows.
(This is a browser engine thing, can not be influenced by the widget.)

Example htmltext of the widget or text of the file "flower2b.html":


But it works if you set the URL of the widget to a (local) html-file that
has exactly this text as html (if 'flower.png' is in the same folder).
*** Then the htmltext of the widget is 'anchored' in the local file system
and can use a full or relative path.

BTW. To display an image "/home/jh/images/flower.png" from disk in a field
for example at size 80x60 at char 42:

1. create an img "i1"
2. set the filename of img "i1" to "/home/jh/images/flower.png"
3. set the width of img "i1" to 80; set the height of img "i1" to 60
4. set the imagesource of char 42 of fld 1 to "i1"

> James H. wrote:
> > 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.

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