Groups adding objects scripting

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, asayd

Post Reply
chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Groups adding objects scripting

Post by chris25 » Thu Oct 17, 2013 4:43 pm

I am finding dealing with 'Groups' an utter nightmare! It should have been one of the easiest things to master since it so common in other software products, but it seems so un-intuitive and complicated. The beginners PDF gives away nothing about this except a paragraph on selecting the objects and nested objects and how to select them. Well that I found out without the pdf, It's what it does not say that I would very much appreciate to learn, and no It is not in livecodes LCU either.

You have these controls:
ungroup / group
'Group selected' under Object menu
'Select grouped' in the toolbar
'Select grouped controls' under Edit menu

Having spent the best part of an afternoon playing around with these controls I am no closer to understanding what on earth is really going on. On top of all this; I added a small image to a 'group'; this group has a handler, neither of the objects within the group had their own handlers, the group controlled the handler, not being able to find this script was one thing - though actually I found it once, then I lost it and have no idea how I found it in the first place :roll: ; BUT THEN when I added the image to the group after about 30 minutes, and believed that I had grouped it, clicking this image did not invoke any handler even though it is WITHIN the group, I would have expected that once inside the group my added image would have come under the command of the group's handler, my logic seems misplaced here OR it is not a part of the group in which case this is where all those confusing drop down menu items and tool bar buttons come in. Looking up the most important items in livecode is becoming a task in itself and not one that yields much assistance I'm afraid. If I do not Ask questions I will never be able to learn, so if someone would be kind enough to help me out here I would once again appreciate this.

thankyou thankyou thankyou

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Groups adding objects scripting

Post by jacque » Thu Oct 17, 2013 6:50 pm

The first two in your list are the same thing. The second two in your list are the same thing. They are just different ways to access group controls. The script behavior you describe implies that the control didn't really get added to the group.

To create a group, select the objects and choose either of the first methods to group them. Be careful that one of the chosen objects is not a group itself; otherwise you'll create a group that contains another group.

To add a control to an existing group, either select it in the project or application browser, or toggle the "group selected" toolbar icon so that clicking on the group selects the entire group rather than its internal controls. Click the Edit Group icon in the toolbar or choose it from the Object menu.

The group you are editing will be temporarily displayed on a blank card. The rest of the card content will disappear. Create or paste in the object you want in the group. When you're done, click Edit Group again to toggle off editing. The original card contents will re-display.

Aside from adding controls to a group, you can do all other actions without going into group editing mode. If Select Grouped Objects is active, you can select, delete, duplicate, resize, move, etc. any control in a group.

All this is covered in the User Guide, which should be your first point of reference at this stage. You can open the User Guide from within the Resources stack (toolbar icon.) A PDF will open. I entered "edit group" into the PDF search box and found all the above answers, so that's a good place to start any query. Basic rule of thumb: if your question is about the IDE, check the User Guide. If your question is about how a particular LiveCode term works, check the dictionary.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Re: Groups adding objects scripting

Post by chris25 » Thu Oct 17, 2013 10:26 pm

Jacque, I appreciate your reply, and thankyou. Permit me to add, that while I am reading the PDF through from start to finnish, (it may take me a week but I am determined to do this), I have to say that I do not know where you are viewing your PDF. Allow me to elaborate, because this situation has bugged me from day one. Below is a selection I was reading 30 minutes ago:
================
Object Library Displays the Object Library window, which stores pre-scripted
objects you can copy into the current stack for use.
Image Library Displays the Image Library window, which displays images
you can either reference or copy into the current stack for use.
You can use the Image Library to show all the icons and
cursors that come with LiveCode, all the images in the current
stack, or image libraries that you create. For more details, see
the section on the Object & Image Library.
================
I immediately typed in to the search: object and image library" in order to read further, it returned no results. So I typed in Image library, it returned no results. So I typed in Image and it returned many results, but not where I wanted to go. I typed in Library, it just took me back to this very paragraph and no where else. So I tried an index, but there is none, so I tried looking through the contents list at the beginning of the pdf, well if it is there I could not find it, my eyes were getting very tired at the fast scanning.

Tis is by way of explanation, if you have another method of searching then please tell me, I am using the full version Adobe Acrobat that comes with my creative suite, so I can not do better than this.

HAving said this, thankyou for your reply, Oh, and I typed in "Edit groups" as you did, I got no results. So goodness knows what is going on. :(
Have a nice day
Kind regards
Chris

My confusion with the groups thing stemmed from the syntax, the language if you like, I was in illustrator/photoshop mode and realised I needed to re-translate livecodes definitions here, so that was my fault. And I feel awful about kicking up such a darn fuss, I think I need to slow down because my brain runs miles ahead thinking step two while still working on step one, again that is the way I work in creative suite, and so I need to take things very very much slower in livecode. So I guess learning how to learn again seems to be the key here, and that is not an easy adjustment for someone who is not young, (and don't take that to mean too old either :) .

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Groups adding objects scripting

Post by Simon » Thu Oct 17, 2013 10:37 pm

Hi Chris,

3.1.6 The Development Menu

That's the section you copied
"Object Library Displays the Object Library window, which stores pre-scripted
objects you can copy into the current stack for use."
from.

It is referring to the menubar of the IDE. Development > Object Library.
It's not in the User Guide :)

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Groups adding objects scripting

Post by jacque » Thu Oct 17, 2013 11:15 pm

I'm on a Mac, so when I open the User Guide it opens in Preview automatically. There would seem to be a difference in search results between that and the Adobe app you're using. When I search for "edit groups" I get 5 results, and if I omit the trailing "s" and use "edit group" I get 12 results. In both cases, the chapter dealing with the stuff I explained is in the results.

It sounds like Acrobat's search routines aren't so great. Do you have anything other than Acrobat to read PDFs? What OS are you using?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Groups adding objects scripting

Post by jacque » Thu Oct 17, 2013 11:18 pm

Simon wrote:It is referring to the menubar of the IDE. Development > Object Library.
It's not in the User Guide :)
Simon
It's in my copy.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Groups adding objects scripting

Post by Simon » Fri Oct 18, 2013 12:14 am

Hi Jacque,
I think I see the difference.
Preview finds result that are on the same page, so Edit and Groups are on page 38 but not "Edit Groups" (try it with the quotes).

Reader automatically places quotes around the search so it is looking for the string "Edit Groups" which it does not find.

And yes, "Object Library" is in the user guide, but I thought the question was about where to find these things.

Now on second reading "For more details, see the section on the Object & Image Library."
There should be a section heading called Object & Image Library in the user guide, but there isn't. Now I can see that as confusing.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Groups adding objects scripting

Post by jacque » Fri Oct 18, 2013 12:25 am

Okay, I see now. You're right, Simon. With "edit group" (using quotes) I get two results. "Edit groups" has no results. So people using Acrobat will have a tougher time.

The User Guide needs an update, it's true. Even though the info in there is still pretty much correct, it could use an overhaul. I was talking to the team about that and they know it; the problem is, since a lot will need to be rewritten after the big engine and IDE rewrite, it's not a top priority yet.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Re: Groups adding objects scripting

Post by chris25 » Fri Oct 18, 2013 8:14 am

====I am using the full version Adobe Acrobat that comes with my creative suite, so I can not do better than this.===
"Spoken in haste"
I'll break the link between my acrobat and its command to open automatically, then set the viewer as default.

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Re: Groups adding objects scripting

Post by chris25 » Fri Oct 18, 2013 10:19 am

All I can say is - Wow! with a double sized exclamation mark - this I would not have expected from adobe PDF - it's pretty bad. I opened with Apple's own pdf preview command and typed in my familiar searches and received a very accurate index of returns. I wonder why this happens then?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Groups adding objects scripting

Post by jacque » Fri Oct 18, 2013 6:07 pm

Chris, great! Now you should see a much lower frustration level. :) There's a wealth of info in the user guide if you can only find it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

chris25
Posts: 354
Joined: Tue Oct 08, 2013 9:32 pm

Re: Groups adding objects scripting

Post by chris25 » Fri Oct 18, 2013 7:29 pm

Jacque, Yes I know, sometimes though I wish for a little more elaboration, so thnak goodness for Wiki encyclopedia otherwise I would be lost. For example, I was reading about the four different window types: toplevel, modal modeless and palette, well palette and toplevel were pretty straightforward but modal and modeless kept me running around for 10 minutes so I looked up in wiki encyclopedia and only wished their explanation were in the users guide - so straightforward. nevermind.

Post Reply

Return to “LiveCode University”