|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7927 Location: Salford, UK
|
Posted: Tue Dec 03, 2019 7:54 am Post subject: |
|
|
It's good that it is now working for you although it can't have anything to do with the INCLUDE files.
I was going to suggest that you try using %if. This causes the following control to have the initial focus when the Window is opened. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Wed Dec 04, 2019 10:40 am Post subject: |
|
|
A problem that appears 'out of the blue' and then disappears, equally mysteriously, after a fresh recompile is a difficult one to track down, and wastes a lot of time looking for the reason, which may never be found. From my own experience, there are at least a couple of causes that are worth checking against.
One is the use of a variable that has not been properly initialised - but it needs to be one that isn't very important, or the error may be experienced after a recompile. Another reason is when you link in a superseded version of one or more routines, usually by accident and a misspelling of a path.
However, the one that really got me some years ago and led to me writing a post entitled 'When is a handle not a handle' was a misunderstanding of what a handle is when applied to a Clearwin+ graphics area. For most controls in a Windows application that have a handle, this is allocated by Windows, and CW+ simply reports it back. CW+ graphics areas need to be provided with a handle - or did. This applies to %gr and %pl. If you assume, wrongly, that a handle is passed back, then you will get anything that resides in the handle variable when the program runs. Needless to say, this makes moving between graphics areas quite difficult, as in some cases they may even have the same value for the handle.
Paul did some work on this (see items 407 and 408 in cwplus.enh) but my bet is on this as a cause. To get a handle passed back you need to give the option [handle]. But it never hurts to assign the user-supplied handle and work that way.
Eddie |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Wed Dec 04, 2019 11:37 pm Post subject: |
|
|
Paul wrote:
Quote: | "error 904 - Return type is expected" appears because the interface for SENDMESSAGE has already been provided (in the INCLUDE file). |
I know Dan in his highly meritsble quest for 'real english' and meaningful error reporting will be wanting to know as well, but why doesn't error 904 read:-
Quote: | error 904 - interface for SENDMESSAGE included twice (in both files ****** and *****) |
and before anyone states tafo, all other reasons for his failure shoul have their own error messages too surely. _________________ ''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... " |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7927 Location: Salford, UK
|
Posted: Thu Feb 27, 2020 4:40 pm Post subject: |
|
|
The original error message described at the start of this thread has now been changed. In future you will get a warning that the routine has already been declared. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|