View previous topic :: View next topic |
Author |
Message |
Bartl
Joined: 16 Oct 2009 Posts: 58 Location: München
|
Posted: Mon Oct 29, 2012 8:30 pm Post subject: |
|
|
Hi Eddi,
a very good solution, thank you.
It seems that all my ideas can be realized.
Johann |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Mon Nov 05, 2012 8:50 pm Post subject: |
|
|
jalih: good job, and by the way your clock is nice advertisement for Clearwin. As well as the source text is the best school by learning on examples. I remember how 20 years ago i was jealous when my colleague among scientific works was also programming nice looking Rolex watch with crystals using Pascal while i with my Fortran couldn't even think about something like this. |
|
Back to top |
|
|
Bartl
Joined: 16 Oct 2009 Posts: 58 Location: München
|
Posted: Tue Nov 06, 2012 8:04 am Post subject: |
|
|
Hi,
I only can agree.
I was surprised about the simple code for the clock, it’s a very good example and a great help for further developments.
For me simple examples are the greatest help.
Thank you.
Johann |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Tue Nov 06, 2012 9:21 am Post subject: |
|
|
I have had a quick look at the "Test für Grafikausgabe" sample which I agree is very useful.
A minor correction is that the call to select_graphics_region@ would be suspect if it were not redundant. The handle should be set before calling winio@ with %gr otherwise it will use the random value that the handle has at that point (which may well be zero). As you probably know already, with only one graphics region, you don't need to provide the handle - ClearWin+ sets it to -1 internally.
It is interesting to note that you can draw to the graphics region before completing the winio@ statements. In all these years I have never tried or thought of doing that! |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Thu Nov 08, 2012 9:02 pm Post subject: |
|
|
I remember writing in a thread "When is a handle not a handle?" about the difference between the functions that RETURN a handle, and the functions that need a handle TO BE SUPPLIED. Paul's note reminds me that this distinction is somewhat blurred, as %gr operates perfectly adequately without a user-supplied handle if there is only one %gr, but really needs user-supplied handles if there is more than one %gr.
I suppose that it never hurts to give a handle an initial value!
Eddie |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Fri Nov 09, 2012 10:23 am Post subject: |
|
|
I suppose not since, if the system returns a value then the value you supply will simply be overwritten. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Fri Nov 09, 2012 11:43 am Post subject: |
|
|
... but you could get in a muddle if you assumed the user-supplied value still applied!
E |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Fri Nov 09, 2012 12:37 pm Post subject: |
|
|
Yes, either way you need to pass a reference to the handle as a variable and use this variable consistently. |
|
Back to top |
|
|
|