AppleScript Studio - Huge .nib file?

I'm creating my first AppleScript Studio application, and I've noticed that one of the nib files used in the project has grown to a huge size (20MB)... and I'm wondering why, and whether this is normal?
(One other has grown to ~5MB, the other three are small ~50kB - around what I'd expect.)
I do have two buttons that show icons - but the files are small ~100kB each... not enough to explain 20MB worth of nib. (Besides, I thought that the icon files are stored separately - they are copied to the resources folder by XCode.)
It's not a huge concern at the moment, because everything works, and 20MB is not huge... I'm just concerned that such a simple App has an interface file that's 20MB (the entire app builds to 27.2MB, with 26.2MB of nibs... surely that's not normal?
Any ideas?
EDIT: Sorry, I should have mentioned that I'm using IB v 3.0 (629) on Leopard 10.5.2.
Message was edited by: OSXAlex

Michael,
I guess you should be able to do this using a shell script and "curl" - the one problem with curl is that it won't honor your system's proxy settings...
Andreas

Similar Messages

  • AppleScript Studio - Uploading a file

    How can I upload a file to a website using AppleScript?
    I have the following code to find the file on my system:
    set theFilePath to POSIX path of (choose file without invisibles)
    set content of text field "fileToImport" of tab view item "importData-Tab" of tab view "tabView" of window "mainWindow" to theFilePath
    Now I want to upload the file using POST to a website. Please Help!

    Michael,
    I guess you should be able to do this using a shell script and "curl" - the one problem with curl is that it won't honor your system's proxy settings...
    Andreas

  • AppleScript Studio: status bar and panel window

    My problem is that the panel won't open, and so I don't see the progress bar.
    All I am looking for is the panel to come down, show the progress bar turning, then for the panel to go away when iCal is done adding the event. This is the entire script, but I'm not sure I have everything right in Interface builder. The Documentation for display mentioned clicking panel ended, but then further down it looked like you didn't need it.
    I'm confused.
    -- +Event.applescript
    -- +Event
    -- Created by Michael Ewald on 6/26/06.
    -- Copyright 2006 Michael Ewald. All rights reserved.
    load panel "statusPanel" from nib "statusPanel"
    on clicked theObject
    -- Get & Format form items
    set eventTitle to contents of text field "eventTitle" of window "main" as string
    set eventLocation to contents of text field "eventLocation" of window "main" as string
    set EventNotes to contents of text view "eventNotesText" of scroll view "eventNotesScroll" of window "main"
    set allDay to state of button "allDay" of window "main"
    set startDate to current date
    set startDate to content of control "startDate" of window "main"
    set endDate to content of control "endDate" of window "main"
    -- Make Event
    start progress indicator "statusBar" of window "statusPanel"
    try
    start progress indicator "statusBar" of window "statusPanel"
    display "statusPanel" attached to window "main"
    tell application "iCal"
    set theCalName to "AppleScript Test"
    set theCal to calendar theCalName
    if allDay is equal to 1 then
    make new event at end of calendar theCalName with properties {summary:eventTitle, location:eventLocation, allday event:true, description:EventNotes}
    else if allDay is equal to 0 then
    make new event at end of calendar theCalName with properties {summary:eventTitle, location:eventLocation, start date:startDate, end date:endDate, description:EventNotes}
    end if
    end tell
    -- reset form
    set the contents of text field "eventTitle" of window "main" to ""
    set the contents of text field "eventLocation" of window "main" to ""
    set contents of text view "eventNotesText" of scroll view "eventNotesScroll" of window "main" to ""
    set state of button "allDay" of window "main" to 0
    set currentDate to current date
    set currentDatePlus to (current date) + 1 * hours
    -- Update Times
    set content of control "startDate" of window "main" to currentDate
    set content of control "endDate" of window "main" to currentDatePlus
    on error
    display alert "There was a problem!"
    end try
    close panel "statusPanel"
    end clicked
    ----

    Thanks for the response,
    right now the window is in a seperate nib file. I was
    trying to follow the applescript studio example
    "Display Panel"
    Then you need to load it, look at the example, you see panelWIndow is declared as property:
    property panelWIndow : missing value
    then inside on click handler:
    if panelWIndow is equal to missing value then
    load nib "statusPanel" -- if your nib is statusPanel.nib
    set panelWIndow to window "statusPanel" --> that's AppleScript window name
    end if
    then you can use:
    display panel panelWIndow attached to window "main"
    What is the advantage / disadvantage of having more
    than one nib file?
    Not a whole lot in simple app, because you have to load it to use it.
    But in more complex apps, the advantage is that you don't commit run time memory, if the users don't use it.

  • Applescript Studio Beginner - Run a script and display a window

    Hi,
    I am new to applescript studio ; I found out how to make an application displaying a window with a progress bar.
    How can I start running a script without displaying any window, and at some time in the script, run the "awake from nib" handler that will call the display of the progress bar ?
    Thanks,
    Nicolas

    Nicolas Silvestre wrote:
    How can I start running a script without displaying any window, and at some time in the script, run the "awake from nib" handler that will call the display of the progress bar ?
    The "awake from nib" handler is called automatically when your nib file gets loaded, you don't call it yourself. I suppose you could go thru the pain of putting your window into a separate nib file and then have your script load the nib file when you're ready... but that's not the easiest way to do it and you probably don't need to do this for your situation.
    All you really need to do is go into Interface Builder, select your window object and uncheck the checkbox in the "Window Attributes" pane that says "Visible At Launch". The "awake from nib" will still be called at it's normal time and your window will be loaded but it will not be displayed.
    Then you can do whatever other scripting you need to do... and when you're ready to display your window you simply call:
    show window "yourWindowsAppleScriptName"
    You can do your initial scripting at the beginning of "awake from nib" and then call "show window" at the tail end of "awake from nib" if that works for you. But you don't have to have the "show window" call in your "awake from nib"... you can call it later on in some other handler if you need to.
    Steve

  • Building a stand-alone AppleScript Studio application

    I’m taking a crack at building my first stand-alone application with AppleScript Studio. After many attempts to locate the needed “build” information in the various documentation resources I’m still pretty much poking around in the dark ...
    My application runs fine in the Xcode IDE. No problems. The application that Xcode saves in the project’s Debug folder runs too, (well, on the computer I developed it on) even if I move it out of its folder ...
    However, the app. doesn’t run on other macs. When double-clicked and it sorta fizzles without ever opening — wondering if the debug version relies on some resources within the project. I've installed it on a PowerBook and iBook, both running Mac OS 10.4
    I tried Build/Release. This also produced an application (in the Build/Release folder) which when failing to launch and causes the OS to burp, “You cannot open the application “My First App” because it may be damaged or incomplete.” This app will not run on my development computer or other laptops (PowerBook and iBook.)
    Build/Release also invoked three Xcode compiler error messages that seem to indicate that I need to change the NIB settings:
    /usr/bin/ld: warning /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/Cocoa.framework/Coco a cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
    /usr/bin/ld: warning /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/AppleScriptKit.frame work/AppleScriptKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
    /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored)
    Also got this warning(?):
    /usr/bin/ld: Undefined symbols:
    __keymgr_dwarf2_registersections
    _cthread_initroutine
    _atexit
    _errno
    _exit
    mach_initroutine
    _ASKInitialize
    _NSApplicationMain
    collect2: ld returned 1 exit status
    Also tried Clean All. Same result.
    I'm sure there's a simple step ... which I will remember well, 'cause I'm learning it the hard way.
    John

    However, the app. doesn’t run on other macs. When
    double-clicked and it sorta fizzles without ever
    opening — wondering if the debug version relies on
    some resources within the project. I've installed it
    on a PowerBook and iBook, both running Mac OS 10.4
    You're right. You can't move a debug version of the app to another computer unless you copy the entire project folder. The debug version of the app requires access to other by-products of the build process in order to run.
    Build/Release also invoked three Xcode compiler error
    messages that seem to indicate that I need to change
    the NIB settings:
    The following errors are not related to your NIB file. They indicate you're trying to link against the 10.3.9 frameworks on an intel CPU. The 10.3.9 frameworks are PPC only.
    /usr/bin/ld: warning
    /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Framew
    orks/Cocoa.framework/Cocoa cputype (18, architecture
    ppc) does not match cputype (7) for specified -arch
    flag: i386 (file not loaded)
    /usr/bin/ld: warning
    /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Framew
    orks/AppleScriptKit.framework/AppleScriptKit cputype
    (18, architecture ppc) does not match cputype (7) for
    specified -arch flag: i386 (file not loaded)
    /usr/bin/ld: warning fat file:
    /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSyst
    em.dylib does not contain an architecture that
    matches the specified -arch flag: i386 (file
    ignored)
    [snip]
    Take a look at the suggestions I made in this thread to make sure your project is set up to build a universal binary and to ensure that you're linking against the 10.4 universal frameworks.
    Steve

  • How can I use AppleScript Studio to display an image

    How can I use AppleScript Studio to display an image in a dialog?

    Add an image well to your window in Interface Builder.
    You can also add an image file to the Resources group of your Xcode project and then set the image to be displayed inside the image well directly in Interface Builder. No AppleScript code is needed if the image is contained within your app bundle and can be set ahead of time like this.
    If the image is contained in your app's bundle but you need to set or change the image at run time then you can use a line of AppleScript to load it into the image well using just it's filename:
    set image of image view "yourImageView" of window "yourWindow" to load image "YourImageFile.jpg"
    If you need to load an image from an arbitrary location outside your app's bundle then use a path to the image file...
    set image of image view "yourImageView" of window "yourWindow" to load image "/path/to/YourImageFile.jpg"
    Steve

  • Starting an applescript studio app

    I have written an applescript. I want to incorporate it into an applescript studio app........mainly to make use of the progress bar indicator. How do I get the script to start without having to click on any buttons. Thanks.

    Hook up your window (or the progress indicator) to the "awake from nib" handler in Interface Builder and insert your existing applescript code into the "on awake from nib theObject" handler that gets created in the AS Studio script.
    Steve

  • Installing Applescript Studio

    Hi,
    Where can I get AppleScript Studio? I can't find it preinstalled on my Mac Mini, nor on the MacOS X double CD. Is there some place I can download it without needing to get the full XCode or Dev Tools?
    Thanks!
    Raph

    AppleScript Studio is not a separate "tool"... it's more or less just a different type of project that you can create and build in Xcode. So you'll use Xcode for creating your AS Studio source files and building your product and you'll use Interface Builder for creating your user interface and connecting the objects in your interface to the AppleScript handlers that they trigger.
    I suppose it does seem like a big download if you are under the impression that AS Studio is just an extension of plain vanilla AppleScript. But in some ways AS Studio is almost more like an extension of Cocoa. An AS Studio app can make use of most or all of the user interface items that Cocoa can use and it can control/interrogate those items using handlers and properties that AS Studio provides. In addition, through the use of AS Studio's "call method" you can make direct calls to Cocoa methods to perform actions that AS Studio doesn't provide out of the box.
    Steve

  • AppleScript Studio projects under Snow Leopard

    I know Apple has depreciated AppleScript Studio, but the documents say old projects can still be used, so I assume there's a way to edit my old AS projects. I have the iPhone SDK with Xcode 3.2 and Interface Builder, but it doesn't recognize my AS project files (e.g., MyProject.pbproj). How do I get Xcode to open my old AppleScript Studio project files?

    The old .pbproj projects will probably need to be converted or opened in an older version of Xcode, which can be downloaded from Apple's Developer Member Site. The newer .xcodeproj AppleScript Studio projects can still be used in Snow Leopard (it is just not recommended), so if you have an existing project you can enable the AppleScript tab in Interface Builder - see the AppleScriptObjC Release Notes.

  • Help button question Applescript Studio

    Hi everyone!
    My help menu works just fine but to get my help button on the main window to work I set the default app for my file to Help Viewer. Then I script the open file command in Finder to open the file which is in my app bundle. It works fine and I was never able to get the cocoa command to open the help file to work with my button. My question is though I just realized that if I would click the help button multiple times it would open multiple windows of the same file in Help Viewer. That doesn't seem to be cool as I would hope it would realize the file is already open and not open the same file again? Any thoughts on how I can resolve this?
    If it helps here's a link to my past posts:
    http://discussions.apple.com/thread.jspa?threadID=693971&tstart=0
    Thanks for the help!
    Reg

    My help menu works just fine
    You don't say whether or not you changed the normal setup for the Help menu item to make it work "just fine"... Typically the help menu item has a connection in Interface Builder to the First Responder's showHelp: method. Assuming you did not change this, and this is what is working fine, then there's no reason that you can't also set up your help button to work in the same way (no AppleScript code would be needed).
    In Interface Builder...
    - First turn off the "on clicked" action for your help button in the AppleScript pane of the Inspector window (so clicking the button doesn't trigger any AppleScript code).
    - Then select your help button and <Control>-drag from the help button to the "First Responder" icon in the "MainMenu.nib" window. As you're dragging you'll see a blue line following the mouse.
    - Release the mouse button once the line goes from your button to the First Responder and you see a blue square surrounding the "First Responder" icon. This will cause the "Target/Action" pane to open in IB's Inspector window and you will see a long list of "Actions for First Responder".
    - Scroll down and highlight the "showHelp:" method then click the "Connect" button. A little circle will appear next to the "showHelp:" item indicating the connection has been made.
    - Save your nib file and rebuild your app.
    Now when you click on your help button it will do a Cocoa call to the First Responder's showHelp: method allowing it to work just like the help menu item.
    Steve

  • Starting mysql daemon hangs applescript studio app

    hi,
    i am currently writing a small application with applescript studio that starts an apache server and a mysql database.
    Starting apache via a 'do shell' command is no problem at all but starting mysql with this command
    do shell script "/pathto/mysqldsafe --port=2323 --somemoreoptions &"
    hangs my application.
    Executing the command in a shell works well.
    I guess the problem is that firing the command (in the terminal) causes the terminal to return to the command prompt (username:~ username$ ) pretty immediatley. But after one or two seconds there are some more information echoed to the shell ('Starting mysqld daemon with databases from pathto_datadir').
    Maybe this confuses my app and it starts waiting for things that will never end.
    My current workaround is to open the terminal and to execute the command there:
    tell application "Terminal"
      do script "pathto/mysqldsafe --port=3023 --somemoreoptions &"
      delay 1
      if terminalwasopen is equal to false then
        quit
      else
        close window 1
      end if
    end tell
    Any ideas how to get rid off this wokaround and how to manage this with a simple 'do shell script'?
    Thanks in advance.
    i++
    PowerBook Pro 15"   Mac OS X (10.4.7)  

    This issue is discussed in the do shell script technote.
    Specifically, even though you tell the process to background (by appending the &), AppleScript still holds onto the process' stdout and stderr, waiting for the output of the command.
    The solution is to suppress or redirect stdout and stderr, e.g.:
    do shell script "/pathto/mysqldsafe --port=2323 --somemoreoptions > /dev/null 2>&1 &"
    The '> /dev/null' suppresses stdout (which could go to a file if you prefer), and '2>&1' sends stderr to the same place as stdout.
    Incidentally, I assume you have some check to ensure apache and/or mysql aren't already active, right? This would cause a problem if mysql is already running.

  • Applescript studio app and plist???

    Hi everyone!
    If I have an Applescript studio app and I don't write anything to a plist is it still possible the app will make it's own plist for any reason? Seems to be but I can't tell for sure because seems not to be consistent. Any help would be great!
    Thanks,
    Reg

    On second thought, the plist file might be created if
    you display something. I just did a clean install so
    everything's new. Let me check with one of the apps
    that displays a an open dialog or something.
    Yes there are certain things in AS Studio that will write to a plist file. One example I know of is if you give any of your windows an "Auto Save Name" (in the "Attribute" pane of IB's inspector pane). The "Auto Save Name" will be used as the key to a plist entry that auto-saves the window's size and position on screen. When you re-run your app the window will be opened with the size and location stored in the plist.
    I believe kel may also be correct that if your app displays an open or save dialog then some state information about those dialogs will be saved to your plist.
    You can always use "plutil" to convert the plist file from binary to xml and then display the contents to see what's in there...
    <pre>
    plutil -convert xml1 /path/to/file.plist
    cat /path/to/file.plist
    </pre>
    Steve

  • AppleScript Studio Problems...

    I have documented some AppleScript Studio problems that I have encountered, along with some screenshots.
    Hopefully somebody might have a clue what is causing the problems.
    http://www.mac-specialist.com/r/as_studio.html
    I would be grateful for any insights,
    Bill Hernandez
    Plano, Texas

    Steve,
    This is the message I sent earlier with new findings:
    After I deleted "Smart Crash Reports.bundle" in /Library/InputManagers/, I rebooted, went to AS Studio to see if there were any problems, and guess what ?
    The Debugger started working. It's been broken as long as I can remember. Every time I've wanted to learn how to work with AS Studio since it came out, the Debugger has never worked, and I always ended up moving on to something else.
    This is awesome...
    Bill Hernandez
    Plano, Texas
    <hr>
    On Dec 24, 2006, at 5:27 PM, Steve Hayman wrote:
    Hi Bill.
    Make sure you're building a debug version of the project in order for breakpoints to work. In Xcode you set this with Project > Set Active Build Configuration > Debug .
    This was the very first thing I checked the other day when I started trying to learn AS Studio in earnest.
    Also I don't think those messages you are seeing about Smart Crash REports.bundle actually indicate that the app has crashed; it's just reporting that it can't load this bundle for some reason, and then proceeding anyway - I don't see anything that indicates your app has crashed.
    I read a long article at : http://daringfireball.net/2006/01/smartcrashreports
    and came away without a real solution. It was close to 3 am so I was barely awake, but came away confused as to what the solution was. I had used Unsanity's products particularly the menu product, but they caused too many problems with Quickeys and 4th Dimension. After talking to the people that write Quickeys, I disabled all their stuff and everything started working fine with Quickeys and 4D. They are far more important for me, that the Unsanity stuff.
    I agree with the Daring Fireball article, and am annoyed that Unsanity patches the OS without asking for permission. I won't buy their products any more.
    That bundle is something that certain third-party applications install which attempts to email crash reports for their apps back to their authors, rather than to Apple. I don't know what app you might have installed that included this but it would probably be safe to remove the bundle. (Double clicking on it wouldn't do anything; it's not intended to be double clicked; it just sits there and waits to be loaded.)
    After I wrote the original message I realized that it wasn't double clickable, but by then it was too late. I think it was probably Unsanity's APE, or FruitMenu.If you look at /Library/InputManagers/ there's an "info" file, and a "Smart Crash Reports.bundle". I just deleted both of them, if it causes a problem I'll copy them from another machine that doesn't have it. I'm not sure but I believe they patch the original one from Apple. I'm not sure if that is correct?
    <hr>
    On 22-Dec-06, at 8:54 PM, Bill Hernandez wrote:
    Wizards,
    I have documented some AppleScript Studio problems that I have encountered, along with some screenshots.
    Hopefully somebody might have a clue what is causing the problems.
    http://www.mac-specialist.com/r/as_studio.html
    I would be grateful for any insights,
    Bill Hernandez
    Plano, Texas

  • AppleScript Studio Quit Working

    Last December (2007) I followed the tutorials in the "Introduction to AppleScript Studio Programming Guide" to create a handful of demo projects, plus one of my own invention that actually worked!
    Today I sat down to resume my learning and I found that, while the target apps I had created still work, I cannot rebuild the projects. The error message is the same in every case:
    Tool:0: Command /usr/bin/gcc-4.0 failed with exit code 1
    Tool:0: /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit
    load command 19 unknown cmd field
    To reproduce the error, I...
    Open the project's folder
    Double-click on the <projectname>.xcodeproj icon
    Click the "Build and Go" button.
    Any idea what may have changed since last December?
    --Gil

    I just encountered a problem with my project that occurs under the same circumstances: open my project file, click on the build button, and it fails with the same error:
    /usr/bin/ld: /System/Library/Frameworks/WebKit.framework/WebKit load command 19 unknown cmd field
    collect2: ld returned 1 exit status
    I just ran an update to move to 10.4.11. I get the feeling that updated Webkit, and that's causing the problem. I'm on a PPC machine running XCode 2.1 but perhaps it's time to check out 2.5.
    For what it's worth, I found that I was still able to compile using "xcodebuild" on the command line. You might try giving this a shot. From the Terminal, cd into the project's directory; then execute "xcodebuild -alltargets clean && xcodebuild build" -- this will clean the current executable then build it.
    A couple questions for you: (1) What OS are you running? (2) What version of XCode? (3) What processor architecture (Intel or PPC)?
    That's all for now.. let me know how it goes..
    On a side note, I found your post through a Google search, and it's only a day and a half old... nice.
    (Update -- Ah... I see you solved the problem by upgrading to XCode 2.5.)
    Message was edited by: Krishen

  • Applescript Studio and Menus

    I am using Applescript Studio and Leopard.
    I have created an application that has menus in it. I can call the menus fine.
    For example, this works:
    on choose menu item theObject
    if (name of theObject is "Test Menu 1") then
    display dialog "You chose Test Menu 1"
    end if
    end choose menu item
    All I want to do is have the user make a choice from the menu, and based on that choice, call an external script. I'm stumped. Any help with this?
    on choose menu item theObject
    if (name of theObject is "Test Menu 1") then
    -- What goes here?
    end if
    end choose menu item

    Sample code.
    Note:
    Four (4) menu items were added to the projects' 'File' menu, and titled 'External Script "Eins"' (Command 1), 'External Script "Zwei"' (Command 2), 'External Script "Drei"' (Command 3), and 'External Script "Vier"' (Command 4).
    Four (4) script files were created ('Eins.scpt', 'Zwei.scpt', 'Drei.scpt', and 'Vier.scpt') and saved to the 'Desktop'. The 'Drei.scpt' and 'Vier.scpt' files were dragged to the projects 'Groups & Files' list into 'Resources'.
    -- Code starts here --
    on choose menu item theObject
    -- Example of calling scripts - external to the AppleScript Studio application.
    if ((name of theObject) is "externalScript01") then run script (((path to desktop from user domain) as string) & "Eins.scpt") as alias
    if ((name of theObject) is "externalScript02") then run script (((path to desktop from user domain) as string) & "Zwei.scpt") as alias
    -- Example of calling scripts - internal to the AppleScript Studio application.
    if ((name of theObject) is "externalScript03") then run script (((path to me) as string) & "Contents:Resources:Scripts:Drei.scpt") as alias
    if ((name of theObject) is "externalScript04") then run script (((path to me) as string) & "Contents:Resources:Scripts:Vier.scpt") as alias
    end choose menu item
    -- Code ends here --

Maybe you are looking for

  • Transit time in consignment fill-up

    Hi, As we know that after consignment fill-up in MMBE unrestricted stock become the consignment stock,but if stock take 3-4 days to reach the customer site.So this duration( transit time) how will we show in our system. Because system immediatly show

  • Database restore of Content and Cache Server on different SID

    Hi Experts, I am trying to do backup \ restore method, is it the correct way to do. if not, please suggest me the correct methodology. if yes, please let me know the procedure to restore the database on different SID Content Server and cache server w

  • Dynamic Actions with Multiple Actions Capability

    Dynamic Actions with Multiple Actions Capability How can I get Dynamic Actions to work on Actions that are stored solely on IT0302 due to the multiple relationship to a previous Action that is stored on both IT0302 and IT0000? When multiple actions o

  • Managing photos using iTunes

    From what I can tell I can only choose which photo's to put in my iPod by having a central 'root' folder that contains further folders with photos in them. I may then select to have only some of those folders sync'd or have all folders sync'd. Is tha

  • Submission to App Store Doesn't show Bundle ID from Flex iOS App

    We built an iOS app using Flashbuilder 4.6 and Air 3.6.  We provisioned iPads successfully and deployed to the devices. Everything worked great.  When we attempted to submit the app to the Apple iTunes Connect didn't show our Bundle ID in it's drop d