Group command with an object list
Getting a run time error on command group tList. I'm constructing tList from the selectedObjects by replace return with and and making sure there isn't a trailing and at the end. The runtime error includes the contents of tList which look correct to me - long id of field 1 and long id of field 2. I can get round it by putting group at the start of tList then do tList but why doesn't this work? Pete lcSQL Software http://www.lcsql.com Home of lcStackBrowser http://www.lcsql.com/lcstackbrowser.html and SQLiteAdmin http://www.lcsql.com/sqliteadmin.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
Re: Group command with an object list
It seems that tList can't be long ids, or long names (as far as I can tell), but selectedobjects field field and button button will probably work, but there's an easier way. Save the list of selectedObjects however you currently do it, just exactly as it shows up from the selectedobjects (since it sounds like you are wanting to be able to group the objects later using code) Once that is done, to group them is easy. lock screen repeat for each line tLine in myData set the selected of tLine to true end repeat -- after this, all the objects you chose should be selected so then.. group -- since they're selected, it bypasses the need to feed it a properly formatted list unlock screen You might want to deselect the group that is created after the grouping since it will be selected with handles showing, but I think you can set the selected of the last group to false On Mon, Dec 29, 2014 at 3:56 PM, Peter Haworth p...@lcsql.com wrote: Getting a run time error on command group tList. I'm constructing tList from the selectedObjects by replace return with and and making sure there isn't a trailing and at the end. The runtime error includes the contents of tList which look correct to me - long id of field 1 and long id of field 2. I can get round it by putting group at the start of tList then do tList but why doesn't this work? Pete lcSQL Software http://www.lcsql.com Home of lcStackBrowser http://www.lcsql.com/lcstackbrowser.html and SQLiteAdmin http://www.lcsql.com/sqliteadmin.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 ___ 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: Group command with an object list
Wow, that should abeen selectedobjects returns long ids. English. One day I hope its my first language. On Mon, Dec 29, 2014 at 4:18 PM, Mike Bonner bonnm...@gmail.com wrote: It seems that tList can't be long ids, or long names (as far as I can tell), but selectedobjects field field and button button will probably work, but there's an easier way. Save the list of selectedObjects however you currently do it, just exactly as it shows up from the selectedobjects (since it sounds like you are wanting to be able to group the objects later using code) Once that is done, to group them is easy. lock screen repeat for each line tLine in myData set the selected of tLine to true end repeat -- after this, all the objects you chose should be selected so then.. group -- since they're selected, it bypasses the need to feed it a properly formatted list unlock screen You might want to deselect the group that is created after the grouping since it will be selected with handles showing, but I think you can set the selected of the last group to false On Mon, Dec 29, 2014 at 3:56 PM, Peter Haworth p...@lcsql.com wrote: Getting a run time error on command group tList. I'm constructing tList from the selectedObjects by replace return with and and making sure there isn't a trailing and at the end. The runtime error includes the contents of tList which look correct to me - long id of field 1 and long id of field 2. I can get round it by putting group at the start of tList then do tList but why doesn't this work? Pete lcSQL Software http://www.lcsql.com Home of lcStackBrowser http://www.lcsql.com/lcstackbrowser.html and SQLiteAdmin http://www.lcsql.com/sqliteadmin.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 ___ 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: Group command with an object list
Thanks Mike. Now you come to mention it, I think I came across this once before. Pete lcSQL Software http://www.lcsql.com Home of lcStackBrowser http://www.lcsql.com/lcstackbrowser.html and SQLiteAdmin http://www.lcsql.com/sqliteadmin.html On Mon, Dec 29, 2014 at 3:18 PM, Mike Bonner bonnm...@gmail.com wrote: It seems that tList can't be long ids, or long names (as far as I can tell), but selectedobjects field field and button button will probably work, but there's an easier way. Save the list of selectedObjects however you currently do it, just exactly as it shows up from the selectedobjects (since it sounds like you are wanting to be able to group the objects later using code) Once that is done, to group them is easy. lock screen repeat for each line tLine in myData set the selected of tLine to true end repeat -- after this, all the objects you chose should be selected so then.. group -- since they're selected, it bypasses the need to feed it a properly formatted list unlock screen You might want to deselect the group that is created after the grouping since it will be selected with handles showing, but I think you can set the selected of the last group to false On Mon, Dec 29, 2014 at 3:56 PM, Peter Haworth p...@lcsql.com wrote: Getting a run time error on command group tList. I'm constructing tList from the selectedObjects by replace return with and and making sure there isn't a trailing and at the end. The runtime error includes the contents of tList which look correct to me - long id of field 1 and long id of field 2. I can get round it by putting group at the start of tList then do tList but why doesn't this work? Pete lcSQL Software http://www.lcsql.com Home of lcStackBrowser http://www.lcsql.com/lcstackbrowser.html and SQLiteAdmin http://www.lcsql.com/sqliteadmin.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 ___ 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