Your comments

BTW - this is nothing to do with a BareBones API - this is straight up Apple Events Open Document Apple Event parameter documented here:

http://developer.apple.com/legacy/mac/library/documentation/mac/pdf/Interapplication_Communication/AE_Term_Resources.pdf

search for "keyAEPosition"

BTW - this is nothing to do with a BareBones API - this is straight up Apple Events Open Document Apple Event parameter documented here:


http://developer.apple.com/legacy/mac/library/documentation/mac/pdf/Interapplication_Communication/AE_Term_Resources.pdf


search for "keyAEPosition"

It seems like sublime text 2 isn't paying attention to the 'kpos' parameter of the 'odoc' apple event.   If I do this with BBEdit the apple even sent is the same but the insertion point is place in the correct place:

Oct 22 12:30:33 com.barebones.bbedit[32725]: { 1 } 'aevt':  aevt/rapp (i386){

Oct 22 12:30:33 com.barebones.bbedit[32725]:           return id: 32699 (0x7fbb)

Oct 22 12:30:33 com.barebones.bbedit[32725]:      transaction id: 0 (0x0)

Oct 22 12:30:33 com.barebones.bbedit[32725]:   interaction level: 112 (0x70)

Oct 22 12:30:33 com.barebones.bbedit[32725]:      reply required: 0 (0x0)

Oct 22 12:30:33 com.barebones.bbedit[32725]:              remote: 0 (0x0)

Oct 22 12:30:33 com.barebones.bbedit[32725]:       for recording: 0 (0x0)

Oct 22 12:30:33 com.barebones.bbedit[32725]:          reply port: 10507 (0x290b)

Oct 22 12:30:33 com.barebones.bbedit[32725]:   target:

Oct 22 12:30:33 com.barebones.bbedit[32725]:     { 1 } 'psn ':  8 bytes {

Oct 22 12:30:33 com.barebones.bbedit[32725]:       { 0x0, 0x2f02f0 } (Unity)

Oct 22 12:30:33 com.barebones.bbedit[32725]:     }

Oct 22 12:30:33 com.barebones.bbedit[32725]:   fEventSourcePSN: { 0x0,0x2f02f0 } (Unity)

Oct 22 12:30:33 com.barebones.bbedit[32725]:   optional attributes:

Oct 22 12:30:33 com.barebones.bbedit[32725]:     < empty record >

Oct 22 12:30:33 com.barebones.bbedit[32725]:   event data:

Oct 22 12:30:33 com.barebones.bbedit[32725]:     { 1 } 'aevt':  - 0 items {

Oct 22 12:30:33 com.barebones.bbedit[32725]:     }

Oct 22 12:30:33 com.barebones.bbedit[32725]: }

Oct 22 12:30:33 com.barebones.bbedit[32725]: { 1 } 'aevt':  aevt/odoc (i386){

Oct 22 12:30:33 com.barebones.bbedit[32725]:           return id: 32700 (0x7fbc)

Oct 22 12:30:33 com.barebones.bbedit[32725]:      transaction id: 0 (0x0)

Oct 22 12:30:33 com.barebones.bbedit[32725]:   interaction level: 16 (0x10)

Oct 22 12:30:33 com.barebones.bbedit[32725]:      reply required: 0 (0x0)

Oct 22 12:30:33 com.barebones.bbedit[32725]:              remote: 0 (0x0)

Oct 22 12:30:33 com.barebones.bbedit[32725]:       for recording: 0 (0x0)

Oct 22 12:30:33 com.barebones.bbedit[32725]:          reply port: 10507 (0x290b)

Oct 22 12:30:33 com.barebones.bbedit[32725]:   target:

Oct 22 12:30:33 com.barebones.bbedit[32725]:     { 1 } 'psn ':  8 bytes {

Oct 22 12:30:33 com.barebones.bbedit[32725]:       { 0x0, 0x2f02f0 } (Unity)

Oct 22 12:30:33 com.barebones.bbedit[32725]:     }

Oct 22 12:30:33 com.barebones.bbedit[32725]:   fEventSourcePSN: { 0x0,0x2f02f0 } (Unity)

Oct 22 12:30:33 com.barebones.bbedit[32725]:   optional attributes:

Oct 22 12:30:33 com.barebones.bbedit[32725]:     { 1 } 'reco':  - 1 items {

Oct 22 12:30:33 com.barebones.bbedit[32725]:       key 'shas' - 

Oct 22 12:30:33 com.barebones.bbedit[32725]:         { 1 } 'list':  - 1 elements {

Oct 22 12:30:33 com.barebones.bbedit[32725]:           { 1 } 'TEXT':  218 bytes {

Oct 22 12:30:33 com.barebones.bbedit[32725]:             "7a4094ec7aca52f44c117bac760ca3116372834c;00000000;0000000000000020;com.apple.app-sandbox.read-write;00000001;0e000002;0000000000a9cf30;/users/private/documents/work/projects/tests/terraintest2-unity/assets/terraintest.cs"

Oct 22 12:30:33 com.barebones.bbedit[32725]:           }

Oct 22 12:30:33 com.barebones.bbedit[32725]:         }

Oct 22 12:30:33 com.barebones.bbedit[32725]:     }

Oct 22 12:30:33 com.barebones.bbedit[32725]:   event data:

Oct 22 12:30:33 com.barebones.bbedit[32725]:     { 1 } 'aevt':  - 3 items {

Oct 22 12:30:33 com.barebones.bbedit[32725]:       key '----' - 

Oct 22 12:30:33 com.barebones.bbedit[32725]:         { 1 } 'fsrf':  80 bytes {

Oct 22 12:30:33 com.barebones.bbedit[32725]:                 000: 9cff 0080  0000 0000  30cf a900  9ed7 9000     ........0.......

Oct 22 12:30:33 com.barebones.bbedit[32725]:                 001: 0000 0000  0000 0000  0000 0000  0000 0000     ................

Oct 22 12:30:33 com.barebones.bbedit[32725]:                 002: 0000 0000  0000 0000  0000 0000  0000 0000     ................

Oct 22 12:30:33 com.barebones.bbedit[32725]:                 003: 0000 0000  0000 0000  0000 0000  0000 0000     ................

Oct 22 12:30:33 com.barebones.bbedit[32725]:                 004: 0000 0000  0000 0000  0000 0000  0000 0000     ................

Oct 22 12:30:33 com.barebones.bbedit[32725]:          

Oct 22 12:30:33 com.barebones.bbedit[32725]:         }

Oct 22 12:30:33 com.barebones.bbedit[32725]:       key 'kpos' - 

Oct 22 12:30:33 com.barebones.bbedit[32725]:         { 1 } 'TEXT':  20 bytes {

Oct 22 12:30:33 com.barebones.bbedit[32725]:           "

basically seems like the sublime text 2 programmers aren't paying attention to that last appleevent arguement 'kpos' that Unity is sending out.  Maybe someone knows them and can suggest/request that they add this ASAP!  :)

It seems like sublime text 2 isn't paying attention to the 'kpos' parameter of the 'odoc' apple event.   If I do this with BBEdit the apple even sent is the same but the insertion point is place in the correct place:


Oct 22 12:30:33 com.barebones.bbedit[32725]: { 1 } 'aevt':  aevt/rapp (i386){

Oct 22 12:30:33 com.barebones.bbedit[32725]:           return id: 32699 (0x7fbb)

Oct 22 12:30:33 com.barebones.bbedit[32725]:      transaction id: 0 (0x0)

Oct 22 12:30:33 com.barebones.bbedit[32725]:   interaction level: 112 (0x70)

Oct 22 12:30:33 com.barebones.bbedit[32725]:      reply required: 0 (0x0)

Oct 22 12:30:33 com.barebones.bbedit[32725]:              remote: 0 (0x0)

Oct 22 12:30:33 com.barebones.bbedit[32725]:       for recording: 0 (0x0)

Oct 22 12:30:33 com.barebones.bbedit[32725]:          reply port: 10507 (0x290b)

Oct 22 12:30:33 com.barebones.bbedit[32725]:   target:

Oct 22 12:30:33 com.barebones.bbedit[32725]:     { 1 } 'psn ':  8 bytes {

Oct 22 12:30:33 com.barebones.bbedit[32725]:       { 0x0, 0x2f02f0 } (Unity)

Oct 22 12:30:33 com.barebones.bbedit[32725]:     }

Oct 22 12:30:33 com.barebones.bbedit[32725]:   fEventSourcePSN: { 0x0,0x2f02f0 } (Unity)

Oct 22 12:30:33 com.barebones.bbedit[32725]:   optional attributes:

Oct 22 12:30:33 com.barebones.bbedit[32725]:     < empty record >

Oct 22 12:30:33 com.barebones.bbedit[32725]:   event data:

Oct 22 12:30:33 com.barebones.bbedit[32725]:     { 1 } 'aevt':  - 0 items {

Oct 22 12:30:33 com.barebones.bbedit[32725]:     }

Oct 22 12:30:33 com.barebones.bbedit[32725]: }

Oct 22 12:30:33 com.barebones.bbedit[32725]: { 1 } 'aevt':  aevt/odoc (i386){

Oct 22 12:30:33 com.barebones.bbedit[32725]:           return id: 32700 (0x7fbc)

Oct 22 12:30:33 com.barebones.bbedit[32725]:      transaction id: 0 (0x0)

Oct 22 12:30:33 com.barebones.bbedit[32725]:   interaction level: 16 (0x10)

Oct 22 12:30:33 com.barebones.bbedit[32725]:      reply required: 0 (0x0)

Oct 22 12:30:33 com.barebones.bbedit[32725]:              remote: 0 (0x0)

Oct 22 12:30:33 com.barebones.bbedit[32725]:       for recording: 0 (0x0)

Oct 22 12:30:33 com.barebones.bbedit[32725]:          reply port: 10507 (0x290b)

Oct 22 12:30:33 com.barebones.bbedit[32725]:   target:

Oct 22 12:30:33 com.barebones.bbedit[32725]:     { 1 } 'psn ':  8 bytes {

Oct 22 12:30:33 com.barebones.bbedit[32725]:       { 0x0, 0x2f02f0 } (Unity)

Oct 22 12:30:33 com.barebones.bbedit[32725]:     }

Oct 22 12:30:33 com.barebones.bbedit[32725]:   fEventSourcePSN: { 0x0,0x2f02f0 } (Unity)

Oct 22 12:30:33 com.barebones.bbedit[32725]:   optional attributes:

Oct 22 12:30:33 com.barebones.bbedit[32725]:     { 1 } 'reco':  - 1 items {

Oct 22 12:30:33 com.barebones.bbedit[32725]:       key 'shas' - 

Oct 22 12:30:33 com.barebones.bbedit[32725]:         { 1 } 'list':  - 1 elements {

Oct 22 12:30:33 com.barebones.bbedit[32725]:           { 1 } 'TEXT':  218 bytes {

Oct 22 12:30:33 com.barebones.bbedit[32725]:             "7a4094ec7aca52f44c117bac760ca3116372834c;00000000;0000000000000020;com.apple.app-sandbox.read-write;00000001;0e000002;0000000000a9cf30;/users/private/documents/work/projects/tests/terraintest2-unity/assets/terraintest.cs"

Oct 22 12:30:33 com.barebones.bbedit[32725]:           }

Oct 22 12:30:33 com.barebones.bbedit[32725]:         }

Oct 22 12:30:33 com.barebones.bbedit[32725]:     }

Oct 22 12:30:33 com.barebones.bbedit[32725]:   event data:

Oct 22 12:30:33 com.barebones.bbedit[32725]:     { 1 } 'aevt':  - 3 items {

Oct 22 12:30:33 com.barebones.bbedit[32725]:       key '----' - 

Oct 22 12:30:33 com.barebones.bbedit[32725]:         { 1 } 'fsrf':  80 bytes {

Oct 22 12:30:33 com.barebones.bbedit[32725]:                 000: 9cff 0080  0000 0000  30cf a900  9ed7 9000     ........0.......

Oct 22 12:30:33 com.barebones.bbedit[32725]:                 001: 0000 0000  0000 0000  0000 0000  0000 0000     ................

Oct 22 12:30:33 com.barebones.bbedit[32725]:                 002: 0000 0000  0000 0000  0000 0000  0000 0000     ................

Oct 22 12:30:33 com.barebones.bbedit[32725]:                 003: 0000 0000  0000 0000  0000 0000  0000 0000     ................

Oct 22 12:30:33 com.barebones.bbedit[32725]:                 004: 0000 0000  0000 0000  0000 0000  0000 0000     ................

Oct 22 12:30:33 com.barebones.bbedit[32725]:          

Oct 22 12:30:33 com.barebones.bbedit[32725]:         }

Oct 22 12:30:33 com.barebones.bbedit[32725]:       key 'kpos' - 

Oct 22 12:30:33 com.barebones.bbedit[32725]:         { 1 } 'TEXT':  20 bytes {

Oct 22 12:30:33 com.barebones.bbedit[32725]:           "



basically seems like the sublime text 2 programmers aren't paying attention to that last appleevent arguement 'kpos' that Unity is sending out.  Maybe someone knows them and can suggest/request that they add this ASAP!  :)