Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Event-Driven Console? (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Debug Console App?
Next thread: [ANN] MKS Plugin 3.0


Re: How to implement automatic updates?   -   Garth Hjelte
  Event-Driven Console?   -   wagnerj proaxis.com
   Re: Event-Driven Console?   -   Jim Wagner
   Re: Event-Driven Console?   -   Andrew Keller

Event-Driven Console?
Date: 05.08.11 00:39 (Thu, 4 Aug 2011 16:39:20 -0700 (PDT))
From: wagnerj proaxis.com
Using RS 2010 R4.1....

When I start up a new project, one of the options is "Event-Driven
Console". Can't find any documentation on that. What is it?

Thanks
Jim Wagner
Oregon Research Electronics

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Event-Driven Console?
Date: 05.08.11 16:05 (Fri, 5 Aug 2011 08:05:43 -0700)
From: Jim Wagner

On Aug 5, 2011, at 6:41 AM, Andrew Keller wrote:

> On Aug 4, 2011, at 7:39 PM, <email address removed> wrote:
>
>> When I start up a new project, one of the options is "Event-Driven
>> Console". Can't find any documentation on that. What is it?
>
> In a desktop or web application, we say that the structure of the
> code is event driven, because your code runs when events get fired.
>
> In a console application, although there is a Run event, and it does
> fire, the structure of the code is not event driven. The Run event
> is, for all practical purposes, just a method that gets called when
> the app starts up. Nothing more. The app shuts down when the
> method ends. This has the advantage of simplicity -
> algorithmically, it's the same as a program written in C.
>
> However, without being event driven, you lose some features of RB.
> For example, Timers and Sockets are known to require an event driven
> code structure, due to the way they are implemented.
>
> The Event-Driven Console template is simply a console application
> with an event handling loop in the Run event.
>
> It's easy enough to create your own event loop in a console app,
> however if you don't know how or don't care to do it yourself, the
> Event-Driven Console template is useful.
>
> ~ Andrew Keller
>

Thanks, Andrew

Jim

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Event-Driven Console?
Date: 05.08.11 14:41 (Fri, 5 Aug 2011 09:41:58 -0400)
From: Andrew Keller
On Aug 4, 2011, at 7:39 PM, <email address removed> wrote:

> When I start up a new project, one of the options is "Event-Driven Console". Can't find any documentation on that. What is it?

In a desktop or web application, we say that the structure of the code is event driven, because your code runs when events get fired.

In a console application, although there is a Run event, and it does fire, the structure of the code is not event driven. The Run event is, for all practical purposes, just a method that gets called when the app starts up. Nothing more. The app shuts down when the method ends. This has the advantage of simplicity - algorithmically, it's the same as a program written in C.

However, without being event driven, you lose some features of RB. For example, Timers and Sockets are known to require an event driven code structure, due to the way they are implemented.

The Event-Driven Console template is simply a console application with an event handling loop in the Run event.

It's easy enough to create your own event loop in a console app, however if you don't know how or don't care to do it yourself, the Event-Driven Console template is useful.

~ Andrew Keller

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>