Document viewer app with extras

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
jim1001
Posts: 143
Joined: Fri Jan 29, 2016 6:25 pm

Document viewer app with extras

Post by jim1001 » Wed Jul 13, 2016 10:59 pm

I’ve been given a task of creating an app to help couples where one person has had an early diagnosis of dementia. The details are sketchy at present but a large part of the app will be a text guide. I’ve been given the chapters and sub-headings https://goo.gl/7UFbDL. I believe amongst other things the sponsors also want some kind of user interactivity like questions and answers which can be answered by typing or by recording speech. They do have videos they want to include and have also talked vaguely about some kind of games.

Anyhow, for the text side of it I did think of converting the whole document to PDF and just displaying in a LiveCode browser. However a colleague seems to think that the app needs to be more bespoke and the sponsor was talking about breaking up the guide into multiple windows with a section of the guide per window. To format the text I guess I could use the htmlText property of a field.

How could I produce a card with a clickable table of contents which opens the relevant card containing the text for that section of the guide? I know one way would be to have each section on a button but is there any way to use hypertext to link to a card or any other better way?

Does anyone have any thoughts or experiences they could share on that specific question or on the app design in general?

Many thanks,
Jim

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10323
Joined: Wed May 06, 2009 2:28 pm

Re: Document viewer app with extras

Post by dunbarx » Wed Jul 13, 2016 11:20 pm

Hi.

Your query part is the easy part. Make a stack with a few cards. Name each card with whatever. Take those names and place them, one per line, in a (locked) list field. In the field script:

Code: Select all

on mouseUp
   go cd the selectedText
  -- go cd the value of the selectedLine --another way
   --go cd the value of the clickLine --yet another way
end mouseUp
Craig Newman

jim1001
Posts: 143
Joined: Fri Jan 29, 2016 6:25 pm

Re: Document viewer app with extras

Post by jim1001 » Thu Jul 14, 2016 11:18 am

Thank you Craig.

It's not such a silly idea then to write a custom doc viewer in LiveCode in this case. It's good to get reassurance. I'll have a go with the list field as you suggest.

Best wishes,
Jim

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Document viewer app with extras

Post by jacque » Thu Jul 14, 2016 6:55 pm

I'd avoid PDFs though, you'll have far more control when displaying text in a LC field. Styled text isn't a problem and you can include links within the text to navigate elsewhere if you like, both to in-stack locations or to a web URL. I'd break up the text as planned and dump each section into a field on a card. With proper card naming, you can use dunbarx's suggestion to navigate in the TOC.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jim1001
Posts: 143
Joined: Fri Jan 29, 2016 6:25 pm

Re: Document viewer app with extras

Post by jim1001 » Fri Jul 15, 2016 10:51 am

Thanks Jacque for sharing your expertise again - very good of you. Your comments are valuable to me. I've been working on what dunbarx and you have suggested and it's coming along nicely.

Best wishes,
Jim

Post Reply