Re: Stuck on native database functions

2021-07-07 Thread Terence Heaford via use-livecode
It also seems to do the escaping for you as it handled text containing commas 
in the description

All the best

Terry


> On 7 Jul 2021, at 16:40, Terence Heaford via use-livecode 
>  wrote:
> 
> The routine I have working is
> 
> put "uniqueID,date,type,description,amount,balance,category" into tFields
> 
> put merge("INSERT INTO [[tAccountName]] ([[tFields]]) 
> VALUES(:1,:2,:3,:4,:5,:6,:7)") into tSQL
> 
> revExecuteSQL dbGetID(), tSQL, "tValues[uniqueID]", "tValues[date]", 
> "tValues[type]", "tValues[description]", "tValues[amount]", 
> "tValues[balance]","tValues[category]"
> 
> put the result into tErr
> 
> return tErr
> 
> 
> It resolves the error I was getting relating to autoincrement.

___
use-livecode mailing list
use-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: Stuck on native database functions

2021-07-07 Thread Terence Heaford via use-livecode
Mark, it certainly helps me.

The routine I have working is

put "uniqueID,date,type,description,amount,balance,category" into tFields

put merge("INSERT INTO [[tAccountName]] ([[tFields]]) 
VALUES(:1,:2,:3,:4,:5,:6,:7)") into tSQL

revExecuteSQL dbGetID(), tSQL, "tValues[uniqueID]", "tValues[date]", 
"tValues[type]", "tValues[description]", "tValues[amount]", 
"tValues[balance]","tValues[category]"

put the result into tErr

return tErr


It resolves the error I was getting relating to autoincrement.

Thanks

Terry


> On 7 Jul 2021, at 11:29, Mark Smith via use-livecode 
>  wrote:
> 
> Currently I have this working
> 
> (Content of tSQL :)
> INSERT into TABLE1 ("complete", "todo", "itemDate", "category", "purgeDate", 
> "dgOrder") values(:1, :2, :3, :4, :5, :6)
> 
> 
> revExecuteSQL gConnectID, tSQL, "ptheRowA[complete]", "ptheRowA[todo]", 
> "ptheRowA[itemDate]", "ptheRowA[category]", "ptheRowA[purgeDate]", 
> "ptheRowA[dgOrder]”
> 
> I am not passing the entire array because there are some array elements that 
> I am not saving. If I did want to save/insert the whole array then I would 
> write something like:
> 
> revExecuteSQL gConnectID, tSQL, “ptheRowA”
> 
> Hope that helps,
> Mark

___
use-livecode mailing list
use-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: Stuck on native database functions

2021-07-07 Thread Terence Heaford via use-livecode
Out of interest and not sure if it is relevant but I have received this error:

"table myTable has 8 columns but 7 values were supplied"

Yes the table has 8 columns in total but the first column is

recID integer primary key autoincrement

Surely it should not give this error because I do not provide the value as this 
is autoincrement

All the best

Terry



> On 7 Jul 2021, at 08:50, Terence Heaford via use-livecode 
>  wrote:
> 
> Not sure what to try next

___
use-livecode mailing list
use-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: Stuck on native database functions

2021-07-07 Thread Terence Heaford via use-livecode
Just tried this method

revExecuteSQL myID, "insert into mytable values(:1,:2,:1)", "valueX",”valueY"

It did not work

put 
merge("[[quote]][[tUniqueID]][[quote]],[[quote]][[tDate]][[quote]],[[quote]][[tType]][[quote]],[[quote]][[tDescription]][[quote]],[[quote]][[tAmount]][[quote]],[[quote]][[tBalance]][[quote]],[[quote]][[tCategory]][[quote]]")into
 tValues

put ":1,:2,:3,:4,:5,:6,:7" into tPlaceHolders

put merge("INSERT INTO [[tAccountName]] VALUES([[tPlaceHolders]])") into tSQL

put tSQL & " " & tValues

revExecuteSQL dbGetID(),tSQL,tValues


Not sure what to try next


All the best

Terry

> On 7 Jul 2021, at 08:28, Terence Heaford  wrote:
> 
> I have now tried your method with the tValues array directly and by 
> deconstructing the array as below and it does not work. I have a recollection 
> of not being able to get this to work with an array which is why I did the 
> way I did.
> 
> 
> All the best
> 
> Terry
> 
> put q(tAccountName) into tAccountName
> 
> put q(tValues["uniqueID"]) into tUniqueID
> 
> put q(tValues["date"]) into tDate
> 
> put q(tValues["type"]) into tType
> 
> put q(tValues["description"]) into tDescription
> 
> put q(tValues["amount"]) into tAmount
> 
> put q(tValues["balance"]) into tBalance
> 
> put q(tValues["category"]) into tCategory
> 
> put 
> merge("[[tUniqueID]],[[tDate]],[[tType]],[[tDescription]],[[tAmount]],[[tBalance]],[[tCategory]]”)
>  into tValues
> 
> 
> put ":1,:2,:3,:4,:5,:6,:7" into tPlaceHolders
> 
> put merge("INSERT INTO [[tAccountName]] VALUES([[tPlaceHolders]])") into tSQL
> 
> put tSQL & " " & tValues
> 
> revExecuteSQL dbGetID(),tSQL,tValues
> 
> 
> 
> 
> 
>> On 7 Jul 2021, at 07:52, Terence Heaford via use-livecode 
>> mailto:use-livecode@lists.runrev.com>> wrote:
>> 
>> Here’s an example I have been using, not sure whether it will help:
>> 
>> function dbAddTransaction tAccountName,tValues
>> 
>> put q(tAccountName) into tAccountName
>> 
>> put q(tValues["uniqueID"]) into tUniqueID
>> 
>> put q(tValues["date"]) into tDate
>> 
>> put q(tValues["type"]) into tType
>> 
>> put q(tValues["description"]) into tDescription
>> 
>> put q(tValues["amount"]) into tAmount
>> 
>> put q(tValues["balance"]) into tBalance
>> 
>> put q(tValues["category"]) into tCategory
>> 
>> put "uniqueID,date,type,description,amount,balance,category" into tFields
>> 
>> put 
>> merge("[[tUniqueID]],[[tDate]],[[tType]],[[tDescription]],[[tAmount]],[[tBalance]],[[tCategory]]")into
>>  tValues
>> 
>> put merge("INSERT INTO [[tAccountName]] ([[tFields]]) VALUES([[tValues]])") 
>> into tSQL
>> 
>> revExecuteSQL dbGetID(), tSQL
>> 
>> put the result into tErr
>> 
>> return tErr
>> 
>> end dbAddTransaction
>> 
>> -
>> 
>> function dbEscapeSqlite tText
>> 
>> replace "'" with "''" in tText
>> 
>> return tText
>> 
>> end dbEscapeSqlite
>> 
>> ---
>> 
>> function q tText
>> 
>> return "'" & dbEscapeSqlite(tText) & "'"
>> 
>> end q
>> 
>> ---
>> 
>> 
>> 
>> 
>>> On 7 Jul 2021, at 00:06, Bob Sneidar via use-livecode 
>>> mailto:use-livecode@lists.runrev.com>> 
>>> wrote:
>>> 
>>> Hi all. 
>>> 
>>> I assemble an SQL statement that looks like this: 
>>> 
>>> insert into ObjectProperties (recordid,rect,controlname,owner,visible) 
>>> VALUES (:1,:2,:3,:4,:5)
>>> 
>>> I then execute this statement: 
>>> 
>>> revExecuteSQL tDBID, tInsertSQL, aRecordData
>>> 
>>> I get records but with no data in them. I checked aRecordData and it has 
>>> all 5 columns as keys and data in each of them. 
>>> 
>>> I am at a complete loss. I was sure this was working before, now it is not. 
>>> 
>>> Bob S
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com <mailto:use-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 <mailto:use-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: Stuck on native database functions

2021-07-07 Thread Terence Heaford via use-livecode
I have now tried your method with the tValues array directly and by 
deconstructing the array as below and it does not work. I have a recollection 
of not being able to get this to work with an array which is why I did the way 
I did.


All the best

Terry

put q(tAccountName) into tAccountName

put q(tValues["uniqueID"]) into tUniqueID

put q(tValues["date"]) into tDate

put q(tValues["type"]) into tType

put q(tValues["description"]) into tDescription

put q(tValues["amount"]) into tAmount

put q(tValues["balance"]) into tBalance

put q(tValues["category"]) into tCategory

put 
merge("[[tUniqueID]],[[tDate]],[[tType]],[[tDescription]],[[tAmount]],[[tBalance]],[[tCategory]]”)
 into tValues


put ":1,:2,:3,:4,:5,:6,:7" into tPlaceHolders

put merge("INSERT INTO [[tAccountName]] VALUES([[tPlaceHolders]])") into tSQL

put tSQL & " " & tValues

revExecuteSQL dbGetID(),tSQL,tValues





> On 7 Jul 2021, at 07:52, Terence Heaford via use-livecode 
>  wrote:
> 
> Here’s an example I have been using, not sure whether it will help:
> 
> function dbAddTransaction tAccountName,tValues
> 
> put q(tAccountName) into tAccountName
> 
> put q(tValues["uniqueID"]) into tUniqueID
> 
> put q(tValues["date"]) into tDate
> 
> put q(tValues["type"]) into tType
> 
> put q(tValues["description"]) into tDescription
> 
> put q(tValues["amount"]) into tAmount
> 
> put q(tValues["balance"]) into tBalance
> 
> put q(tValues["category"]) into tCategory
> 
> put "uniqueID,date,type,description,amount,balance,category" into tFields
> 
> put 
> merge("[[tUniqueID]],[[tDate]],[[tType]],[[tDescription]],[[tAmount]],[[tBalance]],[[tCategory]]")into
>  tValues
> 
> put merge("INSERT INTO [[tAccountName]] ([[tFields]]) VALUES([[tValues]])") 
> into tSQL
> 
> revExecuteSQL dbGetID(), tSQL
> 
> put the result into tErr
> 
> return tErr
> 
> end dbAddTransaction
> 
> -
> 
> function dbEscapeSqlite tText
> 
> replace "'" with "''" in tText
> 
> return tText
> 
> end dbEscapeSqlite
> 
> ---
> 
> function q tText
> 
> return "'" & dbEscapeSqlite(tText) & "'"
> 
> end q
> 
> ---
> 
> 
> 
> 
>> On 7 Jul 2021, at 00:06, Bob Sneidar via use-livecode 
>>  wrote:
>> 
>> Hi all. 
>> 
>> I assemble an SQL statement that looks like this: 
>> 
>> insert into ObjectProperties (recordid,rect,controlname,owner,visible) 
>> VALUES (:1,:2,:3,:4,:5)
>> 
>> I then execute this statement: 
>> 
>> revExecuteSQL tDBID, tInsertSQL, aRecordData
>> 
>> I get records but with no data in them. I checked aRecordData and it has all 
>> 5 columns as keys and data in each of them. 
>> 
>> I am at a complete loss. I was sure this was working before, now it is not. 
>> 
>> 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

___
use-livecode mailing list
use-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: Stuck on native database functions

2021-07-07 Thread Terence Heaford via use-livecode
Here’s an example I have been using, not sure whether it will help:

function dbAddTransaction tAccountName,tValues

put q(tAccountName) into tAccountName

put q(tValues["uniqueID"]) into tUniqueID

put q(tValues["date"]) into tDate

put q(tValues["type"]) into tType

put q(tValues["description"]) into tDescription

put q(tValues["amount"]) into tAmount

put q(tValues["balance"]) into tBalance

put q(tValues["category"]) into tCategory

put "uniqueID,date,type,description,amount,balance,category" into tFields

put 
merge("[[tUniqueID]],[[tDate]],[[tType]],[[tDescription]],[[tAmount]],[[tBalance]],[[tCategory]]")into
 tValues

put merge("INSERT INTO [[tAccountName]] ([[tFields]]) VALUES([[tValues]])") 
into tSQL

revExecuteSQL dbGetID(), tSQL

put the result into tErr

return tErr

end dbAddTransaction

-

function dbEscapeSqlite tText

replace "'" with "''" in tText

return tText

end dbEscapeSqlite

---

function q tText

return "'" & dbEscapeSqlite(tText) & "'"

end q

---




> On 7 Jul 2021, at 00:06, Bob Sneidar via use-livecode 
>  wrote:
> 
> Hi all. 
> 
> I assemble an SQL statement that looks like this: 
> 
> insert into ObjectProperties (recordid,rect,controlname,owner,visible) VALUES 
> (:1,:2,:3,:4,:5)
> 
> I then execute this statement: 
> 
> revExecuteSQL tDBID, tInsertSQL, aRecordData
> 
> I get records but with no data in them. I checked aRecordData and it has all 
> 5 columns as keys and data in each of them. 
> 
> I am at a complete loss. I was sure this was working before, now it is not. 
> 
> 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: LiveCode convert seconds to dateItems - year is out by 19?

2021-05-11 Thread Terence Heaford via use-livecode
Could it be something to do with the base date on the mac vs the base date of 
live code?

I believe the base date on a mac is 1970, not sure what it is in live code?

Terry

> On 11 May 2021, at 13:59, Keith Clarke via use-livecode 
>  wrote:
> 
> Thanks Martin & Alex,
> 
> I wasn’t aware of ‘the seconds’ - thanks that’s behaving correctly here. 
> 
> Tracing back from this date conversion being OK to the tCreateDate variable. 
> This is item 4 of the long files, which according to the docs, should be 
> Creation date, in seconds. 
> 
> Bypassing the conversion, this item is the same for all the files in my 
> target folder (some created yesterday & some weeks ago). It has the value 
> 2212122496, which LiveCode converts (reliably!) to 2040,2,6,6,28,16,2.
> 
> Printing out the long files for one of the files in the target folder shows… 
> 
> filename,2055,0,2212122496,1620675773,2212122496,0,501,20,600,ttxtTEXT
> 
> This same weird value is being returned for the Creation Date (item 4) & Last 
> Access date (item 6), though the Last Modified Date (item 5) looks correct.
> 
> Any clues?   
> Best,
> Keith
> 
>> On 11 May 2021, at 13:09, Martin Koob via use-livecode 
>>  wrote:
>> 
>> Hi Keith
>> 
>> I just tried the following
>> 
>> on mouseup
>> 
>>  convert the seconds to dateitems
>> 
>>  put it
>> 
>> end mouseup
>> 
>> The result is 2021,5,11,7,52,5,3  So that is correct.
>> 
>> Where is the value in your tCreateDate variable from.  Maybe there was a 
>> miscalculation there.
>> 
>> Martin
>> 
>>> On May 11, 2021, at 6:44 AM, Keith Clarke via use-livecode 
>>>  wrote:
>>> 
>>> Hi folks,
>>> What am I doing wrong with convert tCreateDate from seconds to dateItems… 
>>> 
>>> I’m pulling the long files of files I created yesterday on a Mac and 
>>> attempting to convert the creation date. 
>>> 
>>> Whatever date type I choose, LiveCode reckons yesterday was in the year 
>>> 2040. Did I oversleep?
>>> Thanks
>>> Keith
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Re: Polygons

2021-04-05 Thread Terence Heaford via use-livecode
I also have concluded this.

If you miss out lines the opaque setting is irrelevant, it functions as being 
false.

Is this a bug?

My work around is two polygons one underneath (filled) and the other on top 
(with lines)

You could just draw lines between the points that need them, using a polygon as 
a line. I have tried this and it does not impact performance.

Thanks for all your help

Terry




> On 4 Apr 2021, at 19:29, Ian McKnight via use-livecode 
>  wrote:
> 
> I would hazard a guess that the fill area needs to be bounded by a line. If
> a line is missing the fill routine can't determine where the edge of the
> fill is and so fails, leaving the grc empty. I may be completely wrong on
> this but it seems logical.
> 
> Not much help I know but if you want to emphasise the edge of the bar could
> the special effects settings help? I haven't tried his but have your bar as
> a filled grc with out an edge and play with internal, external glows and
> shadows etc to emphasise the outline.
> 
> Regards
> 
> Ian

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

2021-04-04 Thread Terence Heaford via use-livecode
OK, I have changed your script by adding these lines to the mouseUp handler

set the backgroundColor of grc "myPoly" to red

set the forecolor of grc "myPoly" to blue


Now if you switch the lines on/off you will see that the fill does not work 
without all lines.

Not sure what this means exactly.

Thanks

Terry


> On 4 Apr 2021, at 18:43, Ian McKnight via use-livecode 
>  wrote:
> 
> I have to say that I'm not seeing this.
> I seem to remember that graphics can't show a fill unless all lines are
> visible.
> As a test I created a graphic called "myPoly" .
> I placed a checkbox called "showSides" (and removed its script)
> in a button I placed the following script:
> 
> -
> 
> *on* mouseUp
> 
> *-- points for a 100 unit square with 4 sides visible*
> 
> *put* "50,50" & "150,50" & "150,150" & "50,150" & "50,50" 
> into tPointsFor4Lines
> 
> *-- points for a 100 unit square with alternate sides visible*
> 
> *put* "50,50" & "150,50" & cr& "150,150" & "50,150"  &
> "50,50"  into tPointsFor2Lines
> 
> *set* the opaque of grc "myPoly" to true *-- ensures fill is visible*
> 
> *if* the hilite of btn "showSides" is true
> 
> *then*
> 
> *set* the points of grc "myPoly" to tPointsFor4Lines *-- all sides showing*
> 
> *else*
> 
> *set* the points of grc "myPoly" to tPointsFor2Lines *-- alternate sides
> showing*
> 
> *end* *if*
> 
> *end* mouseUp
> 
> --
> 
> When you run this and flip between 4 and 2 sides its showing the square is
> drawn correctly,
> 
> 4 sides visible - filled and 2 sides visible - not filled
> 
> If you check the Inspector for the graphic the opaque property hasn't
> changed.
> 
> The only way I can think to overcome this is to create another graphic -
> the same size as your first one, place it underneath your graphic and group
> them together. Then when all sides are visible you can make this background
> graphic invisible and when sides are 'missing' make it visible again to
> provide the fill or simply leave it visible since it won't be seen under
> your original graphic. When sides 'disappear' and the fill disappears this
> graphic will then provide your fill.
> 
> 
> Hope this is of some help
> 
> Regards
> 
> Ian
> 
> 
> On Sun, 4 Apr 2021 at 18:04, Terence Heaford via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> When you do this it appears to affect the fill settings. I lose the fill
>> where there are no lines and the closure of the points also moves.
>> 
>> I can’t believe it’s LC, it must be me. A simple script example would be
>> useful if you have the time.
>> 
>> A square, that’s easy, that has the side lines missing and is filled with
>> a colour.
>> 
>> Regards
>> 
>> Terry
>> 
>> 
>>> On 4 Apr 2021, at 15:39, Ian McKnight via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> By a space I mean a blank line!
>>> Ian
>>> 
>>> On Sun, 4 Apr 2021 at 15:39, Ian McKnight > <mailto:iangmckni...@gmail.com>> wrote:
>>> 
>>>> Hi
>>>> Put a space in-between the points where you want  the line in not be
>>>> drawn. The shape is still constructed but with missing sides.
>>>> 
>>>> Ian
>>>> 
>>>> On Sun, 4 Apr 2021 at 15:02, Terence Heaford via use-livecode <
>>>> use-livecode@lists.runrev.com> wrote:
>>>> 
>>>>> Thanks for that, clearly understood.
>>>>> 
>>>>> To expand on the original question. If you have a hexagon, is it
>>>>> possible  to only draw lines on sides 1,3,5,6 and no lines on sides
>> 2,4.
>>>>> 
>>>>> Thanks Terry
>>>>> 
>>>>>> On 4 Apr 2021, at 12:43, Ian McKnight via use-livecode <
>>>>> use-livecode@lists.runrev.com> wrote:
>>>>>> 
>>>>>> Yes. Polygons use a list of 4 points to describe a triangle. The
>> first
>>>>> and
>>>>>> last are the co-ords of the same vertex to ensure closure.
>>>>>> If the last point is left out then the line between the last vertex
>> and
>>>>> the
>>>>>> first ve

Re: Polygons

2021-04-04 Thread Terence Heaford via use-livecode
Thanks for your example.

I am basic filling underneath a line chart to make an area chart but the 
closing lines to the x-Axis do not have a line.

I concluded to draw a polygon twice once with fill and no lines, filled to the 
x-Axis and overlay it with a similar polygon but not starting/finishing at the 
x-Axis but finishing at the first/last point. (hope this makes sense).

Will play with your example.

Thanks

Terry



> On 4 Apr 2021, at 18:43, Ian McKnight via use-livecode 
>  wrote:
> 
> The only way I can think to overcome this is to create another graphic -
> the same size as your first one, place it underneath your graphic and group
> them together. Then when all sides are visible you can make this background
> graphic invisible and when sides are 'missing' make it visible again to
> provide the fill or simply leave it visible since it won't be seen under
> your original graphic. When sides 'disappear' and the fill disappears this
> graphic will then provide your fill.

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

2021-04-04 Thread Terence Heaford via use-livecode
When you do this it appears to affect the fill settings. I lose the fill where 
there are no lines and the closure of the points also moves.

I can’t believe it’s LC, it must be me. A simple script example would be useful 
if you have the time.

A square, that’s easy, that has the side lines missing and is filled with a 
colour.

Regards

Terry


> On 4 Apr 2021, at 15:39, Ian McKnight via use-livecode 
>  wrote:
> 
> By a space I mean a blank line!
> Ian
> 
> On Sun, 4 Apr 2021 at 15:39, Ian McKnight  <mailto:iangmckni...@gmail.com>> wrote:
> 
>> Hi
>> Put a space in-between the points where you want  the line in not be
>> drawn. The shape is still constructed but with missing sides.
>> 
>> Ian
>> 
>> On Sun, 4 Apr 2021 at 15:02, Terence Heaford via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> 
>>> Thanks for that, clearly understood.
>>> 
>>> To expand on the original question. If you have a hexagon, is it
>>> possible  to only draw lines on sides 1,3,5,6 and no lines on sides 2,4.
>>> 
>>> Thanks Terry
>>> 
>>>> On 4 Apr 2021, at 12:43, Ian McKnight via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
>>>> 
>>>> Yes. Polygons use a list of 4 points to describe a triangle. The first
>>> and
>>>> last are the co-ords of the same vertex to ensure closure.
>>>> If the last point is left out then the line between the last vertex and
>>> the
>>>> first vertex is not drawn.
>>>> So make sure that your list of points doesn't begin with the right angle
>>>> vertex and you're good to go.
>>>> 
>>>> Ian
>>>> 
>>>> 
>>>>> On Sun, 4 Apr 2021 at 12:12, Terence Heaford via use-livecode <
>>>>> use-livecode@lists.runrev.com> wrote:
>>>>> 
>>>>> If I draw a shape using a polygon, as an example assume a right angled
>>>>> triangle.
>>>>> 
>>>>> Is it possible to hide the line between the points that make up the
>>>>> hypotenuse?
>>>>> 
>>>>> Thanks
>>>>> 
>>>>> Terry
>>>>> 
>>>>> 
>>>>> 
>>>>> ___
>>>>> use-livecode mailing list
>>>>> use-livecode@lists.runrev.com
>>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>>> subscription preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>> 
>>>> 
>>>> 
>>>> --
>>>> Regards
>>>> 
>>>> 
>>>> Ian McKnight
>>>> 
>>>> iangmckni...@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
>>> 
>> 
>> 
>> --
>> Regards
>> 
>> 
>> Ian McKnight
>> 
>> iangmckni...@gmail.com
>> ===
>> 
> 
> 
> -- 
> Regards
> 
> 
> Ian McKnight
> 
> iangmckni...@gmail.com <mailto:iangmckni...@gmail.com>
> ===
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode 
> <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: Polygons

2021-04-04 Thread Terence Heaford via use-livecode
Thanks for that, clearly understood.

To expand on the original question. If you have a hexagon, is it possible  to 
only draw lines on sides 1,3,5,6 and no lines on sides 2,4.

Thanks Terry

> On 4 Apr 2021, at 12:43, Ian McKnight via use-livecode 
>  wrote:
> 
> Yes. Polygons use a list of 4 points to describe a triangle. The first and
> last are the co-ords of the same vertex to ensure closure.
> If the last point is left out then the line between the last vertex and the
> first vertex is not drawn.
> So make sure that your list of points doesn't begin with the right angle
> vertex and you're good to go.
> 
> Ian
> 
> 
>> On Sun, 4 Apr 2021 at 12:12, Terence Heaford via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> 
>> If I draw a shape using a polygon, as an example assume a right angled
>> triangle.
>> 
>> Is it possible to hide the line between the points that make up the
>> hypotenuse?
>> 
>> Thanks
>> 
>> Terry
>> 
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> 
> 
> -- 
> Regards
> 
> 
> Ian McKnight
> 
> iangmckni...@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


Polygons

2021-04-04 Thread Terence Heaford via use-livecode
If I draw a shape using a polygon, as an example assume a right angled triangle.

Is it possible to hide the line between the points that make up the hypotenuse?

Thanks

Terry



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


Copy Script vs Behaviours

2021-03-31 Thread Terence Heaford via use-livecode
I have a card with a group which is to hold the objects when I create a chart.

I have pie, bar and line chart substack libraries for each with the code 
contained in the stack script.

When the user changes the type of chart I have been using:

set the script of myGroup to the script of stack myChartLib and to be fair this 
works well.

I have not used behaviours before and have just switched to that method by 
changing the behaviour of the chart object to the substack script and that also 
seems to work, although without doing a test I can’t be sure but changing the 
script does seem a little quicker.

Can anyone provide some insight into any benefit of using one way over the 
other.


Thanks


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


Browser Widget

2021-02-02 Thread Terence Heaford via use-livecode
I believe the Browser Widget uses the native browser and in that case it uses 
the same code as Safari on MacOS?

I have been using CanvasJS to create some charts and have been rendering the 
result in the Browser Widget using Set the URL of …..

These charts have been created on the computer and not via the internet.

Generally they render well except for the animation of the chart.

In Safari it's as smooth as silk.

In the Browser Widget there is some slight stutter that does slightly affect 
the user experience.

Does anyone know why this stutter exists with the Browser Widget and not with 
Safari and is there a solution?


Thanks

Terry



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


Re: lock screen

2021-01-22 Thread Terence Heaford via use-livecode
So a widget is not a real live code object. I presume that the browser widget 
is just an overlaid window without its paraphernalia.

Terry

> On 22 Jan 2021, at 16:57, Tore Nilsen via use-livecode 
>  wrote:
> 
> I forgot to write that you import a snapshot of the widget before you set 
> out to perform the visual effect.
> 
>> 22. jan. 2021 kl. 17:54 skrev Tore Nilsen :
>> 
>> The browser widget is drawn in a layer of its own and is not affected by 
>> lock screen. If you need to do a visual effect you then hide the widget 
>> itself and perform the visual effect on the snapshot. You can then delete 
>> the snapshot when it is no longer needed.
>> 
>> Best regards 
>> Tore Nilsen
>>>> 22. jan. 2021 kl. 17:43 skrev Terence Heaford via use-livecode 
>>>> :
>>> 
>>> Thanks for all the replies.
>>> 
>>> How does lock screen affect widgets?
>>> 
>>> It does not appear to have any effect as if you run a Javascript in a 
>>> Browser having applied lock screen, the Browser widget seems unaffected.
>>> 
>>> Thanks
>>> 
>>> Terry
>>> 
>>>> On 22 Jan 2021, at 16:39, Dan Friedman via use-livecode 
>>>>  wrote:
>>>> 
>>>> Same here.   Anytime I want to lock the screen, I do this:
>>>> 
>>>> on lockTheScreen
>>>> if not the lockScreen then
>>>> lock screen
>>>> end if
>>>> end lockTheScreen
>>>> 
>>>> When needed, I use this:
>>>> 
>>>> on unLockTheScreen
>>>> repeat until not lockScreen
>>>> unlock screen
>>>> end repeat
>>>> end unLockTheScreen
>>>> 
>>>> 
>>>> That's my 2 cents.
>>>> 
>>>> -Dan
>>>> 
>>>> 
>>>> On 1/22/21, 7:38 AM, "use-livecode on behalf of Paul Dupuis via 
>>>> use-livecode" >>> use-livecode@lists.runrev.com> wrote:
>>>> 
>>>> When I have a handler that needs to lock the screen I will often do the 
>>>> following
>>>> 
>>>> begins handler
>>>> 
>>>> put the lockScreen into tPreserveLockScreen
>>>> if not tPreserveLockScreen then lock screen
>>>> ...
>>>> code
>>>> ...
>>>> if not tPreserveLockScreen then unlock screen
>>>> 
>>>> end handler
>>>> 
>>>> Code in our main LC app is large enough that there are instances where 
>>>> the some code that calls the handler needs to lock the screen and other 
>>>> code that call it does not, but the handler always wants to hide changed 
>>>> until done.
>>>> 
>>>> 
>>>> On 1/22/2021 9:24 AM, Craig newman via use-livecode wrote:
>>>>> Something else you might want to to know, though it may only be academic.
>>>>> 
>>>>> LockScreen commands are queued. So if you lock the screen twice, you have 
>>>>> to explicitly unlock twice in order to clear the locked state.
>>>>> 
>>>>> It does not matter what happens in the flow of code in terms of screen 
>>>>> locking, whether other command or function calls are made. The queue 
>>>>> rules throughout. All is reset at idle time.
>>>>> 
>>>>> Craig
>>>>> 
>>>>> -Original Message-
>>>>> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On 
>>>>> Behalf Of Brian Milby via use-livecode
>>>>> Sent: Friday, January 22, 2021 6:50 AM
>>>>> To: How to use LiveCode 
>>>>> Cc: Brian Milby 
>>>>> Subject: Re: lock screen
>>>>> 
>>>>> I’m sure someone else can be more clear, but when the engine gets to an 
>>>>> idle state then locks should be cleared.  In your example, it would 
>>>>> probably clear at the end of that mouseUp handler, but aTest would 
>>>>> completely run with the screen locked.
>>>>> 
>>>>> Sent from my iPhone
>>>>> 
>>>>>> On Jan 22, 2021, at 3:57 AM, Terence Heaford via use-livecode 
>>>>>>  wrote:
>>>>>> 
>>>>>> Just looking for clarity with regard to lock screen.
>>>>>> 
>>>>>> Is there only one state for the screen, either locked or not locked and 
>>>>>> when is that 

Re: lock screen

2021-01-22 Thread Terence Heaford via use-livecode
Thanks for all the replies.

How does lock screen affect widgets?

It does not appear to have any effect as if you run a Javascript in a Browser 
having applied lock screen, the Browser widget seems unaffected.

Thanks

Terry

> On 22 Jan 2021, at 16:39, Dan Friedman via use-livecode 
>  wrote:
> 
> Same here.   Anytime I want to lock the screen, I do this:
> 
> on lockTheScreen
>  if not the lockScreen then
>lock screen
>  end if
> end lockTheScreen
> 
> When needed, I use this:
> 
> on unLockTheScreen
>  repeat until not lockScreen
>unlock screen
>  end repeat
> end unLockTheScreen
> 
> 
> That's my 2 cents.
> 
> -Dan
> 
> 
> On 1/22/21, 7:38 AM, "use-livecode on behalf of Paul Dupuis via 
> use-livecode"  use-livecode@lists.runrev.com> wrote:
> 
>When I have a handler that needs to lock the screen I will often do the 
>following
> 
>begins handler
> 
>put the lockScreen into tPreserveLockScreen
>if not tPreserveLockScreen then lock screen
>...
>code
>...
>if not tPreserveLockScreen then unlock screen
> 
>end handler
> 
>Code in our main LC app is large enough that there are instances where 
>the some code that calls the handler needs to lock the screen and other 
>code that call it does not, but the handler always wants to hide changed 
>until done.
> 
> 
>On 1/22/2021 9:24 AM, Craig newman via use-livecode wrote:
>> Something else you might want to to know, though it may only be academic.
>> 
>> LockScreen commands are queued. So if you lock the screen twice, you have to 
>> explicitly unlock twice in order to clear the locked state.
>> 
>> It does not matter what happens in the flow of code in terms of screen 
>> locking, whether other command or function calls are made. The queue rules 
>> throughout. All is reset at idle time.
>> 
>> Craig
>> 
>> -Original Message-
>> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf 
>> Of Brian Milby via use-livecode
>> Sent: Friday, January 22, 2021 6:50 AM
>> To: How to use LiveCode 
>> Cc: Brian Milby 
>> Subject: Re: lock screen
>> 
>> I’m sure someone else can be more clear, but when the engine gets to an idle 
>> state then locks should be cleared.  In your example, it would probably 
>> clear at the end of that mouseUp handler, but aTest would completely run 
>> with the screen locked.
>> 
>> Sent from my iPhone
>> 
>>> On Jan 22, 2021, at 3:57 AM, Terence Heaford via use-livecode 
>>>  wrote:
>>> 
>>> Just looking for clarity with regard to lock screen.
>>> 
>>> Is there only one state for the screen, either locked or not locked and 
>>> when is that state changed.
>>> 
>>> ---
>>> on mouseUp
>>> 
>>> lock screen
>>> 
>>> aTest
>>> 
>>> end mouseUp
>>> 
>>> 
>>> on aTest
>>> 
>>> — is the screen still locked here
>>> 
>>> end aTest
>>> 
>>> 
>>> 
>>> At what point is unlock screen called by livecode without me calling it 
>>> directly.
>>> 
>>> The docs say when all pending handlers have completed but what exactly is a 
>>> pending handler.
>>> 
>>> 
>>> 
>>> Thanks
>>> 
>>> Terry
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
>___
>use-livecode mailing list
>use-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


lock screen

2021-01-22 Thread Terence Heaford via use-livecode
Just looking for clarity with regard to lock screen.

Is there only one state for the screen, either locked or not locked and when is 
that state changed.

---
on mouseUp

lock screen

aTest

end mouseUp


on aTest

— is the screen still locked here

end aTest



At what point is unlock screen called by livecode without me calling it 
directly.

The docs say when all pending handlers have completed but what exactly is a 
pending handler.



Thanks

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


Re: Building a Standalone MacOS App in 9.6.1

2021-01-07 Thread Terence Heaford via use-livecode
Hi Panos,

That’s just a typo correction by MacOS mail. I actually applied the sudo call 
as you suggested.

I have not replied because as a trial I have now done a full install of Xcode 
12.3 from the App Store which as usual asked me to install the additional 
components. I did this.

Now when I build a standalone with LC it works.

Whatever was missing seems to have been corrected by the Xcode install.

I will not be removing Xcode now but it gives me an excuse to play with SwiftUI 
to see how it performs.

Thanks to everyone for their suggestions.


Terry



> On 6 Jan 2021, at 14:30, panagiotis merakos via use-livecode 
>  wrote:
> 
> Hello Terry,
> 
> Just a clarification - the correct command is:
> 
> sudo xcode-select --install
> 
> and not
> 
> sudo xcode-select —install
> 
> Hope this helps.
> 
> Kind regards,
> Panos
> --
> 
>> 
> use-livecode mailing list
> use-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


Building a Standalone MacOS App in 9.6.1

2021-01-06 Thread Terence Heaford via use-livecode
I thought I would try to build a standalone app with the Community Edition in 
Catalina 

Many errors. Perhaps someone could shed some light.

This error is the first. "replacing existing signature xcrun: error active 
developer path”

I did see a comment on the LC Forum that suggested

sudo xcode-select —install, to install the command line tools.

I carried this out, still no luck.

Installed 9.6.1 RC1. Still no luck.

Is it necessary to have Xcode installed for this to work?


Thanks

Terry




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


rotatedText widget and others

2020-12-23 Thread Terence Heaford via use-livecode
Has anyone tried using this widget?

The “get the formatted height of widget” function does not appear to return the 
correct result.

Whats the point of Livecode providing a widget that does not function correctly.

It may rotate text but try aligning a number of these widgets without the 
dimensions being correct.

A complete waste of my time.

If anyone can provide details that I am missing to get this “so called” widget 
to function correctly I’ll gladly get down on my knees and apologise for this 
rant.




I’ve looked at the line chart widget, not enough functionality for a true line 
chart, rather simplistic.

Pie chart, as line chart.

End of second rant.

——

Are any of these “so called” widgets provided by LC designed to provide any 
true functionality or am I just wasting my time trying to use them.
They appear to have been knocked up during someones tea break. Not a great way 
to advertise LC’s abilities.


Terry




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


Printing a com.livecode.widget.browser

2020-12-10 Thread Terence Heaford via use-livecode
Clearly you can’t print a card that contains a browser widget as livecode is 
unable to do this.

I don’t understand why because Safari can and I believe they are both based on 
webkit.

Anyway I have come up with a semi acceptable workflow that involves.

1. Exporting a screenshot of the screen with the widget into a variable.

2. Pasting via script into a LC image object.

3. Then print the portion of the card containing the image.

The problem is this.

I have both the image and widget on the same card and hide the widget when I 
want to print the image and vice versa when going back to the widget.

There is a noticeable flash when hiding and showing the objects.

I am looking for ideas as to how I can minimise this flash or camouflage
it for the user.


Thanks

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


Re: Segmented Control Widget

2020-11-09 Thread Terence Heaford via use-livecode
I will give this a try.

It’s a shame that widgets always seem to be incomplete in one way or another.

Thanks for your help.

All the best

Terry



> On 9 Nov 2020, at 16:52, Bob Sneidar via use-livecode 
>  wrote:
> 
> In my custom tabbed object group, I had to put transparent buttons over the 
> tabs

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

2020-11-07 Thread Terence Heaford via use-livecode



> On 5 Nov 2020, at 20:10, J. Landman Gay via use-livecode 
>  wrote:
> 
> I've done this with a custom control group, it should work with a widget too. 
> Calculate the rectangles (or at least the left and right edges) of each 
> segment and in a mouseEnter handler compare the mouseLoc to the rectangles to 
> see which one it's in. Then set the tooltip to the appropriate string. You 
> can also add a mouseMove handler to do the same thing if you want to change 
> tooltips as the mouseLoc changes inside the widget.


I placed the segmented control widget in a group and put a simple

on mouseEnter
beep
end mouseEnter

in the script of the group.

This did not implement a beep sound.
I placed the same script in the segmented control and that did not make a beep 
either.


I read the dictionary for mouseEnter and it does not apply to a group, I assume 
it also does not apply to the segmented control widget.


I then created three standard buttons and placed those in a group.
Placed the above script in the group.
and each time the mouse entered a button it beeped. It did not beep upon 
entering the group.

Is all this the correct behaviour?

If it is then it is not possible to create your own tooltip for a segmented 
control widget unless there is some more fiddling that can be done.

It seems creating your own segmented control may be the only solution.

Any ideas

Thanks

Terry



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


Re: Segmented Control Widget

2020-11-06 Thread Terence Heaford via use-livecode
I can see the advantages of doing it yourself and intend trying both methods as 
suggested by yourself and Jaqueline.

I have noted when trying some of the widgets that they do seem to be rather 
incomplete.

All the best

Terry


> On 5 Nov 2020, at 22:43, Bob Sneidar via use-livecode 
>  wrote:
> 
> The segmented control is fairly limited. Most of the widgets are. The 
> properties you see are the properties you get. I did however, with a bit of 
> clever scripting, develop a tabbed object group that works as well or better 
> that the built in tabbed button. And for a bonus, it looks in Windows the 
> same as it loos on the Mac. Really, the Windows UI is really horrible for LC. 
> I just gotta say. It puts the Ugh in Ughly. 
> 
> Bob S
> 
> 
>> On Nov 5, 2020, at 12:10 PM, J. Landman Gay via use-livecode 
>>  wrote:
>> 
>> On 11/5/20 1:47 AM, Terence Heaford via use-livecode wrote:
>>> I have been messing about with the Segmented Control Widget and have been 
>>> trying to apply a tooltip.
>>> I noted that the tooltip can only be applied to the whole control, it does 
>>> not appear possible to have a tooltip for each segment.
>>> Is this possible and if so could someone please advise.
>> 
>> I've done this with a custom control group, it should work with a widget 
>> too. Calculate the rectangles (or at least the left and right edges) of each 
>> segment and in a mouseEnter handler compare the mouseLoc to the rectangles 
>> to see which one it's in. Then set the tooltip to the appropriate string. 
>> You can also add a mouseMove handler to do the same thing if you want to 
>> change tooltips as the mouseLoc changes inside the widget.
>> 
>> If the updated tooltip doesn't display reliably, set the tooltip to empty, 
>> wait a millisecond or so, and then set it to the new string.
>> 
>> -- 
>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>> HyperActive Software   | http://www.hyperactivesw.com
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Re: Segmented Control Widget

2020-11-06 Thread Terence Heaford via use-livecode
Thanks for your suggestion will give it a try.

All the best

Terry

> On 5 Nov 2020, at 20:10, J. Landman Gay via use-livecode 
>  wrote:
> 
> On 11/5/20 1:47 AM, Terence Heaford via use-livecode wrote:
>> I have been messing about with the Segmented Control Widget and have been 
>> trying to apply a tooltip.
>> I noted that the tooltip can only be applied to the whole control, it does 
>> not appear possible to have a tooltip for each segment.
>> Is this possible and if so could someone please advise.
> 
> I've done this with a custom control group, it should work with a widget too. 
> Calculate the rectangles (or at least the left and right edges) of each 
> segment and in a mouseEnter handler compare the mouseLoc to the rectangles to 
> see which one it's in. Then set the tooltip to the appropriate string. You 
> can also add a mouseMove handler to do the same thing if you want to change 
> tooltips as the mouseLoc changes inside the widget.
> 
> If the updated tooltip doesn't display reliably, set the tooltip to empty, 
> wait a millisecond or so, and then set it to the new string.
> 
> -- 
> 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


Segmented Control Widget

2020-11-04 Thread Terence Heaford via use-livecode
I have been messing about with the Segmented Control Widget and have been 
trying to apply a tooltip.

I noted that the tooltip can only be applied to the whole control, it does not 
appear possible to have a tooltip for each segment.

Is this possible and if so could someone please advise.


All the best


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


hhOText(community.livecode.hermann.orientedtext)

2020-07-23 Thread Terence Heaford via use-livecode
I have been playing around with this community orientedText widget to see if it 
is suitable to be used for xAxis Labels at 45 degrees in a bar chart.

I’m not sure I am using it correctly.

I have set it up similar to this:

repeat for each line tLabel in tDataLabels

create widget (tLabel) as "community.livecode.hermann.orientedtext" in group 
"generalChart"

set the widgetText of widget(tLabel) to tLabel

set the widgetFontName of widget(tLabel) to "Lucida Grande"

set the widgetFontSize of widget(tLabel) to "15"

set the widgetAngle of widget(tLabel) to "-45"

set the strokeBack of widget(tLabel) to false

set the widgetAdjustSize of widget(tLabel) to true

set the right of widget(tLabel) to tX + tGap

set the top of widget(tLabel) to tY

add tGap to tX

end repeat


However, widgetAdjustSize does not adjust it’s size unless I go into the 
property dialog and uncheck/check the setting.

Can anyone help with this.


Thanks

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


Wrapping Text

2020-07-22 Thread Terence Heaford via use-livecode
If you have a field with one long word that is wider than the field it does not 
wrap, it truncates.

Is there a solution to this?


Thanks

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


Re: Browser widget scrolling

2020-07-21 Thread Terence Heaford via use-livecode



> On 20 Jul 2020, at 21:06, J. Landman Gay via use-livecode 
>  wrote:
> 
> I'm not sure if this is a bug or a feature.


It also seems to happen when the widget is empty?


Thanks

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


Browser widget scrolling

2020-07-20 Thread Terence Heaford via use-livecode
This does not appear to work:

set the hScrollbar of widget  “myBrowser" to false

The scrollbar becomes visible when you drag resize a window.

I was expecting there to ne no scrollbar at all.

Also the checkboxes in the properties section (horizontal and vertical) do not 
work. They are always set to true.

Am I misunderstanding how this is supposed to work?


Thanks

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


Browser

2020-06-22 Thread Terence Heaford via use-livecode
That’s the solution I was thinking about.

It’s probably necessary to capture the screen image at a larger size for 
printing as I suspect otherwise the
printed output will be rather blurred.

Thanks

Terry


> On 21 Jun 2020, at 13:46, Andrew at MidWest Coast Media 
>  wrote:
> 
> 
>> I am again looking at implementing Javascript charts within a LC browser.
>> Looking at amCharts.
>> Got a chart displaying easily within the browser widget.
>> Tries to print the card but the widget does not print.
> 
> 
> I’m using amCharts in another project and ran into the same problem: 
> everything looked right in Live view but would disappear when I tried to 
> print a PDF. The only way I could get them to appear right was by taking a 
> picture of the browser and using that image instead of the live JavaScript in 
> the browser (widget). I think hh keyed me into this with his epic knowledge 
> of this tool
> 
>   set the width of templateImage to the width of widget "Browser"
>   set the height of templateImage to the height of widget "Browser"
>   export snapshot from rect globalRect(the rect of widget "Browser") to 
> tSnapshot as JPEG
>   create image “renderedBrowser"
>   set the visible of widget “Browser” to FALSE
>   put tSnapshot into image tSnapshotName
>   set the name of image tSnapshotName to tSnapshotName
>   set the loc of image tSnapshotName to the loc of widget “Browser"
> 
> —Andrew Bell
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Browser

2020-06-19 Thread Terence Heaford via use-livecode
I am again looking at implementing Javascript charts within a LC browser.

Looking at amCharts.

Got a chart displaying easily within the browser widget.

Tries to print the card but the widget does not print.

So, I am left wondering if printing is impossible from within LC but then 
remembered there is another browser contained within LC.


Which should I use, the widget or revBrowser?

What is the pro’s and cons and can one print?


Thanks

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


Re: HTML Colour Groups

2020-05-31 Thread Terence Heaford via use-livecode
I realise I used set in my post but will have used put in the script as you 
cannot use set and apply the script.

Don’t know why it didn’t work originally, sorry for bothering you.

All the best

Terry


> On 31 May 2020, at 17:38, Terence Heaford via use-livecode 
>  wrote:
> 
> Apologies, works now.
> 
> Don’t what I did incorrectly to make it not work.
> 
> Thanks
> 
> Terry
> 
>> On 31 May 2020, at 17:25, Tore Nilsen via use-livecode 
>>  wrote:
>> 
>> put "#FFC0CB" into tColor
>> 
>> set the backgroundcolor of graphic 1 to tColor
> 
> ___
> use-livecode mailing list
> use-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: HTML Colour Groups

2020-05-31 Thread Terence Heaford via use-livecode
Apologies, works now.

Don’t what I did incorrectly to make it not work.

Thanks

Terry

> On 31 May 2020, at 17:25, Tore Nilsen via use-livecode 
>  wrote:
> 
> put "#FFC0CB" into tColor
> 
> set the backgroundcolor of graphic 1 to tColor

___
use-livecode mailing list
use-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: HTML Colour Groups

2020-05-31 Thread Terence Heaford via use-livecode
Our posts just crossed in the post

Can you answer my question about using hex in a variable when setting an 
objects colour.

Thanks

Terry 

> On 31 May 2020, at 17:06, Mark Wieder via use-livecode 
>  wrote:
> 
>  available colors.

___
use-livecode mailing list
use-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: HTML Colour Groups

2020-05-31 Thread Terence Heaford via use-livecode
It seems that LC only supports the use of names that can be found by

put the colorNames function

and

“Crimson” is not one of those.

How the names of colors included is determined, I do not know.

I just thought (clearly incorrectly) that HTML colors were included.


On another point.

When you use Hex directly as in

set the background color of graphic 1 to #FFC0CB

works but….

set tColor to “#FFC0CB”

set the background color of graphic 1 to tColor

does not.

Could someone explain how to do hex with a variable

Thanks

Terry



> On 31 May 2020, at 14:50, Rick Harrison via use-livecode 
>  wrote:
> 
> Hi Terry,
> 
> Does it work if you use the Hex Code instead of the name?
> 
> Are you using the LC Server for this?
> If so, what version of LC server are you running?
> 
> Is the code embedded as LC code or is it HTML or CSS?
> 
> Have you tested it in more than one Web-browser?
> Sometimes things don’t work in one but do in another.
> I have had instances of something working correctly
> in Firefox but not in Chrome etc.
> 
> If you can show us the offending line/lines of code
> that would be helpful too.
> 
> Rick
> 
> 
> 
> 
>> On May 31, 2020, at 5:39 AM, Terence Heaford via use-livecode 
>>  wrote:
>> 
>> I thought LC supported HTML Colour Names?
>> 
>> I have been using the Colour Name Groups found here
>> 
>> https://www.w3schools.com/colors/colors_groups.asp 
>> <https://www.w3schools.com/colors/colors_groups.asp>
>> 
>> and found that some of the colours do not work in LC.
>> 
>> For example “Crimson” reports an error in LC.
>> 
>> Can someone explain this anomaly please.
>> 
>> 
>> 
>> Thanks
>> 
>> Terry
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


HTML Colour Groups

2020-05-31 Thread Terence Heaford via use-livecode
I thought LC supported HTML Colour Names?

I have been using the Colour Name Groups found here

https://www.w3schools.com/colors/colors_groups.asp 


and found that some of the colours do not work in LC.

For example “Crimson” reports an error in LC.

Can someone explain this anomaly please.



Thanks

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


Re: Go to card has become slow

2020-04-05 Thread Terence Heaford via use-livecode
There is an interesting debate here as to whether it is necessary or not to 
wrap select statements in transactions for optimisation:

https://stackoverflow.com/questions/7349189/optimizing-select-with-transaction-under-sqlite-3
 


I think there is probably widespread debate about this subject.

I don’t know the answer?

Best regards

Terry



> On 3 Apr 2020, at 17:00, Bob Sneidar via use-livecode 
>  wrote:
> 
> Mark, you may have answered why it is my Forms Generator app is running so 
> slow on Windows. I don’t use transactions and I make multiple queries for 
> most transactions.
> 
> 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: Go to card has become slow

2020-04-03 Thread Terence Heaford via use-livecode
I have now copied the modified scripts from the project version that was slow 
and reapplied them to the previous version which was running fast.

Applying the modified scripts has not resulted in any slowdown of the version 
they have been applied to.

So, I cannot understand why the project slowed down in the first place but…

all is now well until it happens again.


Thanks

Terry

> On 3 Apr 2020, at 09:42, Mark Waddingham via use-livecode 
>  wrote:
> 
> On 2020-04-03 09:25, Terence Heaford via use-livecode wrote:
>> Fortunately I have Time Machine running on my mac.
>> I have gone back to a previous copy from the 01 April 2020 and this
>> project is running at full speed.
>> I have made no modifications to the underlying functionality of this
>> project other than some modifications to SQLite
>> scripts to improve performance.
>> I will make those adjustments again and report on the outcome.
>> I do not believe it’s anything I have done.
> 
> I'd humbly  suggest that modifications to SQLite scripts constitute 
> modifications ;)
> 
> Have you modified the SQLite database in any way?
> 
> Like most db's SQLite is heavily dependent on indices to prevent operations 
> being slow - if some have been removed which existing queries relied upon, or 
> one hasn't been added to support a new/modified query then that could cause a 
> heavy performance loss.
> 
> Similarly, SQLite is transactional, so if you do lots of mutation queries 
> outside of one each individual query will take a lot longer (as each will be 
> under its own transaction requiring a OS disk flush/sync after each) - if 
> you've tweaked how you are doing such queries and not taken into account 
> transactions that could also cause a heavy performance loss.
> 
> 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: Go to card has become slow

2020-04-03 Thread Terence Heaford via use-livecode
Fortunately I have Time Machine running on my mac.

I have gone back to a previous copy from the 01 April 2020 and this project is 
running at full speed.

I have made no modifications to the underlying functionality of this project 
other than some modifications to SQLite
scripts to improve performance.

I will make those adjustments again and report on the outcome.

I do not believe it’s anything I have done.

I believe (no proof) that something within LC has corrupted the project.

I have looked at copying the old project into a new project but that within LC 
seems to be a nightmare scenario.

If that was easy and it worked it would be a future solution or if there was a 
livecode maintenance type project that could do this sort of thing that would 
be good.

All the best for now.

Will report back

Thanks

Terry


> On 2 Apr 2020, at 22:45, Devin Asay via use-livecode 
>  wrote:
> 
> I have seen delays when going to a card containing a large image with Resize 
> Quality set to “Best”. It was more of an issue on a mobile device, but it’s 
> worth looking into.
> 
> Devin
> 
>> On Apr 2, 2020, at 1:27 PM, Terence Heaford via use-livecode 
>>  wrote:
>> 
>> I have a project that opens at a particular card.
>> 
>> When I go to another card (any card) it’s very snappy.
>> 
>> When I return to the original card (from any card) I have noticed a second 
>> or two delay before it happens.
>> 
>> There would appear to be nothing in any script that would account for this.
>> 
>> Can anyone give some insight as to why this has happened?
>> 
>> I reinstalled LC to no avail.
>> 
>> Community 9.5.1
>> 
>> MacOS 10.15.4
>> 
>> I read something about font changes on the forum but that seemed to relate 
>> to iOS not MacOS.
>> 
>> I’m at a loss
>> 
>> 
>> Thanks
>> 
>> Terry
>> 
>> 
>> 
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 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


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


Go to card has become slow

2020-04-02 Thread Terence Heaford via use-livecode
I have a project that opens at a particular card.

When I go to another card (any card) it’s very snappy.

When I return to the original card (from any card) I have noticed a second or 
two delay before it happens.

There would appear to be nothing in any script that would account for this.

Can anyone give some insight as to why this has happened?

I reinstalled LC to no avail.

Community 9.5.1

MacOS 10.15.4

I read something about font changes on the forum but that seemed to relate to 
iOS not MacOS.

I’m at a loss


Thanks

Terry





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


Re: Ordering text

2020-04-02 Thread Terence Heaford via use-livecode
I agree that is why I have concluded to do the calc in LC.

However, I can’t store the balance one time in SQL as the balance value changes 
depending on which records are selected and the sort order(which may be by 
different columns).

So it is not just a schema issue, it started out as a LC issue because LC doing 
a "put text before” vs a “put text after” has real performance issues.

If you read my solution which is a bit of sqlite (sum) and then do a “put text 
after” it sorts out the bottleneck which is actually in LC’s (put text before).

I tried put merge("SELECT *,SUM (amount) OVER (ORDER BY recID) AS balance FROM 
myAccountName") into tSQL in response to a suggestion in this thread and so 
others do not wander down a dead end posted my result which shows that it has 
poor performance. Whether that is as a result of LC’s SQLite implementation or 
just SQLite I do not know.

Thanks for your interest and suggestions.

Best Regards

Terry



> On 1 Apr 2020, at 20:46, Bob Sneidar via use-livecode 
>  wrote:
> 
> So this is a database schema issue. Typically what you will want to do with 
> things like balances is to store the balance in a column as each value in the 
> equation changes. You are asking your SQL server to do all the calculations 
> for all your records all at once. If SLQ only has to calculate when 
> insert/update is performed, you wouldn’t notice. Better yet, do the 
> calculations in Livecode and store the result in the database column. WY 
> quicker.
> 
> Bob S
> 
> 
> On Apr 1, 2020, at 12:13 PM, Terence Heaford via use-livecode 
>  <mailto:use-livecode@lists.runrev.com><mailto:use-livecode@lists.runrev.com 
> <mailto:use-livecode@lists.runrev.com>>> wrote:
> 
> This actually works but is very slow (> 800ms)
> 
> put merge("SELECT *,SUM (amount) OVER (ORDER BY recID) AS balance FROM 
> myAccountName") into tSQL
> 
> I have settled on my earlier suggestion
> 
> 
> Earlier suggestion results in 20ms performance.
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode 
> <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: Ordering text

2020-04-01 Thread Terence Heaford via use-livecode
This actually works but is very slow (> 800ms)

put merge("SELECT *,SUM (amount) OVER (ORDER BY recID) AS balance FROM 
myAccountName") into tSQL

I have settled on my earlier suggestion


Earlier suggestion results in 20ms performance.

-
I believe it’s sorted (forgive the pun)

As the data is stored in an SQLite db I have used the db to sum the values then 
worked from the top. Like below.

This results in approx. 20ms for each sort direction.

I have looked into a running total calc using SQLite but the solutions I found 
seemed rather complicated.

Sometimes asking for help then presents a solution.




Thanks


Terry


> On 29 Mar 2020, at 22:24, doc hawk via use-livecode 
>  wrote:
> 
> UPDATE theTable SET tBal=tBal(idx -1) + charge WHERE idx > MIN(idx);

___
use-livecode mailing list
use-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: Ordering text

2020-03-29 Thread Terence Heaford via use-livecode
I believe it’s sorted (forgive the pun)

As the data is stored in an SQLite db I have used the db to sum the values then 
worked from the top. Like below.

This results in approx. 20ms for each sort direction.

I have looked into a running total calc using SQLite but the solutions I found 
seemed rather complicated.

Sometimes asking for help then presents a solution.

Thanks

Terry

if tOrder is "desc" then

put dbGetAmountForAccount (pAccountName) into tBalance

repeat for each line tRec in tData

put tBalance into item 7 of tRec

put item 6 of tRec into tAmount

subtract (item 6 of tRec) from tBalance

put tRec & CR after tCellData

end repeat

delete last char of tCellData

else

repeat for each line tRec in tData

add item 6 of tRec to tBalance

put tBalance into item 7 of tRec

put tRec & CR after tCellData

end repeat

delete last char of tCellData

end if


> On 29 Mar 2020, at 14:20, Brian Milby via use-livecode 
>  wrote:
> 
> Is there a key that you can use to sort?  May be faster to build it and then 
> use the sort command at the end.
> 
> Thanks,
> Brian
> On Mar 29, 2020, 7:16 AM -0400, Tore Nilsen via use-livecode 
> , wrote:
>> I believe the reason for the delay comes from the fact that when sorted 
>> descending, you put tRec & CR before tCellData. Tp put something before a 
>> container is slower than putting something after a container.
>> 
>> Regards
>> Tore Nilsen
>> 
>>> 29. mar. 2020 kl. 13:06 skrev Terence Heaford via use-livecode 
>>> :
>>> 
>>> I have approx. 7000 lines of tab delimited data.
>>> 
>>> When I execute the code snippet below if the sort order is descending it 
>>> takes approx 120 milliseconds otherwise it takes 20 milliseconds to process.
>>> 
>>> Can someone explain why and perhaps come up with a faster solution.
>>> 
>>> Thanks
>>> 
>>> Terry
>>> ——
>>> 
>>> repeat for each line tRec in tData
>>> 
>>> add item 6 of tRec to tBalance
>>> 
>>> put tBalance into item 7 of tRec
>>> 
>>> 
>>> switch tOrder
>>> 
>>> case "desc"
>>> 
>>> put tRec & CR before tCellData
>>> 
>>> break
>>> 
>>> default
>>> 
>>> put tRec & CR after tCellData
>>> 
>>> end switch
>>> 
>>> 
>>> end repeat
>>> 
>>> 
>>> switch tOrder
>>> 
>>> case "desc"
>>> 
>>> delete char 1 of tCellData
>>> 
>>> break
>>> 
>>> default
>>> 
>>> delete last char of tCellData
>>> 
>>> end switch
>>> 
>>> ---
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

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


Ordering text

2020-03-29 Thread Terence Heaford via use-livecode
I have approx. 7000 lines of tab delimited data.

When I execute the code snippet below if the sort order is descending it takes 
approx 120 milliseconds otherwise it takes 20 milliseconds to process.

Can someone explain why and perhaps come up with a faster solution.

Thanks

Terry
——

repeat for each line tRec in tData

add item 6 of tRec to tBalance

put tBalance into item 7 of tRec


switch tOrder

case "desc"

put tRec & CR before tCellData

break

default

put tRec & CR after tCellData

end switch


end repeat


switch tOrder

case "desc"

delete char 1 of tCellData

break

default

delete last char of tCellData

end switch

---
___
use-livecode mailing list
use-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: Object Fonts

2019-12-19 Thread Terence Heaford via use-livecode
I may have found the problem.

Datagrid helper. When I used that it changed to my selection.

Does this mean Datagrid Helper changes the font in a different place than LC 
IDE?


Thanks

Terry

> On 19 Dec 2019, at 08:24, Terence Heaford via use-livecode 
>  wrote:
> 
> Why can’t I choose Helvetica Neue as an object font?
> 
> Whenever I do it turns out italic.
> 
> Can someone point me in the right direction please.
> 
> MacOS Catalina , LC 9.5.1, Community.
> 
> 
> 
> Thanks
> 
> Terry
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Object Fonts

2019-12-19 Thread Terence Heaford via use-livecode
Why can’t I choose Helvetica Neue as an object font?

Whenever I do it turns out italic.

Can someone point me in the right direction please.

MacOS Catalina , LC 9.5.1, Community.



Thanks

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


Re: Table Text Livecode vs .....

2019-12-18 Thread Terence Heaford via use-livecode
Here’s another interesting observation.

My table is set to Lucida Grande 13

I have some popup menus on the card set to Lucida Grande 13

Why does the text in the popup menus appear larger than the text in the Table?


Thanks


Terry



> On 18 Dec 2019, at 08:00, Terence Heaford via use-livecode 
>  wrote:
> 
> The setAllowsFontSmoothing function states
> 
> "Font are smoothed if they are antialiased when drawn and if font smoothing 
> is both allowed and enabled. For information on how to enable font smoothing, 
> see the setShouldSmoothFonts(_:) 
> <https://developer.apple.com/documentation/coregraphics/cgcontext/1455816-setshouldsmoothfonts>
>  function. It is not usually necessary to make changes to both parameters at 
> the same time; either can be used to disable font smoothing.”
> 
> I have the "use font smoothing when available" checkbox ticked in the General 
> Preferences. The above suggests that LC does not have these settings enabled.
> 
> As I said previously a user function to set this would be beneficial I 
> believe.
> 
> What about it mothership?
> 
> I wonder if there would be a performance hit for providing this functionality?
> 
> Thanks
> 
> Terry
> 
> 
> 
>> On 18 Dec 2019, at 03:39, Pi Digital via use-livecode 
>>  wrote:
>> 
>> This to do with the sharpness setting for the fonts. If you have Photoshop 
>> you have the ability to set the levels of this in the character parameters. 
>> The same principle is available to Mac developers in font smoothing. This 
>> adds levels of clarity to the fill of the typeface. Here’s Apples guide:
>> 
>> https://developer.apple.com/documentation/coregraphics/cgcontext/1454767-setallowsfontsmoothing
>> 
>> There’s listed there other parameters that play a part like quantisation and 
>> smoothing. 
>> 
>> So LC and FM just use differing methods. But they’re not far off each other. 
>> 
>> I’m currently upgrading a stack from 5.0.2 up to 9.5 and the text difference 
>> is far more distinct. I’m assuming this is to do with Unicode. So be 
>> thankful your issue is not nearly as tiresome requiring the reformatting of 
>> every card in a humungous stack like the one I’m dealing with!
>> 
>> All the best. 
>> 
>> Sean Cole
>> Pi Digital Prod Ltd
>> 
>>> On 17 Dec 2019, at 19:23, Terence Heaford via use-livecode 
>>>  wrote:
>>> 
>>> Firstly I have an iMac, none retina.
>>> 
>>> 1. Just checked Pages & Numbers and they both appear similar to LC.
>>> 
>>> 2. Then checked TextEdit and that appears the same as Filemaker.
>>> 
>>> The rendering of the text in Filemaker & TextEdit appears to my poor 
>>> eyesight to be more black (if that is possible).
>>> My poor eyesight is the reason I notice this in the first place, because I 
>>> have the same database in both LC & Filemaker.
>>> I prefer the scripting of LC to Filemaker but the display of the same table 
>>> is much clearer in Filemaker for the same font (more blackness).
>>> 
>>> Perhaps there is an anti alias setting or such like, that has not been 
>>> implemented in LC.
>>> 
>>> If so it would be good to get that option?
>>> 
>>> There used to be (not sure if it’s there now) a terminal command
>>> 
>>> defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO
>>> 
>>> and probably others for this sort of thing. Perhaps they have to be 
>>> implemented in app.
>>> 
>>> 
>>> 
>>> Thanks
>>> 
>>> Terry
>>> 
>>> 
>>> 
>>>> On 17 Dec 2019, at 17:54, Bob Sneidar via use-livecode 
>>>>  wrote:
>>>> 
>>>> 9.5.1 RC1
>>>> 
>>>>>> On Dec 17, 2019, at 09:14 , Paul Dupuis via use-livecode 
>>>>>>  wrote:
>>>>> 
>>>>> What version of LiveCode are you using.
>>>>> 
>>>>> Older releases did not support the Retina display, but newer releases do.
>>>> 
>>>> 
>>>> ___
>>>> use-livecode mailing list
>>>> use-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.ru

Re: Table Text Livecode vs .....

2019-12-18 Thread Terence Heaford via use-livecode
The setAllowsFontSmoothing function states

"Font are smoothed if they are antialiased when drawn and if font smoothing is 
both allowed and enabled. For information on how to enable font smoothing, see 
the setShouldSmoothFonts(_:) 
<https://developer.apple.com/documentation/coregraphics/cgcontext/1455816-setshouldsmoothfonts>
 function. It is not usually necessary to make changes to both parameters at 
the same time; either can be used to disable font smoothing.”

I have the "use font smoothing when available" checkbox ticked in the General 
Preferences. The above suggests that LC does not have these settings enabled.

As I said previously a user function to set this would be beneficial I believe.

What about it mothership?

I wonder if there would be a performance hit for providing this functionality?

Thanks

Terry



> On 18 Dec 2019, at 03:39, Pi Digital via use-livecode 
>  wrote:
> 
> This to do with the sharpness setting for the fonts. If you have Photoshop 
> you have the ability to set the levels of this in the character parameters. 
> The same principle is available to Mac developers in font smoothing. This 
> adds levels of clarity to the fill of the typeface. Here’s Apples guide:
> 
> https://developer.apple.com/documentation/coregraphics/cgcontext/1454767-setallowsfontsmoothing
> 
> There’s listed there other parameters that play a part like quantisation and 
> smoothing. 
> 
> So LC and FM just use differing methods. But they’re not far off each other. 
> 
> I’m currently upgrading a stack from 5.0.2 up to 9.5 and the text difference 
> is far more distinct. I’m assuming this is to do with Unicode. So be thankful 
> your issue is not nearly as tiresome requiring the reformatting of every card 
> in a humungous stack like the one I’m dealing with!
> 
> All the best. 
> 
> Sean Cole
> Pi Digital Prod Ltd
> 
>> On 17 Dec 2019, at 19:23, Terence Heaford via use-livecode 
>>  wrote:
>> 
>> Firstly I have an iMac, none retina.
>> 
>> 1. Just checked Pages & Numbers and they both appear similar to LC.
>> 
>> 2. Then checked TextEdit and that appears the same as Filemaker.
>> 
>> The rendering of the text in Filemaker & TextEdit appears to my poor 
>> eyesight to be more black (if that is possible).
>> My poor eyesight is the reason I notice this in the first place, because I 
>> have the same database in both LC & Filemaker.
>> I prefer the scripting of LC to Filemaker but the display of the same table 
>> is much clearer in Filemaker for the same font (more blackness).
>> 
>> Perhaps there is an anti alias setting or such like, that has not been 
>> implemented in LC.
>> 
>> If so it would be good to get that option?
>> 
>> There used to be (not sure if it’s there now) a terminal command
>> 
>> defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO
>> 
>> and probably others for this sort of thing. Perhaps they have to be 
>> implemented in app.
>> 
>> 
>> 
>> Thanks
>> 
>> Terry
>> 
>> 
>> 
>>> On 17 Dec 2019, at 17:54, Bob Sneidar via use-livecode 
>>>  wrote:
>>> 
>>> 9.5.1 RC1
>>> 
>>>>> On Dec 17, 2019, at 09:14 , Paul Dupuis via use-livecode 
>>>>>  wrote:
>>>> 
>>>> What version of LiveCode are you using.
>>>> 
>>>> Older releases did not support the Retina display, but newer releases do.
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

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


Re: Table Text Livecode vs .....

2019-12-17 Thread Terence Heaford via use-livecode
Firstly I have an iMac, none retina.

1. Just checked Pages & Numbers and they both appear similar to LC.

2. Then checked TextEdit and that appears the same as Filemaker.

The rendering of the text in Filemaker & TextEdit appears to my poor eyesight 
to be more black (if that is possible).
My poor eyesight is the reason I notice this in the first place, because I have 
the same database in both LC & Filemaker.
I prefer the scripting of LC to Filemaker but the display of the same table is 
much clearer in Filemaker for the same font (more blackness).

Perhaps there is an anti alias setting or such like, that has not been 
implemented in LC.

If so it would be good to get that option?

There used to be (not sure if it’s there now) a terminal command

defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO

and probably others for this sort of thing. Perhaps they have to be implemented 
in app.



Thanks

Terry



> On 17 Dec 2019, at 17:54, Bob Sneidar via use-livecode 
>  wrote:
> 
> 9.5.1 RC1
> 
>> On Dec 17, 2019, at 09:14 , Paul Dupuis via use-livecode 
>>  wrote:
>> 
>> What version of LiveCode are you using.
>> 
>> Older releases did not support the Retina display, but newer releases do.
> 
> 
> ___
> use-livecode mailing list
> use-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: Table Text Livecode vs .....

2019-12-17 Thread Terence Heaford via use-livecode
They are both Lucida Grande 13. One is Filemaker the other Livecode.

All Apple’s apps and those that clearly using Native Text display the same it 
is only Livecode that displays differently.

Does Livecode use Apple’s text rendering or another?

Thanks

Terry

> On 17 Dec 2019, at 15:49, Bob Sneidar via use-livecode 
>  wrote:
> 
> It's clear the pixels in one are much larger and that's the one where the 
> actual letters are smaller! Are these the same font size? 
> 
> Bob S
> 
> 
>> On Dec 17, 2019, at 06:55 , Terence Heaford via use-livecode 
>>  wrote:
>> 
>> Here are the links. If you look closely the anti aliasing of the text seems 
>> inferior on LC.
> 
> 
> ___
> use-livecode mailing list
> use-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: Table Text Livecode vs .....

2019-12-17 Thread Terence Heaford via use-livecode

Here are the links. If you look closely the anti aliasing of the text seems 
inferior on LC.

https://www.dropbox.com/s/xic5db59hh4hs4v/Livecode.png?dl=0 
<https://www.dropbox.com/s/xic5db59hh4hs4v/Livecode.png?dl=0>

https://www.dropbox.com/s/nv6gws84l78n053/Other%20app%20tables.png?dl=0 
<https://www.dropbox.com/s/nv6gws84l78n053/Other%20app%20tables.png?dl=0>

Thanks

Terry

> On 17 Dec 2019, at 12:12, Pi Digital via use-livecode 
>  wrote:
> 
> Hi Terence
> 
> This list doesn’t display images in the mail. Perhaps you could provide links 
> to the images. 
> 
> Sean Cole
> Pi Digital Prod Ltd
> 
>> On 17 Dec 2019, at 08:31, Terence Heaford via use-livecode 
>>  wrote:
>> 
>> Can someone explain why the text in a livecode table displays more poorly 
>> on screen than other native macos apps?
>> 
>> Here are two screen grabs that display the difference.
>> 
>> Thanks
>> 
>> Terry
>> 
>> 
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

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


Table Text Livecode vs .....

2019-12-17 Thread Terence Heaford via use-livecode
Can someone explain why the text in a livecode table displays more poorly on 
screen than other native macos apps?

Here are two screen grabs that display the difference.

Thanks

Terry




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


AutoUpdater

2019-04-15 Thread Terence Heaford via use-livecode
Why does LiveCode’s AutoUpdater run even though it is turned off in preferences?


Thanks

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

Re: Stack Height/Menubar

2018-11-16 Thread Terence Heaford via use-livecode
Hi Klaus,


What an excellent suggestion.

Copied my menubar to a card that I never use and pointed everything to that and 
its associated scripts and this has now sorted the problem.

Named my Card “MenusAndImages”. Keep my button icons here as well.

Sorted.

Thanks for your help

Terry



> On 15 Nov 2018, at 16:32, Klaus major-k via use-livecode 
>  wrote:
> 
> I ususally store my "menubar group" in a substack that will never be opened.
> Then I set "the defaultmenubar" of my stack to the name of that group and am 
> a happy camper,
> no more missing 22 pixels etc. on the Mac.

___
use-livecode mailing list
use-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: Stack Height/Menubar

2018-11-15 Thread Terence Heaford via use-livecode
This is fair enough but you still cannot put anything in the bottom 22 of a 
visible card on screen.

Try dragging an object to the card and it will not allow you to place it in the 
bottom 22 of the card (LC 9.0.1)

Thanks

Terry


> On 15 Nov 2018, at 15:37, Paul Dupuis via use-livecode 
>  wrote:
> 
> Look at the 'effective' keyword in the dictionary
> 
> The effective rect of a stack includes the borders and titlebar. The
> rect of a stack is just the interior size available for card and
> controls.. The difference gives you the border sizes and titlebar sizes.
> You can also use 'effective' with ofther stack position/coordinate
> properties (I think) like top,left, right, bottom, height, width.
> 
> 
> 
> On 11/15/2018 10:03 AM, Terence Heaford via use-livecode wrote:
>> This post is regard the use of Livecode on MacOS(LC 9.0.1)
>> 
>> When you set the height of this stack to 800 (for example)
>> 
>> The height of this card in the property inspector is 822 and is also 
>> returned as 822 in script. 
>> 
>> This seems to be as a result of the menubar position on none mac systems.
>> 
>> I have "set as stack menubar" checked in Menu Builder
>> 
>> When displayed on screen the card displays with a height of 822 not 800 even 
>> though the menubar is not showing in the window.
>> 
>> If you then position say a button for example within the lower 22 of the 
>> card remnants of the button can be seen on other cards when you go to 
>> another card.
>> 
>> How is this supposed to be dealt with in Livecode.
>> 
>> It all seems rather confusing to me.
>> 
>> It is usual on a Mac to have a 20 border to the edge of windows etc. As 
>> stated above if you do this then parts of the buttons
>> for some reason show on other cards (22 - 20).
>> 
>> Livecode should simply identify you are on a Mac and the 22 for the menubar 
>> should be dealt with in Livecode code rather than leaving it
>> to the scripter to sort out.
>> 
>> On a Mac if you set the stack height to 800 then the card should default to 
>> 800.
>> 
>> Why can’t the menubar be stored by some other means?
>> 
>> End of part rant.
>> 
>> 
>> 
>> 
>> Thanks
>> 
>> Terry
>> 
>> 
>> 
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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

Re: Stack Height/Menubar

2018-11-15 Thread Terence Heaford via use-livecode
This all basically means you can’t place anything in the bottom 22 of the card.

Terry


> On 15 Nov 2018, at 15:03, Terence Heaford via use-livecode 
>  wrote:
> 
> This post is regard the use of Livecode on MacOS(LC 9.0.1)
> 
> When you set the height of this stack to 800 (for example)
> 
> The height of this card in the property inspector is 822 and is also returned 
> as 822 in script. 
> 
> This seems to be as a result of the menubar position on none mac systems.
> 
> I have "set as stack menubar" checked in Menu Builder
> 
> When displayed on screen the card displays with a height of 822 not 800 even 
> though the menubar is not showing in the window.
> 
> If you then position say a button for example within the lower 22 of the card 
> remnants of the button can be seen on other cards when you go to another card.
> 
> How is this supposed to be dealt with in Livecode.
> 
> It all seems rather confusing to me.
> 
> It is usual on a Mac to have a 20 border to the edge of windows etc. As 
> stated above if you do this then parts of the buttons
> for some reason show on other cards (22 - 20).
> 
> Livecode should simply identify you are on a Mac and the 22 for the menubar 
> should be dealt with in Livecode code rather than leaving it
> to the scripter to sort out.
> 
> On a Mac if you set the stack height to 800 then the card should default to 
> 800.
> 
> Why can’t the menubar be stored by some other means?
> 
> End of part rant.
> 
> 
> 
> 
> Thanks
> 
> Terry
> 
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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

Stack Height/Menubar

2018-11-15 Thread Terence Heaford via use-livecode
This post is regard the use of Livecode on MacOS(LC 9.0.1)

When you set the height of this stack to 800 (for example)

The height of this card in the property inspector is 822 and is also returned 
as 822 in script. 

This seems to be as a result of the menubar position on none mac systems.

I have "set as stack menubar" checked in Menu Builder

When displayed on screen the card displays with a height of 822 not 800 even 
though the menubar is not showing in the window.

If you then position say a button for example within the lower 22 of the card 
remnants of the button can be seen on other cards when you go to another card.

How is this supposed to be dealt with in Livecode.

It all seems rather confusing to me.

It is usual on a Mac to have a 20 border to the edge of windows etc. As stated 
above if you do this then parts of the buttons
for some reason show on other cards (22 - 20).

Livecode should simply identify you are on a Mac and the 22 for the menubar 
should be dealt with in Livecode code rather than leaving it
to the scripter to sort out.

On a Mac if you set the stack height to 800 then the card should default to 800.

Why can’t the menubar be stored by some other means?

End of part rant.




Thanks

Terry





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

Re: Open recent File Menu

2018-06-08 Thread Terence Heaford via use-livecode



> On 8 Jun 2018, at 16:56, Klaus major-k via use-livecode 
>  wrote:
> 
> set the cRecentStackPaths of stack "revpreferences" to empty


Thanks very much.


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


Open recent File Menu

2018-06-08 Thread Terence Heaford via use-livecode

For the life of me I cannot remember how to clear this menu?

Most Mac Apps have a Clear Menu item at the foot of the drop down menu, why 
can’t Livecode?


Thanks

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

Re: DataGrid Column Labels

2018-04-19 Thread Terence Heaford via use-livecode
It’s weird but placing this in the preopenCard script sorts out the issue for 
now.

set the dgProp[ "column labels" ] of group  “myTable" to the dgProp[ "column 
labels" ] of group "myTable"


All the best

Terry

> On 18 Apr 2018, at 18:43, Terence Heaford via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> All my tables just say
> 
> button id 1005 of stack "revDataGridLibrary"
> 
> 
> Did the copy and paste thing and it did not work.
> 
> ??
> 
> Terry
> 
>> On 18 Apr 2018, at 15:53, Bob Sneidar via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> 2. Copy what's in the message 
> 
> ___
> use-livecode mailing list
> use-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: DataGrid Column Labels

2018-04-18 Thread Terence Heaford via use-livecode
All my tables just say

button id 1005 of stack "revDataGridLibrary"


Did the copy and paste thing and it did not work.

??

Terry

> On 18 Apr 2018, at 15:53, Bob Sneidar via use-livecode 
>  wrote:
> 
> 2. Copy what's in the message 

___
use-livecode mailing list
use-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: DataGrid Column Labels

2018-04-18 Thread Terence Heaford via use-livecode
I’ve had a look at various behaviours but rather then make a mess of everything 
can you give a blow by blow of your actions please.


Thanks

Terry


> On 17 Apr 2018, at 15:47, Bob Sneidar via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> As I mentioned, I get the behavior of a datagrid that IS working, then set 
> the behavior of the datagrid that ISN'T working to that behavior. I'm not 
> sure why but there seem to be more than one datagrid behavior object floating 
> around. 
> 
> Bob S
> 
> 
>> On Apr 16, 2018, at 08:29 , Terence Heaford via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> I see what you have done and when I create a new project with LC9 and create 
>> a Data Grid I do not have any problems.
>> 
>> The issue I have is when I create a Data Grid within a project that has been 
>> created with an earlier version of LC.
>> 
>> If this is relevant I do not know.
>> 
>> For the moment I have settled on placing this in the preOpenCard handler
>> 
>> 
>> put  “aa,bb,cc,dd,ee,ff,gg,hh" into tFields
>> 
>> replace "," with CR in tFields
>> 
>> set the dgProp[ "column labels" ] of group  “myTable" to tFields
>> 
>> 
>> 
>> This does the trick but it would be better if I knew why?
>> 
>> There are 13 Data Grids in the project.
>> 
>> 8 that were there before LC9 are OK the other 5 exhibit the issue. 
>> 
>> 
>> 
>> All the best
>> 
>> Terry
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode 
> <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: DataGrid Column Labels

2018-04-16 Thread Terence Heaford via use-livecode
I see what you have done and when I create a new project with LC9 and create a 
Data Grid I do not have any problems.

The issue I have is when I create a Data Grid within a project that has been 
created with an earlier version of LC.

If this is relevant I do not know.

For the moment I have settled on placing this in the preOpenCard handler


put  “aa,bb,cc,dd,ee,ff,gg,hh" into tFields

replace "," with CR in tFields

set the dgProp[ "column labels" ] of group  “myTable" to tFields



This does the trick but it would be better if I knew why?

There are 13 Data Grids in the project.

8 that were there before LC9 are OK the other 5 exhibit the issue. 



All the best

Terry



> On 15 Apr 2018, at 05:23, James Hale  wrote:
> 
> I am using 9 on a Mac and I cannot reproduce your issue.
> 
> I noticed you mention DGH and so perhaps it is a Data Grid Helper issue 
> (although I fail to see how.)
> 
> If I open the PI for a data grid and click on the Columns tab, click on a 
> column in the list
> 
> (here's one I prepared earlier.)
> 
> 
> 
> Then type a name in the "Name" field, tab out or hit the Enter key and the 
> label I entered (in the above image "Name") appears in my data grid on my 
> stack. I do not need to refresh anything.
> If I then save my stack, quit LC, relaunch and open the saved stack, the 
> labels are there as expected.
> 
> So maybe something else is going on in your case?
> 
> 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: DataGrid Column Labels

2018-04-14 Thread Terence Heaford via use-livecode
More investigation.

Instead of using DGH to change the header label I did it manually by editing 
the groups.

This worked until a reload of the project at which point the header label had 
disappeared again.

Upon working through the header by editing the groups you eventually come to 
the text field that contains the header text.

This was empty.

Clearly something in the script of the DataGrid is emptying that field.

At this point I am giving up although if you create the headers on opening the 
project with the likes of:

set the dgProp[ "columns" ] of group  “myTable" of cd  “myCard" of stack  
“myStack" to "test"

set the dgProp[ "column labels" ] of group "myTable" of cd "myCard" of stack 
"myStack" to "TEST"


Then they do seem to stick for the duration of the project being open. I have 
placed these in open stack


All the best

Terry

> On 14 Apr 2018, at 09:03, Terence Heaford via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> When I look at the Data Grid Templates in the project browser I see 2 tables 
> that refer to DG2.
> 
> I suspect these are the culprits because these are associated with the two 
> new tables I have added to the project.
> 
> Where there problems are, I don’t know.
> 
> 
> Thanks
> 
> Terry
> 
> 
>> On 14 Apr 2018, at 08:17, Terence Heaford via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> Thanks
>> 
>> Will have a look at that although the column does not have a column 
>> behaviour.
>> 
>> I have changed the properties of the header with DGH but the props listed in 
>> the Property Inspector do seem correct.
>> 
>> If I go back into DGH and click on the green tick to accept a change of 
>> margins for the header, the label again shows until the next time I restart 
>> the Stack in LiveCode
>> at which point it disappears again.
>> 
>> I can’t see what I have done to cause this errant behaviour.
>> 
>> There must be a bug somewhere but where…?
>> 
>> 
>> All the best
>> 
>> Terry
>> 
>> 
>> 
>>> On 13 Apr 2018, at 22:00, Bob Sneidar via use-livecode 
>>> <use-livecode@lists.runrev.com> wrote:
>>> 
>>> I had a similar issue. Labels would not appear. I got the dgprop ["column 
>>> labels"] of the datagrid and they were all correct! That made me think 
>>> there is something wrong with the behavior, but other datagrids were 
>>> working fine! What I did to fix it is I got the behavior of another 
>>> datagrid that DID work, and set the behavior of the errant datagrid to the 
>>> long id of that. 
>>> 
>>> Bob S
>>> 
>>> 
>>>> On Apr 13, 2018, at 11:52 , Terence Heaford via use-livecode 
>>>> <use-livecode@lists.runrev.com> wrote:
>>>> 
>>>> I have just started having an issue with the Column Labels on some newly 
>>>> created tables.
>>>> 
>>>> Basically they do not show unless I press “Refresh Data Grid" in the 
>>>> Property Inspector.
>>>> 
>>>> If I then shut down LiveCode and relaunch it they have gone missing again.
>>>> 
>>>> I am using the community edition of LC9 in OSX 10.13.4.
>>>> 
>>>> It is only affecting newly created DataGrids.
>>>> 
>>>> DataGrids that have been created in previous versions seem OK.
>>>> 
>>>> My only solution has been to overlay the DataGrid with a label.
>>>> 
>>>> 
>>>> Is this an issue anyone else has been having or is it just me?
>>>> 
>>>> I have been using the DGH 2.0.0 plugin if that makes a difference.
>>>> 
>>>> 
>>>> Thanks for any pointers.
>>>> 
>>>> 
>>>> All the best
>>>> 
>>>> Terry
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-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: DataGrid Column Labels

2018-04-14 Thread Terence Heaford via use-livecode
When I look at the Data Grid Templates in the project browser I see 2 tables 
that refer to DG2.

I suspect these are the culprits because these are associated with the two new 
tables I have added to the project.

Where there problems are, I don’t know.


Thanks

Terry


> On 14 Apr 2018, at 08:17, Terence Heaford via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Thanks
> 
> Will have a look at that although the column does not have a column behaviour.
> 
> I have changed the properties of the header with DGH but the props listed in 
> the Property Inspector do seem correct.
> 
> If I go back into DGH and click on the green tick to accept a change of 
> margins for the header, the label again shows until the next time I restart 
> the Stack in LiveCode
> at which point it disappears again.
> 
> I can’t see what I have done to cause this errant behaviour.
> 
> There must be a bug somewhere but where…?
> 
> 
> All the best
> 
> Terry
> 
> 
> 
>> On 13 Apr 2018, at 22:00, Bob Sneidar via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> I had a similar issue. Labels would not appear. I got the dgprop ["column 
>> labels"] of the datagrid and they were all correct! That made me think there 
>> is something wrong with the behavior, but other datagrids were working fine! 
>> What I did to fix it is I got the behavior of another datagrid that DID 
>> work, and set the behavior of the errant datagrid to the long id of that. 
>> 
>> Bob S
>> 
>> 
>>> On Apr 13, 2018, at 11:52 , Terence Heaford via use-livecode 
>>> <use-livecode@lists.runrev.com> wrote:
>>> 
>>> I have just started having an issue with the Column Labels on some newly 
>>> created tables.
>>> 
>>> Basically they do not show unless I press “Refresh Data Grid" in the 
>>> Property Inspector.
>>> 
>>> If I then shut down LiveCode and relaunch it they have gone missing again.
>>> 
>>> I am using the community edition of LC9 in OSX 10.13.4.
>>> 
>>> It is only affecting newly created DataGrids.
>>> 
>>> DataGrids that have been created in previous versions seem OK.
>>> 
>>> My only solution has been to overlay the DataGrid with a label.
>>> 
>>> 
>>> Is this an issue anyone else has been having or is it just me?
>>> 
>>> I have been using the DGH 2.0.0 plugin if that makes a difference.
>>> 
>>> 
>>> Thanks for any pointers.
>>> 
>>> 
>>> All the best
>>> 
>>> Terry
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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

Re: DataGrid Column Labels

2018-04-14 Thread Terence Heaford via use-livecode
Thanks

Will have a look at that although the column does not have a column behaviour.

I have changed the properties of the header with DGH but the props listed in 
the Property Inspector do seem correct.

If I go back into DGH and click on the green tick to accept a change of margins 
for the header, the label again shows until the next time I restart the Stack 
in LiveCode
at which point it disappears again.

I can’t see what I have done to cause this errant behaviour.

There must be a bug somewhere but where…?


All the best

Terry



> On 13 Apr 2018, at 22:00, Bob Sneidar via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> I had a similar issue. Labels would not appear. I got the dgprop ["column 
> labels"] of the datagrid and they were all correct! That made me think there 
> is something wrong with the behavior, but other datagrids were working fine! 
> What I did to fix it is I got the behavior of another datagrid that DID work, 
> and set the behavior of the errant datagrid to the long id of that. 
> 
> Bob S
> 
> 
>> On Apr 13, 2018, at 11:52 , Terence Heaford via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> I have just started having an issue with the Column Labels on some newly 
>> created tables.
>> 
>> Basically they do not show unless I press “Refresh Data Grid" in the 
>> Property Inspector.
>> 
>> If I then shut down LiveCode and relaunch it they have gone missing again.
>> 
>> I am using the community edition of LC9 in OSX 10.13.4.
>> 
>> It is only affecting newly created DataGrids.
>> 
>> DataGrids that have been created in previous versions seem OK.
>> 
>> My only solution has been to overlay the DataGrid with a label.
>> 
>> 
>> Is this an issue anyone else has been having or is it just me?
>> 
>> I have been using the DGH 2.0.0 plugin if that makes a difference.
>> 
>> 
>> Thanks for any pointers.
>> 
>> 
>> All the best
>> 
>> Terry
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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

DataGrid Column Labels

2018-04-13 Thread Terence Heaford via use-livecode
I have just started having an issue with the Column Labels on some newly 
created tables.

Basically they do not show unless I press “Refresh Data Grid" in the Property 
Inspector.

If I then shut down LiveCode and relaunch it they have gone missing again.

I am using the community edition of LC9 in OSX 10.13.4.

It is only affecting newly created DataGrids.

DataGrids that have been created in previous versions seem OK.

My only solution has been to overlay the DataGrid with a label.


Is this an issue anyone else has been having or is it just me?

I have been using the DGH 2.0.0 plugin if that makes a difference.


Thanks for any pointers.


All the best

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

Re: DataGrid Horizontal Scrollbar

2018-01-31 Thread Terence Heaford via use-livecode

> On 31 Jan 2018, at 15:46, Tom Glod via use-livecode 
>  wrote:
> 
> i just thought you needed the ability to scroll the header while there is
> no data in the grid.. so it doesn't defeat the purpose just over-rides
> it .maybe i mis-understood what you wanted



I just thought the correct way for this to work (auto with the horizontal 
scrollbar) should depend
on the width of the header rather than whether the table contains data and the 
width of the header.


Thanks

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


Re: DataGrid Horizontal Scrollbar

2018-01-31 Thread Terence Heaford via use-livecode

> On 29 Jan 2018, at 19:29, Tom Glod via use-livecode 
>  wrote:
> 
> set the disabled of the scrollbar to false once you find the name of it.


Yes, that’s certainly possible but surely defeats the point of the auto setting.


All the best

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

DataGrid Horizontal Scrollbar

2018-01-29 Thread Terence Heaford via use-livecode
When I have a DataGrid with the show horizontal scrollbar set to auto the 
scrollbar is hidden when the DataGrid contains no rows.

On the face of it this seems correct but when the DataGrid header is wider than 
the window the scrollbar is still not visible and hence it is not possible to 
see the header contents
without enlarging the window.

Is this the intended method?



Thanks

Terry



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


Datagrid2

2018-01-11 Thread Terence Heaford via use-livecode

 Submitted again due to incorrect address  
 Apologies for previous post 


I was just trying out LC9 DP11 and noted in the LC Blog that Datagrid2 is 
available for testing.

I am a little confused because on opening DP11 I could only find the previous 
Datagrid.

Is DG2 a widget or rolled into the old Datagrid format?

Is DG2 available in the community edition?

Could someone help me understand please so I may try it out.


Thanks

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


Datagrid2

2018-01-11 Thread Terence Heaford via use-livecode
I was just trying out LC9 DP11 and noted in the LC Blog that Datagrid2 is 
available for testing.

I am a little confused because on opening DP11 I could only find the previous 
Datagrid.

Is DG2 a widget or rolled into the old Datagrid format?

Is DG2 available in the community edition?

Could someone help me understand please so I may try it out.


Thanks

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


Printing a Browser widget

2017-11-27 Thread Terence Heaford via use-livecode
Has there been any progress with the Browser Widget being incorporated into 
print card?

If not is there a timescale for this?



Thanks


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


Re: Capturing screen into image

2017-07-02 Thread Terence Heaford via use-livecode
That’s cracked it.

Thanks very much to everyone who has contributed.

Not thought about this much but is having the print margins default to 72 the 
best option for most situations?
This is one for better minds than I.

Anyway, thanks again to all.


Terry


> On 2 Jul 2017, at 02:51, Paul Hibbert via use-livecode 
>  wrote:
> 
> Terry,
> 
> If your concern is that the area of the card doesn’t print exactly as you see 
> it on screen, it looks to me like the printMargins are set at the default 72 
> all round.
> 
> Try setting the printMargins to 0
> set the printMargins to "0,0,0,0"
> 
> 
> Paul
> 
> 
> 
> Paul
> p...@livecode.org
> 
> Mac OS Sierra 10.12.1
> 
> 


___
use-livecode mailing list
use-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: Capturing screen into image

2017-07-01 Thread Terence Heaford via use-livecode
Hi,

Thanks for your suggestion but I am afraid it’s not working here:

I have prepared a short movie on dropbox so you can see what happens when I 
print it and then open as PDF in MacOS Preview.

Not sure at all what is going wrong. Could it be something to do with the 
scaling in the amCharts example?

Dropbox Link:  https://www.dropbox.com/s/1ijbw12v0176kgm/test.mov?dl=0

Thanks

Terry


> On 1 Jul 2017, at 18:26, hh via use-livecode  
> wrote:
> 
> This works here.
> 
> on mouseUp
>  local ii="myImage", bb="Browser"
>  if there is no img ii then create img ii
>  put globalLoc(the topLeft of widget bb) into TL
>  put globalLoc(the botRight of widget bb) into BR
>  export snapshot from rect (TL,BR) to img ii as PNG
>  hide widget bb -- avoid artefacts from browser update
>  print card from (the topLeft of img ii) to (the botRight of img ii)
>  show widget bb
> end mouseUp
> 
> 
> ___
> use-livecode mailing list
> use-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: PrintPaperRectangle

2017-07-01 Thread Terence Heaford via use-livecode
Sorry about that, I should have realised (must be slow on the uptake today) 
but….


I still get the grey area when I print the card.
Do you have any insight into why this should happen?
(see thread “Capturing screen into image”)?


Thanks

Terry


> On 1 Jul 2017, at 14:02, Paul Dupuis via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> This is correctly reporting A4 with an 8px non-printable area around the
> edge:
> 
> 8.27 × 11.69 inches   8.2772  595.44
> 210 × 297 mm  11.69   72  841.68
> 
>   
>   
>   
>   
> 8,8,834,587   834 8   842
> l,t,r,b   
>   587 8   595
> 
> 
> A4 is 210 x 297mm which is 8.27 x 11.69 inches at 72px per inch is ~842
> x 595 (rounding off)
> Take the Right coordinate of 834 ad add 8 and you get 842 and the Bottom
> of 587 and add 8 and you get 595
> 
> 
> On 7/1/2017 2:58 AM, Terence Heaford via use-livecode wrote:
>> Thanks for your explanation. It does seem logical.
>> 
>> But where does 587 come from in 8,8,834,587 ?
>> 
>> A4 is 553.
>> 
>> Thanks
>> 
>> Terry
>> 
>> 
>> 
>>> On 30 Jun 2017, at 20:56, Bob Sneidar via use-livecode 
>>> <use-livecode@lists.runrev.com> wrote:
>>> 
>>> Almost no toner based printer can do this. It's called Full Bleed, and 
>>> think about what happens to the excess toner that has to go off the edge of 
>>> the paper to do that. Ink based printers are designed to do this because 
>>> they can just catch the ink that gets oversprayed, and you can clean/empty 
>>> the waste ink container periodically. Toner is different because the paper 
>>> with the toner has to travel through the fuser, and then what doesn't get 
>>> fused gets picked up in the waste toner bin AFTER the fusing process. The 
>>> toner that gets left behind on a toner based printer has to have some means 
>>> of being collected. 
>>> 
>>> There are a few production based copiers that can do this, but they are 
>>> made to do it. Most other printers are not. 
>>> 
>>> Bob S
>>> 
>>> 
>>>> On Jun 30, 2017, at 12:48 , Paul Dupuis via use-livecode 
>>>> <use-livecode@lists.runrev.com> wrote:
>>>> 
>>>> Some printer can not print right to the edge of the paper. I believe
>>>> that the numbers you are seeing reflect the physical limitation on the
>>>> edges of this particular printer.
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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

Re: Capturing screen into image

2017-07-01 Thread Terence Heaford via use-livecode
Thanks for your help.

I have changed the script to below and it does not work.

set the lockLoc of image "myImage" to false
export snapshot from rectangle (the rect of widget "Browser") to pictVariable 
as PNG
put pictVariable into image "myImage"
set the width of image "myImage" to the formattedWidth of image "myImage"
set the height of image "myImage" to the formattedHeight of image "myImage"
print card from topleft of image "myImage" to bottomRight of image “myImage"

The image “myImage" on the screen seems to be the same as widget “Browser”
but the print card line of the script shows the grey bar at the top.


Any other ideas please.

Thanks

Terry 




> On 30 Jun 2017, at 22:48, Mark Schonewille via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Set the lockLoc of the image to false. Set the text of the image to the PNG 
> data (you're doing this correctly), but don't set the rect of the image 
> first. If necessary, set the width of the image to the formattedWidth of the 
> image and set the height of the image to the formattedHeight of the image.
> 
> Kind regards,
> 
> Mark Schonewille
> http://economy-x-talk.com
> https://www.facebook.com/marksch
> 
> Buy the most extensive book on the
> LiveCode language:
> http://livecodebeginner.economy-x-talk.com
> 
> Op 30-Jun-17 om 20:38 schreef Terence Heaford via use-livecode:
>> This script does not work.
>> 
>> export snapshot from rectangle (the rect of widget "Browser") to 
>> pictVariable as PNG
>> 
>> set the rect of image "myImage" to the rect of widget "Browser"
>> 
>> put pictVariable into image "myImage"
>> 
>> print card from topleft of image "myImage" to bottomRight of image  “myImage"
>> 
>> 
>> After placing the captured image into “myImage” there is a grey bar at the 
>> top and the full width of the image is not visible.
>> 
>> Am I doing something wrong?
>> 
>> 
>> Thanks
>> 
>> Terry
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

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

Re: PrintPaperRectangle

2017-07-01 Thread Terence Heaford via use-livecode

Thanks for your explanation. It does seem logical.

But where does 587 come from in 8,8,834,587 ?

A4 is 553.

Thanks

Terry



> On 30 Jun 2017, at 20:56, Bob Sneidar via use-livecode 
>  wrote:
> 
> Almost no toner based printer can do this. It's called Full Bleed, and think 
> about what happens to the excess toner that has to go off the edge of the 
> paper to do that. Ink based printers are designed to do this because they can 
> just catch the ink that gets oversprayed, and you can clean/empty the waste 
> ink container periodically. Toner is different because the paper with the 
> toner has to travel through the fuser, and then what doesn't get fused gets 
> picked up in the waste toner bin AFTER the fusing process. The toner that 
> gets left behind on a toner based printer has to have some means of being 
> collected. 
> 
> There are a few production based copiers that can do this, but they are made 
> to do it. Most other printers are not. 
> 
> Bob S
> 
> 
>> On Jun 30, 2017, at 12:48 , Paul Dupuis via use-livecode 
>>  wrote:
>> 
>> Some printer can not print right to the edge of the paper. I believe
>> that the numbers you are seeing reflect the physical limitation on the
>> edges of this particular printer.
> 
> 
> ___
> use-livecode mailing list
> use-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


Fwd: Printing a Widget Browser

2017-06-30 Thread Terence Heaford via use-livecode


> Begin forwarded message:
> 
> From: Terence Heaford 
> Subject: Re: Printing a Widget Browser
> Date: 30 June 2017 at 19:21:14 BST
> To: jonathandly...@gmail.com
> 
> 
>> On 29 Jun 2017, at 20:37, jonathandly...@gmail.com wrote:
>> 
>> Could you export to a file, launch that in the user's standard browser, and 
>> print from there?
>> 
>> Sent from my iPhone
>> 
> 
> 
> A little long winded. Trying to complete this wholly from within LC
> 
> Thanks
> 
> Terry

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


Fwd: Printing a Widget Browser

2017-06-30 Thread Terence Heaford via use-livecode


> Begin forwarded message:
> 
> From: Terence Heaford 
> Subject: Re: Printing a Widget Browser
> Date: 30 June 2017 at 19:19:38 BST
> To: jonathandly...@gmail.com
> 
> 
>> On 29 Jun 2017, at 20:50, jonathandly...@gmail.com wrote:
>> 
>> Also, have you tried this:
>> 
>> Do "window.print()" in widget "my widget"
>> 
>> Sent from my iPhone
>> 
> 
> 
> Doesn’t work on MacOS
> 
> Thanks
> 
> Terry
> 
> 

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

Capturing screen into image

2017-06-30 Thread Terence Heaford via use-livecode
This script does not work.

export snapshot from rectangle (the rect of widget "Browser") to pictVariable 
as PNG

set the rect of image "myImage" to the rect of widget "Browser"

put pictVariable into image "myImage"

print card from topleft of image "myImage" to bottomRight of image  “myImage"


After placing the captured image into “myImage” there is a grey bar at the top 
and the full width of the image is not visible.

Am I doing something wrong?


Thanks

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

PrintPaperRectangle

2017-06-30 Thread Terence Heaford via use-livecode
LC 8.1.4, MacOS 10.12.5

Print Paper Rectangle returns 8,8,834,587 for A4 Landscape.

This does not seem to match the description in the dictionary?

"The printPaperRectangle property contains four comma-separated integers and is 
in points.
The default value reflects the default values of the printPaperSize and 
printPaperOrientation.
The four numbers represent the left, top, right and bottom of the rectangle 
being printed to.
The rectangle is relative to the top-left of the page, and the left and top 
will currently always be 0.”

Can anyone shed some light on this please.

Thanks


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

Printing a Widget Browser

2017-06-29 Thread Terence Heaford via use-livecode

Not posted for a long time but still keeping an eye on progress.

Is there any chance of printing a Browser Widget any time soon?

This code just gives a grey printout.

I am waiting patiently for this so that I can use for example amCharts within 
LiveCode.

I have implemented a print routine by exporting to an image but as this is an 
image it can turn out blurred.

Thanks

Terry


on mouseUp
   
   answer page setup --as sheet
   if the result = "cancel" then
  exit mouseUp
   end if
   answer printer --as sheet
   if the result = "cancel" then
  exit mouseUp
   end if
   
   put  the printPaperRectangle into tPaperRect
   put item 3 of tPaperRect into tAvailWidth
   put item 4 of tPaperRect into tAvailHeight
   
   put the width of widget "Browser" into tChartWidth
   put the height of widget "Browser" into tChartHeight
   
   put tAvailWidth/tChartWidth into tWidthRatio   
   put tAvailHeight/tChartHeight into tHeightRatio   
   put min(tWidthRatio,tHeightRatio) into tRatio   
   
   put tRatio * tChartWidth into tPrintWidth
   put tRatio * tChartHeight into tPrintHeight
   
   put 0 into item 1 of tPrintRect
   put 0 into item 2 of tPrintRect
   put tPrintWidth into item 3 of tPrintRect
   put tPrintHeight into item 4 of tPrintRect
   
   print card from topleft of widget "Browser" to bottomRight of widget 
"Browser" into tPrintRect
   
   
end mouseUp
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode