type (SOLVED)
type (SOLVED)
How works type?
May you show me some examples?
What does "A type definition defines an alias, it names the given type with the given Name, allowing the name to be used instead of the type." means? Is it dangerous?
May you show me some examples?
What does "A type definition defines an alias, it names the given type with the given Name, allowing the name to be used instead of the type." means? Is it dangerous?
Last edited by MaxV on Tue Sep 20, 2016 11:02 am, edited 1 time in total.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: type alias definitions
Bernd: MaxV is referring to type definitions in LiveCode Builder, not the "type" command in LiveCode Script.
MaxV: For example:
It's not currently mega useful to use type definitions in LCB, because you can only alias existing types and there's no way to create new, distinct types. Good news is that this will very likely be changing as part of the Infinite LiveCode project.
MaxV: For example:
Code: Select all
public type URI is String
public handler GetHomeURI() returns URI
return "https://livecode.com/"
end handler
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com
-
- VIP Livecode Opensource Backer
- Posts: 858
- Joined: Wed Jun 24, 2009 1:17 pm
- Location: Plymouth, UK
- Contact:
Re: type
Max are you by any chance asking how to extract meaning from a particularly mushy sentence in the "LiveCode Builder Language Reference" section in the Guide (now part of the dictionary)?
OK here's my best attempt - a little later in the document there is "a type describes a kind of value" so my current reading of Max's sentence is "A type definition creates an alias (an alias being a type and name pairing) which means if you want, for example, to refer to the type of a variable you declared as an 'Integer', you can use the alias 'Integer'"
Now my head hurts. Who can do a better interpretation? Or correct what I've written?
Kind regards
Dave
So to answer your question - I don't know - the meaning is elusive and slippery like a wet fish. I think if we were to read the whole document we would have a better idea (English as a language is mushy). Actually I did read that document about six months ago and think I did have a slight grasp on it's meaning at the time - but on examining it now it's swum away...A type definition defines an alias, it names the given type with the given Name, allowing the name to be used instead of the type.
OK here's my best attempt - a little later in the document there is "a type describes a kind of value" so my current reading of Max's sentence is "A type definition creates an alias (an alias being a type and name pairing) which means if you want, for example, to refer to the type of a variable you declared as an 'Integer', you can use the alias 'Integer'"
Now my head hurts. Who can do a better interpretation? Or correct what I've written?
Kind regards
Dave
"...this is not the code you are looking for..."
Re: type (SOLVED)
Thank you.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: type alias definitions
So Infinite is still happening then!? This is the first I've heard of it since May at the funding. 3 Months and a Summer 2016 delivery was promised, "not 2017"! I'm surprised that no-one has taken the time to update us on its progress and apologise for the delay. I shouldn't be surprised as it's not really the LC way, to come through on promises or make apologies. Where is our $65k?peter-b wrote:... Good news is that this will very likely be changing as part of the Infinite LiveCode project.
Sorry to MaxV for the subject hijacking.
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: type (SOLVED)
^ I posted a similar complaining about Infinite LiveCode not being seen anywhere on the first day of autumn on the FaceBook LC dev group, but I didn't really expect it to happen by then, I am just super-jazzed and chomping at the bit to get into it. If you look at the github LC site you will see there are some things going on, like Java-FFI for example. I was expecting it for 8.1/8.2 release but it looks like it will be LiveCode 9 now.
Re: type (SOLVED)
Java will definitely be useful and good to have. But I was more hoping for Obj-C myself. So far I have had no response to my posts on the blog site or here on the forum. I have just sent an email via Heather and hopefully we'll hear something back soon. Or maybe even a pledge refund. Though I doubt very much the later. And marginally less the former
-
- VIP Livecode Opensource Backer
- Posts: 9836
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: type (SOLVED)
Sean, forgive my ignorance of Objective-C, but what makes accessing libraries made with it prohibitively difficult from C++?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: type (SOLVED)
Objective C stuff will be phase 2, and generic C FFI bindings will be phase 3. We are doing Infinite LiveCode in stages so that we keep the scope of each part of the project manageable and well-defined.seaniepie wrote:Java will definitely be useful and good to have. But I was more hoping for Obj-C myself. So far I have had no response to my posts on the blog site or here on the forum. I have just sent an email via Heather and hopefully we'll hear something back soon. Or maybe even a pledge refund. Though I doubt very much the later. And marginally less the former
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com