Re: How to develop and deploy with ListMagic within the GLX application framework?
On Mon, Mar 7, 2011 at 11:55 AM, Keith Clarke keith.cla...@clarkeandclarke.co.uk wrote: Hi Keith, Great lesson - I have a checkbox in a cell. I did have to divert from your lesson slightly. So, below are the additional steps that I took - just in case you want to update your lesson for the following scenario... I wanted a row 'Select' column of (just) checkboxes, centrally aligned under the Select column heading. To: 1. Hide the checkbox name, clear the checkbox control's Basic Properties 'Show name' checkbox 2. Align the checkbox centrally within the column's cell, simply drag the checkbox control around in the DGH Column Builder's 'Column Content' view - to over the middle of the underlying _ColumnData_ control, as shown here http://dl.dropbox.com/u/1909531/checkbox%20in%20DGH%20cell.png It works, though I'm not sure if it's best practice?!? You are right. By keeping the _ColumnData_ field you will be able to center the checkbox by hand in the column. When the column has not this field, the check box is drawn on the left of the column. So it is the best way to come if you not want to script the position of the button in the layoutControl handler of the column script. I'm going to update the lesson according to your observation. Thanks! BTW For this list, I want these Row-Select checkboxes to be mutually-exclusive - so that if one is set to true, those in all other rows are cleared. Where should I place such a script - against the _ColumnData_ object or the data grid group level? Best, Keith.. Best, -- -Zryip TheSlug- wish you the best! 8) http://www.aslugontheroad.co.cc ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to develop and deploy with ListMagic within the GLX application framework?
Hi Zryip, Great lesson - I have a checkbox in a cell. I did have to divert from your lesson slightly. So, below are the additional steps that I took - just in case you want to update your lesson for the following scenario... I wanted a row 'Select' column of (just) checkboxes, centrally aligned under the Select column heading. To: 1. Hide the checkbox name, clear the checkbox control's Basic Properties 'Show name' checkbox 2. Align the checkbox centrally within the column's cell, simply drag the checkbox control around in the DGH Column Builder's 'Column Content' view - to over the middle of the underlying _ColumnData_ control, as shown here http://dl.dropbox.com/u/1909531/checkbox%20in%20DGH%20cell.png It works, though I'm not sure if it's best practice?!? BTW For this list, I want these Row-Select checkboxes to be mutually-exclusive - so that if one is set to true, those in all other rows are cleared. Where should I place such a script - against the _ColumnData_ object or the data grid group level? Best, Keith.. On 7 Mar 2011, at 07:46, Keith Clarke wrote: Don't go thinking that this has exhausted my list of questions on DG/DGH though! ;-) ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to develop and deploy with ListMagic within the GLX application framework?
I have to chime in here too. I love listMagic but it isn't compatible with Remo. The library for listMagic freezes a quit from your app when your running Remo. The only real solution would be for the listMagic folks to release it's library unlocked (probably not ever happen) so I'm gradually replacing all my listMagic objects with datagrids too and I recommend the same for everyone. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to develop and deploy with ListMagic within the GLX application framework?
Hi Keith, You might want to consider another approach than checkboxes in this situation, depending on what you want to do with the checked row. If you just want to carry out some processing on the data in the selected row, you can use the dghilitedline property of the datagrid to find out which row the user has clicked on and take whatever action you want. Make sure the multiple lines property for the datagrid is not selected and use the selectionChanged event to check the dghilitedline. If there are multiple things you might want to do with the selected row, use a popup menu activated by a right click (more complicated). Pete Haworth On Mar 7, 2011, at 2:55 AM, Keith Clarke wrote: BTW For this list, I want these Row-Select checkboxes to be mutually-exclusive - so that if one is set to true, those in all other rows are cleared. Where should I place such a script - against the _ColumnData_ object or the data grid group level? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to develop and deploy with ListMagic within the GLX application framework?
Hi Peter, Thanks for the tip and for reframing the problem to provide mutually exclusive row selection, without the complexity of dealing with the checkbox. Nice! :-) Best, Keith.. On 7 Mar 2011, at 16:22, Peter Haworth wrote: Hi Keith, You might want to consider another approach than checkboxes in this situation, depending on what you want to do with the checked row. If you just want to carry out some processing on the data in the selected row, you can use the dghilitedline property of the datagrid to find out which row the user has clicked on and take whatever action you want. Make sure the multiple lines property for the datagrid is not selected and use the selectionChanged event to check the dghilitedline. If there are multiple things you might want to do with the selected row, use a popup menu activated by a right click (more complicated). Pete Haworth On Mar 7, 2011, at 2:55 AM, Keith Clarke wrote: BTW For this list, I want these Row-Select checkboxes to be mutually-exclusive - so that if one is set to true, those in all other rows are cleared. Where should I place such a script - against the _ColumnData_ object or the data grid group level? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to develop and deploy with ListMagic within the GLX application framework?
You read my mind, Sir. I was just defining the pair of buttons under the simplified data grid as your post popped into my inbox! :-) On 7 Mar 2011, at 16:45, Peter Haworth wrote: No problem Keith. Also saw your other post about a button in the datagrid. Once again, it might be worth considering a combination of the dghilitedline and one button outside the datagrid that would launch your processing of the currently selected datagrid row. I have some code I use that floats a button next to whatever row the user clicks on so it's right next to their selected line, but a static button works too.. Hope that helps. Pete Haworth ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to develop and deploy with ListMagic within the GLX application framework?
I believe you will need to use form style datagrids then, I'm sure you know. I have no experience in those, but at some point I will want to jump in because the notion of checkboxes in a table are very appealing to what I am going to be doing later on. Bob On Mar 5, 2011, at 12:35 AM, Keith Clarke wrote: ...thanks Bob - very useful stuff - and I'll definitely be referencing this as I work through the lessons again and DGH documentation. However, before I get to manipulating data, I need to learn how to use non-data UI elements within data grids - to replicate ListMagic's row-select checkboxes. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to develop and deploy with ListMagic within the GLX application framework?
On Sat, Mar 5, 2011 at 9:35 AM, Keith Clarke keith.cla...@clarkeandclarke.co.uk wrote: ...thanks Bob - very useful stuff - and I'll definitely be referencing this as I work through the lessons again and DGH documentation. However, before I get to manipulating data, I need to learn how to use non-data UI elements within data grids - to replicate ListMagic's row-select checkboxes. Hi Keith, It was the good occasion to write our first lesson presenting how to create a checkbox in a data grid using the DGH plugin: http://lessons.runrev.com/spaces/lessons/manuals/3060/lessons/28472-How-Do-I-Create-a-Checkbox-in-a-Column- Best regards, -- -Zryip TheSlug- wish you the best! 8) http://www.aslugontheroad.co.cc ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to develop and deploy with ListMagic within the GLX application framework?
Hi Zryip, Thanks for the lesson - very timely! And you have anticipated my follow-up question which was to be how to embed a button within a row - brilliant! Don't go thinking that this has exhausted my list of questions on DG/DGH though! ;-) Best, Keith.. On 6 Mar 2011, at 22:53, zryip theSlug wrote: It was the good occasion to write our first lesson presenting how to create a checkbox in a data grid using the DGH plugin: http://lessons.runrev.com/spaces/lessons/manuals/3060/lessons/28472-How-Do-I-Create-a-Checkbox-in-a-Column- Best regards, -- -Zryip TheSlug- wish you the best! 8) http://www.aslugontheroad.co.cc ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to develop and deploy with ListMagic within the GLX application framework?
...thanks Bob - very useful stuff - and I'll definitely be referencing this as I work through the lessons again and DGH documentation. However, before I get to manipulating data, I need to learn how to use non-data UI elements within data grids - to replicate ListMagic's row-select checkboxes. On 4 Mar 2011, at 18:24, Bob Sneidar wrote: What really helped me take hold of the reigns of datagrids is the notion of getting the index (or line) of a data control, getting the array associated with that line, altering the array, and then setting the array in the datagrid when I was done. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: How to develop and deploy with ListMagic within the GLX application framework?
Hi Trevor, Thanks for confirming that this behaviour is not coming from the GLX framework. Maybe it's time to bite the bullet and replace my simple ListMagic controls with data grids - and learn how to drive them and DGH properly! ;-) On 4 Mar 2011, at 15:25, Trevor DeVore wrote: The framework never tries to visually open (using 'go stack') any stacks that you add to it. It only loads the stack files into memory by executing the following code: if there is a stack PATH_TO_STACK_FILE... If a stack file is marked as being a library then the framework will also issue the start using command for the stack and substacks in the stack file. There must be some code somewhere else that is opening the window (either in the ListMagic code or your 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
Re: How to develop and deploy with ListMagic within the GLX application framework?
What really helped me take hold of the reigns of datagrids is the notion of getting the index (or line) of a data control, getting the array associated with that line, altering the array, and then setting the array in the datagrid when I was done. This process is actually quite simple. Lets say a user clicked on a line in a table form and you want to process it somehow. Consider the following: put the dgHilitedIndex of group myDataGrid into theIndexNumber -- a number referencing the row array if theIndexNumber is empty then -- nothing selected exit mouseUp end if put the dgDataOfIndex[theIndexNumber] of group myDataGrid into aMyData -- an array put aMyData[column1] into theFirstValue -- a value. column1 is the actual name of your column. put aMyData[column2] into theSecondValue put aMyData[column3] into theThirdValue Now go do some stuff with the data, and when you are done: put theFirstValue aMyData[column1] into aMyData[column1] put theSecondValue aMyData[column2] into aMyData[column2] put theThirdValue aMyData[column3] into aMyData[column3] set the dgDataOfIndex[theIndexNumber] of group myDataGrid to aMyData -- update the row Sometimes it is easier to work with the data grid data as a chunk of text: put the dgtext [false] of group myDataGrid into theGridData -- tab/cr delimited list false means the first row does not contain the column names. In this mode it will simply use the position of the column as the index to the data in the column. If you use true, then the first line of your text needs to be the column names. This can be handy when you want to update only certain columns but leave the others intact. When done processing: set the dgtext [false] of group myDataGrid to theGridData -- put the data back While the Datagrid tutorial and API is very useful, and I recommend it for the first time use of data grids, it doesn't actually list everything you can do with a datagrid. To see all the commands and functions available to the data grid, issue this command: edit the script of the behavior of group myDataGrid. Simple huh? What would be nice is if I could pass the column names off to dgText so that I only got the columns I wanted. The beauty is though, that I can copy the behavior scripts to a new button, set the behavior of the datagrid to that button, and then make it do things the way I want to. Bob On Mar 4, 2011, at 8:34 AM, Keith Clarke wrote: Hi Trevor, Thanks for confirming that this behaviour is not coming from the GLX framework. Maybe it's time to bite the bullet and replace my simple ListMagic controls with data grids - and learn how to drive them and DGH properly! ;-) ___ 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