Re: Set Line color in dG?

2020-06-16 Thread zryip theSlug via use-livecode
Assuming the lesson you have taken in example is the following:
http://lessons.livecode.com/m/datagrid/l/7332-how-can-i-colorize-individual-lines-in-a-table

Code for coloring rows is located in the button "My column default
behavior".
The code you shared is located in the "toggle line 3 color" but it is not
enough for coloring a datagrid row. Having a row in color is not a standard
datagrid feature. So that is the reason you have to change the  "default
column" behavior script of your datagrid.

Do you have copied the  "My column default behavior" button in your project
and if yes, do you have linked your datagrid to this button by using the
code?

 set the dgProp["default column behavior"] of grp "myDatagrid" to the long
id of btn " My column default behavior " or what ever you named your column
behavior script button.

where  "myDatagrid" is the name of your datagrid.

Hope I'm more clear in my explanation.


Best Regards,

On Tue, Jun 16, 2020 at 10:08 PM Prothero-ELS via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Zryp,
> Crap, accidentally sent the response without finishing.
>
> I was checking that the code in my test button was actually talking to the
> datagrid in question, and it returned the correct values, so I assumed it
> was.
>
> I don’t understand how “myBtn” would participate. I need to change colors
> from some other script.
>
> Best,
> Bill
>
> William Prothero
> https://earthlearningsolutions.org
>
> > On Jun 16, 2020, at 1:04 PM, Prothero-ELS <
> proth...@earthlearningsolutions.org> wrote:
> >
> > Zryp,
> > What I wanted to do is make a distinction between data that was
> retrieved from a database and data that was entered but not yet stored. A
> datagrid is. Way overkill for what I’m doing, but  the button that
> accesses the datagrid data to get the specific line is for testing only.
> >
> > William Prothero
> > https://earthlearningsolutions.org
> >
> >> On Jun 16, 2020, at 12:52 PM, zryip theSlug via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >>
> >> Bill,
> >>
> >> The example you mention is probably using a custom column behavior
> script
> >> for accomplishing this.
> >> Do you have copied the button in your project? The button must be
> linked to
> >> your datagrid by using the following code:
> >>
> >> set the dgProp["default column behavior"] of grp "myDatagrid" to the
> long
> >> id of btn "myBtn"
> >>
> >>
> >> Best Regards,
> >>
> >>
> >>> On Tue, Jun 16, 2020 at 8:55 PM William Prothero via use-livecode <
> >>> use-livecode@lists.runrev.com> wrote:
> >>>
> >>> Folks:
> >>> I’m having trouble getting the line color of a dataGrid to change. The
> >>> lessons shows a very simple tutorial and the download example works.
> >>> However, in my application, it doesn’t.
> >>>
> >>> The code is:
> >>> on mouseup
> >>>
> >>>   put the dgDataOfLine[3] of group "meterReadings" of this cd into
> >>> theDataA
> >>>
> >>>   put not theDataA["line has error"] into theDataA["line has error"]
> >>>
> >>>   set the dgDataOfLine[3] of group "meterReadings" of this cd to
> theDataA
> >>>
> >>> end mouseup
> >>>
> >>> I get the expected values for the line shown on the datagrid, but the
> >>> color doesn’t change. I’m running Catalina 10.15.5 on a pretty new Mac
> >>> laptop. I’m using livecode 9.6.0 Business.
> >>>
> >>> The mystery is that the downloaded example works as expected, but not
> on
> >>> my app.
> >>>
> >>> Have I missed something?
> >>>
> >>> Best,
> >>> Bill
> >>>
> >>>
> >>> William A. Prothero
> >>> https://earthlearningsolutions.org
> >>>
> >>>
> >>> ___
> >>> use-livecode mailing list
> >>> use-livecode@lists.runrev.com
> >>> Please visit this url to subscribe, unsubscribe and manage your
> >>> subscription preferences:
> >>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>>
> >>
> >>
> >> --
> >> Zryip TheSlug
> >> http://www.aslugontheroad.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
>


-- 
Zryip TheSlug
http://www.aslugontheroad.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: Set Line color in dG?

2020-06-16 Thread zryip theSlug via use-livecode
Bill,

The example you mention is probably using a custom column behavior script
for accomplishing this.
Do you have copied the button in your project? The button must be linked to
your datagrid by using the following code:

set the dgProp["default column behavior"] of grp "myDatagrid" to the long
id of btn "myBtn"


Best Regards,


On Tue, Jun 16, 2020 at 8:55 PM William Prothero via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Folks:
> I’m having trouble getting the line color of a dataGrid to change. The
> lessons shows a very simple tutorial and the download example works.
> However, in my application, it doesn’t.
>
> The code is:
> on mouseup
>
> put the dgDataOfLine[3] of group "meterReadings" of this cd into
> theDataA
>
> put not theDataA["line has error"] into theDataA["line has error"]
>
> set the dgDataOfLine[3] of group "meterReadings" of this cd to theDataA
>
> end mouseup
>
> I get the expected values for the line shown on the datagrid, but the
> color doesn’t change. I’m running Catalina 10.15.5 on a pretty new Mac
> laptop. I’m using livecode 9.6.0 Business.
>
> The mystery is that the downloaded example works as expected, but not on
> my app.
>
> Have I missed something?
>
> Best,
> Bill
>
>
> William A. Prothero
> https://earthlearningsolutions.org
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Zryip TheSlug
http://www.aslugontheroad.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: I need some DataGrid performance help

2020-05-06 Thread zryip theSlug via use-livecode
Paul,

datagrids are using virtual properties, so you can't lock the messages.

tooltip, sorttype, and editability have only an effect if one interact with
the datagrid. I do not think this is your issue. Plus, I ran in a similar
problem when I updated DGH 2.5 with column color capabilities. One of my
problem was with column width refreshisment.

sortdirection will have importance only if the datagrid is sorted by one of
the column and if your datagrid data is not empty. In this case you can set
the sorted column to empy prior to create / refresh the columns.

A last advice: create the datagrid columns and then filled in them with the
data.


Best Regards,

On Wed, May 6, 2020 at 2:42 PM Paul Dupuis via use-livecode <
use-livecode@lists.runrev.com> wrote:

> On 5/6/2020 7:58 AM, zryip theSlug via use-livecode wrote:
> > After each call to a column property such as dgColumnWidth, the datagrid
> is
> > resized (header, column, rectangles, etc)
>
> This I did not know. Thank you.
> >
> > Instead of having them in the loop, prepare the column size, columns
> label,
> > etc and uses the table properties existing for setting all the values at
> > once. In this case the refresh of the datagrid is internally made only
> one
> > time.
>
> This I did know. As I said in my initial message:
>
> I realize that I could use: 'set the dgProp["column widths"] of grp 
> to ' as a single set action vs a loop where
> I am using 'set the dgColumnWidth[tColumnName] of grp  to
> '.
>
> However, there are only Datagid properties so set attributes for ALL
> columns for alignments, visibility, widths, and labels. Therefore, I
> have to use a loop anyway to set the tooltip, sorttype, sortdirection,
> end editability
>
>
> SO, while I can change the code to set the column ALIGNMENTS and WIDTHS
> all at once, I am still stuck setting the TOOLTIP, SORTTYPE,
> SORTDIRECTION, and EDITABILITY column by column in a repeat loop. So
> what do I do about setting the TOOLTIPs? There is NO 'set the
> dgProp["column tooltips"] of grp  to '
>
> Obviously, I can just TRY using LOCK MESSAGES (as Paul Hibbert
> suggested), but I am concerned that may cause more problems that it
> solves. Does anyone KNOW for sure?
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Zryip TheSlug
http://www.aslugontheroad.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: I need some DataGrid performance help

2020-05-06 Thread zryip theSlug via use-livecode
Paul,

After each call to a column property such as dgColumnWidth, the datagrid is
resized (header, column, rectangles, etc)

Instead of having them in the loop, prepare the column size, columns label,
etc and uses the table properties existing for setting all the values at
once. In this case the refresh of the datagrid is internally made only one
time.

Have a look in the datagrid properties documentation
http://lessons.livecode.com/m/datagrid/l/7343-data-grid-properties

for the table properties:
- column alignments
- column visibility
- column widths
- column labels

This is the only properties for table, because they have an impact in how
the datagrid is refreshed. The editable or the sort type of a column has
none. So even if you have a need of a loop, you can optimize it by removing
the tables properties.

An example for setting the widths of 3 columns at once

*set* the dgProp["column widths"] of *group* "DataGrid 1" to "100,200,300"


About column names. Internally they are used as keys for the dgData array.
Prefer shorter name without punctuation for column names and keep them only
for labels.


Best Regards,

On Wed, May 6, 2020 at 12:56 PM Pi Digital via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Paul
>
> What handler do you have this code? From what you are saying it seems it’s
> deploying this formatting script every time it redraws which itself is very
> inefficient and unnecessary. It should only have to deal with the data
> itself ideally.
>
> Sean Cole
> Pi Digital Productions Ltd
>
>
> eMail Ts & Cs
>
>
> > On 5 May 2020, at 21:38, Paul Dupuis via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > I have a datagid operation that should be fast that is taking a long
> time and I don't understand why.
> >
> > I use a datagrid to display a table of data as part of an analysis. The
> columns are file names and the rows are selected phrases found in those
> files. The first column is the list of phrases (162 in this example). The
> remaining columns are all the file name (254 in this example). So each cell
> (2 to 254) represents a count of the number of times the phrase (in column
> 1 of the row) was found the the file that column represents.
> >
> > I have the following code:
> >
> >   set the dgColumnWidth[tRowColumnName]  of grp
> "rwMatrixObj_DataGrid" to 200
> >   set the dgColumnAlignment[tRowColumnName]  of grp
> "rwMatrixObj_DataGrid" to "left"
> >   set the dgColumnSortType[tRowColumnName]   of grp
> "rwMatrixObj_DataGrid" to "text"
> >   set the dgColumnIsEditable[tRowColumnName] of grp
> "rwMatrixObj_DataGrid" to false
> >   repeat with i=2 to the number of lines in tColumnNames
> > put line i of tColumnNames into tColumnName
> > set the dgColumnTooltip[tColumnName]of grp
> "rwMatrixObj_DataGrid" to tColumnName
> > set the dgColumnWidth[tColumnName]  of grp
> "rwMatrixObj_DataGrid" to 75
> > set the dgColumnAlignment[tColumnName]  of grp
> "rwMatrixObj_DataGrid" to "right"
> > set the dgColumnSortType[tColumnName]   of grp
> "rwMatrixObj_DataGrid" to "numeric"
> > set the dgColumnSortDirection[tColumnName] of grp
> "rwMatrixObj_DataGrid" to "descending"
> > set the dgColumnIsEditable[tColumnName] of grp
> "rwMatrixObj_DataGrid" to false
> >   end repeat
> >
> > The first time this executes it takes just under 3 minutes for this size
> of data (254 columns). However, the second and each successive time in the
> same session it takes just under 30 minutes!
> >
> > Any idea why it would take so long?
> >
> > Thoughts on how to speed it up?
> >
> > I realize that I could use: 'set the dgProp["column widths"] of grp 
> to ' as a single set action vs a loop where I
> am using 'set the dgColumnWidth[tColumnName] of grp  to '.
> >
> > However, there are only Datagid properties so set attributes for ALL
> columns for alignments, visibility, widths, and labels. Therefore, I have
> to use a loop anyway to set the tooltip, sorttype, sortdirection, end
> editability
> >
> > The column names (in the variable tColumnNames) are file names. Some are
> long (longest is 113 characters) and some contain assorted punctuation. I
> wonder is the column NAMES should be somehting plain ASCII and short and
> the column LABELS contain the file names?
> >
> > This is all in LiveCode 9.5.1 on Windows. Timing is approximately the
> same in a Standalone or the IDE.
> >
> > Anyway, if anyone has a good idea of what is taking this 30 minutes,
> ideas would be very welcome!
> >
> > ___
> > use-livecode mailing list
> > use-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:
> 

Re: DataGrid question...

2020-03-26 Thread zryip theSlug via use-livecode
The "Freeze pane" stack is available here:
https://www.aslugontheroad.com/download/category/4-lab

It demonstrates how to scroll, select and sort two datagrids synchronizaly.

On Thu, Mar 26, 2020 at 3:55 PM Paul Dupuis via use-livecode
 wrote:
>
> On 3/26/2020 9:54 AM, zryip theSlug via use-livecode wrote:
> > Paul,
> >
> > I have somewhere a stack demonstrating how to use a second datagrid
> > with the columns to freeze and how to synchronize this second datagrid
> > with the main datagrid when the rows are scrolled.
> >
> > If you may interested I can share it.
> >
> >
>
> Very interested!
>
> Given everyone's responses, I was just about to code something up myself
> using two Datagids for consistency in user interface.
>
> Thank you!
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



-- 
Zryip TheSlug
http://www.aslugontheroad.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: DataGrid question...

2020-03-26 Thread zryip theSlug via use-livecode
Paul,

I have somewhere a stack demonstrating how to use a second datagrid
with the columns to freeze and how to synchronize this second datagrid
with the main datagrid when the rows are scrolled.

If you may interested I can share it.

On Wed, Mar 25, 2020 at 11:07 PM matthias rebbe via use-livecode
 wrote:
>
> Thanks.
> Matthias
>
>
> > Am 25.03.2020 um 13:34 schrieb Tore Nilsen via use-livecode 
> > :
> >
> > What you should look for in the Dictionary  is tabAlign
> >
> > Tore
> >
> >> 25. mar. 2020 kl. 13:32 skrev matthias rebbe via use-livecode 
> >> mailto:use-livecode@lists.runrev.com>>:
> >>
> >>>
> >>> Am 25.03.2020 um 01:26 schrieb Richard Gaskin via use-livecode 
> >>> :
> >>>
> >>> Paul Dupuis wrote:
> >>>
>  Has anyone come up with a way to configure a DataGrid (LC9) so that
>  the left most column remains visible when the other columns are
>  scrolled horizontally?
> 
>  Or is the only way to to do this is to have a separate field to the
>  left of the DataGrid that holds the left column?
> 
>  Anyone solved this already?
> >>>
> >>> Not here. When all I need is a list I just use a list field.  Now that 
> >>> LC's field supports independent column alignment I haven't needed a DG 
> >>> for anything but forms.
> >>>
> >>
> >>
> >> Richard, do you know if there is a lesson for this available or is there 
> >> something written about it? To be honest, i must have missed that "new" 
> >> feature.
> >>
> >> I´ve searched already for column alignment, but can only find 
> >> lessons/information about Datagrids.
> >>
> >>> Parse out the first col with a "split by column", drop it into a control 
> >>> on the left, and you're good to go.
> >>>
> >>
> >> Matthias
> >>
> >> -
> >> Matthias Rebbe
> >> Life Is Too Short For Boring Code
> >>
> >> ___
> >> use-livecode mailing list
> >> use-livecode@lists.runrev.com  
> >>  >> >
> >> Please visit this url to subscribe, unsubscribe and manage your 
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode 
> >>  
> >>  >> >
> > ___
> > use-livecode mailing list
> > use-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



-- 
Zryip TheSlug
http://www.aslugontheroad.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: Disappearing "column lables" of Datagrid

2019-11-13 Thread zryip theSlug via use-livecode
Hi Klaus,

This should be "resetList"

*send* "resetList" to grp "datagrid 1"

Do you have a custom header script? You can check this by using this
command:

*put* the dgProp["default header behavior"] of grp "datagrid 1"


Best Regards,

On Wed, Nov 13, 2019 at 1:26 PM Klaus major-k via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi all,
>
> > Am 12.11.2019 um 17:59 schrieb Klaus major-k via use-livecode <
> use-livecode@lists.runrev.com>:
> >
> > Hi friends,
> >
> > what might cause the fact that in my datagrids on card 2
> > the "column labels" disapear whenever I (re-)open that stack
> >
> > NO scripting involved so far, the labels are just gone!?
> >
> > "refreshline/refreshindex/refreshlist" does NOT work in a script.
> > I have to click "Refresh" in the inspector for these two datagrids
> > to make then appear again. This is driving me crazy! :-/
> >
> > macOS 10.14.6, LC 9.0.5, same with LC 9.5.
> > Thanks for any hints.
>
> this is a real showstopper for my current project! :-/
>
> Maybe someone knows what command(s) is/are hiding behind the
> "refresh" button in the inspector for a datagrid?
> Or where in the may behavior scripts I will find the answer?
>
> Clicking that button seems to be the only way to make the labels appear
> again.
>
> Thank you!
>
>
> Best
>
> Klaus
>
> --
> Klaus Major
> https://www.major-k.de
> kl...@major-k.de
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Zryip TheSlug
http://www.aslugontheroad.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


[ANN] DGH 2.6.0 Gives More Colors To Your Datagrids Tables

2019-09-03 Thread zryip theSlug via use-livecode
Dear Livecode and DGH Users,


We have just released a new version of DGH!


New:
- Column header color and column color: - It is now possible to color
column headers (label and background) and column.
- The DGH_Properties script has changed to support columns colorization.
- Properties for coloring header and column are settable column by column
inside the DGH's columns creator.

Fixed bug:
- Reorganizing columns no working when columns names are quite identical.
- SpreadSheet Behaviors: the behavior path was stored as absolute. It is
now relative.
- On windows, popup palettes such as behavior picker might stay on back
after a first action.

Improvements:
- Column builder: Refrehing the datagrid preview has been rethought to be
more optimized expecially when the datagrid containing more than 10 columns.


For more informations about DGH, you can go:
- on our website: https://www.aslugontheroad.com/ourproducts/2-what-is-dgh
- or on the LiveCode Store
https://livecode.com/extensions/data-grid-helper/2-5-0/



Best Regards,
-- 
Zryip TheSlug
http://www.aslugontheroad.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: Data grid : show an button in a column only if there is an email in other column

2019-02-20 Thread zryip theSlug via use-livecode
Ludovic,

Try:

on FillInData pData

if pData["email"] <> "" then show btn  "sendmail" of me

else hide btn  "sendmail" of me

end FillInData

On Wed, Feb 20, 2019 at 5:54 PM Ludovic THEBAULT via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hello,
>
> I have an address table (data grid) including an "email" column. An other
> column contains a button to send an email.  I want to hide this button if
> the line does not contain an email.
> I put this script in the behavior of the button column :
>
> on FillInData pData
>
> if pData["email"] <> "" then show btn  "sendmail"
>
> else hide btn  "sendmail"
>
> end FillInData
>
>
> But it seem to work only for the first line of the table.
>
> Any ideas ?
>
> Thanks in advance !
>
> Ludovic
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Zryip TheSlug
http://www.aslugontheroad.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: Datagrid Table - Allow editing a field only when an other field contains data

2019-02-09 Thread zryip theSlug via use-livecode
Matthias,

A possible solution is to add an EditFieldText handler inside the datagrid
group script.

*command* EditFieldText pTheFieldEditor, pTheIndex, pTheCol
*end* EditFieldText

This message is invoked by the datagrid table prior to create the field
editor allowing to edit the cell.
Three parameters are passed :
- the field editor reference: pTheFieldEditor
- the index of the row: pTheIndex
- the key (the column name): pTheCol

The trick consist to test the name of the column the user is trying to edit
(for example col3 of the datagrid) :

*if* (pTheCol is "Col3") *then*


and then  get the content of the cell of another column by using the
GetDataOfIndex
function:

*put* GetDataOfIndex(pTheIndex, "Col2") into tTheValueToTest


If you want to allow the edition of the cell, then give a chance to the
EditFieldText  to reach the datagrid library

pass EditFieldText

if not, then simply not send it

And don't forget to pass the command for others columns of the datagrid.


Here is a final handler applying the recipe for a "col3" based of the
content of "col2". If the cell contains "yes" in col2 then the user is
allowed to edit the content of the cell in col3, if not the cell remains
locked. You can change "yes" for any value or change the test for checking
if the cel in "col2"l is empty or not


*command* EditFieldText pTheFieldEditor, pTheIndex, pTheCol
  *if* (pTheCol is "Col3")
*then** put* GetDataOfIndex(pTheIndex, "Col2") into tTheValueToTest
 *if* (tTheValueToTest is "yes")
*then**pass* EditFieldText
 *end*
*if*
*  else**   pass* EditFieldText
  *end*
*if**end* EditFieldText

On Fri, Feb 8, 2019 at 10:22 PM Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Check the datagrid library.
> http://lessons.livecode.com/m/datagrid/l/7344-data-grid-api
>
> I believe there is a message sent when a field is opened for editing.
>
> Bob S
>
>
>
> > On Feb 8, 2019, at 11:51 , Matthias Rebbe via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Hi,
> >
> > in a project i need the  possibility to allow editing a datagrid table
> field only if an other field in the same row contains a value.
> > Is this possible? Any suggestions?
> >
> > Regards,
> >
> > Matthias
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Zryip TheSlug
http://www.aslugontheroad.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: Datagrid deleteline vs deletelines issue

2018-09-09 Thread zryip theSlug via use-livecode
Henry,

I can confirm, the deleteLine behavior changed in dg2. Inside the dg2
library, deleteLine and deleteLines are different handlers now (deleteLine
is managing some animation now according to the comment I've seen in the
code). Inside dg1, deleteLine was just calling deleteLines.
Same remark with the deleteIndex and deleteIndexes command.

Inside DGH I've changed deleteLine for deleteLines for fixing a bug but I
did not read the documentation. This is probably something to update inside
the documentation with a warn about ascendant compatibility.


On Sun, Sep 9, 2018 at 6:51 PM hlowe via use-livecode <
use-livecode@lists.runrev.com> wrote:

> The Dictionary states that the command 'deleteline': "Deletes the specified
> lines from the data grid.
>
> The syntax is:
>
> dispatch "DeleteLine" to group "DataGrid" with pLine
>
> where pLine is a comma-delimited list of one or more integers, indicating
> the lines to be deleted.
>
> So to delete lines 1,2 and 3 of the datagrid "myDG" we would use:
>
> put "1,2,3" into pLine
> dispatch "DeleteLine" to group "myDG" with pLine
>
> The Dictionary also states that the command 'deletelines' (note the plural
> form) is a synonym for deleteline, implying that either form will do the
> same thing.
>
> However 'deleteline' using LC 9.0.1 (RC3) on a Mac (running an iOS App in
> both the emulator and on the device) will only accept a single line number
> in its 'pLine' parameter. Passing more that one integer in 'pLine' causes
> 'deleteline' to fail silently. To delete more that one line, I must use the
> pleural form of the command 'deletelines'.
>
> put "1,2,3" into pLine
> dispatch "DeleteLine" to group "myDG" with pLine
>
> fails silently
>
> while
>
> put "1,2,3" into pLine
> dispatch "DeleteLines" to group "myDG" with pLine
>
> succeeds
>
> A bug, a Dictionary issue or something more complex?
>
> Can anyone else confirm this?
>
> Henry
>
> Ascriva Health Informatics
> https://www.ascriva.com
>
>
>
> --
> Sent from:
> http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Zryip TheSlug
http://www.aslugontheroad.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: Datagrid substack question

2018-08-28 Thread zryip theSlug via use-livecode
Marty,

You have to change the row template property of your datagrid to point it
to the template group located in your renamed substack.

set the dgProps["row template"] of grp "myDatagrid" to the long id of grp
"myGrpTemplate" of cd "myCardTemplate" of stack "myTemplateStack"

On Tue, Aug 28, 2018 at 2:40 AM Knapp Martin via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I'm developing an app that has a half dozen template stacks that users can
> edit. These each have a datagrid. I made a "master" template stack with the
> common features and then cloned this stack and modified the clones for that
> stack's specific features. But as the datagrid created a substack and each
> has the same name in the individual stacks, I get the dreaded "a stack by
> this name is already open" when I close one stack and open the next. I set
> the "purge stack on close" to true but I still get the message occasionally
> (which makes no sense). So I thought I would change the name of the
> datagrid sub stack to a unique name in each stack but that breaks the
> connection to the actual datagrid and causes errors. Any advice on what I
> should do?
>
> Marty
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Zryip TheSlug
http://www.aslugontheroad.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


[ANN] DGH 2.5.1 is released

2018-08-21 Thread zryip theSlug via use-livecode
Dear List Members,


DGH 2.5.1 is now available.

New:
- Formulae Calculation: the installed script is now containing a new
handler: DGH_Formulae_RefreshAll. This handler is allowing to refresh the
calculation inside the datagrid. Call this function after having populated
an empty datagrid to have all the calculations done automatically.

Changes:
- Custom header: Only the special header controls can be added inside the
header template. This means the classical control, widgets or custom
controls are now disabled to avoid potential problems in building a custom
header from scratch.
- Custom header: The script installed with a custom header has changed to
remove a line decreasing performances with datagrid containing more than 16
columns
- The new functionalty allowing to add several columns at a time has been
rethought to increase perfomances when more than 20 columns are added at a
time.
- The way the columns are hidden (option "always hide invisible columns"
checked or not) has been rethought to increase performances when a lot of
columns are displayed inside the column builder's preview.
- Preferences: the unicode labels has been removed from the preferences and
is considered to turn to off by default, due to unicode is now native
inside LC since several versions. This option could be the cause of some
label issues when turned to on and was only existing for compatibility with
old LC versions. It is now in no interest with LC 8.x and 9.x

Fixed bugs:
- DGH was very slow loading datagrids table containing more than 16 columns.
- "Spreadsheet" behavior: when navigating through the cells and inputing
new values, then leaving the cell, the values were not stored inside the
datagrid.




Best Regards,

-- 
Zryip TheSlug
http://www.aslugontheroad.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: Datagrid -- Scrolling on Mobile

2018-08-20 Thread zryip theSlug via use-livecode
Dear Swami,

Mobile scrollers should be natively added by the dg2 library when the stack
is executed inside a mobile device context. I've seen the corresponding
portion of code inside the dg2 library.

On Mon, Aug 20, 2018 at 5:09 PM, Sannyasin Brahmanathaswami via
use-livecode  wrote:

> I am slowly getting up to speed with datagrid, I understand structure, the
> scripts of the row group, can instantiate data etc.
>
> But, am I missing something?
>
> http://lessons.livecode.com/m/datagrid
>
> I can't find single lesson on implementing DG on mobile.
>
> Scrolling on mobile -- do we do it the same way as other groups?
>
> 1) turn off scroll bars
>
> 2) CreateScroller etc (mobile library)
>
> 3) Does does Datagrid have it's own "mobile magic" scroller.
>
> I use what looks like a "hackey" way to determine if a user is clicking
> on a group, or is scrolling the group. Is it same for the DataGrid?
>
> if abs(the mouseH - item 1 of sStartLoc) <= 10 and abs(the mouseV - item 2
> of sStartLoc) <= 10 then
>
> portal_setCurrent (the short name of this card)
>
> put the short name of the target into tRow
>
> set the itemDelimiter to "_"
>
> put item 1 of tRow into tLinkNo
>
> if tLinkNo is not a number then
>
> exit mouseup
>
> end if
>
> put fld (tLInkNo &"_" &"portal-link-label") into tRowName
>
> portal_DoRowLink tRowName
>
>
> BR
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
Zryip TheSlug
http://www.aslugontheroad.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: Getting Started with DataGrid and another datagrid form

2018-08-06 Thread zryip theSlug via use-livecode
Dear Swami,

I have created this kind of form before: roundrect background and margins
between 2 rows.
For the background I used my own graphic. The background graphic if present
is used by the datagrid library for hiliting the row. I removed it.
And for magins, I used a row height upper than the height of my custom
background. The margins between 2 rows are transparent, so I was able to
see the card's background without doing something specific with the
datagrid.

On Mon, Aug 6, 2018 at 9:03 PM, Sannyasin Brahmanathaswami via use-livecode
 wrote:

> On 8/6/18 7:29 AM, zryip theSlug via use-livecode wrote:
> > Bob,
> >
> > A column template exists for each column of a dg table, so you can use
> any
> > control you want inside a datagrid column, including widgets.
> >
> > Here is a link to a DGH's screenshot . On the left, we have properties
> for
> > a column (row or header). This is a datagrid table with two visible
> > columns. The second column is displaying checkboxes, text, popup menus,
> > images, widgets, etc depending of the property type. This is not a trick,
> > this is perfectly supported by datagrid tables.
> >
> > https://livecode.com/wp-content/uploads/2018/06/image14-26.png
> >
> > On Mon, Aug 6, 2018 at 6:22 PM, Bob Sneidar via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> >
> >> The template is like the group editor. In fact it may actually BE the
> >> group editor. The behavior script determines what to do when a row is
> >> drawn.
> >>
> >> I think the thing to understand about datagrids, table or forms, is that
> >> for each array element in the data (itself an array) the template is
> >> "cloned". Each row is a "clone" of the template. But for forms, the
> >> behavior does not know what you want to do when the rows are created.
> For
> >> instance, you may want to color negative numbers in red, or surround
> them
> >> with parenthesis. You may have a button that needs to be hilited or not
> >> depending on the value for that control. Perhaps you have a field that
> can
> >> contain multiple lines of text, and you need to set the row height for
> each
> >> row based upon the formattedHeight of that field. Or maybe show and hide
> >> objects etc.
> >>
> >> The beauty of a form datagrid is that how each individual row gets drawn
> >> is entirely under your own programmatical control. A table datagrid is
> >> simply like a spreadsheet with fixed row heights and no support for
> >> graphics or other controls.
> >>
> >> BTW I kinda cheated and made a way to have checkboxes for a table style
> >> datagrid. I simply had a group with checkboxes overlaying a "dummy"
> column
> >> in the datagrid. When I queried for data I put something like:
> >>
> >> SELECT '' AS checkmark, '' AS checkmarkvalue, * FROM customers
> >>
> >> This put two empty strings in my array data (I use sqlYoga so I get
> arrays
> >> back instead of cursors, but the idea is the same). I only defined a
> column
> >> for "checkmark", but NOT for "checkmarkvalue". This allowed me to have a
> >> blank column to overlay the checkboxes on, and a hidden column to hold
> the
> >> checkmarkvalue for each row in the datagrid data.
> >>
> >> Then when I populated the datagrid, I hid all the checkboxes then showed
> >> each checkbox control based upon how much data was being displayed. Of
> >> course, you have to account for scrolling, so that can be tricky, but it
> >> was a poor man's way of adding checkboxes to a table datagrid. Others
> could
> >> probably come up with a more elegant solution.
> >>
> >> Bob S
> >>
> >>
> >>> On Aug 5, 2018, at 10:03 , Sannyasin Brahmanathaswami via use-livecode
> <
> >> use-livecode@lists.runrev.com> wrote:
> >>> I slowly studying as much as we can on the datagrid,and "digging" in it
> >> with an first attempt to build a form.
> >>> One thing is not clear to me.
> >>>
> >>> 1) Have the  WYSIG panel to build the datagrid form.
> >>>
> >>> 2) why then do we  have, in the Behavior Script  this handler?
> >>>
> >>> Isn't the layout already pre-determined in the template?
> >>
> >> ___
> >> use-livecode mailing list
> >> use-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
>



-- 
Zryip TheSlug
http://www.aslugontheroad.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: Getting Started with DataGrid and another datagrid form

2018-08-06 Thread zryip theSlug via use-livecode
Bob,

A column template exists for each column of a dg table, so you can use any
control you want inside a datagrid column, including widgets.

Here is a link to a DGH's screenshot . On the left, we have properties for
a column (row or header). This is a datagrid table with two visible
columns. The second column is displaying checkboxes, text, popup menus,
images, widgets, etc depending of the property type. This is not a trick,
this is perfectly supported by datagrid tables.

https://livecode.com/wp-content/uploads/2018/06/image14-26.png

On Mon, Aug 6, 2018 at 6:22 PM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> The template is like the group editor. In fact it may actually BE the
> group editor. The behavior script determines what to do when a row is
> drawn.
>
> I think the thing to understand about datagrids, table or forms, is that
> for each array element in the data (itself an array) the template is
> "cloned". Each row is a "clone" of the template. But for forms, the
> behavior does not know what you want to do when the rows are created. For
> instance, you may want to color negative numbers in red, or surround them
> with parenthesis. You may have a button that needs to be hilited or not
> depending on the value for that control. Perhaps you have a field that can
> contain multiple lines of text, and you need to set the row height for each
> row based upon the formattedHeight of that field. Or maybe show and hide
> objects etc.
>
> The beauty of a form datagrid is that how each individual row gets drawn
> is entirely under your own programmatical control. A table datagrid is
> simply like a spreadsheet with fixed row heights and no support for
> graphics or other controls.
>
> BTW I kinda cheated and made a way to have checkboxes for a table style
> datagrid. I simply had a group with checkboxes overlaying a "dummy" column
> in the datagrid. When I queried for data I put something like:
>
> SELECT '' AS checkmark, '' AS checkmarkvalue, * FROM customers
>
> This put two empty strings in my array data (I use sqlYoga so I get arrays
> back instead of cursors, but the idea is the same). I only defined a column
> for "checkmark", but NOT for "checkmarkvalue". This allowed me to have a
> blank column to overlay the checkboxes on, and a hidden column to hold the
> checkmarkvalue for each row in the datagrid data.
>
> Then when I populated the datagrid, I hid all the checkboxes then showed
> each checkbox control based upon how much data was being displayed. Of
> course, you have to account for scrolling, so that can be tricky, but it
> was a poor man's way of adding checkboxes to a table datagrid. Others could
> probably come up with a more elegant solution.
>
> Bob S
>
>
> > On Aug 5, 2018, at 10:03 , Sannyasin Brahmanathaswami via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > I slowly studying as much as we can on the datagrid,and "digging" in it
> with an first attempt to build a form.
> >
> > One thing is not clear to me.
> >
> > 1) Have the  WYSIG panel to build the datagrid form.
> >
> > 2) why then do we  have, in the Behavior Script  this handler?
> >
> > Isn't the layout already pre-determined in the template?
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
Zryip TheSlug
http://www.aslugontheroad.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: Getting Started with DataGrid and another datagrid form

2018-08-05 Thread zryip theSlug via use-livecode
The code you have in the default behavior is the one installed by the
inspector located in one of the behavior button (stack only script now,
since the dg2)

It contains the minimal example code to help the developer starting;
FillinData, preFillinData, LayoutControl, etc

If you are modifying the template for the datagrid (adding a control,
deleting a control, etc) you have to change the code for your datagrid row
manually. By default the minimal script is considering you have a field
"Label" and a "background" graphic. If you are deleting one of them in the
template and you do not update the behavior script for the row accordingly,
the datagrid library will fire an error when it will try to apply the
template to a row. Note that if your are removing the "background" graphic
you will lose the possibility to "hilited" a row, at least on screen.

When you are updating the template in DGH now, it will install first the
default script (like the inspector). If you have done a modification in the
template (especially after having delete one object), DGH can help you by
building the script required for the controls it will find inside the
template. As we want not to erase something in the script which could has
been changed by the developer, the operation is manual.

Ideally to prevent the datagrid library to send an error with missing
controls in the template, you should update the script before to click onto
the "update" button.

On Sun, Aug 5, 2018 at 7:03 PM, Sannyasin Brahmanathaswami via use-livecode
 wrote:

> I slowly studying as much as we can on the datagrid,and "digging" in it
> with an first attempt to build a form.
>
> One thing is not clear to me.
>
> 1) Have the  WYSIG panel to build the datagrid form.
>
> 2) why then do we  have, in the Behavior Script  this handler?
>
> Isn't the layout already pre-determined in the template?
>
> on LayoutControl pControlRect, pWorkingRect
>
> local theFieldRect
>
> -- This message is sent when you should layout your template's controls.
>
> -- This is where you resize the 'Background' graphic, resize fields and
>
> -- position objects.
>
> -- For fixed height data grid forms you can use items 1 through 4 of
> pControlRect as
>
> -- boundaries for laying out your controls.
>
> -- For variable height data grid forms you can use items 1 through 3 of
> pControlRect as
>
> -- boundaries, expanding the height of your control as needed.
>
> -- The working rect is defined area of the control you can safelt use.
>
> -- Use this rect to make sure your controls don't overlap with any edit
> mode controls.
>
> -- Example:
>
> put the rect of field "Label" of me into theFieldRect
>
> put item 1 of pWorkingRect into item 1 of theFieldRect
>
> put item 3 of pWorkingRect - 5 into item 3 of theFieldRect
>
> set the rect of field "Label" of me to theFieldRect
>
> set the rect of graphic "Background" of me to pControlRect
>
> end LayoutControl
>
>
> BR
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
Zryip TheSlug
http://www.aslugontheroad.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: datagrid scrolling question

2018-08-05 Thread zryip theSlug via use-livecode
A possible approach for updating only one row is described here:

Now, for some purpose, such as interacting with the row controls, it could
be interesting to have additional keys inside the data. Not I'm thinking a
click in a button is required in your case. But you might have the need to
hide or to disable a button of a specific row on the fly by clicking a
button outside of the datagrid.

In this case
1. we are changing the data for the row by using the
 set the dgDataOfIndex property (see the datagrid documentation
http://lessons.livecode.com/m/datagrid/l/7315-how-do-i-update-data-in-a-row)
2. And when the data for the row is populated in the FillInData we might
have a specific key for disabling the button:

on FillInData pDataArray
set the text of field "Label1" of me to pDataArray["label 1"]
set the text of field "Label2" of me to pDataArray["label 2"]
set the text of field "Label3" of me to pDataArray["label 3"]
set the hilited of btn "Checkbox1" of me to (pDataArray["check box state"]
is "true")
set the enabled of btn "Action1" of me to (pDataArray["button enabled"] is
"true")
end FillInData

You can add a special "update" row key for example in the dgData and if it
is true, execute the code of the mouseUp button

on FillInData pDataArray
set the text of field "Label1" of me to pDataArray["label 1"]
set the text of field "Label2" of me to pDataArray["label 2"]
set the text of field "Label3" of me to pDataArray["label 3"]
set the hilited of btn "Checkbox1" of me to (pDataArray["check box state"]
is "true")
if (pDataArray["update"] is "true") then
 doMyTSNetQuery
end if
end FillInData

on mouseUp
   doMyTSNetQuery
end mouseUp

command doMyTSNetQuery
  doSomething
end doMyTSNetQuery

You are not sharing the code on how your are updating the result field. If
you are trying to put the result value directly in the field of each row by
considering the datagrid as a simple group of controls you are in the wrong
direction. Datagrid is a way to display data, so use the data to serve your
needs and you will be able to tame the beast. :)

For doing that use the FillInData handler. This will just send the message
to the datagrid to execute a doMyTSNetQuery message to the row.
And for changing the content of the result field of the second row for
example, use something like

SetDataOfLine 2, "update", true

and once finished, pass the value to false to stop the update.

Let me know if you could have the need of the following example:
A datagrid  with 8 rows containing a button, a result field. Plus a button
outside of the datagrid to query an update of one of the result field by
executing the code of one of the button. Do you have different scripts for
each button?


On Sun, Aug 5, 2018 at 5:21 PM, Brian Milby via use-livecode <
use-livecode@lists.runrev.com> wrote:

> You can get/put data from/into the grid one row at a time without needing
> to figure out the group name, so you could have it update in real time in
> your external button. You should be able to use the same behavior script
> (possibly with a slight modification) everywhere.
>
> I’m not at a computer right now so I will work out an example later if
> someone else doesn’t beat me to it.
>
> Thanks,
> Brian
> On Aug 5, 2018, 10:02 AM -0500, Douglas Ruisaard , wrote:
> > Thanks very much for the reply.
> > Good question .. made me think about why that won't work very well for
> me (but it would, of course, work).
> >
> > The button on each row not only queries the associated wi-fi module, but
> the "mouseUp" handler in the Behavior Script acquires a response back from
> each module. That message gets put into one of the fields in the row... so
> even if I didn't try to make a "mouseUp" call to within the row, I'd still
> want to populate each of the row's fields with the returning result...
> which would, of course, entail using the pseudo-group names again... *if* I
> wanted to display the returning information for each row "in real time"...
> which I do.
> >
> > There are two simple solutions, one of which I have done. Expand the
> grid to show all 8 rows and the scrolling issue disappears. Or ... as you
> suggest, "acquire" each row's data "outside" of the grid and then just
> display the complete set of data at once. Currently I do the former. Works
> very well on my big desktop monitor but not very "practical" to port to my
> iPad or Android... or any small display device.
> >
> > Another caveat is that each call to a wi-fi module take about 1 second
> to complete. This is a function of the module and what I am asking it to
> do... NOT an issue with "tsnet" (which is great!). So, taking the latter
> (your) approach, I'd lose the "real time" aspect and have to wait
> (#-of-modules * 1 second) before seeing any results. Currently that would
> be 8 seconds... not a *long* wait but annoying (in this age of microsecond
> responses). Expanding the project to more modules, obviously, increase the
> wait time... and I like the real-time display.
> >
> 

Re: datagrid scrolling question

2018-08-05 Thread zryip theSlug via use-livecode
Same remark than Mike, James and Jacque. When you have to change the value
of each row, populating the datagrid with a new data, seems to be the
better way to go.

Now for helping you with datagrids, I think you have to understand 2
importants concepts about datagrids:
- rows groups are created on the fly when you are scrolling the datagrid,
so they have no existence if you are not scrolling the datagrid (excepted
if the cache control option is activated, but this is another story). That
is explaining you have to scroll yourself the datagrid to be able to send
the click to the corresponding button
- the data displayed in the datagrid resides in an array named dgData. This
array is "multidimensional".
Basically the first key is representing the line, and the second key is
containing the values of the datagrid.
put "Row 1 First key value" into tDataA[1]["First key"]
put "Row 1 Second key value" into tDataA[1]["Second key"]
put "Row 2 First key value" into tDataA[1]["First key"]
put "Row 2 Second key value" into tDataA[1]["Second key"]

For a datagrid table we have an immediate graphical representation because
each keys are columns of the datagrid, and the fillindata handler located
in the default row script is doing the job for us of automatically populate
the column content.

First Key Second key
Row 1 First key value Row 1 Second key value
Row 2 First key value Row 2 Second key value

For datagrid form with more than one value key, the developer must take
care himself of binding the key to one of the controls of the form
template. So we could potentially have a key by control if required (or
more than a key for a control. We will see the interest below).

on FillInData pDataArray

set the text of field "Label" of me to pDataArray["label 1"]

end FillInData

By default if you are populating the datagrid by using the inspector (or by
using the dgText property), the first key will be "label 1", the second
"label 2", etc. But if you are populating the datagrid by using the dgData
array, the keys used will be the keys you have defined for your dgData. So
in our example: "First key" and "Second key"

An example of script for your "one checkbox, three fields and two buttons"
template, might looks like:

on FillInData pDataArray
set the text of field "Label1" of me to pDataArray["label 1"]
set the text of field "Label2" of me to pDataArray["label 2"]
set the text of field "Label3" of me to pDataArray["label 3"]
set the hilited of btn "Checkbox1" of me to (pDataArray["check box state"]
is "true")
end FillInData

With a dgData looking like:
put "My label 1 row 1" into tData[1]["label 1"]
put "My label 2 row 1" into tData[1]["label 2"]
put "My label 3 row 1" into tData[1]["label 3"]
put "true" into tData[1]["check box state"]
put "My label 1 row 2" into tData[2]["label 1"]
put "My label 2 row 2" into tData[2]["label 2"]
put "My label 3 row 3" into tData[2]["label 3"]
put "false" into tData[2]["check box state"]
set the dgData of grp "myDataGrid" to tData

Now, for some purpose, such as interacting with the row controls, it could
be interesting to have additional keys inside the data. Not I'm thinking a
click in a button is required in your case. But you might have the need to
hide or to disable a button of a specific row on the fly by clicking a
button outside of the datagrid.

In this case
1. we are changing the data for the row by using the
 set the dgDataOfIndex property (see the datagrid documentation
http://lessons.livecode.com/m/datagrid/l/7315-how-do-i-update-data-in-a-row)
2. And when the data for the row is populated in the FillInData we might
have a specific key for disabling the button:

on FillInData pDataArray
set the text of field "Label1" of me to pDataArray["label 1"]
set the text of field "Label2" of me to pDataArray["label 2"]
set the text of field "Label3" of me to pDataArray["label 3"]
set the hilited of btn "Checkbox1" of me to (pDataArray["check box state"]
is "true")
set the enabled of btn "Action1" of me to (pDataArray["button enabled"] is
"true")
end FillInData


Hope these few examples might help you a bit to better understanding
datagrids.

On Sun, Aug 5, 2018 at 5:12 AM, J. Landman Gay via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I was thinking the same thing. I think the critical distinction is that
> datagrids are primarily display mechanisms, not really intended to be read
> directly. It's much easier to parse the original input data than to try to
> traverse the grid itself, which uses some tricks to appear as a continuous
> single control.
>
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
>
> On August 4, 2018 6:54:21 PM James At The Hale via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> I am a little lost here as to why this is a DG question as such.
>> Certainly being able to dynamically fill data within a row is 

Re: Getting Started with DataGrid and another datagrid form question

2018-08-04 Thread zryip theSlug via use-livecode
Dear Douglas,

Thanks for your interesting feedback about your attempt to use DGH for the
first time, with creating a datagrid form.

All the properties for customizing the datagrid apart, I've created the
form template area (the way to custom the content of a row with controls
such as image, buttons, etc) with the following objectives:
- in the standard way to customize a datagrid template, we have to open the
row template group inside the template card. In DGH all this group is
copied inside a "visual" area we can manipulate
- when dropping some controls in the template area, with the datagrid, you
are alone with the required script for managing all these controls. DGH, at
the condition to respond to the right dialog, is building a minimal script
depending of the kind of controls you added. Unfortunately this is
difficult to cover all the needs, because they are all specific depending
of the developer and what he want to do. But at least the goal of the
installed script is to give you the keys and philosophy to understand what
it is required for the controls.For a button, how to perform an action, for
a checkbox, how to check or uncheck it, for an image how to display it, to
click it, etc
- one of the recurrent difficulties for users was to understand the
datagrid rows remains empty until you have populate it. And because it is
empty you will never see the beautiful button or image you have added if
you have not at least a row data. This is why in DGH, upper the template
area, we have a datagrid preview, to see immediately the control we have
added.

Your comment make me realize that it is not enough when you are beginning
with form template. One of my unexploited idea was to add kind of presets
template with for example a text on the left and four checkboxes on the
right, etc so the developper could start with ready to use templates to add
to his datagrid. The problem of the approach is covering needs, I can't
anticipate.

What might have you expected from DGH in this task? More tutorial
explaining how the template area is working?, more lessons?, contextual
help in DGH to help you to start? Something else? Feel free to expand, I'm
always interested in approachs or ways I could try to implement in the goal
to improve DGH.


Thanks in advance.


Best Regards,

On Sat, Aug 4, 2018 at 4:38 PM, Douglas Ruisaard via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I concur with Brahmanathaswami that, in particular, datagrid forms (I
> haven't worked with tables (yet)) are very finicky with regard to
> scrolling.  I still would greatly appreciate some help with a recently
> submitted message to this group, Subject:
>
> datagrid form question
>
> Once you play around with a grid enough, it becomes clearer on what you
> can and cannot do.
>
> Regarding DGH v2... during my initial foray into datagrid forms (very
> recent, by the way), I was hoping that DGH v2 would be the panacea for the
> initial confusion regarding datagrids.  Alas, it is likely a fine tool but,
> from my perspective (as many aspects of LC), it may be most effective once
> one has mastered the fundamentals of datagrid construction and usage.  I
> downloaded the trial version and will go back to it ASAP now that I am over
> that initial learning hump ... with A LOT more to learn, I'm sure.
>
> It would probably be worthwhile to read through my two posts under "
> datagrid form question " to consider what I discovered with regard to
> scrolling... hopefully, I've made the explanation clear enough but if not,
> I'd be glad to expand on the subject.
>
> Thanks in advance.
> Doug
>
>
> > At $45.00 (cheap) and with your own endorsement (knowing that it is
> maintained)
> >
> > I'll get it!
> >
> > Brahmanathaswami
> >
> > Ps do you have a real name?
> >
> > ?On 8/2/18, 12:01 PM, "use-livecode on behalf of zryip theSlug via
> use-livecode"  > boun...@lists.runrev.com on behalf of use-livecode@lists.runrev.com>
> wrote:
> >
> > Dear Swami,
> >
> > We have some free material about datagrids form or table.
> >
> > 1. A tutorial written long time ago before I created DGH, exploring
> the
> > very basic concepts of the datagrid control (form and table):
> > http://www.aslugontheroad.com/download/category/3-tutorials
> >
> > 2. Some demo stacks created for demonstrating datagrid's
> possibilities such
> > as drag and drop, calculation, etc
> > http://www.aslugontheroad.com/download/category/4-lab
> >
> > 3. About your screenshot, a datagrid form will be your better option
> in my
> > opinion.
> >
> > 4. And about Data Grid Helper, I can not answer objectively to your
> > question, for sure. Al

Re: Getting Started with DataGrid

2018-08-04 Thread zryip theSlug via use-livecode
Dear Swami,

Thanks for your purchase.


Yes I do have a real name and I do have a good reason to not share it
publicly. When I came with the personnal challenge 8 years ago to create a
commercial plugin, I was an employee and as a developper, my employment
contract was containing a clause not allowing me to develop something like
that.
Now, even if I'm no longer a developer (my service was closed some years
ago, and I failed to find a new job like the old one, because I have just
no diploma in development, despite more than 10 years experience in
different languages) my new employer not allowed me to cumulate salaries
even if I might earn one dollar with an another activity. I asked and he
was clear in his reply.

So I don't know what rules you have in your countries, but these rules are
real in mine and my risk is just to be fired. As I'm considering I'm free
to do what I want during my free time and hobbies, to be sure this will
never happen, you will never seen my real name anywhere.

So I'm quite outlaw, free to do what I want (developping a commercial
plugin during my free time, just because this was an old dream, a challenge
and this is actually for me a way to continue to code for real users),
using an odd nick name, which is well worth another.

That's all the story behind this. Hope I have clarified this a bit.


Best Regards,

On Fri, Aug 3, 2018 at 4:14 AM, Sannyasin Brahmanathaswami via use-livecode
 wrote:

> Aloha "Zryip"
>
> At $45.00 (cheap) and with your own endorsement (knowing that it is
> maintained)
>
> I'll get it!
>
> Brahmanathaswami
>
> Ps do you have a real name?
>
> On 8/2/18, 12:01 PM, "use-livecode on behalf of zryip theSlug via
> use-livecode"  use-livecode@lists.runrev.com> wrote:
>
> Dear Swami,
>
> We have some free material about datagrids form or table.
>
> 1. A tutorial written long time ago before I created DGH, exploring the
> very basic concepts of the datagrid control (form and table):
> http://www.aslugontheroad.com/download/category/3-tutorials
>
> 2. Some demo stacks created for demonstrating datagrid's possibilities
> such
> as drag and drop, calculation, etc
> http://www.aslugontheroad.com/download/category/4-lab
>
> 3. About your screenshot, a datagrid form will be your better option
> in my
> opinion.
>
> 4. And about Data Grid Helper, I can not answer objectively to your
> question, for sure. All I can say is the tool has regular updates for
> supporting the new versions of LiveCode. A new  major (nothing to do
> with
> our friend Klaus :) (I prefer to specify because he made me the joke
> on the
> livecode forum, haha :) )) 2.5 version has been released in June
> supporting
> dg2 properties, widgets, custom headers, etc. A blog article has been
> published about it, with some available screenshots of the new
> features:
> https://livecode.com/data-grid-helper-2-5-adds-support-for-datagrid-2/
>
> Now, if someone in the List want to add a comment about DGH, positive
> or
> not, he / she is welcome. :)
>
>
> Best Regards,
>
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
Zryip TheSlug
http://www.aslugontheroad.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: Getting Started with DataGrid

2018-08-02 Thread zryip theSlug via use-livecode
Dear Swami,

We have some free material about datagrids form or table.

1. A tutorial written long time ago before I created DGH, exploring the
very basic concepts of the datagrid control (form and table):
http://www.aslugontheroad.com/download/category/3-tutorials

2. Some demo stacks created for demonstrating datagrid's possibilities such
as drag and drop, calculation, etc
http://www.aslugontheroad.com/download/category/4-lab

3. About your screenshot, a datagrid form will be your better option in my
opinion.

4. And about Data Grid Helper, I can not answer objectively to your
question, for sure. All I can say is the tool has regular updates for
supporting the new versions of LiveCode. A new  major (nothing to do with
our friend Klaus :) (I prefer to specify because he made me the joke on the
livecode forum, haha :) )) 2.5 version has been released in June supporting
dg2 properties, widgets, custom headers, etc. A blog article has been
published about it, with some available screenshots of the new features:
https://livecode.com/data-grid-helper-2-5-adds-support-for-datagrid-2/

Now, if someone in the List want to add a comment about DGH, positive or
not, he / she is welcome. :)


Best Regards,






On Thu, Aug 2, 2018 at 9:29 PM, Klaus major-k via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Swami,
>
> > Am 02.08.2018 um 21:24 schrieb Sannyasin Brahmanathaswami via
> use-livecode :
> >
> > I loaded DataGrid in stack
> >
> > Now I wonder if is tool of choice for
> > http://wiki.hindu.org/screenshots/data-grid-candidate.png
> > There needs to alternate rows, with the "alt" row as blank and showing
> the card .?? before I go down the path:
> >
> > Yes or No  -- can data grid to this?
>
> YES! :-)
>
> > Brahmanathaswami
>
> Best
>
> Klaus
>
> --
> Klaus Major
> http://www.major-k.de
> kl...@major-k.de
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
Zryip TheSlug
http://www.aslugontheroad.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: Datagrid Behaviors Moved??

2018-06-26 Thread zryip theSlug via use-livecode
Such as custom header templates? 8)

On Mon, Jun 25, 2018 at 5:50 PM, Tom Glod via use-livecode <
use-livecode@lists.runrev.com> wrote:

> thats a good tip for me as well..thanks Bob. you are right. looking at
> the handlers in there is pretty helpful, there may be a bunch of
> undocumented nuggz.
>
> On Mon, Jun 25, 2018 at 11:44 AM, Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > Whoa! Just discovered that when the datagrid library sends
> > selectionChanged to a datagrid, it passes 2 parameters: sHilitedIndexes
> and
> > pPreviouslyHilitedIndexes! Well THAT is a useful tidbit of information! I
> > go to some effort to save the prior selection in a custom property of
> each
> > datagrid, so I can compare values in the old and new selection! With
> These
> > parameters I don't need to do that anymore!
> >
> > How many other golden nuggets can be found there?
> >
> > Bob S
> >
> >
> > > On Jun 25, 2018, at 08:37 , Bob Sneidar via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> > >
> > > Ahah! So the correct syntax would be:
> > >
> > > edit the script of the behavior of the behavior of group "dgCustomers"
> > >
> > > 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
>



-- 
Zryip TheSlug
http://www.aslugontheroad.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: Transition from DataGrid in existing app to DataGrid 2 in LC 9.0

2018-05-19 Thread zryip theSlug via use-livecode
Martin,

The already existing data grid controls will work directly with the new
library. You have nothing to change or to re-install. All the handlers,
functions or properties of the datagrid API are still existing in the dg2
Library even if they have been rewrote. The only problem I encounter was
with deleteLine I used for deleting several lines at a time despite the
documentation recommandation. I changed the entry for deleteLines to fix
things.

On Thu, May 17, 2018 at 3:06 PM, Martin Koob via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi
>
> I have a Mac OS X application that is developed with LC 6.7.3 that I am
> transitioning to LC 9.0.
>
> I have some form style DataGrids in the application.   When I open the
> project in the LC 9.0 IDE do these data grids automatically have the new
> features of DataGrid 2 or do I have to replace the DataGrids with new ones
> to get all the DataGrid 2 features.
>
> Any other hints on transitioning DataGrids would be appreciated.
>
> Thanks.
>
> Martin Koob
>
>
>
>
> --
> Sent from: http://runtime-revolution.278305.n4.nabble.com/
> Revolution-User-f278306.html
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
Zryip TheSlug
http://www.aslugontheroad.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: URGENT: MergGoogle no longer works on iOS: CLIENTS VERY UNHAPPY

2018-05-02 Thread zryip theSlug via use-livecode
Hi,

I don't know if this would help, but I have native LC code for OAuth2
working with the google API on LC 8 and 9. I was using it with the google
calendar API in an experimental lib last year and the code still working.
Drop me a note and I could send you what I have.



On Thu, May 3, 2018 at 12:50 AM, Monte Goulding via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Sean
>
> I’m sorry to hear about your situation. It seems from the blog link you
> posted there was a notice on the iOS consent page. We weren’t notified in
> any other way and do not have a bug report open about this. It seems
> neither us, nor any of our users noticed the notice… anyway, we are here
> now and ready to help.
>
> From the sounds of things our OAuth2 script library won’t work for Google
> either so that isn’t an option. I’m looking for alternatives right now.
>
> If there is any chance of recovery with your clients please let me know if
> there is a new deadline to work to and I will do my best to get it done.
>
> Monte
>
> > On 2 May 2018, at 8:55 pm, Sean Cole (Pi) via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Hi
> >
> > Apparently, google stopped using their old method of oAuth and started
> > deprecation from 1March 2017. As of Apr 20 2018 it no longer works. My
> > clients rely on this feature and are shooting a pilot today (as in NOW!).
> > And the features built in no longer work as google docs no longer works.
> > Months in the making and preparation, and Google choose today of all days
> > to disallow it's use. FAB!!!
> >
> >
> > Why oh why oh why was this not addressed in the months leading up to
> this??
> > I am screwed and will not get paid now! I am sick and tired of how behind
> > Livecode gets. Off to find a cliff to jump from as this obviously wont
> get
> > fixed in time and I wont have any money to pay my bills as all of it went
> > it to putting this together! I'm as good as homeless. THANKS A MILLION!!
> >
> >
> > Sean Cole
> > *Pi Digital Productions Ltd*
> > www.pidigital.co.uk
> >
> >
> > eMail Ts & Cs    Pi Digital
> > Productions Ltd is a UK registered limited company, no. 5255609
> > ___
> > use-livecode mailing list
> > use-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
>



-- 
Zryip TheSlug
http://www.aslugontheroad.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

[ANN] DGH 2.5 Beta is looking for Testers

2018-03-25 Thread zryip theSlug via use-livecode
Dear LiveCode Users and more especially DGH Users:

A new major DGH 2.5 version is coming including lot of changes and features.

The list of changes would be to long if we have to be exaustive, so here is
some of the improvements we have in 2.5:
- widgets support in DGH template area
- dg2 properties support
- dg2 template actions editor (swipe, reorder)
- action scripts for adding, deleting rows
- action scripts for finding or searching inside the datagrid
- formulae and grand total for datagrid table
- custom datagrid table headers: checkboxes, multiline label, replacing
sort arrow icon by SVG Icons
- Possibility to change row template for any available group

PDFs documentation are already available for the main new features. Some
other PDF will come after the release, such as how to code the new DGH
parameters for adding/updating formulae, changing find color, having the
hand on custom headers, etc
Each pdf will have its corresponding Lesson inside the LiveCode website.

Here is the list of the pdf documentation we have, so far:

How do I Create Several Columns At A Time?


How Do I Change The Sort Arrow Icon Of My Datagrid?


How Do I Define A Button To Be Used As An Action Script?


How Do I Prepare My DataGrid Form for Search And Find Script?


How Do I Use Formulae For Basic Calculation Inside My DataGrid?


How Do I Use Grand Total Functions?


How Do I Create A Column With A Multiline Header?


How Do I Create A Custom Header With A CheckBox?


How Do I Create A Column Using A SVG Icon Widget As A Sort Icon?


How Do I Change The Templates For Swipe And Reorder Actions?


How Do I Use Widgets In The DGH's Template Area?



We need some help for testing DGH 2.5 outside of our development
environment. Ideally we will happy to send a beta version to users
interested to help. LiveCode 8.x or 9.x required, with or without dg2.
And as we are not native English, we need also some kindly eyes and
feedbacks on our documentation.

If you have some interest in DGH and would like to help, feel free to drop
me a note.


Thanks a lot.


Best Regards,
-- 
Zryip TheSlug
http://www.aslugontheroad.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: Color a graphic on a datagrid

2018-03-02 Thread zryip theSlug via use-livecode
We have nothing helpful for accomplishing that in DGH. But having a
look to the ColumnControlOfIndex function in the datagrid API could be
helpful:
http://lessons.livecode.com/m/datagrid/l/7344-data-grid-api

We have shared a stack demonstrating the usage of this function some
years ago. I just republished it here:
http://www.aslugontheroad.com/download/category/4-lab

The name of the stack is "dg interaction with a column control" and
the purpose was to change the background color of column 2 when one is
changing a value in column 3 by choosing a color inside a popup menu.

On Fri, Mar 2, 2018 at 8:54 PM, Bob Sneidar via use-livecode
 wrote:
> Not sure if Datagrid Helper can do this. Conditional formatting of a datagrid 
> may only be possible with forms, not tables.
>
> Bob S
>
>
>> On Mar 2, 2018, at 10:05 , Ludovic THEBAULT via use-livecode 
>>  wrote:
>>
>>> Le 2 mars 2018 à 17:24, Ludovic THEBAULT via use-livecode 
>>>  a écrit :
>>>
>>> Hello,
>>>
>>> I want to do something similar to 
>>> http://lessons.livecode.com/m/datagrid/l/7332-how-can-i-colorize-individual-lines-in-a-table
>>>
>>> but i want to « automatically » change the color of a graphic (in col 1) in 
>>> a row only when there is some data in this row (in col 10). I can't get the 
>>> value of my cell (col 10) to test it and modify the color of the graphic in 
>>> col 1.
>>>
>>> Any ideas ?
>>>
>>> Thanks !
>>
>> I use a workaround : put the value in a hidden field of the same column of 
>> the graphic
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



-- 
Zryip TheSlug
http://www.aslugontheroad.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: making DG2 usable

2018-01-31 Thread zryip theSlug via use-livecode
I don't know, but you can create quickly and easily something similar,
for a test.

1. Create a new datagrid form

2. Populate it with some data, by using the inspector

3. By adding this script in a button, turn the datagrid in edit mode.

set the dgEditMode of grp "datagrid 1" to true

4. You can disable / enable the animation by using the "animate
actions" property:

set the dgProps["animate actions"] of grp "datagrid 1" to false

5. And the property "enable swipe" will give you the possibility to
turn on / off the swipe gesture.

set the dgProps["enable swipe"] of grp "datagrid 1" to false

On Wed, Jan 31, 2018 at 10:32 PM, PystCat via use-livecode
 wrote:
> It was an email announcing some of the new features and it showed a web clip 
> of it in action.  It was WAY cool showing the drag and sort along with the 
> swipe to delete… AND this was on a desktop.
>
>> On Jan 31, 2018, at 4:29 PM, Mike Kerner via use-livecode 
>>  wrote:
>>
>> Was it a file?  I don't remember seeing a file.  I just remember the webex
>> session.
>>
>> On Wed, Jan 31, 2018 at 4:01 PM, PystCat via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>
>>> Is it possible get the demo file the Mothership did in the email that
>>> showed off the new features..?  I would love to see that.
>>>
 On Jan 31, 2018, at 12:07 PM, Richard Gaskin via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:

 Mike Kerner wrote:

>> On 31 Jan 2018, at 2:07 pm, Richard Gaskin wrote:
>>
>> But as for DG2, am I the only one who finds it too wonky to use?
>
> @Richard have you tried Bernd's modTableField as an alternative?  I'm
> deploying it in my second project, and it's pretty darn cool.  And
> fast.

 Indeed it is.  Bernd does great work, and his modTableField is no
>>> exception.

 I used to maintain a similar single-field+header solution before DG1
>>> premiered, but DG generally does what I need so I stopped working so hard.

 The thing with DG2 is that it's nicely designed for mobile use, if only
>>> the performance was as good as its design.  The delete and re-ordering are
>>> well thought out, and in theory will be delightful to use.

 Monte's note that they're working on it is promising, seems worth
>>> waiting for.

 --
 Richard Gaskin
 Fourth World Systems

 ___
 use-livecode mailing list
 use-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
>>>
>>
>>
>>
>> --
>> On the first day, God created the heavens and the Earth
>> On the second day, God created the oceans.
>> On the third day, God put the animals on hold for a few hours,
>>   and did a little diving.
>> And God said, "This is good."
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



-- 
Zryip TheSlug
http://www.aslugontheroad.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: Reading from xls or xlsx - with style

2018-01-16 Thread zryip theSlug via use-livecode
Matthias, if by tooltip, you meant the comment associated to a cell,
yes this is something potentially possible, too.


On Tue, Jan 16, 2018 at 9:52 PM, Matthias Rebbe via use-livecode
<use-livecode@lists.runrev.com> wrote:
> As i wrote “ at least i am not aware of it” ;)
>
> good to know. That this is possible.
>
> Btw.: Do you know if it is also possible to read/get the tooltip of a cell of 
> better said of a range of cells?
>
> Regards
> Matthias
>
>
> Matthias Rebbe
> Tel +49 5741 31
> ‌https://matthiasrebbe.eu <https://matthiasrebbe.eu/>‌
>
>> Am 16.01.2018 um 21:32 schrieb zryip theSlug via use-livecode 
>> <use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>>:
>>
>> In the Excel Lib, the command XCEL_Range_FontStyle_Get is returning
>> the style of the whole cell or range. We have no function to read the
>> style of each char, at this moment.
>> However, both VBA and AppleScript are offering this possibility, so
>> this is a function we can add. A possible solution would consist to
>> explore the style of each chars in a cell, then return the result in
>> html to have it directly usable in LiveCode. I'm not sure of the
>> performances of this approach, though. It will depend on how many
>> cells the sheet have and how many text each cells are containing.
>>
>> On Tue, Jan 16, 2018 at 8:23 PM, Matthias Rebbe via use-livecode
>> <use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>> wrote:
>>> Ben,
>>>
>>> i am uising Spreadlib and Excel Libary. Both do not take care for text 
>>> format.
>>> At least i am not aware of it.
>>>
>>> Regards,
>>> Matthias
>>>
>>>
>>>
>>> Matthias Rebbe
>>> Tel +49 5741 31
>>> ‌https://matthiasrebbe.eu <https://matthiasrebbe.eu/> 
>>> <https://matthiasrebbe.eu/ <https://matthiasrebbe.eu/>>‌
>>>
>>>> Am 16.01.2018 um 19:10 schrieb Ben Rubinstein via use-livecode 
>>>> <use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com> 
>>>> <mailto:use-livecode@lists.runrev.com 
>>>> <mailto:use-livecode@lists.runrev.com>>>:
>>>>
>>>> I'm aware that there are a couple of libraries floating around for reading 
>>>> Excel documents - do any of them allow the formatting of runs of text 
>>>> within cells to be read? I want to import some data where some of the text 
>>>> in a cell may contain some parts which are in italics or bold. Are there 
>>>> existing libraries that support this use?
>>>>
>>>> Many thanks,
>>>>
>>>> Ben
>>>>
>>>> ___
>>>> use-livecode mailing list
>>>> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com> 
>>>> <mailto: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 <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>
>>
>>
>>
>> --
>> Zryip TheSlug
>> http://www.aslugontheroad.com <http://www.aslugontheroad.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



-- 
Zryip TheSlug
http://www.aslugontheroad.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: Reading from xls or xlsx - with style

2018-01-16 Thread zryip theSlug via use-livecode
In the Excel Lib, the command XCEL_Range_FontStyle_Get is returning
the style of the whole cell or range. We have no function to read the
style of each char, at this moment.
However, both VBA and AppleScript are offering this possibility, so
this is a function we can add. A possible solution would consist to
explore the style of each chars in a cell, then return the result in
html to have it directly usable in LiveCode. I'm not sure of the
performances of this approach, though. It will depend on how many
cells the sheet have and how many text each cells are containing.

On Tue, Jan 16, 2018 at 8:23 PM, Matthias Rebbe via use-livecode
 wrote:
> Ben,
>
> i am uising Spreadlib and Excel Libary. Both do not take care for text format.
> At least i am not aware of it.
>
> Regards,
> Matthias
>
>
>
> Matthias Rebbe
> Tel +49 5741 31
> ‌https://matthiasrebbe.eu ‌
>
>> Am 16.01.2018 um 19:10 schrieb Ben Rubinstein via use-livecode 
>> >:
>>
>> I'm aware that there are a couple of libraries floating around for reading 
>> Excel documents - do any of them allow the formatting of runs of text within 
>> cells to be read? I want to import some data where some of the text in a 
>> cell may contain some parts which are in italics or bold. Are there existing 
>> libraries that support this use?
>>
>> Many thanks,
>>
>> Ben
>>
>> ___
>> use-livecode mailing list
>> use-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



-- 
Zryip TheSlug
http://www.aslugontheroad.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: [ ANN ] Release 8.1.3 RC-1

2017-01-21 Thread zryip theSlug via use-livecode
Thanks to the logs shared, I was able to identify the problem with DGH
stoping the plugins loading process.

The problem is in the DGH_Help substack (the DGH documentation) which
the IDE is considering as locked. Don't ask me why, this is the only
substack in DGH which has a couple of properties set, such as the
cantdelete property. Setting this property to false in the inspector
is solving the issue.

Will update the bugzilla report with this information in case this new
behavior is not something expected.


Best Regards,

On Sat, Jan 21, 2017 at 7:17 AM, Trevor DeVore via use-livecode
 wrote:
> On Fri, Jan 20, 2017 at 11:26 AM, panagiotis merakos via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>>
>> LiveCode 8.1.3 RC 1 contains 83 bug fixes and stability improvements:
>>
>> - Several crashes have been fixed.
>> …
>
> - Several clipboard-related bugs have been fixed.
>>
>
> After getting past the plugin loading issue 8.1.3 rc-1 has been working
> nicely. I was able to routinely crash previous versions of LC 8 with a
> project I’m working on. I haven’t had a single crash with 8.1.3 rc-1. I’m
> very happy about that!
>
> --
> Trevor DeVore
> Outcome & ScreenSteps
> www.outcomeapp.io - www.screensteps.com
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



-- 
Zryip TheSlug
http://www.aslugontheroad.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