************************ * ALARMING Version 2 * ************************ * Copyright © 1993 by * * Philippe Girolami * ************************ Version 1.03 finished on the 28/12/92 at 14:45. Version 1.12 finished on the 07/02/93 at 16:00. Version 1.23 finished on the 18/02/93 at 19:15. Version 1.33 finished on the 04/04/93 at 10:00. Version 1.36 finished on the 09/05/93 at 16:00. * Version 2.21 finished on the 20/09/93 at 16:38. I Thanks. -------- I wish to thank Genesis, U2, MC Solaar, Snap and many others for playing such good music, Commodore for this great machine and their very well written technical books, my parents for not bugging me when I was spending hours in front of the screen, my brother for listening to the radio and so not being as annoying as usual, Jean-Paul for his tests on this program, High Soft for writing such a nice assembler (what a difference compared to BIG MAC.C on the Apple IIe, for those who know what I mean!) and lastly thanks to the CAMIF for their help when my computer broke down. I also have to add to add to this list "Expert Services", the only ALL AMIGA shop in Cincinnati (keep it up...) II Preamble. ----------- THIS PROGRAM NEEDS RELEASE 2 OF THE AMIGA SYSTEM (at least version 37). This program is freely distributable as long as the object code, this doc and the french version of it are not modified in any way. Please note that this program is distributed as SHAREWARE, so if you use it please send something to the author (that's me!); think of poor me, working for 3 months on this f_____g program so you could enjoy it. You could send, for example, a million dollars, a hard drive for my poor Amiga 500+ 1 Mo Chip Ram color monitor (that's ALL I have), disks w/ your own works, your own source codes, your unused memory expansion cards or if you really can't even spear 10 dollars, at least a friendly letter. If you are nice enough to send me something and you join an empty disk, I'll send U any other program I'll have written (send me your ideas) or any update of this program or even both. THANK YOU... (Yes I know, you need to find the money, the envelope, write the letter, stick the stamp on it, post it BUT think of how happy I'll be when I get YOUR letter). Here is my adress: Philippe Girolami 131 Domaine de Suartello 20090 Ajaccio. FRANCE. I do recommend, though, if you live outside Europe to send me your letters through AIRMAIL because through surface mail, it takes months and more than often it gets lost (trust me, I know about it!). Okay, I think that's enough begging for now, here's the doc in this beautiful language, English. III The Genesis. --------------- Have you ever sat down in front of your favorite computer (AT LEAST I HOPE) just to write a few lines of code, finish off a little thing and in fact miss a date with your girlfriend, forget you had a Physics test the next morning and it's 10:00 o'clock at night or any other little problem every computer crazy knows about ? Well, if your answer is YES, this program was written for you; if your answer was no, I'm sorry, the time's probably the only thing that will interest you unless you don't want to forget birthdays. My answer being yes, I started thinking of writing such a program and so here's the result. This is version 2 of ALARMING. Many functionnality have been added to it since version 1.36: undefined number of alarms, use of the ToolTypes environment, code optimisation and debugging (above all). IV Description. -------------- ALARMING is an alarm program, you can set up to 19 alarmes at the same time. There are 4 types of alarmes: - Every day (you only set the time). - Every week (you set the time and the day of the week). - Every month (you set the day and the time). - Every year (you set the month, the day and the time). - A precise date (you set everything). You will find 2 options: For each alarm, you can leave a message to be displayed when the alarm goes off. (you must check the "Message" gadget) You can also ask for a flash when the alarm goes off (Check "Flash screens) A| Description of the gadgets of the set-up window. -------------------------------------------------- You will find here a detailled description of the set-up window. To open it you must select the time display (it will become blue under a normal Release 2 system) and click on the right mouse button. The gadgets are described top to bottom: 1) Alarme: This gadget allows you to select WHICH alarm you wish to modify. It's a GadTools Cycle gadget: if you SHIFT click it, it will cycle backwards. 2)Type: It's the TYPE of alarm this alarm will be, there are 6 possiblities: - Inactive (That alarm is OFF, you may change it without fear) - Once a day. - Once a week. - Once a month. - Once a year. - A precise date. Depending on the type, you will be allowed to change more or less settings. For example if you choose "once a day", you will only be allowed to change the time, the other gadgets will be disabled. 3) Date: These 3 gadgets allow you to chose the DATE for an alarm. The month is another Cycle gadget. The day gadget is a slider gadget, the day is displayed as a number to it's left. Lastly, the year gadget is a GadTools text gadget where you need to type in the date ("1976" not "76", though). There's also the "day" gadget which allows you to set the day the alarm should go off (if the once a week alarm type was chosen!). 4) Time: That's the TIME gadgets (not much to say about them, except that both are slider gadgets with their level giving the time in military fashion). 5) Message: This gadget allows you to write a MESSAGE for the alarm: if you select it you will be allowed to modify gadgets (8) and ALARMING will display the text you will have entered. 6) Flash screens: This option, if selected, will FLASH the screens when displaying the alarm. 7) The text gadgets: These five lines define the five lines of TEXT you are allowed to display when the alarm goes off. You need to select the "Message" gadget to be allowed to modify these gadgets. 8) Save: This gadget closes the set-up window, opens the time window and SAVES the changes you did to the alarmes. 9) Cancel: This gadget does the same thing as "Save" BUT DOES NOT SAVE THE CHANGES MADE TO THE ALARMES. It will revert to the preceding settings of the alarmes. Those were all the settings possibilities. B| The menu. ----------- As of version 1.12, ALARMING adds new options through the use of an intuition menu. At the moment, there are 3 choices in the Project menu: - "Host screen..." which we will discuss later. - "About..." that gives some information on the program. - "Quit" quits ALARMING since the Quit gadget has now disapeared. If you choose quit the alarm settings will NOT BE SAVED. Version 2.21 introduced a new menu: "extra" that will be discussed further on. The first menu allows ALARMING to be much more versatile and useful if programs start to use the Public Screen facilities offered by Release 2: this option allows you to put ALARMING on any public screen. If you own, like me, Devpac 3 you must know that it opens a public screen and if you want the time to be displayed there, it's impossible (it's the same thing for PowerPacker). With this option it is now possible because ALARMING will give you a list of all the public screens, you must then point at the one you want and click on "Ok"; ALARMING will then open all it's windows on that screen. If by any chance an error occures, ALARMING will open on the Default Screen (most often the Workbench screen). The second menu adds a new dimension to ALARMING by allowing a variable number of alarms to be fixed according to your needs. They are limited to 19 though (I figured that would be a good max, above 20 it gets hard to brows through the alarms). If you need just one alarm, you only set one; if you need 19 then you set 19! This allows for disk-storage saving too. There are 2 items at the moment: add an alarm and delete alarm. Add an alarm will simply add an alarm at the end of the alarm list. Delete an alarm will delete the currently displayed alarm providing it is set to inactive and you acknowledge the requester presented to you. C| The Tool Types. ---------------- As of version 2.21, ALARMING uses the Tool Type environment. Currently 2 tool types are supported: - PUBSCREEN=... The name of the public screen to be displayed on on startup. (Without quotes: example PUBSCREEN=DEVPAC.1). - EURODATE=ON|OFF This allows american users the read the date their way ! EURODATE=ON (22/03/76) and EURODATE=OFF (03/22/76). D| Alarme saves. -------------- ALARMING saves the alarm settings so that when you set your alarmes, turn off the Amiga and then turn it back on you will not have lost your settings. For example if you set an alarm for every 22nd of march (my birthday) and you save the alarmes, on the 22nd of march the alarm will go off and wait for the next 22nd of march to go off again. The alarmes are saved when you click on "Save" but from the way ALARMING handles them it also needs to access the savings file each time an alarm goes off. ALARMING tries to read upon each load to get the settings from "ENVARC:", 2 things can happen then: - The file exists, ALARMING just loads it and executes. - The file doesn't exist, ALARMING then creates the file and executes. As you can see (actually read!) ALARMING should only access the disk in 3 possible cases: - Upon loading. - When you click "Save". - When an alarm goes off. and each one should only last a few seconds. With a program like ALARMING, it is easy to add a virus because there are many disk accesses so if you have doubts on these, send me a disk and I'll send you the latest version of the program without a virus (!). Finally, as you may know, the "ENVARC:" volume is in fact an assign so you need to assign it to a physical volume; Workbench takes care of that for you but if you are booting from a disk with a simple startup-sequence it is possible for "ENVARC:" to not be assigned, you then need to assign it YOUSELF with this command executed from a Shell: "c/assign ENVARC: SYS:" which will assign "ENVARC:" to the fictive but always assigned "SYS:" volume or better with "c/assign ENVARC: SYS:Prefs/Env-Archive/" which is the real assign. V A few details. --------------- ALARMING needs Release 2 for many reasons: - The programming is easier under Release 2, especially gadtools.library which allows such pretty gadgets with their "3D" look, Process creation is simplified, so are MsgPort creations, the TextExtent function of the graphics .library is nice for proportional fonts, disk error managing is simplified... - Release 2 is the Amiga's futur not V1.3 (actually R2 is already too old with Workbench 3.0 and the new AGA chip set). - Because I have the Release 2 RKMs. ALARMING manages correctly proportional fonts and different font sizes (I use Courier 15, what about you ?). ALARMING shouldn't hang the computer because all of my library calls have their return code tested: in the case of an error, ALARMING should show a requester explaining you the error incountered and adding whether ALARMING is going to resume without trouble or if ALARMING is going to QUIT. Error code has been extensivly tested on my computer so you shouldn't have any trouble. VI Conclusion. ------------- When I was testing the final version of the program, I never encountered any errors. But if by any chance (not really much of any chance, though) ALARMING does hang the computer or give you an error; it would be nice of you to send me a letter specifying what error occured, during what action it occured, and most of all what configuration you have. I will correct the error and will send you a newer version if you send a disk. I'm planning on adding a few enhancements to this program: - The sound option if someone helps me. - Localising the program (but again I don't have the docs for that). - Making ALARMING a commodity. If you have any ideas, feel free to write... Philippe Girolami On the 12/26/92. 07/02/93. 18/02/93. 04/04/93. 09/05/93. 24/06/93. 20/09/93. IMPORTANT NOTE: -------------- As I have written above, I have been unable to get the GadTools slider gadgets to work properly (ie. have a seeable knob) so I have patched directly the gadget structure and have the PROPNEWLOOK bit set in the PropInfo flags. THIS IS INCORRECT PROGRAMMING AS FAR AS COMMODORE IS CONCERNED. IT HAS BEEN TESTED ON MY Amiga 500+ AND A FRIEND'S Amiga 500 UPDATED TO RELEASE 2. I don't know if it works under version 2.1 or 3.0 of the Amiga system. As soon as someone tells me how to get the knob imagery correctly I will erase the patch of the structure. LAST NOTE (3/1/93): ------------------ I suppressed the alarm saving routine, if you want to save alarmes please send $10 (F60) - which covers disk and sending expenses - and I will send you the full version immediately. ******************************** * A few technical informations * ******************************** - Source code 4100+ lines long (more than 118000 characters). - ALARMING uses a lot gadtools.library for all gadgets and menus rendering. - ALARMING has been greatly optimised from version 1.36 to 2.21. There is no more a second process, ALARMING runs as one single process so if you run programs with higher priority (1 for example in Real3D) you won't have to wait hours to display the set-up: the second process doesn't Wait() anymore). An example are the source code statistics (Al1.36: 4500+, 126000+!!) - Error code has been completly rewritten, ALARMING will no longer suspend itself, it will either resume or quit. - The startup part of ALARMING was rewritten so I had to rewrite the quitting too which enabled me to find 2 bugs which could mean System Crash. ************ * Historic * ************ - Alarming1.03 That was the first version distributed (through Euro-DP). Al it had was the set-up window, did the alarms and gave the time, that's all. - Alarming1.12 It was the second version. It wasn't distributed because I didn't think it was necessary: too little changes. But I did send it to everybody that had sent me some money (as I had promised...). This version allows the choice of the host screen through a listview gadget. I added a menu with info on the program, that choice option and a quit item because I had gotten rid of the Quit gadget. Another reason for not distibuting it is that I was never able to get the menus to be displayed correctly: background grey instead of black (!) and I still don't know why (I used gadTools...). - Alarming1.23: This version corrects a bug from version 1.12 (bad memory deallocation) and manages errors far better: almost any error used to suspend ALARMING (it made it easier for me!) but everything has been enhenced in this version, except 2 cases where I must hang ALARMING. Now ALARMING will tell what error it has encountered and continue peacefully or quit. For example: if you try to open the set-up window and you are short on memory, ALARMING will tell you that and will continue as if you had never asked for the window to be opened. - Alarming1.33: I've redrawn the whole set-up window because I think it could not be used on an NTSC screen (it was to long: 220 lines). It has now been widened and shortened and I believe it looks better now. It has also made some room for a new gadget which goes with the new alarm type implemented in this version: once a week (yeah...). - Alarming1.36: This version is the finalisation of version 1.3: it corrects all previous bugs and it must be the most stable version of all. Now, the menu displays correctly (I changed the way I was opening the window, it works but ... I don't know why!!), the Bevel boxes are now correctly drawn too (they used to not even be drawn!, but it was not my fault: the RMKs were wrong). And, at last (!), the Flash screens gadget actually flashes the screens now. This version was distributed through CAM(755b) in Setpember and Fish. -Alarming2.21: This version is truly Alarming II: code optimisation, extensive debugging, error code routines rewritten, new features, better use of system calls.. It is distributed by Euro-DP since October 93. *********************** * One last thought... * *********************** This is my first Amiga program (I finished version 1.12 a year after buying my computer and I have the RKMs since summer 92) and the impression I have from this computer I don't know well yet (don't ask me anything about graphic s) is that it's great, beautiful... And, like everybody else, I wonder why Commodore doesn't have a real marketing policy: all they seem interested in is games for the A500 (and soon I guess the A1200) and graphics for the A3000 (and soon the A4000) whereas I'm sure it could do as well and surely better than Macs and PCs in their own things: Desktop Publishing, word-proce ssors etc (especially with it's multi-tasking abilities, it's coprocessors, intuition...). I think they are many reasons for this: - Commodore doesn't have enough machines around the world to lower its prices (have you seen the 4000's price ? I'd rather buy a Mac at that price) - Since they aren't enough powerful machines (4000s,3000s), big software companies (like Microsoft) aren't interested in the Amiga. - And because of this, there are only very few good word-processors, spreadsheets, databases. So if that is what you are looking for, you have to go towards Macs and PCs. - And so the number of machines will not raise, it's a cercle. It seems to me that Commodore is the only one which can do something because Borland, Microsoft and all the others won't take any risks on this plateform. So now, all that's left is prayer...