home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / d / drwimp / DrWimp / Documents / Upgrading < prev   
Encoding:
Text File  |  1997-05-31  |  6.6 KB  |  280 lines

  1. Upgrading applications which use previous versions of DrWimp to the latest
  2. version.
  3.  
  4. If you have never used previous versions of DrWimp then ignore this file.
  5.  
  6. You may think like I do that if an application is not going to be developed
  7. further significantly then you are probably better leaving it alone.
  8.  
  9. Check which version you are using for the application, go down to the
  10. relevent point, then make all the modifications detailed from then on.
  11. Running your application without making every single modification all the
  12. way to the end will probably result in a failure. 
  13.  
  14. All this is from the top of my head with the aid of the History file,
  15. !RunImage and !Fnc'n'Prc. I don't think there is any mistakes or omissions,
  16. but please let me know if you find any.
  17.  
  18. Notes:
  19.  
  20. Making the changes will just ensure that your application works with the
  21. latest version. Checking the History file could reveal new features which
  22. have been added which could replace a lot of your code or improve various
  23. areas.
  24.  
  25. Not every version is listed here. Only the ones where changes need to be
  26. made and the current version to reassure you that there is nothing further.
  27.  
  28. I *strongly* advise that you don't attempt this on your only copy!
  29.  
  30.  
  31. 1.01 (04-Apr-95)
  32.  
  33.   There is an extra parameter added to FNwimp_createmenu. As dynamic menus
  34. were introduced in this version your application won't be using them so
  35. change all occurances of FNwimp_createmenu(<string>) to
  36. FNwimp_createmenu(<string>,0)
  37.  
  38.   FNwimp_iconbar now returns the handle for the iconbar window (-2). So your
  39. call should look like bar%=FNwimp_iconbar(......, and use window%=bar% in
  40. PROCuser_mouseclick or a similar construct for detecting clicks on the
  41. iconbar icon.
  42.  
  43.  
  44. 1.02 (19-Apr-95)
  45.  
  46.   Remove the last parameter to FNwimp_initialise.
  47.  
  48.  
  49. 1.03 (26-Apr-95)
  50.  
  51.   Add a fourth parameter to FNwimp_initalise which is the minimum RISC OS
  52. version that you will allow your application to run on multiplied by 100.
  53. Eg: make the fourth parameter 200 for RISC OS 2 and 310 for RISC OS 3.10.
  54.  
  55.  
  56. 1.10 (24-Dec-95)
  57.  
  58.   Add the new user function to !RunImage:
  59.  
  60.     DEF PROCuser_menuopen(menu%,icon%)
  61.     ENDPROC
  62.  
  63.   (PROCuser_minmenuwidth was also added in this version but removed in a
  64. later version)
  65.  
  66.  
  67. 2.00 (02-Jul-96)
  68.  
  69.   Add the following new user functions to !RunImage:
  70.  
  71.     DEF FNuser_saveicon(window%)
  72.     =0
  73.     :
  74.     DEF FNuser_sliderback(window%,icon%)
  75.     =-1
  76.     :
  77.     DEF FNuser_slider(window%,icon%)
  78.     =-1
  79.     :
  80.     DEF PROCuser_slidervalue(window%,icon%,pcent%)
  81.     ENDPROC
  82.  
  83.   Change (in !RunImage):
  84.  
  85.     DEF PROCuser_savedata(path$,window%)
  86.     ...
  87.     ENDPROC
  88.  
  89.   to
  90.  
  91.     DEF FNuser_savedata(path$,window%)
  92.     ...
  93.     =1
  94.  
  95.   Remove the redundant FNuser_minmenuwidth (if you have it).
  96.  
  97.   I would recommend that you change the way your menus are created if you
  98. want to compress your BASIC files. Here is an example:
  99.  
  100.     menu%=FNwimp_createmenu("Main menu/Item 1>sub%/Item 2/Item 3>window%",0)
  101.  
  102.   changes to
  103.  
  104.     menu%=FNwimp_createmenu("Main menu/Item 1/Item 2/Item 3",0)
  105.     PROCwimp_attachsubmenu(menu%,1,sub%)
  106.     PROCwimp_attachsubmenu(menu%,3,window%)
  107.  
  108.  
  109. 2.03 (15-Oct-96)
  110.  
  111.   Add the new user function to !RunImage:
  112.  
  113.     DEF PROCuser_modechange
  114.     ENDPROC
  115.  
  116.  
  117. 2.04 (20-Oct-96)
  118.  
  119.   Add the new user function to !RunImage:
  120.  
  121.     DEF FNuser_menuhelp(menu%,item%)
  122.     =""
  123.  
  124.  
  125. 2.06 (25-Nov-96)
  126.  
  127.   Change all occurances of the following in !RunImage:
  128.  
  129.     PROCwimp_bar(window%,icon%,length%)
  130.  
  131.   to
  132.  
  133.     PROCwimp_bar(window%,icon%,length%,0)
  134.  
  135.  
  136. 2.11 (08-Apr-97)
  137.  
  138.   No changes are required.
  139.  
  140.  
  141. 3.00 (31-May-97)
  142.  
  143.   Add the new user functions to !RunImage:
  144.  
  145.     DEF PROCuser_declarefonts
  146.     ENDPROC
  147.     :
  148.     DEF PROCuser_print(xmin%,ymin%,xmax%,ymax%,page%)
  149.     ENDPROC
  150.     :
  151.     DEF FNuser_printing(copy%,page%,totpages%,pagepos%)
  152.     =0
  153.     :
  154.     DEF PROCuser_printerchange
  155.     ENDPROC
  156.  
  157.   Change the following user function in !RunImage:
  158.  
  159.     DEF FNuser_saveicon(window%)
  160.     =0
  161.  
  162.   to:
  163.  
  164.     DEF PROCuser_saveicon(window%,RETURN drag%,RETURN write%,RETURN ok%)
  165.     ENDPROC
  166.  
  167.   If you have used this function to change the icon to drag then a general
  168. example of the change you need to make is:
  169.  
  170.     DEF FNuser_saveicon(window%)
  171.     IF window%=save% =3
  172.     =0
  173.  
  174.   to:
  175.  
  176.     DEF PROCuser_saveicon(window%,RETURN drag%,RETURN write%,RETURN ok%)
  177.     IF window%=save% drag%=3
  178.     ENDPROC
  179.  
  180.   Change occurances of the following in !RunImage:
  181.  
  182.     window%=FNwimp_loadwindow(path$,window$,1)
  183.  
  184.   to:
  185.  
  186.     window%=FNwimp_loadwindow(path$,window$,0)
  187.  
  188.   If you have used sprite areas in the application you are upgrading, then
  189. the following changes need to be made. From this version onwards sprite
  190. areas have handles, and in the following changes, the handle is called
  191. "sprites%" but you may use whatever name you wish. a% is an arbitary
  192. variable.
  193.  
  194.   Change occurances of the following in !RunImage:
  195.  
  196.     PROCwimp_loadsprites(path$)
  197.  
  198.   to:
  199.  
  200.     a%=FNwimp_loadsprites(path$,sprites%)
  201.  
  202.   and occurances of:
  203.  
  204.     PROCwimp_pointer(pointer%,1,pointer$)
  205.  
  206.   to:
  207.  
  208.     PROCwimp_pointer(pointer%,sprites%,pointer$)
  209.  
  210.   and occurances of:
  211.  
  212.     window%=FNwimp_loadwindow(path$,window$,0)
  213.  
  214.   to:
  215.  
  216.     window%=FNwimp_loadwindow(path$,window$,sprites%)
  217.  
  218.   If you are displaying drawfiles in windows in the application that is
  219. being updated, then the following change needs to be made.
  220.   In previous versions of DrWimp, drawfiles were placed with the top left
  221. corner of the drawfile at the work area coordinates specified. From this
  222. version onwards, it is the bottom left corner that is positioned at these
  223. coordinates. It is best to recalculate your coordinates for the positioning
  224. of the drawfile, rather than waste time using the DrWimp functions to
  225. calculate them for you from the width and height of the drawfile.
  226.  
  227.   If you create any menus where you attach the submenu at the same time by
  228. using '>', like the following line, then it needs to be changed. For
  229. example:
  230.  
  231.     menu%=FNwimp_createmenu("Main menu/Item 1>sub%/Item 2/Item 3>window%",0)
  232.  
  233.   changes to:
  234.  
  235.     menu%=FNwimp_createmenu("Main menu/Item 1/Item 2/Item 3",0)
  236.     PROCwimp_attachsubmenu(menu%,1,sub%)
  237.     PROCwimp_attachsubmenu(menu%,3,window%)
  238.  
  239.   This also applies to PROCwimp_putmenuitem, PROCwimp_recreatemenu,
  240. FNwimp_createmenuarray and PROCwimp_recreatemenuarray.
  241.  
  242.   Change in !RunImage:
  243.  
  244.     DEF PROCuser_redraw(window%,minx%,miny%,maxx%,maxy%)
  245.     ...
  246.     ENDPROC
  247.  
  248.   to:
  249.  
  250.     DEF PROCuser_redraw(window%,minx%,miny%,maxx%,maxy%,printing%,page%)
  251.     ...
  252.     ENDPROC
  253.  
  254.   and:
  255.  
  256.     DEF FNuser_loaddata(path$,window%,icon%,ftype$)
  257.     ...
  258.     =0
  259.  
  260.   to:
  261.  
  262.     DEF FNuser_loaddata(path$,window%,icon%,ftype$,workx%,worky%)
  263.     ...
  264.     =0
  265.  
  266.   and:
  267.  
  268.     DEF PROCuser_mouseclick(window%,icon%,button%)
  269.     ...
  270.     ENDPROC
  271.  
  272.   to:
  273.  
  274.     DEF PROCuser_mouseclick(window%,icon%,button%,workx%,worky%)
  275.     ...
  276.     ENDPROC
  277.  
  278.  
  279. EOF
  280.