Rép: FileMaker oddity ?
Rép: FileMaker oddity ?
- Subject: Rép: FileMaker oddity ?
- From: Yvan KOENIG <email@hidden>
- Date: Fri, 12 Jun 2009 17:40:44 +0200
Début du message réexpédié :
De : Yvan KOENIG <email@hidden>
Date : 12 juin 2009 16:59:20 HAEC
À : Don Fuller <email@hidden>
Objet : Rép : FileMaker oddity ?
I think that it's not the explanation.
If you look carefully at the datas passed in my first message, you
will see that of course the Big Endian / Little Endian strike on the
style Clipboard text contents
BUT
the one passed from TextEdit is the same than the one passed from
AppleWorks.
So, from my own advice there is no reason explaining twhy FileMaker
reject the 'style ClipBoard text" contents under intel machines.
Not so lazy developer would have introduce this pseudo code:
if is PPC then
if {PPC uniform styles} is available then
use {PPC uniform styles}
else
use {PPC styled Clipboard text}
end if
else
if {intel uniform styles} is available then
use {intel uniform styles}
else
use {intel styled Clipboard text}
end if
end if
At this time the code behavior resembles to :
if is PPC then
if {PPC uniform styles} is available then
use {PPC uniform styles}
else
use {PPC styled Clipboard text}
end if
else
if {intel uniform styles} is available then
use {intel uniform styles}
else
don't apply any style
end if
end if
I may accept this kind of oddity in a freeware but certainly not in
FileMaker given the price of the product.
Yvan KOENIG (from FRANCE vendredi 12 juin 2009 16:57:46)
Le 12 juin 2009 à 16:03, Don Fuller a écrit :
Would this have more to do with Big Endian to Little Endian byte
ordering. I believe that correlate to switching from PPC to Intel
x86 hardware.
--Don
--- On Fri, 6/12/09, Yvan KOENIG <email@hidden> wrote:
From: Yvan KOENIG <email@hidden>
Subject: FileMaker oddity ?
To: "liste AppleScript US" <email@hidden>
Date: Friday, June 12, 2009, 8:47 AM
Hello
I wrote a script passing styled datas from AppleWorks to FileMaker
Pro.
--[SCRIPT]
tell application "AppleWorks 6"
activate
tell document 1
select menu item 7 of menu 3 (* Select All *)
select menu item 4 of menu 3 (* Copy *)
end tell
end tell
tell application "FileMaker Pro"
activate
go to field 1 of last record of document 1
do menu menu item 7 of menu 3 (* Paste *)
end tell -- FileMaker
--[/SCRIPT]
It behaves well on my G5 under 10.4.11
but, on macIntel machines, the fonts aren't passed.
I found a workaround:
I first paste in a TextEdit document
copy from this TextEdit document
then paste in FileMaker.
For the same chunk of text,
azertyu
on PPC, the clipboard's record is:
styled Clipboard text:«data styl
0003
00000000 001B 0014 0015 0000 0018 0000 0000 0000
00000003 001B 0014 0016 0000 0018 EEEE 0000 0000
00000005 001B 0014 0015 0000 0018 0000 0000 0000
», string:"azertyu"
on Intel, the clipboard's record is:
string:"azertyu",
scrap styles:«data styl
0300
00000000 1B00 1400 1500 0000 0018 0000 0000 0000
03000000 1B00 1400 1600 0000 0018 EEEE 0000 0000
05000000 1B00 1400 1500 0000 0018 0000 0000 0000
»"
The difference is the way numbers are stored.
My guess is that the culprit is FileMaker which, on Intel machine
fails to grab the string + scrap styles components of the clipboard.
I feel that this script demonstrates what I say:
The TextEdit's clipboard's record is:
{Unicode text:"azertyu",
styled Clipboard text:«data styl
0003
00000000 0018 0012 0015 00FF 0018 000000000000
00000003 0018 0012 0016 00FF 0018 C8D524F41403
00000005 0018 0012 0015 00FF 0018 000000000000»,
string:"azertyu",
uniform styles:«data ustl
0000 0002 0000 0174
0000 0000 0000 0014
0000 0030 0000 0003
0000 0003 0000
0000 0000 0002 0000
0001 0000 0002 0000
0002 0000 0003 0000
006C 0000 0004 0000
0000 0000 0000 0000
0102 0000 0001 0000
0000 0000 0105 0000
002C 6E61 6D64 0000
0024 0000 0001 0000
0004 0000 0001 0000
0000 0000 0000 0000
0009 48656C766574696361 00 0000 {Helvetica}
0000 0106 0000
0004 0018 0000 0000
0107 0000 0006 0000
0000 0000 0000 0000
0068 0000 0004 0000
0000 0000 0000 0000
0102 0000 0001 0000
0000 0000 0105 0000
0028 6E61 6D64 0000
0020 0000 0001 0000
0004 0000 0001 0000
0000 0000 0000 0000
0007 436F7572696572 00 {Courier}
0000 0106 0000
0004 0018 0000 0000
0107 0000 0006 C8D5
24F4 1402 0000 0000
006C 0000 0004 0000
0000 0000 0000 0000
0102 0000 0001 0000
0000 0000 0105 0000
002C 6E61 6D64 0000
0024 0000 0001 0000
0004 0000 0001 0000
0000 0000 0000 0000
0009 48656C766574696361 00 0000 {Helvetica}
0000 0106 0000
0004 0018 0000 0000
0107 0000 0006 0000
0000 0000 0000»
,
«class ut16»:"azertyu",
«class utf8»:"azertyu",
«class RTF »:«data RTF
7B5C727466315C6D61635C616E736963706731303030305C636F636F61727466383234
5C636F636F617375627274663438300A7B5C666F6E7474626C5C66305C667377697373
5C666368617273657437372048656C7665746963613B5C66315C666D6F6465726E5C66
63686172736574373720436F75726965723B7D0A7B5C636F6C6F7274626C3B5C726564
3235355C677265656E3235355C626C75653235353B5C7265643233385C677265656E30
5C626C7565303B7D0A5C706172645C74783536305C7478313132305C7478313638305C
7478323234305C7478323830305C7478333336305C7478333932305C7478343438305C
7478353034305C7478353630305C7478363136305C7478363732305C716C5C716E6174
7572616C5C7061726469726E61747572616C0A0A5C66305C66733438205C6366302061
7A650A5C6631205C6366322072740A5C6630205C6366302079757D»}
--[SCRIPT]
(* on entry the clipboard contains a chunck of text copied from
TextEdit *)
set intelInside to (do shell script "sysctl -n hw.byteorder") = "1234"
set clipRec to the clipboard as record
if intelInside then
set newRec to {«class utf8»:«class utf8» of clipRec, uniform
styles:uniform styles of clipRec}
else
set newRec to {string:string of clipRec, styled Clipboard
text:styled Clipboard text of clipRec}
end if
set the clipboard to ""
set the clipboard to newRec
tell application "FileMaker Pro"
activate
go to field 1 of last record of document 1
do menu menu item 7 of menu 3 (* Paste *)
end tell -- FileMaker
--[/SCRIPT]
If I pass the utf8 + uniform styles to Filemaker on PPC machines it
fails
If I pass the string + styled Clipboard Text to FileMaker on Intel
Machines, it fails
If I pass the RTF component, it fails on both.
Why FileMaker is it rejecting the string + styled Clipboard Text
set on Intel machines, I don't know.
Yvan KOENIG (from FRANCE vendredi 12 juin 2009 15:47:20)
-----Inline Attachment Follows-----
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40bellsouth.net
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
_______________________________________________
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