if (*ra4 != 0xffc78948) { return false; }

On 23 Aug 2011, at 22:18, Julie Porter wrote:

> I work with scans of 10 tune Nickelodeon player piano rolls.  These can be 
> over 100 yards long when unrolled.  My roll images when uncompressed can be 
> 100,000 plus pixels by 2800 pixels. In actual practice the images are made of 
> lines, not pixels.
> 
> To read these I have programs written in postscript or carbon.  My carbon 
> application is getting long in the tooth.
> 
> I have been reading over this list and the Cocoa program examples and 
> documentation over the last 3 months.
> 
> I found the NSRulerView sample application.   At issue is that interface 
> builder will only let me make a view that is 10000 pixels.
> 
> Searching the web I see suggestions to do this programmatically.   I am not 
> sure where  the code to create the window would go.  I am finding that Cocoa, 
> especially V2.0 obfuscates things, especially where to put things.  What 
> examples I have are base on images, but I am drawing lines, based on the 
> scroller positions.
> 
> I already have postscript and carbon code that tiles the images,  So if I 
> have the first set of lines to draw and the last set of lines to draw, I can 
> find these in the file and draw them.
> 
> How do I do setup the ruler and scrollviews programetically without interface 
> builder?

Your best bet is to not completely dump IB, but to simply set the contentSize 
programatically as soon as you load your document.

I don't really see what you're saying about cocoa obfuscating things, it's one 
of the most clear APIs out there, and I'm not sure what you mean by v2.0 
either.  Re your specific example though – you should not be drawing anything 
based on a scroller position.  Instead, the NSScrollView will ask for a 
specific rectangle of your contentView to be drawn using - 
(void)drawRect:(NSRect)r.  Simply draw the area you've been asked to draw and 
all will go well.

This all said, I'd recommend against using a scroll view here.  Extremely long 
scroll views can get very difficult for the user to navigate.  Instead, it 
might be worth considering some kind of scrubbing interface.  Maybe something 
like a movie editor that shows a miniature visualisation of each section of 
roll, and allows the user to easily scrub through.

Bob

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to