revTalk for Retards

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Equiarch
Posts: 17
Joined: Fri May 28, 2010 8:13 pm

revTalk for Retards

Post by Equiarch » Thu Jun 03, 2010 1:55 am

hello

I am new to rev and new to programming and was wondering if there is a book or something on how to script in revTalk. You know, like revTalk for retards or something equally insulting. Just one resouce where I can learn all the basics and some trade secrets.

But for right now what I need to know is how to make it so that the same thing happends on enter as on mouseUp where table cells are filled in.

Any help would be appreciated.

Thanks,
Mario

doc
Posts: 148
Joined: Fri Jun 09, 2006 4:30 pm

Re: revTalk for Retards

Post by doc » Thu Jun 03, 2010 3:15 am

Hi Mario,
I doubt that there *is* or ever will be a single resource to learn RevTalk... or at least I haven't found anything close to it yet. Outside of the User Guide, here are some resources that should be helpful to you.

Lot's of good stuff:
http://www.runrev.com/developers/lesson ... tutorials/

My favorite:
http://www.runrev.com/developers/lesson ... nferences/

Dan Shafer's book: "Software At the Speed Of Thought"
It won't cover everything, but it will get you pretty far down the path so that many of the other resources will start making better sense.

Printed Version: https://secure.runrev.com/store/browse/ ... OKSASTV001
Ebook: https://secure.runrev.com/store/browse/ ... OKSASTEV01

Sorry, but I'm not sure I know how to answer the last question you posted. Are you asking about a table field or common edit field?
I'm sure a guru will come by that will be of help.
HTH,
Doc

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: revTalk for Retards

Post by Mark » Thu Jun 03, 2010 8:28 am

Hi Mario,

I have put together a list of links for beginners on my blog. You can find it here.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10317
Joined: Wed May 06, 2009 2:28 pm

Re: revTalk for Retards

Post by dunbarx » Thu Jun 03, 2010 2:42 pm

Hi.

Do you mean "mouseEnter" as well as "mouseUp"?

Equiarch
Posts: 17
Joined: Fri May 28, 2010 8:13 pm

Re: revTalk for Retards

Post by Equiarch » Thu Jun 03, 2010 5:24 pm

dunbarx wrote:Hi.

Do you mean "mouseEnter" as well as "mouseUp"?
I mean when the user types something in a field and presses the Enter Key as well as when they click the button, here is some code to clairify:

Code: Select all

on mouseUp
   set the itemdelimiter to tab
   put  field "freqField" *(81/80) & "hz" into item 3 line 2 of field "intervalTableField"
end mouseUp 
I want the same thing to happen when the Return key or Enter key is pressed.

Peace!

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: revTalk for Retards

Post by Mark » Thu Jun 03, 2010 5:38 pm

Equiarch,

You could, for instance, put the following script into the field script:

Code: Select all

on enterInField
  send "mouseUp" to btn x
end enterInField

on returnInField
  enterInField
end returnInField
Make sure to replace btn x with a correct reference to your button.

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Equiarch
Posts: 17
Joined: Fri May 28, 2010 8:13 pm

Re: revTalk for Retards

Post by Equiarch » Fri Jun 04, 2010 2:15 am

Mark wrote:Equiarch,

You could, for instance, put the following script into the field script:

Code: Select all

on enterInField
  send "mouseUp" to btn x
end enterInField

on returnInField
  enterInField
end returnInField
Make sure to replace btn x with a correct reference to your button.

Best regards,


Mark
Thank you Mark for you suggestion, but it does not seem to work. Any further help would be appreciated.

Regards,
Mario

doc
Posts: 148
Joined: Fri Jun 09, 2006 4:30 pm

Re: revTalk for Retards

Post by doc » Fri Jun 04, 2010 4:54 am

Hey Mario,
I tried attaching a small rev file... no joy, so here is the code:

Code: Select all

on enterInField
   send mouseup to button Button1
end enterInField

on returnInField
   enterInField
   --send mouseup to button Button1 <-- optional method
end returnInField

...it works on this end without fail.

hth,
-Doc-

Equiarch
Posts: 17
Joined: Fri May 28, 2010 8:13 pm

Re: revTalk for Retards

Post by Equiarch » Fri Jun 04, 2010 7:24 am

Thanks for trying Doc

But still no joy here, if you want to send that file to me directly here is my email equiarch@gmail.com or email me and I can send you what I am working on. I have no idea what I'm doing wrong.

Peace,
Mario

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: revTalk for Retards

Post by Mark » Fri Jun 04, 2010 8:42 am

Mario,

What EXACTLY happens, when you try that script? What do you expect to happen? Maybe you have something completely different in mind?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

doc
Posts: 148
Joined: Fri Jun 09, 2006 4:30 pm

Re: revTalk for Retards

Post by doc » Fri Jun 04, 2010 12:32 pm

Mario,
I've sent the small test stack to you as requested. If that doesn't work, then maybe you have something else in mind that we are not understanding.

Regards,
-Doc-

Equiarch
Posts: 17
Joined: Fri May 28, 2010 8:13 pm

Re: revTalk for Retards

Post by Equiarch » Fri Jun 04, 2010 10:09 pm

Thanks Doc

the file you sent me helped me to solve my issue. the problem was that I put quotations around my button name.

Code: Select all

on enterInField
   send mouseup to button "calcBut"
end enterInField
Rev don't like dat.
thanks again everyone.

Peace and Blessings
Mario

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: revTalk for Retards

Post by Mark » Fri Jun 04, 2010 10:13 pm

Mario,

The syntax you just posted is actually correct. Button names are supposed to have quotes around them. Without quotes, your script may not work. Something else must be going on. Perhaps your button name is actuall in a variable?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Equiarch
Posts: 17
Joined: Fri May 28, 2010 8:13 pm

Re: revTalk for Retards

Post by Equiarch » Sun Jun 27, 2010 5:05 am

Hey folks

I was wondering if anyone knows how to allow user input to change the content of a lable. for example I want the user to enter a number in a field then click on a button(calulations will be made upon upmouse) and a lable will display the answer. Is this even possible? Please Help.

Mario

doc
Posts: 148
Joined: Fri Jun 09, 2006 4:30 pm

Re: revTalk for Retards

Post by doc » Sun Jun 27, 2010 5:39 am

Hi Mario,
As a point of reference, I've uploaded a very simple stack that will do what you need.
http://www.docstoolchest.com/LabelDisplay.rev

HTH,
-Doc-

Post Reply