Nothing new here

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

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

Nothing new here

Post by dunbarx » Sat Jul 11, 2020 3:35 pm

A small issue.

In another thread, a user used "new card" as a command inline in a handler. "New card" is indeed a menuItem in "object" menu. But there is no reference to that, er, command, that is, nothing in the dictionary with the word "new", with syntax, perhaps,

Code: Select all

"new object [as new name]"
It works also for lots of other objects, though not for dataGrids. The inLine command will allow one to name the new control, the menuItem (limited to a field) will not.

Shouldn't this be updated? Anyone else not know, after over a decade with LC, and three with HC (which would have used "doMenu" to effect the same thing, and annotated the fact) that you could say:

Code: Select all

new field "XYZ"
I have not yet played with the menuItem "new Control", along with everything it encompasses.

Craig

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Nothing new here

Post by richmond62 » Sat Jul 11, 2020 4:30 pm

It's certainly new to me . . .

But, Hey, I came late to the RR/LC party, joining it in 2001. 8)

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

Re: Nothing new here

Post by Klaus » Sat Jul 11, 2020 4:55 pm

In the dictionary for "create": Synonyms -> new

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

Re: Nothing new here

Post by dunbarx » Sat Jul 11, 2020 5:23 pm

Klaus.

Don't confuse me with the facts.

OK. Hmmm, how do I save face here? Ah. Why isn't "create" a synonym of "new"?

Craig

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Nothing new here

Post by richmond62 » Sat Jul 11, 2020 8:47 pm

On the few times I've needed to make things by code on the fly I have
always used create.

And a synonym for create that involved new would surely be make new.

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

Re: Nothing new here

Post by SparkOut » Sat Jul 11, 2020 9:00 pm

I am a bit bemused by the idea that "create" needs a synonym, and as "new" is not a verb, why that should be the choice.

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

Re: Nothing new here

Post by dunbarx » Sat Jul 11, 2020 9:48 pm

Sparkout.
as "new" is not a verb, why that should be the choice.
Thank you. At first I was going to ask the OP how a new card could be made that way at all with such a peculiar construction. But I tried it first and it worked. Who knew?

I thought it was a case where many new users try to speak ordinary english when coding, and though LC is pretty good, it ain't that good, and they get tripped up.

My face is saved, though many think the effort to do that that is not worth the trouble.

Craig

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

Re: Nothing new here

Post by bogs » Sat Jul 11, 2020 10:07 pm

dunbarx wrote:
Sat Jul 11, 2020 9:48 pm
In another thread, a user used "new card" as a command inline in a handler. "New card" is indeed a menuItem in "object" menu. But there is no reference to that, er, command, that is, nothing in the dictionary with the word "new"
SparkOut wrote:
Sat Jul 11, 2020 9:00 pm
as "new" is not a verb, why that should be the choice.
Thank you. At first I was going to ask the OP how a new card could be made that way at all with such a peculiar construction. But I tried it first and it worked. Who knew?
Who indeed? Weellll, I did, but, that is mostly because I spend my time in Mc. Let us take a little trip back in time, and see things as they were.....

...during the dawn of time, 'new' was the way to go!
aPic_new1.png
Ahhhh, I'm home....
But 'new' started loosing ground to the 'create' - shin-ists....
aPic_new2.png
And then along came Jones...
....until finally, 'new' had it's position completely usurped, and later was blacklisted from even showing up in the reference books Image
aPic_new3.png
I see a bad moon arising...
Boy I'm glad I use old stuff! Image

Edit - And just to show how old I really am, I remember a time when new *was* able to be used as a verb :P
What's the verb for new? Here's the word you're looking for.
new (obsolete) To make new; to recreate; to renew.
Image

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

Re: Nothing new here

Post by FourthWorld » Sat Jul 11, 2020 11:41 pm

dunbarx wrote:
Sat Jul 11, 2020 5:23 pm
Why isn't "create" a synonym of "new"?
It gets weirder: I was curious how HC handles object creation, so I found this:
https://cancel.fm/stuff/share/HyperCard ... uide_1.pdf

Short answer: looks like it doesn't. Not at all, for anything except its virtual (non-persistent) menus and for stacks, both of which use "create". The v2.2 Scripting Guide includes no entry for "new".

Apparently, with no direct means of creating objects, the only workaround was to use a GUI element for that, with "doMenu".

Do I misunderstand the contents of Apple's Guide?

And if I do understand it correctly, what happens if I'm making an app where it makes no sense to provide a GUI menu item for creating a button or a field so I've deleted those menu items, but I want my app to be able to do so? How could I do that without "doMenu"?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

jiml
Posts: 336
Joined: Sat Dec 09, 2006 1:27 am
Location: Los Angeles

Re: Nothing new here

Post by jiml » Sun Jul 12, 2020 7:39 pm

I too was gobsmacked when I saw that post using 'new' to create a card.

I never knew the voodoo that old 'new' could do.

anmldr
Posts: 459
Joined: Tue Sep 11, 2012 11:13 pm

Re: Nothing new here

Post by anmldr » Sun Jul 12, 2020 8:13 pm

OP here...
At first I was going to ask the OP how a new card could be made that way at all with such a peculiar construction.
I have been watching videos and looking at LC Lessons. I picked it up somewhere in them or here on the forum. Anyway, I did not just get lucky trying to use English like construction of the code and find out that it (ta da!) worked. I actually learned it in some of the material. Since it is not common, I will try to remember to CREATE instead.

Thanks for letting me know that it is an oddity :D
Linda

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Nothing new here

Post by richmond62 » Sun Jul 12, 2020 8:19 pm

Thanks for letting me know that it is an oddity
Plenty of oddities round these parts. 8)

BUT, a very friendly and helpful community as well.

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 261
Joined: Sat Aug 16, 2008 9:48 am
Location: Stockholm, Sweden
Contact:

Re: Nothing new here

Post by SWEdeAndy » Mon Jul 13, 2020 12:13 pm

This is one of the amazing things in LiveCode, and I guess we've all experienced it at some point:
Looking something up in the dictionary, and then your eye catches a word in the Related section, and you go "Hmm, that's interesting".
You then go to that entry and learn about a command/function/keyword you never knew, and you go "Wow, that's really useful - it must be new!". Yeah right!
'Cause then you look at the "Introduced" line and expect to see something like 9.0 but no, of course it's 1.0 - it has been there since the very start. :oops:

For example, I've always used "the number of chars of" until just a few years ago when I stumbled upon length(). :shock:
Last edited by SWEdeAndy on Tue Jul 14, 2020 9:30 am, edited 1 time in total.
Andreas Bergendal
Independent app and system developer
WhenInSpace: https://wheninspace.se

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

Re: Nothing new here

Post by dunbarx » Tue Jul 14, 2020 4:40 am

Andreas.

It is worse than you think. Both those methods were native ito the first release of Hypercard.

1987. :wink:

Craig

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 261
Joined: Sat Aug 16, 2008 9:48 am
Location: Stockholm, Sweden
Contact:

Re: Nothing new here

Post by SWEdeAndy » Tue Jul 14, 2020 9:29 am

dunbarx wrote:
Tue Jul 14, 2020 4:40 am
It is worse than you think. Both those methods were native ito the first release of Hypercard.
Indeed, often "since the very start" would not even mean the start of LiveCode (or Revolution, as it were) but HyperCard (and/or Super/Meta-). :)
Andreas Bergendal
Independent app and system developer
WhenInSpace: https://wheninspace.se

Post Reply

Return to “Talking LiveCode”