• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Now I can't get this terminology right, dammit!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Now I can't get this terminology right, dammit!


  • Subject: Now I can't get this terminology right, dammit!
  • From: Brian Christmas <email@hidden>
  • Date: Fri, 03 Oct 2014 07:11:43 +1000

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
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Now I can't get this terminology right, dammit!
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Trying to set pop-up button list of fonts to attributed font names
  • Next by Date: Re: Now I can't get this terminology right, dammit!
  • Previous by thread: Re: Trying to set pop-up button list of fonts to attributed font names
  • Next by thread: Re: Now I can't get this terminology right, dammit!
  • Index(es):
    • Date
    • Thread