Page 1 of 2
Clear the contents of a field
Posted: Thu Mar 29, 2012 6:57 pm
by HJay
Hi
How do I clear the contents of a field?
I have tried
But that seems to delete the field, I wish the user guide had an index

Re: Clear the contents of a field
Posted: Thu Mar 29, 2012 7:05 pm
by snm
Put "empty" into field "fieldName"
Re: Clear the contents of a field
Posted: Thu Mar 29, 2012 7:07 pm
by HJay
Thanks for the super quick reply

Re: Clear the contents of a field
Posted: Thu Mar 29, 2012 9:42 pm
by dunbarx
Right.
You must read the dictionary about these two commands. They read similarly, but as you found out, act quite differently. This will be an invaluable resource going forward.
Craig Newman
Re: Clear the contents of a field
Posted: Sat Mar 31, 2012 3:26 pm
by HJay
Hi Craig
I have been looking at the dictionary but as yet have not found it to be that helpful I'm afraid
I don't think I understand or know enough of the terminology yet for it to help me.
I have looked up 'clear' and it does refer to 'delete' but what is doesn't do is refer to 'empty' from the 'clear' entry so unless you know 'empty' exists (which I didn't) the dictionary is of no help to a complete beginner.
I am looking forward to learning lots more so I am sure in the future the dictionary will be of vital importance to me then.
I do really wish the LiveCode user manual had an index, I think it would help complete beginners like me
HJay
Re: Clear the contents of a field
Posted: Sun Apr 01, 2012 12:54 am
by dunbarx
You are correct in a way. If you were trying to do this with Hypercard in the 1990's, there would have been two reference books that would have taken you in hand from start to finish. I frequently recommend one of them, "The Complete Hypercard Handbook", by Danny Goodman, as it will provide a solid foundation for LiveCard, which is a superset of that program, but retains almost all of its essential character.
Get that book; it is around. It will help immensely. Write to this forum. We will help immensely. But you are trying to run before walking. This is possible, but very ambitious.
Craig Newman
Re: Clear the contents of a field
Posted: Sun Apr 01, 2012 8:34 am
by HJay
Hi Craig
http://www.amazon.co.uk/The-Complete-Hy ... &sr=1-13#_
Found this on Amazon; is this what I want? It says it is volume 2 so is there a volume 1 I need to track down?
I am a complete beginner as you may have already guessed. I am using the free trial at the moment (1 day left). I have repeatedly watched and tried to replicate the tutorials for the task list app thingy from the nice Scottish lady. I have mind-mapped a lot of it and can tell you at what time in Lesson 3 she starts talking about arrays etc. I have printed out and poured over the user guide. I have searched YouTube for other video tutorials. I have made requests for any face to face training for LiveCode. I have made the 3 5 7 game thingy. I have studied user samples which have overwhelmed me completely. I have learned quite a bit and made my head hurt a lot I have been unable to find a tutorial along the line of what I am trying to do though. Which is why I started asking questions. I have found the forums to be very useful with lots of nice people who will answer my daft questions.

I just wish there was a resource somewhere where so I didn't have to ask the really dumb ones. You are right I do feel like I am trying to run before I can walk, I keep falling over, sitting down, crawling a bit standing up again and then attempting to run again with everyone who is flying past me. I.e. there doesn't seem to be anywhere to walk. I am also coming at this from a standing start the only computer programming I have ever done was on a ZX Spectrum and that only amounted to copying the code out of a book and then spending hours trying to find the missing comma.
Even though I feel a bit frustrated I am enjoying what I am learning, there are a lot of light bulb moments. So if you wouldn’t mind I think I will have to still keep asking the dumb questions.
Eternally grateful
HJay
Re: Clear the contents of a field
Posted: Sun Apr 01, 2012 11:51 am
by snm
HJay wrote:
I have looked up 'clear' and it does refer to 'delete' but what is doesn't do is refer to 'empty' from the 'clear' entry so unless you know 'empty' exists (which I didn't) the dictionary is of no help to a complete beginner.
...
HJay
There is no possibility to code in the language which you have not base knowledge about it's structure, commands, messages,...
You can not remember the name of language element, but you should know it is in the language and where to find it's definition and examples of use if any. For me Dictionary is good tool, I can find there all informations I need - you can filter a lot of cattegories (objects, language,...) and sort them by commands, functins, messages, properties. The only missing in Dictionary is DataGrid properties.
but what I can suggest is to read the User Guide - first just read it from the beginning to the end even if you don't undrstand all what you read. After that you will remember when and what you can find in both the User Guide and the Dictionary.
Marek
[snm]
Re: Clear the contents of a field
Posted: Sun Apr 01, 2012 2:10 pm
by Gene
Hi. It's entirely possible that I'm not understanding the question, but I'll stick my neck out anyway. I have always cleared the contents of a field by simply putting "" into the field. I've done this for years in Director by setting the field = "". In LC, it should be: put "" into field "myField". Be sure to use double quotes, not single.
Give it a whirl.
Cheers - Gene
Re: Clear the contents of a field
Posted: Sun Apr 01, 2012 2:23 pm
by Klaus
Hi Gene,
"" = EMPTY in LiveCode
So:
...
put "" into fld "xyz"
## =
put EMPTY into fld "xyz"
...
Best
Klaus
Re: Clear the contents of a field
Posted: Sun Apr 01, 2012 2:29 pm
by Gene
Klaus wrote:Hi Gene,
"" = EMPTY in LiveCode
So:
...
put "" into fld "xyz"
## =
put EMPTY into fld "xyz"
...
Best
Klaus
Thanks, Klaus, I'm going to file that. It's difficult to teach an old dog new tricks, but not impossible!
Cheers - Gene
Re: Clear the contents of a field
Posted: Sun Apr 01, 2012 2:57 pm
by Klaus
Hi Gene,
no need to learn new tricks, "" still works!
I just wanted to point out that Livecode very often offers many solutions to a problem!
Best
Klaus
Re: Clear the contents of a field
Posted: Sun Apr 01, 2012 3:40 pm
by dunbarx
That is the book you want. If you read through it, and it is an easy read, you will get a very clear idea of the basic structure of LiveCode, which is nearly identical to that of Hypercard, though far richer and more powerful, and far more modern.
LiveCode is insidious in that it tempts one to jump into intermediate projects, when there is still a foundation that must be mastered. This is something you will appreciate only when you actually become an intermediate. You ought to start by simply playing and experimenting, making simple stacks that do simple things. You will find that an address book or a conversion calculator, projects that you likely have an immediate mental picture of how they ought to work, will still challenge you mightily as you actually build it.
But the rewards will be quicker with small projects, and the taste of them will encourage you to do more. Write back...
Craig Newman
Re: Clear the contents of a field
Posted: Sun Apr 01, 2012 4:16 pm
by HJay
Hi Craig
The book has been purchased
I do understand that I need to learn the foundations before I get to intermediate and I also understand that gaps in knowledge are not helpful but...
... I am helping in a study that is attempting to replicate the results of a prior experiment. I have a choice, I either have to cut out an estimated 10,000 cards with maths facts on them that can only be used once or I have to get good at getting a computer to do what I want. I have chosen the latter as after one I will have sore hands but after the other I will probably have a sore head but I will have learned something. I am having to stop myself thinking about the enormity of the task and just think of it as a series of short tasks that I can learn as I go along, hopefully.
I am about to start a new topic in the forum about flash cards as a way of getting what I need into my head as fast as possible but I also do not want to cut corners. I want to know what every line means
HJay
Re: Clear the contents of a field
Posted: Sun Apr 01, 2012 11:58 pm
by dunbarx
You have made the correct choice by going with the computer.
First, your project is simple enough that between yourself and the dozen or two eager contributors here, we will write the whole thing together. It is not uncommon to receive complete solutions to newcomers problems, just because the community likes to write code instead of, at least in my case, working.
Second, at the end of this process, you will have a terrific headstart on this journey, and a powerful tool in hand. Your payment for all this will be to become proficient, and then help others.
Craig Newman