Table Fields "and all"

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Table Fields "and all"

Mark Waddingham via use-livecode
I want to put "cheese" into the third column across of the third line
down of my Table Field "TF"

put "cheese" into column 3 of line 3 of fld "TF"   did not work,

put "cheese" into item 3 of line 3 of fld "TF"

put "cheese" into the first column preceded by two commas (default
itemDelimiters).

put tab & tab &"cheese" into line 3 of fld "TF"

"worked" insofar as it put "cheese" into column 3, but it also deleted
other data in columns 1 and 2 . . .

That use of 'tab' seems clunky in the extreme . . .

And, things are "not much good" if on entering data it deletes other
data elsewhere.

I found something very helpful for getting an Array into a Table Field

[
http://lessons.livecode.com/m/4071/l/7810-how-do-i-display-an-array-in-a-table-field 
]

but that didn't really help me.

put "Biscuits" & "cheese" into line 3 of fld "TF"   gave me
"Biscuitscheese" in the first column

'obviously'

put "Biscuits" & tab & "cheese" into line 3 of fld "TF"

did separate the biscuits from the cheese.

This is "a right pox" as, presumably, if one imports a comma delimited
data file from outside Livecode one has to
go through a "pretty glorious" rigmarole getting all the stuff into the
right slots.

-----------

Of course the easy answer to my post is to do a knee-jerk "datagrid" or
a "wait for datagrid 2" response,
but not all of us really want the high learning and coding overhead that
the datagrid involves, especially when
we might be dealing with a simple 10 x 10 table of data.

Richmond.
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table Fields "and all"

Mark Waddingham via use-livecode
> Richmond wrote:
> I want to put "cheese" into the third column across of the third line
> down of my Table Field "TF"


You could try:

set the itemdelimiter to tab
put "cheese" into item 3 of line 3 of fld "TF"



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table Fields "and all"

Mark Waddingham via use-livecode
In reply to this post by Mark Waddingham via use-livecode
Imagine the following scenario:

A text file containing lines of text a bit like this:

Mary Smith 12 Windsor Gardens Slough 45 housewife

now getting those lines into a Table Field is going to involve messing
around with 'quote' amongst all the "dicing and slicing".

I think I'll be a "right plonker" and give that to my programming pupils
tomorrow afternoon.

If you never hear from me again start looking for a gravestone in
Bulgaria with a Table Field on it!

Richmond.

On 6/29/17 10:45 am, Richmond Mathewson wrote:

> I want to put "cheese" into the third column across of the third line
> down of my Table Field "TF"
>
> put "cheese" into column 3 of line 3 of fld "TF"   did not work,
>
> put "cheese" into item 3 of line 3 of fld "TF"
>
> put "cheese" into the first column preceded by two commas (default
> itemDelimiters).
>
> put tab & tab &"cheese" into line 3 of fld "TF"
>
> "worked" insofar as it put "cheese" into column 3, but it also deleted
> other data in columns 1 and 2 . . .
>
> That use of 'tab' seems clunky in the extreme . . .
>
> And, things are "not much good" if on entering data it deletes other
> data elsewhere.
>
> I found something very helpful for getting an Array into a Table Field
>
> [
> http://lessons.livecode.com/m/4071/l/7810-how-do-i-display-an-array-in-a-table-field 
> ]
>
> but that didn't really help me.
>
> put "Biscuits" & "cheese" into line 3 of fld "TF"   gave me
> "Biscuitscheese" in the first column
>
> 'obviously'
>
> put "Biscuits" & tab & "cheese" into line 3 of fld "TF"
>
> did separate the biscuits from the cheese.
>
> This is "a right pox" as, presumably, if one imports a comma delimited
> data file from outside Livecode one has to
> go through a "pretty glorious" rigmarole getting all the stuff into
> the right slots.
>
> -----------
>
> Of course the easy answer to my post is to do a knee-jerk "datagrid"
> or a "wait for datagrid 2" response,
> but not all of us really want the high learning and coding overhead
> that the datagrid involves, especially when
> we might be dealing with a simple 10 x 10 table of data.
>
> Richmond.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table Fields "and all"

Mark Waddingham via use-livecode
In reply to this post by Mark Waddingham via use-livecode
Clever stuff.

Thanks an awful lot for what seemed like a knotty problem.

Also good because this:

settheitemDelimitertotab

put"Biscuits" intoitem 3 ofline 7 offld "TF"

put"Cheese" intoitem 5 ofline 7 offld "TF"

did not delete the "biscuits".

Richmond.

On 6/29/17 10:54 am, hh via use-livecode wrote:

>> Richmond wrote:
>> I want to put "cheese" into the third column across of the third line
>> down of my Table Field "TF"
>
> You could try:
>
> set the itemdelimiter to tab
> put "cheese" into item 3 of line 3 of fld "TF"
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table Fields "and all"

Mark Waddingham via use-livecode
I had the same problem when I started using Tables and after I found the
TAB delimiter "trick" as per Hermann, it was obvious (20/20 Hind sight).
The Aha! moment came when using commas messed it up by putting them all in
1 column with the commas intact. I just assumed everybody  knew  and I was
a slow learner- nice to know I was not alone

Regards Lagi

On 29 June 2017 at 09:01, Richmond Mathewson via use-livecode <
[hidden email]> wrote:

> Clever stuff.
>
> Thanks an awful lot for what seemed like a knotty problem.
>
> Also good because this:
>
> settheitemDelimitertotab
>
> put"Biscuits" intoitem 3 ofline 7 offld "TF"
>
> put"Cheese" intoitem 5 ofline 7 offld "TF"
>
> did not delete the "biscuits".
>
> Richmond.
>
> On 6/29/17 10:54 am, hh via use-livecode wrote:
>
>> Richmond wrote:
>>> I want to put "cheese" into the third column across of the third line
>>> down of my Table Field "TF"
>>>
>>
>> You could try:
>>
>> set the itemdelimiter to tab
>> put "cheese" into item 3 of line 3 of fld "TF"
>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table Fields "and all"

Mark Waddingham via use-livecode
One of the reasons you may not be alone is because the documentation
is not much good when it comes to table fields.

I have my suspicions that they have been overlooked; possibly in the mad
rush towards datagrids.

Richmond.

On 6/29/17 11:13 am, Lagi Pittas via use-livecode wrote:

> I had the same problem when I started using Tables and after I found the
> TAB delimiter "trick" as per Hermann, it was obvious (20/20 Hind sight).
> The Aha! moment came when using commas messed it up by putting them all in
> 1 column with the commas intact. I just assumed everybody  knew  and I was
> a slow learner- nice to know I was not alone
>
> Regards Lagi
>
> On 29 June 2017 at 09:01, Richmond Mathewson via use-livecode <
> [hidden email]> wrote:
>
>> Clever stuff.
>>
>> Thanks an awful lot for what seemed like a knotty problem.
>>
>> Also good because this:
>>
>> settheitemDelimitertotab
>>
>> put"Biscuits" intoitem 3 ofline 7 offld "TF"
>>
>> put"Cheese" intoitem 5 ofline 7 offld "TF"
>>
>> did not delete the "biscuits".
>>
>> Richmond.
>>
>> On 6/29/17 10:54 am, hh via use-livecode wrote:
>>
>>> Richmond wrote:
>>>> I want to put "cheese" into the third column across of the third line
>>>> down of my Table Field "TF"
>>>>
>>> You could try:
>>>
>>> set the itemdelimiter to tab
>>> put "cheese" into item 3 of line 3 of fld "TF"
>>>
>>>
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table Fields "and all"

Mark Waddingham via use-livecode
In reply to this post by Mark Waddingham via use-livecode
Hi all,

closely connected to that, not this much advanced as Bernd's jewel modTableField, another 'jewel'-stack by Scott:

http://forums.livecode.com/viewtopic.php?p=129767&sid=fbca74cc652e7760ce1f837e482dc57a#p129767

H.
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table Fields "and all"

Mark Waddingham via use-livecode
In reply to this post by Mark Waddingham via use-livecode
The data grid was created *precicely* because of this very thing. I for one was constantly begging for a table object of some sort, imagining that it would work like an Excel Spreadsheet, but as many pointed out, there would be problems when the data put into a table object was too much for Livecode to want to deal with.

I do not see creating a datagrid as a "knee-jerk" reaction any more than using a menu button is when trying to create a popup menu. If you need an object that can display a table of data, that can be addressed pretty simply, the DataGrid is what you want.

So here is a bit of code:

set the dgData of group "dgDataGrid" to aArrayData
put the dgDataOfLine [3] into aDataRecord
put aDataRecord ["food type"] && aDataRecord ["topping1"] into tLunchEntree

It's not that difficult. Now if you want to find the record containing "biscuit":

dispatch findIndex to group "dgDataGrid" with ""food type", "Biscuit"
put the result into tFoundIndex
put the dgDataOfIndex [tFoundIndex] into aDataRecord

Piece of cake! Here is the DataGrid API link: http://lessons.livecode.com/m/datagrid/l/7344-data-grid-api

Bob S


> On Jun 29, 2017, at 24:45 , Richmond Mathewson via use-livecode <[hidden email]> wrote:
>
> Of course the easy answer to my post is to do a knee-jerk "datagrid" or a "wait for datagrid 2" response,
> but not all of us really want the high learning and coding overhead that the datagrid involves, especially when
> we might be dealing with a simple 10 x 10 table of data.
>
> Richmond.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table Fields "and all"

Mark Waddingham via use-livecode
In reply to this post by Mark Waddingham via use-livecode
First of all, tell me the bits of information are delimited by tabs or commas, otherwise I am going to go back and ask the source of that information to please provide it to me in a form I can use. If the only delimiter is spaces, and one of the bits of information has several words, then that is not a format anyone can write a program to deal with unless they already know that there are only 2 single word fields prior to the address, and only 3 single word fields after. If however there is a such thing as cities with more than one word, or someone decides to include a middle name, or someone's last name has more than one word, you are screwed.

So this is not a good "example" to demonstrate anything except that there is a reason why delimited text is delimited in the first place. In fact, the whole reason you are trying to get this into a table field/object is so that the data can be managed in an orderly fashion.

I understand that you don't want to dig through all the tools in your toolbox to get to the hammer, when that pipe wrench is sitting right on the top, but honestly, you are trying to hammer in a nail. Use the hammer! :-)

Bob S


> On Jun 29, 2017, at 24:56 , Richmond Mathewson via use-livecode <[hidden email]> wrote:
>
> Imagine the following scenario:
>
> A text file containing lines of text a bit like this:
>
> Mary Smith 12 Windsor Gardens Slough 45 housewife


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table Fields "and all"

Mark Waddingham via use-livecode
In reply to this post by Mark Waddingham via use-livecode
Richmond Mathewson wrote:

 > On 6/29/17 11:13 am, Lagi Pittas wrote:
 >> I had the same problem when I started using Tables and after I
 >> found the TAB delimiter "trick" as per Hermann, it was obvious
 >> (20/20 Hind sight).
 >> The Aha! moment came when using commas messed it up by putting them
 >> all in 1 column with the commas intact. I just assumed everybody
 >>  knew  and I was a slow learner- nice to know I was not alone
 >
 > One of the reasons you may not be alone is because the documentation
 > is not much good when it comes to table fields.
 >
 > I have my suspicions that they have been overlooked; possibly in the
 > mad rush towards datagrids.

Table fields were introduced at least by the mid-90s, possibly as early
as '92 when the MetaCard/LiveCode engine was born.  The DataGrid is much
newer.  There was no "rush towards datagrids".

What Lagi experienced is how people learn.

The human mind can generally hold between three and seven things in
conscious memory at any given time.  The User Guide is 627 pages long.

Whether we're learning basketball, piano, or programming, there is no
book one can read and then expect to be immediately good at the craft.

People learn by practice.  Practice is the art of learning from mistakes.

The value judgment that mistakes are somehow "wrong" or someone else's
fault or anyone's fault at all is probably the biggest impediment to
learning I've ever known.

Imperfect performance, in any human endeavor, is simply how we learn to
move ever closer toward perfection, a journey that moves forward as
quickly as the number of hours we devote to practice.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table Fields "and all"

Mark Waddingham via use-livecode
In reply to this post by Mark Waddingham via use-livecode
> RG wrote:
> The human mind can generally hold between three and seven things in
> conscious memory at any given time.

How did you measure that?

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table Fields "and all"

Mark Waddingham via use-livecode
Personally I always take a ruler to bed to:

1. measure how long I sleep.

2. To find out what a night of passion with a crowned head is like.

Richmond.

On 6/29/17 8:49 pm, hh via use-livecode wrote:

>> RG wrote:
>> The human mind can generally hold between three and seven things in
>> conscious memory at any given time.
> How did you measure that?
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table Fields "and all"

Mark Waddingham via use-livecode
In reply to this post by Mark Waddingham via use-livecode
He doesn't remember. He has 8 other things on his mind.

Bob S


> On Jun 29, 2017, at 10:49 , hh via use-livecode <[hidden email]> wrote:
>
>> RG wrote:
>> The human mind can generally hold between three and seven things in
>> conscious memory at any given time.
>
> How did you measure that?


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table Fields "and all"

Mark Waddingham via use-livecode
In reply to this post by Mark Waddingham via use-livecode
hh wrote:
 >> RG wrote:
 >> The human mind can generally hold between three and seven things in
 >> conscious memory at any given time.
 >
 > How did you measure that?

Good question.  It's been so long since I took that cog psy class back
in college that I'd have to dig up my old text books to describe the
details of the study that led to that widely-cited rubric.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table Fields "and all"

Mark Waddingham via use-livecode


> 29. jun. 2017 kl. 21:29 skrev Richard Gaskin via use-livecode <[hidden email]>:
>
> hh wrote:
> >> RG wrote:
> >> The human mind can generally hold between three and seven things in
> >> conscious memory at any given time.
> >
> > How did you measure that?
>
> Good question.  It's been so long since I took that cog psy class back in college that I'd have to dig up my old text books to describe the details of the study that led to that widely-cited rubric.


You will find some information on short term memory here: https://www.simplypsychology.org/short-term-memory.html <https://www.simplypsychology.org/short-term-memory.html>
See also the references in this article. There seems to be universal agreement about the validity of the theory, at least among educators.

Regards
Tore Nilsen


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table Fields "and all"

Mark Waddingham via use-livecode
Um:

http://www.bbc.com/news/health-39518580

"So the prevailing idea was that memories are formed in the hippocampus
and then moved to the cortex where they are "banked".

The team at the Riken-MIT Center for Neural Circuit Genetics have done
something mind-bogglingly advanced to show this is not the case."

Richmond.


On 6/29/17 10:42 pm, Tore Nilsen via use-livecode wrote:

>
>> 29. jun. 2017 kl. 21:29 skrev Richard Gaskin via use-livecode <[hidden email]>:
>>
>> hh wrote:
>>>> RG wrote:
>>>> The human mind can generally hold between three and seven things in
>>>> conscious memory at any given time.
>>> How did you measure that?
>> Good question.  It's been so long since I took that cog psy class back in college that I'd have to dig up my old text books to describe the details of the study that led to that widely-cited rubric.
>
> You will find some information on short term memory here: https://www.simplypsychology.org/short-term-memory.html <https://www.simplypsychology.org/short-term-memory.html>
> See also the references in this article. There seems to be universal agreement about the validity of the theory, at least among educators.
>
> Regards
> Tore Nilsen
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table Fields "and all"

Mark Waddingham via use-livecode
Which is to say, "I think. Therefore... I have no idea what the hell that means." ;-)

Bob S


> On Jun 29, 2017, at 12:51 , Richmond Mathewson via use-livecode <[hidden email]> wrote:
>
> Um:
>
> http://www.bbc.com/news/health-39518580
>
> "So the prevailing idea was that memories are formed in the hippocampus and then moved to the cortex where they are "banked".
>
> The team at the Riken-MIT Center for Neural Circuit Genetics have done something mind-bogglingly advanced to show this is not the case."
>
> Richmond.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...