Re: number = layer?

2021-06-06 Thread Curry Kenworthy via use-livecode


Paul:

> if word 7 of X = the layer of fld "Address" then

Sean:

> If word 7 of X = the number of fld “Address” then

I prefer this:

if short name of field N is "Address" then

Best wishes,

Curry Kenworthy

Custom Software Development
"Better Methods, Better Results"
LiveCode Training and Consulting
http://livecodeconsulting.com/

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: number = layer?

2021-06-05 Thread Paul Dupuis via use-livecode

Thank you.


When I looked up 'number" for a property of an object in the Dictionary 
the only entry I found for number was "the number of  and all 
its variants - i.e counts. I must have just missed number as a property 
of a single object.



On 6/5/2021 2:18 PM, Pi Digital via use-livecode wrote:

Hi Paul.

Your field numbers will not be the same as layer numbers if anything else is in 
a layer between or before them.

The better indicator would be
If word 7 of X = the number of fld “Address” then

That will do what you are thinking I believe.

Sean


On 5 Jun 2021, at 19:12, Paul Dupuis via use-livecode 
 wrote:

Here is a basic question I am not sure of (after decades of LC coding) and 
can't pin down in teh Dictionary

If you execute "put the selectedChunk into X" then (assume a valid selection) X contains an expression of 
the form "char  to  of field "

If I want to check that the selection is in one of a number of fields on my stack, say 
called "Address", is the following conditional correct?

if word 7 of X = the layer of fld "Address" then -- the selection is in the 
address field

In other words, is the  returned by selectedChunk the same as the 
layer property of objects OR is it an index to the number of fields on that card (two 
different things if you have objects other than fields on the card)

Any one know for sure?


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: number = layer?

2021-06-05 Thread Pi Digital via use-livecode
Hi Paul. 

Your field numbers will not be the same as layer numbers if anything else is in 
a layer between or before them. 

The better indicator would be 
If word 7 of X = the number of fld “Address” then

That will do what you are thinking I believe. 

Sean

> On 5 Jun 2021, at 19:12, Paul Dupuis via use-livecode 
>  wrote:
> 
> Here is a basic question I am not sure of (after decades of LC coding) and 
> can't pin down in teh Dictionary
> 
> If you execute "put the selectedChunk into X" then (assume a valid selection) 
> X contains an expression of the form "char  to  of field 
> "
> 
> If I want to check that the selection is in one of a number of fields on my 
> stack, say called "Address", is the following conditional correct?
> 
> if word 7 of X = the layer of fld "Address" then -- the selection is in the 
> address field
> 
> In other words, is the  returned by selectedChunk the same as 
> the layer property of objects OR is it an index to the number of fields on 
> that card (two different things if you have objects other than fields on the 
> card)
> 
> Any one know for sure?
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


number = layer?

2021-06-05 Thread Paul Dupuis via use-livecode
Here is a basic question I am not sure of (after decades of LC coding) 
and can't pin down in teh Dictionary


If you execute "put the selectedChunk into X" then (assume a valid 
selection) X contains an expression of the form "char  to  
of field "


If I want to check that the selection is in one of a number of fields on 
my stack, say called "Address", is the following conditional correct?


if word 7 of X = the layer of fld "Address" then -- the selection is in 
the address field


In other words, is the  returned by selectedChunk the same 
as the layer property of objects OR is it an index to the number of 
fields on that card (two different things if you have objects other than 
fields on the card)


Any one know for sure?


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode