forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with %cc + %ew

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
EKruck



Joined: 09 Jan 2010
Posts: 224
Location: Aalen, Germany

PostPosted: Thu Sep 22, 2016 3:24 pm    Post subject: Problem with %cc + %ew Reply with quote

Using both lines
Code:
    MA = WINIO@ ('%cc&', CB_EXIT)
    MA = WINIO@ ('%ew&', CB_EXIT)

my program provides after closing an error window with
" Attempt to call winio at program exit "
If I use only one of these lines - regardless which one - to program closes correct.
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Thu Sep 22, 2016 5:36 pm    Post subject: Reply with quote

Erwin,

You must retain the return path, otherwise MA (which I suspect is a local variable) may have disappeared.

The way to do this is to SAVE MA, or put it in a COMMON block. Global SAVEs work too ...

Eddie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Sep 26, 2016 9:32 am    Post subject: Reply with quote

Erwin

Has this issue been resolved?

Here is my test program that runs within failure.

Code:
integer ma,winio@
integer,external::cb_exit
ma = winio@('%bt[OK]&')
ma = winio@('%cc&',cb_exit)
ma = winio@('%ew',cb_exit)
end

integer function cb_exit()
cb_exit = 0
end
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Mon Sep 26, 2016 9:55 am    Post subject: Reply with quote

Paul,

'within' failure? What does that mean?

Putting it in a main program means that the return path to MA isn't lost. If you spread your Clearwin+ WINIO@s across several routines, then you get the error.

Now how did I discover that? (Memory cogs whirr) Aha! You told me!

This is a clear example where the simplified test program works but the big program is liable to fail.

Eddie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Sep 26, 2016 10:12 am    Post subject: Reply with quote

Eddie

'within' is just Monday morning typing for 'without'!

Do you have a short program that fails?
Back to top
View user's profile Send private message AIM Address
EKruck



Joined: 09 Jan 2010
Posts: 224
Location: Aalen, Germany

PostPosted: Mon Sep 26, 2016 11:15 am    Post subject: Reply with quote

Paul,
I made a small example, but it works fine.
If there is no %ew, the user has to close the program before shutting down.
That's my solution now.


For the know-all: MA is in a module.
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Mon Sep 26, 2016 11:49 am    Post subject: Reply with quote

Paul,

I can't get a short program to fail, nor can I find the original forum post where you provided the helpful advice.

My program first affected works with global SAVE, and not without, later programs reflect the knowledge gained and only save the WINIO@ return variable (and they work too). I haven't tried it with a module.

As for Erwin's solution, you can always make things work by taking out the bits that cause you bother, but it doesn't help when the user shuts down windows at the end of a long day before saving their data, I know that much

Eddie.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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