Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #2207

Re: Vulcan build 208

From E®!k \\/!$$E® <nospam@nospam.url>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Vulcan build 208
Date 2011-10-08 14:16 +0200
Message-ID <9fat9lFh9rU1@mid.individual.net> (permalink)
References (4 earlier) <j6k6qo$kir$1@speranza.aioe.org> <9f5p04Fj00U1@mid.individual.net> <j6kecb$9lh$1@speranza.aioe.org> <9f673eFddrU1@mid.individual.net> <4e8f0494$0$788$58c7af7e@news.kabelfoon.nl>

Show all headers | View raw


Hi Marc,

I can recall he mentioned this, as most win32 API functions work this way. 
But if my memory is right, he was not to happy about this.
And of all the sesionmaterial I have collected, this one lacks.

Anyway, Rod for shure has influenced my programming in several ways!

Erik





"Marc Verkade [Marti]"  schreef in bericht 
news:4e8f0494$0$788$58c7af7e@news.kabelfoon.nl...

I can remember this session too, but he said:
- every method should return an integer, 0 if succeeded and other
numbers/defies to identify errors
Gr, marc

"E®!k \/!$$E®"  schreef in bericht news:9f673eFddrU1@mid.individual.net...

Willie,

> Yes this would exit and log the error. The error handling that I do at
> the method level is designed to catch and recover when I can. But if 
> something comes up that I had not anticipated, I will at least get a log 
> that I can see when the problem is located.

Sure, and IMO that is a good strategy.
But it does not help Dick, where he is able in VO to hook in his own
errorhandler.

I have taken my lesson from good 'old'  Rod da Silva, i think it was on a
conference at the end of the previous century, where he showed us a coding
framework for code that could not crash. It was used for writing services,
but very usefull for ordinairy apps as well.
He gave us some very practical rules of thumb.
- the number of rows of code in a method should not exceed the max. visible
on a screen. If there are more rows, split up.
- every method should have a begin-recover-end sequence inside  ( something
that can be implemented very easy using UDC's )
- every method should return a boolean, true if succeeded and false
otherwise.
- if you need another value, pass a parameter by reference.

I have used this for many years and am very happy with this.
But unlike me, writing several new (smaller) app's each year, Dick has a
major large application, born in VO 1.0 and extended over the years.
Not an easy task to rewirte it with new coding principles.


Erik




"E®!k \/!$$E®"  wrote in message news:9f5p04Fj00U1@mid.individual.net...

Willie,

In this scenario, your app will always close after an error, or am I
mistaken?
Not very usefull IMO.

Erik




"Willie Moore"  schreef in bericht news:j6k6qo$kir$1@speranza.aioe.org...

Dick,

I am not sure where you got the idea that you cant have a general error
handler. I use the framework below in the start of all of my winforms app. I
have a slightly different one for my WPF apps but both use the same error
logging routine. Error handling is handled a bit differently from VO but in
my opinion, it is a better system. In my methods, I use local handlers (try
catch blocks) to catch and handle things that are specific to that method.
If an exception happens, dotNet first looks for a local errorblock. If it
does not find one it then looks at the next method up the call stack for a
handler that can handle the exception. If it reaches the root of the
application without finding a block then you get a error box that looks a
lot like VO's.  By adding the try block in my start function I can catch and
log the errors.

As far as the other points. I structure my apps so all of the projects in my
solution output to the same directory. I rarely touch my base libraries so I
don’t compile them unless I make a change. I do the same with my GUI. I
separate all of my GUI forms into their own assembly. In my exe I subclass
each form and add my event handlers to the subclass just like I did in VO.
One of the nice things about Visual Studio is that you can have different
settings for different config tasks (ie debug, staging, release, etc). In
debug I don’t recompile everything but in release I do so all of the DLLs go
out with the same datetime stamp.

Regards,
Willie

GLOBAL goSysInfo As SysInfo

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread] ;
FUNCTION Start() AS VOID
    LOCAL oShell    AS ShellWindow
    LOCAL lRunApp   AS Logic
   TRY
       SetupRightSLE()
       Application.EnableVisualStyles()
       Application.SetCompatibleTextRenderingDefault( false )
       oShell   := ShellWindow{}
       lRunApp  := oShell:Start()
       IF lRunApp
        Application.Run( oShell )
       ENDIF
   CATCH ex as System.Exception
        LOCAL oLog  as ErrorLog
        oLog    := Errorlog{}
        oLog:DumpException(ex)
        MessageBox.Show(ex:ToString())
   END TRY
   RETURN
FUNCTION SetupRightSLE() AS VOID
    rightSLE.DefaultSelectionOnFocus    := focusBehavior.All
    RightSLE.DefaultProcessEnter        := KeyHandling.Process
    RightSLE.DefaultProcessArrow        := KeyHandling.Process
    RightSLE.DefaultOverwrite           := OverwriteBehavior.Never
    RETURN 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Vulcan build 208 "Willie Moore" <williem@wmconsulting.com> - 2011-09-30 14:01 -0500
  Re: Vulcan build 208 D.J.W. van Kooten <public@ic2remove.this.com> - 2011-10-04 09:59 +0200
    Re: Vulcan build 208 "Willie Moore" <williem@wmconsulting.com> - 2011-10-05 19:34 -0500
      Re: Vulcan build 208 D.J.W. van Kooten <public@ic2remove.this.com> - 2011-10-06 09:09 +0200
        Re: Vulcan build 208 Johan Nel <johan.nel@xsinet.co.za> - 2011-10-06 00:35 -0700
          Re: Vulcan build 208 D.J.W. van Kooten <public@ic2remove.this.com> - 2011-10-06 11:33 +0200
            Re: Vulcan build 208 Johan Nel <johan.nel@xsinet.co.za> - 2011-10-06 03:51 -0700
              Re: Vulcan build 208 D.J.W. van Kooten <public@ic2remove.this.com> - 2011-10-06 13:28 +0200
              Re: Vulcan build 208 E®!k \\/!$$E® <nospam@nospam.url> - 2011-10-06 15:28 +0200
            Re: Vulcan build 208 "Ginny Caughey" <ginny.online@hotmail.com> - 2011-10-06 08:08 -0400
              Re: Vulcan build 208 "Willie Moore" <williem@wmconsulting.com> - 2011-10-06 07:47 -0500
              Re: Vulcan build 208 D.J.W. van Kooten <public@ic2remove.this.com> - 2011-10-06 17:03 +0200
                Re: Vulcan build 208 "Ginny Caughey" <ginny.online@hotmail.com> - 2011-10-07 08:27 -0400
                Re: Vulcan build 208 "Willie Moore" <williem@wmconsulting.com> - 2011-10-07 08:51 -0500
                Re: Vulcan build 208 Dieter <support@visualobjects.de> - 2011-10-08 16:01 -0700
                Re: Vulcan build 208 "Willie Moore" <williem@wmconsulting.com> - 2011-10-09 10:11 -0500
                Re: Vulcan build 208 D.J.W. van Kooten <public@ic2remove.this.com> - 2011-10-07 16:47 +0200
        Re: Vulcan build 208 "Dirk (Belgium)" <dirk.dot.herijgers@pbprojects.dot.be> - 2011-10-06 07:36 +0000
          Re: Vulcan build 208 D.J.W. van Kooten <public@ic2remove.this.com> - 2011-10-06 11:48 +0200
        Re: Vulcan build 208 "Willie Moore" <williem@wmconsulting.com> - 2011-10-06 07:27 -0500
          Re: Vulcan build 208 E®!k \\/!$$E® <nospam@nospam.url> - 2011-10-06 15:32 +0200
            Re: Vulcan build 208 "Willie Moore" <williem@wmconsulting.com> - 2011-10-06 09:36 -0500
              Re: Vulcan build 208 E®!k \\/!$$E® <nospam@nospam.url> - 2011-10-06 19:33 +0200
                Re: Vulcan build 208 "Willie Moore" <williem@wmconsulting.com> - 2011-10-06 14:09 -0500
                Re: Vulcan build 208 Massimo Bighelli <info@arcasistemi.it> - 2011-10-06 22:57 +0200
                Re: Vulcan build 208 Karl Faller <k.faller_withoutthat_@onlinehome.de> - 2011-10-06 23:39 +0200
                Re: Vulcan build 208 E®!k \\/!$$E® <nospam@nospam.url> - 2011-10-07 14:46 +0200
                Re: Vulcan build 208 Massimo Bighelli <info@arcasistemi.it> - 2011-10-08 14:51 +0200
                Re: Vulcan build 208 D.J.W. van Kooten <public@ic2remove.this.com> - 2011-10-07 12:04 +0200
                Re: Vulcan build 208 "Marc Verkade [Marti]" <marcatm@rti.nl> - 2011-10-07 15:52 +0200
                Re: Vulcan build 208 E®!k \\/!$$E® <nospam@nospam.url> - 2011-10-08 14:16 +0200
          Re: Vulcan build 208 D.J.W. van Kooten <public@ic2remove.this.com> - 2011-10-06 17:15 +0200
            Re: Vulcan build 208 Karl Faller <k.faller_withoutthat_@onlinehome.de> - 2011-10-06 19:07 +0200
              Re: Vulcan build 208 D.J.W. van Kooten <public@ic2remove.this.com> - 2011-10-07 12:03 +0200
                Re: Vulcan build 208 Karl Faller <k.faller_withoutthat_@onlinehome.de> - 2011-10-07 14:41 +0200
                Re: Vulcan build 208 D.J.W. van Kooten <public@ic2remove.this.com> - 2011-10-07 17:03 +0200
                Re: Vulcan build 208 Karl Faller <k.faller_withoutthat_@onlinehome.de> - 2011-10-07 17:26 +0200
                Re: Vulcan build 208 Richard Wooters <Richard@rbj.com> - 2011-10-07 09:08 -0700
        Re: Vulcan build 208 Dieter <support@visualobjects.de> - 2011-10-06 16:13 -0700
          Re: Vulcan build 208 "Jamal" <vodotnet_nospam@yahoo.com> - 2011-10-08 17:51 -0400
            Re: Vulcan build 208 Dieter <support@visualobjects.de> - 2011-10-08 15:42 -0700
        Re: Vulcan build 208 Dieter <support@visualobjects.de> - 2011-10-06 16:41 -0700
          Re: Vulcan build 208 D.J.W. van Kooten <public@ic2remove.this.com> - 2011-10-07 11:58 +0200
  Re: Vulcan build 208 info@softwareobjectives.com.au - 2011-10-04 02:47 -0700
    Re: Vulcan build 208 E®!k \\/!$$E® <nospam@nospam.url> - 2011-10-04 12:03 +0200

csiph-web