Tag Archives: Programming

List of RunRev Tutorials

My updated list of Revolution tutorials and tips.

http://h.webring.com/hub?ring=runtimerevoluti1
http://revolution.byu.edu/indexgeneric.php (wow!)
http://www.runrev.info
http://www.altuit.com/webs/altuit2/RunRev/Tutorials.htm
http://www.revjournal.com/tutorials/
http://www.sosmartsoftware.com/?r=revolution_didacticiels&l=en
http://support.runrev.com/scriptingconferences/
http://derbrill.de/developers.php?lang=en
http://ists.runrev.com/pipermail/use-revolution
http://runrev.com/downloads/all-downloads/full-list/
http://runrev.com/downloads/all-downloads/sast-code-examples/
http://www.runrev.com/developers/exploring-revolution
http://www.runrev.com/developers/tutorials
http://tactilemedia.com/site_files/software/tutorial_thumbs.html
http://www.hyperactivesw.com/Resources.html
http://www.sonsothunder.com/devres/revolution/revolution.htm
http://www.sanke.org/MetaMedia/
http://revclever.com/

Thanks to Judy Perry.
http://revined.blogspot.com/

Why can’t I build a standalone with RunRev?

What to do when building standalones goes mysteriously wrong?

– try removing passwords from stacks

– try toggling the destroyStack property

– check whether pictures are referenced or imported as controls

– make sure that pictures are in the correct location relative to your stack

– make sure to use relative file paths for portability

– select “Select inclusions” instead of “Search for required inclusions” on the General pane of the standalone application settings

– after selecting “Select inclusions”, make sure that you actually include all components that you need for your stack, this may involve knowing for sure what each component does

– you might try to forget about profiles, just select “Remove all”

– if you build for multipe platforms, try building for one platform at a time

– quit and restart Revolution without saving your project right after building a standalone

– quit and restart Revolution after saving your project and before building a standalone

– when moving your standalone for Mac OS 9 or Mac OS X to a different computer, make sure to create a sit or zip file of your standalone first

– when uploading your compressed standalone or exe file to a server, make sure that your FTP software treats it as binary

– you might try to build a standalone while suppressing messages (see Development menu)

– you might try to build a standalone while suppressing errors (see Development menu)

– if building standalones takes ages, set the cREVKeepDevelopmentProperties of your mainstack to true

– Error: “A stack “answer dialog” in file (path to my stack) is already in memory. The Revolution UI does not distiguish stacks with have identical names, so editing these stack files which both are in memory could result in data loss.” When the preference “If destroyStack is false, when closing last stack in file:” is set to “Don’t close the file” then a built standalone is partially corrupted or the building process throws errors and aborts. This was not the case with version 3.5. RunRev reports: “I think this issue is related to a certain preference setting. It appears to be fixed in the development builds of the next version of Revolution which are available to our enterprise customers. However if you are using 4.0, I think the problem can be worked around by changing the preference “If destroyStack is false, when closing last stack in file:” to something other than “Ask”. This can be found by doing Edit -> Preferences -> Files & Memory.” I have no confirmation, yet.

Links for start(l)ing Revolution programmers

Here’s a number of very useful links for start(l)ing Revolution programmers:

http://h.webring.com/hub?ring=runtimerevoluti1
http://revolution.byu.edu/indexgeneric.php (wow!)
http://www.runrev.info
http://www.altuit.com/webs/altuit2/RunRev/Tutorials.htm
http://www.revjournal.com/tutorials/
http://www.sosmartsoftware.com/?r=revolution_didacticiels&l=en
http://support.runrev.com/scriptingconferences/
http://derbrill.de/developers.php?lang=en
http://lists.runrev.com/pipermail/use-revolution
http://runrev.com/downloads/all-downloads/full-list/
http://runrev.com/downloads/all-downloads/sast-code-examples/

If you know about any additional links and resources that should be added here, please let me know.

You can search the Revolution User Mail List with a FireFox plugin. The plugin is available on the Economy-x-Talk website:
http://economy-x-talk.com/developers.html
(at the bottom of the page).

Luhn Extended N Algorithm (LENA)

/* The Luhn algorithm or Luhn formula, also known as the “modulus 10” or “mod 10” algorithm, is a simple checksum formula used to validate a variety of identification numbers, such as credit card numbers, IMEI numbers, National Provider Identifier numbers in US and Canadian Social Insurance Numbers. It was created by IBM scientist Hans Peter Luhn and described in U.S. Patent No. 2,950,048, filed on January 6, 1954, and granted on August 23, 1960.

The algorithm is in the public domain and is in wide use today. It is specified in ISO/IEC 7812-1[1]. It is not intended to be a cryptographically secure hash function; it was designed to protect against accidental errors, not malicious attacks. Most credit cards and many government identification numbers use the algorithm as a simple method of distinguishing valid numbers from collections of random digits.

This version:
Luhn Extended N Algorithm (LENA) 1.0 L
copyright © 2010 by Economy-x-Talk
Mark Schonewille
Nijmegen, the Netherlands

For more information, see
http://en.wikipedia.org/wiki/Luhn_mod_N_algorithm

This script can be redistributed freely, if unmodified and including al comments and the copyright statement.
*/
local lMap

private function map theData
     put empty into myMap
     repeat for each char myChar in theData
          if myChar is not in myMap then put myChar after myMap
     end repeat
     return myMap
end map

private on luhnInitialise theInput
     put map(theInput) into lMap
end luhnInitialise

private function codePointFromChar theChar
     return offset(theChar,lMap) – 1
end codePointFromChar

private function charFromCodePoint thePoint
     return char thePoint + 1 of lMap
end charFromCodePoint

function generateCheckChar theInput
     put replaceText(theInput,”[W]”,empty) into theInput
     luhnInitialise theInput
     put 2 into myFactor
     put 0 into mySum
     put length(lMap) into n
     repeat with i = length(theInput) down to 1
          put codePointFromChar(char i of theInput) into myCodePoint
          put myFactor * myCodePoint into myAddend
          if myFactor is 2 then put 1 into myFactor else put 2 into myFactor
          add trunc((myAddend / n) + (myAddend mod n)) to mySum
     end repeat
     put mySum mod n into myRemainder
     put n – myRemainder into myCheckCodePoint
     put myCheckCodePoint mod n into myCheckCodePoint
     return charFromCodePoint(myCheckCodePoint)
end generateCheckChar

function validateCheckChar theInput
     put replaceText(theInput,”[W]”,empty) into theInput
     luhnInitialise char 1 to -1 of theInput
     put 1 into myFactor
     put 0 into mySum
     put length(lMap) into n
     repeat with i = length(theInput) down to 1
          put codePointFromChar(char i of theInput) into myCodePoint
          put myFactor * myCodePoint into myAddend
          if myFactor is 2 then put 1 into myFactor else put 2 into myFactor
          add trunc((myAddend / n) + (myAddend mod n)) to mySum
     end repeat
     put mySum mod n into myRemainder
     return myRemainder is 0
end validateCheckChar

/* end of the Luhn Extended N Algorithm */