• 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
What on Earth????
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What on Earth????


  • Subject: What on Earth????
  • From: Brian Christmas <email@hidden>
  • Date: Tue, 20 Sep 2016 15:06:36 +1000

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



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Getting the Window Associated with an open Message
      • From: Dave <email@hidden>
    • Re: What on Earth????
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Heads up. Safari window count resolved (sort of)
  • Next by Date: Re: What on Earth????
  • Previous by thread: Re: Heads up. Safari window count resolved (sort of)
  • Next by thread: Re: What on Earth????
  • Index(es):
    • Date
    • Thread