Column

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 2788
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Column

Post by richmond62 » Fri Nov 04, 2016 12:38 pm

It would be great if one could refer to the columns in tableFields with the word 'column',
as, for instance in:

put "XYZ" into column 3 of line 4 of fld "fTableF1"

paul@researchware.com
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 71
Joined: Wed Aug 26, 2009 7:42 pm
Location: Randolph, MA USA
Contact:

Re: Column

Post by paul@researchware.com » Fri Nov 04, 2016 12:52 pm

See http://quality.livecode.com/show_bug.cgi?id=4623

Obviously, if you look at the bug number, this has been a feature request for a long time.
Paul Dupuis
ResearchWare, Inc.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 2788
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Re: Column

Post by richmond62 » Fri Nov 04, 2016 2:41 pm

2007: must be very nearly a record.

I wonder why nothing has been done about this when it seems rather an
obvious feature request?

I have added a comment to that Bug report in a desperate attempt to get it noticed by the mothership at last.

paul@researchware.com
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 71
Joined: Wed Aug 26, 2009 7:42 pm
Location: Randolph, MA USA
Contact:

Re: Column

Post by paul@researchware.com » Fri Nov 04, 2016 2:54 pm

I think one reason it has not been implemented is that it is pretty easy to write your own function to return a numerically indexed column from a tab and return delimited table.

function columnFromTable pTable, pColumnIndex
local tData
set itemDel to tab
repeat for each line tLine of pTable
put item pColumnIndex of tLine & cr after tData
end repeat
if last char of tData is cr then delete last char of tData
return tData
end columnFromTable

It is just not as elegant using:

put columnFromTable(myTable,3) into my3rdColumn
as saying
put column 3 of myTable into my3rdColumn
Paul Dupuis
ResearchWare, Inc.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 2788
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Re: Column

Post by richmond62 » Fri Nov 04, 2016 3:14 pm

it is pretty easy to write your own function
Um: well if that were the case Livecode might not have half the functions it has.

paul@researchware.com
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 71
Joined: Wed Aug 26, 2009 7:42 pm
Location: Randolph, MA USA
Contact:

Re: Column

Post by paul@researchware.com » Fri Nov 04, 2016 3:37 pm

richmond62 wrote:
it is pretty easy to write your own function
Um: well if that were the case Livecode might not have half the functions it has.
Not arguing that. Just offering a possible explanation. LC doesn't have the resources to do everything people would like them to, so if I was in their position, choosing between features that can only be implemented in the engine or via externals or widgets vs things that are scriptable, I would weight what I worked on more towards the former.

Personally, I'd love to see a 'column' chunk type that can be used both with delimited data and with arrays. I think for many people, myself included, it would be a highly welcome addition to the language given how much tabular data I work with. That is why I posted the bugzilla link and responded.
Paul Dupuis
ResearchWare, Inc.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4697
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Column

Post by jacque » Fri Nov 04, 2016 4:52 pm

"Column" is already in use with arrays. Since it's a reserved term, it may not be appropriate for another context.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

paul@researchware.com
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 71
Joined: Wed Aug 26, 2009 7:42 pm
Location: Randolph, MA USA
Contact:

Re: Column

Post by paul@researchware.com » Fri Nov 04, 2016 6:13 pm

jacque wrote:"Column" is already in use with arrays. Since it's a reserved term, it may not be appropriate for another context.
You are referring to the split and combine commands?

The proposal in the bug entry also request using 'column' in the following form

get column 3 of tArray -- return an array of the 3 ordinal key of the second array dimension for each primary key for which a value exists.
Paul Dupuis
ResearchWare, Inc.

Post Reply

Return to “Feature Requests”