NSString* returnObject = [[[replyDescriptor descriptorAtIndex:1]
descriptorAtIndex:1] stringValue];
(gdb) p (char)[returnObject characterAtIndex:0]
$1 = 0 '\000'
Current language: auto; currently objective-c
(gdb) p (char)[returnObject characterAtIndex:1]
$2 = 68 'D'
(gdb) p (char)[returnObject characterAtIndex:2]
$3 = 0 '\000'
(gdb) p (char)[returnObject characterAtIndex:3]
$4 = 101 'e'
(gdb) p (char)[returnObject characterAtIndex:4]
$5 = 0 '\000'
(gdb) p (char)[returnObject characterAtIndex:5]
$6 = 116 't'
(gdb)
Den 2. nov.. 2007 kl. 12:35 skrev Ivan C Myrvold:
I am unable to extract the text from an NSAppleEventDescriptor
into an NSString.
Here is the AppleEvent:
{ 1 } 'aevt': aevt/ansr (i386){
return id: 669057032 (0x27e10008)
transaction id: 0 (0x0)
interaction level: 112 (0x70)
reply required: 0 (0x0)
remote: 0 (0x0)
for recording: 0 (0x0)
reply port: 0 (0x0)
target:
{ 1 } 'psn ': 8 bytes {
{ 0x0, 0xed0ed } (InCopy)
}
fEventSourcePSN: { 0x0,0xed0ed } (InCopy)
optional attributes:
< empty record >
event data:
{ 1 } 'aevt': - 1 items {
key '----' -
{ 1 } 'list': - 1 elements {
{ 1 } 'TEXT': 188 bytes {
"
Here are the things I have tried:
(gdb) po [replyDescriptor descriptorAtIndex:1]
<NSAppleEventDescriptor: [ "\D\e\t\t\e\ \e\r\ \e\n\ \t\e\k\s\t\.\r
\S\k\r\i\v\e\r\ \l\i\n\j\e\ \2\.\ \N\y\ \s\e\t\n\i\n\g\ \l\i\n\j\e
\ \2\.\r\D\e\t\t\e\ \e\r\ \l\i\n\j\e\ \3\.\r\L\i\n\j\e\ \4\ \e\r\
\s\l\u\t\t\e\n\.\r" ]>
(gdb) po [[replyDescriptor descriptorAtIndex:1] descriptorAtIndex:1]
<NSAppleEventDescriptor: "\D\e\t\t\e\ \e\r\ \e\n\ \t\e\k\s\t\.\r\S
\k\r\i\v\e\r\ \l\i\n\j\e\ \2\.\ \N\y\ \s\e\t\n\i\n\g\ \l\i\n\j\e\
\2\.\r\D\e\t\t\e\ \e\r\ \l\i\n\j\e\ \3\.\r\L\i\n\j\e\ \4\ \e\r\ \s
\l\u\t\t\e\n\.\r">
(gdb) po [[[replyDescriptor descriptorAtIndex:1] descriptorAtIndex:
1] stringValue]
<object returned empty description>
(gdb)
I only get an empty string. What should I do in this case?
Ivan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-implementors mailing list (Applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-implementors/
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-implementors mailing list (Applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-implementors/
email@hidden
This email sent to email@hidden