ID persistance

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9579
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

ID persistance

Post by dunbarx » Fri Feb 01, 2019 6:51 pm

I gave incorrect information earlier about the permanence of ID's, a holdover from old HC thinking.

I suffer from old thinking overall.

These days, one can set the ID of any control, image or stack at will. I thought that the ID for controls was set at creation time, and could not change. The dictionary still asserts this, and further, a la HC, that the ID for a deleted control is permanently retired, like Micky Mantle's "9".

In early versions of Revolution the ID was in fact immutable, like HC.

But, given that there is another, settable, property, the "altID", does anyone think this is useful in any way? It seems to me that locking the ID (and reserving that value for posterity) has several benefits.

I know this is not going to change.

Craig Newman

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: ID persistance

Post by Klaus » Fri Feb 01, 2019 7:12 pm

Hi Craig,

I just checked hte dictionary of LC 9.02 and it told me that we can only change the IDs of stacks and images! Who told you otherwise?

I have no idea if altID is useful in any way, never used/had to use it.

Best

Klaus

P.S.
Please don't follow this %#Ω§*# "plural-with-an-apostrophe" trend! :D

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: ID persistance

Post by Klaus » Fri Feb 01, 2019 7:15 pm

Ah, just saw the other post with Mark W. answer, I did not know this either!? :shock:
Lets see what the motherships says.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9579
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: ID persistance

Post by dunbarx » Fri Feb 01, 2019 7:34 pm

Klaus.

Right, like you, apparently, I never tried to, or had need to change an ID.

I think I have been comforted in the past with persistent ID's, though I cannot think why right now.

Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9579
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: ID persistance

Post by dunbarx » Fri Feb 01, 2019 9:05 pm

Please don't follow this %#Ω§*# "plural-with-an-apostrophe" trend!
So, IDs, not ID's ?

Surely it is not a possessive, so the apostrophe may in fact be grammatically incorrect.

But "IDs" doesn't scan well for me.

IDS? Nope.

I know: IDIES. :D

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: ID persistance

Post by FourthWorld » Fri Feb 01, 2019 9:09 pm

Dr. Raney added altID back in the early days to better support ports of SuperCard projects. Unlike HC, SupreCard files were not directly openable in MC, so a converter was needed to run in SC first to create a description file of all objects, then that file was read into MC to construct the project in MC format.

Since conversions from other xTalks are very rare these days, and for different reasons the primary ID is now changeable, I can't think of any use for the altID property.

In fact, given that good names are very readable in code and IDs are inherently cryptic in code, it's only for very specialized purposes one would ever need to change even the ID property.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: ID persistance

Post by jacque » Sat Feb 02, 2019 5:56 pm

Please don't follow this %#Ω§*# "plural-with-an-apostrophe" trend!
It's actually correct syntax, it only looks like a trend because so few people use it. I learned it back in grade school.

The ID's value is 1 -- a single ID
The IDs' values are all the same -- multiple IDs

However, unless you have a clone, we'd never write "Klaus' shirts are red." If I've ever done that, either I was in error or I made a typo.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: ID persistance

Post by Klaus » Sat Feb 02, 2019 6:13 pm

I am talking about the PLURAL (as in "plural-with-an-apostrophe") and you corretly wrote:
-> multiple IDs (and NOT: multiple ID's, you NEVER learned that at school))

You are talking about the GENITIV, which is of course correct, since you learned this at school:
-> The ID's value is 1 (value of the ID)
-> The IDs' values are all the same (values of the IDs)

However "Klaus' shirts are red" is correct german when dealing with a genitiv for words with a trailing S! Sorry for being so picky with languages, but this is something I really love. 8)

And language is being treated horribly these times in every country...
(your <> you're | then <> than etc. not to mention german :( )

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: ID persistance

Post by jacque » Sat Feb 02, 2019 6:32 pm

LOL. I think it's telling that a German knows what to call the parts of speech better than an American. I think that's why I did so poorly in Latin class. :)

I agree with you about the ignorance of homonyms (see, I do know that word.) You see it everywhere.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: ID persistance

Post by bogs » Sat Feb 02, 2019 10:18 pm

Klaus wrote:
Sat Feb 02, 2019 6:13 pm
Sorry for being so picky with languages, but this is something I really love. 8)
Language changes over time, other wise we'd still be spelling 'book' as 'bok'. I can remember within my own lifetime when 'ain't' wasn't a word because it could not be found in any existing dictionary. Funny how things change :P
Image

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: ID persistance

Post by mwieder » Sun Feb 03, 2019 2:48 am

"Klaus' shirts are red" is correct syntactically, but implies that *all* his shirts are red. Otherwise it's necessary to add a quantifying modifier: "Three of Klaus' shirts are red". The fact that "shirts" and "are" are plural indicators eliminates the situation where Klaus only has one red shirt, although he may still have no red shirts with a "None of..." quantifier, although that would make the original statement nonsensical (as if this thread needed more push in that direction).

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: ID persistance

Post by mwieder » Sun Feb 03, 2019 2:49 am


Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: ID persistance

Post by Klaus » Sun Feb 03, 2019 4:24 am

I do not own any red shirt! 8)

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: ID persistance

Post by mwieder » Sun Feb 03, 2019 6:32 am

:shock:
Time to crowdfund a red shirt for Klaus!

SparkOut
Posts: 2839
Joined: Sun Sep 23, 2007 4:58 pm

Re: ID persistance

Post by SparkOut » Sun Feb 03, 2019 8:37 am

Klausimausi ranks much higher than a red shirt. At least blue, if not gold. 8)

Post Reply

Return to “Talking LiveCode”