Group command with an object list

Mike Bonner bonnmike at gmail.com
Mon Dec 29 18:58:26 EST 2014


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 <bonnmike at 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 <pete at 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 at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>



More information about the use-livecode mailing list