Re: Tar and a gz Archive [OT]

2020-04-01 Thread Sean Cole (Pi) via use-livecode
I'm using

*put* shell("unzip -p '" & tZipPath & "'") into tTDProductList
-p is because it's password protected. It'll extract all contents
recursively. If you don't want it recursive you need to specify either what
you do want or don't want extracted. To specify just one file you want to
extract just add the subpath to it at the end, eg:

'unzip c:/myfile.zip subdir/subdir2/aFile.txt'

To exclude a file use the -x tag:

'unzip -x c:/myfile.zip subdir/subdir2/aFile.txt'

use unzip --help or --man to find out other uses. If unzip is not installed
(which it should be for Debian, CentOS and Ubuntu) then use:  sudo apt
install unzip

Sean Cole
*Pi Digital *


On Thu, 2 Apr 2020 at 01:58, Ralph DiMola via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I'm sorry... I forgot to mention it's Linux command line via ssh shell.
>
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdim...@evergreeninfo.net
>
> -Original Message-
> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On
> Behalf Of Bob Sneidar via use-livecode
> Sent: Wednesday, April 01, 2020 8:39 PM
> To: How to use LiveCode
> Cc: Bob Sneidar
> Subject: Re: Tar and a gz Archive [OT]
>
> Looks like Tar is a Windows 10 only command line utility. I’m sure you
> know but tar /? should get you the options available. Whether or not you
> can grok what they actually mean is another thing.
>
> There are some powershelgl scripts out there but not with the specificity
> you need.
>
> Bob S
>
>
>
> On Apr 1, 2020, at 5:13 PM, Ralph DiMola via use-livecode <
> use-livecode@lists.runrev.com>
> wrote:
>
> I'm under the gun and as with any new program the number of options and
> their interactions are difficult to comprehend. I've tried a few
> combinations with limited success. Any help would be appreciated.
>
> I need to extract from a .tar.gz archive at the command line using "tar"
> as follows:
> 1) Extract the files from a specific folder in the archive into another
> folder with no recursion keeping the security levels and have the files
> owned by the destination folder.
> 2) Same as 1 but to recurs n times.
>
> Thanks
>
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdim...@evergreeninfo.net
>
> ___
> use-livecode mailing list
> use-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: Tar and a gz Archive [OT]

2020-04-01 Thread Mark Wieder via use-livecode

On 4/1/20 5:13 PM, Ralph DiMola via use-livecode wrote:


I need to extract from a .tar.gz archive at the command line using "tar" as 
follows:
1) Extract the files from a specific folder in the archive into another folder 
with no recursion keeping the security levels and have the files owned by the 
destination folder.


tar xvf #doesn't do the trick? (after gunzipping of course)


2) Same as 1 but to recurs n times.


I'm not understanding this.
Of course, that probably means I'm misunderstanding the whole thing.

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

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


RE: Tar and a gz Archive [OT]

2020-04-01 Thread Ralph DiMola via use-livecode
I'm sorry... I forgot to mention it's Linux command line via ssh shell.

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of 
Bob Sneidar via use-livecode
Sent: Wednesday, April 01, 2020 8:39 PM
To: How to use LiveCode
Cc: Bob Sneidar
Subject: Re: Tar and a gz Archive [OT]

Looks like Tar is a Windows 10 only command line utility. I’m sure you know but 
tar /? should get you the options available. Whether or not you can grok what 
they actually mean is another thing.

There are some powershelgl scripts out there but not with the specificity you 
need.

Bob S



On Apr 1, 2020, at 5:13 PM, Ralph DiMola via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

I'm under the gun and as with any new program the number of options and their 
interactions are difficult to comprehend. I've tried a few combinations with 
limited success. Any help would be appreciated.

I need to extract from a .tar.gz archive at the command line using "tar" as 
follows:
1) Extract the files from a specific folder in the archive into another folder 
with no recursion keeping the security levels and have the files owned by the 
destination folder.
2) Same as 1 but to recurs n times.

Thanks

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net

___
use-livecode mailing list
use-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: Tar and a gz Archive [OT]

2020-04-01 Thread Bob Sneidar via use-livecode
Looks like Tar is a Windows 10 only command line utility. I’m sure you know but 
tar /? should get you the options available. Whether or not you can grok what 
they actually mean is another thing.

There are some powershelgl scripts out there but not with the specificity you 
need.

Bob S



On Apr 1, 2020, at 5:13 PM, Ralph DiMola via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

I'm under the gun and as with any new program the number of options and their 
interactions are difficult to comprehend. I've tried a few combinations with 
limited success. Any help would be appreciated.

I need to extract from a .tar.gz archive at the command line using "tar" as 
follows:
1) Extract the files from a specific folder in the archive into another folder 
with no recursion keeping the security levels and have the files owned by the 
destination folder.
2) Same as 1 but to recurs n times.

Thanks

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net

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


Tar and a gz Archive [OT]

2020-04-01 Thread Ralph DiMola via use-livecode
I'm under the gun and as with any new program the number of options and their 
interactions are difficult to comprehend. I've tried a few combinations with 
limited success. Any help would be appreciated.

I need to extract from a .tar.gz archive at the command line using "tar" as 
follows:
1) Extract the files from a specific folder in the archive into another folder 
with no recursion keeping the security levels and have the files owned by the 
destination folder.
2) Same as 1 but to recurs n times.

Thanks

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net


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


Re: How to find the column and row of a basic tableField

2020-04-01 Thread Pi Digital via use-livecode
I made two mistakes there. First:

Put cRevTable[“currentxcell”],cRevTable[“currentycell”] into tCellIndex

Should be:

Put the cRevTable[“currentxcell”] of me , the cRevTable[“currentycell”] of me 
into tCellIndex

And:

select nothing

Should be:

select empty

Oops 

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


Re: How to find the column and row of a basic tableField

2020-04-01 Thread Pi Digital via use-livecode
Thanks Bernd. 

This only works if there is already data in the field. If you put empty into 
the field it produces no results. In those instances you are forced to get an 
x,y clickLoc and use the tabstops and textHeight to hard code the result. 

The revTableLibrary was last modified in 2015 from your recommendations and 
pulls. Notable is the ones in revCalculateCellLoc and revCalculateCellRect. 
Interestingly in revCalculateCellLoc there is a couple of lines that set 
cREVTable[“currentxcell”] and [“currentycell”] of the object. 

Using:
Put cRevTable[“currentxcell”],cRevTable[“currentycell”] into tCellIndex
Works a charm. 

To make this work you do need to have cellEdit enabled but to avoid having it 
actually enable editing the text, in the mouseup just have a ‘select nothing’ 
to immediately exit the field. That way you only return the xy index and can 
use other means to add in or collect cell data. 

This is far less convoluted and exactly what I was looking for. None of this 
faffing around with huge lines of code. LiveCode is supposed to be EASY and 
almost instinctive. This is pretty close. 

It’s a real shame that these are not visible in the property inspector as 
standard properties and not even in the customProperties cRevTable until you 
have clicked into one of the cells in runtime when it populate the custom set.

It’s even more of a shame that this is not documented anywhere, in the 
dictionary, guide, lessons, tutorials. It’s practically lost to obscurity in 
the forums too only being found if I search for currentxcell specifically. I 
only found it by hacking through all of the object library code of the IDE 
stacks. 

This definitely make the table field object far more useful, though. 

Sean Cole
Pi Digital Productions Ltd
___
use-livecode mailing list
use-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 Bob Sneidar via use-livecode
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>> 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
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


How to find the column and row of a basic tableField

2020-04-01 Thread Niggemann, Bernd via use-livecode
There was a long thread regarding the dataGrid which somehow touched getting 
the row and column of a basic tableField.
I posted this solution also there. Mike Doub found some problems that turned 
out to be due to the fact that "cellEdit" was set to true for the table object.
If "cellEdit" is true then a front script takes over and creates a temporary 
field.

To post my solution to the problem again I start this new thread for clarity. 
The script is an elaboration on a sketchy script by Jacque.

The basic tableField is a regular field which has the option of "cellEditing". 
Apart from that it is a field that uses tab-delimited data to display it in a 
table form. 
hGrid and vGrid show horizontal and vertical dividers.

To get at the column number and the row number to determine the cell the user 
clicked on when the field's lockText is true here is a script that works well 
for me.

To test this make a regular field, name it "tf" and a second field for the 
result named "fRes". Make sure that "cellEdit" of the field is set to false 
(tab "table" in Properties Inspector)

set the script of field "tf" to 

---
on mouseUp
   put word 2 of the clickLine into tLine
   put getColumn(the clickH) into tItem
   put "Row:" && tLine into tRow
   put "Col:" && tItem into tColumn
   set the itemDelimiter to tab
   if tItem is not empty then
  put tRow &cr& tColumn & cr & "ClickH: " & the clickH & cr & "content: " & 
item tItem of line tLine of me & cr  into field "fRes"
   else
  put "No Item" into tItem
  put tRow &cr& tColumn & cr & "ClickH: " & the clickH & cr & "content: " & 
tItem  into field "fRes"
   end if
end mouseUp

function getColumn pClickH
   put the tabstops of me into tTabs
   put the num of items in tTabs into tNumStops
   if tNumStops > 1 then
  put last item of tTabs - item -2 of tTabs into tTabWidth
   else
  put item 1 of tTabs into tTabWidth
   end if
   set the itemdel to tab
   put the num of items in line 1 of me into tColumns
   if tNumStops < tColumns then -- add missing tabstops
  repeat with x = tNumStops+1 to tColumns
 put comma & (tTabWidth * x) after tTabs
  end repeat
   end if
   set the itemdel to comma
   put the hScroll of me into tHScroll
   put the borderwidth of me into tBrdr -- tested from 0 to 4
   put the leftMargin of me - 3 into tLeftMarg -- tested from 4 to 12
   put the left of me + tBrdr into tLeftAndBorder
   put tLeftAndBorder - tHScroll - tLeftMarg into tLeftOfItem
   put tLeftAndBorder - tHScroll + tLeftMarg + 1 into tRightOfItem
   put 0 & comma before tTabs
   repeat with x = 1 to the num of items in tTabs
  if pClickH > (item x of tTabs) + tLeftOfItem and \
pClickH < (item x+1 of tTabs) + tRightOfItem then
 return x
  end if
   end repeat
   return empty
end getColumn
--

add a button to the card with the following script for test data

--
on mouseUp
   put "1,2,3,4,5,6" into tLine
   put empty into field "tf"
   replace comma with tab in tLine
   set the itemDelimiter to tab
   repeat 6
  put tLine & cr after tCollect
  repeat with i = 1 to 6
 add 6 to item i of tLine
  end repeat
   end repeat
   delete last char of tCollect
   lock screen
   put tCollect into field "tf"
   set the hGrid of field "tf" to true
   set the vGrid of field "tf" to true
   set the vScrollbar of field "tf" to true
   set the tabStops of field "tf" to 77
   set the lockText of field "tf" to true
   unlock screen
end mouseUp

--

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


OT: where did this come from?

2020-04-01 Thread Mark Wieder via use-livecode



https://cs.stackexchange.com/questions/121528/what-is-the-earliest-use-of-the-this-keyword-in-any-programming-language

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

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


Re: 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


AW: Answer dialog enhancement...

2020-04-01 Thread Paul Dupuis via use-livecode
So I have a working mechanism to add a "Don't Ask Again" check box to 
the existing standard Answer Dialog on the fly. I offer it up to the 
community for anyone who needs it and for anyone who may want to improve 
the code. The scripts are below. There is a sample usage you can place 
in a clickable button and below that is a BEHAVIOR script that must be 
in button whose name matches what is used in the clickable button.


This is the first time I have really found a use for the "before" and 
"after" handlers. What a great addition to LiveCode!


Essentially, I add a behavior to the card of the standard "Answer 
Dialog" that positions and cleans up the Don't Ask Again check box AFTER 
the proOpenCard handler has positioned everything else AND a BEFORE 
mouseUp handler to trap clicks for changing the checkbox hilite that 
would otherwise close the dialog and return a clicked button name.


I needed to set a number of properties for the checkbox because the 
preOpenCard treats ANY button in the Answer Dialog like regular buttons 
and hides those not in use by making them 1px in size and moving them 
off screen. I may not have needed to change every property I did, but I 
didn't have the time to go through the Answer Dialog card script to 
determine exactly what properties those scripts were changing that I 
needed to reset.


I think it would be great in LC, Ltd. could fold this into the standard 
'answer' command some how.



-- Sent when the mouse is released after clicking
-- pMouseButton specifies which mouse button was pressed
on mouseUp pMouseButton
  dontaskagain "on"
  answer warning "Some message I may not want to see again." with 
"Cancel" or "OK" titled "A Message"

  put it into tAnswer
  put dontaskstatus() into tDontAskAgain
  dontaskagain "off"
  --
  put "Don't Ask is:"&&tDontAskAgain &&"And button clicked is:"&&tAnswer
end mouseUp

command dontaskagain pActivate
  switch pActivate
    case "on"
  set the behavior of cd 1 of stack "Answer Dialog" to the long id 
of btn "DontAskBehavior" of this cd

  break
    case "off"
  set the behavior of cd 1 of stack "Answer Dialog" to empty
  delete btn "DontAskAgain" of cd 1 of stack "Answer Dialog"
  break
  end switch
end dontaskagain

function dontaskstatus
  if exists(btn "DontAskAgain" of cd 1 of stack "Answer Dialog") then
    put the hilite of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" into tDontAskAgain

    return tDontAskAgain
  else
    return false
  end if
end dontaskstatus

BEHAVIOR BUTTON SCRIPT

after preOpenCard
  if exists(btn "DontAskAgain" of cd 1 of stack "Answer Dialog") then
    set the style    of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to "checkbox"
    set the autoHilite   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to false
    set the opaque   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to false
    set the threeD   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to false
    set the showBorder   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to false
    set the hiliteBorder of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to false


    set the height   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to 25
    set the width    of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to 120
    set the bottomLeft   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to the bottomLeft of cd 1 of stack "Answer Dialog"

  else
    -- setup the templateButton
    set the style of the templateButton to "checkbox"
    set the label of the templateButton to "Don't Ask Again."
    --
    create btn "DontAskAgain" in cd 1 of stack "Answer Dialog"
    --
    reset the templateButton
    --
    set the style    of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to "checkbox"
    set the autoHilite   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to false
    set the opaque   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to false
    set the threeD   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to false
    set the showBorder   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to false
    set the hiliteBorder of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to false


    set the height   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to 25
    set the width    of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to 120
    set the bottomLeft   of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to the bottomLeft of cd 1 of stack "Answer Dialog"

  end if
end preOpenCard

before mouseUp pMouseButton
  -- if the target is the check box, check the box and do not pass mouseUp
  if the long ID of the target = the long id of btn "DontAskAgain" of 
cd 1 of stack "Answer Dialog" then
    set the hilite of btn "DontAskAgain" of cd 1 of stack "Answer 
Dialog" to not (the hilite of btn "DontAskAgain" of cd 1 of stack 
"Answer Dialog")

    

Re: DataGrid question...

2020-04-01 Thread Bob Sneidar via use-livecode
Hi all. 

I’m not sure I understand the nature of the problem anymore as the thread is so 
long, but if you are using the data grid, it is very easy to get the actual 
index and column number of a cell that has been clicked on. If you put this 
into your data grid script, you can see it at work. 

If you don’t want the column headers to show just set the dgprop [“show 
Header”] to false. You will need the header to control column widths though. 
The dividers are actual lines, so I suspect in a mouseDown handler you can 
detect that and handle accordingly. 

on mouseUp
  put the mouseControl into tControl
  put word 1 of the name of tControl into tType
  
  if tType is "field" then  — otherwise anything goes
put getRowAndColumn(tControl) into tRowAndColumn
  end if
  
  pass mouseUp
end mouseUp

function getRowAndColumn pControl
  put the short name of pControl into tName
  put word 1 of tName into tColumName
  put 0 + word 2 of tName into tRow
  put the dgProp ["columns"] of me into tColumns
  put lineOffset(tColumName, tColumns) into tColumnNum
  
  /* Workaround for failure of dgIndexOfLine
  put the dgIndexOfLine [tRow] of me into tIndex
  */
  
  put the dgHilitedIndex of me into tIndex
  return tIndex,tColumnNum
end getRowAndColumn
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


dgIndexOfLine not returning index

2020-04-01 Thread Bob Sneidar via use-livecode
Hi all.

Not sure if this is a bug or expected behavior. In a vertically scrolled data 
grid I have a mouseUp handler. Ignore the fiddly bits that are irrelevant. The 
last two lines are the important ones:

on mouseUp
  put the mouseControl into tControl
  put word 1 of the name of tControl into tType
  if tType is not "field" then pass mouseUp
  put the short name of tControl into tName
  put word 1 of tName into tColumName
  put 0 + word 2 of tName into tRow
  put the dgProp ["columns"] of me into tColumns
  put lineOffset(tColumName, tColumns) into tColumnNum
  put the dgIndexOfLine [tRow] of me into tIndex
  put the dgHilitedIndex of me into tHilitedIndex
end mouseUp

It’s my understanding that the dgIndexOfLine should return the actual index 
corresponding to the line, but instead it simply returns the line, In my case I 
am clicking on line 5 of a vertically scrolled data grid. tIndex contains 5, 
tHilitedIndex contains 55! As far as I can see, the dgIndexOfLine should return 
the same thing (assuming I am clicking on a control in the hilitedline).

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: DataGrid question...

2020-04-01 Thread Niggemann, Bernd via use-livecode
Hello Mike,

I cannot reproduce the scrolling nor the failing of reporting.

What I did notice is when I changed the size of the field via the mouse in 
editMode at times switching back to browse mode via command-option-tab the 
field did not focus when clicking on it and it did not report anything. 
Apparently because it is not focused.

Make sure the field is focused by e.g. clicking on the card after resizing and 
then the field.
But there is nothing in the code that I can see that would take focus away from 
the field, nor does the code trigger scrolling.

Kind regards
Bernd



Mike Doub via 
use-livecode<https://www.mail-archive.com/search?l=use-livecode@lists.runrev.com&q=from:%22Mike+Doub+via+use%5C-livecode%22>
 Wed, 01 Apr 2020 08:07:17 
-0700<https://www.mail-archive.com/search?l=use-livecode@lists.runrev.com&q=date:20200401>

There is an interesting interaction between the scrolling function, the size of
the field, mouseUp or Down.  For my test, when I click the 6th column,
scrolling occurs and the function returns nothing.  If I size the field such
that no scrolling occurs, all works as expected.   If I change the mouseUp to
mouseDown, all works as expected.   I have not spent the time to figure out
what is going on, but these are my observations.

-= Mike

On Apr 1, 2020, 9:29 AM -0400, Niggemann, Bernd via use-livecode
mailto:use-livecode@lists.runrev.com>>, wrote:
> This is a modification of Jaque's script to get the row and column of a
> locked tableField when the user clicks in a cell.
>
> Use tableField whose lockText is true. Set its script to
>
>
> 
> on mouseUp
> put "Row:" && word 2 of the clickline into tRow
> put "Col:" && getColumn(the clickH) into tColumn
> set the itemDelimiter to tab
> put tRow &cr& tColumn & cr & "ClickH: " & the clickH into field "fRes"
> end mouseUp
>
> function getColumn pClickH
> put the tabstops of me into tTabs
> put the num of items in tTabs into tNumStops
> if tNumStops > 1 then
> put last item of tTabs - item -2 of tTabs into tTabWidth
> else
> put item 1 of tTabs into tTabWidth
> end if
> set the itemdel to tab
> put the num of items in line 1 of me into tColumns
> if tNumStops < tColumns then -- add missing tabstops
> repeat with x = tNumStops+1 to tColumns
> put comma & (tTabWidth * x) after tTabs
> end repeat
> end if
> set the itemdel to comma
> put the hScroll of me into tHScroll
> put the borderwidth of me into tBrdr -- tested from 0 to 4
> put the leftMargin of me - 3 into tLeftMarg -- tested from 4 to 12
> put the left of me + tBrdr into tLeftAndBorder
> put tLeftAndBorder - tHScroll - tLeftMarg into tLeftOfItem
> put tLeftAndBorder - tHScroll + tLeftMarg + 1 into tRightOfItem -- + 1 is a
> fudge
> put 0 & comma before tTabs
> repeat with x = 1 to the num of items in tTabs
> if pClickH > (item x of tTabs) + tLeftOfItem and \
> pClickH < (item x+1 of tTabs) + tRightOfItem then
> return x
> end if
> end repeat
> return empty
> end getColumn
> 
>
>
> In my testing it works for changed borderWidth and margins, hscrolls and
> vScrolls
>
> If you want to test it take a regular field, set its name to "tf", set its
> script to above script
>
> and from a button apply this
>
>
> -
> on mouseUp
> put "1,2,3,4,5,6" into tLine
> put empty into field "tf"
> replace comma with tab in tLine
> set the itemDelimiter to tab
> repeat 6
> put tLine & cr after tCollect
> repeat with i = 1 to 6
> add 6 to item i of tLine
> end repeat
> end repeat
> delete last char of tCollect
> lock screen
> put tCollect into field "tf"
> set the hGrid of field "tf" to true
> set the vGrid of field "tf" to true
> set the hScrollbar of field "tf" to true
> set the tabStops of field "tf" to 77
> set the lockText of field "tf" to true
> unlock screen
> 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


Re: Possible new dev hardware?

2020-04-01 Thread Andre Garzia via use-livecode
It looks like just a PC from the listed hardware specs. Probably running
some specialized Linux (my guess).

On Wed, 1 Apr 2020 at 11:36, Quentin Long via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Atari is apparently producing a gizmo they call the "Atari VCS",
> which they're positioning primarily as a video game console. However!
> According to an email I just got from them, this beast has what they're
> calling "Atari sandbox mode (install any OS)", and they claim "If you want
> to develop just for fun or for other platforms, use Sandbox Mode to install
> any development environment you want." The relevance to LiveCode is left as
> an exercise for the reader.
> The URL to the propaganda website:
>
> https://atarivcs.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
>


-- 
http://www.andregarzia.com -- All We Do Is Code.
http://fon.nu -- minimalist url shortening service.
___
use-livecode mailing list
use-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 question...

2020-04-01 Thread Mike Doub via use-livecode
There is an interesting interaction between the scrolling function, the size of 
the field, mouseUp or Down.  For my test, when I click the 6th column, 
scrolling occurs and the function returns nothing.  If I size the field such 
that no scrolling occurs, all works as expected.   If I change the mouseUp to 
mouseDown, all works as expected.   I have not spent the time to figure out 
what is going on, but these are my observations.

-= Mike

On Apr 1, 2020, 9:29 AM -0400, Niggemann, Bernd via use-livecode 
, wrote:
> This is a modification of Jaque's script to get the row and column of a 
> locked tableField when the user clicks in a cell.
>
> Use tableField whose lockText is true. Set its script to
>
>
> 
> on mouseUp
> put "Row:" && word 2 of the clickline into tRow
> put "Col:" && getColumn(the clickH) into tColumn
> set the itemDelimiter to tab
> put tRow &cr& tColumn & cr & "ClickH: " & the clickH into field "fRes"
> end mouseUp
>
> function getColumn pClickH
> put the tabstops of me into tTabs
> put the num of items in tTabs into tNumStops
> if tNumStops > 1 then
> put last item of tTabs - item -2 of tTabs into tTabWidth
> else
> put item 1 of tTabs into tTabWidth
> end if
> set the itemdel to tab
> put the num of items in line 1 of me into tColumns
> if tNumStops < tColumns then -- add missing tabstops
> repeat with x = tNumStops+1 to tColumns
> put comma & (tTabWidth * x) after tTabs
> end repeat
> end if
> set the itemdel to comma
> put the hScroll of me into tHScroll
> put the borderwidth of me into tBrdr -- tested from 0 to 4
> put the leftMargin of me - 3 into tLeftMarg -- tested from 4 to 12
> put the left of me + tBrdr into tLeftAndBorder
> put tLeftAndBorder - tHScroll - tLeftMarg into tLeftOfItem
> put tLeftAndBorder - tHScroll + tLeftMarg + 1 into tRightOfItem -- + 1 is a 
> fudge
> put 0 & comma before tTabs
> repeat with x = 1 to the num of items in tTabs
> if pClickH > (item x of tTabs) + tLeftOfItem and \
> pClickH < (item x+1 of tTabs) + tRightOfItem then
> return x
> end if
> end repeat
> return empty
> end getColumn
> 
>
>
> In my testing it works for changed borderWidth and margins, hscrolls and 
> vScrolls
>
> If you want to test it take a regular field, set its name to "tf", set its 
> script to above script
>
> and from a button apply this
>
>
> -
> on mouseUp
> put "1,2,3,4,5,6" into tLine
> put empty into field "tf"
> replace comma with tab in tLine
> set the itemDelimiter to tab
> repeat 6
> put tLine & cr after tCollect
> repeat with i = 1 to 6
> add 6 to item i of tLine
> end repeat
> end repeat
> delete last char of tCollect
> lock screen
> put tCollect into field "tf"
> set the hGrid of field "tf" to true
> set the vGrid of field "tf" to true
> set the hScrollbar of field "tf" to true
> set the tabStops of field "tf" to 77
> set the lockText of field "tf" to true
> unlock screen
> end mouseUp
>
> -
>
>
>
> Kind regards
> Bernd
>
>
>
> ___
> use-livecode mailing list
> use-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 question...

2020-04-01 Thread Niggemann, Bernd via use-livecode
This is a modification of Jaque's script to get the row and column of a locked 
tableField when the user clicks in a cell.

Use tableField whose lockText is true. Set its script to



on mouseUp
   put "Row:" && word 2 of the clickline into tRow
   put "Col:" && getColumn(the clickH) into tColumn
   set the itemDelimiter to tab
   put tRow &cr& tColumn & cr & "ClickH: " & the clickH into field "fRes"
end mouseUp

function getColumn pClickH
   put the tabstops of me into tTabs
   put the num of items in tTabs into tNumStops
   if tNumStops > 1 then
  put last item of tTabs - item -2 of tTabs into tTabWidth
   else
  put item 1 of tTabs into tTabWidth
   end if
   set the itemdel to tab
   put the num of items in line 1 of me into tColumns
   if tNumStops < tColumns then -- add missing tabstops
  repeat with x = tNumStops+1 to tColumns
 put comma & (tTabWidth * x) after tTabs
  end repeat
   end if
   set the itemdel to comma
   put the hScroll of me into tHScroll
   put the borderwidth of me into tBrdr -- tested from 0 to 4
   put the leftMargin of me - 3 into tLeftMarg -- tested from 4 to 12
   put the left of me + tBrdr into tLeftAndBorder
   put tLeftAndBorder - tHScroll - tLeftMarg into tLeftOfItem
   put tLeftAndBorder - tHScroll + tLeftMarg + 1 into tRightOfItem -- + 1 is a 
fudge
   put 0 & comma before tTabs
   repeat with x = 1 to the num of items in tTabs
  if pClickH > (item x of tTabs) + tLeftOfItem and \
pClickH < (item x+1 of tTabs) + tRightOfItem then
 return x
  end if
   end repeat
   return empty
end getColumn



In my testing it works for changed borderWidth and margins, hscrolls and 
vScrolls

If you want to test it take a regular field, set its name to "tf", set its 
script to above script

and from a button apply this


-
on mouseUp
   put "1,2,3,4,5,6" into tLine
   put empty into field "tf"
   replace comma with tab in tLine
   set the itemDelimiter to tab
   repeat 6
  put tLine & cr after tCollect
  repeat with i = 1 to 6
 add 6 to item i of tLine
  end repeat
   end repeat
   delete last char of tCollect
   lock screen
   put tCollect into field "tf"
   set the hGrid of field "tf" to true
   set the vGrid of field "tf" to true
   set the hScrollbar of field "tf" to true
   set the tabStops of field "tf" to 77
   set the lockText of field "tf" to true
   unlock screen
end mouseUp

-



Kind regards
Bernd



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


Notarization

2020-04-01 Thread Andre Garzia via use-livecode
Hi Folks,

This just appeared on my feed and I thought that some people here who are
trying to ship macOS software might benefit from it.

https://github.com/akeru-inc/xcnotary/blob/master/README.md

This is an ease to use command-line tool for notarizing your app. The
linked readme explains more about it.

Best
Andre

-- 
http://www.andregarzia.com -- All We Do Is Code.
http://fon.nu -- minimalist url shortening service.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Possible new dev hardware?

2020-04-01 Thread Quentin Long via use-livecode
Atari is apparently producing a gizmo they call the "Atari VCS", which they're 
positioning primarily as a video game console. However! According to an email I 
just got from them, this beast has what they're calling "Atari sandbox mode 
(install any OS)", and they claim "If you want to develop just for fun or for 
other platforms, use Sandbox Mode to install any development environment you 
want." The relevance to LiveCode is left as an exercise for the reader.
The URL to the propaganda website:

https://atarivcs.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