Generic Invisibility Handler

2010-02-08 Thread Andrew Kluthe
(Moderator Note: My previous post from akrev...@gmail.com should be ignored
or deleted. I mistakenly sent it from the wrong email. I'm very sorry.)

Hello,

I recently convinced my company to let me re-write our farm management
software in RunRev. Part of my proposal for this was developing a module for
this software within a week.

Going from zero RevTalk/Revolution knowledge to programming a fairly large
database application has really been fun (no sarcasm intended).

But syntax (or lack thereof?) seems to be my biggest problem.

I have a lot of controls that need to be made visible and invisible
depending on the user-state of the application (updating a record, adding a
record, viewing a record).

I'm unsure how to use parameters with handlers in this one liner.

on hideObject pObjectType, pObjectName
   set the invisible of pObjectType pObjectName to true
end hideObject

on showObject pObjectType, pObjectName
   set the invisible of pObjectType pObjectName to true
end showObject

Any suggestions on helping this RevNub get this sorted out? In your
response, try to include how the params are used in handlers. Thank you so
much in advance for your replies!


Hoping Rev can make my job easier (I am very tired of ASP .NET),

Andrew K.
RJD Farm LLC
___
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: Generic Invisibility Handler

2010-02-08 Thread Bill Vlahos
Andrew,

Welcome to the Revolution.

You almost have it. 

Set the visible of object to true to make it visible
Set the visible of object to false to make it invisible

Bill Vlahos
_
InfoWallet (http://www.infowallet.com) is about keeping your important life 
information with you, accessible, and secure.

On Feb 8, 2010, at 9:14 AM, Andrew Kluthe wrote:

 (Moderator Note: My previous post from akrev...@gmail.com should be ignored
 or deleted. I mistakenly sent it from the wrong email. I'm very sorry.)
 
 Hello,
 
 I recently convinced my company to let me re-write our farm management
 software in RunRev. Part of my proposal for this was developing a module for
 this software within a week.
 
 Going from zero RevTalk/Revolution knowledge to programming a fairly large
 database application has really been fun (no sarcasm intended).
 
 But syntax (or lack thereof?) seems to be my biggest problem.
 
 I have a lot of controls that need to be made visible and invisible
 depending on the user-state of the application (updating a record, adding a
 record, viewing a record).
 
 I'm unsure how to use parameters with handlers in this one liner.
 
 on hideObject pObjectType, pObjectName
   set the invisible of pObjectType pObjectName to true
 end hideObject
 
 on showObject pObjectType, pObjectName
   set the invisible of pObjectType pObjectName to true
 end showObject
 
 Any suggestions on helping this RevNub get this sorted out? In your
 response, try to include how the params are used in handlers. Thank you so
 much in advance for your replies!
 
 
 Hoping Rev can make my job easier (I am very tired of ASP .NET),
 
 Andrew K.
 RJD Farm LLC
 ___
 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: Generic Invisibility Handler

2010-02-08 Thread Andre Garzia
You can always use:

   show pObjectName

and

   hide pObjectName

:D

On Mon, Feb 8, 2010 at 3:18 PM, Bill Vlahos bvla...@mac.com wrote:
 Andrew,

 Welcome to the Revolution.

 You almost have it.

 Set the visible of object to true to make it visible
 Set the visible of object to false to make it invisible

 Bill Vlahos
 _
 InfoWallet (http://www.infowallet.com) is about keeping your important life 
 information with you, accessible, and secure.

 On Feb 8, 2010, at 9:14 AM, Andrew Kluthe wrote:

 (Moderator Note: My previous post from akrev...@gmail.com should be ignored
 or deleted. I mistakenly sent it from the wrong email. I'm very sorry.)

 Hello,

 I recently convinced my company to let me re-write our farm management
 software in RunRev. Part of my proposal for this was developing a module for
 this software within a week.

 Going from zero RevTalk/Revolution knowledge to programming a fairly large
 database application has really been fun (no sarcasm intended).

 But syntax (or lack thereof?) seems to be my biggest problem.

 I have a lot of controls that need to be made visible and invisible
 depending on the user-state of the application (updating a record, adding a
 record, viewing a record).

 I'm unsure how to use parameters with handlers in this one liner.

 on hideObject pObjectType, pObjectName
   set the invisible of pObjectType pObjectName to true
 end hideObject

 on showObject pObjectType, pObjectName
   set the invisible of pObjectType pObjectName to true
 end showObject

 Any suggestions on helping this RevNub get this sorted out? In your
 response, try to include how the params are used in handlers. Thank you so
 much in advance for your replies!


 Hoping Rev can make my job easier (I am very tired of ASP .NET),

 Andrew K.
 RJD Farm LLC
 ___
 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




-- 
http://www.andregarzia.com All We Do Is Code.
___
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: Generic Invisibility Handler

2010-02-08 Thread Michael Kann
To toggle from hidden to visible use:

set the visible of fld 1 to not the visible of fld 1

--- On Mon, 2/8/10, Andrew Kluthe and...@rjdfarm.com wrote:

 From: Andrew Kluthe and...@rjdfarm.com
 Subject: Generic Invisibility Handler
 To: use-revolution@lists.runrev.com
 Date: Monday, February 8, 2010, 11:14 AM
 (Moderator Note: My previous post
 from akrev...@gmail.com
 should be ignored
 or deleted. I mistakenly sent it from the wrong email. I'm
 very sorry.)
 
 Hello,
 
 I recently convinced my company to let me re-write our farm
 management
 software in RunRev. Part of my proposal for this was
 developing a module for
 this software within a week.
 
 Going from zero RevTalk/Revolution knowledge to programming
 a fairly large
 database application has really been fun (no sarcasm
 intended).
 
 But syntax (or lack thereof?) seems to be my biggest
 problem.
 
 I have a lot of controls that need to be made visible and
 invisible
 depending on the user-state of the application (updating a
 record, adding a
 record, viewing a record).
 
 I'm unsure how to use parameters with handlers in this one
 liner.
 
 on hideObject pObjectType, pObjectName
    set the invisible of pObjectType
 pObjectName to true
 end hideObject
 
 on showObject pObjectType, pObjectName
    set the invisible of pObjectType
 pObjectName to true
 end showObject
 
 Any suggestions on helping this RevNub get this sorted out?
 In your
 response, try to include how the params are used in
 handlers. Thank you so
 much in advance for your replies!
 
 
 Hoping Rev can make my job easier (I am very tired of ASP
 .NET),
 
 Andrew K.
 RJD Farm LLC
 ___
 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: Generic Invisibility Handler

2010-02-08 Thread Bob Sneidar
There are two ways to make a variable visible to a command or function. First, 
you can declare the variable as a global or script local. A global variable is 
one that is available to any handler that declares it, or optionally, to any 
script that declares it outside any handlers:

on doSomething
   global myValue
end doSomething

on doSomethingElse
   global myValue
end doSomethingElse

The second way is to pass the value to the command or function:

on doAnotherthing myValue
   -- some commands
end doAnotherthing

The globals or script locals are persistent while Revolution is running. The 
parameter is NOT persistent, in that as soon as doAnotherThing terminates, 
myValue is destroyed. 

You could make it a function:

function doYetAnotherThing myValue
   -- do things that change myValue
   return myValue
end doYetAnotherThing

and then preserve myValue by putting the result of the function back into 
myValue:

put doYetAnotherThing(myValue) into myValue

Seems silly, but there you have it. The better way to do this without using a 
function is by declaring the parameter using the @ keyword (keychar??): 

on doOneLastThing @myValue
   -- some commands that change myValue
end doOneLastThing

in which case myValue will not be destroyed when doOneLastThing terminates, 
because the command was passed to the function as a variable and not the value. 
The calling program will see the change in myValue. 

That about sums it up. Globals and Script Locals are for persistence while 
Revolution is running. They are visible to whatever declares then, including 
ALL handlers in a script that declares it outside of any handler like so:

local myValue -- or global if you want it to be visible by ALL handlers
  -- in ALL scripts in your stack or application

on okayThisLastThing
   -- do something to the most used variable ever
end okayThisLastThing

Parameters are for passing values that get destroyed when the command or 
function terminates. 

Bob


On Feb 8, 2010, at 9:14 AM, Andrew Kluthe wrote:

 Any suggestions on helping this RevNub get this sorted out? In your
 response, try to include how the params are used in handlers. Thank you so
 much in advance for your replies!

___
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: Generic Invisibility Handler

2010-02-08 Thread Andrew Kluthe

I am going to try this more elegant approach. I knew I should have
dictionaried hide when it came up as yellow in my script editor.

Thank you for your speedy help!
-- 
View this message in context: 
http://n4.nabble.com/Generic-Invisibility-Handler-tp1473182p1473253.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: Generic Invisibility Handler

2010-02-08 Thread Mark Wieder
Andrew-

Monday, February 8, 2010, 9:14:47 AM, you wrote:

 I'm unsure how to use parameters with handlers in this one liner.

 on hideObject pObjectType, pObjectName
set the invisible of pObjectType pObjectName to true
 end hideObject

 on showObject pObjectType, pObjectName
set the invisible of pObjectType pObjectName to true
 end showObject

In addition to the other suggestions offered, I'd also like to add
that if you're dealing with screen objects (buttons, fields, etc) then
you probably don't need the pObjectType argument:

on ShowHideObject pObjectName, pVisible
  set the visible of control pObjectName to pVisible
end ShowHideObject

-- 
-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: Generic Invisibility Handler

2010-02-08 Thread Mark Wieder
Andrew-

Monday, February 8, 2010, 9:14:47 AM, you wrote:

 I recently convinced my company to let me re-write our farm management
 software in RunRev. Part of my proposal for this was developing a module for
 this software within a week.

...and having done some farm management software in rev before, I'm of
course quite interested in your project. Do keep us in the loop.

-- 
-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: Generic Invisibility Handler

2010-02-08 Thread Andrew Kluthe

Thanks Mark! This list is so helpful! I don't know why I didn't use it before
when trying to guess revTalk code and searching through the forums.


We are a grain farm company in central Illinois and my predecessor built a
farm management app in ASP .NET using Ironspeed Developer. Maintaining his
code and adding additional functionality has been a nightmare, so when
challenged by my supervisor to explore writing Iphone apps I came across
RunRev. So far in a matter of days, I have just about wrote a client app for
the Lease Management part of our current web app. I am very impressed with
revolutions capabilities for quick development. 

We intend to use this software for managing leases on land and machinery,  
putting out/tracking work orders in the field, asset management, FSA
material management, Inventory, Repair orders, Loan payments, etc. I am
beginning a complete rewrite of our current web app into Rev. A daunting
task at the moment, but somehow easier than I imagined (the already heavily
populated database does most of the work). 



This is my second full week developing in Rev. The first week was spent
writing database handlers. This week I am going to figure out how to
manipulate alot of the controls I need via scripting.

I am troubled by the lack of books out there on the subject, and am looking
to increase my skill set as quickly as possible.  Thank you all for your
speedy responses.
-- 
View this message in context: 
http://n4.nabble.com/Generic-Invisibility-Handler-tp1473182p1473290.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: Generic Invisibility Handler

2010-02-08 Thread Michael Kann
Andrew, screw the elegence. Try this:

Make 3 flds:
fld uno  -- just to test visibility
fld dos  -- just to test visibility
---
fld visibility

In fld visibility put the following text:

This is fld visibility

record_update, show fld uno
record_update, show fld dos

-
record_change, hide fld uno
record_change, hide fld dos
---
--- finished with fld visibility
---
This fld holds your list of
all the actions that will trigger some
visibility change -- this is a handy item
to have around anyway, and easy to change.

Now for a couple of btns:

btn record_update has the following script:

on mouseUp
   put fld visibility into v
   filter v  with  *update*  -- chooses all the update lines
   set the itemDelimiter to comma
   repeat for each line cur_line in v
  do item 2 of cur_line -- performs the show or the hide
   end repeat
end mouseUp

btn record_change has the following script:

on mouseUp
   put fld visibility into v
   filter v  with  *change*
   set the itemDelimiter to comma
   repeat for each line cur_line in v
  do item 2 of cur_line
   end repeat
end mouseUp

--
when an update or a change occurs then send a mouseUp to the correct btn
---
Now you have a nice list of actions that you can change easily. You also have 
some btns to click on to simulate a record_change or a record_update. When 
everything is working o.k. you can hide the btns and the fld. 

Just as a warning. I'm probably the worst programmer who frequents this forum. 
So you might want to heed the experts. 

Good luck on your project. I checked out your website and it looks great.

Mike



--- On Mon, 2/8/10, Andrew Kluthe and...@rjdfarm.com wrote:

 From: Andrew Kluthe and...@rjdfarm.com
 Subject: Generic Invisibility Handler
 To: use-revolution@lists.runrev.com
 Date: Monday, February 8, 2010, 11:14 AM
 (Moderator Note: My previous post
 from akrev...@gmail.com
 should be ignored
 or deleted. I mistakenly sent it from the wrong email. I'm
 very sorry.)
 
 Hello,
 
 I recently convinced my company to let me re-write our farm
 management
 software in RunRev. Part of my proposal for this was
 developing a module for
 this software within a week.
 
 Going from zero RevTalk/Revolution knowledge to programming
 a fairly large
 database application has really been fun (no sarcasm
 intended).
 
 But syntax (or lack thereof?) seems to be my biggest
 problem.
 
 I have a lot of controls that need to be made visible and
 invisible
 depending on the user-state of the application (updating a
 record, adding a
 record, viewing a record).
 
 I'm unsure how to use parameters with handlers in this one
 liner.
 
 on hideObject pObjectType, pObjectName
    set the invisible of pObjectType
 pObjectName to true
 end hideObject
 
 on showObject pObjectType, pObjectName
    set the invisible of pObjectType
 pObjectName to true
 end showObject
 
 Any suggestions on helping this RevNub get this sorted out?
 In your
 response, try to include how the params are used in
 handlers. Thank you so
 much in advance for your replies!
 
 
 Hoping Rev can make my job easier (I am very tired of ASP
 .NET),
 
 Andrew K.
 RJD Farm LLC
 ___
 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: Generic Invisibility Handler

2010-02-08 Thread Judy Perry
Which, at least as of 5 or 6 years ago, I was assured did NOT work in 
Lingo/Director :-P


Judy

On Mon, 8 Feb 2010, Andre Garzia wrote:


You can always use:

  show pObjectName

and

  hide pObjectName

:D

On Mon, Feb 8, 2010 at 3:18 PM, Bill Vlahos bvla...@mac.com wrote:

Andrew,

Welcome to the Revolution.

You almost have it.

Set the visible of object to true to make it visible
Set the visible of object to false to make it invisible

Bill Vlahos
_
InfoWallet (http://www.infowallet.com) is about keeping your important life 
information with you, accessible, and secure.

On Feb 8, 2010, at 9:14 AM, Andrew Kluthe wrote:


(Moderator Note: My previous post from akrev...@gmail.com should be ignored
or deleted. I mistakenly sent it from the wrong email. I'm very sorry.)

Hello,

I recently convinced my company to let me re-write our farm management
software in RunRev. Part of my proposal for this was developing a module for
this software within a week.

Going from zero RevTalk/Revolution knowledge to programming a fairly large
database application has really been fun (no sarcasm intended).

But syntax (or lack thereof?) seems to be my biggest problem.

I have a lot of controls that need to be made visible and invisible
depending on the user-state of the application (updating a record, adding a
record, viewing a record).

I'm unsure how to use parameters with handlers in this one liner.

on hideObject pObjectType, pObjectName
  set the invisible of pObjectType pObjectName to true
end hideObject

on showObject pObjectType, pObjectName
  set the invisible of pObjectType pObjectName to true
end showObject

Any suggestions on helping this RevNub get this sorted out? In your
response, try to include how the params are used in handlers. Thank you so
much in advance for your replies!


Hoping Rev can make my job easier (I am very tired of ASP .NET),

Andrew K.
RJD Farm LLC
___
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





--
http://www.andregarzia.com All We Do Is Code.
___
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: Generic Invisibility Handler

2010-02-08 Thread Bernard Devlin
On Mon, Feb 8, 2010 at 6:16 PM, Andrew Kluthe and...@rjdfarm.com wrote:
 I am troubled by the lack of books out there on the subject, and am looking
 to increase my skill set as quickly as possible.  Thank you all for your
 speedy responses.

Andrew, I think maybe you have not realised that there is a 400 page
User Manual included with your installation as a PDF file.  From the
IDE top menu choose 'Resource Center'.  Once that is launched choose
'User Guide' from the left menu of that stack.  After that click on
the 'Launch PDF' button in the bottom right hand corner.  I would
think that is the first place to start learning Rev.

When I first started out with Revolution I bought a couple of old
books on Hypercard (the precursor of Rev).  I wouldn't think they
provide any benefit these days, and would be almost impossible to find
anyway.  So, don't let it worry you that there are no 3rd party books
on Rev.  I'd say that they're not needed and the old books are
probably as much of a hindrance as  a help. When I started out
learning Apple's WebObjects I bought every single book on it, and even
after reading them all multiple times, it was only after years of
working with it that I finally grasped how to properly use it all.  I
could say the same for many other technologies, where often it's
necessary to have a 800 page book just to find out how to use the IDE
(I'm looking at you, Eclipse).

In addition to the User Guide, it may also pay dividends to buy the
DVD of the 2009 conference:
https://secure.runrev.com/store/browse/?product=RVSLRVLV09DVD
I haven't seen the above myself yet, so I can't verify that the
audio-visual quality is suitable for learning details.

Until we hear about the quality of the DVDs from someone else, you
could browse the newsletter archive:
http://www.runrev.com/developers/resources/newsletters/
I've learned things from those newsletters that I would never have
dreamed were possible.

You might also want to look at the scripting conferences:
http://www.runrev.com/developers/lessons-and-tutorials/tutorials/online-scripting-conferences/
Those conferences were the inspiration and hard work of some of the
gifted people who provide us with help on this list and in the forum.

You've already discovered the forum, and this list.  When I started
out with Rev 8 years ago, we had none of the above, just this list!

And of course, there is the Nabble archive of this list.  I find that
with most things I can find the answer a) in the dictionary or b) by
searching this list.

I think there are many, many great resources for learning Rev.  I
might carp on about some deficiencies in Rev myself, but I have to
applaud the efforts RunRev have gone to when it comes to providing
information and training material.

Hope that helps you beyond this immediate problem that everyone else
is helping you with.

Bernard
___
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: Generic Invisibility Handler

2010-02-08 Thread Sarah Reichelt
 I am troubled by the lack of books out there on the subject, and am looking
 to increase my skill set as quickly as possible.  Thank you all for your
 speedy responses.


We did have one person who tried to do a book, but the product is
evolving so fast that the life cycle of a book just can't keep up.

But as Bernard says, the scripting conferences, newsletters  this
list are the best resource.

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