G’day Shane
I still struggle sometimes to come to terms with Classes and Instances, so I hope the following terminology is correct.
I’m trying to create an Instance (attributedTextDrawerCaller) on an existing ‘dragged-in-and-copied' Class (attributedTextDrawer.applescript). I don’t know whether or not it’s absolutely necessary to create a blue cube ’NSObject’ (page 185) to make an instance of the applescript, or if I can simply create an instance referral to it without the blue cube NSObject.
I want to keep the use of the subscript (attributedTextDrawer.applescript), as simple as possible, and I was hoping there would be a way of creating an instance of it purely by code. At the moment, I haven’t created an instance of the dragged-in applescript using a NSObject.
I’m trying to write a project that will create code, that when calling my subscript, will write, and selectively flash, lines and words of Attributed Text within Scroll Fields of the calling .applescript, in a wide range of pre-determined colours, different fonts, sizes, and styles.
Step one is to get my subscript recognised.
Later steps will involve somehow ‘telling’ the subscript which applescript is doing the calling, and which scroll fields are to be drawn in. Fun ahead.
So far, the passed parameters are…
on writeEachMessage_(theTextFieldReference, theText, textFont, textPlacement, replace, textBold, textItalic, textUnderline, textOutline, textSize, textColor, textDwell, lineFlashDwell, lineFlash, lineFlashColor, wordFlashString, wordsBold, wordsItalic, wordsUnderline, wordsOutline, wordDwell, wordFlashDwell, wordFlashTimes, wordFlashColor, maximumLines, reDrawOriginalTextLine)
Regards
Santa
On 27 Mar 2016, at 12:47 PM, Shane Stanley < email@hidden> wrote: On 26 Mar 2016, at 4:41 PM, Brian Christmas < email@hidden> wrote:
I have a project that has a subscript object ('AttributedTextDrawer’)
Do you mean an ASObjC class named AttributedTextDrawer? Please try to get the terminology correct -- it makes things easier for everyone.
I’ve tried…
property attributedTextDrawerCaller : missing value
on applicationWillFinishLaunching:aNotification try set my attributedTextDrawerCaller to current application's AttributedTextDrawer's alloc()'s init() on error errmsg tell application "System Events" to display dialog "setting reference to textDrawer " & errmsg end try
but it errors with
setting reference to textDrawer AttributedTextDrawer doesn’t understand the “alloc” message.
If you do mean a class named AttributedTextDrawer, and you have such a thing, you should not see that error. Which suggests the problem is in the AttributedTextDrawer file.
And what, you ask, was the beginning of it all? And it is this...... Existence that multiplied itself For sheer delight of being And plunged with numberless trillions of forms So that it might find itself innumerably
Sri Aurobindo
|