Re: Mac 64 bit?

2018-01-05 Thread Dave Kilroy via use-livecode
+1

LC9 is stable as far as I’m concerned and has been for many months, I’m using 
it for development and deployment

Kind regards

Dave

PS: it’s also a pain to have to delete and reapply widgets when moving back and 
forth between LC8 and 9…


> One more reason to use the most recent build during development: 
> 
> In v9 you'll find that's already done: 64-bit is now the default, 
> "Experimental" has been removed, as "(Deprecated)" is now added next to 
> 32-bit. 
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Finding the 'Applications' folder on a Mac

2018-01-05 Thread Graham Samuel via use-livecode
Gems indeed! If they always work, I wonder why the mother ship hasn’t 
incorporated them into the LC Dictionary. Anyway thanks Klaus, and of course 
thanks Ken Ray.

Graham


> On 4 Jan 2018, at 23:59, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Graham,
> 
>> Am 04.01.2018 um 23:46 schrieb Graham Samuel via use-livecode 
>> :
>> 
>> It looks to me that specialFolderPath doesn’t give a way of finding the 
>> /Applications folder on a Mac (or presumably the equivalent on a PC). If one 
>> is running a standalone which has been placed in the Applications folder, 
>> then it is possible to start with specialFolderPath(“engine”) and work back 
>> to the Applications directory, but I suspect this is fraught with 
>> uncertainty. Has anyone a solution?
> 
> ...
> put specialfolderpath("apps") into tApplicationFolder
> ...
> 
> Found this and more gemns here: 
> 
> 
>> Graham 
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> http://www.major-k.de
> kl...@major-k.de
> 
> 
> ___
> use-livecode mailing list
> use-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

Lower part of Script Editor (the one with variabels etc.) disappeared, how to get it back?

2018-01-05 Thread Klaus major-k via use-livecode
Hi friends,

the subject says it all.

Out of a sudden*** the lower part of the script editor diappeared
from his machine. The part with the variables, Find etc.
How can we get it back? We really cannot debug this way :-/

He is using a MacBook and LC 2.18.

***We have no idea when and how it disapperaed.

Thanks for any hint!


Best

Klaus
--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-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 it's a datagrid

2018-01-05 Thread Trevor DeVore via use-livecode
On Thu, Jan 4, 2018 at 6:13 PM Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Given an object reference, how can I tell the object is a datagrid?


You could check to see if the long id of your target control is the
dgControl of the target control. If it is then you have a data grid.

- -
Trevor DeVore
ScreenSteps

>
___
use-livecode mailing list
use-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: Two new videos about using Navigator with LiveCode

2018-01-05 Thread Geoff Canyon via use-livecode
Email is fine for bug reports; I don't get that many.

gc

> On Jan 4, 2018, at 10:42 PM, Sannyasin Brahmanathaswami via use-livecode 
>  wrote:
> 
> Geoff
> 
> wow this is the tool I've been waiting for!
> 
> I just fixed a series of fields on 8 cards that carried that old single blank 
> line script that used to be saved in by default… using Navigator it was so 
> easy.
> 
> FYI" the script handler's for a long script on ly stack are being filtered to 
> show only functions.  all the commands to not appear in your handler list.
> 
> How do you want bug reports sent?
> 
> Do we need to clean up the old navigator… at first the on-board 2.* showed up 
> but then after downloading and putting into my Plug'ss folder the latest 4.5 
> beta 2 is the default.  But I wonder if some prefs or something might be 
> saved that would block the appearance of commands in the list of handlers.
> 
> I can send you the script off list if you want… we have a lot of comments in 
> there… possibly breaking your look up..?
> 
> BR
> 
> On 1/3/18, 6:26 PM, "use-livecode on behalf of Geoff Canyon via use-livecode" 
>  use-livecode@lists.runrev.com> wrote:
> 
>The Script Menu: https://youtu.be/25q-D8k_z2s
>Lets you easily copy and paste scripts into objects. Displays all the
>handlers from both an object and its behavior. Select any handler to edit
>the script and jump to that handler. Lets you call any handler, function,
>getProp, or setProp, including passing in parameters, and for functions and
>getProp displays the result/property so you can see/copy it.
> 
> ___
> use-livecode mailing list
> use-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

Cancel browser widget navigation?

2018-01-05 Thread Trevor DeVore via use-livecode
Other than injecting javascript into each web page that cancels clicks on
links, is there a way to cancel user clicks on links in a browser widget?

-- 
Trevor DeVore
ScreenSteps
www.screensteps.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: How to tell if it's a datagrid

2018-01-05 Thread Mike Kerner via use-livecode
uhhh guessing:  can you check if the object has a parent?  If the parent is
a datagrid, then the object is not a datagrid

On Thu, Jan 4, 2018 at 7:13 PM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Given an object reference, how can I tell the object is a datagrid? You
> might say, get the dgProp ["control type"], but every object contained
> within a datagrid group will ALSO return "data grid". In fact, EVERY dgProp
> arguement for every item in a datagrid group will do the same.
>
> The reason I ask is that I want to get the minimum left/top and maximum
> right/bottom of every VISIBLE object on a card that is NOT a group but
> notwithstanding INCLUDING Datagrids, so that I can set the rect of the card
> containing them in a consistent way. The thing is, groups have margins (I'm
> not going to set the margins of all my groups to 0) and these are not
> visible, so could skew the positioning of what IS visible. Datagrids do NOT
> have margins that I can tell, even though they are groups. For example, if
> I had a group on the left edge but not on the right edge, the objects on
> the card would look off center.
>
> Bob S
> ___
> use-livecode mailing list
> use-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: How to tell if it's a datagrid

2018-01-05 Thread Mike Kerner via use-livecode
whoa.  everyone else's replies didn't show up until just now, and they're
all above mine.  weird email glitch this AM.

On Fri, Jan 5, 2018 at 8:48 AM, Mike Kerner 
wrote:

> uhhh guessing:  can you check if the object has a parent?  If the parent
> is a datagrid, then the object is not a datagrid
>
> On Thu, Jan 4, 2018 at 7:13 PM, Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> Given an object reference, how can I tell the object is a datagrid? You
>> might say, get the dgProp ["control type"], but every object contained
>> within a datagrid group will ALSO return "data grid". In fact, EVERY dgProp
>> arguement for every item in a datagrid group will do the same.
>>
>> The reason I ask is that I want to get the minimum left/top and maximum
>> right/bottom of every VISIBLE object on a card that is NOT a group but
>> notwithstanding INCLUDING Datagrids, so that I can set the rect of the card
>> containing them in a consistent way. The thing is, groups have margins (I'm
>> not going to set the margins of all my groups to 0) and these are not
>> visible, so could skew the positioning of what IS visible. Datagrids do NOT
>> have margins that I can tell, even though they are groups. For example, if
>> I had a group on the left edge but not on the right edge, the objects on
>> the card would look off center.
>>
>> Bob S
>> ___
>> use-livecode mailing list
>> use-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."
>



-- 
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: The coming of SVG

2018-01-05 Thread Dave Kilroy via use-livecode
Hi - anyone got news on 'VectorIcon' or whatever it's going to be called? I
was thinking it would arrive with LC (dp11) but it didn't

When using Mark's external that he shared on LC Global I can get it working
in the IDE but it's a no-show on an iOS device (amongst other errors I get
"864,7,1 unable to load sag compiler")

Regards

Dave



-
"The first 90% of the task takes 90% of the time, and the last 10% takes the 
other 90% of the time."
Peter M. Brigham 
--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

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


Re: The coming of SVG

2018-01-05 Thread Dave Kilroy via use-livecode
he he -  that should be "svg compiler"

Dave



-
"The first 90% of the task takes 90% of the time, and the last 10% takes the 
other 90% of the time."
Peter M. Brigham 
--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

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



Re: Cancel browser widget navigation?

2018-01-05 Thread hh via use-livecode
> Trevor D. wrote:
> Other than injecting javascript into each web page that cancels clicks on
> links, is there a way to cancel user clicks on links in a browser widget?

1. Cancel while navigating:
Catch the "current" htmltext:

on browserNavigateBegin
 set the currentHTML of me to the htmltext of me
end browserNavigateBegin

Then cancel with
set the htmltext of widget 1 to the currentHTML of widget 1.

If the navigation is fast this is the same as navigating back.

2. Don't do the navigation in the widget but later on in browsers:
Not really from a widget property. But you could use an attribute that the
widget can't do: to open a new window. This works in "hhTextEditBasic".

set the htmltext of widget 1 to
http://www.screensteps.com"; target="_blank">Trevor's Site

___
use-livecode mailing list
use-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: The coming of SVG

2018-01-05 Thread Mark Waddingham via use-livecode

On 2018-01-05 15:58, Dave Kilroy via use-livecode wrote:
Hi - anyone got news on 'VectorIcon' or whatever it's going to be 
called? I

was thinking it would arrive with LC (dp11) but it didn't


It did - but not in widget form.

There is a script library which compiles an SVG file into a metafile 
format called a 'drawing'.


Then the image object has been prodded so you can set the text of an 
image to said metafile data and it will render the SVG represented by 
it.


Take a look in the dictionary under drawingSvgCompile().

When using Mark's external that he shared on LC Global I can get it 
working
in the IDE but it's a no-show on an iOS device (amongst other errors I 
get

"864,7,1 unable to load sag compiler")


Yes - there was an issue with inclusions in extensions - that should be 
fixed in dp11. However, the support for rendering drawings is in the 
engine - so you only need to include the drawing SVG compiler library if 
you want to compile SVGs on the fly.


Warmest Regards,

Mark.

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

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


Re: Cancel browser widget navigation?

2018-01-05 Thread Trevor DeVore via use-livecode
On Fri, Jan 5, 2018 at 9:01 AM, hh via use-livecode <
use-livecode@lists.runrev.com> wrote:

> > Trevor D. wrote:
> > Other than injecting javascript into each web page that cancels clicks on
> > links, is there a way to cancel user clicks on links in a browser widget?
>
> 1. Cancel while navigating:
> Catch the "current" htmltext:
>
> on browserNavigateBegin
>  set the currentHTML of me to the htmltext of me
> end browserNavigateBegin
>
> Then cancel with
> set the htmltext of widget 1 to the currentHTML of widget 1.
>
> If the navigation is fast this is the same as navigating back.
>

Thanks for responding.

If I understand what you are suggesting then the problem is that the
vertical scroll of the page would be reset. There is no guarantee that the
page load will happen quickly. The user will most likely see the navigation
occur and then the original page refresh. I want to cancel navigation
before it ever occurs.


> 2. Don't do the navigation in the widget but later on in browsers:
> Not really from a widget property. But you could use an attribute that the
> widget can't do: to open a new window. This works in "hhTextEditBasic".
>
> set the htmltext of widget 1 to
> http://www.screensteps.com"; target="_blank">Trevor's Site
>

The browser widget I’m working with is a Froala editor. The user will be
inserting their own content into the browser widget.

-- 
Trevor DeVore
ScreenSteps
www.screensteps.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: Lower part of Script Editor (the one with variabels etc.) disappeared, how to get it back?

2018-01-05 Thread Bob Sneidar via use-livecode
At the bottom of the script window there should be 2 horizontal bars about 3/8 
inch long. This is the handle for the split pane control. 

Bob S


> On Jan 5, 2018, at 04:11 , Klaus major-k via use-livecode 
>  wrote:
> 
> Hi friends,
> 
> the subject says it all.
> 
> Out of a sudden*** the lower part of the script editor diappeared
> from his machine. The part with the variables, Find etc.
> How can we get it back? We really cannot debug this way :-/
> 
> He is using a MacBook and LC 2.18.
> 
> ***We have no idea when and how it disapperaed.
> 
> Thanks for any hint!
> 
> 
> Best
> 
> Klaus
> --
> Klaus Major
> http://www.major-k.de
> kl...@major-k.de
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Re: How to tell if it's a datagrid

2018-01-05 Thread Bob Sneidar via use-livecode
Hi Craig. Thanks for the reply. 

One of the goals of any utility script I write is to make it usable in any 
circumstance. Using naming conventions violates this principle. However your 
first comment seems like it would work. There is only one control where the 
dgProp ["control type"] is "data grid" but not for the owner, and that is the 
datagrid itself. That might do the trick! I must have been in a coding fog not 
to think of that yesterday afternoon. It's been getting foggy of late. ;-)

Bob S


> On Jan 4, 2018, at 21:06 , dunbarx via use-livecode 
>  wrote:
> 
> Hi.
> 
> Can you both check dgProp ["control type"] AND see if the owner of that
> control is a group where that property also exists?
> 
> Or, and I hesitate to mention it, why not just either name all your DG's a
> certain way, or set a custom property for each of them? After all, you had
> to have created them in the first place.
> 
> Perhaps this exercise comes after the fact?
> 
> Craig Newman  


___
use-livecode mailing list
use-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 it's a datagrid

2018-01-05 Thread Bob Sneidar via use-livecode
Thanks all for the replies. I guess everyone figured it out  but me. :-0

Bob S


> On Jan 5, 2018, at 05:48 , Mike Kerner via use-livecode 
>  wrote:
> 
> uhhh guessing:  can you check if the object has a parent?  If the parent is
> a datagrid, then the object is not a datagrid


___
use-livecode mailing list
use-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: Cancel browser widget navigation?

2018-01-05 Thread hh via use-livecode
> > hh wrote:
> > 2. Don't do the navigation in the widget but later on in browsers:
> > Not really from a widget property. But you could use an attribute that the
> > widget can't do: to open a new window. This works in "hhTextEditBasic".
> >
> > set the htmltext of widget 1 to
> > http://www.screensteps.com"; target="_blank">Trevor's Site
> >
> 
> TD wrote:
> The browser widget I’m working with is a Froala editor. The user will be
> inserting their own content into the browser widget.

Then you could add in "onChange" of the editor an insert of target="_blank".
So the links won't work in the widget but in browsers.
I use this in the free hhTextEdit-Full (to appear) that also does editing like
the paid Froala.
May be similar to this (here written with jQuery), preserving on-page-links:

onChange: function(contents, $editable) {
$('a').each(function () {
if ($(this).attr('href').charAt(0) != '#') $(this).attr('target','_blank');});
}


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

Re: Finding the 'Applications' folder on a Mac

2018-01-05 Thread Bob Sneidar via use-livecode
That IS handy!

Bob S


> On Jan 5, 2018, at 03:08 , Graham Samuel via use-livecode 
>  wrote:
> 
>> ...
>> put specialfolderpath("apps") into tApplicationFolder
>> ...
>> 
>> Found this and more gemns here: 
>> 
>> 
>>> Graham 
>> 
>> Best
>> 
>> Klaus


___
use-livecode mailing list
use-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: Cancel browser widget navigation?

2018-01-05 Thread Trevor DeVore via use-livecode
On Fri, Jan 5, 2018 at 9:45 AM, hh via use-livecode <
use-livecode@lists.runrev.com> wrote:

> > > hh wrote:
> > > 2. Don't do the navigation in the widget but later on in browsers:
> > > Not really from a widget property. But you could use an attribute that
> the
> > > widget can't do: to open a new window. This works in "hhTextEditBasic".
> > >
> > > set the htmltext of widget 1 to
> > > http://www.screensteps.com"; target="_blank">Trevor's Site
> > >
> >
> > TD wrote:
> > The browser widget I’m working with is a Froala editor. The user will be
> > inserting their own content into the browser widget.
>
> Then you could add in "onChange" of the editor an insert of
> target="_blank".
> So the links won't work in the widget but in browsers.
> I use this in the free hhTextEdit-Full (to appear) that also does editing
> like
> the paid Froala.
> May be similar to this (here written with jQuery), preserving
> on-page-links:
>
> onChange: function(contents, $editable) {
> $('a').each(function () {
> if ($(this).attr('href').charAt(0) != '#') $(this).attr('target','_blank'
> );});
> }
>

Yes, I am aware of how to cancel clicks using JavaScript. Remember that my
original post stated that I was looking for a way to cancel navigation
using a method other than JavaScript (which is the solution I’m currently
using) :-)

Ideally the browser widget would allow us to cancel navigation links using
LCS.

-- 
Trevor DeVore
ScreenSteps
www.screensteps.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: The coming of SVG

2018-01-05 Thread Bleiler, Timothy via use-livecode
I’ve been testing this a little and I’ve run into some files that don’t render 
correctly. 

I’ve attached a simple example I found on the internet  that contains this info 
about how it was created - Generator: Adobe Illustrator 22.0.1, SVG Export 
Plug-In . SVG Version: 6.00 Build 0).  

When I tried to display this in the image control as described, I get just an 
outline of the drawing filled black. I’m using Mac OS with Livecode 9.0.0 (dp 
11)

Have I missed a critical part of the process or should this be filed as a bug?







Tim Bleiler, Ph.D.
Instructional Designer, HSIT
University at Buffalo



> On Jan 5, 2018, at 10:03 AM, Mark Waddingham via use-livecode 
>  wrote:
> 
> On 2018-01-05 15:58, Dave Kilroy via use-livecode wrote:
>> Hi - anyone got news on 'VectorIcon' or whatever it's going to be called? I
>> was thinking it would arrive with LC (dp11) but it didn't
> 
> It did - but not in widget form.
> 
> There is a script library which compiles an SVG file into a metafile format 
> called a 'drawing'.
> 
> Then the image object has been prodded so you can set the text of an image to 
> said metafile data and it will render the SVG represented by it.
> 
> Take a look in the dictionary under drawingSvgCompile().
> 
>> When using Mark's external that he shared on LC Global I can get it working
>> in the IDE but it's a no-show on an iOS device (amongst other errors I get
>> "864,7,1 unable to load sag compiler")
> 
> Yes - there was an issue with inclusions in extensions - that should be fixed 
> in dp11. However, the support for rendering drawings is in the engine - so 
> you only need to include the drawing SVG compiler library if you want to 
> compile SVGs on the fly.
> 
> Warmest Regards,
> 
> Mark.
> 
> -- 
> Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-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: Cancel browser widget navigation?

2018-01-05 Thread hh via use-livecode
> Yes, I am aware of how to cancel clicks using JavaScript. Remember that my
> original post stated that I was looking for a way to cancel navigation
> using a method other than JavaScript (which is the solution I’m currently
> using) :-)
> 
> Ideally the browser widget would allow us to cancel navigation links using
> LCS.

Assuming you mean "block" with "cancel".

The browser widget doesn't know anything about what you do in the editor.
It has always the original htmltext you used for starting the editor.

So, how should this work without using a lot of JavaScript (eventually changing 
libbrowser)?
___
use-livecode mailing list
use-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: The coming of SVG

2018-01-05 Thread Bleiler, Timothy via use-livecode
Oops, I guess we can’t send attachments to the list.

Here is a link to the file I tested.  

https://lovesvg.com/2018/01/cat-5169/



Tim Bleiler, Ph.D.
Instructional Designer, HSIT
University at Buffalo



> On Jan 5, 2018, at 11:21 AM, Bleiler, Timothy via use-livecode 
>  wrote:
> 
> I’ve been testing this a little and I’ve run into some files that don’t 
> render correctly. 
> 
> I’ve attached a simple example I found on the internet  that contains this 
> info about how it was created - Generator: Adobe Illustrator 22.0.1, SVG 
> Export Plug-In . SVG Version: 6.00 Build 0).  
> 
> When I tried to display this in the image control as described, I get just an 
> outline of the drawing filled black. I’m using Mac OS with Livecode 9.0.0 (dp 
> 11)
> 
> Have I missed a critical part of the process or should this be filed as a bug?
> 
> 
> 
> 
> 
> 
> 
> Tim Bleiler, Ph.D.
> Instructional Designer, HSIT
> University at Buffalo
> 
> 
> 
>> On Jan 5, 2018, at 10:03 AM, Mark Waddingham via use-livecode 
>>  wrote:
>> 
>> On 2018-01-05 15:58, Dave Kilroy via use-livecode wrote:
>>> Hi - anyone got news on 'VectorIcon' or whatever it's going to be called? I
>>> was thinking it would arrive with LC (dp11) but it didn't
>> 
>> It did - but not in widget form.
>> 
>> There is a script library which compiles an SVG file into a metafile format 
>> called a 'drawing'.
>> 
>> Then the image object has been prodded so you can set the text of an image 
>> to said metafile data and it will render the SVG represented by it.
>> 
>> Take a look in the dictionary under drawingSvgCompile().
>> 
>>> When using Mark's external that he shared on LC Global I can get it working
>>> in the IDE but it's a no-show on an iOS device (amongst other errors I get
>>> "864,7,1 unable to load sag compiler")
>> 
>> Yes - there was an issue with inclusions in extensions - that should be 
>> fixed in dp11. However, the support for rendering drawings is in the engine 
>> - so you only need to include the drawing SVG compiler library if you want 
>> to compile SVGs on the fly.
>> 
>> Warmest Regards,
>> 
>> Mark.
>> 
>> -- 
>> Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
>> LiveCode: Everyone can create apps
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-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: Lower part of Script Editor (the one with variabels etc.) disappeared, how to get it back?

2018-01-05 Thread dunbarx via use-livecode
Klaus is new at this.

Be patient with him

Craig



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

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


Re: Cancel browser widget navigation?

2018-01-05 Thread Trevor DeVore via use-livecode
On Fri, Jan 5, 2018 at 10:23 AM, hh via use-livecode <
use-livecode@lists.runrev.com> wrote:

> The browser widget doesn't know anything about what you do in the editor.
> It has always the original htmltext you used for starting the editor.
>
> So, how should this work without using a lot of JavaScript (eventually
> changing libbrowser)?


The same way that browserLoadRequest works for the iOS mobile browser. If
you don’t pass the message then the url isn’t loaded.

-- 
Trevor DeVore
ScreenSteps
www.screensteps.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: Cancel browser widget navigation?

2018-01-05 Thread hh via use-livecode
> > So, how should this work without using a lot of JavaScript (eventually
> > changing libbrowser)?
> 
> The same way that browserLoadRequest works for the iOS mobile browser. If
> you don’t pass the message then the url isn’t loaded.

This works from a WYSIWYG editor?
___
use-livecode mailing list
use-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: The coming of SVG

2018-01-05 Thread Mark Waddingham via use-livecode

On 2018-01-05 17:21, Bleiler, Timothy via use-livecode wrote:

I’ve been testing this a little and I’ve run into some files that
don’t render correctly.

I’ve attached a simple example I found on the internet  that contains
this info about how it was created - Generator: Adobe Illustrator
22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0).

When I tried to display this in the image control as described, I get
just an outline of the drawing filled black. I’m using Mac OS with
Livecode 9.0.0 (dp 11)

Have I missed a critical part of the process or should this be filed as 
a bug?


Please do file a bug with the SVG attached as an example.

In this case, it isn't working correctly because that SVG uses a 

Re: Cancel browser widget navigation?

2018-01-05 Thread Trevor DeVore via use-livecode
On Fri, Jan 5, 2018 at 10:45 AM, hh via use-livecode <
use-livecode@lists.runrev.com> wrote:

> > > So, how should this work without using a lot of JavaScript (eventually
> > > changing libbrowser)?
> >
> > The same way that browserLoadRequest works for the iOS mobile browser. If
> > you don’t pass the message then the url isn’t loaded.
>
> This works from a WYSIWYG editor?


I assume it would work from any link clicked on in the mobile browser. In
the case of the mobile browser control on iOS webView notifies the instance
when the browser is being asked to load a url. The implementor (LiveCode in
this case) can say yes or no. LiveCode is dispatching the
browserLoadRequest message so that we can determine if the url should be
loaded using LCS. If we define the browserLoadRequest message in LCS but
don’t pass it then LiveCode tells webView not to load the url.

It would be nice to be able to do the same thing using the browser widget.

-- 
Trevor DeVore
ScreenSteps
www.screensteps.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

Function for returning a list of objects on a card

2018-01-05 Thread Bob Sneidar via use-livecode
Hi all. 

I put together a couple of handlers that will return all the objects on a card 
in the form of an array whose elements are the objects names as a return 
delimited list, the Long IDs as a return delimited list and an array of the 
properties of each object which properties are passed in a parameter. The 
syntax is:

put getCardObjects(pCardID, "rect,visible,owner") into aCardObjects

Set the second parameter to whatever properties you want returned. But here's 
the problem. The owner property returns empty. It works fine when I use the 
message box, but not in the script. That has to be a bug. Here is the code. If 
someone can verify they have the same problem and it is not an issue with my 
code, then I will post a bug report with a sample stack. Nothing on the QCC I 
can find. Put the following in a button on any card with objects: 

on mouseUp pButtonNumber
   put getParentCard(the long id of me) into pCardID
   put getCardObjects(pCardID, "rect,visible,owner") into aCardObjects
   breakpoint
end mouseUp

function getParentCard pObjectID
   put offset("card id", pObjectID) into tStartChar
   put char tStartChar to -1 of pObjectID into tCardID
   return tCardID
end getParentCard

function getCardObjects pCardLongId, pPropList   
   repeat with i = 1 to the num of controls in pCardLongId
  put the long id of control i of pCardLongID into tControl
  put the name of tControl into tControlName
  
  switch
 case the dgProp ["control type"] of tControl is "data grid" and \
   the dgProp ["control type"] of the owner of tControl is "data 
grid"
 next repeat -- This is a control of a datagrid. We only want the 
datagrid itself.
 break
  case the dgProp ["control type"] of tControl is "data grid" and \
not (the dgProp ["control type"] of the owner of tControl is "data 
grid") 
  -- this is a datagrid
  add 1 to tCounter
  getObjectProps tControl, tControlName, tCounter, pPropList, aObjectData
  put tControlName & cr after tObjectNames
  put tControl & return after tTempObjectList
  next repeat
  break
end switch

-- what remains is a field, button or graphic object
add 1 to tCounter
getObjectProps tControl, tControlName, tCounter, pPropList, aObjectData
put tControlName & cr after tObjectNames
put tControl & return after tTempObjectList
end repeat

put tObjectNames into aObjects ["names"]
put tTempObjectList into aObjects ["IDs"]
put aObjectData into aObjects ["props"]
return aObjects
end getCardObjects

on getObjectProps pControl, pControlName, pIndex, pPropList, @aObjectData
   repeat for each item tProp in pPropList
  put the tProp of pControl into aObjectData [pIndex] [pControlName] [tProp]
   end repeat
end getObjectProps
___
use-livecode mailing list
use-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: The coming of SVG

2018-01-05 Thread Bleiler, Timothy via use-livecode
Thank you, Mark.

This is bug report 20832. I included your response in the description.


> On Jan 5, 2018, at 11:54 AM, Mark Waddingham via use-livecode 
>  wrote:
> 
> On 2018-01-05 17:21, Bleiler, Timothy via use-livecode wrote:
>> I’ve been testing this a little and I’ve run into some files that
>> don’t render correctly.
>> I’ve attached a simple example I found on the internet  that contains
>> this info about how it was created - Generator: Adobe Illustrator
>> 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0).
>> When I tried to display this in the image control as described, I get
>> just an outline of the drawing filled black. I’m using Mac OS with
>> Livecode 9.0.0 (dp 11)
>> Have I missed a critical part of the process or should this be filed as a 
>> bug?
> 
> Please do file a bug with the SVG attached as an example.
> 
> In this case, it isn't working correctly because that SVG uses a 

Re: How to tell if it's a datagrid

2018-01-05 Thread Mike Kerner via use-livecode
oh somebody's building a toy that we're all going to get to play with
soon...

On Fri, Jan 5, 2018 at 10:41 AM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Thanks all for the replies. I guess everyone figured it out  but me. :-0
>
> Bob S
>
>
> > On Jan 5, 2018, at 05:48 , Mike Kerner via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > uhhh guessing:  can you check if the object has a parent?  If the parent
> is
> > a datagrid, then the object is not a datagrid
>
>
> ___
> use-livecode mailing list
> use-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: Function for returning a list of objects on a card

2018-01-05 Thread Mike Kerner via use-livecode
if you don't want to wait, read the project browser code.

On Fri, Jan 5, 2018 at 12:10 PM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi all.
>
> I put together a couple of handlers that will return all the objects on a
> card in the form of an array whose elements are the objects names as a
> return delimited list, the Long IDs as a return delimited list and an array
> of the properties of each object which properties are passed in a
> parameter. The syntax is:
>
> put getCardObjects(pCardID, "rect,visible,owner") into aCardObjects
>
> Set the second parameter to whatever properties you want returned. But
> here's the problem. The owner property returns empty. It works fine when I
> use the message box, but not in the script. That has to be a bug. Here is
> the code. If someone can verify they have the same problem and it is not an
> issue with my code, then I will post a bug report with a sample stack.
> Nothing on the QCC I can find. Put the following in a button on any card
> with objects:
>
> on mouseUp pButtonNumber
>put getParentCard(the long id of me) into pCardID
>put getCardObjects(pCardID, "rect,visible,owner") into aCardObjects
>breakpoint
> end mouseUp
>
> function getParentCard pObjectID
>put offset("card id", pObjectID) into tStartChar
>put char tStartChar to -1 of pObjectID into tCardID
>return tCardID
> end getParentCard
>
> function getCardObjects pCardLongId, pPropList
>repeat with i = 1 to the num of controls in pCardLongId
>   put the long id of control i of pCardLongID into tControl
>   put the name of tControl into tControlName
>
>   switch
>  case the dgProp ["control type"] of tControl is "data grid" and \
>the dgProp ["control type"] of the owner of tControl is
> "data grid"
>  next repeat -- This is a control of a datagrid. We only want the
> datagrid itself.
>  break
>   case the dgProp ["control type"] of tControl is "data grid" and \
> not (the dgProp ["control type"] of the owner of tControl is
> "data grid")
>   -- this is a datagrid
>   add 1 to tCounter
>   getObjectProps tControl, tControlName, tCounter, pPropList,
> aObjectData
>   put tControlName & cr after tObjectNames
>   put tControl & return after tTempObjectList
>   next repeat
>   break
> end switch
>
> -- what remains is a field, button or graphic object
> add 1 to tCounter
> getObjectProps tControl, tControlName, tCounter, pPropList, aObjectData
> put tControlName & cr after tObjectNames
> put tControl & return after tTempObjectList
> end repeat
>
> put tObjectNames into aObjects ["names"]
> put tTempObjectList into aObjects ["IDs"]
> put aObjectData into aObjects ["props"]
> return aObjects
> end getCardObjects
>
> on getObjectProps pControl, pControlName, pIndex, pPropList, @aObjectData
>repeat for each item tProp in pPropList
>   put the tProp of pControl into aObjectData [pIndex] [pControlName]
> [tProp]
>end repeat
> end getObjectProps
> ___
> use-livecode mailing list
> use-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: Function for returning a list of objects on a card

2018-01-05 Thread Bob Sneidar via use-livecode
Thanks Mike, but code in which object? The Stack and Card scripts are empty. I 
know the Search stack displays the owner. I will check that out. 

Bob S


> On Jan 5, 2018, at 09:20 , Mike Kerner via use-livecode 
>  wrote:
> 
> if you don't want to wait, read the project browser code.


___
use-livecode mailing list
use-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: Lower part of Script Editor (the one with variabels etc.) disappeared, how to get it back?

2018-01-05 Thread Klaus major-k via use-livecode
Hi Bob,

> Am 05.01.2018 um 16:34 schrieb Bob Sneidar via use-livecode 
> :
> 
> At the bottom of the script window there should be 2 horizontal bars about 
> 3/8 inch long. This is the handle for the split pane control. 

thanks,yes, SHOULD be, but isn't! 8-)
We finally trashed the prefs to remoive this inconvenience.

> Bob S
> 
> 
>> On Jan 5, 2018, at 04:11 , Klaus major-k via use-livecode 
>>  wrote:
>> 
>> Hi friends,
>> 
>> the subject says it all.
>> 
>> Out of a sudden*** the lower part of the script editor diappeared
>> from his machine. The part with the variables, Find etc.
>> How can we get it back? We really cannot debug this way :-/
>> 
>> He is using a MacBook and LC 2.18.
>> 
>> ***We have no idea when and how it disapperaed.
>> 
>> Thanks for any hint!

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-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: Lower part of Script Editor (the one with variabels etc.) disappeared, how to get it back?

2018-01-05 Thread Klaus major-k via use-livecode
Hi Craig,

> Am 05.01.2018 um 17:32 schrieb dunbarx via use-livecode 
> :
> 
> Klaus is new at this.
> Be patient with him

thank you, you are very kind! 8-)

> Craig

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-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: Function for returning a list of objects on a card

2018-01-05 Thread Bob Sneidar via use-livecode
Here is a workaround. Replace the getObjectProps function with the following 
function. I suspect there are other properties that will return empty instead 
of what they should. Apparently the long id will return empty too:

on getObjectProps pControl, pControlName, pIndex, pPropList, @aObjectData
   repeat for each item tProp in pPropList
  put pControlName into aObjectData [pIndex] ["controlname"]

  if tProp is "long id" then
 put pControl into aObjectData [pIndex] [tProp]
  else if tProp is "owner" then
 set wholeMatches to true
 put wordOffset("of", pControl) into tFoundWord
 if tFoundWord = 0 then
put empty into aObjectData [pIndex] [tProp]
 else
put word tFoundWord +1 to -1 of pControl into tOwnerID
put the name of tOwnerID into aObjectData [pIndex] [tProp]
 end if
  else
 put the tProp of pControl into aObjectData [pIndex] [tProp]
  end if
   end repeat
end getObjectProps

> On Jan 5, 2018, at 09:10 , Bob Sneidar via use-livecode 
>  wrote:
> 
> Hi all. 
> 
> I put together a couple of handlers that will return all the objects on a 
> card in the form of an array whose elements are the objects names as a return 
> delimited list, the Long IDs as a return delimited list and an array of the 
> properties of each object which properties are passed in a parameter. The 
> syntax is:
> 
> put getCardObjects(pCardID, "rect,visible,owner") into aCardObjects


___
use-livecode mailing list
use-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: The coming of SVG

2018-01-05 Thread Dave Kilroy via use-livecode
Brilliant thanks Mark! :)

Kind regards

Dave



-
"The first 90% of the task takes 90% of the time, and the last 10% takes the 
other 90% of the time."
Peter M. Brigham 
--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

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


SQL Query not working

2018-01-05 Thread Bob Sneidar via use-livecode
Hi all. 

I know I'm missing something here, but this query works in an SQL editor, but 
does NOT work with revDBExecute():

create table "arraydata"
("recordid" NUMERIC PRIMARY KEY NOT NULL UNIQUE,
"rect" VARCHAR,
"controlname" VARCHAR,
"owner" VARCHAR,
"visible" VARCHAR)

put revOpenDatabase("sqlite", "MEMORY") into tDBID -- verified tDBID returns a 
number
put revDBExecute(tDBID, tCreateCommand) into tResult -- verified tCreateCommand 
is EXACTLY what worked in SQL Editor

The error I get in a try/catch construct is 
219,1198,14,revDBExecute

465,1198,14

No very descriptive. 

Any ideas?

Bob S
___
use-livecode mailing list
use-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: SQL Query not working

2018-01-05 Thread Bob Sneidar via use-livecode
OK So I just determined that I'm a moron. It's not revDBExecute it's 
revDB_Execute. DOH!

Bob S

> On Jan 5, 2018, at 11:04 , Bob Sneidar via use-livecode 
>  wrote:
> 
> Hi all. 
> 
> I know I'm missing something here, but this query works in an SQL editor, but 
> does NOT work with revDBExecute():
> 
> create table "arraydata"
> ("recordid" NUMERIC PRIMARY KEY NOT NULL UNIQUE,
> "rect" VARCHAR,
> "controlname" VARCHAR,
> "owner" VARCHAR,
> "visible" VARCHAR)
> 
> put revOpenDatabase("sqlite", "MEMORY") into tDBID -- verified tDBID returns 
> a number
> put revDBExecute(tDBID, tCreateCommand) into tResult -- verified 
> tCreateCommand is EXACTLY what worked in SQL Editor
> 
> The error I get in a try/catch construct is 
> 219,1198,14,revDBExecute
> 
> 465,1198,14
> 
> No very descriptive. 
> 
> Any ideas?
> 
> Bob S
> ___
> use-livecode mailing list
> use-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: SQL Query not working

2018-01-05 Thread Dr. Hawkins via use-livecode
On Fri, Jan 5, 2018 at 11:04 AM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

>
> put revOpenDatabase("sqlite", "MEMORY") into tDBID -- verified tDBID
> returns a number
>
> I think you need ":MEMORY:" rather than "MEMORY"


-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Visibility problem

2018-01-05 Thread Graham Samuel via use-livecode
I have a substack which is supposed to contain logging data. It’s got a single 
card and a single scrolling field. Being at an early stage of development, I 
have this bit of code to be sure it’s working:

put empty into fld "TheLog" of cd "Log" of stack "TheUninstallLog"

set the visible of stack "TheUninstallLog" to true

put the visible of stack "TheUninstallLog"

answer "We should see the log window now! Its visibility is" && (the vis of 
stack "TheUninstallLog")


Under the IDE, I do indeed see the stack, but in a standalone, I get the 
‘answer’ output showing the visibility to be true, but it remains invisible.

What did I do wrong?

TIA

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

Trying to delete a Mac application

2018-01-05 Thread Graham Samuel via use-livecode
Thanks to Klaus and Ken, I know how to address the Mac Applications folder. But 
when I try to delete an app (which I take to be a folder of the form xxx.app) 
by script, I get a result “can’t delete that file”. But as a user -admittedly 
with admin privileges - I can move any app into the trash.

What am doing wrong?

Graham
___
use-livecode mailing list
use-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: Visibility problem

2018-01-05 Thread Mike Kerner via use-livecode
did you bring the stack to the front?

On Fri, Jan 5, 2018 at 3:18 PM, Graham Samuel via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I have a substack which is supposed to contain logging data. It’s got a
> single card and a single scrolling field. Being at an early stage of
> development, I have this bit of code to be sure it’s working:
>
> put empty into fld "TheLog" of cd "Log" of stack "TheUninstallLog"
>
> set the visible of stack "TheUninstallLog" to true
>
> put the visible of stack "TheUninstallLog"
>
> answer "We should see the log window now! Its visibility is" && (the vis
> of stack "TheUninstallLog")
>
>
> Under the IDE, I do indeed see the stack, but in a standalone, I get the
> ‘answer’ output showing the visibility to be true, but it remains invisible.
>
> What did I do wrong?
>
> TIA
>
> Graham
> ___
> use-livecode mailing list
> use-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: Trying to delete a Mac application

2018-01-05 Thread Klaus major-k via use-livecode
Hi Graham,

> Am 05.01.2018 um 21:23 schrieb Graham Samuel via use-livecode 
> :
> 
> Thanks to Klaus and Ken, I know how to address the Mac Applications folder. 
> But when I try to delete an app (which I take to be a folder of the form 
> xxx.app) by script, I get a result “can’t delete that file”. But as a user 
> -admittedly with admin privileges - I can move any app into the trash.
> 
> What am doing wrong?

no idea, sorry.

But did you try an with AppleScript?
#
tell application "Finder"
  delete file "Application name" of folder "Applications" of startup disk
end tell
#

> Graham

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-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: Trying to delete a Mac application

2018-01-05 Thread J. Landman Gay via use-livecode
OS X locked down the Application folder a while back. I haven't changed the 
permissions so it still asks for authorization when I try to remove an app. 
This will vary by user. But also, when you delete an app, you are the user 
that may have permission, but when the app does it, I don't think you're 
the user any more, the app is, and it may not have permissions to alter 
that folder.


I don't know if the applescript will work but it's worth a try.
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com



On January 5, 2018 2:25:28 PM Graham Samuel via use-livecode 
 wrote:


Thanks to Klaus and Ken, I know how to address the Mac Applications folder. 
But when I try to delete an app (which I take to be a folder of the form 
xxx.app) by script, I get a result “can’t delete that file”. But as a user 
-admittedly with admin privileges - I can move any app into the trash.


What am doing wrong?

Graham
___
use-livecode mailing list
use-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

SQL Insert Syntax

2018-01-05 Thread Bob Sneidar via use-livecode
Can anyone find anything wrong with this sqLite insert statement? 

INSERT INTO arraydata ("rect","controlname","owner","visible") VALUES 
('0,43,500,543','image "fresh_snow.png"','card "Main"','false')

It doesn't generate an error, but neither does it insert anything! There is a 
primary key column that I don't include because it's supposed to auto increment 
automatically if no column/value is supplied. 

Bob S



___
use-livecode mailing list
use-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: SQL Insert Syntax

2018-01-05 Thread Devin Asay via use-livecode
Bob,

Some SQL dialects accept both single and double quotes as string delimiters. 
Might that be the problem?

Devin

On Jan 5, 2018, at 2:16 PM, Bob Sneidar via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

Can anyone find anything wrong with this sqLite insert statement?

INSERT INTO arraydata ("rect","controlname","owner","visible") VALUES 
('0,43,500,543','image "fresh_snow.png"','card "Main"','false')

It doesn't generate an error, but neither does it insert anything! There is a 
primary key column that I don't include because it's supposed to auto increment 
automatically if no column/value is supplied.

Bob S



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

Devin Asay
Director
Office of Digital Humanities
Brigham Young University

___
use-livecode mailing list
use-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: SQL Insert Syntax

2018-01-05 Thread Bob Sneidar via use-livecode
Possibly, but every sqLite reference I've looked at seems to indicate that I 
should enclose string values with single quotes, and since my text contains 
double quotes, I thought that would do the trick. I have tried escaling quotes 
ie. \" but that doesn't work either. 

This BTW is why I use sqlYoga, so I don't have to deal with this syntax crap, 
but I am writing a function that I want to be universally viable. 

Bob S


> On Jan 5, 2018, at 13:18 , Devin Asay via use-livecode 
>  wrote:
> 
> Bob,
> 
> Some SQL dialects accept both single and double quotes as string delimiters. 
> Might that be the problem?
> 
> Devin


___
use-livecode mailing list
use-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: SQL Insert Syntax

2018-01-05 Thread Mike Bonner via use-livecode
Use the placeholder method?
put your data into a numerically keyed array and change the insert to this..
INSERT INTO arraydata ("rect","controlname","owner","visible") VALUES
(:1,:2,:3,:4)

On Fri, Jan 5, 2018 at 2:24 PM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Possibly, but every sqLite reference I've looked at seems to indicate that
> I should enclose string values with single quotes, and since my text
> contains double quotes, I thought that would do the trick. I have tried
> escaling quotes ie. \" but that doesn't work either.
>
> This BTW is why I use sqlYoga, so I don't have to deal with this syntax
> crap, but I am writing a function that I want to be universally viable.
>
> Bob S
>
>
> > On Jan 5, 2018, at 13:18 , Devin Asay via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Bob,
> >
> > Some SQL dialects accept both single and double quotes as string
> delimiters. Might that be the problem?
> >
> > Devin
>
>
> ___
> use-livecode mailing list
> use-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: SQL Insert Syntax

2018-01-05 Thread Devin Asay via use-livecode
Bob,

You could try parameterizing your statements as described in the dictionary. 
Also, you don’t want to quote your column names.

put 0,43,500,543 into tRect
put “image “ & quote & “fresh_now.png” & quote into tObj
put “card “ & quote & “Main” & quote into tCard
put false into tVis
revExecuteSQL myID, "insert into arraydata (rect,controlname,owner,visible) 
values(:1,:2,:3,:4)", “tRect" ,”tObj”,”tCard”, “tVis”

This is also best practice, because it protects against SQL injection attacks. 
(Admittedly more of a concern with network databases.)

HTH

Devin


> On Jan 5, 2018, at 2:24 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> Possibly, but every sqLite reference I've looked at seems to indicate that I 
> should enclose string values with single quotes, and since my text contains 
> double quotes, I thought that would do the trick. I have tried escaling 
> quotes ie. \" but that doesn't work either. 
> 
> This BTW is why I use sqlYoga, so I don't have to deal with this syntax crap, 
> but I am writing a function that I want to be universally viable. 
> 
> Bob S
> 
> 
>> On Jan 5, 2018, at 13:18 , Devin Asay via use-livecode 
>>  wrote:
>> 
>> Bob,
>> 
>> Some SQL dialects accept both single and double quotes as string delimiters. 
>> Might that be the problem?
>> 
>> Devin
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

Devin Asay
Director
Office of Digital Humanities
Brigham Young University

___
use-livecode mailing list
use-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: Visibility problem

2018-01-05 Thread J. Landman Gay via use-livecode

On 1/5/18 2:18 PM, Graham Samuel via use-livecode wrote:

I have a substack which is supposed to contain logging data. It’s got a single 
card and a single scrolling field. Being at an early stage of development, I 
have this bit of code to be sure it’s working:

put empty into fld "TheLog" of cd "Log" of stack "TheUninstallLog"

set the visible of stack "TheUninstallLog" to true

put the visible of stack "TheUninstallLog"

answer "We should see the log window now! Its visibility is" && (the vis of stack 
"TheUninstallLog")


Under the IDE, I do indeed see the stack, but in a standalone, I get the 
‘answer’ output showing the visibility to be true, but it remains invisible.

What did I do wrong?


Is the stack open? A closed stack can have its visible property set to 
true but it doesn't appear until it's opened.


--
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: Lower part of Script Editor (the one with variabels etc.) disappeared, how to get it back?

2018-01-05 Thread hh via use-livecode
> Klaus wrote:
> He is using a MacBook and LC 2.18.

Hi Klaus,

where can I find LC 2.18? Is this a private edition?

___
use-livecode mailing list
use-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: SQL Insert Syntax

2018-01-05 Thread Mike Kerner via use-livecode
the only problem is your quoted column names.

On Fri, Jan 5, 2018 at 4:38 PM, Devin Asay via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Bob,
>
> You could try parameterizing your statements as described in the
> dictionary. Also, you don’t want to quote your column names.
>
> put 0,43,500,543 into tRect
> put “image “ & quote & “fresh_now.png” & quote into tObj
> put “card “ & quote & “Main” & quote into tCard
> put false into tVis
> revExecuteSQL myID, "insert into arraydata (rect,controlname,owner,visible)
> values(:1,:2,:3,:4)", “tRect" ,”tObj”,”tCard”, “tVis”
>
> This is also best practice, because it protects against SQL injection
> attacks. (Admittedly more of a concern with network databases.)
>
> HTH
>
> Devin
>
>
> > On Jan 5, 2018, at 2:24 PM, Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Possibly, but every sqLite reference I've looked at seems to indicate
> that I should enclose string values with single quotes, and since my text
> contains double quotes, I thought that would do the trick. I have tried
> escaling quotes ie. \" but that doesn't work either.
> >
> > This BTW is why I use sqlYoga, so I don't have to deal with this syntax
> crap, but I am writing a function that I want to be universally viable.
> >
> > Bob S
> >
> >
> >> On Jan 5, 2018, at 13:18 , Devin Asay via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >>
> >> Bob,
> >>
> >> Some SQL dialects accept both single and double quotes as string
> delimiters. Might that be the problem?
> >>
> >> Devin
> >
> >
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> Devin Asay
> Director
> Office of Digital Humanities
> Brigham Young University
>
> ___
> use-livecode mailing list
> use-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: Lower part of Script Editor (the one with variabels etc.) disappeared, how to get it back?

2018-01-05 Thread Klaus major-k via use-livecode
Hi Hermann,

> Am 05.01.2018 um 22:57 schrieb hh via use-livecode 
> :
> 
>> Klaus wrote:
>> He is using a MacBook and LC 2.18.
> 
> Hi Klaus,
> 
> where can I find LC 2.18? Is this a private edition?

yes, very private, but its functionality equals to the stock version of 
Livecode 8.1.8! 
8-)


Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-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: SQL Insert Syntax

2018-01-05 Thread Bob Sneidar via use-livecode
Thanks for your help all. 

I think with everyone's help I have it working, but now I am trying to use a 
memory based database using :MEMORY: for the database name. I ensured all 
databases are closed using revOpenDatabases() which returns empty. But now each 
time I attempt to create the database I get the result "table "array data" 
already exists. I though closing a memory database deletes it from memory. If 
not, how do you clear a memory database?

Bob S

> On Jan 5, 2018, at 13:38 , Devin Asay via use-livecode 
>  wrote:
> 
> Bob,
> 
> You could try parameterizing your statements as described in the dictionary. 
> Also, you don’t want to quote your column names.
> 
> put 0,43,500,543 into tRect
> put “image “ & quote & “fresh_now.png” & quote into tObj
> put “card “ & quote & “Main” & quote into tCard
> put false into tVis
> revExecuteSQL myID, "insert into arraydata (rect,controlname,owner,visible) 
> values(:1,:2,:3,:4)", “tRect" ,”tObj”,”tCard”, “tVis”
> 
> This is also best practice, because it protects against SQL injection 
> attacks. (Admittedly more of a concern with network databases.)
> 
> HTH
> 
> Devin

___
use-livecode mailing list
use-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: SQL Insert Syntax

2018-01-05 Thread Bob Sneidar via use-livecode
For now I am just dropping the table and recreating it. 

Bob S


> On Jan 5, 2018, at 14:28 , Bob Sneidar via use-livecode 
>  wrote:
> 
> Thanks for your help all. 
> 
> I think with everyone's help I have it working, but now I am trying to use a 
> memory based database using :MEMORY: for the database name. I ensured all 
> databases are closed using revOpenDatabases() which returns empty. But now 
> each time I attempt to create the database I get the result "table "array 
> data" already exists. I though closing a memory database deletes it from 
> memory. If not, how do you clear a memory database?
> 
> Bob S
> 


___
use-livecode mailing list
use-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: SQL Insert Syntax

2018-01-05 Thread Bob Sneidar via use-livecode
Hi all. 

Here's a new toy for everyone to play with. It takes a numbered array of 
key/value pairs and converts it to a MEMORY database. Why you ask? So you can 
query against it of course! 

In my particular case I am getting an array of every object on a card EXCLUDING 
objects that are elements of a datagrid (that would be way too much data for me 
to care about) so I can query against it. For instance, given one of the 
columns is the name of the object and I want all the images, I can query for 
all image records:

select * from arraydata where name LIKE 'image %'

You can see how handy this would be, rather than iterating through every 
element of an array to find ONLY the array records you want. 

Here's the code:

function arrayToMemoryDB aArrayData
   put the keys of aArrayData into tArrayKeys
   sort tArrayKeys numeric ascending
   put ":MEMORY:" into tDBFile
   put revOpenDatabase("sqlite", tDBFile) into tDBID
   put "drop table arraydata" into tDropSQL
   
   try
  revExecuteSQL tDBID, tDropSQL
  put  the result into tResult
   catch tError
   end try
   
   -- create the table
   put "create table" && quote & "arraydata" & quote & cr \
 into tCreateCommand
   put "(" & quote & "recordid" & quote && "NUMERIC PRIMARY KEY NOT NULL 
UNIQUE, " & cr \
 after tCreateCommand
  
  put the keys of aArrayData [1] into tRecordKeyList
  
  repeat for each line tRecordKey in tRecordKeyList
 put quote & tRecordKey & quote && "VARCHAR, " & cr after tCreateCommand
  end repeat
  
  delete char -3 to -1 of tCreateCommand
  put ")" after tCreateCommand
  
  try
 revExecuteSQL tDBID, tCreateCommand 
 put the result into tResult
 if tResult is not 0 then breakpoint
  catch tError
 breakpoint
  end try
  
  -- insert data
  repeat for each line tKey in tArrayKeys
 put aArrayData [tKey] into aRecordData
 put 1 into tCounter
 put "recordid" into item tCounter of tColumns
 put ":" & tCounter into item tCounter of tColumnData
 put tKey into aColumnData [tCounter]
 
 repeat for each line tRecordKey in tRecordKeyList
add 1 to tCounter
put tRecordKey into item tCounter of tColumns
put ":" & tCounter into item tCounter of tColumnData
put aRecordData [tRecordKey] into aColumnData [tCounter]
 end repeat
 
 put "(" & tColumns & ")" into tColumns
 put "(" & tColumnData & ")" into tColumnData
 put "insert into arraydata" && tColumns && "VALUES" && tColumnData 
into tInsertSQL
 replace quote with "\" & quote in tInsertSQL
 replace "'" with quote in tInsertSQL
 
 try
revExecuteSQL tDBID, tInsertSQL, "aColumnData"
put the result into tResult
if tResult is not 1 then breakpoint
 catch tError
breakpoint
 end try
  end repeat
  
  return tDBID
   end arrayToMemoryDB


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


HHTextEditFull

2018-01-05 Thread hh via use-livecode
HHTextEditFull v1.3.6 builds upon HHTextEditBasic and

= uses the _livecode.com_ browser widget
= uses the _summernote.org_ editor
= Snippets of Bootstrap3 by _w3schools.com_
= uses the _codemirror.net_ code editor
= uses the _khan.github.io/KaTeX_ TeX engine

Download from "Sample stacks" of the LC toolbar or
http://livecodeshare.runrev.com/stack/861/HHTextEditFull

Help is included in the editor.
There are such a lot of features. I couldn't test all.

Testing results, using LC 8.1.8 and LC 9.0.0-dp11:
= on MacOS 10.13.2: no issues
= on Win 7 and Win 10: rarely (irrelevant) messages from
the browser widget
= linux: Mint173c-32bit and Ubuntu/Xubuntu 16.04-64 bit:
The image dialog for embedding local images (base64 encoded)
doesn't work. I'll work around that in a future version.

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


iOS Profile Menu

2018-01-05 Thread Roger Guay via use-livecode
Hi Folks,

Once again, I’m trying to figure out the Apple maze for developing on iOS. Fat 
chance, eh?

Can someone please tell me where the items of the Profile menu in the 
Standalone Application Settings come from? Nothing I do has any effect on that 
pulldown menu, and I’ve been messing with this for days!!!


TIA,
ROger
___
use-livecode mailing list
use-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 Profile Menu

2018-01-05 Thread Brian Milby via use-livecode
Are you talking about Property Profiles on the General Tab? Also which
version of LC?

For that, see the “profile library” association in the dictionary (9.0DP11).
On Fri, Jan 5, 2018 at 10:19 PM Roger Guay via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Folks,
>
> Once again, I’m trying to figure out the Apple maze for developing on iOS.
> Fat chance, eh?
>
> Can someone please tell me where the items of the Profile menu in the
> Standalone Application Settings come from? Nothing I do has any effect on
> that pulldown menu, and I’ve been messing with this for days!!!
>
>
> TIA,
> ROger
> ___
> use-livecode mailing list
> use-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