can't edit cell in stand alone app

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

deebee
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 89
Joined: Mon Jul 19, 2010 6:59 am

Re: can't edit cell in stand alone app

Post by deebee » Fri Feb 11, 2011 4:49 am

pmc wrote:And why do you people use the small letter 't' or 'p' in front of the Filename (or others)? Why use capital letters like in 'acceptDrop' or maybe 'AcceptDrop'?? :| Sigh.....
The lowercase t in front just helps you to remember what you're using the variable for ("t" is for temporary). It's not required, just helpful.

The capital in "acceptDrop" is not a requirement either. It's called "camelCase." It simply makes your variable names easier to read. For example, theQuickRedFoxJumpsOverTheLazyBrownDog is slightly easier to read than thequickredfoxjumpsoverthelazybrowndog.

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

Re: can't edit cell in stand alone app

Post by Klaus » Fri Feb 11, 2011 11:35 am

Hi pmc,
pmc wrote:The thing is that I can't grasp this scripting concept. It is so difficult to understand the concept.
At first do yourself a favour and check the "scripting conference stacks" mentioned above.
They are really great resources and will help you understand the concepts of scritping!
pmc wrote:In Rev's dictionary, filename is list as 'property'. What the heck is a 'property'? :( To me, a 'property' is an asset, something like a house that you brought or a car and things like that...you know. And now, I want to import an 'image' and image is an 'object' :? and a 'button' is also an object......and also, 'image' can also be 'property'......how do you know which to use and how to link all this together is a total mystery and probably only reserved for rocket scientists.
Start small!

Make little example stacks for every new thing you learn, make comments!!! and save them for later use.
That is how I started more than 10 years ago without any internet (and thus without any help from nice people like here in the forum!)!
Yes, those were the days... :D
pmc wrote:How do you make sense out of the sentence above? In English term, it just make no sense at all. If you say something like 'put the Image (or tFilename') into "userimage''' then it make some sense. But it won't work.
OK, LiveCode is similar to the english language, but it is a scripting language in first place!
So the similarity may end here and there. 8)
pmc wrote:It's like 'Run dog eat tomato and Morning Cat'.....how do you probably make any sense out of this sentence?
Hm, that is totally clear to me, but maybe only because I have two cats and am not a native english pseaking person :lol: :lol: :lol:
pmc wrote:Thanks very much, Klaus. You're a nice man.
Thanks, cudos goes to my mom (RIP)!
See above, I know that hte learning cure for LiveCode is very steep and therefore I try to help other people to master in an easier way than I had to.
pmc wrote:And now I have to think about how to save the data in the standalone app
Check my two articles in the RunRev newsletter about exactly this topic:
Part 1: http://runrev.com/newsletter/october/is ... etter3.php
Part 2: http://runrev.com/newsletter/december/i ... etter4.php

Best from germany

Klaus

pmc
Posts: 62
Joined: Thu Sep 23, 2010 3:14 am

Re: can't edit cell in stand alone app

Post by pmc » Fri Feb 11, 2011 6:07 pm

Hi Klaus

Thank you again. Yes, I did read the basics.....maybe I'm just not smart enough. When it comes to those "(/)" & "%%" things, I am lost. I will read again...probably for the 7th time. Thanks for the link....now I am beginning to see the some similarity of the things that I want in your write-up.

Another question : why is the 'pulldown' and 'popUp' menu not showing the choices when you select it.......unlike the 'Option' and 'Combo box' menu? Do you need to write scripts for the 'pulldown' and 'popUp' menu? I intend to use the 'popUp' because I can make it invisible but the choices are not showing when I select it.....mmmmm, script the menu to show the selected choice?

Thanks Klaus, I appreciate your help. Without you and other helpful forum members, very soon I'll be a zombie.

pmc
Posts: 62
Joined: Thu Sep 23, 2010 3:14 am

Re: can't edit cell in stand alone app

Post by pmc » Fri Feb 11, 2011 6:31 pm

pmc wrote:It's like 'Run dog eat tomato and Morning Cat'.....how do you probably make any sense out of this sentence?
Hm, that is totally clear to me, but maybe only because I have two cats and am not a native english pseaking person :lol: :lol: :lol:


:D Wait....the word 'Morning' in that sentence is actually an 'object' and has 'properties'. You may have misunderstand the actual meaning of the sentence! :lol: :lol: :lol:

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

Re: can't edit cell in stand alone app

Post by Klaus » Fri Feb 11, 2011 6:33 pm

Hi pmc,

glad you don't give up :D

OK, menu buttons:
1. "pulldown" and "popup" are intended to disappear and do not show what the user has selected!
2. "pulldown" menus can be seen on the Mac or any Windows menubar, wehre you only see the name of the menu.
3. "popup" are used mostly for "context menus" (right-click). they also appear and disappear without a trace 8)
4. "Option" and "combobox" WILL show the selected menu.
5. The user can enter text into a "combobox", but I never understood a practical meaning of this feature :P

Well, that is the nature of these buttons, take it or leave it...
So now you must decide what is suitable for your needs.

Scripting is quite straightforward, use the "menupick" message with the selected menuitem as the parameter:

Code: Select all

on menupick what_the_user_selected
## what_the_user_selected is just a meaningful name, usually I use -> on menupick what :)
  switch what_the_user_selected
  case "copy"
    copy
  break
  case "paste"
   paste
  break
  case" your fancy menu item here"
   do_magical_stuff
  break
  ## etc...
  end switch
end menupick
You get the picture!

Best

Klaus

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

Re: can't edit cell in stand alone app

Post by Klaus » Fri Feb 11, 2011 6:38 pm

Hi pmc,
pmc wrote:
pmc wrote:It's like 'Run dog eat tomato and Morning Cat'.....how do you probably make any sense out of this sentence?
Hm, that is totally clear to me, but maybe only because I have two cats and am not a native english pseaking person :lol: :lol: :lol:
:D
pmc wrote: :D Wait....the word 'Morning' in that sentence is actually an 'object' and has 'properties'. You may have misunderstand the actual meaning of the sentence! :lol: :lol: :lol:
Properties? Ah, yes now you mention it, Mr. Morning owns a little farm in Hackensack, ArkansaW :P

Have a nice weekend!


Best

Klaus

pmc
Posts: 62
Joined: Thu Sep 23, 2010 3:14 am

Re: can't edit cell in stand alone app

Post by pmc » Fri Feb 11, 2011 6:40 pm

deebee wrote:
pmc wrote:And why do you people use the small letter 't' or 'p' in front of the Filename (or others)? Why use capital letters like in 'acceptDrop' or maybe 'AcceptDrop'?? :| Sigh.....
The lowercase t in front just helps you to remember what you're using the variable for ("t" is for temporary). It's not required, just helpful.

The capital in "acceptDrop" is not a requirement either. It's called "camelCase." It simply makes your variable names easier to read. For example, theQuickRedFoxJumpsOverTheLazyBrownDog is slightly easier to read than thequickredfoxjumpsoverthelazybrowndog.
Thanks deebee. I thought it was some kind of scripting code which is mandatory. else 'it' won't work.

pmc
Posts: 62
Joined: Thu Sep 23, 2010 3:14 am

Re: can't edit cell in stand alone app

Post by pmc » Sun Feb 13, 2011 2:24 pm

Hi

I think I will use Sarah's no.2 method, this fits my app. But I can't understand what she's saying here:

Quote from her:

To do this, you will need a script like the following:

1) on createDataStack
2) clone stack "dataTemplate"
3) set the name of stack "Copy of dataTemplate" to "MyAppData"
4) set the fileName of stack "MyAppData"to \
5) pathToUsersDocumentsFolder &"/MyAppData.rev"
6) save stack "MyAppData"
7) end createDataStack

a)Now, where do I put this script? In the Stack script? In the 'open menu'?
b)What actually is "MyAppData" in line 3? Is she creating a copy of "dataTemplate" and renaming it as "MyAppData"?
c)What will happen in line 4? Is she saving it to a folder?
d)What is line 5 then and why is she saving it as a .rev file? Can the standalone edit the .rev file?
e) what is the '&'?
f)What exactly IS a 'filename'? Is it the name of an app the you created?
g)it can only create the clone when it is a standalone app?

magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Re: can't edit cell in stand alone app

Post by magice » Sun Feb 13, 2011 4:55 pm

Where you put it really doesn't matter. When your app receives the command createDataStack, it will look for the script "createDataStack" first in the control that sent the command, secondly in the card the control is on, and lastly in the stack. This system is covered in greater detail in the user's guide pdf file. I would recommend reading that as it seems you may be trying to run before you can walk.

Post Reply