G’day all
Sending this to both Appliscript & ASObjC groups, as I’m stumped, sorry.
In my Xcode project, the following keeps erring, under Sierra, and despite numerous changes, I can’t work out why.
I’ve re-started Xcode, re-typed the offending line, & re-booted just to be sure, no change. Exactly the same error message.
I though at least my fading mind knew how to get basic code layout right, but I’m obviously doing something wrong. But WHAT?
Any thoughts, please?
Stuffing around with this has wasted two hours.
The snippet works fine as an Applescript object, in all sorts of iterations.
Tried ‘length’ instead of ‘count’. Nothing.
Regards
Santa
on setUpModulusCount(theText) local drawTextLength try set p to 0 set eachCharacterCount to 104 # the value of the start character for Barcode 128 Set B set p to 0.1 set drawTextLength to (count of theText) as number set p to 0.2 try tell application "System Events" to display dialog my maxBarcodeCharacters as text --< 55 end try try tell application "System Events" to display dialog theText --< eg "20120920121212Z" end try try tell application "System Events" to display dialog drawTextLength as text --< 15 end try if drawTextLength as number > (maxBarcodeCharacters as number) then # Errors EVERY time set p to 0.3 set drawTextLength to (maxBarcodeCharacters) as number end if set p to 0.4 set theText to items 1 thru drawTextLength of theText as text etc
setUpModulusCount error Can’t make «class ocid» id «data optr000000005737000000000000» into type number. error -1700 p = 0.2
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
|