Get fillGradient props

classic Classic list List threaded Threaded
31 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Get fillGradient props

Sannyasin Brahmanathaswami
Goal: get an explicit list of gradient properties from an object.


command getGradientProps

set the defaultstack to the topstack

put the fillGradient of graphic "portal-title-bkgnd" into lCurrentObjectProperties

put the keys of tCurrentObjectProperties

repeat for each key x in lCurrentObjectProperties

put x & " | " & lCurrentObjectProperties[x] & cr after tCheckProperties

end repeat

put tCheckProperties

end getGradientProps

No matter how I try, I cannot fetch the keys of the gradient… the dictionary does not indicated that we cannot read this array

any ideas?

BR

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Get fillGradient props

ScottR
You have a typo in your variable name lCurrentObjectProperties when you
put the keys but it looks like things should still work.

This works here with a test graphic:

on mouseUp
   put the fillGradient of graphic 1 into theCurrentObjectProperties
   repeat for each key x in theCurrentObjectProperties
      put x & " | " & theCurrentObjectProperties[x] & cr after
theCheckProperties
   end repeat
   put theCheckProperties
end mouseUp




Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 7/7/16, 1:27 PM, "use-livecode on behalf of Sannyasin Brahmanathaswami"
<[hidden email] on behalf of [hidden email]>
wrote:

>Goal: get an explicit list of gradient properties from an object.
>
>
>command getGradientProps
>
>set the defaultstack to the topstack
>
>put the fillGradient of graphic "portal-title-bkgnd" into
>lCurrentObjectProperties
>
>put the keys of tCurrentObjectProperties
>
>repeat for each key x in lCurrentObjectProperties
>
>put x & " | " & lCurrentObjectProperties[x] & cr after tCheckProperties
>
>end repeat
>
>put tCheckProperties
>
>end getGradientProps
>
>No matter how I try, I cannot fetch the keys of the gradientŠ the
>dictionary does not indicated that we cannot read this array
>
>any ideas?
>
>BR
>
>_______________________________________________
>use-livecode mailing list
>[hidden email]
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Get fillGradient props

mwieder
In reply to this post by Sannyasin Brahmanathaswami
Sannyasin Brahmanathaswami <brahma@...> writes:

>
> Goal: get an explicit list of gradient properties from an object.
>
>
> command getGradientProps
>
> set the defaultstack to the topstack
>
> put the fillGradient of graphic "portal-title-bkgnd" into
lCurrentObjectProperties

>
> put the keys of tCurrentObjectProperties
>
> repeat for each key x in lCurrentObjectProperties
>
> put x & " | " & lCurrentObjectProperties[x] & cr after tCheckProperties
>
> end repeat
>
> put tCheckProperties
>
> end getGradientProps
>
> No matter how I try, I cannot fetch the keys of the gradient… the dictionary
does not indicated that we cannot read this array
>
> any ideas?

Your code works fine.
With the exception of a typo "tCurrentObjectProperties".
You might try putting "after msg" after your put statements.

...and I know I keep saying this, but...
setting "Strict compilation mode" and declaring your variables
will help save you from this kind of error. That's what it's for.
Just sayin.

--
 Mark Wieder
 [hidden email]

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
--
 Mark Wieder
 ahsoftware@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: Get fillGradient props

Sannyasin Brahmanathaswami
In reply to this post by ScottR
Sheesh… I gotta stick to conventions better.

I think I like jacque's using "s" as the being character for script local variable.

"l" for "local" just disappeared or looks like a "t"


sCurrentObjectProperties is better



From: use-livecode <[hidden email]> on behalf of Scott Rossi <[hidden email]>
Reply-To: How LiveCode <[hidden email]>
Date: Thursday, July 7, 2016 at 11:41 AM
To: How LiveCode <[hidden email]>
Subject: Re: Get fillGradient props

You have a typo in your variable name lCurrentObjectProperties when you
put the keys but it looks like things should still work.

This works here with a test graphic:

on mouseUp
   put the fillGradient of graphic 1 into theCurrentObjectProperties
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Get fillGradient props

Sannyasin Brahmanathaswami
In reply to this post by mwieder
Thanks Mark… I'll try it… too many hours at the screen all the letters start looking the same.. so this could help guard against the "stupido's"


From: use-livecode <[hidden email]> on behalf of Mark Wieder <[hidden email]>
Reply-To: How LiveCode <[hidden email]>
Date: Thursday, July 7, 2016 at 11:44 AM
To: How LiveCode <[hidden email]>
Subject: Re: Get fillGradient props

setting "Strict compilation mode" and declaring your variables
will help save you from this kind of error. That's what it's for.
Just sayin.
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Get fillGradient props

ScottR
In reply to this post by Sannyasin Brahmanathaswami
I've always thought lowercase "L" is a poor choice to prefix a variable
name.  Is it an L? It is a capital i? Is it a pipe?

But that's just me.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 7/7/16, 2:46 PM, "use-livecode on behalf of Sannyasin Brahmanathaswami"
<[hidden email] on behalf of [hidden email]>
wrote:

>SheeshŠ I gotta stick to conventions better.
>
>I think I like jacque's using "s" as the being character for script local
>variable.
>
>"l" for "local" just disappeared or looks like a "t"
>
>
>sCurrentObjectProperties is better
>
>
>
>From: use-livecode <[hidden email]> on behalf of
>Scott Rossi <[hidden email]>
>Reply-To: How LiveCode <[hidden email]>
>Date: Thursday, July 7, 2016 at 11:41 AM
>To: How LiveCode <[hidden email]>
>Subject: Re: Get fillGradient props
>
>You have a typo in your variable name lCurrentObjectProperties when you
>put the keys but it looks like things should still work.
>
>This works here with a test graphic:
>
>on mouseUp
>   put the fillGradient of graphic 1 into theCurrentObjectProperties
>_______________________________________________
>



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Get fillGradient props

Monte Goulding-2

> On 8 Jul 2016, at 7:52 AM, Scott Rossi <[hidden email]> wrote:
>
> I've always thought lowercase "L" is a poor choice to prefix a variable
> name.  Is it an L? It is a capital i? Is it a pipe?

For what it’s worth we use `s` in the team for script locals. There are some older scripts like libURL that use some other prefixing conventions.

Cheers

Monte
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Get fillGradient props

J. Landman Gay
In reply to this post by Sannyasin Brahmanathaswami
On July 7, 2016 4:47:35 PM Sannyasin Brahmanathaswami <[hidden email]> wrote:

> Sheesh… I gotta stick to conventions better.
>
> I think I like jacque's using "s" as the being character for script local
> variable.
>
> "l" for "local" just disappeared or looks like a "t"

I got it from Mark Waddingham. He's always right.


Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Get fillGradient props

Alex Tweedly
In reply to this post by Monte Goulding-2
What do you use for handler-local variables ?

Thanks

Alex

On 07/07/2016 23:16, Monte Goulding wrote:

>> On 8 Jul 2016, at 7:52 AM, Scott Rossi <[hidden email]> wrote:
>>
>> I've always thought lowercase "L" is a poor choice to prefix a variable
>> name.  Is it an L? It is a capital i? Is it a pipe?
> For what it’s worth we use `s` in the team for script locals. There are some older scripts like libURL that use some other prefixing conventions.
>
> Cheers
>
> Monte
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Get fillGradient props

Mike Bonner
Somewhere I once ran across a list of suggested lc naming conventions, it
helped me greatly. If I recall it was s for script locals, t for handler
locals (t for temporary) g for globals, k for constants, c for custom
properties. and I don't know if it was in the same list, but I add a
trailing A for arrays.  Sure makes it easy to keep track of whats what, so
to whoever wrote that list.. Thank you!

On Thu, Jul 7, 2016 at 6:00 PM, Alex Tweedly <[hidden email]> wrote:

> What do you use for handler-local variables ?
>
> Thanks
>
> Alex
>
>
> On 07/07/2016 23:16, Monte Goulding wrote:
>
>> On 8 Jul 2016, at 7:52 AM, Scott Rossi <[hidden email]> wrote:
>>>
>>> I've always thought lowercase "L" is a poor choice to prefix a variable
>>> name.  Is it an L? It is a capital i? Is it a pipe?
>>>
>> For what it’s worth we use `s` in the team for script locals. There are
>> some older scripts like libURL that use some other prefixing conventions.
>>
>> Cheers
>>
>> Monte
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Get fillGradient props

Stephen Barncard-4
from Richard Gaskin:

http://www.fourthworld.com/embassy/articles/scriptstyle.html

Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Thu, Jul 7, 2016 at 6:41 PM, Mike Bonner <[hidden email]> wrote:

> Somewhere I once ran across a list of suggested lc naming conventions, it
> helped me greatly. If I recall it was s for script locals, t for handler
> locals (t for temporary) g for globals, k for constants, c for custom
> properties. and I don't know if it was in the same list, but I add a
> trailing A for arrays.  Sure makes it easy to keep track of whats what, so
> to whoever wrote that list.. Thank you!
>
> On Thu, Jul 7, 2016 at 6:00 PM, Alex Tweedly <[hidden email]> wrote:
>
> > What do you use for handler-local variables ?
> >
> > Thanks
> >
> > Alex
> >
> >
> > On 07/07/2016 23:16, Monte Goulding wrote:
> >
> >> On 8 Jul 2016, at 7:52 AM, Scott Rossi <[hidden email]> wrote:
> >>>
> >>> I've always thought lowercase "L" is a poor choice to prefix a variable
> >>> name.  Is it an L? It is a capital i? Is it a pipe?
> >>>
> >> For what it’s worth we use `s` in the team for script locals. There are
> >> some older scripts like libURL that use some other prefixing
> conventions.
> >>
> >> Cheers
> >>
> >> Monte
> >> _______________________________________________
> >> use-livecode mailing list
> >> [hidden email]
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Get fillGradient props

Stephen Barncard-4
RG:

"You can quickly identify whether a variable is local or global, or whether
it was passed in as an argument, if you preceed the descriptive name with a
lower-case letter to determine its type."
Char Meaning Example

g
Global variable gMyGlobal

t
Local ("temporary") variable tMyVar

s
Script-local var* (sometimes called "static") sMyVar

p
Parameter (also called an argument) pMyParam

k
Constant* kMyNumber

u
User-defined (or custom) properties uMyProp




Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Thu, Jul 7, 2016 at 6:50 PM, stephen barncard <
[hidden email]> wrote:

> from Richard Gaskin:
>
> http://www.fourthworld.com/embassy/articles/scriptstyle.html
>
> Stephen Barncard - Sebastopol Ca. USA -
> mixstream.org
>
> On Thu, Jul 7, 2016 at 6:41 PM, Mike Bonner <[hidden email]> wrote:
>
>> Somewhere I once ran across a list of suggested lc naming conventions, it
>> helped me greatly. If I recall it was s for script locals, t for handler
>> locals (t for temporary) g for globals, k for constants, c for custom
>> properties. and I don't know if it was in the same list, but I add a
>> trailing A for arrays.  Sure makes it easy to keep track of whats what, so
>> to whoever wrote that list.. Thank you!
>>
>> On Thu, Jul 7, 2016 at 6:00 PM, Alex Tweedly <[hidden email]> wrote:
>>
>> > What do you use for handler-local variables ?
>> >
>> > Thanks
>> >
>> > Alex
>> >
>> >
>> > On 07/07/2016 23:16, Monte Goulding wrote:
>> >
>> >> On 8 Jul 2016, at 7:52 AM, Scott Rossi <[hidden email]> wrote:
>> >>>
>> >>> I've always thought lowercase "L" is a poor choice to prefix a
>> variable
>> >>> name.  Is it an L? It is a capital i? Is it a pipe?
>> >>>
>> >> For what it’s worth we use `s` in the team for script locals. There are
>> >> some older scripts like libURL that use some other prefixing
>> conventions.
>> >>
>> >> Cheers
>> >>
>> >> Monte
>> >> _______________________________________________
>> >> use-livecode mailing list
>> >> [hidden email]
>> >> Please visit this url to subscribe, unsubscribe and manage your
>> >> subscription preferences:
>> >> http://lists.runrev.com/mailman/listinfo/use-livecode
>> >>
>> >
>> >
>> > _______________________________________________
>> > use-livecode mailing list
>> > [hidden email]
>> > Please visit this url to subscribe, unsubscribe and manage your
>> > subscription preferences:
>> > http://lists.runrev.com/mailman/listinfo/use-livecode
>> >
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Get fillGradient props

Mike Bonner
Ah, it was u not c thats right.  Thanks richard, that and "extending the
message path" stuff helped me get my grok on.  I think I saw c being used
for custom properties somewhere else and it stuck for some reason.

On Thu, Jul 7, 2016 at 7:51 PM, stephen barncard <
[hidden email]> wrote:

> RG:
>
> "You can quickly identify whether a variable is local or global, or whether
> it was passed in as an argument, if you preceed the descriptive name with a
> lower-case letter to determine its type."
> Char Meaning Example
>
> g
> Global variable gMyGlobal
>
> t
> Local ("temporary") variable tMyVar
>
> s
> Script-local var* (sometimes called "static") sMyVar
>
> p
> Parameter (also called an argument) pMyParam
>
> k
> Constant* kMyNumber
>
> u
> User-defined (or custom) properties uMyProp
>
>
>
>
> Stephen Barncard - Sebastopol Ca. USA -
> mixstream.org
>
> On Thu, Jul 7, 2016 at 6:50 PM, stephen barncard <
> [hidden email]> wrote:
>
> > from Richard Gaskin:
> >
> > http://www.fourthworld.com/embassy/articles/scriptstyle.html
> >
> > Stephen Barncard - Sebastopol Ca. USA -
> > mixstream.org
> >
> > On Thu, Jul 7, 2016 at 6:41 PM, Mike Bonner <[hidden email]> wrote:
> >
> >> Somewhere I once ran across a list of suggested lc naming conventions,
> it
> >> helped me greatly. If I recall it was s for script locals, t for handler
> >> locals (t for temporary) g for globals, k for constants, c for custom
> >> properties. and I don't know if it was in the same list, but I add a
> >> trailing A for arrays.  Sure makes it easy to keep track of whats what,
> so
> >> to whoever wrote that list.. Thank you!
> >>
> >> On Thu, Jul 7, 2016 at 6:00 PM, Alex Tweedly <[hidden email]> wrote:
> >>
> >> > What do you use for handler-local variables ?
> >> >
> >> > Thanks
> >> >
> >> > Alex
> >> >
> >> >
> >> > On 07/07/2016 23:16, Monte Goulding wrote:
> >> >
> >> >> On 8 Jul 2016, at 7:52 AM, Scott Rossi <[hidden email]>
> wrote:
> >> >>>
> >> >>> I've always thought lowercase "L" is a poor choice to prefix a
> >> variable
> >> >>> name.  Is it an L? It is a capital i? Is it a pipe?
> >> >>>
> >> >> For what it’s worth we use `s` in the team for script locals. There
> are
> >> >> some older scripts like libURL that use some other prefixing
> >> conventions.
> >> >>
> >> >> Cheers
> >> >>
> >> >> Monte
> >> >> _______________________________________________
> >> >> use-livecode mailing list
> >> >> [hidden email]
> >> >> Please visit this url to subscribe, unsubscribe and manage your
> >> >> subscription preferences:
> >> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >> >>
> >> >
> >> >
> >> > _______________________________________________
> >> > use-livecode mailing list
> >> > [hidden email]
> >> > Please visit this url to subscribe, unsubscribe and manage your
> >> > subscription preferences:
> >> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >> >
> >> _______________________________________________
> >> use-livecode mailing list
> >> [hidden email]
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >
> >
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Get fillGradient props

Monte Goulding-2
In reply to this post by Alex Tweedly

> On 8 Jul 2016, at 10:00 AM, Alex Tweedly <[hidden email]> wrote:
>
> What do you use for handler-local variables ?

`t` for temporary. I believe we fairly closely follow Richard’s scripting style guide http://fourthworld.com/embassy/articles/scriptstyle.html#Variables

However the team does use `c` instead of `u` for custom properties. I’m not sure why there’s that variance but I vaguely recall a previous version of the style guide recommended `c` so we may continue to use it for historical reasons… That would be back in the dark ages of the Revolution 1.0 beta. When a wee little Kevin and his mates had a vision ;-)

Cheers

Monte

>
> Thanks
>
> Alex
>
> On 07/07/2016 23:16, Monte Goulding wrote:
>>> On 8 Jul 2016, at 7:52 AM, Scott Rossi <[hidden email]> wrote:
>>>
>>> I've always thought lowercase "L" is a poor choice to prefix a variable
>>> name.  Is it an L? It is a capital i? Is it a pipe?
>> For what it’s worth we use `s` in the team for script locals. There are some older scripts like libURL that use some other prefixing conventions.
>>
>> Cheers
>>
>> Monte
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: Get fillGradient props

beugelaar
According Richard's scripting guide the use of 'c' is used for objects containing behavior scripts to denote their special use as a sort of class definition as it is commonly done in lower-level languages.

Regards,
Erik


Sent from solidit

-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf Of Monte Goulding
Sent: vrijdag 8 juli 2016 04:19
To: How to use LiveCode <[hidden email]>
Subject: Re: Get fillGradient props


> On 8 Jul 2016, at 10:00 AM, Alex Tweedly <[hidden email]> wrote:
>
> What do you use for handler-local variables ?

`t` for temporary. I believe we fairly closely follow Richard’s scripting style guide http://fourthworld.com/embassy/articles/scriptstyle.html#Variables

However the team does use `c` instead of `u` for custom properties. I’m not sure why there’s that variance but I vaguely recall a previous version of the style guide recommended `c` so we may continue to use it for historical reasons… That would be back in the dark ages of the Revolution 1.0 beta. When a wee little Kevin and his mates had a vision ;-)

Cheers

Monte

>
> Thanks
>
> Alex
>
> On 07/07/2016 23:16, Monte Goulding wrote:
>>> On 8 Jul 2016, at 7:52 AM, Scott Rossi <[hidden email]> wrote:
>>>
>>> I've always thought lowercase "L" is a poor choice to prefix a
>>> variable name.  Is it an L? It is a capital i? Is it a pipe?
>> For what it’s worth we use `s` in the team for script locals. There are some older scripts like libURL that use some other prefixing conventions.
>>
>> Cheers
>>
>> Monte
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Erik Beugelaar https://www.solidit.nl
Reply | Threaded
Open this post in threaded view
|

Re: Get fillGradient props

J. Landman Gay
In reply to this post by Mike Bonner
I think we're pretty evenly split between "c" and "u". I prefer "c" because
it is, after all, a custom property. Those who migrated from SuperCard
often prefer "u" because over there, I believe, they are called user
properties.

Richard's guide is pretty good and I follow the other conventions but I
can't get used to writing a "u" for something that starts with a "c".
Apparently the team feels the same.

Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com



On July 7, 2016 8:56:21 PM Mike Bonner <[hidden email]> wrote:

> Ah, it was u not c thats right.  Thanks richard, that and "extending the
> message path" stuff helped me get my grok on.  I think I saw c being used
> for custom properties somewhere else and it stuck for some reason.
>
> On Thu, Jul 7, 2016 at 7:51 PM, stephen barncard <
> [hidden email]> wrote:
>
>> RG:
>>
>> "You can quickly identify whether a variable is local or global, or whether
>> it was passed in as an argument, if you preceed the descriptive name with a
>> lower-case letter to determine its type."
>> Char Meaning Example
>>
>> g
>> Global variable gMyGlobal
>>
>> t
>> Local ("temporary") variable tMyVar
>>
>> s
>> Script-local var* (sometimes called "static") sMyVar
>>
>> p
>> Parameter (also called an argument) pMyParam
>>
>> k
>> Constant* kMyNumber
>>
>> u
>> User-defined (or custom) properties uMyProp
>>
>>
>>
>>
>> Stephen Barncard - Sebastopol Ca. USA -
>> mixstream.org
>>
>> On Thu, Jul 7, 2016 at 6:50 PM, stephen barncard <
>> [hidden email]> wrote:
>>
>> > from Richard Gaskin:
>> >
>> > http://www.fourthworld.com/embassy/articles/scriptstyle.html
>> >
>> > Stephen Barncard - Sebastopol Ca. USA -
>> > mixstream.org
>> >
>> > On Thu, Jul 7, 2016 at 6:41 PM, Mike Bonner <[hidden email]> wrote:
>> >
>> >> Somewhere I once ran across a list of suggested lc naming conventions,
>> it
>> >> helped me greatly. If I recall it was s for script locals, t for handler
>> >> locals (t for temporary) g for globals, k for constants, c for custom
>> >> properties. and I don't know if it was in the same list, but I add a
>> >> trailing A for arrays.  Sure makes it easy to keep track of whats what,
>> so
>> >> to whoever wrote that list.. Thank you!
>> >>
>> >> On Thu, Jul 7, 2016 at 6:00 PM, Alex Tweedly <[hidden email]> wrote:
>> >>
>> >> > What do you use for handler-local variables ?
>> >> >
>> >> > Thanks
>> >> >
>> >> > Alex
>> >> >
>> >> >
>> >> > On 07/07/2016 23:16, Monte Goulding wrote:
>> >> >
>> >> >> On 8 Jul 2016, at 7:52 AM, Scott Rossi <[hidden email]>
>> wrote:
>> >> >>>
>> >> >>> I've always thought lowercase "L" is a poor choice to prefix a
>> >> variable
>> >> >>> name.  Is it an L? It is a capital i? Is it a pipe?
>> >> >>>
>> >> >> For what it’s worth we use `s` in the team for script locals. There
>> are
>> >> >> some older scripts like libURL that use some other prefixing
>> >> conventions.
>> >> >>
>> >> >> Cheers
>> >> >>
>> >> >> Monte
>> >> >> _______________________________________________
>> >> >> use-livecode mailing list
>> >> >> [hidden email]
>> >> >> Please visit this url to subscribe, unsubscribe and manage your
>> >> >> subscription preferences:
>> >> >> http://lists.runrev.com/mailman/listinfo/use-livecode
>> >> >>
>> >> >
>> >> >
>> >> > _______________________________________________
>> >> > use-livecode mailing list
>> >> > [hidden email]
>> >> > Please visit this url to subscribe, unsubscribe and manage your
>> >> > subscription preferences:
>> >> > http://lists.runrev.com/mailman/listinfo/use-livecode
>> >> >
>> >> _______________________________________________
>> >> use-livecode mailing list
>> >> [hidden email]
>> >> Please visit this url to subscribe, unsubscribe and manage your
>> >> subscription preferences:
>> >> http://lists.runrev.com/mailman/listinfo/use-livecode
>> >>
>> >
>> >
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Get fillGradient props

Richard Gaskin
J. Landman Gay wrote:

> I think we're pretty evenly split between "c" and "u". I prefer "c" because
> it is, after all, a custom property. Those who migrated from SuperCard
> often prefer "u" because over there, I believe, they are called user
> properties.
>
> Richard's guide is pretty good and I follow the other conventions but I
> can't get used to writing a "u" for something that starts with a "c".
> Apparently the team feels the same.

Back in those early days, when I first started noticing the relatively
consistent naming conventions in use among some xTalk programmers that I
later documented in that article, OOP was just coming into vogue and at
the time several authors were commonly use a "c" prefix to denote class
definitions in some language (perhaps I first got it from a Dave Mark
book?  Been so long I don't recall).

Although it's been such a long time between my first proposal for
parentScripts discussed with the Allegiant team for SuperCard and the
xTalk world's first implementation in LC a few years ago, I've always
held onto the belief that the feature's value would eventually be
self-evident enough to see it happen in some xTalk or another.

Since parentScripts (or as they're now unfortunately/ambiguously called,
"behaviors") are in effect class definitions, all these years I've been
holding out hope of using "c" as an identifier for those class
definition objects.  And indeed, now that we finally have what LC calls
behaviors, I use "c" that way, in the names of the objects holding a
behavior script.

It's an admittedly small benefit, made even smaller by my habit of also
coloring buttons with behavior scripts a bright yellow so they stand out
even more.  But sometimes that sort of OCD thing makes me happy.

So while LC's nomenclature may make "c" a more natural-seeming fit for
what it calls "custom properties" for the feature that premiered in the
xTalk world as "user-defined properties" in SuperCard, for my own code
(and Ken's and some others as you've noted) I still use "u" for those,
at long last able to use "c" for the purpose I'd always hoped for. :)

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Get fillGradient props

J. Landman Gay
You old OCDer, you.  :-) Since behavior scripts are only referenced in a
"set the behavior" statement, I'm not sure where you'd use an initial flag.
But if I ever need one, I'd use "b"  for "behavior".  For now I just name
the button with a trailing "behavior" string,, i. e., "scrollBehavior".

We are all odd in our own way, but as long as we're consistently odd it works.

Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com



On July 8, 2016 11:00:39 AM Richard Gaskin <[hidden email]> wrote:

> J. Landman Gay wrote:
>
>> I think we're pretty evenly split between "c" and "u". I prefer "c" because
>> it is, after all, a custom property. Those who migrated from SuperCard
>> often prefer "u" because over there, I believe, they are called user
>> properties.
>>
>> Richard's guide is pretty good and I follow the other conventions but I
>> can't get used to writing a "u" for something that starts with a "c".
>> Apparently the team feels the same.
>
> Back in those early days, when I first started noticing the relatively
> consistent naming conventions in use among some xTalk programmers that I
> later documented in that article, OOP was just coming into vogue and at
> the time several authors were commonly use a "c" prefix to denote class
> definitions in some language (perhaps I first got it from a Dave Mark
> book?  Been so long I don't recall).
>
> Although it's been such a long time between my first proposal for
> parentScripts discussed with the Allegiant team for SuperCard and the
> xTalk world's first implementation in LC a few years ago, I've always
> held onto the belief that the feature's value would eventually be
> self-evident enough to see it happen in some xTalk or another.
>
> Since parentScripts (or as they're now unfortunately/ambiguously called,
> "behaviors") are in effect class definitions, all these years I've been
> holding out hope of using "c" as an identifier for those class
> definition objects.  And indeed, now that we finally have what LC calls
> behaviors, I use "c" that way, in the names of the objects holding a
> behavior script.
>
> It's an admittedly small benefit, made even smaller by my habit of also
> coloring buttons with behavior scripts a bright yellow so they stand out
> even more.  But sometimes that sort of OCD thing makes me happy.
>
> So while LC's nomenclature may make "c" a more natural-seeming fit for
> what it calls "custom properties" for the feature that premiered in the
> xTalk world as "user-defined properties" in SuperCard, for my own code
> (and Ken's and some others as you've noted) I still use "u" for those,
> at long last able to use "c" for the purpose I'd always hoped for. :)
>
> --
>   Richard Gaskin
>   Fourth World Systems
>   Software Design and Development for the Desktop, Mobile, and the Web
>   ____________________________________________________________________
>   [hidden email]                http://www.FourthWorld.com
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Get fillGradient props

Richard Gaskin
J. Landman Gay wrote:

 > Since behavior scripts are only referenced in a "set the behavior"
 > statement, I'm not sure where you'd use an initial flag.

Not in code, just in the object name.


 > But if I ever need one, I'd use "b"  for "behavior".

I could, but I'm still holding out hope that the original term LC first
implemented this with, parentScript, will one day become the preferred
token for that.

Yep, I'm a dreamer. :)

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Get fillGradient props

mwieder
Richard Gaskin <ambassador@...> writes:

>
> J. Landman Gay wrote:
>
>  > Since behavior scripts are only referenced in a "set the behavior"
>  > statement, I'm not sure where you'd use an initial flag.
>
> Not in code, just in the object name.

I use the word "behavior" in the object name, as in

button "btnStorageFieldBehavior"
or
stack "PageObjectsBehavior"

>
>  > But if I ever need one, I'd use "b"  for "behavior".
>
> I could, but I'm still holding out hope that the original term LC first
> implemented this with, parentScript, will one day become the preferred
> token for that.

I think "parent" has the possibility of becoming confused with "owner"
when thinking of the message path, so I like "behavior" a bit better.
I'd probably prefer "shadow", as I think of behavior/parent scripts as
private backscripts for objects.

--
 Mark Wieder
 [hidden email]




_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
--
 Mark Wieder
 ahsoftware@gmail.com
12