• 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
More AppleScript-ObjC Bridge Weirdness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

More AppleScript-ObjC Bridge Weirdness


  • Subject: More AppleScript-ObjC Bridge Weirdness
  • From: Dave <email@hidden>
  • Date: Wed, 11 Nov 2015 17:29:17 +0000
  • X_v_e_cd: d5c1f32ca6c343f151e528236b18c4e1
  • X_v_r_cd: 79513c453965a29b48e9f41814db9ff5

Hi,

I restarted my Mac and and added as string on the handler definition and  it started working (not sure which of these helped):

on getOutlookMessagePropertiesDictionaryWithMessageID:(theMessageIDString as string)

		say "getOutlookMessagePropertiesDictionaryWithMessageID"
		--say "theMessageIDString: " & theMessageIDString

		set myDictionary to the pMessageDictionary of me

		set myMessageID to theMessageIDString as number
		--say "myMessageID: " & myMessageID

		tell application "Microsoft Outlook"
			set myMessage to (get message id myMessageID)

			set kMessageID of myDictionary to (the id of myMessage as string)
			set kMessageClass of myDictionary to (the class of myMessage as string)

		end tell

		return myDictionary

	end getOutlookMessagePropertiesDictionaryWithMessageID:
end script

But now I have another problem with types/classes on the:

			set kMessageID of myDictionary to (the id of myMessage as string)
			set kMessageClass of myDictionary to (the class of myMessage as string)

When I look at the returned dictionary I see:

    kMessageClass = "\U00abclass outm\U00bb";
    kMessageID = 540;

Which are not of type NSString which is what I expected. However, if I run the script in the Script Editor I get the String Equivalents:

kMessageID:"540”,
kMessageClass:"outgoing message"

Is this possible using the AppleScript-ObjC Bridge? I can’t find any real documentation on this and I’m not sure of what is going on. If someone could point at some documentation of how to do this kind of thing, I’d be so grateful!

I was using the Scripting Bridge to do this and all this was easy, but I couldn’t figure out how to add and remove objects, I started using AppleScript-ObjC Bridge because someone told me it was broken and the AppleScript-ObjC Bridge was the only method that worked. Really not sure what to do now…..

Cheers
Dave



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: More AppleScript-ObjC Bridge Weirdness
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: 10.11: NSDatePicker cuts off year digit
  • Next by Date: Set editable string into NSTextFieldCell
  • Previous by thread: AppleScript-ObjC Bridge Problem
  • Next by thread: Re: More AppleScript-ObjC Bridge Weirdness
  • Index(es):
    • Date
    • Thread