Rev difficulty

Richard Gaskin ambassador at fourthworld.com
Fri May 27 22:21:24 EDT 2005


Vjstbenz at aol.com wrote:
 > ye.....i will attend the TEACHING conference tomorrow...
 >
 > if they cant teach me the principles of REV...then i am not
 > interested...OBJECTS HANDLERS...Transcript...GLOBAL
 > variables...HANDLER....cards and their relationship to stack
 > scripts.....

Klaus is a great scripter, but I don't think any single Internet chat, 
not even one with Mr. Major, will substitute for experimentation on your 
own.

The conferences, like other learning materials, are a great way to get 
the lay of the land (thank you Jacque for putting those together), but 
they won't walk that land for you.

READING code will get you started.
WRITING code will teach you everything else.

 > WHY a stack has a SCRIPT?....outside of cards...
...
 > HYPERCARD was kind of simple...you know...

Just how familiar are you with HyperCard if you weren't aware that 
HyperCard stacks also have scripts?

HyperCard had two types of objects compared to Rev's ten, one type of 
window to Rev's four, fewer than a third as many messages, fewer than 
half as many functions, and ultimately was so limited that the only way 
one could make anything close to normal HIG-compliant software was to 
load themselves up with externals, and even then you couldn't even drag 
a window normally.

With features comes learning.
With power comes responsibility.

Klaus will cover some of what you're asking about tommorrow, and I'll 
follow up two weeks later with a discussion of the message path for more.


 > what you end up doing is looking at other peoples CODE...and
 > picking it apart and trying to understand what the hell is
 > going on....

There's another way to learn programming?  Damn someone should have told me.


 > WITHOUT UNDErSTANDING THE BASIC PRINCIPLES of the WHOLE
 > SYSTEM.......which are NOT explained properly...anywhere
 > on the REV site....

Ah, that may be the problem.  As with most software, the runrev.com site 
is there to describe the program in general sales terms and to provide 
access to technical support materials.  To learn how to use the program 
you'll want to read the documentation.


 > it is basically OBJECT ORIENTATED programming...so a FULL
 > tutorial on object orientated progamming is REQUIRED as
 > standard....

In some loose ways Rev could be seen as related to object-oriented 
programming, but it isn't a true OOP in any formal sense (ask the 
purists about the differences, or go to wikipedia).  So if RunRev spent 
any time at all teaching polymorphism or other ideas central to OOP it 
would merely be a distracting waste of time.


 > the REV site does not provide this tutorial...as far as i can see...
 >
 > this, to my mind ....is a bad sign...

If a mind insists on looking for detailed documentation at the product's 
web site rather than in the product's documentation, is the problem with 
the product or the mind condemning it?



Here'something to learn from:

This example will teach how to call a custom function, and how to use 
the built-in function "random" and "toUpper" to modify text.

In addition to providing instruction it also has immediate practical 
value:  you can write normal text and run it through this filter to save 
wear and tear on your Caps Lock key.

To use, follow these steps:

1. Make a new stack
2. In that stack create two fields
3. In the first field type normal text
4. Create a button
5. Put this script in the button, then
    switch to the Browse tool and click it:

on mouseUp
   put BenzFilter(fld 1) into fld 2
end mouseUp

--
-- BenzFilter
--
-- This text filter returns the text passed into it
-- after randomly turning about one-fourth of its
-- words to upper-case.
--
-- In keeping with the style which inspired its
-- creation, noise words (insignificant to the
-- meaning of the sentence) are excluded.
--
function BenzFilter pText
   -- You can add other noise words to this list
   -- by just separating new words with spaces:
   put "a an is of the" into tNoiseWords
   --
   -- Get the number of words in the text passed in:
   put the number of words of pText into tNumWords
   --
   -- Repeat loop runs about one-fourth as many times
   -- as there are words in the text:
   repeat (tNumWords div 4)
     --
     -- The random function returns a random number:
     put random(tNumWords) into N
     ---
     --- We use that number here to pull a word out of the text:
     get word N of pText
     --
     -- First we check to see if it's one of our noise words,
     -- and if it is we return to the top of this repeat block
     -- without doing anything further:
     if it is among the words of tNoiseWords then next repeat
     --
     -- If it's not a noise word then we use the toUpper
     -- function to change it to all-caps, and put it back
     -- into place in the text:
     put toUpper(it) into word N of pText
   end repeat
   --
   -- Last we simply return the result:
   return pText
end BenzFilter


Below is a copy of this post after having been run through the Benz Filter.

--
  Richard Gaskin
  Fourth World Media Corporation
  __________________________________________________
  Rev tools and more: http://www.fourthworld.com/rev


------------------------------------------------------

VJSTBENZ at AOL.COM wrote:
 > ye.....i will attend the TEACHING CONFERENCE tomorrow...
 >
 > if they cant teach me the PRINCIPLES of REV...then i AM not
 > interested...OBJECTS HANDLERS...Transcript...GLOBAL
 > VARIABLES...HANDLER....CARDS and THEIR RELATIONSHIP to stack
 > scripts.....

KLAUS is a great scripter, but I don't THINK any single Internet chat, 
NOT EVEN one with Mr. MAJOR, will substitute for experimentation on YOUR 
OWN.

The conferences, LIKE other learning materials, are a great way to get 
the lay of the land (thank you Jacque FOR PUTTING THOSE TOGETHER), but 
they won't WALK that land for you.

READING code will GET you started.
WRITING code WILL teach you EVERYTHING else.

 > WHY a stack HAS a SCRIPT?....outside of cards...
...
 > HYPERCARD was kind of simple...you know...

Just how FAMILIAR ARE you with HYPERCARD if you weren't aware that 
HyperCard stacks also have scripts?

HYPERCARD had TWO TYPES of objects compared to Rev's ten, one type of 
window to Rev's four, fewer than a third AS many messages, fewer THAN 
half AS many functions, AND ultimately was so limited THAT the only way 
one could make anything close to normal HIG-compliant SOFTWARE was to 
load themselves up with EXTERNALS, and even THEN you couldn't even drag 
a window NORMALLY.

With features comes learning.
With power COMES RESPONSIBILITY.

KLAUS will cover some of what you're asking about tommorrow, and I'll 
follow up two weeks LATER with a discussion of the message path for more.


 > what you end up doing is LOOKING at OTHER peoples CODE...and
 > picking it apart and trying to understand what the hell is
 > going on....

There's another way to learn programming?  DAMN someone SHOULD HAVE told me.


 > WITHOUT UNDErSTANDING THE BASIC PRINCIPLES of the WHOLE
 > SYSTEM.......which ARE NOT EXPLAINED PROPERLY...ANYWHERE
 > ON the REV site....

Ah, THAT may be the problem.  As with most software, the runrev.com site 
is there to describe the PROGRAM in general SALES terms and to provide 
access to TECHNICAL support materials.  To learn how to USE the program 
you'll want TO read the DOCUMENTATION.


 > it is basically OBJECT ORIENTATED programming...so a FULL
 > tutorial on object ORIENTATED PROGAMMING is REQUIRED as
 > STANDARD....

In SOME LOOSE ways REV could be seen as related to object-oriented 
programming, but IT ISN'T a TRUE OOP IN any formal SENSE (ASK the 
PURISTS about the differences, or GO to wikipedia).  So IF RUNREV spent 
ANY TIME at all teaching polymorphism or other ideas CENTRAL to OOP it 
would merely be a distracting waste of time.


 > the REV SITE does not PROVIDE this tutorial...as far as i CAN see...
 >
 > THIS, to MY MIND ....IS a bad sign...

If a mind INSISTS on looking for detailed documentation at the product's 
web site RATHER THAN in the product's DOCUMENTATION, is the problem WITH 
the product or the mind condemning it?



Here'something to learn from:

This example will teach HOW to CALL a custom FUNCTION, and how TO use 
the BUILT-IN function "random" and "TOUPPER" to modify text.

In addition to providing INSTRUCTION IT also has immediate PRACTICAL 
value:  you can write NORMAL text and run it through this filter to save 
wear AND tear on YOUR CAPS Lock key.

To use, follow THESE steps:

1. Make a new stack
2. In that stack create two fields
3. In the first field type normal text
4. Create a button
5. PUT this script in the button, then
    switch to the Browse tool and click it:

ON mouseUp
   put BenzFilter(fld 1) into FLD 2
end mouseUp

--
-- BENZFILTER
--
-- THIS text FILTER returns the text passed into it
-- after randomly TURNING ABOUT one-fourth of its
-- words to UPPER-CASE.
--
-- In keeping with the style WHICH inspired its
-- creation, noise WORDS (insignificant TO the
-- meaning of the sentence) ARE EXCLUDED.
--
function BenzFilter pText
   -- YOU can ADD other noise WORDS to THIS list
   -- BY JUST separating new words with spaces:
   put "A AN IS OF THE" into tNoiseWords
   --
   -- GET the NUMBER of words in the text passed in:
   PUT the number of words of pText into TNUMWORDS
   --
   -- Repeat loop runs ABOUT one-fourth AS many times
   -- as there are words in the TEXT:
   repeat (tNumWords div 4)
     --
     -- The random function RETURNS a random number:
     PUT random(tNumWords) into N
     ---
     --- We USE THAT number HERE to PULL a word out of the TEXT:
     GET WORD N of pText
     --
     -- First we check TO see if IT'S one of our noise WORDS,
     -- and IF it is we return to the TOP of this repeat block
     -- without DOING ANYTHING FURTHER:
     IF it is among the WORDS of tNoiseWords then next repeat
     --
     -- If IT'S not a noise WORD then we use the toUpper
     -- function to change it to all-caps, AND put it back
     -- into place in the text:
     put toUpper(it) into word N of PTEXT
   end repeat
   --
   -- Last we simply return the result:
   return PTEXT
END BenzFilter


Below is a copy of this post after having been RUN through the Benz FILTER.

--
  RICHARD Gaskin
  Fourth World MEDIA Corporation
  __________________________________________________
  Rev tools and more: http://www.fourthworld.com/rev



More information about the use-livecode mailing list