Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird Xcode/Interface Builder behaviour in AppleScriptObjC



This happens from time to time when I copy a piece of code from a browser, try to edit it, I'll run into errors that just don't make sense, so I will paste the page into, or open it with BBEdit, and run Menubar --> Text --> Zap Gremlins... and most all the time that will resolve the problem.

It was such a nuisance sometimes that I wrote a small script that zaps the gremlins as I paste. Instead of CMD-V to paste from the web, I have assigned the little routine CMD-SHIFT-V, and that way when I use it it's already clean.

Best Regards,

Bill Hernandez
Plano, Texas

-- +---------+---------+---------+---------+---------+---------+---------+---------+
(*
Filename : paste_from_web
Author : Bill Hernandez
Updated - Sunday, November 1, 2009 ( 10:41 PM )
*)
-- +---------+---------+---------+---------+---------+---------+---------+---------+
tell application "BBEdit"
set myOptions to {search mode:grep, starting at top:true, wrap around:false, backwards:false, case sensitive:true, match words:false, extend selection:false}
activate
paste
zap gremlins text 1 of text document 1 zap action replace_with_code with non ASCII characters and controls
replace "\\\\0xA0" using " " searching in text 1 of text document 1 options myOptions
-- set properties of text window 1 to {show invisibles:true}
-- set properties of text window 1 to {show spaces:true}
select text 1 of text window 1
entab selection of text window 1 tab width 4
replace "  " using " " searching in text 1 of text document 1 options myOptions
end tell
-- +---------+---------+---------+---------+---------+---------+---------+---------+



On Nov 1, 2009, at 5:31 AM, Terence Heaford wrote:

John,

Thank you for your advice. I passed the problematic file through AppleScript editor, saved it as a text file then replaced the file in the Xcode project and now all seems well.

Thanks again

--Terry


On 1 Nov 2009, at 10:29, John Gaxiola wrote:

Terence;

   Try recreating the entire project exclusively in AppleScript. That may help.

Sincerely
 
John Gaxiola
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden

References: 
 >Weird Xcode/Interface Builder behaviour in AppleScriptObjC (From: Terence Heaford <email@hidden>)
 >Re: Weird Xcode/Interface Builder behaviour in AppleScriptObjC (From: Terence Heaford <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.