Re: Object naming

2020-07-29 Thread Martin Koob via use-livecode
Carmichael Zutt >> And one of them Oliver Boliver Butt >> And one of them Zanzibar Buck-Buck McFate ... >> But she didn't do it. And now it's too late. >> >> -- >> Richard Gaskin >> Fourth World Systems >> >> >>> Alex T

Re: Object naming

2020-07-28 Thread Jerry Jensen via use-livecode
And one of them Sir Michael Carmichael Zutt > And one of them Oliver Boliver Butt > And one of them Zanzibar Buck-Buck McFate ... > But she didn't do it. And now it's too late. > > -- > Richard Gaskin > Fourth World Systems > > >> Alex Tweed

Re: Object naming

2020-07-28 Thread Martin Koob via use-livecode
From Kids in the Hall https://www.youtube.com/watch?v=8nvzEqsZIGo Martin > On Jul 28, 2020, at 2:32 PM, Jim Lambert via use-livecode > wrote: > > Zanzibar Buck-Buck McFate was my lawyer. > One day I asked if I could call him Zanz. > He said, “Nah. Just call me Dave!” > > Jim Lambert > > >

Re: Object naming

2020-07-28 Thread Jim Lambert via use-livecode
Zanzibar Buck-Buck McFate was my lawyer. One day I asked if I could call him Zanz. He said, “Nah. Just call me Dave!” Jim Lambert ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage you

Re: Object naming

2020-07-28 Thread Alex Tweedly via use-livecode
On 28/07/2020 08:27, Curry Kenworthy via use-livecode wrote: Alex: > Using unambiguous short names prevents behaviour scripts > that references child controls completely Sure about that? (Option A) Yes, I think I am. At least, it prevents using names of the child objects in the script. The

Re: Object naming

2020-07-28 Thread Alex Tweedly via use-livecode
Thanks Martin. That does indeed work (might need tweaking for some more complex cases). However, it goes through all controls on the card - the same effect is achieved without the performance risk using the childControlIDs, as in function idOfChild pLongID, pShortName   repeat for each line

Re: Object naming

2020-07-28 Thread Alex Tweedly via use-livecode
On 28/07/2020 06:24, Richard Gaskin via use-livecode wrote: Consider a simplified problem statement: You have two objects of the same type in a container, and you want to tell them apart but had given them the same name. +100 OK, when I stop laughing, I will admit I am convinced :-) Alex

Re: Object naming

2020-07-28 Thread Richmond via use-livecode
You are asking for trouble. Think about something as goofy and as simple as this: Inside A1, there is a rect called "R1" and also a group called "B1" inside B1 there is a rect called "R2" . . . Am I missing something? Richmond. On 28.07.20 10:27, Curry Kenworthy via use-livecode wrote: Alex

Re: Object naming

2020-07-28 Thread scott--- via use-livecode
> -- > Richard Gaskin > Fourth World Systems > > >> Alex Tweedly alex at tweedly.net >> Mon Jul 27 15:47:12 EDT 2020 >>Previous message (by thread): Object naming >>Next message (by thread): Object naming >>Messages sorted by: [ date ]

Re: Object naming

2020-07-28 Thread Curry Kenworthy via use-livecode
Alex: > Using unambiguous short names prevents behaviour scripts > that references child controls completely Sure about that? (Option A) > Inside A, there is a rect called "R" and also a group called "B" > inside B there is a rect called "R" Or put the "direct" R in a subgroup also. (Option

Re: Object naming

2020-07-27 Thread JB via use-livecode
And one of them Sir Michael Carmichael Zutt > And one of them Oliver Boliver Butt > And one of them Zanzibar Buck-Buck McFate ... > But she didn't do it. And now it's too late. > > -- > Richard Gaskin > Fourth World Systems > > >> Alex Tweedly alex

Re: Object naming

2020-07-27 Thread Jerry Jensen via use-livecode
ael Zutt > And one of them Oliver Boliver Butt > And one of them Zanzibar Buck-Buck McFate ... > But she didn't do it. And now it's too late. > > -- > Richard Gaskin > Fourth World Systems > > >> Alex Tweedly alex at tweedly.net >> Mon Jul 27

Re: Object naming

2020-07-27 Thread Richard Gaskin via use-livecode
n Jul 27 15:47:12 EDT 2020 Previous message (by thread): Object naming Next message (by thread): Object naming Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] On 27/07/2020 16:33, Richard Gaskin via use-livecode wrote: There are many ways to refer to things. The simplest is t

Re: Object naming

2020-07-27 Thread Martin Koob via use-livecode
Hi Alex You could use the owner of the control in conjunction with the name of the control to distinguish between the two graphic’s named ‘R’. I did that for the simple case in your example but may not work with something more complex. I created a stack with the same hierarchy of graphics a

Re: Object naming

2020-07-27 Thread Alex Tweedly via use-livecode
On 27/07/2020 21:26, Curry Kenworthy via use-livecode wrote: Use unambiguous SHORT names! Thanks, but ... Yes, using unambiguous SHORT names solves this naming problem, but introduces other problems. In particular, this group script should (probably) be a behaviour script, since the group

Re: Object naming

2020-07-27 Thread Curry Kenworthy via use-livecode
Richard: > The simplest is to use unambiguous names +1! Alex: > Is there an unambiguous name in this case ? Use unambiguous SHORT names! Alex: > (i.e. A-R, not A-B-R) +1! Best wishes, Curry Kenworthy Custom Software Development "Better Methods, Better Results" LiveCode Training and Co

Re: Object naming

2020-07-27 Thread Alex Tweedly via use-livecode
On 27/07/2020 16:33, Richard Gaskin via use-livecode wrote: There are many ways to refer to things.  The simplest is to use unambiguous names for things that matter. Is there an unambiguous name in this case ? And if so, what is it :-) ? A group "A" contains a rectangle "R", and a (sub)group

Re: Object naming

2020-07-27 Thread Alex Tweedly via use-livecode
Thanks Mark and Andre. Mark's description of the solution is correct - but in my situation it's not a solution. The sub-groups (B in my earlier example) are opaque - they have coloured, filled backdrops so that they can capture e.g. mouseMove messages, so they need to be opaque. Therefore, I

Re: Object naming

2020-07-27 Thread Richard Gaskin via use-livecode
There are many ways to refer to things. The simplest is to use unambiguous names for things that matter. -- Richard Gaskin Fourth World Systems Alex Tweedly wrote: I think my head is melting :-) I have a group called 'A'. Inside A, there is a rect called "R" and also a group called "B"

Re: Object naming

2020-07-27 Thread Andre Garzia via use-livecode
Alex, I think that Mark solution is the correct one but I couldn't resist telling you some other idea, one that is only applicable if performance is not a problem. You can add custom properties to controls you want to find later and then look for them by looping everyone in the card. A reusable s

Re: Object naming

2020-07-26 Thread Mark Wieder via use-livecode
On 7/26/20 5:31 PM, Alex Tweedly via use-livecode wrote: I think my head is melting :-) I have a group called 'A'. Inside A, there is a rect called "R" and also a group called "B" inside B there is a rect called "R" How do I refer unambiguously to the first rectangle (i.e. A - R, not A - B -

Object naming

2020-07-26 Thread Alex Tweedly via use-livecode
I think my head is melting :-) I have a group called 'A'. Inside A, there is a rect called "R" and also a group called "B" inside B there is a rect called "R" How do I refer unambiguously to the first rectangle (i.e. A - R, not A - B - R) ? If I say    grc "R" of grp "B" of grp A then I una

Re: Object naming conventions

2011-10-08 Thread Bob Earp
Pete, I wouldn't bother adding such complexity. If your naming convention is good then others will just use it. If it's bad you need to change it ;-) And as far as those that just want to do their own thing, to hell with them, they shouldn't be using your tool in the first place !! best, Bob.

Re: Object naming conventions

2011-10-08 Thread Bob Earp
By all means Richard, I'd be honored. best, Bob... > That's a great set of rules, Bob. > > May I have your permission to include them in an update to my naming > conventions article (with attribution, of course)? > > -- > Richard Gaskin > Fourth World Bob Earp White Rock, British Columbia.

Re: Object naming conventions

2011-10-07 Thread Pete
o that others > can > >> refer to it, and check those standards with your team on a regular basis > to > >> make sure it continues to work for them. > >> > >> Naming is only a way of better understanding what somebody was trying to > do > >> in th

Re: Object naming conventions

2011-10-07 Thread Mike Felker
y was trying to do >> in their script, and that somebody is likely you in the future !! So, don't >> forget comments which are as important but generally considered as >> kindergarden practice by self proclaimed expert scripters ;-) >> >> best, Bob... >>

Re: Object Naming Conventions

2011-10-07 Thread Mark Wieder
Jacque- Friday, October 7, 2011, 10:39:26 AM, you wrote: > for me it makes my scripts harder to read. Well, that's the purpose of a scripting convention. If what you're doing makes it easier for you to read your scripts then you're doing things the right way. > We're all different. I really dou

Re: Object naming conventions

2011-10-07 Thread Pete
Thanks Ken, looks like a very interesting document. Pete Molly's Revenge On Fri, Oct 7, 2011 at 1:11 PM, Ken Ray wrote: > > On Oct 7, 2011, at 11:54 AM, Pete wrote: > > > Thanks for the thoughts Bob. > > > > For those who have replied, here's the reason behind t

Re: Object naming conventions

2011-10-07 Thread Ken Ray
On Oct 7, 2011, at 11:54 AM, Pete wrote: > Thanks for the thoughts Bob. > > For those who have replied, here's the reason behind the question. > > I'm about to ask for beta testers for an LC tool that greatly speeds up the > development of applications that use SQL databases. Part of the tool

Re: Object Naming Conventions

2011-10-07 Thread J. Landman Gay
On 10/7/11 6:37 AM, Francis Nugent Dixon wrote: Whatever you do, use a prefix to define ALL your objects, I never do, I don't see any advantage, and for me it makes my scripts harder to read. It's easy to see what type an object is if you forget. In fact, the only consistent naming scheme I

Re: Object naming conventions

2011-10-07 Thread Pete
in the future !! So, don't > forget comments which are as important but generally considered as > kindergarden practice by self proclaimed expert scripters ;-) > > best, Bob... > > > > > From: Pete > > To: How to use LiveCode > > Subject: Object Naming Conven

Re: Object naming conventions

2011-10-07 Thread Richard Gaskin
Bob Earp wrote: Personally I think there are really only three things one needs to follow; 1. Don't worry about what others do, just name everything in a format that really makes sense to you and your team today, and in the future. 2. Keep the names as short and uncomplicated as possible. 3. W

Re: Object Naming UnConventions

2011-10-07 Thread Richard Gaskin
dunbarx wrote: > I rarely get to act like a pedantic jerk, especially towards a highly > respected and iconic personage such as Richard Gaskin. > > Not kidding about any of item 2 of line 1. > > But ordinal would be 'first control". Cardinal would be "control 1" > > That felt better than I though

Re: Object naming conventions

2011-10-07 Thread Bob Earp
ng to do in their script, and that somebody is likely you in the future !! So, don't forget comments which are as important but generally considered as kindergarden practice by self proclaimed expert scripters ;-) best, Bob... > From: Pete > To: How to use LiveCode > Subject:

Re: Object Naming Conventions

2011-10-07 Thread Pete
Rene, I really like the idea of prefixes for handlers and functions that tell you where they are located. I'd probably add a prefix for handlers in a library as well. Pete Molly's Revenge On Fri, Oct 7, 2011 at 8:44 AM, René Micout wrote: > > Le 7 oct. 2011 à 16

Object Naming UnConventions

2011-10-07 Thread dunbarx
would. I am sure I will regret it, though. No kidding about item 1 of line 5. Craig -Original Message- From: Richard Gaskin To: use-livecode Sent: Fri, Oct 7, 2011 6:43 am Subject: Re: Object Naming Conventions Pete wrote: > Thanks Mark, that's what I was looking for. &g

Re: Object Naming Conventions

2011-10-07 Thread René Micout
Le 7 oct. 2011 à 16:41, Richard Gaskin a écrit : > > So thanks for your post. It prompted me to learn something new, and if I get > time I may add a section to that article on object names. Hello Richard, This is my prefix : -- PRÉFIXES (types des objets) : -- ku = constante (unitaire) -

Re: Object Naming Conventions

2011-10-07 Thread Mark Wieder
Richard- Friday, October 7, 2011, 7:41:27 AM, you wrote: > Somehow I'd gotten the idea that the "control" specifier was limited to > ordinal references, but apparently it's not. I do that rather extensively in PowerTools because I need an object oriented way to deal with any type of control. Sin

Re: Object Naming Conventions

2011-10-07 Thread Richard Gaskin
Pete wrote: Thanks Mark, that's what I was looking for. Pete On Thu, Oct 6, 2011 at 6:03 PM, Mark Wieder wrote: Phil- Thursday, October 6, 2011, 12:28:38 PM, you wrote: > Here is an excellent starting point: > http://fourthworld.com/embassy/articles/scriptstyle.html > Go to the "Namin

Re: Object Naming Conventions

2011-10-07 Thread Francis Nugent Dixon
Hi from Beautiful Brittany, Pete, there has been a thread on this subject several times, but I'm not against seeing it again. Whatever you do, use a prefix to define ALL your objects, but find a rule that suits you. Don't use a suffix, I'm sure you will regret it. I use a two-letter indicator (

Re: Object Naming Conventions

2011-10-07 Thread René Micout
Mark, I do almost the same... René Le 7 oct. 2011 à 03:03, Mark Wieder a écrit : > Phil- > > Thursday, October 6, 2011, 12:28:38 PM, you wrote: > >> Here is an excellent starting point: >> http://fourthworld.com/embassy/articles/scriptstyle.html > >> Go to the "Naming Conventions" part. >

Re: Object Naming Conventions

2011-10-06 Thread Mark Wieder
Ken- that was supposed to read: "Of course, each person has the style that works best for them, so use what you like and ditch what you don't..." > Absolutely. -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@list

Re: Object Naming Conventions

2011-10-06 Thread Mark Wieder
Ken- Thursday, October 6, 2011, 8:06:18 PM, you wrote: > I tend to use prefixes like this only when they aren't already > abbreviations for an existing object in LC. Absolutely. I also quite often use graphic images as buttons, so I'll go hide graphic "btnSaveMe" and there the "btn" reminds me

Re: Object Naming Conventions

2011-10-06 Thread Ken Ray
On Oct 6, 2011, at 8:03 PM, Mark Wieder wrote: > controlprefix example > --- > buttons : "btn" : "btnSave" > radio buttons : "rdo" : "rdoOption1" > checkboxes: "chk" : "chkShowLineNumbers" > tab buttons : "mnu" : "mnuMainTabForm" > fields: "fl

Re: Object Naming Conventions

2011-10-06 Thread Pete
Thanks Mark, that's what I was looking for. Pete Molly's Revenge On Thu, Oct 6, 2011 at 6:03 PM, Mark Wieder wrote: > Phil- > > Thursday, October 6, 2011, 12:28:38 PM, you wrote: > > > Here is an excellent starting point: > > http://fourthworld.com/embassy/

Re: Object Naming Conventions

2011-10-06 Thread Mark Wieder
Phil- Thursday, October 6, 2011, 12:28:38 PM, you wrote: > Here is an excellent starting point: > http://fourthworld.com/embassy/articles/scriptstyle.html > Go to the "Naming Conventions" part. In addition to what's in Richard's writeup I tend to use the following conventions. Mostly just

Re: Object Naming Conventions

2011-10-06 Thread Phil Davis
Here is an excellent starting point: http://fourthworld.com/embassy/articles/scriptstyle.html Go to the "Naming Conventions" part. Phil On 10/6/11 12:23 PM, Pete wrote: I vaguely remember a thread on this topic a while back. I'm interested in what naming conventions people have for stack

Object Naming Conventions

2011-10-06 Thread Pete
I vaguely remember a thread on this topic a while back. I'm interested in what naming conventions people have for stacks/cards/controls, if any. This is in connection with a project I'm working on to automate laying out controls on a card. I'm currently using a naming convention of my own but I'