Re: Custom Control Design Tutorial

2010-03-28 Thread BNig

Len,
I liked the idea of a water tank and made a revlet that consists of the
tank. You can drag the tank around,
set width and height by sliders or fill the tank with a number.
Be patient with the revlet: it somehow took 30 plus seconds before it
responded to user input.(???)
It is a self-contained group that you can copy and reuse as an object.
http://berndniggemann.on-rev.com/abarrel/

I put 2 stacks up on my site 
http://berndniggemann.on-rev.com/barrel/
that contain the code etc. 
Tried to email the link to you, somehow did not get to you.
regards
Bernd
-- 
View this message in context: 
http://n4.nabble.com/Custom-Control-Design-Tutorial-tp1693375p1694275.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: Custom Control Design Tutorial

2010-03-27 Thread Björnke von Gierke
I'm not sure what would make your object not be portable?

the main things to look out for are:

Changing the rectangle or location will of course change some movement 
dependant scripts. you need to look out for that if you do graphical stuff 
(like resizing a water level graphic for your tank). 

Use a group, and set its lockLoc to true. Generally It's easier to handle 
various objects that belong together if they're grouped.

Keep your scripts together.  Group all objects that belong to your custom 
object, and move all toplevel scripts into that group's script. 

Try to keep all custom properties in that group too, so that you have one place 
to go to for setting stuff and calling scripts.

To be able to identify the correct object when there's several on one card, I 
suggest to change the groups name to something unique.

Beyond that, there's really no additional measure to take, unless I 
misinterpreted your question.

On 27 Mar 2010, at 14:32, Len Morgan wrote:

 Has anyone created a tutorial for creating and using a custom control?  What 
 I'd like to end up with is a custom control that I could copy onto a stack 
 similar to Trevor's Data Grid.  As an example, I've been tasked with 
 redesigning the GUI for a pipeline control system that comprises various 
 tanks, pumps, valves, etc. and I'd like to just create one of each and be 
 able to put multiple instances on a page (the system currently uses 6 HUGE 
 monitors hung on the wall of the control room).
 
 To the a water tank as an example, it needs the following:
 
 It needs to look like a water tank (cylinder of varying hieght) with water 
 in it that goes up and down to reflect the amount of water that is actually 
 in the tank.
 
 A number to show the current level (in feet) that is in the tank.
 Some parameters like tank height, spill height, minimum level with an alarm 
 if the level goes below it.
 A visual indication that it is spilling or has gotten too low.
 
 I created a little stack and I can do this graphically and I can set 
 variables like currentTankLevel and have it change the number and the water 
 level but it's not portable so I guess what I'm asking is if there is a 
 tutorial that can tell me how to take this one-off widget I've created and 
 turn it into a custom control/widget that I could copy on to a stack and then 
 set up to make that instance unique?
 
 I know it will probably need behavior scripts and such, and I'm pretty sure 
 all the pieces to do this are laying around in the mail archives somewhere 
 but I was hoping that there was some sort of a step by step guide.
 
 Any pointers would be welcome.
 
 len morgan



-- 

official ChatRev page:
http://bjoernke.com?target=chatrev

Chat with other RunRev developers:
go stack URL http://bjoernke.com/chatrev/chatrev1.3b3.rev;

___
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: Custom Control Design Tutorial

2010-03-27 Thread Len Morgan
Maybe *I'm* the one that's misinterpreted the question! :-)  I think 
what you're telling me is that I'm over engineering the problem and that 
all I'm really after is a self-contained group that has all of the 
functions I'd need to manipulate the tank which I would then copy (or 
clone?) as many times as I needed to get the required number of tanks.  
I guess in the end, a Data Grid is nothing more than a group.


This actually brings up another question though: There are some cases of 
tanks in the current system that display the feet of water in the tank 
next to the tank, and some where the number is shown IN the tank.  If we 
temporarily ignore how I'd let the user move around the component parts 
of a tank (assuming I'd let them), what are the locations of the 
components in the group (i.e., oval and rectangle for water graphic, 
text box for numeric level, etc) telling me?  Are they the physical 
locations on the screen at that instant or are they (or can they be) 
relative to the location of the group as a whole?


len morgan

On 3/27/2010 9:18 AM, Björnke von Gierke wrote:

I'm not sure what would make your object not be portable?

the main things to look out for are:

Changing the rectangle or location will of course change some movement 
dependant scripts. you need to look out for that if you do graphical stuff 
(like resizing a water level graphic for your tank).

Use a group, and set its lockLoc to true. Generally It's easier to handle 
various objects that belong together if they're grouped.

Keep your scripts together.  Group all objects that belong to your custom object, and 
move all toplevel scripts into that group's script.

Try to keep all custom properties in that group too, so that you have one place 
to go to for setting stuff and calling scripts.

To be able to identify the correct object when there's several on one card, I 
suggest to change the groups name to something unique.

Beyond that, there's really no additional measure to take, unless I 
misinterpreted your question.

On 27 Mar 2010, at 14:32, Len Morgan wrote:

   

Has anyone created a tutorial for creating and using a custom control?  What I'd like to 
end up with is a custom control that I could copy onto a stack similar to Trevor's Data 
Grid.  As an example, I've been tasked with redesigning the GUI for a pipeline control 
system that comprises various tanks, pumps, valves, etc. and I'd like to just create one 
of each and be able to put multiple instances on a page (the system currently 
uses 6 HUGE monitors hung on the wall of the control room).

To the a water tank as an example, it needs the following:

It needs to look like a water tank (cylinder of varying hieght) with water in 
it that goes up and down to reflect the amount of water that is actually in the tank.

A number to show the current level (in feet) that is in the tank.
Some parameters like tank height, spill height, minimum level with an alarm if 
the level goes below it.
A visual indication that it is spilling or has gotten too low.

I created a little stack and I can do this graphically and I can set variables like currentTankLevel and have 
it change the number and the water level but it's not portable so I guess what I'm 
asking is if there is a tutorial that can tell me how to take this one-off widget I've created and turn it 
into a custom control/widget that I could copy on to a stack and then set up to make that 
instance unique?

I know it will probably need behavior scripts and such, and I'm pretty sure all 
the pieces to do this are laying around in the mail archives somewhere but I 
was hoping that there was some sort of a step by step guide.

Any pointers would be welcome.

len morgan
 



   


___
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: Custom Control Design Tutorial

2010-03-27 Thread Scott Rossi
Recently, Len Morgan wrote:

 This actually brings up another question though: There are some cases of
 tanks in the current system that display the feet of water in the tank
 next to the tank, and some where the number is shown IN the tank.  If we
 temporarily ignore how I'd let the user move around the component parts
 of a tank (assuming I'd let them), what are the locations of the
 components in the group (i.e., oval and rectangle for water graphic,
 text box for numeric level, etc) telling me?  Are they the physical
 locations on the screen at that instant or are they (or can they be)
 relative to the location of the group as a whole?

If I understand your question, locations are always relative to the card.
But you can use the dimensions/locations of elements in the group as
reference points.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design


___
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: Custom Control Design Tutorial

2010-03-27 Thread Len Morgan
That's what I was afraid of, but then, I should only have to figure it 
out once.


len


On 3/27/2010 12:42 PM, Scott Rossi wrote:

Recently, Len Morgan wrote:

   

This actually brings up another question though: There are some cases of
tanks in the current system that display the feet of water in the tank
next to the tank, and some where the number is shown IN the tank.  If we
temporarily ignore how I'd let the user move around the component parts
of a tank (assuming I'd let them), what are the locations of the
components in the group (i.e., oval and rectangle for water graphic,
text box for numeric level, etc) telling me?  Are they the physical
locations on the screen at that instant or are they (or can they be)
relative to the location of the group as a whole?
 

If I understand your question, locations are always relative to the card.
But you can use the dimensions/locations of elements in the group as
reference points.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design


___
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