|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
stenlou
Joined: 24 Jun 2008 Posts: 30 Location: Germany and Denmark
|
Posted: Sat Jan 17, 2015 7:50 pm Post subject: error when closing program without closing graphic windows f |
|
|
When I open more than one graphic window in a program and then close the program without first closing the graphic windows first, then I get an error. With one graphic window there is no problems.
I am using Simpleplot.
Sten |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Sun Jan 18, 2015 9:36 am Post subject: |
|
|
Can you post a short program that illustrates the problem? |
|
Back to top |
|
|
stenlou
Joined: 24 Jun 2008 Posts: 30 Location: Germany and Denmark
|
Posted: Sun Jan 18, 2015 6:54 pm Post subject: |
|
|
first this
ij=WINIO@('%sy[no_border]%ca[2D Plot]&')
cc ij=winio@('%pv&')
cc ij=winio@('%ww[casts_shadow]&')
ij=winio@('%pl[user_drawn]&',800L,700L)
c ij=winio@('%^gr[user_resize]&',200L,200L,start_plot)
cc c ij=winio@('%ww%pv%^gr[user_resize]',200,200,start_plot) ! try this
c ij=winio@('%gr[metafile_resize]&')
c ij=winio@('%ww[casts_shadow]&')
c ij=winio@('%pv&')
ij=winio@('%sc&',start_plot)
ij=winio@('%pv&')
ij=winio@('%ww[casts_shadow]&')
ij=winio@('%lw',control)
goto 300
Then in start plot
integer*4
* start_plot,
* i4
C
c------------------------------------------------------------------------------
c
c S T A R T P R O G R A M
c x_min=00.0
c x_max=500.0
x_axis_text='Illite %'
y_axis_text='Depth (M)'
plot_title='Smectite-Illite transformation'
x_axis_scale=1
y_axis_scale=1
symbol=2
symbol_colour=2
ccc CALL DEVNo(5360)
cc CALL DEVNo(5365)
c
c find the x and y range
c
call limexc (plt_X,points_to_plot,x_min,x_max)
call limexc (plt_Y,points_to_plot,y_min,y_max)
call page (500.0,500.0)
call chset (-11)
call newpag
call newpic
call pen (1) ! black
call textsz(0.1)
c call axlbgp ('XC',0)
c call axlbgp ('YC',0)
cc call axlbjs ('CX','D')
cc call kscale (x_min,x_max,1.0,plt_x_min,plt_x_max,x_div)
x_min=0
x_max=1.0
call kscale (x_min,x_max,1.0,plt_x_min,plt_x_max,x_div)
call kscale (y_min,y_max,1.0,plt_y_min,plt_y_max,y_div)
c call axclr ('XC',11)
call scales
* (x_min,x_max,x_axis_scale,
c * y_min,y_max,y_axis_scale)
* y_max,y_min,y_axis_scale)
call axgrid ('*cartesian',1,-1)
call axlocn ('xcartesian','P')
call axlocn ('ycartesian','P')
call axlblv ('XC',2) ! axis label between major divisions
call axlbjs ('XC','C')
call axes7(x_axis_text,y_axis_text)
call title7 ('Higher','Centre',plot_title)
call mksize (0.05)
call pen (symbol_colour)
call markcv (plt_X,plt_Y,points_to_plot,symbol,1)
c if (plot_title(1:.ne.'Pressure') goto 100
if (Number_of_calibration_data_points.eq.0) goto 100
call pen ((symbol_colour+2))
symbol=3
call mksize (0.
call markcv (plt_ctrl_x,plt_ctrl_y,points_to_plot,symbol,1)
c call markcv (plt_ob,plt_y,points_to_plot,(symbol+1),1)
c call pen ((symbol_colour+2))
c call markcv (plt_lot,plt_y,points_to_plot,(symbol+2),1)
100 call pen (1) ! black
call brknbx(x_min,y_min,
* x_max,y_max,
* -1)
call endplt
call simpleplot_redraw@ ! this line is eccential for plotting
goto 900
c
c i4=winio@('%sp&',750,350)
c i4=winio@('%ca[Input data]%bg[white]&')
i4=winio@('%ww%pv')
The problem is probably something with windows not closing when main programs is closed
Sten |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Sun Jan 18, 2015 8:55 pm Post subject: |
|
|
What is the error report?
You can get an error with a control variable for %lw if the program is not constructed correctly. See the documentation for %lw. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Mon Jan 19, 2015 2:00 pm Post subject: |
|
|
When you use %lw you are modifying a dialog box into a window that has a life of its own, and must therefore be shut down separately on exit. Obviously this can be done through the control variable, but this variable must exist via a mechanism such as COMMON or the appropriate structure of MODULE and USE.
Shutting down the main window can be done by a variety of means (menu, button, system menu etc) and all means of closure must be covered, which is why there is a %cc control to bring all of them to the same point.
As well as shutting down those independent windows, you may also wish to give the user the opportunity to save their dataset. Moreover, if the user decides to exit Windows, the existence of your independent ones will make the process more complicated and require user interaction, so you also have the %ew format code to bring your program to the point where it shuts down all the windows you created.
Eddie |
|
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
|