G'day once more.
Converting terminology from ObjC to ASOC is very, very frustrating. If I try anything else with this method, it would be guesswork, and there's simply nothing available on the net (or in Shane Stanleys 'Explored') that succinctly explains in detail about conversions. There's no colon shown in the ObjC method, so I don't know how to use the 'bounds, origin' part.
So, I need to convert this….
// get the current scroll position of the document view | NSPoint currentScrollPosition=[[theScrollView contentView] bounds].origin; | | // restore the scroll location | [[theScrollView documentView] scrollPoint:currentScrollPosition]; |
to something like this, which is the only thing I could come up with that was accepted by the compiler…
# # Get the existing scroll point, so we can make sure scroll # position does not change after re-draw of colors in new font. # tell current application's NSPoint to set currentScrollPosition to theNewColorsView's contentView's {|bounds|, origin} # <code> # # Re-set the scroll point back to where it was. # theNewColorsView's documentView's scrollPoint_(currentScrollPosition) #
which gives an error 'currentScrollPosition is undefined', so obviously the NS Point method is completely wrong.
Any advice appreciated, thank you.
Regards
Santa |