Re: [fpc-pascal] Compiler Warning: Constructor should be public

2009-11-11 Thread Graeme Geldenhuys
Flávio Etrusco wrote: Graeme, I guess the OP didn't want to reintroduce the 'Create' constructor with lower visibility, just implement a second constructor with private visiblity. It can be useful when implementing singletons and factories to avoid some types of misuse by an unattentive

Re: [fpc-pascal] Any Way to catch endless loop in fpc in Wince?

2009-11-11 Thread epergola
I mean at runtime, where the app is deployed, not in the Lazarus IDE debugger. -- View this message in context: http://old.nabble.com/Any-Way-to-catch-endless-loop-in-fpc-in-Wince--tp26293620p26297681.html Sent from the Free Pascal - General mailing list archive at Nabble.com.

Re: [fpc-pascal] Any Way to catch endless loop in fpc in Wince?

2009-11-11 Thread Jonas Maebe
On 11 Nov 2009, at 00:55, epergola wrote: Is there a way (or a 3rd party component or a library) to catch an endless loop after x seconds in applications running on arm Wince? It is not possible to know whether a loop is endless or not (at least not in the general case, see the halting

Re[2]: [fpc-pascal] Any Way to catch endless loop in fpc in Wince?

2009-11-11 Thread JoshyFun
Hello FPC-Pascal, Wednesday, November 11, 2009, 10:34:09 AM, you wrote: JM It is not possible to know whether a loop is endless or not (at least JM not in the general case, see the halting problem). If you simply JM want to know whether your application has run its main loop within the JM last x

Re: [fpc-pascal] Compiler Warning: Constructor should be public

2009-11-11 Thread fpclist
On Wednesday 11 November 2009 09:22:30 Graeme Geldenhuys wrote: Flávio Etrusco wrote: Graeme, I guess the OP didn't want to reintroduce the 'Create' constructor with lower visibility, just implement a second constructor with private visiblity. It can be useful when implementing singletons

Re: [fpc-pascal] Compiler Warning: Constructor should be public

2009-11-11 Thread Anthony Walter
Of course you can't hide methods previously exposed in an inherited class. But this applies to every member type (fields, properties, methods), not just constructors. The point of a constructor is not to new up a class (NewInstance does that), but to execute a block of code (with checks) before

Re: [fpc-pascal] Compiler Warning: Constructor should be public

2009-11-11 Thread Vinzent Höfler
Graeme Geldenhuys gra...@mastermaths.co.za: A very quick and dirty solution would be to reimplement the public Create() constructor and immediately raise an exception inside it, explaining the problem. That way if any developer tries to use that default constructor, they will get an error -