Re: Newbie Data Grid question
Bonjour, Le 16 déc. 09 à 06:12, Trevor DeVore a écrit : On Dec 16, 2009, at 12:04 AM, James Hurley wrote: It's okay, the Data Grid likes to be beta up on once and a while :-) As long as this is still in Beta, may I make a suggestion? Sorry, that was supposed to be beat not beta. :-o)) (Does anyone ever let the possibility of the answer be no stop them?) I had assumed when I saw the following code in the guide: put field data into tData put true into pFirstLineContainsHeaders set the dgText [ pFirstLineContainsHeaders ] of group DataGrid 2 to tData I assumed that the data grid would function in much the same way that FileMaker does when importing an Excel file, i.e. it allows one to assign the items in the first line of the file to field names and the rest of the llines to populate these fields. That would be a reasonable behavior of dgText[pFirstLineContainsHeaders] il.e. when the parameter is true, the column headings are taken from the first line of the text field and the rest go into filling the columns. I must confess that I interpreted this code in the same way in particular, I think, because this phrase If true then the data grid will extract the first line of pText … The first line is only used to tell the data grid which columns to map the rest of the data to. If you want to create columns then you will need to set the dgProp[columns] property. That's OK for me now, Trevor :-) Might be nice to elaborate a bit in this lesson to prevent from this misinterpretation. Best regards from Grenoble André You can't really use multiple parameters when using setProp (which is what dgText is). I'm kind of fudging things a bit by treating dgText as a custom property set and pFirstLineContainsHeaders as the custom property. The truth is we still don't have access to a very expressive syntax when creating custom controls (which the Data Grid is one). -- Trevor DeVore Blue Mango Learning Systems ScreenSteps: http://www.screensteps.com Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Newbie Data Grid question
--- Message: 15 Date: Tue, 15 Dec 2009 18:52:52 -0800 From: Jim Ault jimaultw...@yahoo.com Subject: Re: Newbie Data Grid question To: How to use Revolution use-revolution@lists.runrev.com Message-ID: d39498b1-d005-477d-9b52-044d9dae6...@yahoo.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes One valuable technique for understanding the DataGrid inner workings. In Rev, choose the pointer tool, click on a data grid, then go the inspector, choose 'custom properties' from the drop down, and now check out the property sets. You should see dgProps and dgCache Note all the properties that have been created when the data grid was created. Of course you can edit the values here, but you can also change them in script lines. One bit of confusion for me is that there is no dgText property set visible here. The syntax set the dgText [ true ] of group DataGrid to tHeaders would logically mean that there would be a custom property set dgText Interesting if you click on dgProps row template you will see: group id 1011 of card id 1010 of stack Data Grid Templates 1260751174078 ...at least in my version of Rev 3.5 Hope this helps in your travels. Jim Ault Las Vegas Jim, Thanks for this. I tried this, hoping for the same insight you discovered, but I don't see anything in the custom property set. Are you looking at the dgProps of the data grid group? Jim ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Newbie Data Grid question
Bonjour Jim, Trevor and others on this thread ;-) Le 14 déc. 09 à 19:11, James Hurley a écrit : ... Trevor (and Andre.Bisseret), Thanks you for the very thoughtful reply(s). It is heartening to see something defended by its parent. My sincere apologies for treating your offspring in such a quick and dirty fashion :-) I'm sure I will appreciate the richness of this new Run Rev object in time--see below. FIrst to satisfy my quick and dirty needs, I find that the following works well to get data displayed in a data grid field: on mouseUp put field data into tData --Tab delimited text --The first line of tData contains the column names put line 1 of tData into tHeaders replace tab with cr in tHeaders set dgProp[Columns] of group DataGrid to tHeaders --Thanks to Andre for this line. set the dgText [ true ] of group DataGrid to tData end mouseUp Your handler above, confirmed by Trevoir, helped me a lot to understand the possible uses of pFirstLineContainsHeaders. In order to learn more about data grid, I tried several variations, I put below in case it could interest someone : local tData,tHeaders, -- field data = lines of tab delimited text -- a Data Grid DataGrid with 3 columns -- 1 ) IF THE LINE OF HEADERS IS NOT INCLUDED IN THE DATA (AS I AM ACCUSTOMED TO) -- 1.1) WITHOUT USING pFirstLineContainsHeaders; WORKS: on mouseUp put header1 cr header2 cr header3 into tHeaders set the dgProp[columns] of grp DataGrid to tHeaders put fld data into tData set the dgText of group DataGrid to tData end mouseUp -- 1.2) USING pFirstLineContainsHeaders: USELESS BUT WORKS :-))) on mouseUp put header1 cr header2 cr header3 into tHeaders set the dgProp[columns] of grp DataGrid to tHeaders put fld data into tData set the dgText[false] of group DataGrid to tData end mouseUp -- 2) IF, FOR SOME REASON, THE LINE OF HEADERS IS INCLUDED IN THE DATA (FIRST LINE) -- 2.1) WITHOUT USING pFirstLineContainsHeaders: WORKS: on mouseUp put field data into tData put line 1 of tData into tHeaders replace tab with cr in tHeaders set dgProp[Columns] of group DataGrid to tHeaders delete line 1 of tData set the dgText of group DataGrid to tData end mouseUp -- 2.2) USING pFirstLineContainsHeaders: WORKS: on mouseUp -- the handler from Jim put field data into tData put line 1 of tData into tHeaders replace tab with cr in tHeaders set dgProp[Columns] of group DataGrid to tHeaders --Thanks to Andre for this line. set the dgText [ true ] of group DataGrid to tData end mouseUp - -- indeed, in all these handlers, it's possible to directly set the dgText of grp datagrid to fld data (but less fast, I guess, specially if it contains a lot of lines) -- AS FOR THE SYNTAX OF pFirstLineContainsHeaders OK: set the dgText[true] nevertheless: put true into pFirstLineContainsHeaders set the dgText[pFirstLineContainsHeaders] of grp datagrid to true works as well, but useless, OK :-) set the pFirstLineContainsHeaders of grp datagrid to true does not work as that is creating a custom prop; OK :-)) I am a bit slow-witted but I am beginning to understand quite what this pFirstLineContainsHeaders can do ;-o) Thanks to both of you, André ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Newbie Data Grid question
One valuable technique for understanding the DataGrid inner workings. In Rev, choose the pointer tool, click on a data grid, then go the inspector, choose 'custom properties' from the drop down, and now check out the property sets. You should see dgProps and dgCache Note all the properties that have been created when the data grid was created. Of course you can edit the values here, but you can also change them in script lines. One bit of confusion for me is that there is no dgText property set visible here. The syntax set the dgText [ true ] of group DataGrid to tHeaders would logically mean that there would be a custom property set dgText Interesting if you click on dgProps row template you will see: group id 1011 of card id 1010 of stack Data Grid Templates 1260751174078 ...at least in my version of Rev 3.5 Hope this helps in your travels. Jim Ault Las Vegas On Dec 15, 2009, at 3:18 AM, Andre.Bisseret wrote: Bonjour Jim, Trevor and others on this thread ;-) Le 14 déc. 09 à 19:11, James Hurley a écrit : ... Trevor (and Andre.Bisseret), Thanks you for the very thoughtful reply(s). It is heartening to see something defended by its parent. My sincere apologies for treating your offspring in such a quick and dirty fashion :-) I'm sure I will appreciate the richness of this new Run Rev object in time--see below. FIrst to satisfy my quick and dirty needs, I find that the following works well to get data displayed in a data grid field: on mouseUp put field data into tData --Tab delimited text --The first line of tData contains the column names put line 1 of tData into tHeaders replace tab with cr in tHeaders set dgProp[Columns] of group DataGrid to tHeaders --Thanks to Andre for this line. set the dgText [ true ] of group DataGrid to tData end mouseUp Your handler above, confirmed by Trevoir, helped me a lot to understand the possible uses of pFirstLineContainsHeaders. In order to learn more about data grid, I tried several variations, I put below in case it could interest someone : local tData,tHeaders, -- field data = lines of tab delimited text -- a Data Grid DataGrid with 3 columns -- 1 ) IF THE LINE OF HEADERS IS NOT INCLUDED IN THE DATA (AS I AM ACCUSTOMED TO) -- 1.1) WITHOUT USING pFirstLineContainsHeaders; WORKS: on mouseUp put header1 cr header2 cr header3 into tHeaders set the dgProp[columns] of grp DataGrid to tHeaders put fld data into tData set the dgText of group DataGrid to tData end mouseUp -- 1.2) USING pFirstLineContainsHeaders: USELESS BUT WORKS :-))) on mouseUp put header1 cr header2 cr header3 into tHeaders set the dgProp[columns] of grp DataGrid to tHeaders put fld data into tData set the dgText[false] of group DataGrid to tData end mouseUp -- 2) IF, FOR SOME REASON, THE LINE OF HEADERS IS INCLUDED IN THE DATA (FIRST LINE) -- 2.1) WITHOUT USING pFirstLineContainsHeaders: WORKS: on mouseUp put field data into tData put line 1 of tData into tHeaders replace tab with cr in tHeaders set dgProp[Columns] of group DataGrid to tHeaders delete line 1 of tData set the dgText of group DataGrid to tData end mouseUp -- 2.2) USING pFirstLineContainsHeaders: WORKS: on mouseUp -- the handler from Jim put field data into tData put line 1 of tData into tHeaders replace tab with cr in tHeaders set dgProp[Columns] of group DataGrid to tHeaders --Thanks to Andre for this line. set the dgText [ true ] of group DataGrid to tData end mouseUp - -- indeed, in all these handlers, it's possible to directly set the dgText of grp datagrid to fld data (but less fast, I guess, specially if it contains a lot of lines) -- AS FOR THE SYNTAX OF pFirstLineContainsHeaders OK: set the dgText[true] nevertheless: put true into pFirstLineContainsHeaders set the dgText[pFirstLineContainsHeaders] of grp datagrid to true works as well, but useless, OK :-) set the pFirstLineContainsHeaders of grp datagrid to true does not work as that is creating a custom prop; OK :-)) I am a bit slow-witted but I am beginning to understand quite what this pFirstLineContainsHeaders can do ;-o) Thanks to both of you, André ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Newbie Data Grid question
One bit of confusion for me is that there is no dgText property set visible here. The syntax probably a setprop handler. - Stephen Barncard San Francisco http://houseofcubes.com/disco.irev 2009/12/15 Jim Ault jimaultw...@yahoo.com One valuable technique for understanding the DataGrid inner workings. In Rev, choose the pointer tool, click on a data grid, then go the inspector, choose 'custom properties' from the drop down, and now check out the property sets. You should see dgProps and dgCache Note all the properties that have been created when the data grid was created. Of course you can edit the values here, but you can also change them in script lines. One bit of confusion for me is that there is no dgText property set visible here. The syntax set the dgText [ true ] of group DataGrid to tHeaders would logically mean that there would be a custom property set dgText Interesting if you click on dgProps row template you will see: group id 1011 of card id 1010 of stack Data Grid Templates 1260751174078 ...at least in my version of Rev 3.5 Hope this helps in your travels. Jim Ault Las Vegas On Dec 15, 2009, at 3:18 AM, Andre.Bisseret wrote: Bonjour Jim, Trevor and others on this thread ;-) Le 14 déc. 09 à 19:11, James Hurley a écrit : ... Trevor (and Andre.Bisseret), Thanks you for the very thoughtful reply(s). It is heartening to see something defended by its parent. My sincere apologies for treating your offspring in such a quick and dirty fashion :-) I'm sure I will appreciate the richness of this new Run Rev object in time--see below. FIrst to satisfy my quick and dirty needs, I find that the following works well to get data displayed in a data grid field: on mouseUp put field data into tData --Tab delimited text --The first line of tData contains the column names put line 1 of tData into tHeaders replace tab with cr in tHeaders set dgProp[Columns] of group DataGrid to tHeaders --Thanks to Andre for this line. set the dgText [ true ] of group DataGrid to tData end mouseUp Your handler above, confirmed by Trevoir, helped me a lot to understand the possible uses of pFirstLineContainsHeaders. In order to learn more about data grid, I tried several variations, I put below in case it could interest someone : local tData,tHeaders, -- field data = lines of tab delimited text -- a Data Grid DataGrid with 3 columns -- 1 ) IF THE LINE OF HEADERS IS NOT INCLUDED IN THE DATA (AS I AM ACCUSTOMED TO) -- 1.1) WITHOUT USING pFirstLineContainsHeaders; WORKS: on mouseUp put header1 cr header2 cr header3 into tHeaders set the dgProp[columns] of grp DataGrid to tHeaders put fld data into tData set the dgText of group DataGrid to tData end mouseUp -- 1.2) USING pFirstLineContainsHeaders: USELESS BUT WORKS :-))) on mouseUp put header1 cr header2 cr header3 into tHeaders set the dgProp[columns] of grp DataGrid to tHeaders put fld data into tData set the dgText[false] of group DataGrid to tData end mouseUp -- 2) IF, FOR SOME REASON, THE LINE OF HEADERS IS INCLUDED IN THE DATA (FIRST LINE) -- 2.1) WITHOUT USING pFirstLineContainsHeaders: WORKS: on mouseUp put field data into tData put line 1 of tData into tHeaders replace tab with cr in tHeaders set dgProp[Columns] of group DataGrid to tHeaders delete line 1 of tData set the dgText of group DataGrid to tData end mouseUp -- 2.2) USING pFirstLineContainsHeaders: WORKS: on mouseUp -- the handler from Jim put field data into tData put line 1 of tData into tHeaders replace tab with cr in tHeaders set dgProp[Columns] of group DataGrid to tHeaders --Thanks to Andre for this line. set the dgText [ true ] of group DataGrid to tData end mouseUp - -- indeed, in all these handlers, it's possible to directly set the dgText of grp datagrid to fld data (but less fast, I guess, specially if it contains a lot of lines) -- AS FOR THE SYNTAX OF pFirstLineContainsHeaders OK: set the dgText[true] nevertheless: put true into pFirstLineContainsHeaders set the dgText[pFirstLineContainsHeaders] of grp datagrid to true works as well, but useless, OK :-) set the pFirstLineContainsHeaders of grp datagrid to true does not work as that is creating a custom prop; OK :-)) I am a bit slow-witted but I am beginning to understand quite what this pFirstLineContainsHeaders can do ;-o) Thanks to both of you, André ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this
Re: Newbie Data Grid question
Message: 2 Date: Mon, 14 Dec 2009 13:19:43 -0500 From: Trevor DeVore li...@mangomultimedia.com Subject: Re: Newbie Data Grid question To: How to use Revolution use-revolution@lists.runrev.com Message-ID: 2489afec-40f1-4057-88dd-e8fa53559...@mangomultimedia.com Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes On Dec 14, 2009, at 1:11 PM, James Hurley wrote: It is heartening to see something defended by its parent. My sincere apologies for treating your offspring in such a quick and dirty fashion :-) It's okay, the Data Grid likes to be beta up on once and a while :-) As long as this is still in Beta, may I make a suggestion? (Does anyone ever let the possibility of the answer be no stop them?) I had assumed when I saw the following code in the guide: put field data into tData put true into pFirstLineContainsHeaders set the dgText [ pFirstLineContainsHeaders ] of group DataGrid 2 to tData I assumed that the data grid would function in much the same way that FileMaker does when importing an Excel file, i.e. it allows one to assign the items in the first line of the file to field names and the rest of the llines to populate these fields. That would be a reasonable behavior of dgText[pFirstLineContainsHeaders] il.e. when the parameter is true, the column headings are taken from the first line of the text field and the rest go into filling the columns. Or maybe introduce a second parameter to dgText . Jim Hurley ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Newbie Data Grid question
On Dec 16, 2009, at 12:04 AM, James Hurley wrote: It's okay, the Data Grid likes to be beta up on once and a while :-) As long as this is still in Beta, may I make a suggestion? Sorry, that was supposed to be beat not beta. (Does anyone ever let the possibility of the answer be no stop them?) I had assumed when I saw the following code in the guide: put field data into tData put true into pFirstLineContainsHeaders set the dgText [ pFirstLineContainsHeaders ] of group DataGrid 2 to tData I assumed that the data grid would function in much the same way that FileMaker does when importing an Excel file, i.e. it allows one to assign the items in the first line of the file to field names and the rest of the llines to populate these fields. That would be a reasonable behavior of dgText[pFirstLineContainsHeaders] il.e. when the parameter is true, the column headings are taken from the first line of the text field and the rest go into filling the columns. The first line is only used to tell the data grid which columns to map the rest of the data to. If you want to create columns then you will need to set the dgProp[columns] property. You can't really use multiple parameters when using setProp (which is what dgText is). I'm kind of fudging things a bit by treating dgText as a custom property set and pFirstLineContainsHeaders as the custom property. The truth is we still don't have access to a very expressive syntax when creating custom controls (which the Data Grid is one). -- Trevor DeVore Blue Mango Learning Systems ScreenSteps: http://www.screensteps.com Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Newbie Data Grid question
Le 13 déc. 09 à 22:10, James Hurley a écrit : Bonjour, Le 13 déc. 09 à 19:53, James Hurley a écrit : I am just getting into data grid fields and can't find first base. I can't find anything on data grids in the Dictionary. Is this coming? You could download the manual at : http://lessons.runrev.com/spaces/lessons/manuals/datagrid/lessons/7309-How-Do-I-Populate-a-Data-Grid-With-Data- Following the tutorial I tried the following: put field data into tData --This is a tab delimited text field with the first line being the column names put true into pFirstLineContainsHeaders try set the pFirstLineContainsHeaders to true set the dgText [ pFirstLineContainsHeaders ] of group DataGrid 2 to tData This does nothing. In the chapter How do I populate a data grid with Data ? one found this : Note that if pFirstLineContainsHeaders is true then the columns must already exist in your data grid table in order to be displayed. Does your columns already exist ? Thanks Andre, Yes the columns already exist. If I set pFirstLineContainsHeaders to false, the field is populated with data but the columns are set to Col 1, Col 2 etc. If I then set set pFirstLineContainsHeaders to true (with the columns already set to Col 1, Col 2, etc.) the columns remain unchanged but the body of the text is empty. I did download the Manual. That is where I got this information from. Very perverse. Jim Hurley Bonjour Jim, Your are right ; I just made a new stack with a data grid dGrid and a field source created the columns manually in the inspector (col 1, col 2 etc) In the field, the first tab delimited line includes the names for the columns. Then set the pFirstLineContainsHeaders of grp dGrid to true -- or, yes, put true into pFirstLineContainsHeaders as well put fld source into tData set the dgText [pFirstLineContainsHeaders] of group Dgrid to tData does not work as expected : the columns names keep being Col 1, Col 2 etc and the first line of tData keeps being the first line of Dgrid :-(( Did not notice that before, as up to now, I did not use pFirstLineContainsHeaders, I manually create the columns names and labels (an habit from the beginning of the dataGrid I guess!!) Sorry, I don't know what we are missing! Sure Trevor will help soon ;-))) Best regards from Grenoble André ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Newbie Data Grid question
Bonjour (again :-) Jim, Waiting for an answer from Trevor about the mystery of pFirstLineContainsHeaders ;-)) the following is a possible substitute : put name cr color cr shape into myHeaders set the dgProp[columns] of grp Dgrid to myHeaders -- set the column names ##or set the dgProp[column labels] of group DGrid to myHeaders -- set he column labels put fld source into tData set the dgText of group Dgrid to tData Best regards from Grenoble André ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Newbie Data Grid question
On Dec 13, 2009, at 4:10 PM, James Hurley wrote: Yes the columns already exist. If I set pFirstLineContainsHeaders to false, the field is populated with data but the columns are set to Col 1, Col 2 etc. If I then set set pFirstLineContainsHeaders to true (with the columns already set to Col 1, Col 2, etc.) the columns remain unchanged but the body of the text is empty. The most likely cause is that you don't have a column labeled with Col 1 or Col 2 in the first line of the data. Therefore the data you are setting is not mapping to an existing column in the Data Grid. Data Grid's do not behave like fields in that you can just swap text in and out randomly. You should be defining the columns (using the Property Inspector or by setting the dgData[columns] property) and then assigning data to the Data Grid that explicitly states which column data goes into. The reason for this is that Data Grid columns are objects in and of themselves. They have properties that are set independently. If you want to wipe them all out at once then you first create the columns, set the column properties and then assign the data. As a side note the fact that dgText automatically creates columns for you is unfortunate in my opinion. This behavior was requested so that someone could just set the text of the Data Grid and see instant results. While that may be beneficial for instant gratification I think it just causes more confusion then anything in the end. The Data Grid isn't meant to be a quick and dirty means of displaying data but rather a means of displaying data with lots of control over the visual elements used to display that data. -- Trevor DeVore Blue Mango Learning Systems ScreenSteps: http://www.screensteps.com Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Newbie Data Grid question
On Dec 14, 2009, at 5:11 AM, Andre.Bisseret wrote: Your are right ; I just made a new stack with a data grid dGrid and a field source created the columns manually in the inspector (col 1, col 2 etc) In the field, the first tab delimited line includes the names for the columns. Then set the pFirstLineContainsHeaders of grp dGrid to true -- or, yes, put true into pFirstLineContainsHeaders as well put fld source into tData set the dgText [pFirstLineContainsHeaders] of group Dgrid to tData does not work as expected : the columns names keep being Col 1, Col 2 etc and the first line of tData keeps being the first line of Dgrid :-(( The syntax isn't correct in this example. It should be: set the dgText[true] of group Dgrid to tData I just tested to verify that using the correct syntax does work - and it does :-) -- Trevor DeVore Blue Mango Learning Systems ScreenSteps: http://www.screensteps.com Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Newbie Data Grid question
Bonjour Trevor, Le 14 déc. 09 à 15:02, Trevor DeVore a écrit : On Dec 14, 2009, at 5:11 AM, Andre.Bisseret wrote: Your are right ; I just made a new stack with a data grid dGrid and a field source created the columns manually in the inspector (col 1, col 2 etc) In the field, the first tab delimited line includes the names for the columns. Then set the pFirstLineContainsHeaders of grp dGrid to true -- or, yes, put true into pFirstLineContainsHeaders as well put fld source into tData set the dgText [pFirstLineContainsHeaders] of group Dgrid to tData does not work as expected : the columns names keep being Col 1, Col 2 etc and the first line of tData keeps being the first line of Dgrid :-(( The syntax isn't correct in this example. It should be: set the dgText[true] of group Dgrid to tData I just tested to verify that using the correct syntax does work - and it does :-) I just tried this syntax but without success! Here, --- set the pFirstLineContainsHeaders of grp Dgrid to true put fld source into tData set the dgText[pFirstLineContainsHeaders] of group Dgrid to tData is working except that I don't get Col 1, Col 2 etc replaced by the first line of tData I get the feeling that I am missing somethins else In your previous post (answer to Jim) you said : The most likely cause is that you don't have a column labeled with Col 1 or Col 2 in the first line of the data. Therefore the data you are setting is not mapping to an existing column in the Data Grid. Does it mean that the first line of tData should be Col 1 tab Col 2 etc I tried that, and actually, the data grid is filled in but is keeping the generic names (Col 1, Col 2 etc) But then what about this phrase in the doc : … by passing in true for pFirstLineContainsHeaders. If true then the data grid will extract the first line of pText and use the values for the internal key/column names … I thought it was meaning that In tData I had to put in the first line, the names that I would like instead of Col 1, Col 2 etc. Up to now, I dont use pFirstLineContainsHeaders ; I set first the dgData[columns] and dgData[column labels]. But always happy to better understand about Data Grid (here about how this pFirstLineContainsHeaders works; seems I am making a bad interpretation of the manual. Thanks Trevor for your always helping advices; I keep appreciating Data Grid a lot; in a couple of app. I have several ones which are running very nicely :-)) Best regards from Grenoble André ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Newbie Data Grid question
On Dec 14, 2009, at 12:03 PM, Andre.Bisseret wrote: The syntax isn't correct in this example. It should be: set the dgText[true] of group Dgrid to tData I just tested to verify that using the correct syntax does work - and it does :-) I just tried this syntax but without success! Here, --- set the pFirstLineContainsHeaders of grp Dgrid to true pFirstLineContainsHeaders isn't a property in and of itself. It is a parameter you pass in when setting the dgText property. Try this: put true into pFirstLineContainsHeaders set the dgText[pFirstLineContainsHeaders] of group Dgrid to tData Thanks Trevor for your always helping advices; I keep appreciating Data Grid a lot; in a couple of app. I have several ones which are running very nicely :-)) I'm glad you find it useful. -- Trevor DeVore Blue Mango Learning Systems ScreenSteps: http://www.screensteps.com Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Newbie Data Grid question
Message: 27 Date: Mon, 14 Dec 2009 08:58:13 -0500 From: Trevor DeVore li...@mangomultimedia.com Subject: Re: Newbie Data Grid question To: How to use Revolution use-revolution@lists.runrev.com Message-ID: 4392d851-15e4-48f7-83fb-d04224a70...@mangomultimedia.com Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes On Dec 13, 2009, at 4:10 PM, James Hurley wrote: Yes the columns already exist. If I set pFirstLineContainsHeaders to false, the field is populated with data but the columns are set to Col 1, Col 2 etc. If I then set set pFirstLineContainsHeaders to true (with the columns already set to Col 1, Col 2, etc.) the columns remain unchanged but the body of the text is empty. The most likely cause is that you don't have a column labeled with Col 1 or Col 2 in the first line of the data. Therefore the data you are setting is not mapping to an existing column in the Data Grid. Data Grid's do not behave like fields in that you can just swap text in and out randomly. You should be defining the columns (using the Property Inspector or by setting the dgData[columns] property) and then assigning data to the Data Grid that explicitly states which column data goes into. The reason for this is that Data Grid columns are objects in and of themselves. They have properties that are set independently. If you want to wipe them all out at once then you first create the columns, set the column properties and then assign the data. As a side note the fact that dgText automatically creates columns for you is unfortunate in my opinion. This behavior was requested so that someone could just set the text of the Data Grid and see instant results. While that may be beneficial for instant gratification I think it just causes more confusion then anything in the end. The Data Grid isn't meant to be a quick and dirty means of displaying data but rather a means of displaying data with lots of control over the visual elements used to display that data. -- Trevor DeVore Blue Mango Learning Systems ScreenSteps: http://www.screensteps.com Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com Trevor (and Andre.Bisseret), Thanks you for the very thoughtful reply(s). It is heartening to see something defended by its parent. My sincere apologies for treating your offspring in such a quick and dirty fashion :-) I'm sure I will appreciate the richness of this new Run Rev object in time--see below. FIrst to satisfy my quick and dirty needs, I find that the following works well to get data displayed in a data grid field: on mouseUp put field data into tData --Tab delimited text --The first line of tData contains the column names put line 1 of tData into tHeaders replace tab with cr in tHeaders set dgProp[Columns] of group DataGrid to tHeaders --Thanks to Andre for this line. set the dgText [ true ] of group DataGrid to tData end mouseUp Now to reinforce your point about the richness of this more complex object: In another context, I would like to be able to click on the first column header and have it sort the grid by the LAST word of each in the first column. Is it possible to access (and modify) the script that the column headers runs? Thanks again for nursing us through the infancy of data grids. Jim Hurley ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Newbie Data Grid question
On Dec 14, 2009, at 1:11 PM, James Hurley wrote: It is heartening to see something defended by its parent. My sincere apologies for treating your offspring in such a quick and dirty fashion :-) It's okay, the Data Grid likes to be beta up on once and a while :-) The Data Grid is such a big departure from the other controls in Revolution that it can be tricky to get your head around it. The, shall we say, less than x-talk syntax you have to use doesn't help. FIrst to satisfy my quick and dirty needs, I find that the following works well to get data displayed in a data grid field: on mouseUp put field data into tData --Tab delimited text --The first line of tData contains the column names put line 1 of tData into tHeaders replace tab with cr in tHeaders set dgProp[Columns] of group DataGrid to tHeaders --Thanks to Andre for this line. set the dgText [ true ] of group DataGrid to tData end mouseUp Yes, that is the way to approach it with a Data Grid. I should probably add that to a lesson somewhere... Now to reinforce your point about the richness of this more complex object: In another context, I would like to be able to click on the first column header and have it sort the grid by the LAST word of each in the first column. Is it possible to access (and modify) the script that the column headers runs? Take a look at this lesson: How Do I Customize or Disable Column Sorting?: http://lessons.runrev.com/spaces/lessons/manuals/datagrid/lessons/7330-How-Do-I-Customize-or-Disable-Column-Sorting- Thanks again for nursing us through the infancy of data grids. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Newbie Data Grid question
I noticed that the column headings aren't automatically set when you load the datagrid with data. I manually set the column names and then when I loaded the data in (using a different method with ) I put in the column headings exactly as I had manually named them. It turned out that later, when taking data out of the datagrid, I did it using those column headings. I was surprised that when you load the data grid it doesn't change the column headings. But it works perfectly otherwise. On Sun, Dec 13, 2009 at 2:53 PM, James Hurley jhurley0...@sbcglobal.netwrote: I am just getting into data grid fields and can't find first base. I can't find anything on data grids in the Dictionary. Is this coming? Following the tutorial I tried the following: put field data into tData --This is a tab delimited text field with the first line being the column names put true into pFirstLineContainsHeaders set the dgText [ pFirstLineContainsHeaders ] of group DataGrid 2 to tData This does nothing. But if I put False into pFirstLineContainsHeaders the field is filled with tData but the columns are Col 1, Col 2, etc. What am I missing? Jim Hurley ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution -- http://www.bluewatermaritime.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Newbie Data Grid question
Bonjour, Le 13 déc. 09 à 19:53, James Hurley a écrit : I am just getting into data grid fields and can't find first base. I can't find anything on data grids in the Dictionary. Is this coming? You could download the manual at : http://lessons.runrev.com/spaces/lessons/manuals/datagrid/lessons/7309-How-Do-I-Populate-a-Data-Grid-With-Data- Following the tutorial I tried the following: put field data into tData --This is a tab delimited text field with the first line being the column names put true into pFirstLineContainsHeaders try set the pFirstLineContainsHeaders to true set the dgText [ pFirstLineContainsHeaders ] of group DataGrid 2 to tData This does nothing. In the chapter How do I populate a data grid with Data ? one found this : Note that if pFirstLineContainsHeaders is true then the columns must already exist in your data grid table in order to be displayed. Does your columns already exist ? But if I put False into pFirstLineContainsHeaders the field is filled with tData but the columns are Col 1, Col 2, etc. What am I missing? HTH Best regards from Grenoble André ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Newbie Data Grid question
Bonjour, Le 13 déc. 09 à 19:53, James Hurley a écrit : I am just getting into data grid fields and can't find first base. I can't find anything on data grids in the Dictionary. Is this coming? You could download the manual at : http://lessons.runrev.com/spaces/lessons/manuals/datagrid/lessons/7309-How-Do-I-Populate-a-Data-Grid-With-Data- Following the tutorial I tried the following: put field data into tData --This is a tab delimited text field with the first line being the column names put true into pFirstLineContainsHeaders try set the pFirstLineContainsHeaders to true set the dgText [ pFirstLineContainsHeaders ] of group DataGrid 2 to tData This does nothing. In the chapter How do I populate a data grid with Data ? one found this : Note that if pFirstLineContainsHeaders is true then the columns must already exist in your data grid table in order to be displayed. Does your columns already exist ? Thanks Andre, Yes the columns already exist. If I set pFirstLineContainsHeaders to false, the field is populated with data but the columns are set to Col 1, Col 2 etc. If I then set set pFirstLineContainsHeaders to true (with the columns already set to Col 1, Col 2, etc.) the columns remain unchanged but the body of the text is empty. I did download the Manual. That is where I got this information from. Very perverse. Jim Hurley But if I put False into pFirstLineContainsHeaders the field is filled with tData but the columns are Col 1, Col 2, etc. What am I missing? HTH Best regards from Grenoble André ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution