• Appropriate to ask Turbo Vision questions here?

    From Jim Leonard@1:261/20.999 to All on Thu Dec 29 09:05:54 2011
    From: Jim Leonard <mobygamer@gmail.com>

    I know there's a Turbo Vision group, but it seems dedicated to the C
    version, and that group seems less-frequently monitored than this
    one. I ask because I'm about to actually write my first TV
    application, and wondering if I should even consider trying to ask for
    help here. I have gone through the 12-section tutorial in the BP 7 TV
    manual, including typing all the source myself, so I have a basic idea
    of how to proceed. I think my questions will fall more along the
    lines of "What is the 'Turbo Vision' way to perform this application function?".

    Along those lines, here's my first question: If everything in the TV application framework is event-based, doesn't that mean the main event
    handler could get extremely large, like several hundreds of lines
    long, with a hundred or more event handlers? And is that best
    practice, to put every event handler in a single loop, even for events
    that are only generated/handled by modal dialogs? (by "modal" I
    believe it means "grabbing focus until closed")

    Is there source code for any large TV programs (applications, not
    libraries or utilities) out in the wild that I could study? Most of
    what I poked through in Garbo and SWAG looked like library units and
    dialog designers, not actual finished TV programs.

    --- Internet Rex 2.31
    * Origin: The gateway at Omicron Theta (1:261/20.999)
  • From Marco van de Voort@1:261/20.999 to All on Thu Dec 29 17:33:07 2011
    From: Marco van de Voort <marcov@toad.stack.nl>

    On 2011-12-29, Jim Leonard <mobygamer@gmail.com> wrote:
    Along those lines, here's my first question: If everything in the TV application framework is event-based, doesn't that mean the main event handler could get extremely large, like several hundreds of lines
    long,

    No

    with a hundred or more event handlers?

    Yes :-)

    A TV form is more or less organized as a tree, (form-> container control (*)
    base component). Only the path to the focussed element get the main
    stream of events. A rarer, special "broadcast" event goes to all widgets.

    So the main event loop (also called message pump since it just pumps events from the "drivers" part to the active form, which pumps it to the controls, which pump it to their children etc.

    (*) a container control is a control that can contain other controls. A
    form (window) is also a container, but has way more logic

    And is that best
    practice, to put every event handler in a single loop, even for events
    that are only generated/handled by modal dialogs? (by "modal" I
    believe it means "grabbing focus until closed")

    Usually only focussed elements get the events, unless they are of the
    broadcast type. (which is usually stuff like "exiting, save your stuff".

    Is there source code for any large TV programs (applications, not
    libraries or utilities) out in the wild that I could study?

    The textmode IDE of Free Pascal, while it probably not compiles with turbo pascal anymore, is still close enough to study the general structure of
    larger programs. It is in FPC source archives in the directory IDE, e.g.

    ftp://ftp.freepascal.org/pub/fpc/dist/2.4.4/source/short/separate/idesrc.zip


    --- Internet Rex 2.31
    * Origin: The gateway at Omicron Theta (1:261/20.999)
  • From Jim Leonard@1:261/20.999 to All on Thu Dec 29 10:38:30 2011
    From: Jim Leonard <mobygamer@gmail.com>

    This has been helpful, thanks. I hope I won't have questions, but if
    I do, I'll ask them here.

    If you're curious, the project this is for is
    dosbenchmark.wordpress.com (a retrocomputing project, obviously).

    --- Internet Rex 2.31
    * Origin: The gateway at Omicron Theta (1:261/20.999)