Re: Option Menu Specifics

2010-02-09 Thread Thomas McGrath III
Andrew,

Welcome, and ask all of your questions. We love em! Also, it is wonderful to 
see someone's conversion to RunRev and where the obvious and not so obvious 
problems are. What a great story yours will be. 


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 8, 2010, at 2:50 PM, Andrew Kluthe wrote:

 
 Between Mark and J's post, I got everything I needed to know. I need to
 explore string manipulation in rev. I figured that this is where my sorting
 of these lists would be most handy. 
 
 Thank you Mark for that wonderful snippet. 
 
 As a PHP and .NET developer, I am just getting used to Rev and trying to get
 over the learning curve. You have been much help. Armed with a few more
 learning resources than I had prior to these posts, I hopefully won't have
 to bother you with silly things like this.
 -- 
 View this message in context: 
 http://n4.nabble.com/Option-Menu-Specifics-tp1473235p1473428.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


Option Menu Specifics

2010-02-08 Thread Andrew Kluthe
Hello again!

I am having difficulty figuring out how to script some specifics into option
menus.

My option menu is populated on preOpenCard and everything lists smoothly.
When set to view, this card displays a LandOwner's Name in a disabled text
field. When the cards status is set to update,  it shows a list of names
pulled from a table in a mySQL db, in alphabetical order.

 However, the current record being worked with was loaded on a previous card
and the information was put into a set of global variables.
gLandOwnerContact (the current record's landowner name).

I want the default selection for the option menu to be the same as
gLandOwnerContact. But when clicked, I still want it to display a full list
of the names.

I am just beginning in Revolution. I have modified column and row behaviors
in DataGrids (to change cards on doubleUp), but never overridden any other
controls functionality. I am thinking this is what is going to take to
implement the above. Can someone point me on the right path or help me hash
out the appropriate logic for this?

Any and all help is greatly appreciated.


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: Option Menu Specifics

2010-02-08 Thread Bob Sneidar
I think you need to use a combination of FindIndex and dgHilitedIndex like so:

dispatch findIndex to group myDataGrid with myColumnName, mySearchString
put the result into myValue
set the dgHilitedIndex of group myDataGrid to myValue

Bob


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

 Hello again!
 
 I am having difficulty figuring out how to script some specifics into option
 menus.
 
 My option menu is populated on preOpenCard and everything lists smoothly.
 When set to view, this card displays a LandOwner's Name in a disabled text
 field. When the cards status is set to update,  it shows a list of names
 pulled from a table in a mySQL db, in alphabetical order.
 
 However, the current record being worked with was loaded on a previous card
 and the information was put into a set of global variables.
 gLandOwnerContact (the current record's landowner name).
 
 I want the default selection for the option menu to be the same as
 gLandOwnerContact. But when clicked, I still want it to display a full list
 of the names.
 
 I am just beginning in Revolution. I have modified column and row behaviors
 in DataGrids (to change cards on doubleUp), but never overridden any other
 controls functionality. I am thinking this is what is going to take to
 implement the above. Can someone point me on the right path or help me hash
 out the appropriate logic for this?
 
 Any and all help is greatly appreciated.
 
 
 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: Option Menu Specifics

2010-02-08 Thread Andrew Kluthe

Sorry for not clarifying. I am not trying to work within a datagrid this
time. I do not understand how to modify the behaviors of controls other than
the datagrid. There isn't a button in the property inspector for modifying
behaviors of an option menu.

I have read the lessons on behaviors and am still lacking a real
understanding of where to find the code for handling the functionality of
the option menu. 

here is the logic which I had in mind.

Load gLandownerContact into the text of optionMenu
on optionMenu's MouseUp (down, whatev),
Load a the full list from DB.






Alternatively, Being able to modify the choices of the option menu to place
the current gLandOwnerContact at the top of the list would solve my problem
as well.

load a full list from the DB
put CurrentChoice (= gLandOwnerContact) at the top of choice list, or at
least the default seclected option.


Whichever solution is easier or more robust would suit me. Although, I would
like to learn about the behavior override thing. 

The lessons seemed too vague to me.
http://lessons.runrev.com/spaces/lessons/buckets/784/tags?tag=Behavior

-- 
View this message in context: 
http://n4.nabble.com/Option-Menu-Specifics-tp1473235p1473299.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: Option Menu Specifics

2010-02-08 Thread Mark Wieder
Andrew-

Monday, February 8, 2010, 10:26:11 AM, you wrote:

 here is the logic which I had in mind.

 Load gLandownerContact into the text of optionMenu
 on optionMenu's MouseUp (down, whatev),
 Load a the full list from DB.

you might try something like

put lineOffset(gLandOwnerContact, tFullList) into tIndex
put tFullList into button btnOptionMenu
lock messages -- don't trigger the menuPick event yet
set the menuHistory of button btnOptionMenu to tIndex
unlock messages

-- 
-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: Option Menu Specifics

2010-02-08 Thread J. Landman Gay

Andrew Kluthe wrote:

Sorry for not clarifying. I am not trying to work within a datagrid this
time. I do not understand how to modify the behaviors of controls other than
the datagrid. There isn't a button in the property inspector for modifying
behaviors of an option menu.

I have read the lessons on behaviors and am still lacking a real
understanding of where to find the code for handling the functionality of
the option menu. 


here is the logic which I had in mind.

Load gLandownerContact into the text of optionMenu
on optionMenu's MouseUp (down, whatev),
Load a the full list from DB.


Use Mark Weider's suggestion, it will work fine. I just wanted to 
mention that for a single button instance like this, you don't need 
behaviors at all. Behaviors are great when you have a number of controls 
that need to share a single script, but if you only have one button it 
is more efficient to have it just use its own script.


One basic concept that may help: buttons are containers and they can 
hold text. If the button is a menu button (as option buttons are) then 
the text becomes the menu item list. You can populate a button menu 
simply by putting text into the button, like this:


put one cr two cr three into btn myOptionButton

This creates a 3-line list, which when put into the button, will pop 
down those three lines in its menu.


Everything else you want to do is just manipulation of the text before 
you put it into the button contents. If you want a particular line on 
top, parse your text so it is in the right order. But more typically, 
Mark's suggestion is the right one. Use the menuHistory property to set 
the line that will be under the cursor when the button menu displays.


--
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: Option Menu Specifics

2010-02-08 Thread Andrew Kluthe

Between Mark and J's post, I got everything I needed to know. I need to
explore string manipulation in rev. I figured that this is where my sorting
of these lists would be most handy. 

Thank you Mark for that wonderful snippet. 

As a PHP and .NET developer, I am just getting used to Rev and trying to get
over the learning curve. You have been much help. Armed with a few more
learning resources than I had prior to these posts, I hopefully won't have
to bother you with silly things like this.
-- 
View this message in context: 
http://n4.nabble.com/Option-Menu-Specifics-tp1473235p1473428.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: Option Menu Specifics

2010-02-08 Thread J. Landman Gay

Andrew Kluthe wrote:


As a PHP and .NET developer, I am just getting used to Rev and trying to get
over the learning curve. You have been much help. Armed with a few more
learning resources than I had prior to these posts, I hopefully won't have
to bother you with silly things like this.


I've said it before and I'll say it again: please bother us! Any 
question asked here will help everybody who searches the archives in the 
future. Let's get everything we can in there. Nothing is too elementary 
or too basic. As a matter of fact, I think our archives are sadly 
lacking a lot of the rudimentary info that newcomers are too embarrassed 
to ask about. So you do it. :)


Bother away!

--
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: Option Menu Specifics

2010-02-08 Thread Mark Wieder

 Bother away!

Indeed!

I'll also add that I think this list is the best resource there is for
getting rev information. The archives are available at gmane and
nabble and a few other places and searchable with the right tools.

-- 
-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: Option Menu Specifics

2010-02-08 Thread Kay C Lan
On Tue, Feb 9, 2010 at 1:48 AM, Andrew Kluthe and...@rjdfarm.com wrote:


  However, the current record being worked with was loaded on a previous
 card
 and the information was put into a set of global variables.
 gLandOwnerContact (the current record's landowner name).

 Hi Andrew,

Welcome to the Revolution. As you've already discovered, you really can do a
lot in one week with Revolution. As other's have said, forget about books,
ask all the questions you want on this List.

I'm going to depart from answering your question but offer some advise. Do a
search of the archives for: global vs custom properties. There is even a
long thread titled Best Practices using globals vs. custprops? - dated 23
Jun 07.

Your mentioning of 'a set of global variables' just strikes me as a perfect
scenario of custom properties and custom property sets. As you are just
starting out with Rev it may be the perfect opportunity to see if these suit
your situation. There is nothing wrong with globals, but as you'll discover
on this List, there are some gotchas that can be avoided by using Custom
Properties and they really are a much loved feature of Rev.

Hate for you to get 3 months down the track and go, Custom Properties???, no
body told me about them... I could have.. ;-)

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