Jump to content

PB170

6502
  • Content Count

    97
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

431 profile views
  1. Thanks for the reply! Sorry for the late response on my part. I didn't assume that menus are windows. However, the popup menu in the calendar module is implemented as a window, and I just thought it would make sense if the altDBoxProc (plain box with shadow) had the same type of shadow as all standard windows and menus. What would be the best way to create a plainDBox type window with a standard 1 pixel shadow? Just getting the window's coordinates and manually draw the lines? Or is there a more appropriate way of doing it? On a related note, I'm also interested in crea
  2. Just a quick side question here (main post above) As a side project, I just started making some modifications to the MacCalendar calendar module that comes with the Control Strip development kit, to make it more visually pleasing (have been using it for many years but don't really like how it looks). One change I'd like to make is to replace the custom window design (a plainDBox with an extra frame drawn inside it) with the standard popup menu design. I thought an altDBoxProc (plain box with shadow) would fix this, but it draws a large two pixel shadow instead of the o
  3. No problem! We all help each other voluntarily here so I'm thankful for any response I get. I'm constantly surprised by all the great feedback. When I doubt that I will get any response at all, I get great replies like this. (There is however another open question that I would be happy to get a response to, but I'll get back to that later ) Checking for the existence of the trap with the code you shared returns a negative result. (I assume this basically accomplishes the same thing as the Gestalt() method I included in my post above?) I do have all the relevant extensio
  4. (Part 2 of the post above) A second issue that I encountered (and was able to work around) while developing the module is the following: When I moved over to work the voltage module, a need to deal with floating point numbers emerged. My first idea was to use the standard C functions. However, it turns out that all C functions dealing with floating point numbers are unsupported when developing non-applications in Think C. Bummer. Okay, surely then, there must be some useful toolbox function to do this (specifically, convert floating point numbers to text str
  5. After the lack of success with fixing the slider back in May (@Crutch, or anyone else: if you have any ideas about my post above, feel free to comment), I went back to the less elegant but slightly more functional popup menu instead. I then moved on to develop a second control strip module that displays the system voltage and allows you to see the battery voltage remaining until sleep. Naturally, this led to more issues The main obstacle I've encountered is as follows (I'll include a second, minor one, in a separate post after this one): After finishing the module, I t
  6. Huge thanks for your effort and for looking into it! Interesting to read about the results of your test. At first it felt like great news if the error was indeed in the code and easily fixed. However… when trying it out on my machine, the updated code doesn't change anything Very confusing this … The code is indeed Apple's sample code. Moreover, it seems to work just fine on my setup. It appears that the statusRect gets restored with each new call to the module, so changing it in the meantime doesn't seem to do any harm (well, at least not on my machine …).
  7. Haha Well, while I like the thought of it, the company that brags about having having 90-ish percent of their users on their latest OS and do all they can get away with to improve that number, would probably ditch bug reports about anything older than the second latest version unless it's critical. And you know, if it's humor, it's got to be market oriented. Anyone with any thoughts about the the past in their head are probably not retired, but fired But maybe I'm being too pessimistic. Anyway, glad to hear you enjoy the thread! I had a feeling maybe it was getting a bit too sp
  8. Oh, it's buggy alright After having a first look at MacsBug, I played around a bit with a version of the control strip module that sets the initial value to "0" if the previously returned value is out of range (not using of MacsBug at this point) and discovered that if the module is just clicked on very quickly (without bringing up the slider (not possible every time) ), it returns the value "2". After that the slider works properly one time (positive values in the range specified). Bringing the slider up again a second time (now with a positive value passed as the initial value) makes the ha
  9. Thank you very much, and thanks for the tip! I include a corrected version of the project here. By the way, first step taken: Control Strip test.sit
  10. Like I said, I just missed it when I went back to Apple's example for my post here – it's been initialized properly throughout all my tests It's initialized to 0 during the initialization call to the module after the global variables are allocated. Regarding the globals, is this level of error checking necessary? Isn't it enough to check if the allocation was successful, like it's done in the program, as long as the values are initialized properly? Would you mind having a look at what happens when SBTrackSlider() is called while the code is running? If so, I can upload
  11. Wow, cool to hear that you worked at Apple in the 90's! Must have been fascinating. Well… all I can do at this point is trust the examples provided although I try my best to fully understand how they work. Thank you for the instructions on Macsbug. Very helpful, once I get started with it (have yet to install it ). I'm a little bit familiar with assembly and the inner workings of CPU's in general (on a broad level – haven't done any actual coding), so that shouldn't be too difficult to learn I think. I included the full project in my post earlier
  12. I haven't had the time to delve into Think C's debugger or Macsbug yet so I'm currently not using them (still a beginner…), but it's definitely on the top of my list of things to learn more about. But the code is straight from Apple's example, so I assume everything is set up properly. Regarding your first point, I realize now that I forgot to initialize sliderSetting to 0 when I went back and modified Apple's example. It is however initialized properly in all of my previous tests, with the same result. moduleRect is provided by the Control Strip software, s
  13. Hmm… I discovered just now that while the module with the slider that I included in the archive works more than the first time a selection is made in Mac OS 9 just like in my previous tests, it stops working after playing around with the slider for a while. However, if I change the ticksOnSlider parameter from 53 (the value I used in the file in the archive) back to 32 (which is what I've been using in my test up till now), it seems to work properly in OS 9 again. Don't know what to make of this… Probably a good idea to have someone look at my code…
  14. Thank you! To reduce the potential for error to a minimum, I've gone back to the original code from Apple ("Control Strip Sample", included in the Control Strip development kit) and just added the code for the slider (and commented out Apple's code for the pop up menu). The original project was made for MPW, and is more recent than Think C 5, so I had to make the following modifications to have it compile with Think C 5: • Compile the ControlStripSample.r resource file with SARez so that it can be recognized by Think C 5 • Replace the "icons.h" file includ
  15. Thanks for the links! I've been learning to program with the mac toolbox for quite a while now but I've been completely unaware of the existence of that magazine. What a wonderful resource! Programming on classic Mac OS suddenly feels like a much less disconnected endeavor Thanks! Unfortunately, and surprisingly, there's not a single instance of the phrase "control strip" in any of the issues… After my previous post, I started to download some of the Apple Developer Connection CDs, which I also learned about quite recently. The Control Strip development kit appears for
×
×
  • Create New...