Re: Problem Calling Custom Card Props with the Same Name Using Switch

2009-12-01 Thread Kay C Lan
On Wed, Dec 2, 2009 at 5:06 AM, Jim Bufalini  wrote:

> *put "this is a line" into line (the number of lines of fld "MyField" + 1)
> of fld "MyField*
>
> You could use *put "This is a line" after...* but then you have to manage
> CRs.
>
> Nice!!!

I've always managed the CRs as it's fairly easy and I guess I've never
really thought about it. I've not seen your solution before, but I like it.

Thanks for the tip :-)
___
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: Problem Calling Custom Card Props with the Same Name Using Switch

2009-12-01 Thread Jim Bufalini
Gregory Lypny wrote:

> Hello Jim and Jacqueline,
> 
> Jim, I've no problem with your quick answer.
> 
> The Rev tech people have resolved the issue (see below), giving a very
> good answer.  It turns out that the problem arises when the variable
> that receives the value of the custom prop has the same name as the
> custom prop and not, as I originally thought, that the same custom prop
> name is used for multiple objects.  Recall that I had used
> 
>   put the y of this card into y,
> 
> where both the custom prop and the variable have the same name, in
> addition to that name being used for custom props on other cards.  I
> think both of you, as well as others on the list, were able to create
> stacks where the problem does not occur because you gave your custom
> prop a different name from the receiving variable, such as
> 
>   put the cy of this card into y,
> 
> so in those instances, my original example was not replicated, but the
> answer lay hidden in yours.
> 
> Glad that it's resolved, and thanks to everyone for taking such a
> thoughtful look at it!
> 
>   Regards,
> 
>   Gregory
> 
> 
> 
> Gregory Lypny
> 
> Associate Professor of Finance
> John Molson School of Business
> Concordia University
> Montreal, Canada
> 
> 
> 
> 
> > Hi Gregory, thanks for your report.
> >
> > The problem is a result of using the same names for the custom object
> > properties and the temporary variables.  If you attempt to access a
> custom
> > property using a variable, the contents of that variable will be the
> key used
> > to fetch the custom property, rather than the variable name
> >
> > Due to the way that scripts are parsed, y is not recognised as a
> variable until
> > the first "put the y of this card into y".  The first time, y is
> interpreted as
> > the literal string "y".  The second time, it is instead interpreted
> as the
> > contents of variable y.
> >
> > You will find that if you enable variable checking in the script
> editor and
> > declare your variables at the top of the mouseUp handler with the
> line "local
> > x, y, z", the script will no longer display the values of the first
> card.  This
> > is because x & y are now recognised as variables from the start.
> >
> > For this reason, you should always use temporary variable names that
> are
> > distinct from the names of custom properties.  One suggestion which I
> use often
> > is to prefix temporary variable names with t, e.g tWidth & tHeight
> instead of
> > width & height, or alternatively prefix your custom property names
> with c, e.g.
> > cX, cY, cZ instead of x, y, z.
> >
> >
> > Ian.

Yes. Even though I said I do it all the time, something I have never done is
use a single char variable or custom property name. The reason for this is I
preface all vars with either "g" (global), "s" (script local - some people
use "l"), "k" (constant), "t" (meaning "the" or "this" - handler local) or
"p" (parameter). And "c" (custom property set), or "u" (user single custom
property). So it would have to be at least 2-chars and in your case it would
have been *put the uX of... into tX. If it were a custom property set, it
would have been *put the cX["uX"] of... into tX.

As you can see, using conventions like this, automatically preclude the
issue you encountered. But since I was testing to see if there was a problem
with a 1-char custom property, I used your X, Y and Z. And I didn't use a
behavior in order not to confuse the issue.

Also, I automatically removed the spaces in the card names because as
Jacquie pointed out both First and Card are reserved words, but in general,
you make yourself vulnerable to these kinds of issues, if you use common
single words to name objects and vars.

I also prefix everything like handler and object names. This is not common,
and some are critical of the extra keystrokes, but I find, it eliminates the
possibility of my handlers or objects being named the same as another stack
in memory. And, as many know, I am a proponent of explicit vars (but I won't
get into that ;-).

Also, use of parenthesis to force resolution, while not necessary, is
another good practice and usually makes code more readable such as: 

*put "this is a line" into line (the number of lines of fld "MyField" + 1)
of fld "MyField*

You could use *put "This is a line" after...* but then you have to manage
CRs. The parenthesis above force resolution to a number first and, I think,
makes the statement more readable.

Bottom line, all of the above saves hours of debugging time for both you and
others in the long run. And, if you use verbose variable, handler and object
names, you save even more time and memory strain, six-months down the line,
when you go to make a simple change to the code.

Aloha from Hawaii,

Jim Bufalini



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
ht

RE: Problem Calling Custom Card Props with the Same Name Using Switch

2009-12-01 Thread Gregory Lypny
Hello Jim and Jacqueline,

Jim, I've no problem with your quick answer.

The Rev tech people have resolved the issue (see below), giving a very good 
answer.  It turns out that the problem arises when the variable that receives 
the value of the custom prop has the same name as the custom prop and not, as I 
originally thought, that the same custom prop name is used for multiple 
objects.  Recall that I had used

put the y of this card into y,

where both the custom prop and the variable have the same name, in addition to 
that name being used for custom props on other cards.  I think both of you, as 
well as others on the list, were able to create stacks where the problem does 
not occur because you gave your custom prop a different name from the receiving 
variable, such as

put the cy of this card into y,

so in those instances, my original example was not replicated, but the answer 
lay hidden in yours.

Glad that it's resolved, and thanks to everyone for taking such a thoughtful 
look at it!

Regards,

Gregory



Gregory Lypny

Associate Professor of Finance
John Molson School of Business
Concordia University
Montreal, Canada




> Hi Gregory, thanks for your report.
> 
> The problem is a result of using the same names for the custom object
> properties and the temporary variables.  If you attempt to access a custom
> property using a variable, the contents of that variable will be the key used
> to fetch the custom property, rather than the variable name
> 
> Due to the way that scripts are parsed, y is not recognised as a variable 
> until
> the first "put the y of this card into y".  The first time, y is interpreted 
> as
> the literal string "y".  The second time, it is instead interpreted as the
> contents of variable y.
> 
> You will find that if you enable variable checking in the script editor and
> declare your variables at the top of the mouseUp handler with the line "local
> x, y, z", the script will no longer display the values of the first card.  
> This
> is because x & y are now recognised as variables from the start.
> 
> For this reason, you should always use temporary variable names that are
> distinct from the names of custom properties.  One suggestion which I use 
> often
> is to prefix temporary variable names with t, e.g tWidth & tHeight instead of
> width & height, or alternatively prefix your custom property names with c, 
> e.g.
> cX, cY, cZ instead of x, y, z.
> 
> 
> Ian.







___
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: Problem Calling Custom Card Props with the Same Nam Using Switch

2009-11-30 Thread J. Landman Gay

Jim Bufalini wrote:

Also use parenthesis to resolve a name like a card name first.


I was wondering about this too. In my (successful) tests, I also renamed 
the cards. The word "first" is a reserved word, and "first card" is a 
valid card reference, so I was wondering if the engine was getting 
confused about that. A better naming strategy would be to avoid use of 
reserved keywords in card names and then try testing again.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
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: Problem Calling Custom Card Props with the Same Name Using Switch

2009-11-30 Thread Jim Bufalini
Hi Gregory,

> -Original Message-
> From: use-revolution-boun...@lists.runrev.com [mailto:use-revolution-
> Hello Jacques, Jacqueline, Craig, and Jim,
> 
> Sadly, it is a bug then.  The consequences, as I said, are potentially
> serious for any stack that uses custom props with the same name to
> monitor various states of objects.  Jacqueline and Jacques (kind of
> musical, eh?), I experimented a little more and find that it is not
> limited to using y as the variable name or one-letter variable names in
> general.  I get the same problem when x is used for the custom prop on
> two different cards and when a two-letter name, xV, is used.  The
> problem is also there if you use an If control structure rather than
> Switch, and it is not limited to cards.  I set props for two buttons in
> the same way and lost the value of the same-named prop for the second
> button.  I haven't used Behaviours yet, but you can readily see how the
> problem could be pervasive there.
> 
> Jim, I appreciate the fix you suggest, but when you say long name, do
> you mean the long name of the card?  If so, then that does not work
> either.  In any case, a bug report is in order.

I gave a very quick answer to you because I do this all the time and, in
fact, ListMagic has identically named custom property sets in the stack(s)
and in each card that you install ListMagic widgets in. If what you say were
true, ListMagic would not work at all.

So I created a stack, added two cards called FirstCard and SecondCard (I
don't like spaces in names) and in cd id 1002 I created a button with the
following script:

ON mouseUp pMouseBtnNo
set the x of cd "FirstCard" of this stack to "123"
set the y of cd "FirstCard" of this stack to "456"
set the y of cd "SecondCard" of this stack to "ABC"
set the z of cd "SecondCard" of this stack to "DEF"
END mouseUp

I then put a button and a field called "fldResult" on FirstCard and
SecondCard. The button has this script:

ON mouseUp pMouseBtnNo
local tX, tY, tZ
-   # 
put the short name of this card & cr & the long name of this cd into fld
"fldResult" 
SWITCH the short name of this card
CASE "FirstCard"
put the x of (cd  the short name of this card) into tX
put the y of (cd  the short name of this card) into tY
put return & "x" && tX && "y" && tY after fld "fldResult"
break   # 
CASE "SecondCard"
put the y of (cd  the short name of this card) into tY
put the z of (cd  the short name of this card) into tZ
put return & "y" && tY && "z" && tZ after fld "fldResult"
break
DEFAULT
put cr & "Error: It's neither card" into fld "fldResult"
END switch
END mouseUp

On FirstCard I get:

FirstCard
card "FirstCard" of stack "D:/MyStacks/TestCProps.rev"
FirstCard
x 123 y 456

And on SecondCard I get:

SecondCard
card "SecondCard" of stack "D:/MyStacks/TestCProps.rev"
y ABC z DEF


Seems correct to me. ;-)

There is no problem except readability and maintainability of code in using
1 char custom properties and vars. When you experience weirdness like you
are seeing, first put to a field in your stack rather than the msg box to
eliminate any possibility of the msg box contributing to your issue and then
change excessive use of *this* stack or *this* card to something more
specific. Also use parenthesis to resolve a name like a card name first.

Aloha from Hawaii,

Jim Bufalini


___
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: Problem Calling Custom Card Props with the Same Name Using Switch

2009-11-30 Thread Jim Bufalini
Hi Gregory,

> -Original Message-
> From: use-revolution-boun...@lists.runrev.com [mailto:use-revolution-
> Hello Jacques, Jacqueline, Craig, and Jim,
> 
> Sadly, it is a bug then.  The consequences, as I said, are potentially
> serious for any stack that uses custom props with the same name to
> monitor various states of objects.  Jacqueline and Jacques (kind of
> musical, eh?), I experimented a little more and find that it is not
> limited to using y as the variable name or one-letter variable names in
> general.  I get the same problem when x is used for the custom prop on
> two different cards and when a two-letter name, xV, is used.  The
> problem is also there if you use an If control structure rather than
> Switch, and it is not limited to cards.  I set props for two buttons in
> the same way and lost the value of the same-named prop for the second
> button.  I haven't used Behaviours yet, but you can readily see how the
> problem could be pervasive there.
> 
> Jim, I appreciate the fix you suggest, but when you say long name, do
> you mean the long name of the card?  If so, then that does not work
> either.  In any case, a bug report is in order.

I gave a very quick answer to you because I do this all the time and, in
fact, ListMagic has identically named custom property sets in the stack(s)
and in each card that you install ListMagic widgets in. If what you say were
true, ListMagic would not work at all.

So I created a stack, added two cards called FirstCard and SecondCard (I
don't like spaces in names) and in cd id 1002 I created a button with the
following script:

ON mouseUp pMouseBtnNo
set the x of cd "FirstCard" of this stack to "123"
set the y of cd "FirstCard" of this stack to "456"
set the y of cd "SecondCard" of this stack to "ABC"
set the z of cd "SecondCard" of this stack to "DEF"
END mouseUp

I then put a button and a field called "fldResult" on FirstCard and
SecondCard. The button has this script:

ON mouseUp pMouseBtnNo
local tX, tY, tZ
-   # 
put the short name of this card & cr & the long name of this cd into fld
"fldResult" 
SWITCH the short name of this card
CASE "FirstCard"
put the x of (cd  the short name of this card) into tX
put the y of (cd  the short name of this card) into tY
put return & "x" && tX && "y" && tY after fld "fldResult"
break   # 
CASE "SecondCard"
put the y of (cd  the short name of this card) into tY
put the z of (cd  the short name of this card) into tZ
put return & "y" && tY && "z" && tZ after fld "fldResult"
break
DEFAULT
put cr & "Error: It's neither card" into fld "fldResult"
END switch
END mouseUp

On FirstCard I get:

FirstCard
card "FirstCard" of stack "D:/MyStacks/TestCProps.rev"
FirstCard
x 123 y 456

And on SecondCard I get:

SecondCard
card "SecondCard" of stack "D:/MyStacks/TestCProps.rev"
y ABC z DEF


Seems correct to me. ;-)

There is no problem except readability and maintainability of code in using
1 char custom properties and vars. When you experience weirdness like you
are seeing, first put to a field in your stack rather than the msg box to
eliminate any possibility of the msg box contributing to your issue and then
change excessive use of *this* stack or *this* card to something more
specific. Also use parenthesis to resolve a name like a card name first.

Aloha from Hawaii,

Jim Bufalini


___
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: Problem Calling Custom Card Props with the Same Nam Using Switch

2009-11-30 Thread Jim Bufalini
Hi Gregory,

> -Original Message-
> From: use-revolution-boun...@lists.runrev.com [mailto:use-revolution-
> Hello Jacques, Jacqueline, Craig, and Jim,
> 
> Sadly, it is a bug then.  The consequences, as I said, are potentially
> serious for any stack that uses custom props with the same name to
> monitor various states of objects.  Jacqueline and Jacques (kind of
> musical, eh?), I experimented a little more and find that it is not
> limited to using y as the variable name or one-letter variable names in
> general.  I get the same problem when x is used for the custom prop on
> two different cards and when a two-letter name, xV, is used.  The
> problem is also there if you use an If control structure rather than
> Switch, and it is not limited to cards.  I set props for two buttons in
> the same way and lost the value of the same-named prop for the second
> button.  I haven't used Behaviours yet, but you can readily see how the
> problem could be pervasive there.
> 
> Jim, I appreciate the fix you suggest, but when you say long name, do
> you mean the long name of the card?  If so, then that does not work
> either.  In any case, a bug report is in order.

I gave a very quick answer to you because I do this all the time and, in
fact, ListMagic has identically named custom property sets in the stack(s)
and in each card that you install ListMagic widgets in. If what you say were
true, ListMagic would not work at all.

So I created a stack, added two cards called FirstCard and SecondCard (I
don't like spaces in names) and in cd id 1002 I created a button with the
following script:

ON mouseUp pMouseBtnNo
set the x of cd "FirstCard" of this stack to "123"
set the y of cd "FirstCard" of this stack to "456"
set the y of cd "SecondCard" of this stack to "ABC"
set the z of cd "SecondCard" of this stack to "DEF"
END mouseUp

I then put a button and a field called "fldResult" on FirstCard and
SecondCard. The button has this script:

ON mouseUp pMouseBtnNo
local tX, tY, tZ
-   # 
put the short name of this card & cr & the long name of this cd into fld
"fldResult" 
SWITCH the short name of this card
CASE "FirstCard"
put the x of (cd  the short name of this card) into tX
put the y of (cd  the short name of this card) into tY
put return & "x" && tX && "y" && tY after fld "fldResult"
break   # 
CASE "SecondCard"
put the y of (cd  the short name of this card) into tY
put the z of (cd  the short name of this card) into tZ
put return & "y" && tY && "z" && tZ after fld "fldResult"
break
DEFAULT
put cr & "Error: It's neither card" into fld "fldResult"
END switch
END mouseUp

On FirstCard I get:

FirstCard
card "FirstCard" of stack "D:/MyStacks/TestCProps.rev"
FirstCard
x 123 y 456

And on SecondCard I get:

SecondCard
card "SecondCard" of stack "D:/MyStacks/TestCProps.rev"
y ABC z DEF


Seems correct to me. ;-)

There is no problem except readability and maintainability of code in using
1 char custom properties and vars. When you experience weirdness like you
are seeing, first put to a field in your stack rather than the msg box to
eliminate any possibility of the msg box contributing to your issue and then
change excessive use of *this* stack or *this* card to something more
specific. Also use parenthesis to resolve a name like a card name first.

Aloha from Hawaii,

Jim Bufalini


___
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: Problem Calling Custom Card Props with the Same Name Using Switch

2009-11-30 Thread Gregory Lypny
The bug report for this bug is 8476.

Gregory

___
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: Problem Calling Custom Card Props with the Same Name Using Switch

2009-11-30 Thread Gregory Lypny
Hello Jacques, Jacqueline, Craig, and Jim,

Sadly, it is a bug then.  The consequences, as I said, are potentially serious 
for any stack that uses custom props with the same name to monitor various 
states of objects.  Jacqueline and Jacques (kind of musical, eh?), I 
experimented a little more and find that it is not limited to using y as the 
variable name or one-letter variable names in general.  I get the same problem 
when x is used for the custom prop on two different cards and when a two-letter 
name, xV, is used.  The problem is also there if you use an If control 
structure rather than Switch, and it is not limited to cards.  I set props for 
two buttons in the same way and lost the value of the same-named prop for the 
second button.  I haven't used Behaviours yet, but you can readily see how the 
problem could be pervasive there.

Jim, I appreciate the fix you suggest, but when you say long name, do you mean 
the long name of the card?  If so, then that does not work either.  In any 
case, a bug report is in order.

Regards,


Gregory Lypny

Associate Professor of Finance
John Molson School of Business
Concordia University
Montreal, Canada





On Mon, Nov 30, 2009, at 4:42 AM, Jacques Hausser wrote:

> Related remark: I remember I had sometime (not systematically) problems when 
> giving one letter names to variables or parameters (e.g. a,b or x,y, which 
> are so standart, in regression for example), but I was too lazy to digg deep 
> in this question, it was simpler to change the name of the variable... but it 
> IS some hidden pitfall somewhere.
> 
> Jacques


On Mon, Nov 30, 2009, at 4:42 AM, Jacqueline Landman Gay wrote:

> This fails for me too, but only if I keep the property name you 
> assigned. If I change the property to "cY" it works as expected. I'm not 
> sure why, but I'd guess the engine is using "y" for something. Since I 
> always preface my custom properties with "c", I haven't run into this 
> before, but I think you should probably bug-report it. It's an odd one.


On Mon, Nov 30, 2009, at 4:42 AM, Craig Newman wrote:

> Confirmed. And it's odd, because the property value is there, at least 
> right at the beginning:







On Mon, Nov 30, 2009, at 4:42 AM, Jim Bufalini wrote:

> Use the long name.
> 
> Aloha from Hawaii
> 
> Jim Bufalini


On Mon, Nov 30, 2009, at 4:42 AM, I originally wrote:

>   Hello everyone,
> 
>   Can we assign the same name to custom props of two different objects, 
> for example, the modificationDate of Card 1 and the modificationDate of Card 
> 2?
> 
>   I created a simple stack with two cards named First Card and Second 
> Card, a common button that assigns custom props to each and another common 
> button to show the values of each card's custom prop.  The handler in the 
> button that sets the custom props uses Switch and it looks like this.
> 
> on mouseUp
>   switch the short name of this card
>  case "First Card"
> set the x of this card to 123
> set the y of this card to 456
> break
>  case "Second Card"
> Set the y of this card to "ABC"
> set the z of this card to "DEF"
> break
>   end switch
> end mouseUp
> 
> What is important here is that both cards have a custom prop with the same 
> name, y, and that y has a different value for each (123 or ABC).  The button 
> to show the values of the props also uses Switch.
> 
> on mouseUp
>   put the short name of this card
>   switch the short name of this card
>  case "First Card"
> put the x of this card into x
> put the y of this card into y
> put return & "x" && x && "y" && y after msg
> break
>  case "Second Card"
> put the y of this card into y
> put the z of this card into z
> put return & "y" && y && "z" && z after msg
> break
>   end switch
> end mouseUp
> 
> If you click this button while on the first card, it correctly puts into the 
> message box
> 
>   First Card
>   x 123 y 456
> 
> But if you click it while on the second card, you get
> 
>   Second Card
>   y  z DEF
> 
> where y is empty.  But, comment out the statement involving y in the first 
> case of Switch and the second case will work correctly!
> 
>   case "First Card"
> put the x of this card into x
> -- put the y of this card into y
> put return & "x" && x && "y" && y
>   

Re: Problem Calling Custom Card Props with the Same Name Using Switch

2009-11-30 Thread Jacques Hausser
Hi René,

I know ! Nobody will have problems with multi-letter names : the 
CPropIWouldLikeToCallY or estimatedSlopeOfTheRegression  would work fine, but 
how boring to type compared to the usual a ! And I didn't see anywhere in the 
docs a caveat against the use of one letter names...

Jacques

Le 30 nov. 2009 à 11:23, René Micout a écrit :

> Hello Jacques !
> for the specific issue of temporary variables, I use the following names, 
> which solves, I think, this type of problem: vtA, vtB, vtC, etc.. (pour 
> variable tampon (ou temporaire) a, b, c, etc..)
> Bon souvenir de Paris
> René
> 
> Le 30 nov. 2009 à 10:42, Jacques Hausser a écrit :
> 
>> 
>> Le 30 nov. 2009 à 03:25, J. Landman Gay a écrit :
>> 
>>> This fails for me too, but only if I keep the property name you assigned. 
>>> If I change the property to "cY" it works as expected. I'm not sure why, 
>>> but I'd guess the engine is using "y" for something. Since I always preface 
>>> my custom properties with "c", I haven't run into this before, but I think 
>>> you should probably bug-report it. It's an odd one.
>> 
>> 
>> Related remark: I remember I had sometime (not systematically) problems when 
>> giving one letter names to variables or parameters (e.g. a,b or x,y, which 
>> are so standart, in regression for example), but I was too lazy to digg deep 
>> in this question, it was simpler to change the name of the variable... but 
>> it IS some hidden pitfall somewhere.
>> 
>> Jacques
> 
> ___
> 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

**
Prof. Jacques Hausser
Department of Ecology and Evolution
Biophore / Sorge
University of Lausanne
CH 1015 Lausanne
please use my private address:
6 route de Burtigny
CH-1269 Bassins
tel/fax:++ 41 22 366 19 40
mobile: ++ 41 79 757 05 24
E-Mail: jacques.haus...@unil.ch
***

___
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: Problem Calling Custom Card Props with the Same Name Using Switch

2009-11-30 Thread René Micout
Hello Jacques !
for the specific issue of temporary variables, I use the following names, which 
solves, I think, this type of problem: vtA, vtB, vtC, etc.. (pour variable 
tampon (ou temporaire) a, b, c, etc..)
Bon souvenir de Paris
René

Le 30 nov. 2009 à 10:42, Jacques Hausser a écrit :

> 
> Le 30 nov. 2009 à 03:25, J. Landman Gay a écrit :
> 
>> This fails for me too, but only if I keep the property name you assigned. If 
>> I change the property to "cY" it works as expected. I'm not sure why, but 
>> I'd guess the engine is using "y" for something. Since I always preface my 
>> custom properties with "c", I haven't run into this before, but I think you 
>> should probably bug-report it. It's an odd one.
> 
> 
> Related remark: I remember I had sometime (not systematically) problems when 
> giving one letter names to variables or parameters (e.g. a,b or x,y, which 
> are so standart, in regression for example), but I was too lazy to digg deep 
> in this question, it was simpler to change the name of the variable... but it 
> IS some hidden pitfall somewhere.
> 
> Jacques

___
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: Problem Calling Custom Card Props with the Same Name Using Switch

2009-11-30 Thread Jacques Hausser

Le 30 nov. 2009 à 03:25, J. Landman Gay a écrit :

> This fails for me too, but only if I keep the property name you assigned. If 
> I change the property to "cY" it works as expected. I'm not sure why, but I'd 
> guess the engine is using "y" for something. Since I always preface my custom 
> properties with "c", I haven't run into this before, but I think you should 
> probably bug-report it. It's an odd one.


Related remark: I remember I had sometime (not systematically) problems when 
giving one letter names to variables or parameters (e.g. a,b or x,y, which are 
so standart, in regression for example), but I was too lazy to digg deep in 
this question, it was simpler to change the name of the variable... but it IS 
some hidden pitfall somewhere.

Jacques

**
Prof. Jacques Hausser
Department of Ecology and Evolution
Biophore / Sorge
University of Lausanne
CH 1015 Lausanne
please use my private address:
6 route de Burtigny
CH-1269 Bassins
tel/fax:++ 41 22 366 19 40
mobile: ++ 41 79 757 05 24
E-Mail: jacques.haus...@unil.ch
***

___
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: Problem Calling Custom Card Props with the Same Name Using Switch

2009-11-29 Thread J. Landman Gay

Gregory Lypny wrote:


Can we assign the same name to custom props of two different objects,
for example, the modificationDate of Card 1 and the modificationDate of

Card 2?

Yes, I do it all the time.


What is important here is that both cards have a custom prop with the
same name, y, and that y has a different value for each (123 or ABC).
The button to show the values of the props also uses Switch.

on mouseUp
   put the short name of this card
   switch the short name of this card
  case "First Card"
 put the x of this card into x
 put the y of this card into y
 put return & "x" && x && "y" && y after msg
 break
  case "Second Card"
 put the y of this card into y
 put the z of this card into z
     put return & "y" && y && "z" && z after msg
 break
   end switch
end mouseUp



This fails for me too, but only if I keep the property name you 
assigned. If I change the property to "cY" it works as expected. I'm not 
sure why, but I'd guess the engine is using "y" for something. Since I 
always preface my custom properties with "c", I haven't run into this 
before, but I think you should probably bug-report it. It's an odd one.



--
Jacqueline Landman Gay | jac...@hyperactivesw.com
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: Problem Calling Custom Card Props with the Same Name Using Switch

2009-11-29 Thread DunbarX
Confirmed. And it's odd, because the property value is there, at least 
right at the beginning:

on mouseUp
put ""
put return & "y" && the y of this card   && "z" && the z of this card 
after msg

--both properties are present at this stage

put the short name of this card
switch the short name of this card
   case "First Card"
  put the x of this card into x
  put the y of this card into y
  put return & "x" && x && "y" && y after msg
  break
   case "Second Card"
  put the y of this card into y
  put the z of this card into z
  put return & "y" && y && "z" && z after msg
  break
end switch
end mouseUp

The value is lost along the way, even though stepping through the script 
shows nothing untoward.

Craig Newman
In a message dated 11/29/09 7:57:58 PM, gregory.ly...@videotron.ca writes:


> 
> on mouseUp
>    put the short name of this card
>    switch the short name of this card
>       case "First Card"
>          put the x of this card into x
>          put the y of this card into y
>          put return & "x" && x && "y" && y after msg
>          break
>       case "Second Card"
>          put the y of this card into y
>          put the z of this card into z
>          put return & "y" && y && "z" && z after msg
>          break
>    end switch
> end mouseUp
> 

___
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: Problem Calling Custom Card Props with the Same Name Using Switch

2009-11-29 Thread Jim Bufalini
Use the long name.

Aloha from Hawaii

Jim Bufalini

>   Hello everyone,
> 
>   Can we assign the same name to custom props of two different
> objects, for example, the modificationDate of Card 1 and the
> modificationDate of Card 2?
> 
>   I created a simple stack with two cards named First Card and
> Second Card, a common button that assigns custom props to each and
> another common button to show the values of each card's custom prop.
> The handler in the button that sets the custom props uses Switch and it
> looks like this.
> 
> on mouseUp
>switch the short name of this card
>   case "First Card"
>  set the x of this card to 123
>  set the y of this card to 456
>  break
>   case "Second Card"
>  Set the y of this card to "ABC"
>  set the z of this card to "DEF"
>  break
>end switch
> end mouseUp
> 
> What is important here is that both cards have a custom prop with the
> same name, y, and that y has a different value for each (123 or ABC).
> The button to show the values of the props also uses Switch.
> 
> on mouseUp
>put the short name of this card
>switch the short name of this card
>   case "First Card"
>  put the x of this card into x
>  put the y of this card into y
>  put return & "x" && x && "y" && y after msg
>  break
>   case "Second Card"
>  put the y of this card into y
>  put the z of this card into z
>  put return & "y" && y && "z" && z after msg
>  break
>end switch
> end mouseUp
> 
> If you click this button while on the first card, it correctly puts
> into the message box
> 
>   First Card
>   x 123 y 456
> 
> But if you click it while on the second card, you get
> 
>   Second Card
>   y  z DEF
> 
> where y is empty.  But, comment out the statement involving y in the
> first case of Switch and the second case will work correctly!
> 
>   case "First Card"
>  put the x of this card into x
>  -- put the y of this card into y
>  put return & "x" && x && "y" && y
>  break
> 
> In other words, a statement that retrieves a custom prop in the case of
> Switch that should be by-passed is somehow affecting the retrieval and
> use of a custom prop with the same name in the case of Switch that is
> executed.  I hope someone can tell me that I've made a mistake because,
> otherwise, this could have serious consequences for stacks whose
> objects have custom props that monitor the state of an object and these
> props have the same names, e.g., the modificationDate of Card 1, the
> modificationDate of Card 2, etc.
> 
> Regards,
> 
>   Gregory
> 
> 
> 
> 
> 
> 
> ___
> 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

___
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


Problem Calling Custom Card Props with the Same Name Using Switch

2009-11-29 Thread Gregory Lypny
Hello everyone,

Can we assign the same name to custom props of two different objects, 
for example, the modificationDate of Card 1 and the modificationDate of Card 2?

I created a simple stack with two cards named First Card and Second 
Card, a common button that assigns custom props to each and another common 
button to show the values of each card's custom prop.  The handler in the 
button that sets the custom props uses Switch and it looks like this.

on mouseUp
   switch the short name of this card
  case "First Card"
 set the x of this card to 123
 set the y of this card to 456
 break
  case "Second Card"
 Set the y of this card to "ABC"
 set the z of this card to "DEF"
 break
   end switch
end mouseUp

What is important here is that both cards have a custom prop with the same 
name, y, and that y has a different value for each (123 or ABC).  The button to 
show the values of the props also uses Switch.

on mouseUp
   put the short name of this card
   switch the short name of this card
  case "First Card"
 put the x of this card into x
 put the y of this card into y
 put return & "x" && x && "y" && y after msg
 break
  case "Second Card"
 put the y of this card into y
     put the z of this card into z
 put return & "y" && y && "z" && z after msg
 break
   end switch
end mouseUp

If you click this button while on the first card, it correctly puts into the 
message box

First Card
x 123 y 456

But if you click it while on the second card, you get

Second Card
y  z DEF

where y is empty.  But, comment out the statement involving y in the first case 
of Switch and the second case will work correctly!

case "First Card"
 put the x of this card into x
     -- put the y of this card into y
 put return & "x" && x && "y" && y
     break

In other words, a statement that retrieves a custom prop in the case of Switch 
that should be by-passed is somehow affecting the retrieval and use of a custom 
prop with the same name in the case of Switch that is executed.  I hope someone 
can tell me that I've made a mistake because, otherwise, this could have 
serious consequences for stacks whose objects have custom props that monitor 
the state of an object and these props have the same names, e.g., the 
modificationDate of Card 1, the modificationDate of Card 2, etc.

Regards,

Gregory






___
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: The Conference. RE switch

2009-09-05 Thread stephen barncard
I really like to use switch for any logic more than a single if-then-else.
Switch statements, due to their fall-through and default behaviors, can
handle more logic *conditions* than if-then
switch tInput
case 0
case 1
put tInput after tOut
case 2
   put tInput after tOut
case 3
put tInput after tOut
break
case 4
put tInput after tOut
case 5
put tInput after tOut
break
default
put tInput after tOut
end switch


tInput - tOut

0==>  123
1==>  123
2==>  23
3==>  3
4==>  45
5==>  5
6==>  6
7==>  7
...

when one gets used to the structure of a switch statement, it really looks
like it functions, and it's quite simple. Same thing with arrays.


All programming is simple, once one can break it down as smaller ideas put
together as a machine.

-
Stephen Barncard
San Francisco
http://houseofcubes.com/disco.irev


2009/9/5 Colin Holgate 

>
> On Sep 5, 2009, at 12:03 PM, Richmond Mathewson wrote:
>
>  Using SWITCH statements,
>>
>
>
> Although switch statements can be useful, you don't have to use them. So
> your old code could stay as it is, and you would just use switch in the
> future if it's appropriate. You can often get away without an if or a
> switch. Like with your example:
>
> do item Goofy of "something-or-other,something-more-foolish"
>
>
>
___
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: Switch or if

2009-05-01 Thread Sarah Reichelt
> I think there may be some sort of mail server hiccup going on today, because
> I just got several messages from on or about that date. Anybody else?

Yes, I've got lots dated around April 15.

Sarah
___
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: Switch or if

2009-05-01 Thread Devin Asay


On May 1, 2009, at 11:34 AM, Richmond Mathewson wrote:

That's funny, I 'm sure this topic was discussed fairly exhaustively  
in

April;
the topic being raised exactly by you "Camm" on Monday April 20.

So . . . what is the point of this?


I think there may be some sort of mail server hiccup going on today,  
because I just got several messages from on or about that date.  
Anybody else?


devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

___
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: Switch or if

2009-05-01 Thread Richmond Mathewson
That's funny, I 'm sure this topic was discussed fairly exhaustively in 
April;

the topic being raised exactly by you "Camm" on Monday April 20.

So . . . what is the point of this?

customerserv...@easyobdii.com wrote:

Dear all ,

Which is faster in execution

SWITCH OR IF ?

Regards
Camm
___
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

  


___
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


Switch or if

2009-05-01 Thread customerservice
Dear all ,

Which is faster in execution

SWITCH OR IF ?

Regards
Camm
___
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: Switch or If

2009-04-23 Thread Kay C Lan
You may wish to look back at these two threads, lots of benchmarking, sorry
I haven't figured out how to create links to old threads :-(

Subject: if statements vs case
Date: 27 feb 07
From: Hershel Fisch

Subject: switch case question
Date: 10/22/06
From: Mark Swindell

Basically what has been said so far is correct, timings are similar BUT Dar
Scott in the 2006 thread determined those cases (sorry for the pun) where
one will be faster than the other. I believe the general conclusion was, if
speed meant everything to you, you'd need to benchmark both.

Secondly, Randall Reetz wrote:

A better word for "switch" could have been "first match" as it presents an
> ordered list of conditional tests at the same level, once a match is found
> the interpretor exits the switch list.
>

Whilst this is the 'normal' behaviour we think of, it is not the only
behaviour. If the 'break' keyword does not follow a 'case' structure, then
the statement flow does NOT exit the switch list. I use this all the time,
its a great feature of switch statements that allow the easy creating and
modification of OR conditions

switch tName
  case "Bob"
  case "Bill"
  case "Ben"
put "boy" into tGender
  break
  case "Sue"
  case "Sally"
  case "Sarah"
put "girl" into tGender
  break
  default
 answer "A Name I Don't Know"
end switch

I love switch for the benefits of script manageability. IMO they are very
easy to understand, very easy to figure out where to include extra case
structures if needed - something I always struggled with in large nested
if-then-else structures.

Another thing I like is they are fairly easy to manipulate if you need to
make some minor speed improvements. During development, simply by adding a
counting mechanism you can determine which cases are triggered most often
and therefore move those to the top of the structure.

Lastly, I've become fond of using the default structure as a logic error
catch all, as in the above example.

If it's yes/no, on/off, true/false, 1/0 then I use IF, but too often I
discover it's yes/no/maybe, on/off/sleep, true/false/no comment, 1/0/-1 so I
go with SWITCH.
___
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: Switch or If

2009-04-23 Thread Randall Reetz
My spelling is so "creative" that i am forced to choose tourette's over 
randall's every time.  If that i could use xtalk in conversation...

-Original Message-
From: "stephen barncard" 
To: "How to use Revolution" 
Sent: 4/23/2009 11:50 AM
Subject: Re: Switch or If

And one can't turn that foolishness off? I hate predictive text.

-
Stephen Barncard
San Francisco
http://barncard.com


2009/4/23 Randall Reetz 

> My phone uses the special Microsoft "Tourette's" word prediction algorithm.
>
> In my previous post, I intended "of", not "OS".
>
> Randall
___
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


___
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: Switch or If

2009-04-23 Thread Richmond Mathewson
Hey, that was the only thing useful I learnt doing my "M.A" in IT at 
Abertay: what happens when you are

hit by a number 10 bus?

This is the reason my Granny always slipped on a clean pair before she 
went shopping. :)


Now, I am a bad programmer in several respects; and the worst is that I 
don't comment my way
through my code so when the next system development lifecycle comes 
round (Ha, Ha, Ha . . .
What SDLC in a one-room EFL school with 3 computers . . . you can see 
why matter attitude is a
bit slack). However, I for one, find reading through other people's code 
a lot easier to understand
with if . . . then loops rather than 'switch'; I never use the latter as 
on coming back to it later my

logic gets befuddled.

sincerely, Richmond Mathewson.

Richard Gaskin wrote:

Phil Davis wrote:
Unless you're building something where the small difference in speed 
is absolutely critical, I would seek to answer a different question:  
Which structure will be easier to understand and maintain in the 
future when I (or others) come back to it?


Wise words.  While I often adhere to the motto "A clock cycle saved 
today is a clock cycle that can be put toward more powerful features 
tomorrow", we need to balance that with time-to-market and robustness.


In many cases it should be possible to make whatever evaluation needs 
to be done with either "case" or "if" outside of repeat loops, so you 
can use whichever form best represents the logic involved while 
optimizing performance even more than using either within the loop.


--
 Richard Gaskin
 Fourth World
 Revolution training and consulting: http://www.fourthworld.com
 Webzine for Rev developers: 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



___
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: Switch or If

2009-04-23 Thread stephen barncard
And one can't turn that foolishness off? I hate predictive text.

-
Stephen Barncard
San Francisco
http://barncard.com


2009/4/23 Randall Reetz 

> My phone uses the special Microsoft "Tourette's" word prediction algorithm.
>
> In my previous post, I intended "of", not "OS".
>
> Randall
___
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: Switch or If

2009-04-23 Thread Randall Reetz
My phone uses the special Microsoft "Tourette's" word prediction algorithm.

In my previous post, I intended "of", not "OS".

Randall
-Original Message-
From: "Randall Reetz" 
To: "How to use Revolution" 
Sent: 4/23/2009 9:11 AM
Subject: RE: Switch or If

I agree.  Inside a real-time interaction repsonce loop (redrawing a graphic 
according to mouse loc) is where nested ifs alow minimal interpretor expence.  
Also, nested ifs demand a great understanding of the problem topology which may 
or may not be worth the effort.  Switch statements dont allow easy stacking of 
decision criteria.  A nested if structure allows hierarchical triage of 
conditional logic.  A better word for "switch" could have been "first match" as 
it presents an ordered list of conditional tests at the same level, once a 
match is found the interpretor exits the switch list.  For performance reasons, 
the ordering OS switch conditionals should correlate to the natural frequency 
distribution of your problem domain (most comon conditions at the top).

-Original Message-
From: "Phil Davis" 
To: "How to use Revolution" 
Sent: 4/23/2009 8:29 AM
Subject: Re: Switch or If

Hi Camm,

Unless you're building something where the small difference in speed is 
absolutely critical, I would seek to answer a different question:  Which 
structure will be easier to understand and maintain in the future when I 
(or others) come back to it?

My 2 cents' worth -
Phil Davis


Mark Smith wrote:
>
> On 23 Apr 2009, at 11:02,   wrote:
>
>> All ,
>>
>> Which is faster in a loop ?
>>
>> SWITCH or IF
>>
>>
>
> This is a little test I did. I get about 35ms for 'switch', about 20ms 
> for 'if'. As Jim said though, I suspect it'll vary according to the 
> kind and complexity of conditions you're testing.
>
>
> on mouseUp
>put the millisecs into tStart
>repeat 1
>   put random(5) into tSw
>   switchTest tSw
>end repeat
>put the millisecs - tStart into t1
>
>put the millisecs into tStart
>repeat 1
>   put random(5) into tIf
>   ifTest tIf
>end repeat
>put the millisecs - tStart into t2
>
>put t1 && t2
> end mouseUp
>
> -


[truncated by sender]
___
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: Switch or If

2009-04-23 Thread Richard Gaskin

Phil Davis wrote:
Unless you're building something where the small difference in speed is 
absolutely critical, I would seek to answer a different question:  Which 
structure will be easier to understand and maintain in the future when I 
(or others) come back to it?


Wise words.  While I often adhere to the motto "A clock cycle saved 
today is a clock cycle that can be put toward more powerful features 
tomorrow", we need to balance that with time-to-market and robustness.


In many cases it should be possible to make whatever evaluation needs to 
be done with either "case" or "if" outside of repeat loops, so you can 
use whichever form best represents the logic involved while optimizing 
performance even more than using either within the loop.


--
 Richard Gaskin
 Fourth World
 Revolution training and consulting: http://www.fourthworld.com
 Webzine for Rev developers: 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: Switch or If

2009-04-23 Thread Randall Reetz
I agree.  Inside a real-time interaction repsonce loop (redrawing a graphic 
according to mouse loc) is where nested ifs alow minimal interpretor expence.  
Also, nested ifs demand a great understanding of the problem topology which may 
or may not be worth the effort.  Switch statements dont allow easy stacking of 
decision criteria.  A nested if structure allows hierarchical triage of 
conditional logic.  A better word for "switch" could have been "first match" as 
it presents an ordered list of conditional tests at the same level, once a 
match is found the interpretor exits the switch list.  For performance reasons, 
the ordering OS switch conditionals should correlate to the natural frequency 
distribution of your problem domain (most comon conditions at the top).

-Original Message-
From: "Phil Davis" 
To: "How to use Revolution" 
Sent: 4/23/2009 8:29 AM
Subject: Re: Switch or If

Hi Camm,

Unless you're building something where the small difference in speed is 
absolutely critical, I would seek to answer a different question:  Which 
structure will be easier to understand and maintain in the future when I 
(or others) come back to it?

My 2 cents' worth -
Phil Davis


Mark Smith wrote:
>
> On 23 Apr 2009, at 11:02,   wrote:
>
>> All ,
>>
>> Which is faster in a loop ?
>>
>> SWITCH or IF
>>
>>
>
> This is a little test I did. I get about 35ms for 'switch', about 20ms 
> for 'if'. As Jim said though, I suspect it'll vary according to the 
> kind and complexity of conditions you're testing.
>
>
> on mouseUp
>put the millisecs into tStart
>repeat 1
>   put random(5) into tSw
>   switchTest tSw
>end repeat
>put the millisecs - tStart into t1
>
>put the millisecs into tStart
>repeat 10000
>   put random(5) into tIf
>   ifTest tIf
>end repeat
>put the millisecs - tStart into t2
>
>put t1 && t2
> end mouseUp
>
> -
>
> on switchTest pSw
>switch pSw
>   case 1
>
>  break
>   case 2
>
>  break
>   case 3
>
>  break
>   case 4
>
>  break
>   default
>
>  break


[truncated by sender]
___
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: Switch or If

2009-04-23 Thread Phil Davis

Hi Camm,

Unless you're building something where the small difference in speed is 
absolutely critical, I would seek to answer a different question:  Which 
structure will be easier to understand and maintain in the future when I 
(or others) come back to it?


My 2 cents' worth -
Phil Davis


Mark Smith wrote:


On 23 Apr 2009, at 11:02,   wrote:


All ,

Which is faster in a loop ?

SWITCH or IF




This is a little test I did. I get about 35ms for 'switch', about 20ms 
for 'if'. As Jim said though, I suspect it'll vary according to the 
kind and complexity of conditions you're testing.



on mouseUp
   put the millisecs into tStart
   repeat 1
  put random(5) into tSw
  switchTest tSw
   end repeat
   put the millisecs - tStart into t1

   put the millisecs into tStart
   repeat 1
  put random(5) into tIf
  ifTest tIf
   end repeat
   put the millisecs - tStart into t2

   put t1 && t2
end mouseUp

-

on switchTest pSw
   switch pSw
  case 1

 break
  case 2

 break
  case 3

 break
  case 4

 break
  default

 break
   end switch
end switchTest

-

on ifTest pIf
   if pIf = 1 then

   else if pIf = 2 then

   else if pIf = 3 then

   else if pIf = 4 then

   else

   end if
end ifTest

Best,

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



--
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net

___
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: Switch or If

2009-04-23 Thread Mark Smith


On 23 Apr 2009, at 11:02,   wrote:


All ,

Which is faster in a loop ?

SWITCH or IF




This is a little test I did. I get about 35ms for 'switch', about  
20ms for 'if'. As Jim said though, I suspect it'll vary according to  
the kind and complexity of conditions you're testing.



on mouseUp
   put the millisecs into tStart
   repeat 1
  put random(5) into tSw
  switchTest tSw
   end repeat
   put the millisecs - tStart into t1

   put the millisecs into tStart
   repeat 1
  put random(5) into tIf
  ifTest tIf
   end repeat
   put the millisecs - tStart into t2

   put t1 && t2
end mouseUp

-

on switchTest pSw
   switch pSw
  case 1

 break
  case 2

 break
  case 3

 break
  case 4

 break
  default

 break
   end switch
end switchTest

-

on ifTest pIf
   if pIf = 1 then

   else if pIf = 2 then

   else if pIf = 3 then

   else if pIf = 4 then

   else

   end if
end ifTest

Best,

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: Switch or If

2009-04-23 Thread Jim Bufalini
Hi Camm,

I tested this many years ago and while it depended slightly on how the if/then 
was written, I was surprised that the if/then was faster, but only by a small 
amount. I can't speak for today and recent versions of Rev.

Aloha from Hawaii,

Jim Bufalini

> -Original Message-
> From: use-revolution-boun...@lists.runrev.com [mailto:use-revolution-
> boun...@lists.runrev.com] On Behalf Of cam...@tesco.net
> Sent: Thursday, April 23, 2009 12:03 AM
> To: use-revolution@lists.runrev.com
> Subject: Switch or If
> 
> All ,
> 
> Which is faster in a loop ?
> 
> SWITCH or IF
> 
> Regards
> Camm
> ___
> 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

___
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


Switch or If

2009-04-23 Thread camm29
All ,

Which is faster in a loop ?

SWITCH or IF

Regards
Camm
___
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


Switch or If

2009-04-23 Thread camm29
All ,

Which is faster in a loop ?

SWITCH or IF

Regards
Camm
___
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: Import temperature and switch on/off the heater with Rev

2009-02-08 Thread Bob Earp

Mark-It does with a USB to Serial adapter.  Once the adapter is set up to 
replicate a specific port you just tell PortMon to monitor the pseudo port, 
unfortunately only on Windows though.best, Bob...~~Message: 
2Date: Wed, 4 Feb 2009 14:37:40 -0800From: Mark Wieder 
Subject: Re: Import temperature and switch on/off the 
heater with RevTo: How to use Revolution 
Message-ID: 
<146745232640.20090204143...@ahsoftware.net>Content-Type: text/plain; 
charset=us-asciiBob-Interesting - I didn't think portmon worked with usb 
ports.-- -Mark wiedermwie...@ahsoftware.net
_
The new Windows Live Messenger. You don’t want to miss this.
http://www.microsoft.com/windows/windowslive/messenger.aspx___
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: Import temperature and switch on/off the heater with Rev

2009-02-05 Thread Judy Perry
No, just kidding.

On Wed, Feb 4, 2009 at 7:10 AM,  wrote:

>
>
> Judy, you aren't really upset? :-(
>
> Craig Newman
>
>
___
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: Import temperature and switch on/off the heater with Rev

2009-02-04 Thread DunbarX

In a message dated 2/4/09 4:56:24 PM, rje...@hotmail.com writes:


> Mark,Thanks for the feedback.  The Arduino looks a very cool device and as 
> soon as I can escape form other tasks I'll lock myself away and play with it.
> 

The Service USP Plus looks much easier to use (Rev support) and has onboard 
connectors for digital and analog I/O. It is very like the BeeHive gadget, and 
that was a wonderful product. You can do things right away.

Craig Newman


**
Great Deals on Dell Laptops. Starting at $499. 
(http://pr.atwola.com/promoclk/10075x1217883258x1201191827/aol?redir=http://ad.
doubleclick.net/clk;211531132;33070124;e)
___
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: Import temperature and switch on/off the heater with Rev

2009-02-04 Thread Mark Wieder
Bob-

Interesting - I didn't think portmon worked with usb ports.

-- 
-Mark Wieder
 mwie...@ahsoftware.net

___
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: Import temperature and switch on/off the heater with Rev

2009-02-04 Thread Bob Earp


Mark,Thanks for the feedback.  The Arduino looks a very cool device and as soon 
as I can escape form other tasks I'll lock myself away and play with it.  Yep, 
I know, I have to get a life  :-)I've been using the free PortMon utility from 
Microsoft (http://technet.microsoft.com/en-us/sysinternals/bb896644.aspx) with 
good success to monitor port activity, but unfortunately it's only Windoze 
based.best, Bob...Message: 19Date: Tue, 3 Feb 2009 16:43:04 -0800From: Mark 
Wieder Subject: Re: Import temperature and switch 
on/off the heater with RevTo: How to use Revolution 
Message-ID: 
<71666356250.20090203164...@ahsoftware.net>Content-Type: text/plain; 
charset=us-asciiBob-The Arduino works well with rev.If you're using Windows and 
need to do some usb protocoltroubleshooting, there's a great tool available 
athttp://www.aggsoft.com/usb-port-monitor.htmUnfortunately they don't have an 
osx version, and I haven't foundanything else that does this sort of 
packet-level analysis for themac.-- -Mark wiedermwie...@ahsoftware.net

_
Windows Live Messenger. Multitasking at its finest.
http://www.microsoft.com/windows/windowslive/messenger.aspx___
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: Import temperature and switch on/off the heater with Rev

2009-02-04 Thread DunbarX

In a message dated 2/4/09 12:56:19 AM, stephenrevoluti...@barncard.com 
writes:


> This company mentions apple drivers and Runtime Rev. They make USB I/O 
> Boxes
> -- and even some stuff that works with fischertechnik kits.They've been
> around for a while.
> 
> http://www.bkohg.com/serviceusbplus_e.html
> 

This gadget looks like the right stuff. Works basically like the others, and 
Rev is the front end. Have to try one.

Thanks for the info.

Craig Newman


**
Great Deals on Dell Laptops. Starting at $499. 
(http://pr.atwola.com/promoclk/10075x1217883258x1201191827/aol?redir=http://ad.
doubleclick.net/clk;211531132;33070124;e)
___
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: Import temperature and switch on/off the heater with Rev

2009-02-04 Thread DunbarX

In a message dated 2/4/09 8:36:07 AM, katheryn.swynf...@gmail.com writes:


> I'm not certain but I don't think it was a compliment!
> 

Of course it was a compliment. We have to stick together, you know.

It is always possible to connect wires to a computer.The trick is to have fun 
doing so. The older gadgets had Applescript, Director, 4th Dimension and C 
support. But it was the HC XCMD's that everyone used. A Rev interface would be 
like old times.

Judy, you aren't really upset? :-(

Craig Newman


**
Great Deals on Dell Laptops. Starting at $499. 
(http://pr.atwola.com/promoclk/10075x1217883258x1201191827/aol?redir=http://ad.
doubleclick.net/clk;211531132;33070124;e)
___
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: Import temperature and switch on/off the heater with Rev

2009-02-04 Thread Judy Perry
Yeah, so I hear ;-)
I was just on ChatRev with BvG the other day and referenced something else,
and he immediately wrote back and said, "Now I know how old you are!"

:-/

I'm not certain but I don't think it was a compliment!

@;-)

Regards,

Judy
http://revined.blogspot.com

On Tue, Feb 3, 2009 at 9:43 PM, dunbarx  wrote:

> Judy.
>
> Makes you one of the oldsters, you know.
>
___
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: Import temperature and switch on/off the heater with Rev

2009-02-04 Thread mazzapa...@libero.it

Thank you  all of you for the insights about serial interfaces. 
I will make 
some test and I will let you know.
Now I am more confident to carry on my 
project.
Best regards,
Paolo


___
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: Import temperature and switch on/off the heater with Rev

2009-02-04 Thread -= JB =-
I really haven't done any usb stuff yet except configure the port.  I  
have done some testing
with an internal modem using the serial port.  The only thing I have  
done with usb is list
the devices.  It is possible the only way to access most usb devices  
is to write a driver for

Rev to access the port.

-=>JB<=-


On Feb 4, 2009, at 1:09 AM, René Micout wrote:


Hello JB,
Is that work with USB musical keyboard ?
René from Paris

Le 4 févr. 09 à 07:29, -= JB =- a écrit :

You could probably do it with X10 devices.  I used to control X10  
devices with OS 8.6.  They
were controlled from the serial port but the new device is USB.  I  
am writing a stack that will
control the serial and USB ports but haven't been working on it  
for a few months.  I was able
to configure the ports and do some serial port stuff with the  
modem but haven't done much
with the usb port yet.  The older X10 took commands in a binary  
format if I remember and I
haven't done enough to see how the new X10 devices are controlled  
but they've changed
the format.  I have written some code for Revolution to convert  
between binary, ascii, hex &
numeric that I posted in the Scripters Scrapbook online section.   
I did find a program that is
for the Mac that controls X10 devices so I know it can be done but  
it may need a driver to
be written so you can do it with Revolution.  Until I figure out  
what type of info needs to be
sent to the USB device I won't be able to test it without a driver  
to be sure if it needs one to
be written or not.  If you can figure out how to control an  
external serial device from Rev the

old device could be used instead of the new USB one.

-=>JB<=-



On Feb 3, 2009, at 5:41 AM, paolo wrote:


Dear friends, I had this crazy idea:

I would like to create a Rev application to control the  
temperature of my room. So, I need my application  to import the  
temperature from a thermometer and switch on/off the heater.


I found documentation for an affordable external device in  
internet : http://www.audon.co.uk/io8g.html


It says  "Compatible with Profilab DAQ Software. " and "Can  
Utilize a Simple Terminal Emulator to Control All Functions"


It says also: "Virtual COM port (VCP) drivers cause the USB  
device to appear as an additional COM port available to the PC.   
Application software can access the USB device in the same way as  
it would access a standard COM port. "


Now, I have some questions:

Can we access the USB device using  a standard COM ports from  
Revolution?


Can we  have  Revolution to behave as a terminal Emulator to  
control all Functions?


To summarize, do you think I can menage to control this external  
device from Revolution?


Thanks a lot.



___
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



___
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



___
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



___
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: Import temperature and switch on/off the heater with Rev

2009-02-04 Thread René Micout

Hello JB,
Is that work with USB musical keyboard ?
René from Paris

Le 4 févr. 09 à 07:29, -= JB =- a écrit :

You could probably do it with X10 devices.  I used to control X10  
devices with OS 8.6.  They
were controlled from the serial port but the new device is USB.  I  
am writing a stack that will
control the serial and USB ports but haven't been working on it for  
a few months.  I was able
to configure the ports and do some serial port stuff with the modem  
but haven't done much
with the usb port yet.  The older X10 took commands in a binary  
format if I remember and I
haven't done enough to see how the new X10 devices are controlled  
but they've changed
the format.  I have written some code for Revolution to convert  
between binary, ascii, hex &
numeric that I posted in the Scripters Scrapbook online section.  I  
did find a program that is
for the Mac that controls X10 devices so I know it can be done but  
it may need a driver to
be written so you can do it with Revolution.  Until I figure out  
what type of info needs to be
sent to the USB device I won't be able to test it without a driver  
to be sure if it needs one to
be written or not.  If you can figure out how to control an  
external serial device from Rev the

old device could be used instead of the new USB one.

-=>JB<=-



On Feb 3, 2009, at 5:41 AM, paolo wrote:


Dear friends, I had this crazy idea:

I would like to create a Rev application to control the  
temperature of my room. So, I need my application  to import the  
temperature from a thermometer and switch on/off the heater.


I found documentation for an affordable external device in  
internet : http://www.audon.co.uk/io8g.html


It says  "Compatible with Profilab DAQ Software. " and "Can  
Utilize a Simple Terminal Emulator to Control All Functions"


It says also: "Virtual COM port (VCP) drivers cause the USB device  
to appear as an additional COM port available to the PC.   
Application software can access the USB device in the same way as  
it would access a standard COM port. "


Now, I have some questions:

Can we access the USB device using  a standard COM ports from  
Revolution?


Can we  have  Revolution to behave as a terminal Emulator to  
control all Functions?


To summarize, do you think I can menage to control this external  
device from Revolution?


Thanks a lot.



___
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



___
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



___
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: Import temperature and switch on/off the heater with Rev

2009-02-03 Thread -= JB =-
You could probably do it with X10 devices.  I used to control X10  
devices with OS 8.6.  They
were controlled from the serial port but the new device is USB.  I am  
writing a stack that will
control the serial and USB ports but haven't been working on it for a  
few months.  I was able
to configure the ports and do some serial port stuff with the modem  
but haven't done much
with the usb port yet.  The older X10 took commands in a binary  
format if I remember and I
haven't done enough to see how the new X10 devices are controlled but  
they've changed
the format.  I have written some code for Revolution to convert  
between binary, ascii, hex &
numeric that I posted in the Scripters Scrapbook online section.  I  
did find a program that is
for the Mac that controls X10 devices so I know it can be done but it  
may need a driver to
be written so you can do it with Revolution.  Until I figure out what  
type of info needs to be
sent to the USB device I won't be able to test it without a driver to  
be sure if it needs one to
be written or not.  If you can figure out how to control an external  
serial device from Rev the

old device could be used instead of the new USB one.

-=>JB<=-



On Feb 3, 2009, at 5:41 AM, paolo wrote:


Dear friends, I had this crazy idea:

I would like to create a Rev application to control the temperature  
of my room. So, I need my application  to import the temperature  
from a thermometer and switch on/off the heater.


I found documentation for an affordable external device in  
internet : http://www.audon.co.uk/io8g.html


It says  "Compatible with Profilab DAQ Software. " and "Can Utilize  
a Simple Terminal Emulator to Control All Functions"


It says also: "Virtual COM port (VCP) drivers cause the USB device  
to appear as an additional COM port available to the PC.   
Application software can access the USB device in the same way as  
it would access a standard COM port. "


Now, I have some questions:

Can we access the USB device using  a standard COM ports from  
Revolution?


Can we  have  Revolution to behave as a terminal Emulator to  
control all Functions?


To summarize, do you think I can menage to control this external  
device from Revolution?


Thanks a lot.



___
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



___
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: Import temperature and switch on/off the heater with Rev

2009-02-03 Thread stephen barncard
This company mentions apple drivers and Runtime Rev. They make USB I/O Boxes
 -- and even some stuff that works with fischertechnik kits.They've been
around for a while.

http://www.bkohg.com/serviceusbplus_e.html

The CD-ROM contains the Service-USB driver for Macintosh MacOS X, QuickTime
> films and screen shots as well as extensive software for AppleScript,
> Runtime Revolution, RealBasic, Xcode, FileMaker, 4th Dimension, Macromedia
> Director MX, Java, Scratch, Ragtime and original programs for various
> fischertechnik(R) construction kits.
>
> The Service USB Driver is universal binary and supports both Power PC- and
> Intel-based Macintosh computers.
>

2009/2/3 dunbarx 

> Judy.
>
> Makes you one of the oldsters, you know.
>
> The serial gadget was by someone else.  I can check when I get to my
> office.  Beehive was the ADB guys
>
> All three developers are out of the business.  There should be someone
> willing to take up the calling with Rev and USB, though. Someone smart and
> young. Free consulting to anyone who cares to. All you need is a PIC
> (programmable integrated circuit, $5) and the nerve.
>
> Craig
>
>
> On Feb 4, 2009, at 12:32:54 AM, "Judy Perry" 
> wrote:
> Dunbar,
> That is s awesome!
> So, does the serial adapter thingy still exist as far as you know? Was it
> Beehive?
>
> Judy
> who REMEMBERS!
>
> ___
> 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
>



-- 
Stephen Barncard
-
San Francisco
___
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: Import temperature and switch on/off the heater with Rev

2009-02-03 Thread dunbarx
Judy.

Makes you one of the oldsters, you know.

The serial gadget was by someone else.  I can check when I get to my 
office.  Beehive was the ADB guys

All three developers are out of the business.  There should be someone willing 
to take up the calling with Rev and USB, though. Someone smart and young. Free 
consulting to anyone who cares to. All you need is a PIC (programmable 
integrated circuit, $5) and the nerve.

Craig


On Feb 4, 2009, at 12:32:54 AM, "Judy Perry"  
wrote:
Dunbar,
That is s awesome!
So, does the serial adapter thingy still exist as far as you know? Was it
Beehive?

Judy
who REMEMBERS!

___
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: Import temperature and switch on/off the heater with Rev

2009-02-03 Thread Judy Perry
Dunbar,
That is s awesome!
So, does the serial adapter thingy still exist as far as you know?  Was it
Beehive?

Judy
who REMEMBERS!

http://revined.blogspot.com

On Tue, Feb 3, 2009 at 8:23 PM, dunbarx  wrote:

> I did those towers. 1998. Still working...
>
> Craig newman
>
> On Feb 3, 2009, at 11:01:17 PM, "Judy Perry" 
> wrote:
> From:  "Judy Perry" 
> Subject:Re: Import temperature and switch on/off the heater with Rev
> Date:   February 3, 2009 11:01:17 PM EST
> To: "How to use Revolution" 
>
> Wasn't there an old HC serial (ADB) adapter thingy that allowed you to
> control external electronics? Made by Beehive maybe? Used to control the
> lighting of the world's tallest towers? (Jacque would remember).
> Is there a USB version of it now? I thought that people used to do this
> sort of thing in HC all the time...
>
> Sorry; that's all I remember.
>
> Judy
> http://revined.blogspot.com
>
>
> On Tue, Feb 3, 2009 at 5:41 AM, paolo  wrote:
>
>  Dear friends, I had this crazy idea:
>>
>> I would like to create a Rev application to control the temperature of my
>> room. So, I need my application to import the temperature from a
>> thermometer and switch on/off the heater.
>>
>> I found documentation for an affordable external device in internet :
>> http://www.audon.co.uk/io8g.html
>>
>> It says "Compatible with Profilab DAQ Software. " and "Can Utilize a
>> Simple Terminal Emulator to Control All Functions"
>>
>> It says also: "Virtual COM port (VCP) drivers cause the USB device to
>> appear as an additional COM port available to the PC. Application software
>> can access the USB device in the same way as it would access a standard
>> COM
>> port. "
>>
>> Now, I have some questions:
>>
>> Can we access the USB device using a standard COM ports from Revolution?
>>
>> Can we have Revolution to behave as a terminal Emulator to control all
>> Functions?
>>
>> To summarize, do you think I can menage to control this external device
>> from Revolution?
>>
>> Thanks a lot.
>>
>>
>>
>> ___
>> 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
>>
>>  ___
> 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
>
>
>
> ___
> 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
>
___
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: Import temperature and switch on/off the heater with Rev

2009-02-03 Thread dunbarx

I did those towers. 1998. Still working...

Craig newman

On Feb 3, 2009, at 11:01:17 PM, "Judy Perry" 
 wrote:

From:  "Judy Perry" 
Subject:Re: Import temperature and switch on/off the heater with Rev
Date:   February 3, 2009 11:01:17 PM EST
To: "How to use Revolution" 
Wasn't there an old HC serial (ADB) adapter thingy that allowed you to
control external electronics? Made by Beehive maybe? Used to control 
the

lighting of the world's tallest towers? (Jacque would remember).
Is there a USB version of it now? I thought that people used to do this
sort of thing in HC all the time...

Sorry; that's all I remember.

Judy
http://revined.blogspot.com


On Tue, Feb 3, 2009 at 5:41 AM, paolo  wrote:


Dear friends, I had this crazy idea:

I would like to create a Rev application to control the temperature 
of my

room. So, I need my application to import the temperature from a
thermometer and switch on/off the heater.

I found documentation for an affordable external device in internet :
http://www.audon.co.uk/io8g.html

It says "Compatible with Profilab DAQ Software. " and "Can Utilize a
Simple Terminal Emulator to Control All Functions"

It says also: "Virtual COM port (VCP) drivers cause the USB device to
appear as an additional COM port available to the PC. Application 
software
can access the USB device in the same way as it would access a 
standard COM

port. "

Now, I have some questions:

Can we access the USB device using a standard COM ports from 
Revolution?


Can we have Revolution to behave as a terminal Emulator to control all
Functions?

To summarize, do you think I can menage to control this external 
device

from Revolution?

Thanks a lot.



___
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


___
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



___
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: Import temperature and switch on/off the heater with Rev

2009-02-03 Thread Judy Perry
Wasn't there an old HC serial (ADB) adapter thingy that allowed you to
control external electronics?  Made by Beehive maybe?  Used to control the
lighting of the world's tallest towers?  (Jacque would remember).
Is there a USB version of it now?  I thought that people used to do this
sort of thing in HC all the time...

Sorry; that's all I remember.

Judy
http://revined.blogspot.com


On Tue, Feb 3, 2009 at 5:41 AM, paolo  wrote:

> Dear friends, I had this crazy idea:
>
> I would like to create a Rev application to control the temperature of my
> room. So, I need my application  to import the temperature from a
> thermometer and switch on/off the heater.
>
> I found documentation for an affordable external device in internet :
> http://www.audon.co.uk/io8g.html
>
> It says  "Compatible with Profilab DAQ Software. " and "Can Utilize a
> Simple Terminal Emulator to Control All Functions"
>
> It says also: "Virtual COM port (VCP) drivers cause the USB device to
> appear as an additional COM port available to the PC.  Application software
> can access the USB device in the same way as it would access a standard COM
> port. "
>
> Now, I have some questions:
>
> Can we access the USB device using  a standard COM ports from Revolution?
>
> Can we  have  Revolution to behave as a terminal Emulator to control all
> Functions?
>
> To summarize, do you think I can menage to control this external device
> from Revolution?
>
> Thanks a lot.
>
>
>
> ___
> 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
>
___
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: Import temperature and switch on/off the heater with Rev

2009-02-03 Thread Thomas McGrath III
Yes the HIGH SPEED serial adapter will work. I use it here all the  
time. The other serial adapters were not high speed and caused  
problems. I use the 19HS model that Stephen listed. I have also used  
straight USB devices that make use of the standard FTDIUSB Serial  
Drivers with great success.



Tom McGrath III
Lazy River Software
3mcgr...@comcast.net

iTunes Library Suite - libITS
Information and download can be found on this page:
http://www.lazyriversoftware.com/RevOne.html


On Feb 3, 2009, at 6:57 PM, stephen barncard wrote:

I'm pretty sure the KEYSPAN interface and software works with rev  
the last

time I tried it.
Just checked. They're now owned by
Tripp-Lite.




sqb

2009/2/3 Bob Earp 



Paolo, to my knowledge there is no capability within  Rev of  
communicating
with a USB port, although I think Chuck had been working on  
something along
time ago.I've been wanting to use a Rev project as an interface to  
the
aircraft simulators we build and have been working on getting Rev  
on OS X to
talk to a PLC for some time now, unfortunately with limited  
success.  As
mentioned in other posts, Rev communicates quite well with serial  
ports, but
alas they don't come on Apple platforms.  I've been using an IOGear  
USB to
Serial adapter, but for some reason the system seems unstable.  The  
last
time I tried it I kept getting what appeared to be a bit shifting  
on the
response from the PLC and got so frustrated I gave up.I've been  
using an
EZ-PLC which is very economical, but the support for low level  
serial port
communication is almost non existent.  I've recently discovered the  
Arduino

(which was invented in your part of the world) and am now considering
communicating with that via ethernet.If anybody has more to add on  
this

subject I'd be extremely happy to hear about it !!best, Bob...
_
The new Windows Live Messenger. You don't want to miss this.

http://www.microsoft.com/windows/windowslive/messenger.aspx___
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





--
Stephen Barncard
-
San Francisco
___
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


___
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: Import temperature and switch on/off the heater with Rev

2009-02-03 Thread Mark Wieder
Bob-

The Arduino works well with rev.

If you're using Windows and need to do some usb protocol
troubleshooting, there's a great tool available at

http://www.aggsoft.com/usb-port-monitor.htm

Unfortunately they don't have an osx version, and I haven't found
anything else that does this sort of packet-level analysis for the
mac.

-- 
-Mark Wieder
 mwie...@ahsoftware.net

___
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: Import temperature and switch on/off the heater with Rev

2009-02-03 Thread stephen barncard
I'm pretty sure the KEYSPAN interface and software works with rev the last
time I tried it.
Just checked. They're now owned by
Tripp-Lite.



sqb

2009/2/3 Bob Earp 

>
> Paolo, to my knowledge there is no capability within  Rev of communicating
> with a USB port, although I think Chuck had been working on something along
> time ago.I've been wanting to use a Rev project as an interface to the
> aircraft simulators we build and have been working on getting Rev on OS X to
> talk to a PLC for some time now, unfortunately with limited success.  As
> mentioned in other posts, Rev communicates quite well with serial ports, but
> alas they don't come on Apple platforms.  I've been using an IOGear USB to
> Serial adapter, but for some reason the system seems unstable.  The last
> time I tried it I kept getting what appeared to be a bit shifting on the
> response from the PLC and got so frustrated I gave up.I've been using an
> EZ-PLC which is very economical, but the support for low level serial port
> communication is almost non existent.  I've recently discovered the Arduino
> (which was invented in your part of the world) and am now considering
> communicating with that via ethernet.If anybody has more to add on this
> subject I'd be extremely happy to hear about it !!best, Bob...
> _
> The new Windows Live Messenger. You don't want to miss this.
>
> http://www.microsoft.com/windows/windowslive/messenger.aspx___
> 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
>



-- 
Stephen Barncard
-
San Francisco
___
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: Import temperature and switch on/off the heater with Rev

2009-02-03 Thread Bob Earp

Paolo, to my knowledge there is no capability within  Rev of communicating with 
a USB port, although I think Chuck had been working on something along time 
ago.I've been wanting to use a Rev project as an interface to the aircraft 
simulators we build and have been working on getting Rev on OS X to talk to a 
PLC for some time now, unfortunately with limited success.  As mentioned in 
other posts, Rev communicates quite well with serial ports, but alas they don't 
come on Apple platforms.  I've been using an IOGear USB to Serial adapter, but 
for some reason the system seems unstable.  The last time I tried it I kept 
getting what appeared to be a bit shifting on the response from the PLC and got 
so frustrated I gave up.I've been using an EZ-PLC which is very economical, but 
the support for low level serial port communication is almost non existent.  
I've recently discovered the Arduino (which was invented in your part of the 
world) and am now considering communicating with that via ethernet.If anybody 
has more to add on this subject I'd be extremely happy to hear about it !!best, 
Bob...
_
The new Windows Live Messenger. You don’t want to miss this.
http://www.microsoft.com/windows/windowslive/messenger.aspx___
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: Import temperature and switch on/off the heater with Rev

2009-02-03 Thread camm29
Paolo ,

Should work ! 

If you do not have a RS232 Port then use a serial Port/Usb emulator driver.
If you have a RS232 Port then use a USB to RS232 cable convertor.

Rev will send / read from Serial Com Ports only , the above is the solution.

Rev 3.00 is better as you can use Com Ports > 9

Regards
Camm 
 

 paolo  wrote: 
> Dear friends, I had this crazy idea:
> 
> I would like to create a Rev application to control the temperature of  
> my room. So, I need my application  to import the temperature from a  
> thermometer and switch on/off the heater.
> 
> I found documentation for an affordable external device in internet : 
> http://www.audon.co.uk/io8g.html
> 
> It says  "Compatible with Profilab DAQ Software. " and "Can Utilize a  
> Simple Terminal Emulator to Control All Functions"
> 
> It says also: "Virtual COM port (VCP) drivers cause the USB device to  
> appear as an additional COM port available to the PC.  Application  
> software can access the USB device in the same way as it would access  
> a standard COM port. "
> 
> Now, I have some questions:
> 
> Can we access the USB device using  a standard COM ports from  
> Revolution?
> 
> Can we  have  Revolution to behave as a terminal Emulator to control  
> all Functions?
> 
> To summarize, do you think I can menage to control this external  
> device from Revolution?
> 
> Thanks a lot.
> 
> 
> 
> ___
> 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

___
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: Import temperature and switch on/off the heater with Rev

2009-02-03 Thread Thomas McGrath III
Paolo, The Macintosh drivers for this device are the standard FTDIUSB  
Serial Drivers which emulate a serial device over USB so the good news  
is that you should be able to connect to the virtual port from  
Revolution on the mac. I am not familiar with the drivers being used  
for windows though.


The thing to look for is the serial emulation since Revolution can not  
handle the USB directly.


AH software has an X10 home automation controller in Revolution: Code  
for controlling the Firecracker CM-11 x10 controller


There are other serial examples as well.

Tom McGrath III
Lazy River Software
3mcgr...@comcast.net

iTunes Library Suite - libITS
Information and download can be found on this page:
http://www.lazyriversoftware.com/RevOne.html





On Feb 3, 2009, at 8:53 AM, Thomas McGrath III wrote:

Paolo, I'm not familiar with this device but the answer to 2  is yes  
for sure, I do it here all the time. I also control my telescope,  
TV, Cable, Robosapien Robot, lights, etc.


If the device can handle serial commands then that is the easiest way.

I am looking into that device now... more later...


Tom McGrath III
Lazy River Software
3mcgr...@comcast.net

iTunes Library Suite - libITS
Information and download can be found on this page:
http://www.lazyriversoftware.com/RevOne.html


On Feb 3, 2009, at 8:41 AM, paolo wrote:


Now, I have some questions:

Can we access the USB device using  a standard COM ports from  
Revolution?


Can we  have  Revolution to behave as a terminal Emulator to  
control all Functions?


To summarize, do you think I can menage to control this external  
device from Revolution?


___
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


___
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: Import temperature and switch on/off the heater with Rev

2009-02-03 Thread Thomas McGrath III
Paolo, I'm not familiar with this device but the answer to 2  is yes  
for sure, I do it here all the time. I also control my telescope, TV,  
Cable, Robosapien Robot, lights, etc.


If the device can handle serial commands then that is the easiest way.

I am looking into that device now... more later...


Tom McGrath III
Lazy River Software
3mcgr...@comcast.net

iTunes Library Suite - libITS
Information and download can be found on this page:
http://www.lazyriversoftware.com/RevOne.html


On Feb 3, 2009, at 8:41 AM, paolo wrote:


Now, I have some questions:

Can we access the USB device using  a standard COM ports from  
Revolution?


Can we  have  Revolution to behave as a terminal Emulator to control  
all Functions?


To summarize, do you think I can menage to control this external  
device from Revolution?


___
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


Import temperature and switch on/off the heater with Rev

2009-02-03 Thread paolo

Dear friends, I had this crazy idea:

I would like to create a Rev application to control the temperature of  
my room. So, I need my application  to import the temperature from a  
thermometer and switch on/off the heater.


I found documentation for an affordable external device in internet : 
http://www.audon.co.uk/io8g.html

It says  "Compatible with Profilab DAQ Software. " and "Can Utilize a  
Simple Terminal Emulator to Control All Functions"


It says also: "Virtual COM port (VCP) drivers cause the USB device to  
appear as an additional COM port available to the PC.  Application  
software can access the USB device in the same way as it would access  
a standard COM port. "


Now, I have some questions:

Can we access the USB device using  a standard COM ports from  
Revolution?


Can we  have  Revolution to behave as a terminal Emulator to control  
all Functions?


To summarize, do you think I can menage to control this external  
device from Revolution?


Thanks a lot.



___
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: Rev and joystick or switch

2008-07-25 Thread Randall Lee Reetz
Actually... I just wrote a test project... this code just takes  
mouseLoc and converts to vertical motion for a graphic



on mouseDown
put 0 into TopLim
put (the height of this window) into BotLim
put the loc of cd grc 1 into StrtLoc
put the clickLoc into CL
put (item 1 of StrtLoc)-(item 1 of CL) into HOffSet
put (item 2 of StrtLoc)-(item 2 of CL) into VOffSet
repeat while the mouse is down
put the mouseLoc into NL
if ((item 2 of StrtLoc)-((item 2 of CL)-(item 2 of NL))) > TopLim
then
if ((item 2 of StrtLoc)-((item 2 of CL)-(item 2 of NL))) < BotLim
then
set the loc of cd grc 1 to (item 1 of StrtLoc),((item 2 of StrtLoc)- 
((item 2 of CL)-(item 2 of NL)))

else
set the loc of cd grc 1 to (item 1 of StrtLoc),BotLim
end if
else
set the loc of cd grc 1 to (item 1 of StrtLoc),TopLim
end if
end repeat
end mouseDown

... and this code uses a vertical slider button that is set to act  
like a joy stick...



on mouseEnter
global BotLim,TopLim
put 0 into TopLim
put (the height of this window) into BotLim
set the minimumValue of me to (-1*((BotLim-TopLim)/10))
set the maximumValue of me to ((BotLim-TopLim)/10)
set the autoHilite of me to true
end mouseEnter

on mouseStillDown
global BotLim,TopLim
put ((the currentValue of me)*-1) into CV -- invert slider value
if ((item 2 of the loc of cd grc 1)+CV)≥ TopLim
then
if ((item 2 of the loc of cd grc 1)+ CV)≤(the height of this window)
then
set the loc of cd grc 1 to (item 1 of the loc of cd grc 1),((item 2  
of the loc of cd grc 1)+CV)

else
set the loc of cd grc 1 to (item 1 of the loc of cd grc 1),BotLim --  
bottom limit

end if
else
set the loc of cd grc 1 to (item 1 of the loc of cd grc 1),TopLim --  
top limit

end if
end mouseStillDown

on mouseUp
set the currentValue of me to 0 -- reset slider to center
end mouseUp





On Jul 24, 2008, at 1:11 PM, Randall Reetz wrote:

Or, if the joystick is controlling the mouse, then you just use  
standard mouse events.  No need for an intermediate event generator  
like usboverdrive.


-Original Message-
From: "David Glasgow" <[EMAIL PROTECTED]>
To: use-revolution@lists.runrev.com
Sent: 7/24/2008 12:29 PM
Subject: Rev and joystick or switch

I want to use a switch (lever style accessibility gadget) or a very
simple joystick to enable users to respond to images by pushing away
or pulling towards themselves.  It needs to work on both Mac & PC.
Fewer buttons the better, and no flash rumbling or stuff like that.

Any suggestions for simple and preferably cheap hardware that folks
have used with Rev?

best

David Glasgow

___
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


___
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



___
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: Rev and joystick or switch

2008-07-24 Thread Randall Reetz
put the mouseV into startV
repeat while the mouse is down
 put the mouseV into nowV
 move grc A x,(nowV-startV)
end repeat

-Original Message-
From: "Randall Reetz" <[EMAIL PROTECTED]>
To: "How to use Revolution" 
Sent: 7/24/2008 1:11 PM
Subject: RE: Rev and joystick or switch

Or, if the joystick is controlling the mouse, then you just use standard mouse 
events.  No need for an intermediate event generator like usboverdrive. 

-Original Message-
From: "David Glasgow" <[EMAIL PROTECTED]>
To: use-revolution@lists.runrev.com
Sent: 7/24/2008 12:29 PM
Subject: Rev and joystick or switch

I want to use a switch (lever style accessibility gadget) or a very  
simple joystick to enable users to respond to images by pushing away  
or pulling towards themselves.  It needs to work on both Mac & PC.   
Fewer buttons the better, and no flash rumbling or stuff like that.

Any suggestions for simple and preferably cheap hardware that folks  
have used with Rev?

best

David Glasgow

___
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


___
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


___
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: Rev and joystick or switch

2008-07-24 Thread Randall Reetz
Or, if the joystick is controlling the mouse, then you just use standard mouse 
events.  No need for an intermediate event generator like usboverdrive. 

-Original Message-
From: "David Glasgow" <[EMAIL PROTECTED]>
To: use-revolution@lists.runrev.com
Sent: 7/24/2008 12:29 PM
Subject: Rev and joystick or switch

I want to use a switch (lever style accessibility gadget) or a very  
simple joystick to enable users to respond to images by pushing away  
or pulling towards themselves.  It needs to work on both Mac & PC.   
Fewer buttons the better, and no flash rumbling or stuff like that.

Any suggestions for simple and preferably cheap hardware that folks  
have used with Rev?

best

David Glasgow

___
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


___
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: Rev and joystick or switch

2008-07-24 Thread Randall Reetz
With usboverdrive (google it, download it, install it) you can send keystrokes 
(arrow keys, etc) events from a joystick or game controller.  But maybe there 
is a rev native solution???

-Original Message-
From: "David Glasgow" <[EMAIL PROTECTED]>
To: use-revolution@lists.runrev.com
Sent: 7/24/2008 12:29 PM
Subject: Rev and joystick or switch

I want to use a switch (lever style accessibility gadget) or a very  
simple joystick to enable users to respond to images by pushing away  
or pulling towards themselves.  It needs to work on both Mac & PC.   
Fewer buttons the better, and no flash rumbling or stuff like that.

Any suggestions for simple and preferably cheap hardware that folks  
have used with Rev?

best

David Glasgow

___
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


___
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


Rev and joystick or switch

2008-07-24 Thread David Glasgow
I want to use a switch (lever style accessibility gadget) or a very  
simple joystick to enable users to respond to images by pushing away  
or pulling towards themselves.  It needs to work on both Mac & PC.   
Fewer buttons the better, and no flash rumbling or stuff like that.


Any suggestions for simple and preferably cheap hardware that folks  
have used with Rev?


best

David Glasgow

___
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: Switch statements within Switch statements

2008-07-10 Thread Charles Szasz

Kay,

Thanks very much for your suggestions! I appreciate you taking time to
answer my question.



Kay C Lan wrote:
> 
> on menuPick pChosen
>   switch pChosen
> case "1 Choice"
>--avoid statements here to keep switch statement compact
>   handler1Choice
> break
>  case "2 Choice"
>handler2Choice
> break
> ...
> ...
>  case "987 Choice"
>handler987Choice
>  break
> --always good to include in the development phase to hi-light
> omissions.
> default
>   answer "A case I've not accounted for." titled "Case Omission"
>   --check the variable watcher - pChosen
>   breakpoint
>   end switch
> end menuPick
> 
> --the following will also be in the button script
> 
> on handler1Choice
>   switch the label of btn "Master"
> case "Choice 1"
>--statements here
>--use a handler if too many statements
>  break
> case "Choice 2"
> --statements or handler
>  break
>  ...
>  ...
> case "Choice 99"
>--statements or handler
> break
> --always good to include in the development phase to hi-light
> omissions.
> default
>   answer "A case I've not accounted for." titled "Case Omission"
>   --check the label of btn 'Master'
>   breakpoint
>   end switch
> end handler1Choice
> 
> on handler2Choice
>   --switch structure again
> end handler2Choice
> 
> as many as required.
> 
> Although nested switch statements are possible, and are easy enough to
> follow if you only have a small matrix of options to cover, once the
> options
> start to multiply it's very easy to created a very complex structure that
> is
> hard to follow and easy to miss options - which is why I like to use the
> default statement to catch omissions.
> 
> HTH
> _______
> 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
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Switch-statements-within-Switch-statements-tp18374624p18385818.html
Sent from the Revolution - User mailing list archive 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: Switch statements within Switch statements

2008-07-09 Thread Kay C Lan
On Thu, Jul 10, 2008 at 10:15 AM, Charles Szasz <[EMAIL PROTECTED]> wrote:

>
> I have an option Menu that show various arrays of buttons depending on
> which
> menu item is selected. Is it possible to have switch statements for the
> buttons within switch statements for each menu item?


If I understand your situation it is like this:

If you select the 1st choice in your 'Master' option menu you show 'slave'
option menus 1, 2 and 3.
If you select the 2nd choice in your 'Master' option menu you show 'slave'
option menu a,b, and c.
if you select the 3rd choice in your 'Master' option menu you show 'slave'
option menu  1,b,3,d
...

For the scripts in your 'slave' option menus you want different actions
based on not only what selection is made, but what selection was made with
the 'Master' option menu.

If I've got that correct, and assuming that your 'slave' buttons have many
options so you want to keep the switch statement compact, then the script in
your 'slave' buttons could look something like this:

on menuPick pChosen
  switch pChosen
case "1 Choice"
   --avoid statements here to keep switch statement compact
  handler1Choice
break
 case "2 Choice"
   handler2Choice
break
...
...
 case "987 Choice"
   handler987Choice
 break
--always good to include in the development phase to hi-light omissions.
default
  answer "A case I've not accounted for." titled "Case Omission"
  --check the variable watcher - pChosen
  breakpoint
  end switch
end menuPick

--the following will also be in the button script

on handler1Choice
  switch the label of btn "Master"
case "Choice 1"
   --statements here
   --use a handler if too many statements
 break
case "Choice 2"
--statements or handler
 break
 ...
 ...
case "Choice 99"
   --statements or handler
break
--always good to include in the development phase to hi-light omissions.
default
  answer "A case I've not accounted for." titled "Case Omission"
  --check the label of btn 'Master'
  breakpoint
  end switch
end handler1Choice

on handler2Choice
  --switch structure again
end handler2Choice

as many as required.

Although nested switch statements are possible, and are easy enough to
follow if you only have a small matrix of options to cover, once the options
start to multiply it's very easy to created a very complex structure that is
hard to follow and easy to miss options - which is why I like to use the
default statement to catch omissions.

HTH
___
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: Switch statements within Switch statements

2008-07-09 Thread Mark Smith
You can certainly nest switch statements without problem - you'll end  
up with some very long handlers!


Best,

Mark

On 10 Jul 2008, at 03:15, Charles Szasz wrote:


I have an option Menu that show various arrays of buttons depending  
on which
menu item is selected. Is it possible to have switch statements for  
the
buttons within switch statements for each menu item? I checked the  
Rev-User

archives and could not find any examples of such an arrangement.
--
View this message in context: http://www.nabble.com/Switch- 
statements-within-Switch-statements-tp18374624p18374624.html

Sent from the Revolution - User mailing list archive 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


___
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


Switch statements within Switch statements

2008-07-09 Thread Charles Szasz

I have an option Menu that show various arrays of buttons depending on which
menu item is selected. Is it possible to have switch statements for the
buttons within switch statements for each menu item? I checked the Rev-User
archives and could not find any examples of such an arrangement.
-- 
View this message in context: 
http://www.nabble.com/Switch-statements-within-Switch-statements-tp18374624p18374624.html
Sent from the Revolution - User mailing list archive 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: Exit Switch or break switch question

2008-03-20 Thread Thomas McGrath III

Len,

I just checked and unless I missed something there is no choice for  
multi-line selection in the ComboBox.


Tom

On Mar 20, 2008, at 12:31 PM, [EMAIL PROTECTED] wrote:


If I'm not mistaken (and I frequently am), isn't there an option on
comboboxes to allow multi-line selections?  Or is that just the option
menu?

len morgan


Hi Len,

Multiple exit points seems like a good point for clarity unless maybe
the switch is very very long then you would know if one was found it
would be the absolute end of the script instead of the possibility of
it finding another match as well later on in the script.

However, with that said, this is a combo box and I would think only
one choice can match so the break seems to be my answer for both
clarity (smaller script) and few keystrokes and because no other
matches are possible anyway.

Thanks,

Tom McGrath


On Mar 20, 2008, at 11:11 AM, [EMAIL PROTECTED] wrote:


I've always used the second example you had.  Sometimes it can get a
little harder to debug (and less clear for someone else reading your
code)
if you have multiple exit points.  In the end, I think they both
accomplish the same thing.

len morgan


If I want to leave a switch statement after successfully matching a
case is it better to break and rund to the end without a default
statement or to exit the switch from that case?

ComboBox

on menuPick pChosen
   switch pChosen
   case "Home"
   -- code goes here
   exit switch
case "Work"
   -- code goes here
   exit switch
   end switch
end menuPick

OR

on menuPick pChosen
   switch pChosen
   case "Home"
   -- code goes here
   break
   case "Work"
   -- code goes here
   break
   end switch
end menuPick

Thank you,

Tom McGrath
___
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




___
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


___
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




___
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


___
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: Exit Switch or break switch question

2008-03-20 Thread Thomas McGrath III

Mark,

I saw it in a sample stack and have used it since. grin

So, You're saying Break is the way to go. period.

All four characters of it!

Thanks

Tom


On Mar 20, 2008, at 2:15 PM, Mark Wieder wrote:


Tom-

If I want to leave a switch statement after successfully matching  
a  case
is it better to break and rund to the end without a default   
statement or

to exit the switch from that case?



Yikes! I had no idea the compiler would accept "exit switch"! I'm  
sure it
compiles it as an alias for "break". Where in the world did you come  
up with

this weird syntax?

--
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


___
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: Exit Switch or break switch question

2008-03-20 Thread Stephen Barncard
I've used "exit switch" myself... then 'cleaned it up' later...   for 
no reason... but it works.



Tom-


 If I want to leave a switch statement after successfully matching a  case
 is it better to break and rund to the end without a default  statement or
 to exit the switch from that case?



Yikes! I had no idea the compiler would accept "exit switch"! I'm sure it
compiles it as an alias for "break". Where in the world did you come up with
this weird syntax?

--
 Mark Wieder
 [EMAIL PROTECTED]


--


stephen barncard
s a n  f r a n c i s c o
- - -  - - - - - - - - -



___
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: Exit Switch or break switch question

2008-03-20 Thread Eric Chatonet

Hello Mark,

Le 20 mars 08 à 19:19, Mark Wieder a écrit :

Eric-

Break skips the rest of the current switch structure and goes to the
statement following the end switch.
Only four chars to write ;-)

Which four? 

--
 Mark Wieder


LOL and LOL :-)
Probably in French...
I have so much progresses to make ;-)

The more interesting is that you were the only one noticing it.
LOL again. Sorry ;-)

Best regards from Paris,
Eric Chatonet.

Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [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: Exit Switch or break switch question

2008-03-20 Thread Mark Wieder
Eric-

Break skips the rest of the current switch structure and goes to the
statement following the end switch.
Only four chars to write ;-)

Which four? 

-- 
 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: Exit Switch or break switch question

2008-03-20 Thread Mark Wieder
Tom-

> If I want to leave a switch statement after successfully matching a  case 
> is it better to break and rund to the end without a default  statement or 
> to exit the switch from that case?


Yikes! I had no idea the compiler would accept "exit switch"! I'm sure it 
compiles it as an alias for "break". Where in the world did you come up with 
this weird syntax?

-- 
 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: Exit Switch or break switch question

2008-03-20 Thread Thomas McGrath III

Eric,

Thanks, I agree with your preference here and will stick to the break  
for this button. And, Yes I really like the flexibility of the switch  
structure.


Thanks again, I really appreciate your feedback on this.

Tom McGrath

On Mar 20, 2008, at 11:33 AM, Eric Chatonet wrote:


Hello Tom,

Le 20 mars 08 à 16:21, Thomas McGrath III a écrit :


Thanks, I knew about the behavior of the break and was more curious  
if there was a preferred method or 'correct' method. I assume then  
that you would definitely use the break. And yeah four chars to  
eleven is a point to consider.


I was thinking that break was important because of the possibility  
of matching more than one method and in hitting the default option.
I was thinking that the exit switch ensured that we were done  
looking and to stop after the first found item. This would then  
skip any other matches.


But in a ComboBox there should/can be only one choice chosen from  
the menu button so there seems to be no need to continue after a  
case was found. But does this make the case (pun) for exit switch  
in a combobox?


As for me I always use break and I like switch structures  
flexibility and readability compared to conditional ones.
You can write a list of cases (and I find it more clear that the use  
of 'or'), put a break or not and have a 'default' case that usually  
I reserve for errors handling.

In menuPick handlers switch is invaluable.
But sure, you know all that yet :-)

Best regards from Paris,
Eric Chatonet.

Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [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


___
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: Exit Switch or break switch question

2008-03-20 Thread len-morgan
If I'm not mistaken (and I frequently am), isn't there an option on
comboboxes to allow multi-line selections?  Or is that just the option
menu?

len morgan

> Hi Len,
>
> Multiple exit points seems like a good point for clarity unless maybe
> the switch is very very long then you would know if one was found it
> would be the absolute end of the script instead of the possibility of
> it finding another match as well later on in the script.
>
> However, with that said, this is a combo box and I would think only
> one choice can match so the break seems to be my answer for both
> clarity (smaller script) and few keystrokes and because no other
> matches are possible anyway.
>
> Thanks,
>
> Tom McGrath
>
>
> On Mar 20, 2008, at 11:11 AM, [EMAIL PROTECTED] wrote:
>
>> I've always used the second example you had.  Sometimes it can get a
>> little harder to debug (and less clear for someone else reading your
>> code)
>> if you have multiple exit points.  In the end, I think they both
>> accomplish the same thing.
>>
>> len morgan
>>
>>> If I want to leave a switch statement after successfully matching a
>>> case is it better to break and rund to the end without a default
>>> statement or to exit the switch from that case?
>>>
>>> ComboBox
>>>
>>> on menuPick pChosen
>>> switch pChosen
>>> case "Home"
>>> -- code goes here
>>> exit switch
>>>  case "Work"
>>> -- code goes here
>>> exit switch
>>> end switch
>>> end menuPick
>>>
>>> OR
>>>
>>> on menuPick pChosen
>>> switch pChosen
>>> case "Home"
>>> -- code goes here
>>> break
>>> case "Work"
>>> -- code goes here
>>> break
>>> end switch
>>> end menuPick
>>>
>>> Thank you,
>>>
>>> Tom McGrath
>>> ___
>>> 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
>>>
>>
>>
>> ___
>> 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
>
> ___
> 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
>


___
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: Exit Switch or break switch question

2008-03-20 Thread Eric Chatonet

Hello Tom,

Le 20 mars 08 à 16:21, Thomas McGrath III a écrit :


Thanks, I knew about the behavior of the break and was more curious  
if there was a preferred method or 'correct' method. I assume then  
that you would definitely use the break. And yeah four chars to  
eleven is a point to consider.


I was thinking that break was important because of the possibility  
of matching more than one method and in hitting the default option.
I was thinking that the exit switch ensured that we were done  
looking and to stop after the first found item. This would then  
skip any other matches.


But in a ComboBox there should/can be only one choice chosen from  
the menu button so there seems to be no need to continue after a  
case was found. But does this make the case (pun) for exit switch  
in a combobox?


As for me I always use break and I like switch structures flexibility  
and readability compared to conditional ones.
You can write a list of cases (and I find it more clear that the use  
of 'or'), put a break or not and have a 'default' case that usually I  
reserve for errors handling.

In menuPick handlers switch is invaluable.
But sure, you know all that yet :-)

Best regards from Paris,
Eric Chatonet.

Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [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: Exit Switch or break switch question

2008-03-20 Thread Thomas McGrath III

Hi Len,

Multiple exit points seems like a good point for clarity unless maybe  
the switch is very very long then you would know if one was found it  
would be the absolute end of the script instead of the possibility of  
it finding another match as well later on in the script.


However, with that said, this is a combo box and I would think only  
one choice can match so the break seems to be my answer for both  
clarity (smaller script) and few keystrokes and because no other  
matches are possible anyway.


Thanks,

Tom McGrath


On Mar 20, 2008, at 11:11 AM, [EMAIL PROTECTED] wrote:


I've always used the second example you had.  Sometimes it can get a
little harder to debug (and less clear for someone else reading your  
code)

if you have multiple exit points.  In the end, I think they both
accomplish the same thing.

len morgan


If I want to leave a switch statement after successfully matching a
case is it better to break and rund to the end without a default
statement or to exit the switch from that case?

ComboBox

on menuPick pChosen
switch pChosen
case "Home"
-- code goes here
    exit switch
 case "Work"
-- code goes here
    exit switch
end switch
end menuPick

OR

on menuPick pChosen
switch pChosen
case "Home"
-- code goes here
break
case "Work"
    -- code goes here
break
end switch
end menuPick

Thank you,

Tom McGrath
___
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




___
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


___
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: Exit Switch or break switch question

2008-03-20 Thread Thomas McGrath III

Hey Eric,

Thanks, I knew about the behavior of the break and was more curious if  
there was a preferred method or 'correct' method. I assume then that  
you would definitely use the break. And yeah four chars to eleven is a  
point to consider.


I was thinking that break was important because of the possibility of  
matching more than one method and in hitting the default option.
I was thinking that the exit switch ensured that we were done looking  
and to stop after the first found item. This would then skip any other  
matches.


But in a ComboBox there should/can be only one choice chosen from the  
menu button so there seems to be no need to continue after a case was  
found. But does this make the case (pun) for exit switch in a combobox?


Thanks

Tom

On Mar 20, 2008, at 11:11 AM, Eric Chatonet wrote:


Hi Tom,

Break skips the rest of the current switch structure and goes to the  
statement following the end switch.

Only four chars to write ;-)

Le 20 mars 08 à 16:06, Thomas McGrath III a écrit :

on menuPick pChosen
   switch pChosen
   case "Home"
   -- code goes here
   exit switch
case "Work"
   -- code goes here
   exit switch
   end switch
end menuPick

OR

on menuPick pChosen
   switch pChosen
   case "Home"
   -- code goes here
   break
   case "Work"
       -- code goes here
   break
   end switch
end menuPick


Best regards from Paris,
Eric Chatonet.

Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [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


___
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: Exit Switch or break switch question

2008-03-20 Thread len-morgan
I've always used the second example you had.  Sometimes it can get a
little harder to debug (and less clear for someone else reading your code)
if you have multiple exit points.  In the end, I think they both
accomplish the same thing.

len morgan

> If I want to leave a switch statement after successfully matching a
> case is it better to break and rund to the end without a default
> statement or to exit the switch from that case?
>
> ComboBox
>
> on menuPick pChosen
>  switch pChosen
>  case "Home"
>      -- code goes here
>  exit switch
>   case "Work"
>      -- code goes here
>  exit switch
>  end switch
> end menuPick
>
> OR
>
> on menuPick pChosen
>  switch pChosen
>  case "Home"
>  -- code goes here
>      break
>  case "Work"
>  -- code goes here
>  break
>  end switch
> end menuPick
>
> Thank you,
>
> Tom McGrath
> ___
> 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
>


___
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: Exit Switch or break switch question

2008-03-20 Thread Eric Chatonet

Hi Tom,

Break skips the rest of the current switch structure and goes to the  
statement following the end switch.

Only four chars to write ;-)

Le 20 mars 08 à 16:06, Thomas McGrath III a écrit :

on menuPick pChosen
switch pChosen
case "Home"
-- code goes here
    exit switch
 case "Work"
-- code goes here
    exit switch
end switch
end menuPick

OR

on menuPick pChosen
switch pChosen
case "Home"
-- code goes here
break
case "Work"
-- code goes here
break
end switch
end menuPick


Best regards from Paris,
Eric Chatonet.

Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [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


Exit Switch or break switch question

2008-03-20 Thread Thomas McGrath III
If I want to leave a switch statement after successfully matching a  
case is it better to break and rund to the end without a default  
statement or to exit the switch from that case?


ComboBox

on menuPick pChosen
switch pChosen
case "Home"
-- code goes here
    exit switch
 case "Work"
-- code goes here
    exit switch
end switch
end menuPick

OR

on menuPick pChosen
switch pChosen
case "Home"
-- code goes here
break
case "Work"
-- code goes here
break
end switch
end menuPick

Thank you,

Tom McGrath
___
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: How to switch of preview in menubar on MacOS

2007-08-24 Thread Reinhold Venzl-Schubert

Hi Ian, thank you

today it works as you write, but yesterday was a strange day :-(

Reinhold

Am 24.08.2007 um 14:23 schrieb Ian Wood:


It should automatically swap back to the normal bar as soon as you
swap back into edit mode.

Ian

On 24 Aug 2007, at 08:06, Reinhold Venzl-Schubert wrote:


Hi!

I selected "Preview in Menu Bar", closed the Menu Builder and than
I cannot switch back to the original Rev Menubar.
The only way I found is to close Rev completely and restart it again.

Is there any smarter way to switch back the Rev Menubar?

Thanks
Reinhold


___
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: How to switch of preview in menubar on MacOS

2007-08-24 Thread Ian Wood
It should automatically swap back to the normal bar as soon as you  
swap back into edit mode.


Ian

On 24 Aug 2007, at 08:06, Reinhold Venzl-Schubert wrote:


Hi!

I selected "Preview in Menu Bar", closed the Menu Builder and than  
I cannot switch back to the original Rev Menubar.

The only way I found is to close Rev completely and restart it again.

Is there any smarter way to switch back the Rev Menubar?

Thanks
Reinhold
___
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


___
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


How to switch of preview in menubar on MacOS

2007-08-24 Thread Reinhold Venzl-Schubert

Hi!

I selected "Preview in Menu Bar", closed the Menu Builder and than I  
cannot switch back to the original Rev Menubar.

The only way I found is to close Rev completely and restart it again.

Is there any smarter way to switch back the Rev Menubar?

Thanks
Reinhold
___
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: Switch Statement

2007-07-12 Thread Rob Cozens

Mark, et al:


I believe that form of the switch statement with no argument may be
unique to Transcript. I do use it to handle all sorts of corner conditions
that would otherwise result in really ugly code, but I have to twist my head
around it each time,


That form of switch introduces the possibility of executing multiple 
cases while falling through a single switch.  That alone adds both 
power and complexity.


Rob Cozens, Staff Conservator
Mendonoma Marine Life Conservancy

"Knowledge of the oceans is more than a matter of curiosity.
 Our very survival may depend upon it."

 -- John Fitzgerald Kennedy, 1961 


___
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: Switch Statement

2007-07-12 Thread David Bovill

Much clearer - thanks everyone - I think the documentation should be a
little clearer with this?

So I had a go - which proved pretty difficult - I don't envy anyone trying
to do technical documentation. Here is the best I can do for now. I added a
few examples and i think the hypertext links to definitions explaining the
terms helps - still could do with some improvement:

 http://handlers.rev-co.de/wiki/switch
___
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: Switch Statement

2007-07-12 Thread Mark Wieder
Eric-

 switch -- note there is nothing more here ;-)

...and I believe that form of the switch statement with no argument may be 
unique to Transcript. I do use it to handle all sorts of corner conditions 
that would otherwise result in really ugly code, but I have to twist my head 
around it each time, since it's so unlike any other environment I've worked 
in.

-- 
 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: Switch Statement

2007-07-12 Thread Rob Cozens

Hi David,


I use the switch statement a lot - but only for basic "case" tests and
have not been able to get:

   "If the caseValue is equal to the switchExpression, or the
caseCondition evaluates to true"


Don't forget that switch logic falls through from case to case if 
there is no "break" statement; so


   [put whatEver into switchExpression]
   switch
case caseValue = switchExpression
case caseCondition = true
[case logic]
break
default
    [optional default logic]
end switch


working. Here is an example that I just changed from "if then else" -
whats wrong with it:


You are combining two forms of the switch statement.  By designating 
mainChoice as the switch, the value of each case is compared to 
nainChoice.  Try:


   switch mainChoice
case "Go to script object"
break
case empty
case "This menu script"
put the long id of me into scriptObject
break
case "Library 1"
case "Library 2"
...
case "Library n"
put the name of stack secondChoice into scriptObject
break
case "Unsorted"
edit the script of stack "libOPN_Unsorted"
break
default
breakpoint
end switch

This assumes a finite number of libraries with known names.

Rob Cozens CCW
Serendipity Software Company

"And I, which was two fooles, do so grow three;
 Who are a little wise, the best fooles bee."

 from "The Triple Foole" by John Donne (1572-1631) 


___
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: Switch Statement

2007-07-12 Thread Eric Chatonet

Hi David,

If you specify a variable just after the switch statement, each case  
value refers to this variable.

So, in your case, try:

switch -- note there is nothing more here ;-)
case mainChoice = "Go to script object"
break
case (mainChoice is empty or mainChoice is "This menu script")
put the long id of me into scriptObject
break
case (word 1 of mainChoice is "Library")
put the name of stack secondChoice into scriptObject
break
case mainChoice = "Unsorted"
edit the script of stack "libOPN_Unsorted"
break
    default
breakpoint
end switch

Hope this helps :-)

Le 12 juil. 07 à 14:06, David a écrit :


I use the switch statement a lot - but only for basic "case" tests and
have not been able to get:

   "If the caseValue is equal to the switchExpression, or the
caseCondition evaluates to true"

working. Here is an example that I just changed from "if then else" -
whats wrong with it:

switch mainChoice
case "Go to script object"
break
case (mainChoice is empty or mainChoice is "This menu script")
put the long id of me into scriptObject
break
case (word 1 of mainChoice is "Library")
put the name of stack secondChoice into scriptObject
break
case "Unsorted"
    edit the script of stack "libOPN_Unsorted"
break
default
breakpoint
end switch

My understanding is that:

  (word 1 of mainChoice is "Library")

is an expression which evaluated to true or false - but steeping
through i the debugger when mainChoice is "Library" the case statement
is not triggered and instead the default case statement is activated?


Best regards from Paris,
Eric Chatonet.

Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [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


Switch Statement

2007-07-12 Thread David
I use the switch statement a lot - but only for basic "case" tests and
have not been able to get:

   "If the caseValue is equal to the switchExpression, or the
caseCondition evaluates to true"

working. Here is an example that I just changed from "if then else" -
whats wrong with it:

switch mainChoice
case "Go to script object"
break
case (mainChoice is empty or mainChoice is "This menu script")
put the long id of me into scriptObject
break
case (word 1 of mainChoice is "Library")
put the name of stack secondChoice into scriptObject
break
case "Unsorted"
edit the script of stack "libOPN_Unsorted"
break
default
breakpoint
end switch

My understanding is that:

  (word 1 of mainChoice is "Library")

is an expression which evaluated to true or false - but steeping
through i the debugger when mainChoice is "Library" the case statement
is not triggered and instead the default case statement is activated?

___
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


AW: switch - case works different on Win-Mac !?

2007-07-04 Thread Tiemo Hollmann TB
Good idea,
thanks Dave

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Dave
Gesendet: Mittwoch, 4. Juli 2007 12:48
An: How to use Revolution
Betreff: Re: switch - case works different on Win-Mac !?

Hi,

As a test, do this:


set the cpTest of this stack to empty
switch (tTarget)

case "btnBildKopieren"
put the cpTest of this stack into myTemp
put tTarget & cr after myTemp
set the cpTest of this stack to myTemp
break

-- copy the above code for each "case".

end switch

put the cpTest of this stack into myTemp
answer  myTemp

This should tell you if the case statements are running into each other.

Hope this helps
All the Best
Dave

On 3 Jul 2007, at 17:47, Tiemo Hollmann TB wrote:

> Hello all,
>
> I am struggeling with a mysterious problem, where a mac standalone  
> calls
> different handlers as a win standalone in a switch structure, build  
> on Win
> with 2.8.1. I have one big switch structure on stack level to  
> handle all
> button ups. It looks like this, nothing sophisticated:
>
>
>
> switch (tTarget)
>
> -- some more cases   
>
> case "btnBildKopieren"
>
> if the cpTest of this stack is true then answer "Test 1"
>
> -- calling some handlers
>
> break
>
> case "btnBildSpeichern"
>
> if the cpTest of this stack is true then answer "Test 2"
>
>  -- calling some handlers
>
> break
>
> case "btnBildEinfügen"
>
> if the cpTest of this stack is true then answer "Test 3"
>
> -- calling some handlers
>
> break
>
> -- some more cases
>
> end switch
>
>
>
> This worked perfect on Win, but now testing on Mac more than one case
> structure is executed (at least it seems so, because the result is  
> as if
> so), though I have a break in each case. Because I don’t have a Mac  
> for
> testing, I integrated the above test answers to see which way the  
> handler
> goes. So I set a custom property “cpTest” to true to get the  
> answers to
> follow the execution. Now the funny thing happens. When activating  
> the test
> answers, everything works OK on Mac as on Win. Once I set the cpTest
> property to false and I don’t get the answer dialogs, the program  
> brings the
> unwanted results again and runs probably into different case  
> structures. I
> changed already the sequence of case structures, without result. I  
> don’t
> know, where to look for any more and can’t debug it on my Win machine,
> because on win I can’t reproduce this error.
>
> Has anyone seen something like this before and has any idea where  
> to look
> for?
>
> Thanks for any hint
>
> Tiemo
>
>
>
>
>
>
>
>
>
> ___
> 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

___
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

___
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: switch - case works different on Win-Mac !?

2007-07-04 Thread Dave

Hi,

As a test, do this:


set the cpTest of this stack to empty
switch (tTarget)

case "btnBildKopieren"
put the cpTest of this stack into myTemp
put tTarget & cr after myTemp
set the cpTest of this stack to myTemp
break

-- copy the above code for each "case".

end switch

put the cpTest of this stack into myTemp
answer  myTemp

This should tell you if the case statements are running into each other.

Hope this helps
All the Best
Dave

On 3 Jul 2007, at 17:47, Tiemo Hollmann TB wrote:


Hello all,

I am struggeling with a mysterious problem, where a mac standalone  
calls
different handlers as a win standalone in a switch structure, build  
on Win
with 2.8.1. I have one big switch structure on stack level to  
handle all

button ups. It looks like this, nothing sophisticated:



switch (tTarget)

-- some more cases   


case "btnBildKopieren"

if the cpTest of this stack is true then answer "Test 1"

-- calling some handlers

break

case "btnBildSpeichern"

if the cpTest of this stack is true then answer "Test 2"

 -- calling some handlers

break

case "btnBildEinfügen"

if the cpTest of this stack is true then answer "Test 3"

-- calling some handlers

break

-- some more cases

end switch



This worked perfect on Win, but now testing on Mac more than one case
structure is executed (at least it seems so, because the result is  
as if
so), though I have a break in each case. Because I don’t have a Mac  
for
testing, I integrated the above test answers to see which way the  
handler
goes. So I set a custom property “cpTest” to true to get the  
answers to
follow the execution. Now the funny thing happens. When activating  
the test

answers, everything works OK on Mac as on Win. Once I set the cpTest
property to false and I don’t get the answer dialogs, the program  
brings the
unwanted results again and runs probably into different case  
structures. I
changed already the sequence of case structures, without result. I  
don’t

know, where to look for any more and can’t debug it on my Win machine,
because on win I can’t reproduce this error.

Has anyone seen something like this before and has any idea where  
to look

for?

Thanks for any hint

Tiemo









___
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


___
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


AW: switch - case works different on Win-Mac !?

2007-07-03 Thread Tiemo Hollmann TB
Hi Ken,
I added the Ifs after the problem occured just for my test scenario. The
problem was there before I added the Ifs and is still there with the Ifs and
cpTest = false. Perhaps I am working completely at the wrong side of the
problem, I think I have to look for a redesign.
Thank you
Tiemo

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Ken Ray
Gesendet: Dienstag, 3. Juli 2007 19:21
An: How to use Revolution
Betreff: Re: switch - case works different on Win-Mac !?

On Tue, 3 Jul 2007 18:47:51 +0200, Tiemo Hollmann TB wrote:

> I am struggeling with a mysterious problem, where a mac standalone calls
> different handlers as a win standalone in a switch structure, build on Win
> with 2.8.1. I have one big switch structure on stack level to handle all
> button ups. It looks like this, nothing sophisticated:

I haven't run into this before, but I *have* run into situations where 
the "if... then..." structure without an "end if" gave me unexpected 
results (but it wasn't on a specific platform). Can you try 
restructuring your "if"s so that they go like this:

  if the cpTest of this stack is true then
answer "Test1"
  end if

It may not help, but other than that I can't see anything that might be 
a problem with the code you posted.

Ken Ray
Sons of Thunder Software, Inc.
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.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

___
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: switch - case works different on Win-Mac !?

2007-07-03 Thread Ken Ray
On Tue, 3 Jul 2007 18:47:51 +0200, Tiemo Hollmann TB wrote:

> I am struggeling with a mysterious problem, where a mac standalone calls
> different handlers as a win standalone in a switch structure, build on Win
> with 2.8.1. I have one big switch structure on stack level to handle all
> button ups. It looks like this, nothing sophisticated:

I haven't run into this before, but I *have* run into situations where 
the "if... then..." structure without an "end if" gave me unexpected 
results (but it wasn't on a specific platform). Can you try 
restructuring your "if"s so that they go like this:

  if the cpTest of this stack is true then
answer "Test1"
  end if

It may not help, but other than that I can't see anything that might be 
a problem with the code you posted.

Ken Ray
Sons of Thunder Software, Inc.
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.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


switch - case works different on Win-Mac !?

2007-07-03 Thread Tiemo Hollmann TB
Hello all,

I am struggeling with a mysterious problem, where a mac standalone calls
different handlers as a win standalone in a switch structure, build on Win
with 2.8.1. I have one big switch structure on stack level to handle all
button ups. It looks like this, nothing sophisticated:

 

switch (tTarget)

-- some more cases   

case "btnBildKopieren"

if the cpTest of this stack is true then answer "Test 1"

-- calling some handlers

break

case "btnBildSpeichern"

if the cpTest of this stack is true then answer "Test 2"

 -- calling some handlers

break

case "btnBildEinfügen"

if the cpTest of this stack is true then answer "Test 3"

-- calling some handlers

break

-- some more cases

end switch

 

This worked perfect on Win, but now testing on Mac more than one case
structure is executed (at least it seems so, because the result is as if
so), though I have a break in each case. Because I don’t have a Mac for
testing, I integrated the above test answers to see which way the handler
goes. So I set a custom property “cpTest” to true to get the answers to
follow the execution. Now the funny thing happens. When activating the test
answers, everything works OK on Mac as on Win. Once I set the cpTest
property to false and I don’t get the answer dialogs, the program brings the
unwanted results again and runs probably into different case structures. I
changed already the sequence of case structures, without result. I don’t
know, where to look for any more and can’t debug it on my Win machine,
because on win I can’t reproduce this error.

Has anyone seen something like this before and has any idea where to look
for?

Thanks for any hint

Tiemo

 

 

 

 

___
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: [OT] The switch of perception

2007-06-10 Thread Bob Warren

n 10 Jun 2007, at 9:40, Bob Warren wrote:


>
> Sorry, I realize this is not the place to discuss (even relevant)  
> psychology really, but I was disappointed by what happened.

>
> Bob
  

Luis wrote:

I wouldn't be. You have evolved/moved forward. That's a gain in my  
books.


Cheers,

Luis.

---
That's very nice of you to say so. Thank you very much, Luis.

Cheers,
Bob


___
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: [OT] The switch of perception

2007-06-10 Thread Luis

On 10 Jun 2007, at 9:40, Bob Warren wrote:


Sorry, I realize this is not the place to discuss (even relevant)  
psychology really, but I was disappointed by what happened.


Bob


I wouldn't be. You have evolved/moved forward. That's a gain in my  
books.


Cheers,

Luis.


___
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


[OT] The switch of perception - some immediate patches

2007-06-10 Thread Bob Warren

1. I should have said that care in both reading AND WRITING is necessary.

2. For an "ugly old woman" interpretation of what I said, the whole 
register of what I was saying needs to be changed: i.e. what is really a 
proposal for the future needs to be misinterpreted as a description of 
the current state of affairs. It may or may not be, but that is not what 
I intended to say in my proposal.


Bob






___
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


[OT] The switch of perception

2007-06-10 Thread Bob Warren
Some of you may have had the interest to read an article I wrote which 
can be found at: http://www.bobsite.org/brazil/ .


Early in the article, there is a classical design from Gestalt 
Psychology (the psychology of perception) that can be seen either as a 
nice young woman or as an ugly old woman. One thing I did not attempt to 
discuss in the article was the part that motivation can sometimes play 
in perception. That is perhaps a pity, because it is sometimes a highly 
relevant factor. Where language is involved, care in reading (or the 
lack of it) can also play a part.


I've been racking my brains to try and discover how it was a thread I 
participated in recently ("Open Source (was Don't you just wish Rev 
would do this?)") changed from a happy problem-solving process into a 
nightmare, demonstrating a problem rather than solving one. I now know why.


In my first post about the subject, I described a hypothetical 
arrangement. Instead of using "would" throughout (a linguistic option), 
I used the present tense: e.g. According to the proposed arrangement, "I 
do this" and "You do that".  Of course, had I realized at the time that 
this might lead to any kind of confusion, I would have peppered my 
proposal with lots more "woulds".


Here is an elaboration of what I intended to say by the two items given 
early in my first post:


1) I propose that Rev should produce IDE upgrades from now onwards that 
would concentrate on the provision of new features. I propose a strictly 
regular cycle for their release (perhaps slightly different to the 
current one). These "feature releases" represent the product that we, 
the users, should expect to pay for, and to pay for at least as well as 
the product merits.


2) I propose that bugfixing should be a continuous process between 
feature releases, aimed at correcting the current release as necessary. 
There would of course be no additional charge for it.


These are the actual words I used:

1. RR should provide feature releases on a regular basis. We pay for them.
2. We do not pay for bugfixes. The manufacturer is just putting right 
what he has done wrong.


Now here's an "ugly old woman" interpretation:

1. RR do not provide feature releases on a regular basis as they should. 
We pay for them, so Rev is doing the dirty on us by not coughing them up 
according to their obligation.


2. Rev are even making us pay for bugfixes! Well, we ain't gonna do it.

See what I mean?

Of course, after an initial "ugly old woman" interpretation, a 
psychological set has been established and everything that I say 
afterwards gets totally ignored, even if it doesn't quite add up 
logically! This "set" perception is so strong that it wouldn't surprise 
me if some people thought I was making excuses by the explanation I have 
just given!


Sorry, I realize this is not the place to discuss (even relevant) 
psychology really, but I was disappointed by what happened.


Bob


___
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: switch case question

2006-11-05 Thread Kay C Lan

On 11/5/06, Dar Scott <[EMAIL PROTECTED]> wrote:


The 'switch x' seems to convert x to a string and the 'case y' seems
to convert y to a string, and then comparisons are made.


Excellent Detective work Dar. It also reinforces a habit I'm trying to
develop when writing switch statements, and that is to always use the
default as a catch for cases I haven't considered:

switch L
 case (5)
handler1
 break
 case (5.0)
handler2
  break
 case ("5")
handler3
 break
 case ("5"&"."&"0")
handler4
 break
 default
   answer "Switch statement error" & return &
  "Handler: myHandler" & return &
  "Paramater L: " & L
  exitGracefully
end switch

Obviously, from what you're saying, handler3/4 would never run, but
more importantly, if 5. (decimal point byt no zero) got into L, I
should get immediate feedback that I haven't correctly taken it into
account in my switch structure.

I've wasted a lot of time stepping through scripts that don't do what
they're suppose to do and often it is because I've added a feature to
and old stack and don't realise that this new feature now puts new
values into properties that get checked by some buried switch
structure which completely ignores it because it was never part of the
original cases considered. Using default as a catch nails it
instantly.

Hope that helps someone:-)
___
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


  1   2   3   >