Export code to pdf
Moderator: Klaus
Export code to pdf
Hello all,
Something I could make a good use of, would be a "export code to pdf" option (or text..).
With everything neatly organized, like new card = new chapter, with all the controls scripts on that card in the chapter, you get to pick which chapters you export, ...
It can be a pain to open each and every control on a heavily populated card..
Yes/no, maybe? Too gadget?
Cheers,
Adrien
Something I could make a good use of, would be a "export code to pdf" option (or text..).
With everything neatly organized, like new card = new chapter, with all the controls scripts on that card in the chapter, you get to pick which chapters you export, ...
It can be a pain to open each and every control on a heavily populated card..
Yes/no, maybe? Too gadget?
Cheers,
Adrien
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Export code to pdf
LC includes a PDF print external, so if you really want this you could have it this afternoon with a little bit of work.
But I'm curious: What would you do with the PDF?
But I'm curious: What would you do with the PDF?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Export code to pdf
I suppose the OP just wants to be able to create a complete report of all scripts, to peruse and reference at leisure.
But as Richard points out, you likely want this in a format that satisfies your own style. The best way to do that is to write your own.
Craig Newman
But as Richard points out, you likely want this in a format that satisfies your own style. The best way to do that is to write your own.
Craig Newman
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Export code to pdf
I guess I'm poking around the edges of another question: what if we had a tool that made is just as leisurely to read scripts in place?dunbarx wrote:I suppose the OP just wants to be able to create a complete report of all scripts, to peruse and reference at leisure.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Export code to pdf
All,
The uses I would have for such a pdf include but are not limited to:
- working on the algorythms when I'm on the move (printed out or not..)
- print some sheets, lay some on a big table, pin others to the wall, draw on them, ..
- share algorythms and logic with LC-less advisors or techs
- have a clearer view on the relationships between controls and cards (solopreuneur's budget and 15" laptop screen)
- ..
Having an option in some LC drop-down menu would be a fast (maybe furious) way to get that done on command!
I haven't explored the marvelous world of LC externals yet, I was just dropping the idea in there
Cheers,
Adrien
edit: and yes, the focus point would be on having everything neatly, logically organized and also being able to pick exactly what you need, like "everything on that stack", "that card and all of its controls", "every handler with x y conditions in that stack", ...
The uses I would have for such a pdf include but are not limited to:
- working on the algorythms when I'm on the move (printed out or not..)
- print some sheets, lay some on a big table, pin others to the wall, draw on them, ..
- share algorythms and logic with LC-less advisors or techs
- have a clearer view on the relationships between controls and cards (solopreuneur's budget and 15" laptop screen)
- ..
Having an option in some LC drop-down menu would be a fast (maybe furious) way to get that done on command!
I haven't explored the marvelous world of LC externals yet, I was just dropping the idea in there

Cheers,
Adrien
edit: and yes, the focus point would be on having everything neatly, logically organized and also being able to pick exactly what you need, like "everything on that stack", "that card and all of its controls", "every handler with x y conditions in that stack", ...
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Export code to pdf
Excellent list - thanks.Adrien wrote:All,
The uses I would have for such a pdf include but are not limited to:
- working on the algorythms when I'm on the move (printed out or not..)
- print some sheets, lay some on a big table, pin others to the wall, draw on them, ..
- share algorythms and logic with LC-less advisors or techs
- have a clearer view on the relationships between controls and cards (solopreuneur's budget and 15" laptop screen)
I have some code review tools in progress which may help some day, but they're in a very early stage at this time. One of the things that holds me back from finishing them is that aside from a few things I very rarely use I've found the Project Browser very satisfying, providing a nicely nested view of objects with quick access to not only their own scripts but also any behavior scripts they may use. When I find a particularly complex script I can print that, but most of the time I find perusing things in the PB very useful, esp. since my code sometimes changes frequently, so any printout I made last week won't represent what I'm working with this week.
Have you explored the Project Browser?
Would other export formats like RTF and/or HTML be useful for sharing with others?
Would it be useful to share hypermedia representations of the code in a free application that could be easily shared with others? There may be some nice things we can do easily in LC which may be more difficult to do in HTML or PDF.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Export code to pdf
Do you mean - like a graphical layout of the code? Would this be similar to a database representation with controls (within cards) instead of tables and handler messages instead of relations?FourthWorld wrote:share hypermedia representations of the code
I've been using the project / application browsers yeah, but some of my cards are really heavily populated, some of my logic can be confusing after some time (and yes, I do comment my code), hence the idea of a 1-clic 1-ask export.
And my application browser got SWARMED with "revidelibrary", "revMenuBar", "revprintlibrary", "reveverythingaboutthisworld" and so on, no idea how so, why so, and how to get back to only see my own stacks.
Cheers,
Adrien
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Export code to pdf
That would be cool, and there are algos for those sorts of graph diagrams. That's beyond the scope of what I'm working on now, but perhaps down the road it would be nice to add. For now I'm working on a simple tree view, though it will include Calls In and Calls Out, with popup lists of where those calls originate.Adrien wrote:Do you mean - like a graphical layout of the code? Would this be similar to a database representation with controls (within cards) instead of tables and handler messages instead of relations?FourthWorld wrote:share hypermedia representations of the code
That's governed by a Preferences setting - in Prefs see the "General" section, and uncheck the checkbox labeled "LiveCode UI elements appear in lists of stacks".And my application browser got SWARMED with "revidelibrary", "revMenuBar", "revprintlibrary", "reveverythingaboutthisworld" and so on, no idea how so, why so, and how to get back to only see my own stacks.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Export code to pdf
Thanks, that was it.FourthWorld wrote:That's governed by a Preferences setting - in Prefs see the "General" section, and uncheck the checkbox labeled "LiveCode UI elements appear in lists of stacks".
This is also far, far away from my reach, considering my already limited time.. hence dropping the idea in the request forumFourthWorld wrote:That's beyond the scope of what I'm working on now

Cheers,
Adrien
-
- VIP Livecode Opensource Backer
- Posts: 48
- Joined: Sat May 24, 2008 2:27 pm
Re: Export code to pdf
Personally, I was hoping that something like 'Script Reporter' [ http://www.createchsol.com/ScriptReporter/ ] would do the trick - as I also desire the ability to export/print all the code for a stack, but it doesn't seem like it works with Livecode 7. Maybe someone with more knowledge than I can take a look at it and figure out what is going wrong with it.
Re: Export code to pdf
Hi Thomas,
Not sure if this will solve your problem but
Just under the switch at line 258 of stack script of Script Reporter.
Is that where it was breaking for you?
Simon
Not sure if this will solve your problem but
Code: Select all
if item 6 line i of fld Display = "" then next repeat
Is that where it was breaking for you?
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- VIP Livecode Opensource Backer
- Posts: 48
- Joined: Sat May 24, 2008 2:27 pm
Re: Export code to pdf
Just as a followup, http://forums.livecode.com/viewtopic.php?f=7&t=20797