AppleScript: Our Friend. My (sometimes) Enemy. Why you should learn it.

Brian C. dvorak at omnigroup.com
Mon Feb 24 19:06:01 PST 2003


Okay. Steve knows what's going on, and we know when it'll be fixed.

Diagnosis:
> "make new row at end of rows" returns an object specifier for the new 
> row, something like "third row of root of first document".  When you 
> "indent theRow" then theRow might be "first row of second row of root 
> of first document" but the object specifier is still the old one.  So 
> "set value of cell 2 of theRow to "hi there"" fails because there 
> isn't a row where "theRow" says there is.

Prognosis:
We'll change this, but not right away; probably in the 3.0 timeframe. I 
futzed around trying to find a workaround, but eventually got stymied. 
Anyone with more talent than me have any luck?

  If you have any other questions or suggestions, please don't hesitate 
to contact me. When replying, please include the quoted text of this 
message. We really appreciate your help!

Sincerely,

Brian C.
Support Manager
Omni Group



On Friday, February 21, 2003, at 05:08  AM, Angus McIntyre wrote:

> Thanks for that. I now suspect that I may have hit a bug in OO. Try 
> the following:
>
> 	1. Make a new document in OO.
> 	2. Run the following script.
>
> tell first document of application "OmniOutliner"
>         set theRow to make new row at end of rows
>         indent theRow
>         set value of cell 2 of theRow to "hi there"
> end tell
>
> I get an error at the 'set value' instruction.
>
> 	3. Now switch the order of the 'set value' and 'indent'
> 	   instructions in the script. This time, the error occurs
> 	   at the 'indent'.
> 	4. Now comment out the 'indent': the script runs fine.
> 	5. Uncomment the 'indent' and comment out the 'set'. Again,
> 	   the script runs fine.
>
> Unless I'm being more than usually bone-headed, something is not right 
> here. This is on OO 2.2.1 beta - I haven't tried on the release 
> version.
>
> Angus
> -- 
> angus at pobox.com                             http://pobox.com/~angus
> _______________________________________________
> OmniOutliner-Users mailing list
> OmniOutliner-Users at omnigroup.com
> http://www.omnigroup.com/mailman/listinfo/omnioutliner-users




More information about the OmniOutliner-Users mailing list