Page 1 of 1
Revolution Resource Center
Posted: Tue Aug 04, 2009 3:10 am
by chris9610
I would like to see how the the left side menu was built for the Resource Center.
Unless this was not a Revolution application.
I would like too see an example of the structure of this menu. I hope this is possible.
Posted: Tue Aug 04, 2009 7:19 am
by Garrett
Looks like it's made in Rev to me. I'd offer up an example, but I assure you that you'd rather have someone else here offer up some sort of example, because my example would be ummmm.... less than adequate

Posted: Tue Aug 04, 2009 8:35 am
by Mark
Hi Chris,
There are a few tree controls around. Just pick one and adjust the icons, colors and text style.
Best,
Mark
Posted: Tue Aug 04, 2009 9:23 am
by whelkybaby
I've been building a tree control for Rev and currently have a beta release available, which seems to be pretty stable to me now.
It is designed for Mac OS X, and as I don't have a PC, I don't know whether it draws properly on that system but other skins will be addressed in time.
You can find it over at
www.theworcestersource.com . You will need to register with my site for the time being, so you can get access to special download and information pages.
Thanks,
Steve
Posted: Tue Aug 04, 2009 8:03 pm
by Garrett
whelkybaby wrote:I've been building a tree control for Rev and currently have a beta release available, which seems to be pretty stable to me now.
It is designed for Mac OS X, and as I don't have a PC, I don't know whether it draws properly on that system but other skins will be addressed in time.
While the trees you've created and use in your documentation work just fine on Windows XP, I was unable to get any of the commands to work on my end using the example codes found to create the nodes and items in the tree.
As of this time I do not know why they would not work. Even editing the custom properties didn't seem to take hold either, nor using the message box and not even putting a button on the window and placing the code in the mouseup didn't do it
Do I need to include the library in the external list?
Posted: Tue Aug 04, 2009 9:30 pm
by whelkybaby
Hi Garrett,
I think that you've just hit on something that's missing in the docs - you need to put the stack into use!
This will happen if you open the documentation stack but not if you've just created a tree in your own stack. You can tell if the stack is in use or not if the nodes activate when you click on them.
If this doesn't solve the problem, would you like to email me and we'll see if we can sort it out?
Thanks,
Steve
Posted: Wed Aug 05, 2009 3:21 am
by Garrett
I had the Document window open and was using it while trying to get the tree setup in a new stack. The Document window was working just fine too. So at least you know your tree does work on Windows.
I didn't see anything Mac specific in your code, so this should work on Windows.
I'd really like to see this working from the Rev users side on Windows, so I'll email you tomorrow to see if we can work out what I'm doing wrong.
Thanks a bunch,
~Garrett
Posted: Wed Aug 05, 2009 4:07 am
by chris9610
HI whelkybaby:
That is a nice control.
I will try to use it in a real application and let you know how it goes. I am using windows and it seemed to work very well.
Posted: Wed Aug 05, 2009 7:19 pm
by chris9610
whelkybaby:
Well I have the same problem.
I can set the root nodes. But when I get to the point of adding child nodes the messages fail.
Nothing happens, But your example does run properly.
No scripts in the Get the control
Posted: Wed Aug 05, 2009 7:58 pm
by chris9610
Ok
One thing I found is that there are no scripts in the (Get the control) rev file.
That may be the problem, the lack of scripts in your starting template to copy and paste.
Posted: Wed Aug 05, 2009 9:58 pm
by whelkybaby
Hi Chris and Garrett,
Yes, you're right in that there are no scripts in the "Get the Control.rev" file. All of the scripts are in the "Data Tree Library.rev" file. Without putting it into use, the control will just sit there and be unable to do anything.
Here are some ideas on solving the issue (sorry if you've tried some of these - just want to rule out the obvious!).
Put the stack into use within the library directly:
Double click on the "Data Tree Library.rev" file and when it opens, click on the "Start Using Library" button. This'll put the library into use.
Put the stack into use via code
With the "Data Tree Library.rev" in the same folder as the stack you're creating, enter the following into your stack's code:
Code: Select all
on openStack
local lLibraryPath
put the filename of me into lLibraryPath
set itemDelimiter to "/"
delete last item of lLibraryPath
set itemDelimiter to comma
put "/" after lLibraryPath
start using stack (lLibraryPath & "Data Tree Library.rev")
end openStack
Type "openStack" into the message and it should start the library. When you next open your stack, it'll automatically put the library into use.
Some other thoughts
When you use the various commands:
1. Are you referring to your tree controls by their ids? For example, you should always enter (id of group "myTree") rather than just (group "myTree").
2. Are you entering the various argument with quotes around them (true/false arguments don't need quotes)? e.g. dt_addNode (id of group "myTree"),"myNodeID",false,"New Node"
The latest version of the library includes a whole raft of parameter checking code and puts any errors into
the result. There's also a page on how to put the stack into use. Hopefully I'll have this uploaded in a few hours.
In the meantime, if you'd like to send me a stack with your troublesome tree in it, it'll help me work out what's going on.
Thanks,
Steve
Tree Working
Posted: Thu Aug 06, 2009 5:17 am
by chris9610
Well you were right.
I had to use the library then it started working.
Now I can go to work and learn more about it.