objGroup - multiple object type grouping

Here is where the magnanimous folks that create externals post them (.zip archives only please).

objGroup - multiple object type grouping

Postby mrBean » Tue Mar 22, 2011 6:31 pm

XFcn objGroup:
I wrote this external because I hate writing scripts to move multiple objects around the screen. It can be daunting and very cumbersome task to do depending on what you are trying to get the objects to do. This wouldn’t be an issue if superCard had the ability to group objects, but since it can’t I figured out a way to fake it. So if you wanted the ability to group object in superCard then this objGroup is for you.

XCmd Parent
Parent external is similar objGroup, in that it allows the user to control more then one object at the same time. The difference between the two is that objGroup treats all the objects as equals, or to say, as a single object (a group). Where as parent controls multiple object by the influence of a single object, called the parent. The objects that are under the influence of the parent are called children. Because of this fundamental difference the parent external can do things that objGroup cannot do.

objGroup & Parent Sample Project.zip
Parent 1.1 — objGroup 1.5.5
Tested on OSX 10.6 sc472
(1.01 MiB) Downloaded 405 times
Last edited by mrBean on Thu May 31, 2012 7:52 pm, edited 6 times in total.
User avatar
mrBean
 
Posts: 89
Joined: Sat Jan 30, 2010 8:03 am
Location: New York

Re: objGroup - multiple object type grouping

Postby 1nperson0z » Wed Mar 23, 2011 12:29 am

his wouldn’t be an issue if superCard had the ability to group objects, but since it can’t I figured out a way to fake it.


In the RTE, Object > Group
MacBook Pro 2.4Ghz i7 8Gb 10.11.3
1nperson0z
 
Posts: 78
Joined: Wed Jul 09, 2008 3:31 pm
Location: Blue Mountains Australia

Re: objGroup - multiple object type grouping

Postby mrBean » Wed Mar 23, 2011 1:20 am

1nperson0z wrote:
his wouldn’t be an issue if superCard had the ability to group objects, but since it can’t I figured out a way to fake it.


In the RTE, Object > Group


multiple object type grouping, as in fields, buttons, graphics.
vs
Object > Group, which only does graphics.
User avatar
mrBean
 
Posts: 89
Joined: Sat Jan 30, 2010 8:03 am
Location: New York

Re: objGroup - multiple object type grouping

Postby gonetriadrr » Mon Apr 04, 2011 10:35 am

Nice!

Given any thought to stacking order grouping?

DCS
gonetriadrr
 
Posts: 170
Joined: Fri Jan 08, 2010 6:50 pm

Re: objGroup - multiple object type grouping

Postby mrBean » Mon Apr 04, 2011 12:28 pm

gonetriadrr wrote:Nice!

Given any thought to stacking order grouping?

DCS


I'm not sure I know what you mean by stacking order. Are you talking about a layering system? Something similar to Illustrator or maya?
User avatar
mrBean
 
Posts: 89
Joined: Sat Jan 30, 2010 8:03 am
Location: New York

Re: objGroup - multiple object type grouping

Postby gonetriadrr » Fri Apr 08, 2011 8:28 am

mrBean wrote:
gonetriadrr wrote:Nice!

Given any thought to stacking order grouping?

DCS


I'm not sure I know what you mean by stacking order. Are you talking about a layering system? Something similar to Illustrator or maya?


Yes layering.

DCS
gonetriadrr
 
Posts: 170
Joined: Fri Jan 08, 2010 6:50 pm

Re: objGroup - multiple object type grouping

Postby mrBean » Fri Apr 08, 2011 4:14 pm

Yes I have put some thought behind layers, but all I could come up with was an overly complicated and convoluted version of objGroup. The only practical way in my opinion to implement layers is for Solution Etcetera to make it a real superCard feature.

But I was thinking of just making an external that would allow you to change the objects order. If I can figure it out, I would add it as a feature of objGroup.
User avatar
mrBean
 
Posts: 89
Joined: Sat Jan 30, 2010 8:03 am
Location: New York

Re: objGroup - multiple object type grouping

Postby mrBean » Mon Jun 13, 2011 8:16 pm

Update to objGroup contained in first post.

Now objects contained in the group user property can be separated not only by return-key, but also comma and semicolon. I have added the ability to set the bounds of a group. I've added two more properties to objGroup, width and height. I've also created a new command call table Designed to scale a group of nine graphics so that the image contained in those graphics does not get distorted. This command is great if you want to create a custom button, or a background image that need to change size. Note. any object above nine will be scale relative to it's current location.
User avatar
mrBean
 
Posts: 89
Joined: Sat Jan 30, 2010 8:03 am
Location: New York

Re: objGroup - multiple object type grouping

Postby Dan_Kelleher » Tue Jun 14, 2011 9:41 am

Hi Mr Beam,
Thank you. ObjGroup XFcn looks useful.
I noticed that the in the "General Example", I think the "get locktext" button may be triggering return of the "locked" property rather than the "locktext" property (OR, I suppose, checking the "lockText" checkBox may not be setting the lockText of the fields - I didn't check the scripts).
-Dan
Daniel.Kelleher@umassmed.edu
SC4.7.3 OSX 10.7.2 Mac Pro
User avatar
Dan_Kelleher
 
Posts: 438
Joined: Sun Jul 06, 2008 2:45 pm
Location: Worcester (wouster as in would) Massachusetts USA

Re: objGroup - multiple object type grouping

Postby mrBean » Tue Jun 14, 2011 7:11 pm

Dan_Kelleher wrote:Hi Mr Beam,
Thank you. ObjGroup XFcn looks useful.
I noticed that the in the "General Example", I think the "get locktext" button may be triggering return of the "locked" property rather than the "locktext" property (OR, I suppose, checking the "lockText" checkBox may not be setting the lockText of the fields - I didn't check the scripts).
-Dan


I made a mistake in the example, the script in the "get lockText" button should have read "put objGroup("lockText","text","card ID 101") into cd fld ID 107". I also made other small changes to the example project. I have posted the update at the top of this post.

thanks for your help Dan.
User avatar
mrBean
 
Posts: 89
Joined: Sat Jan 30, 2010 8:03 am
Location: New York

Re: objGroup - multiple object type grouping

Postby mrBean » Sun Feb 12, 2012 6:50 pm

Update 1.50 What’s New:

For this update I wanted to add the ability to clone groups , but unfortunately do to circumstances out side my control this feature could not be finished. There is an example for it inside the sample project. If you like to us it, remove the pictureData from the graphic in that example.
The previous versions of objGroup-lacked feedback, so I put some effort into add user feedback. When an error message is return first line will contain the word false. The second line will contain the error message. In regards to members (object that belongs to a particular group), if an error accurse, the object will be ignored, an error message will be sent to the Console, and the action the external is taking will continue.

In the previous incarnation of this external you could only address one group at a time, but now objGroup can handle multiple groups. When you pass multiple groups to objGroup, they will be treat as single group. If all the groups are from the same layer, you only have to pass the layers name once.

New Command
    Tab: Changes the width of a tab in the given group. Look at the tab example in this project for more information
New function
    Find: Return the name of the group the given object belongs to.
    Note. The find function only return the first match it finds, since an object can be a member of more than one group, the result may not be what your seeking.
    List: Returns a list of all groups in a given layer.
    Members: Return a list of members from the defined group.
    Parts: Returns the lowest and highest part number of the members of the given group.

You will find the update at the top most post.
User avatar
mrBean
 
Posts: 89
Joined: Sat Jan 30, 2010 8:03 am
Location: New York

Re: objGroup - multiple object type grouping

Postby mrBean » Thu May 31, 2012 7:34 pm

I have added parent external to this thread. The version that you can find here is an update – parent 1.1. Version 1.1 is a completely rebuild, with add feature such as remember and recall.

You will find the update at the top most post.

Update objGroup 1.5.5 What’s New:

I found a bug in objGroup; when return a negative number the value would be incorrect. I also add some features.

New Commands
ActiveTab; if you have your own custom tab bar, you can use activeTab to give the effect of switching between tabs.

Align; custom user property that works in conjunction the table command to control object that are on top of the graphic table.

New Functions
MouseOver; returns true if the mouse is over an object that's within the group, along with the name of the object the mouse is over. If the mouse is not over an object that is apart of the group, then it will return false.

MouseWithin; returns true if the mouse is within the bounds of the group. If the mouse is not within the bounds of the group, it will return false.

VisHeight; returns the height of the visible portion of the group.

VisWidth; returns the width of the visible portion of the group.

You will find the update at the top most post.
User avatar
mrBean
 
Posts: 89
Joined: Sat Jan 30, 2010 8:03 am
Location: New York

Re: objGroup - multiple object type grouping

Postby sctell » Fri Jun 01, 2012 3:25 am

Hi,

Just had a crash when I pressed the clone button

Application Specific Information:
objc[729]: garbage collection is OFF

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 us.SuperCard.SuperCard 0x000883b6 mapspot + 54
1 @@D 0x083f5323 SetObjectInfoByIndexLong + 1443
2 @@D 0x083ec0f3 Clone + 941
3 @@D 0x083eeff3 doMyFunction + 4145
4 @@D 0x083ef051 main + 50
5 us.SuperCard.SuperCard 0x001d0786 xlookup + 4726
6 us.SuperCard.SuperCard 0x00252595 sendmes + 1925
7 us.SuperCard.SuperCard 0x000a8484 factor + 1892
8 us.SuperCard.SuperCard 0x000a64ea expression + 170
9 us.SuperCard.SuperCard 0x0001baef comget + 159
10 us.SuperCard.SuperCard 0x000199f7 syscom + 631
11 us.SuperCard.SuperCard 0x0025268d sendmes + 2173
12 us.SuperCard.SuperCard 0x0024f286 runblock + 1766
13 us.SuperCard.SuperCard 0x0025237c sendmes + 1388
14 us.SuperCard.SuperCard 0x000b2c3d spoteval + 2989
15 us.SuperCard.SuperCard 0x000b3015 spotsend + 197
16 us.SuperCard.SuperCard 0x0018621b contutil + 12491
17 us.SuperCard.SuperCard 0x00187372 handletools + 2978
18 us.SuperCard.SuperCard 0x0009ef5d runedit + 1869
19 us.SuperCard.SuperCard 0x0000fbbd HandleEvent + 4733
20 us.SuperCard.SuperCard 0x00010644 main + 2404
21 us.SuperCard.SuperCard 0x000026a2 _start + 216
22 us.SuperCard.SuperCard 0x000025c9 start + 41


All the best

Terry
sctell
 
Posts: 1128
Joined: Sun Jul 06, 2008 10:41 am

Re: objGroup - multiple object type grouping

Postby mrBean » Sat Jun 02, 2012 3:07 am

Ya, I know about this problem; I’d mentioned it in an earlier post. Unfortunately the problem lies with the CreateObjectLong callback, or at least I think it dose. But if you want to try it out just remove the picData from example and it wont crash.

Thanks for your help.
User avatar
mrBean
 
Posts: 89
Joined: Sat Jan 30, 2010 8:03 am
Location: New York


Return to XCmds, XFcns, and XRtns

Who is online

Users browsing this forum: No registered users and 1 guest