RE: What's in a group
Thanks to Ray for bringing this up and thanks to Mark for his perfectly succulent getprops example... 6 years later, and now I get it! how getprops works... who says you can't teach an old dog new tricks? Hi Xavier, Glad to see you are now taking a serious interest in getProp. To answer the question on the difference between getProp someProperty and function someFunction This is obvious. The first let you manipulate a property, that is an attribute of an object (group, button, graphic, etc.) layed on the screen. Attributes refer to what the object look like, its appearance on the screen. The second let you run a function. A function is something that will transform some data. These data can be attributes of an object. For instance, you can convert radians into degrees or RGB colors into HSV. You can also manipulate information about the objects on the screen. objects pGroup example, best is to use: function objects pGroup repeat with x = 1 to number of controls of pGroup put the name of control x of pGroup return after myList end repeat sort myList return myList end objects Personally, I only use getProp to go through a sequence of value assignment. Take the value if there is any provided. If there is none fetch a default value for the property if I have defined any, and utlimately, assign a default value of my own: getProp gridColor put the gridColor of me into tValue if tValue is empty then put the defaults[gridColor] of me into tValue if tValue is empty then put 127,164,198 into tValue return tValue end gridColor Checking that the value is a well formed color value take place somewhere else (in the controller part of the program) -- I got quite fond of the MVC approach, recently. Playing around with getProp, setProp, I haven't found an answer to this yet. Is there a way to capture getProp, setProp calls? I want to be able to write set the dontexistyet of me to something and get to know that I tried to set a property that doesn't exist yet. Try/catch doesn't capture this. I could of course check whether the property is within the customProperties of the object. But this requires a priori testing. I prefer to be notified after trying to use it. Any clue? Best, Marielle Marielle Lange (PhD), Psycholinguist Alternative emails: [EMAIL PROTECTED], Homepage http://homepages.widged.com/mlange/ Easy access to lexical databaseshttp:// lexicall.widged.com/ Supporting Education Technologists http:// revolution.widged.com/wiki/ ___ metacard mailing list metacard@lists.runrev.com http://lists.runrev.com/mailman/listinfo/metacard
RE: What's in a group
Hi Ray try this: repeat with x = 1 to the number of controls in group G put the long name of control x of group G cr after grpList end repeat make sure you refer to control x OF GROUP G or you'll get any control x of the card you're in... this is easily turning into an atomic function like function getGroupControls thisgroup local grpList= put the number of controls in group thisgroup into CCount repeat with x = 1 to CCount put the long name of control x of group thisgroup into line x of grpList end repeat return grpList end getGroupControls if thisGroup is a long name just use put the long name of control x of thisgroup into line x of grpList which I find much cleaner ;) cheers Xavier http://monsieurx.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ray Horsley Sent: Monday, 20 February, 2006 19:11 To: Metacard List Subject: What's in a group Really basic question which I should know: How do I get a list of all objects in a group? Thanks, Ray Horsley Developer, LinkIt! Software ___ metacard mailing list metacard@lists.runrev.com http://lists.runrev.com/mailman/listinfo/metacard ___ metacard mailing list metacard@lists.runrev.com http://lists.runrev.com/mailman/listinfo/metacard
Re: What's in a group
Hi Ray, Use the following scripts as follows: put the objects of grp 1 put the objectIDs of grp 1 Mind line wraps. getProp objects repeat with x = 1 to number of controls of the target put the name of control x of the target return after myList end repeat sort myList return myList end objects getProp objectIDs repeat with x = 1 to number of controls of the target put the id of control x of the target return after myList end repeat sort myList return myList end objectIDs Best regards, Mark Ray Horsley wrote: Really basic question which I should know: How do I get a list of all objects in a group? Thanks, Ray Horsley Developer, LinkIt! Software -- eHUG coordinator mailto:[EMAIL PROTECTED] http://www.ehug.info http://home.wanadoo.nl/mark.sch http://www.economy-x-talk.com Please inform me about vacancies in the field of general economics at your institute. I am also looking for new freelance programming projects. ___ metacard mailing list metacard@lists.runrev.com http://lists.runrev.com/mailman/listinfo/metacard
Re: What's in a group
I forgot to add that you can put these scripts (see previous e-mail) into the stack script or in a stack in use and they will work for every object in the stack, including card and the stack itself. Best, Mark Mark Schonewille wrote: Hi Ray, Use the following scripts as follows: put the objects of grp 1 put the objectIDs of grp 1 Mind line wraps. snip -- eHUG coordinator mailto:[EMAIL PROTECTED] http://www.ehug.info http://home.wanadoo.nl/mark.sch http://www.economy-x-talk.com Please inform me about vacancies in the field of general economics at your institute. I am also looking for new freelance programming projects. ___ metacard mailing list metacard@lists.runrev.com http://lists.runrev.com/mailman/listinfo/metacard
RE: What's in a group
Thanks to Ray for bringing this up and thanks to Mark for his perfectly succulent getprops example... 6 years later, and now I get it! how getprops works... who says you can't teach an old dog new tricks? cheers Xavier -- http://monsieurx.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ray Horsley Sent: Monday, 20 February, 2006 19:58 To: Discussions on Metacard Subject: Re: What's in a group Thanks to all. The only way I was able to come up with was to ungroup the group, get a list of the selected objects, and then group it back up. But that takes a little longer than some of these suggestions. Thanks Scott, Mark and MisterX! Ray Horsley Developer, LinkIt! Software On Feb 20, 2006, at 1:47 PM, Mark Schonewille wrote: I forgot to add that you can put these scripts (see previous e-mail) into the stack script or in a stack in use and they will work for every object in the stack, including card and the stack itself. Best, Mark Mark Schonewille wrote: Hi Ray, Use the following scripts as follows: put the objects of grp 1 put the objectIDs of grp 1 Mind line wraps. snip -- eHUG coordinator mailto:[EMAIL PROTECTED] http://www.ehug.info http://home.wanadoo.nl/mark.sch http://www.economy-x-talk.com Please inform me about vacancies in the field of general economics at your institute. I am also looking for new freelance programming projects. ___ metacard mailing list metacard@lists.runrev.com http://lists.runrev.com/mailman/listinfo/metacard ___ metacard mailing list metacard@lists.runrev.com http://lists.runrev.com/mailman/listinfo/metacard ___ metacard mailing list metacard@lists.runrev.com http://lists.runrev.com/mailman/listinfo/metacard
Re: What's in a group
Hi Scott, There is hardly any difference. I suspect even that getprop handlers and functions return their result in exactly the same way. The advantage of the property approach might be that you really don't need to think about what the target may be. The function needs a quoted string as a reference to an object while the getProp handler can refer to an object directly. If someone can come up with a better explanation, I'd be pleased to know. Best, Mark Scott Rossi wrote: Hi Mark: I'm just curious... How is the following snippet you wrote: put the objects of grp 1 getProp objects repeat with x = 1 to number of controls of the target put the name of control x of the target return after myList end repeat sort myList return myList end objects ...different from: put objects(grp 1) function objects pGroup repeat with x = 1 to number of controls of pGroup put the name of control x of pGroup return after myList end repeat sort myList return myList end objects Just trying to understand what the getProp construct offers here, since I've never used it. :-) Thanks Regards, Scott Rossi Creative Director Tactile Media, Multimedia Design -- eHUG coordinator mailto:[EMAIL PROTECTED] http://www.ehug.info http://home.wanadoo.nl/mark.sch http://www.economy-x-talk.com Please inform me about vacancies in the field of general economics at your institute. I am also looking for new freelance programming projects. ___ metacard mailing list metacard@lists.runrev.com http://lists.runrev.com/mailman/listinfo/metacard