Re: Parameters [WAS: Main menu puzzle]
Mark Wieder wrote: on alertStranger "mixmastabilongjeezuscrise!" beep put "wanpelasquashimallbuggerup!" into field "Stupid" end alertStranger What are they telling you? shoodnaswaronlis. aneniway, prameterzdonhakwotz. Yahnesclamathingstu. Gon confuzikompila, no? Nahdifits endadahstrin, dontink. Noddahvalli pramitta. Stoptintrax. Wo! Whaddyaknow. Yoorye! (I just ran all this through babelfish. It comes back the same as it went in.) Garbajin-garbajout! Storee mylaef. -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ 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
Re: Parameters [WAS: Main menu puzzle]
Jacque- > Mark Wieder wrote: >> Jacque- >> >> on alertStranger "mixmastabilongjeezuscrise!" beep put "wanpelasquashimallbuggerup!" into field "Stupid" end alertStranger What are they telling you? >> >> >>>shoodnaswaronlis. aneniway, prameterzdonhakwotz. >> >> >> Yahnesclamathingstu. Gon confuzikompila, no? >> > Nahdifits endadahstrin, dontink. Noddahvalli pramitta. Stoptintrax. > (I just ran all this through babelfish. It comes back the same as it > went in.) Garbajin-garbajout! -- -Mark Wieder [EMAIL PROTECTED] ___ 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
Re: Parameters [WAS: Main menu puzzle]
Tch tch, I don't think anyone really tried. It's quite easy if you know a bit of pidgin from Papua New Guinea. mixmastabilongjeezuscrise mixmasta = mixmaster, a 1950's brand of electric beater for eggs, cream, cakes etc. bilong = belongs to jeezuscrise = Jesus Christ So, it's something coming down from heaven that looks (from below) like a big eggbeater. A helicopter. wanpelasquashimallbuggerup wanpela = one fellow (me, that they are shouting at) squashim = squash you (me, anyone) allbuggerup = severe injury or death So, they are saying there's a helicopter coming down on top of me and I'd better scoot or I'm going to be squashed like a bug. See, it's all there, english-like, and just like Transcript you just have to know the language and syntax ...;-) Whoops. Nambawanmeri bilongKen is calling, gotta go Ken -- View this message in context: http://www.nabble.com/Parameters-WAS%3A-Main-menu-puzzle--t1147023.html#a3044965 Sent from the Revolution - User forum at Nabble.com. ___ 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
Re: Parameters [WAS: Main menu puzzle]
You should see what it gives me when I feed it medieval french. Does Babelfish do Klingon? I know it doesn't do medieval french... Judy On Mon, 20 Feb 2006, J. Landman Gay wrote: > >>>What are they telling you? > > > > > >>shoodnaswaronlis. aneniway, prameterzdonhakwotz. > > > > > > Yahnesclamathingstu. Gon confuzikompila, no? > > > > Nahdifits endadahstrin, dontink. > > (I just ran all this through babelfish. It comes back the same as it > went in.) ___ 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
Re: Parameters [WAS: Main menu puzzle]
I'm trusting C3PO could translate this?? (yup, you guessed it: kiddies are just now new devotees to the Jedi religion...) Judy On Mon, 20 Feb 2006, Mark Wieder wrote: > > shoodnaswaronlis. aneniway, prameterzdonhakwotz. > > Yahnesclamathingstu. Gon confuzikompila, no? > ___ 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
Re: Parameters [WAS: Main menu puzzle]
I'm feeling the odd, irresistable urge to fire up PowerPoint... blech :-( ;-P Judy On Mon, 20 Feb 2006, J. Landman Gay wrote: > > on alertStranger "mixmastabilongjeezuscrise!" > > beep > > put "wanpelasquashimallbuggerup!" into field "Stupid" > > end alertStranger > > > > What are they telling you? > > shoodnaswaronlis. aneniway, prameterzdonhakwotz. > > -- > Jacqueline Landman Gay | [EMAIL PROTECTED] > HyperActive Software | http://www.hyperactivesw.com ___ 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
Re: Parameters [WAS: Main menu puzzle]
Mark Wieder wrote: Jacque- on alertStranger "mixmastabilongjeezuscrise!" beep put "wanpelasquashimallbuggerup!" into field "Stupid" end alertStranger What are they telling you? shoodnaswaronlis. aneniway, prameterzdonhakwotz. Yahnesclamathingstu. Gon confuzikompila, no? Nahdifits endadahstrin, dontink. (I just ran all this through babelfish. It comes back the same as it went in.) -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ 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
Re: Parameters [WAS: Main menu puzzle]
Jacque- >> on alertStranger "mixmastabilongjeezuscrise!" >> beep >> put "wanpelasquashimallbuggerup!" into field "Stupid" >> end alertStranger >> >> What are they telling you? > shoodnaswaronlis. aneniway, prameterzdonhakwotz. Yahnesclamathingstu. Gon confuzikompila, no? -- -Mark Wieder [EMAIL PROTECTED] ___ 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
Re: Parameters [WAS: Main menu puzzle]
Charles- Monday, February 20, 2006, 5:27:41 PM, you wrote: Hah! back atcha... A friend from California was heading down to Lafayette, Louisiana to attend school. He drove into town and stopped at a gas station to ask the attendant for directions and it was a full 60 seconds into the answer before he realized that the guy was speaking English... Gotta love that Cajun patois.. -- -Mark Wieder [EMAIL PROTECTED] ___ 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
Re: Parameters [WAS: Main menu puzzle]
Ken Apthorpe wrote: I second what Mark says about these sorts of explanations, particularly the "Assume nothing" and inclusion of (complete) example scripts for new users. I found my old notes (from the HyperCard list, but Rev is the same.) It has a simple example. If I get time, I will combine this with my earlier response and put it on my web site with my other essays. My favorite analogy is that parameters are baskets. This fits in well with the HyperCard concept that variables are "containers". Parameters are just another variable container that catch and hold whatever values are sent to them. Suppose we have a function called addNumbers like this: function addNumbers num1,num2 put num1 + num2 into theTotal return theTotal end addNumbers The parameters "num1" and "num2" are like baskets that hold whatever values the original handler sends. In this case, they each will contain a number. The special word "return" tells the function to send the variable "theTotal" back to the handler that asked for the information. So, this function takes two numbers that are passed to it in the parameters, adds them together, and sends back a total. Parameter "baskets" are always filled in first-to-last order; whatever number arrives first will be placed into the "num1" basket, and whatever number arrives second will be placed into "num2". It is important that the order of the values sent are the same as those expected by the receiving parameters. Now we can write a handler that uses this function this way: on myHandler put 16 into theFirstNumber put 4 into theSecondNumber put addNumbers(theFirstNumber,theSecondNumber) into myTotal end myHandler This handler will send "16" and "4" to our custom function "addNumbers". The addNumbers function will catch these two numbers in its parameters. Since 16 was sent first, it will be received first and placed into the "num1" basket. The second number, 4, will be placed into the "num2" basket. The function uses these parameters just as though a script had issued statements such as "put 4 into num2"; the parameter variables are automatically filled with the sent values. The function can use these variables just like any other local variable. This function will add them together and send back "20". The script "myHandler" will receive that 20 and put it into the variable "myTotal". You can have as many parameters as you need. A general rule of thumb is that passing parameters is prefereable to using globals, except where many different handlers need to access a value repeatedly. In that case, a global may be a better solution because it is faster and more universally available. However, in the above example, it would be silly to make num1 and num2 into globals; their values will be different each time the function is called, and it is trivial to pass the values to the function as needed. -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ 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
Re: Parameters [WAS: Main menu puzzle]
Ken Apthorpe wrote: You are having a dream. You are in a different country, and there's a group of locals around you all talking to each other. It's an english-like language, you catch individual words but they string them together in a very strange way. You stand there gawking and trying to understand. Suddenly they all start jumping up and down and waving their arms around and jabbering at you. Then they all start running away like crazy. You stand there trying to figure out what they were saying. It sounds something like on alertStranger "mixmastabilongjeezuscrise!" beep put "wanpelasquashimallbuggerup!" into field "Stupid" end alertStranger What are they telling you? shoodnaswaronlis. aneniway, prameterzdonhakwotz. -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ 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
Re: Parameters [WAS: Main menu puzzle]
On Feb 20, 2006, at 8:02 PM, Ken Apthorpe wrote: You are having a dream. You are in a different country, and there's a group of locals around you all talking to each other. It's an english-like language, you catch individual words but they string them together in a very strange way. You stand there gawking and trying to understand. Suddenly they all start jumping up and down and waving their arms around and jabbering at you. Then they all start running away like crazy. You stand there trying to figure out what they were saying. It sounds something like Hah! I recognize that! from a number of experiences, but one of them was this (trust me, there's a point, sort of): I'm a writer at a *very* distinguished (if sparsely populated) writers' colony, in the Castle of H--, not far from E--, in the country of S--. (This is a dozen years ago.) I'm walking down the back stairs of the castle and come to a landing behind the kitchen, where the staff of the castle are sitting around and talking. I think they must be talking E-- (or G-- as it's otherwise known). But when I pause for a few seconds to savor the sound, which is lovely, I realize with a shock that there's a liberal sprinkling of English words, and then that they are in fact speaking English, not with the accent they normally use in speaking to American and English visitors but with the accent they use among themselves. A dream I miss, by the way, and treasure in retrospect. Must be why I fool around in Transcript . . . Anyway it might account for a lot . . . Charles ___ 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
Re: Parameters [WAS: Main menu puzzle]
Ken Apthorpe wrote: I second what Mark says about these sorts of explanations, particularly the "Assume nothing" and inclusion of (complete) example scripts for new users. Thanks to the forum I now have a (partially) working menu, thanks to these posts I understand parameters more clearly. Transcript may be english-like, but it's a different language and has to be learned, so we need plenty of examples and analogies like the restaurant. Here's another. You are having a dream. You are in a different country, and there's a group of locals around you all talking to each other. It's an english-like language, you catch individual words but they string them together in a very strange way. You stand there gawking and trying to understand. Suddenly they all start jumping up and down and waving their arms around and jabbering at you. Then they all start running away like crazy. You stand there trying to figure out what they were saying. It sounds something like on alertStranger "mixmastabilongjeezuscrise!" beep put "wanpelasquashimallbuggerup!" into field "Stupid" end alertStranger What are they telling you? They are telling you: Once we dreamt we were butterflies, and woke to find ourselves men. But now we wonder: Are we men who dreamt we were butterflies, or butterflies dreaming we are men? -- Richard Gaskin Managing Editor, revJournal ___ Rev tips, tutorials and more: http://www.revJournal.com ___ 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
Re: Parameters [WAS: Main menu puzzle]
I second what Mark says about these sorts of explanations, particularly the "Assume nothing" and inclusion of (complete) example scripts for new users. Thanks to the forum I now have a (partially) working menu, thanks to these posts I understand parameters more clearly. Transcript may be english-like, but it's a different language and has to be learned, so we need plenty of examples and analogies like the restaurant. Here's another. You are having a dream. You are in a different country, and there's a group of locals around you all talking to each other. It's an english-like language, you catch individual words but they string them together in a very strange way. You stand there gawking and trying to understand. Suddenly they all start jumping up and down and waving their arms around and jabbering at you. Then they all start running away like crazy. You stand there trying to figure out what they were saying. It sounds something like on alertStranger "mixmastabilongjeezuscrise!" beep put "wanpelasquashimallbuggerup!" into field "Stupid" end alertStranger What are they telling you? Ken -- View this message in context: http://www.nabble.com/Parameters-WAS%3A-Main-menu-puzzle--t1147023.html#a3042129 Sent from the Revolution - User forum at Nabble.com. ___ 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
Re: Parameters [WAS: Main menu puzzle]
>I just ate a hugh meal for my daughters birthday party and really >can't deal with more food functions right now. I am well known for my culinary expertise but did not realise how far it extended, Tom! /H ___ 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
Re: Parameters [WAS: Main menu puzzle]
On Feb 18, 2006, at 9:43 AM, J. Landman Gay wrote: Mark Swindell wrote: Parameters are, to me, the least well-explained and least intuitive aspect of Rev (and programming in general). You can have any number of parameters declared in a handler: on myHandler pOne,pTwo,pThree ... If the engine (or one of your own handlers) passes three parameters to this handler, each parameter "basket" will hold one of the items that is passed to it. If more parameter items are passed than you have declared parameter "baskets" to hold, the extra ones are not available to your script. (There is a way around this using "the params" but that is more advanced than we want to talk about here.) If fewer parameter items are passed to your handler than you have "baskets" declared, the extra baskets are empty. Feel free to ask for clarification, I wrote this very quickly. This explanation was quite good, as is usual for the source... thanks :) The tone of this short tutorial is exactly what the doctor ordered for making Rev comprehensible to new users. The latter part regarding multiple parameters after declaring the handler is key, as naming multiple "baskets" and filling them- or not- is the part that is not at all intuitive. Fleshing this out with a few examples would be a godsend to the documentation. "Assume nothing" about the new user is the best route to comprehensible explanations for everyone at that level... and on up. Thanks, Mark ___ 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
Re: Parameters [WAS: Main menu puzzle]
I just ate a hugh meal for my daughters birthday party and really can't deal with more food functions right now. Thanks anyway. Tom ;-) On Feb 19, 2006, at 2:11 PM, Jim Ault wrote: Mark Swindell wrote: Parameters are, to me, the least well-explained and least intuitive aspect of Rev (and programming in general). You order a meal at a restaurant. The waitress writes down your order, but does so in a rather cryptic fashion.. coffee with cream, a prune danish, scrambled eggs and bacon, and a glass of water. The parameters you give to her. The waitress goes back to the short order cook and 'hangs a tag'. This slip of paper has the parameters the cook needs to process food items into the meal that matches the order. The cook stops smoking his cigarette long enough to slide the hot meal onto the shelf for the waitress. The waitress picks up the luke-warm plate and brings it to your table, adding to this, the danish, cold cup of coffee and the water. Just what you had in mind when you sat down. Thus, you give the waitress a long list of parameters, she processes some of them, and passes a few to the short order cook, who does likewise. Oh, and one other thing.. although you did not specifically request this, the bill is added to the items you receive because it is implied by your placing an order. At home, you have to provide all of the services. At a restaurant, there is the WaitressFunction, CookFunction, CashierFunction. Depending on how the owner programmed his restaurant, you get variations in menu, service, and satisfaction. Jim Ault Las Vegas ___ 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 Thomas J McGrath III [EMAIL PROTECTED] Lazy River Software™ - http://www.lazyriversoftware.com Lazy River Metal Art™ - http://www.lazyriversoftware.com/metal.html Meeting Wear™ - http://www.cafepress.com/meetingwear Semantic Compaction Systems - http://www.minspeak.com SCIconics, LLC - http://www.sciconics.com/sciindex.html ___ 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
Re: Parameters [WAS: Main menu puzzle]
> Mark Swindell wrote: >> >> Parameters are, to me, the least well-explained and least >> intuitive aspect of Rev (and programming in general). > You order a meal at a restaurant. The waitress writes down your order, but does so in a rather cryptic fashion.. coffee with cream, a prune danish, scrambled eggs and bacon, and a glass of water. The parameters you give to her. The waitress goes back to the short order cook and 'hangs a tag'. This slip of paper has the parameters the cook needs to process food items into the meal that matches the order. The cook stops smoking his cigarette long enough to slide the hot meal onto the shelf for the waitress. The waitress picks up the luke-warm plate and brings it to your table, adding to this, the danish, cold cup of coffee and the water. Just what you had in mind when you sat down. Thus, you give the waitress a long list of parameters, she processes some of them, and passes a few to the short order cook, who does likewise. Oh, and one other thing.. although you did not specifically request this, the bill is added to the items you receive because it is implied by your placing an order. At home, you have to provide all of the services. At a restaurant, there is the WaitressFunction, CookFunction, CashierFunction. Depending on how the owner programmed his restaurant, you get variations in menu, service, and satisfaction. Jim Ault Las Vegas ___ 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
Parameters [WAS: Main menu puzzle]
Mark Swindell wrote: Parameters are, to me, the least well-explained and least intuitive aspect of Rev (and programming in general). The concept of parameters can be very tricky for lots of people new to programming. I've explained it before on other lists, but I can't find my old notes. But let me take another shot at it here. A parameter is simply a variable that is declared at the start of a handler. My favorite analogy for a parameter is a "basket". Your script states that there is a basket (a variable) available to hold some information. The Rev engine then fills that basket with something when it sends the corresponding event message. Your script can then use the information inside that basket however it wants. Let's look at the menupick message, since that's the one that came up on the list: on menupick myBasket ... By putting "myBasket" after the handler declaration, we have defined that there is a parameter variable available to hold whatever data the engine sends. In the case of menupick, the data that fills that basket will be the name of the menu item the user has chosen. The variable "myBasket" will therefore hold something like "Exit" or "Copy". Like any other variable, it doesn't matter what you name the basket. The parameter can be named anything; it is merely the act of naming it and including it in the handler declaration that is important. In general, it is best to name parameters in a way that describes what they will contain. This helps a great deal later on when you are reading a script and you need to remember the kind of data that the variable contains. Therefore, in the case of a menupick parameter, a good name for the parameter variable might be "userChoice", or "userItem" or something similar. Some people like to name parameter variables prefaced with a "p" (i.e., "pUserChoice") so that they remember when reading the script later on that it was a variable passed as a parameter rather than a variable they declared in the script. This isn't a rule, just a convention that some people like to follow for clarity. You can have any number of parameters declared in a handler: on myHandler pOne,pTwo,pThree ... If the engine (or one of your own handlers) passes three parameters to this handler, each parameter "basket" will hold one of the items that is passed to it. If more parameter items are passed than you have declared parameter "baskets" to hold, the extra ones are not available to your script. (There is a way around this using "the params" but that is more advanced than we want to talk about here.) If fewer parameter items are passed to your handler than you have "baskets" declared, the extra baskets are empty. Feel free to ask for clarification, I wrote this very quickly. -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ 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