LiveCode: Need help!

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

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

Re: LiveCode: Need help!

Post by mwieder » Thu Mar 01, 2012 8:36 pm

Lighten up, Craig <g> you've also taken some shortcuts here with your code that aren't readily absorbable if you're not familiar with the language.
What made you think you could simply write: "set movement on button "move" to 2000"?
well, your example code, for one thing...

kjetil403 - try this:

Code: Select all

    on mouseDown
      moveLeft
    end mouseDown

    on moveLeft
       local tCurrentLocation
       put the location of button "mover" into tCurrentLocation
       
       if the mouse is down then
          set the location of button "mover" to item 1 of tCurrentLocation - 1 & "," & item 2 of tCurrentLocation
       else
          exit to top
       end if
       
       if item 1 of the topleft of button "mover" < the right of this card then
          exit to top
       end if
       send "moveLeft" to me in 1 second
    end moveLeft
the code for the "moveRight" button is similar

Code: Select all

    on mouseDown
      moveRight
    end mouseDown

    on moveRight
       local tCurrentLocation
       put the location of button "mover" into tCurrentLocation
       
       if the mouse is down then
          set the location of button "mover" to item 1 of tCurrentLocation + 1 & "," & item 2 of tCurrentLocation
       else
          exit to top
       end if
       
       if item 1 of the topleft of button "mover" > the right of this card then
          exit to top
       end if
       send "moveRight" to me in 1 second
    end moveRight

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

Re: LiveCode: Need help!

Post by dunbarx » Thu Mar 01, 2012 10:43 pm

I know, Mark.

But he has just asked what language I used.

You or I would have a half hour of glorious fun writing the whole thing for him. We both have twelve minutes logged already.

That is not what he needs. he needs to learn LC.

Craig

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

Re: LiveCode: Need help!

Post by mwieder » Thu Mar 01, 2012 11:09 pm

Sure. But he (she, whatever) needs a place to stand on to start working those levers. There's a steep enough learning curve to LiveCode without making things cryptic from the start. And I have no intention of writing the whole thing - that takes all the learning experience out of it and especially the *fun* when things start working. Then we can get to the level of more obscure hints and rtfming.

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

Re: LiveCode: Need help!

Post by dunbarx » Fri Mar 02, 2012 1:05 am

Hmmph.

This from a guy who thought the title of his post wasn't explicit enough.

He sounds male.

Anyway, you know I am a sweetheart. This thread is based on an intermediate level expertise, and I expect just a bit of effort from my students. He thinks LC is a software package of pre-animated sprites. I am trying to get him to understand it is a pirate's chest of gold, but a chest that is filled with locked compartments, each requiring work to open.

He is not the first to see LC this way. It has to do with the mobile application possibilities, I think, which is being noticed by a wider audience. This is a good thing. But attracts a slightly different person than the desktop crowd of codgers I am used to.

Craig

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

Re: LiveCode: Need help!

Post by mwieder » Fri Mar 02, 2012 1:45 am

Craig-
This from a guy who thought the title of his post wasn't explicit enough.
<g>

but
This thread is based on an intermediate level expertise
we're in the Complete Beginner's section here, which, I think, is indeed the place for the first halting steps. I agree with you that there's a lot waiting under the hood, but I don't want folks to get discouraged before getting to that Aha! moment. The language is different from almost every other environment, and it takes a bit of getting used to. Jacque has postulated that it takes about a six-week learning curve, and I think that's about right.

You and I have years of xtalk experience behind us to draw from. I'm not about to carry the weight, but I'm not above pointing the right direction.

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

Re: LiveCode: Need help!

Post by dunbarx » Fri Mar 02, 2012 5:28 am

Mark.

I am not sure, but we might be in complete agreement.

Craig

kjetil403
Posts: 9
Joined: Wed Feb 29, 2012 11:17 pm

Re: LiveCode: Need help!

Post by kjetil403 » Fri Mar 02, 2012 7:27 am

Well, yes, im a boy;) And where do you guys think i should start learning the language? Where should i begin. I allso have some few more questions.

1.Is there a program or som place that could help me with actually designing the App?
2. Do i need to code in touch modus and stuff before it can be used on a android,iphone/ipad.
3. How do i get my stack to get bigg/smaller for each mobile?


Ty

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: LiveCode: Need help!

Post by Klaus » Fri Mar 02, 2012 12:14 pm

Hi kjetil403,
kjetil403 wrote:And where do you guys think i should start learning the language? Where should I begin.
I already posted a link to some really great learning resources!
Work through the stack there and get the basics of LiveCode.


Best

Klaus

Post Reply