My environment is XCode 3.0 and OS-X 10.5.2, writing (almost) my first serious Objective-C app after 15+ years of code cutting and 5+ years of C#/C++/etc.
What I am trying to achieve is to display information related to the frequency of a radio which can range from 0.5MHz (can be assumed to be 0) to 500MHz. I imagine that this will be a wide but thin 'view'. Within this range there are certain 'bands' that I am more interested in than others (this is a amateur radio so I am specifically interested in the 80, 40, 20, 2 metre, 60cm band as well as others). In these 'bands' I want to display information about the various modes (AM, SSB, FM, CW...) and usage (voice, data, SSTV...).
I have tried to create an NSScrollView where the lowest view in the hierarchy holds the information and I can scroll through this horizontally. I also have a ruler at the top which I have set to show the 'frequency'. All this seems to work well.
However, I now want to be able to zoom in and out of the display so that I can 'see' a greater range of frequencies for approximate frequency selection (say a range of 50-100MHz) and then zoom in so that I can see the details more clearly (see 3-5MHz range).
I have tried to use the bounds and frame rectangle settings and I can achieve some form of zooming, but the base is always 0 and the top of the display that I can slide to reduces as I zoom in. I'm obviously doing something wrong, but I'm not sure how this should be done.
Can some kind soul please let me know how I should be going about this? Pointers and references would be appreciated. If I need a completely different approach to solving this problem then that would be OK as well (but the problem itself remains to be solved!)
Thanks
Susan
What I am trying to achieve is to display information related to the frequency of a radio which can range from 0.5MHz (can be assumed to be 0) to 500MHz. I imagine that this will be a wide but thin 'view'. Within this range there are certain 'bands' that I am more interested in than others (this is a amateur radio so I am specifically interested in the 80, 40, 20, 2 metre, 60cm band as well as others). In these 'bands' I want to display information about the various modes (AM, SSB, FM, CW...) and usage (voice, data, SSTV...).
I have tried to create an NSScrollView where the lowest view in the hierarchy holds the information and I can scroll through this horizontally. I also have a ruler at the top which I have set to show the 'frequency'. All this seems to work well.
However, I now want to be able to zoom in and out of the display so that I can 'see' a greater range of frequencies for approximate frequency selection (say a range of 50-100MHz) and then zoom in so that I can see the details more clearly (see 3-5MHz range).
I have tried to use the bounds and frame rectangle settings and I can achieve some form of zooming, but the base is always 0 and the top of the display that I can slide to reduces as I zoom in. I'm obviously doing something wrong, but I'm not sure how this should be done.
Can some kind soul please let me know how I should be going about this? Pointers and references would be appreciated. If I need a completely different approach to solving this problem then that would be OK as well (but the problem itself remains to be solved!)
Thanks
Susan