Family Tree Drawing project

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
saratogacoach
Posts: 87
Joined: Thu Jul 17, 2008 8:42 pm

Family Tree Drawing project

Post by saratogacoach » Fri Jul 18, 2008 12:48 pm

Hi

I'm just beginning with an Enterprise trial, trying to figure out if it can be used to create a health project tool (would be part of an eLearning project): giving the end-user ability to draw their family tree. The family tree runtime needs to draw using symbols like squares for male family members, circles for female, shading or fill of these symbols divided into 4 quadrants to symbolize/track health conditions, and ability to draw a variety of connecting lines between symbols in runtime with different styles like solid, dotted, etc.

Once the family tree diagram drawing is started, it needs to be saved so the end-user can reload and return to it to make additions, erase mistakes, edit/change it and then re-save over and over. It helps if the saved data can be encrypted since the information relates to their health care and should be private.

For a newbie, this is quite a challenge. But, first, I need to figure out if it can be done using Runtime Revolution, plus what learning curve, skill would be involved. (My background is social services, not programming).

I would appreciate any ideas, suggestions, thoughts or basic examples (sample files, code, etc.). :)

Kind Regards,
saratogacoach
LiveCode 4.6.0, Windows 7 Home Premium 64 bit, Core i7 2.80, 8G RAM, ATI Radeon HD5770

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Fri Jul 18, 2008 12:56 pm

Hi,

this sounds perfectly doable for a Rev project. Some of the things will be easy, some will require quite a bit of learning and rev experience. Quite a big project to tackle for someone completely new to programming. That said, there are quite a few hanging in here that are always willing to help if you run into problems.

All the best,

malte

saratogacoach
Posts: 87
Joined: Thu Jul 17, 2008 8:42 pm

Post by saratogacoach » Fri Jul 18, 2008 1:31 pm

Hi Malte,

Thanks for your reply and encouragement.

Yes, it is a big challenge for someone new to Rev. (I've done some of this in JavaScript, so I'm somewhat familiar with the challenges but not the Rev language, syntax, etc.)

I would tackle these in increments: first step would be to see if I can create a very basic runtime drawing program (circles, squares, connecting lines) to start, add a save of the runtime drawn canvas so it can be reloaded. This would be very helpful to see.

Then, the more complex items like creating symbols comprised of 4 quadrants each quadrant capable of separate fill colors, encrypting stored data (symbol and line positions, angles, etc.) can be added.

Are there any very basic drawing samples available that show runtime drawing (even of one item), saving the drawn canvas, reloading it?

Kind Regards,
saratogacoach
LiveCode 4.6.0, Windows 7 Home Premium 64 bit, Core i7 2.80, 8G RAM, ATI Radeon HD5770

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Fri Jul 18, 2008 2:38 pm

Hi,

I think I would build the whole thing from graphic objects.

Things you will want to look up

- templategraphic
- style
- points
- backcolor
- forecolor

Try this for a start:

create a button. Put the following script into it:

Code: Select all

on mouseUp
    -- to speed things up screen and messages are locked
    lock screen
    lock messages
    if there is a group "familyTree" then delete group "familyTree"
    create group "familyTree"
    set the style of the templategraphic to "oval"
    set the opaque of the templateGraphic to true
    create graphic "oval1" in grp "familyTree"
    set the loc of it to 100,100
    set the backcolor of it to "green"
    set the style of the templategraphic to "curve"
    create grc "line1" in grp "familyTree"
    set the points of it to "0,0"&cr&"100,100"
    unlock messages
    unlock screen
end mouseUp
Hope that gets you started,

Malte

saratogacoach
Posts: 87
Joined: Thu Jul 17, 2008 8:42 pm

Post by saratogacoach » Fri Jul 18, 2008 2:54 pm

Hi Malte,

Thank you for this sample code. I added it to a button, and it worked fine.

Very interesting. I'll study it, learn from it.

Again, thanks.
saratogacoach
LiveCode 4.6.0, Windows 7 Home Premium 64 bit, Core i7 2.80, 8G RAM, ATI Radeon HD5770

Post Reply