Re: [F-Script-talk] Bug? Multi-messaging gives different result
Brought to you by:
pmougin
From: Tommy S. <TO...@HE...> - 2008-07-13 17:30:04
|
On 13 Jul 2008, at 18:33, Philippe Mougin wrote: > Le 13 juil. 08 à 16:55, Tommy Sundström a écrit : > >> I've encountered an problem when using Scripting Bridge to control >> MindManager. (F-script 2.0 alpha 4) First some setup code: >> >> mindManager := SBApplication applicationWithBundleIdentifier: >> 'com.mindjet.mindmanager.7' >> d := mindManager documents objectWithName: 'Applescript, Python och >> andra sätt att styra macen' >> >> Then if I do like this: >> >> > (d topics) task >> >> I get a list of SBObjects, like this one: <SBObject @0xbe16a0: task >> of MindManagerTopic id "3CABF503-13D3-487B-BA14-7E000E6AA2B7" of >> MindManagerDocument "Mindmap" of application "MindManager" (1263)> >> >> But, if I do like this: >> >> > (d topics at:1) task >> >> I get a MindManagerTask object, like this one: <MindManagerTask >> @0xbd2120: task of MindManagerTopic 1 of MindManagerDocument >> "Mindmap" of application "MindManager" (1263)> >> >> I'm a F-script newbee, but am I correct in assuming that these two >> operations are supposed to result in the same type of objects? > > In most situations, this is correct. When using the Scripting > Bridge, however, what these two operations are supposed to result in > are "equivalent objects" (i.e., objects that will exhibit the same > behavior, at the application semantic level, when used further). In this case the objects are not equivalent, since the first version will not accept a percentComplete message, while the second one will. (It's however easy to make an workaround using a loop to extract all objects in the MindManagerTask format.) /Tommy |