I noticed that you can't return a mix of an array and a variable. This
doesn't work (it only works if the params are both simple variables or if
you only have one parm - the array) :
*on* mouseUp
*put* the first item of MyTest() into myArray
*put* the keys of myArray
*end* mouseUp
William, if your example is as simple as it seems, I'd probaly not
bother with an array, and use chunks instead,
However, for bigger data I'd do something like this, in Rev 3.0
on mouseUp
put myTest() into tBigArray
put tBigArray[1] into myArray
put tBigArray[2] into mySimpleVariable
Thanks. My arrays aren't that big but i like how I can call them in repeat
loops (I'm generating XML)
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
subject was question that comes from programming without knowlege
I always thought that to pass a parameter with a command it had to be a
function like.
function myfunction param
-- do stuff with the param
end myfunction
but I just realized (from use actually) that you can do:
command
On a side note. In the script window functions are labeled with an F --
for function although in my case it's probably for fail. But commands are
labeled H. What does the H stand for?
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please
Hopeless?
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Le 17 oct. 08 à 17:13, william humphrey a écrit :
On a side note. In the script window functions are labeled with an
F --
for function although in my case it's probably for fail. But
commands are
labeled H. What does the H stand for?
___
Bonjour William,
Le 17 oct. 08 à 17:08, william humphrey a écrit :
2. why would anyone use the function thing when they can use a
command with
a parameter. What good is a function? I guess when you want multiple
parameters?
Functions are useful and handy because their main purpose is to
Thanks Eric. It sure helps to get a simple explanation like that in addition
to the docs. It seems like I can never understand any simple program concept
and use it properly without lots of examples and simple explanations.
But what if the function CurrentUsers is in a card in some other stack
Quick answers:
In Rev you can choose which you want since
function calls {can change the UI or data storage, etc}{return a string
value}
command handlers {can change the UI or data storage, etc}{return a string
value}
Most all programming languages have both types of 'handlers' by different
names
Bonsoir William,
Le 17 oct. 08 à 18:00, william humphrey a écrit :
Thanks Eric. It sure helps to get a simple explanation like that in
addition
to the docs. It seems like I can never understand any simple
program concept
and use it properly without lots of examples and simple explanations.
Recently, william humphrey wrote:
what if the function CurrentUsers is in a card in some other stack
that you are using?
then how do you say: quote return William is among the lines of
CurrentUsers() of card othercard in stack mystack end quote?
return William is among the lines of \
Thanks Jim. I will have to digest this and refer to it again. I am taking to
putting nearly everything in the bg script of the default stack though as it
is also easier to find later.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please
william humphrey wrote:
So my question is twofold.
1. How do you send a do to a function.
You don't have to. Use this:
get value(myfuction(),this card)
The second part (this card) should be the script that holds the
function; it may be the stack, a button, whatever. Put the correct
Caution:
There is no 'background script' in Rev, as there was in Hypercard.
The 'stack script' exists in both Rev and Hypercard.
Group scripts are used in Rev, and can behave as background groups, but
put the script of group grUserControls into message box
put the script of this stack into
I meant by bg script the script of the default stack which is the one you
can call functions and commands from without trouble (maybe there should be
a short cut name for it). I thought of another more complex way, go around
setting the default stack but I remember trying it and getting
look up start using in the docs. After this is done the stack is
available to the current stack and all others running at the time.
Comments:
The start using command places a stack's script into the message path
after the current stack and before any objects in the backScripts.
When you
17 matches
Mail list logo