Revolution Resource Center

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
chris9610
Posts: 79
Joined: Fri Mar 20, 2009 4:38 pm

Revolution Resource Center

Post by chris9610 » Tue Aug 04, 2009 3:10 am

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.
Developing with Windows XP & Revolution 4.5

Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett » Tue Aug 04, 2009 7:19 am

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 ;-)
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Tue Aug 04, 2009 8:35 am

Hi Chris,

There are a few tree controls around. Just pick one and adjust the icons, colors and text style.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

whelkybaby
Posts: 47
Joined: Sat Nov 17, 2007 6:04 pm
Location: Worcester, UK

Post by whelkybaby » Tue Aug 04, 2009 9:23 am

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

Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett » Tue Aug 04, 2009 8:03 pm

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?
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)

whelkybaby
Posts: 47
Joined: Sat Nov 17, 2007 6:04 pm
Location: Worcester, UK

Post by whelkybaby » Tue Aug 04, 2009 9:30 pm

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

Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett » Wed Aug 05, 2009 3:21 am

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
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)

chris9610
Posts: 79
Joined: Fri Mar 20, 2009 4:38 pm

Post by chris9610 » Wed Aug 05, 2009 4:07 am

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.
Developing with Windows XP & Revolution 4.5

chris9610
Posts: 79
Joined: Fri Mar 20, 2009 4:38 pm

Post by chris9610 » Wed Aug 05, 2009 7:19 pm

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.
Developing with Windows XP & Revolution 4.5

chris9610
Posts: 79
Joined: Fri Mar 20, 2009 4:38 pm

No scripts in the Get the control

Post by chris9610 » Wed Aug 05, 2009 7:58 pm

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.
Developing with Windows XP & Revolution 4.5

whelkybaby
Posts: 47
Joined: Sat Nov 17, 2007 6:04 pm
Location: Worcester, UK

Post by whelkybaby » Wed Aug 05, 2009 9:58 pm

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

chris9610
Posts: 79
Joined: Fri Mar 20, 2009 4:38 pm

Tree Working

Post by chris9610 » Thu Aug 06, 2009 5:17 am

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.
Developing with Windows XP & Revolution 4.5

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”