home *** CD-ROM | disk | FTP | other *** search
- Upgrading applications which use previous versions of DrWimp to the latest
- version.
-
- If you have never used previous versions of DrWimp then ignore this file.
-
- You may think like I do that if an application is not going to be developed
- further significantly then you are probably better leaving it alone.
-
- Check which version you are using for the application, go down to the
- relevent point, then make all the modifications detailed from then on.
- Running your application without making every single modification all the
- way to the end will probably result in a failure.
-
- All this is from the top of my head with the aid of the History file,
- !RunImage and !Fnc'n'Prc. I don't think there is any mistakes or omissions,
- but please let me know if you find any.
-
- Notes:
-
- Making the changes will just ensure that your application works with the
- latest version. Checking the History file could reveal new features which
- have been added which could replace a lot of your code or improve various
- areas.
-
- Not every version is listed here. Only the ones where changes need to be
- made and the current version to reassure you that there is nothing further.
-
- I *strongly* advise that you don't attempt this on your only copy!
-
-
- 1.01 (04-Apr-95)
-
- There is an extra parameter added to FNwimp_createmenu. As dynamic menus
- were introduced in this version your application won't be using them so
- change all occurances of FNwimp_createmenu(<string>) to
- FNwimp_createmenu(<string>,0)
-
- FNwimp_iconbar now returns the handle for the iconbar window (-2). So your
- call should look like bar%=FNwimp_iconbar(......, and use window%=bar% in
- PROCuser_mouseclick or a similar construct for detecting clicks on the
- iconbar icon.
-
-
- 1.02 (19-Apr-95)
-
- Remove the last parameter to FNwimp_initialise.
-
-
- 1.03 (26-Apr-95)
-
- Add a fourth parameter to FNwimp_initalise which is the minimum RISC OS
- version that you will allow your application to run on multiplied by 100.
- Eg: make the fourth parameter 200 for RISC OS 2 and 310 for RISC OS 3.10.
-
-
- 1.10 (24-Dec-95)
-
- Add the new user function to !RunImage:
-
- DEF PROCuser_menuopen(menu%,icon%)
- ENDPROC
-
- (PROCuser_minmenuwidth was also added in this version but removed in a
- later version)
-
-
- 2.00 (02-Jul-96)
-
- Add the following new user functions to !RunImage:
-
- DEF FNuser_saveicon(window%)
- =0
- :
- DEF FNuser_sliderback(window%,icon%)
- =-1
- :
- DEF FNuser_slider(window%,icon%)
- =-1
- :
- DEF PROCuser_slidervalue(window%,icon%,pcent%)
- ENDPROC
-
- Change (in !RunImage):
-
- DEF PROCuser_savedata(path$,window%)
- ...
- ENDPROC
-
- to
-
- DEF FNuser_savedata(path$,window%)
- ...
- =1
-
- Remove the redundant FNuser_minmenuwidth (if you have it).
-
- I would recommend that you change the way your menus are created if you
- want to compress your BASIC files. Here is an example:
-
- menu%=FNwimp_createmenu("Main menu/Item 1>sub%/Item 2/Item 3>window%",0)
-
- changes to
-
- menu%=FNwimp_createmenu("Main menu/Item 1/Item 2/Item 3",0)
- PROCwimp_attachsubmenu(menu%,1,sub%)
- PROCwimp_attachsubmenu(menu%,3,window%)
-
-
- 2.03 (15-Oct-96)
-
- Add the new user function to !RunImage:
-
- DEF PROCuser_modechange
- ENDPROC
-
-
- 2.04 (20-Oct-96)
-
- Add the new user function to !RunImage:
-
- DEF FNuser_menuhelp(menu%,item%)
- =""
-
-
- 2.06 (25-Nov-96)
-
- Change all occurances of the following in !RunImage:
-
- PROCwimp_bar(window%,icon%,length%)
-
- to
-
- PROCwimp_bar(window%,icon%,length%,0)
-
-
- 2.11 (08-Apr-97)
-
- No changes are required.
-
-
- 3.00 (31-May-97)
-
- Add the new user functions to !RunImage:
-
- DEF PROCuser_declarefonts
- ENDPROC
- :
- DEF PROCuser_print(xmin%,ymin%,xmax%,ymax%,page%)
- ENDPROC
- :
- DEF FNuser_printing(copy%,page%,totpages%,pagepos%)
- =0
- :
- DEF PROCuser_printerchange
- ENDPROC
-
- Change the following user function in !RunImage:
-
- DEF FNuser_saveicon(window%)
- =0
-
- to:
-
- DEF PROCuser_saveicon(window%,RETURN drag%,RETURN write%,RETURN ok%)
- ENDPROC
-
- If you have used this function to change the icon to drag then a general
- example of the change you need to make is:
-
- DEF FNuser_saveicon(window%)
- IF window%=save% =3
- =0
-
- to:
-
- DEF PROCuser_saveicon(window%,RETURN drag%,RETURN write%,RETURN ok%)
- IF window%=save% drag%=3
- ENDPROC
-
- Change occurances of the following in !RunImage:
-
- window%=FNwimp_loadwindow(path$,window$,1)
-
- to:
-
- window%=FNwimp_loadwindow(path$,window$,0)
-
- If you have used sprite areas in the application you are upgrading, then
- the following changes need to be made. From this version onwards sprite
- areas have handles, and in the following changes, the handle is called
- "sprites%" but you may use whatever name you wish. a% is an arbitary
- variable.
-
- Change occurances of the following in !RunImage:
-
- PROCwimp_loadsprites(path$)
-
- to:
-
- a%=FNwimp_loadsprites(path$,sprites%)
-
- and occurances of:
-
- PROCwimp_pointer(pointer%,1,pointer$)
-
- to:
-
- PROCwimp_pointer(pointer%,sprites%,pointer$)
-
- and occurances of:
-
- window%=FNwimp_loadwindow(path$,window$,0)
-
- to:
-
- window%=FNwimp_loadwindow(path$,window$,sprites%)
-
- If you are displaying drawfiles in windows in the application that is
- being updated, then the following change needs to be made.
- In previous versions of DrWimp, drawfiles were placed with the top left
- corner of the drawfile at the work area coordinates specified. From this
- version onwards, it is the bottom left corner that is positioned at these
- coordinates. It is best to recalculate your coordinates for the positioning
- of the drawfile, rather than waste time using the DrWimp functions to
- calculate them for you from the width and height of the drawfile.
-
- If you create any menus where you attach the submenu at the same time by
- using '>', like the following line, then it needs to be changed. For
- example:
-
- menu%=FNwimp_createmenu("Main menu/Item 1>sub%/Item 2/Item 3>window%",0)
-
- changes to:
-
- menu%=FNwimp_createmenu("Main menu/Item 1/Item 2/Item 3",0)
- PROCwimp_attachsubmenu(menu%,1,sub%)
- PROCwimp_attachsubmenu(menu%,3,window%)
-
- This also applies to PROCwimp_putmenuitem, PROCwimp_recreatemenu,
- FNwimp_createmenuarray and PROCwimp_recreatemenuarray.
-
- Change in !RunImage:
-
- DEF PROCuser_redraw(window%,minx%,miny%,maxx%,maxy%)
- ...
- ENDPROC
-
- to:
-
- DEF PROCuser_redraw(window%,minx%,miny%,maxx%,maxy%,printing%,page%)
- ...
- ENDPROC
-
- and:
-
- DEF FNuser_loaddata(path$,window%,icon%,ftype$)
- ...
- =0
-
- to:
-
- DEF FNuser_loaddata(path$,window%,icon%,ftype$,workx%,worky%)
- ...
- =0
-
- and:
-
- DEF PROCuser_mouseclick(window%,icon%,button%)
- ...
- ENDPROC
-
- to:
-
- DEF PROCuser_mouseclick(window%,icon%,button%,workx%,worky%)
- ...
- ENDPROC
-
-
- EOF
-