 |
 |
OS 7.55 code for "clock control"
|
 |
|
 |
|
Junior Member
Join Date: Mar 2002
Status:
Offline
|
|
OK - before you all think I am nuts, here is the deal:
(sorry if this seems a little long, I just want to answer all the usual "why are you doing it this way" questions up front)
1. I am not a Mac GUI programmer. I do write stdio type (c and shell script) code for Unix though so I am not a complete idiot (although that may be debatable)
2. Back around 1995 I built a piece of hardware for a Mac SE PDS slot.
Since this hardware only fits in the SE's PDS slot, I need the code to run on OS 7.5.5 or earlier.
This hardware mostly consists of a intel 8255 port expander and a SSI telephone DTMF tone decoder chip. Using this board, I can connect a cordless telephone base unit to the Mac, and control it by the keypad of the cordless handset. With the proper code, I can control up to 16 I/O bits of the 8255.
Before anyone asks, this unit does not ever connect to your house phone line. It connects directly to the cordless phone base station only.
The main purpose of this project is to allow my son to turn on/off his desk light from his bed, and anything else he wants to hook up to it.
It will just be a fancy remote control unit and a learning experience for him.
Originally (1995 ish) I just wrote a console type app to receive the tones and control the output ports. This works fine but now I want a GUI app with more features. It turns out that 9 year olds are not that impressed with console apps.
I found a sample program for a "moveable modeless dialog" that has formed the basis of this project. Currently I have a dialog box with 12 check boxes representing the 12 telephone keys. If a box is checked, a corresponding output bit is set. Also, if a tone is received, the corresponding checkbox is toggled.
Just to jazz it up a little, I also "Speak" the state of the key using SpeakString().
So now I want some more features. I want to also make this thing an alarm clock, and I want to be able to automatically turn on/off the desk light at a specified time. For this I want a control to set a time just like the one in the "Date/Time" control panel.
Does anyone out there have a "Clock Control" like this? I have been looking at the control manager but the learning curve is pretty steep.
I am really hoping there is a sample program or something out there I can use.
Any pointers to old sample code would also be appreciated.
I am using CodeWarrior 4 for development.
Anyone??
thanks
Dave
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status:
Offline
|
|
I know that one wasn't built into the OS until System 8 and the Appearance Manager. So I think it'll require a custom CDEF. I'm sure that there's one around somewhere, but it might be tough finding one this late in the game.
Googling for "custom CDEF" returns a lot of results, but adding "clock" to the search returns nothing. Places to look - old issues of Apple's Developer magazine, old sample code archives from Apple, old issues of MacTech magazine.
Good luck, this'll be a tough one, I predict.
One thought - you might be able to gank Apple's out of the Date & Time cdev. It'd probably be stored as a CDEF resource. No clue if that would work, but it might be worth a shot.
Interesting thread, by the way.
|
Geekspiff - generating spiffdiddlee software since before you began paying attention.
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Mar 2002
Status:
Offline
|
|
Originally posted by smeger:
I know that one wasn't built into the OS until System 8 and the Appearance Manager. So I think it'll require a custom CDEF. I'm sure that there's one around somewhere, but it might be tough finding one this late in the game.
Googling for "custom CDEF" returns a lot of results, but adding "clock" to the search returns nothing. Places to look - old issues of Apple's Developer magazine, old sample code archives from Apple, old issues of MacTech magazine.
Good luck, this'll be a tough one, I predict.
One thought - you might be able to gank Apple's out of the Date & Time cdev. It'd probably be stored as a CDEF resource. No clue if that would work, but it might be worth a shot.
Interesting thread, by the way.
This is really a pretty fun project - just hard because of the antiqueness of all the parts involved. Anyway, I have seen Carbon code samples that use the Appearence manager, and OS X code samples, but it does indeed look like I am SOL for pre OS 8. I can still do what I want - it will just be ugly. I guess I will have to make the user type in a well formated time string. Since the user is 9, this might even be a good thing.
And - I did try to yank it out of the Date/Time control panel - but since I don't really understand how these things work anyway, I didn't get anything useable.
Thanks for the help.
Dave
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|