Simple Question: How to delete objects in a group?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Cheong
Posts: 30
Joined: Tue Oct 27, 2015 7:49 am

Re: Simple Question: How to delete objects in a group?

Post by Cheong » Mon Nov 02, 2015 3:37 am

Thanks for the quick replies people...

The solution I used for deleting the objects in a group is by using the code provided by MaxV.
The result is clean and simple.
Here is how I used his code:

Code: Select all

  put the number of controls of group "CCTVList" into temp
   repeat with i=1 to temp
      put the name of control i of group "CCTVList" after listContr
      put CR after listContr
   end repeat
   repeat for each line tLine in listContr
      if the last word of tLine is not (quote & "grElement" & quote) then 
      do "delete " & tLine & "of group CCTVList"
      end if
   end repeat

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Simple Question: How to delete objects in a group?

Post by MaxV » Wed Nov 04, 2015 6:01 pm

Image
and what I do is livecoding ... :lol: :lol: :lol:
(just for fun)
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Simple Question: How to delete objects in a group?

Post by Klaus » Wed Nov 04, 2015 6:09 pm

MaxV wrote:Image
and what I do is livecoding ... :lol: :lol: :lol:
(just for fun)
So are Livecoderine? :D

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Simple Question: How to delete objects in a group?

Post by MaxV » Wed Nov 04, 2015 6:29 pm

Good idea, just give some time to edit the image... :lol:
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

Cheong
Posts: 30
Joined: Tue Oct 27, 2015 7:49 am

Re: Simple Question: How to delete objects in a group?

Post by Cheong » Thu Nov 05, 2015 3:23 am

:D :D :D

Post Reply