Interface builder, running script when app opens

Hi!
I am trying to expand my wake script, so I have thrown it into xcode. What my wake script does is that it opens itunes and start to slowly turn up the volume, then it updates my ipod and does a few other things.
Now this works great in script editor, I launch this app with a script which is launched by iCal.
The first thing I want to do in xcode is to have a "I am awake" button (also called cancel…). And the only way I have gotten this to work is to have the script like this:
on clicked theObject
beep
try
tell application "iTunes" to pause
end try
quit
end clicked
on activated theObject
-- the script.
end activated theObject
The reason for using activated is that this is the only handler that I have found that lets me push the cancel button. (If I for example try to use "on launched" the whole script will run, then I can push cancel, kinda defeats the purpose…).
Any ideas?
ahh, ****, it seems that even the activated handler doesn't work. It looks like I can push cancel, but I can't!
Message was edited by: Oystbjoe

Once you've pushed "buttonOne" you enter your "repeat" loop and never get out... which also means that your code never returns from your "on clicked" handler. As long as you're stuck inside your "on clicked" handler your app will not receive any more clicked events. Hence your app never gets notified of the second click on your "Cancel" button.
Your previous post indicates you are wanting to be able to start some process (ie your repeat loop) with "buttonOne" but then potentially cancel it before it completes. From a programming standpoint that's not always easy to do... with AppleScript or any other programming language. In some cases it can be fairly difficult. And even if it's not difficult it may not be straightforward.
One way you might be able to do this with AppleScript, depending on what your "processing" entails, is to make use of an "on idle" handler. Your "on idle" handler will be called automatically and periodically. By default "on idle" gets called every 30 seconds but you can change that by returning a positive number from your "on idle" that represents the number of seconds between calls.
Something like this might work, but it's going to depend on whether you can break the work you're wanting to do into chunks such that you can do a little bit at a time and potentially stop between chunks due to a click on the "cancel" button.
property doSomeProcessing : false
on clicked theObject
set n to name of theObject
if n = "butonOne" then
set doSomeProcesing to true
return
end if
if n = "cancel" then
set doSomeProcessing to false
return
end if
end clicked
on idle
if doSomeProcessing then
beep
-- or do a _small chunk_ of the actual work you want to do
end if
return 1
end idle
Basically your button clicks just turn a flag on or off indicating whether you need to be doing some processing or not. All of the actual processing is done in small chunks inside your "on idle" handler. So each time your idle handler gets called you check the value of the flag. If you're supposed to be doing some processing then you do a little bit of work and return. NOTE that the "return 1" statement in the "on idle" handler is what changes the default of every 30 seconds so that it gets called every second.
I created an AS Studio application with the code above. And I also created a separate plain vanilla AppleScript that tells the AS Studio to have one or the other of the buttons to "perform action" (as indicated in my earlier post). By running the plain vanilla AppleScript I'm able to trigger the AS Studio app to start/stop beeping every second. So whether or not you can do this mainly depends on what you're trying to accomplish and whether or not it can be broken into chunks that can be done within an idle handler.
Steve
PS - also note that in an AS Studio application you need to activate the "idle" handler in Interface Builder in a manner similar to how you activated the "clicked" handler for your buttons. Select the "Application" icon in the MainMenu.nib window then click the "idle" checkbox in the AppleScript Info Panel.

Similar Messages

  • 40+ processes running with no apps open; automatic reboot at least once a day post 4.4.2 update. What is going on?

    Ever since I went through the update process for my Galaxy S4 to Kit Kat, 4.4.2, my phone is constantly running 40+ invisible processes that eat up most of the 2GB of ram. Needless to say, this is also causing my battery to drain 3 times faster or more than it used to prior to the update. I have Powersaving Mode turned on, constantly clear RAM and always double check to make sure I am not accidentally leaving any apps open. Additionally, my phone reboots itself at least once per day. NONE of this occurred before the 4.4.2 update. I am hoping someone here or from Verizon can possibly shed some light on the matter.

        Hello CharlesDW,
    Help is just a posting away! Let's get your device working properly. May I ask have you completed a reset after the update? I suggest this to resolve a the initial issues with the update. Here's a link on how to do so. As always, we suggest backing up your info before the factory reset.
    http://www.hard-reset.com/samsung-galaxy-s4-hard-reset.html
    Thank you…
    ArnettH_VZW
    Follow us on Twitter @VZWSupport

  • Auto run sql script when DB opens

    Is it possible to configure a DB so a given SQL script is run each time the database opens?
    Thanks a lot in advance.

    rafadc wrote:
    Is it possible to configure a DB so a given SQL script is run each time the database opens?
    Thanks a lot in advance.Either include the script in a startup script for the database, dbstart on *nix you'd need to write your own on windows, or else move the code into a startup trigger.
    Niall Litchfield
    http://www.orawin.info/

  • Run scripts when program launches and quits?

    Howdy all!
    Skipping the details: I need to run an AppleScript when a specific program launches and run another AppleScript when that program quits. Anyone know of a free/easy way to do this? (A custom script would work great but my knowledge of AppleScript is limited.)
    I have found a few programs that can do this but have yet to find the "perfect" one. For example: In the past I have jury-rigged ControllerMate to do it, but this is for a new computer and I don't want to spend $25 for this simple purpose. I also found Do Something When but the program hasn't been updated in 6 years so I am hesitant to use it.
    Any other thoughts on free programs or where I could find info for a custom script?
    Matthew

    You will need to use something that can observe NSWorkspace events.  An Applescript can be used, how easy depends on the OS you are using (if you are still using Leopard, you will need to use Xcode).   Do Something When still works, as far as I can tell. 

  • Can't open ID or AI from doc, even when app open...help!

    Hi there
    I'm running CS 5 (on OS 10.6.8) and when i click on the ID or AI icons in the dock, they don't respond. They're active/on, but the applications do not repond. I need to force quit a dozen times a day. PS and Bridge are fine. Has this heppened to anyone else?
    Guin

    Hi Guiniveve,
    Definitely one of the first things you should do (apart from trashing your Indesign preferences) is to close all but the system fonts and see if that improves things.
    Good luck
    Mal

  • I've downloaded the upgrade and indicated "run"but when I open firefox it says I do not have the latest version. What do I do.

    my question just about says it all. DOn't know what else you want. I have a Windows Vista and have been using FIrefox for at least 4 yeas.

    Hi lonepinemax, it's good you have options! Firefox 22 doesn't run plugins where the page sets them to '''hidden="true"'''. I don't know whether there is any chance of that changing, so hopefully the site will update soon.
    ''Edit: Just learned this will change in Firefox 23. Details below.''

  • Run script when system shutdown

    Hi Community,
    I know the possibility in snow leopard to execute a script during system boot by using a launchd script located in /Library/LaunchDeamons or ~/Library/LaunchAgents but how can I configure a script which become executed on a system shutdown?
    Thanks in advance & Bye Tom

    Well then that is /etc/rc.local.shutdown that I believe you want. It won't trigger a shutdown, but on next restart, your commands will have been done. I just made a text file for /etc/rc.local.shutdown to cp from one file to another. Then I restarted manually and file was copied.
    http://discussions.apple.com/thread.jspa?threadID=2214781&start=0&tstart=0
    http://discussions.info.apple.com/message.jspa?messageID=11226121
    http://www.google.com/search?rls=ig&hl=en&source=hp&q=rc.shutdown.localonmac&aq=f&aqi=&aql=&oq=&gsrfai=Cd4_sLWFETIzHK4zEiQOP4fjFCQAAAKoEBUQoQO5

  • I want app B to run when I open app A and I want app B to quit when I quit app A

    Hello
    I have an idle script that handles iTunes. I want the script to run when I run iTunes and quit when I quit iTunes.
    At the moment my workaround are two separate scripts, "zactivate" & "zquit"
      activate application "iTunes"
      activate application "albumArt"
    quit application "albumArt"
    quit application "iTunes"
    I use spotlight to launch these but I would like to open and quit iTunes "normally" and have the same effect as the above scripts.
    Please help me. I am a novice.

    Normally AppleScript will not run automatically when you open or quit any given app - they're completely unrelated events.
    However, if you already have an idle script, then you can amend your script to periodically poll to see if app1 is running and then launch/quit app2 based on the results. Something like:
    on idle
      tell application "System Events" to set processList to name of every application process
      if processList contains "iTunes" then
      -- iTunes is running, so make sure your secondary App is:
      if processList does not contain "albumArt" then
      launch application "AlbumArt"
      end if
      else
      -- iTunes is not running, so quit the secondary app
      if processList contains "albumArt" then
      tell application "AlbumArt" to quit
      end if
      end if
      return 30 -- check again in 30 seconds
    end idle
    The basic idea here is to periodically check to see if iTunes is running. Based on that, either launch or quit albumArt to keep them in sync.
    Lowering the return value from the above 30 seconds will have the check performed more frequently. You can run it as often as you like based on how long you're prepared to tolerate the apps being in a different run state.

  • Run a script on file open?

    I realize there is a way to run scripts when AI launches, but is there a way to run a script when AI opens a file?

    Hi Mordy,
    Sorry, I replied the same thing below as the other post and not sure if you would go back so... :)
    Thanks a lot for your reply. Thats ALMOST exactly what I need and so close to what I have been stressing over its unreal...
    ...although because I am not opening a new template and I am opening a direct tiff image from video footage I previously rendered out in after effects to then run my script on in illustrator for the additional tiff's, I would need a similar sort of thing that way around instead?
    Would you know if that is possible?
    Thanks again for your help with this...

  • Xcode and Interface Builder

    Hello,
    I want to make a thing in Interface Builder so that when I click on the About "My Application" menu in the Menu Bar at the top a new window comes up.
    What I did, was made a new window (HUB) then, deselected Visible at Launch. I did all the linking stuff with applescript and when I tested (Apple - R) it showed up! Any idea why and how to fix this problem?
    Thanks!
    P.S. My app is an AppleScript app
    And also, if you can, how do you "export" your finished apps from Xcode?

    bubblejelly wrote:
    I want to make a thing in Interface Builder so that when I click on the About "My Application" menu in the Menu Bar at the top a new window comes up.
    Umm, OK. But you should get an "About" window by default without having to do anything. Are you saying you want another window too, or a different window than the default one?
    What I did, was made a new window (HUB) then, deselected Visible at Launch. I did all the linking stuff with applescript and when I tested (Apple - R) it showed up! Any idea why and how to fix this problem?
    HUB? Not sure what that means.
    Did you do the Apple-R in Xcode or in Interface Builder? "Test Interface" (or Apple-R) in Interface Builder is not the same as "Build and Run" (Apple-R) in Xcode. In IB if your "not visible" window is open when you do the Apple-R then it will also be open when the interface test is in progress. None of your AppleScript code gets executed when you're testing in IB.
    If you were doing the Apple-R in Xcode then I don't know. Post some of your AppleScript code.
    Steve

  • Interface Builder Assertion Failure at initialization/startup

    Interface Builder appears to be unusable...
    I get four (4) alert messages at the start of running Interface Builder:
    ====
    Interface Builder encountered an internal logic error. Choose "Continue" to continue running Interface Builder in an inconsistent state. Choose "Crash" to halt Interface Builder and file a bug with Crash Reporter. Choosing "Crash" will result in the loss of all unsaved data.
    ====
    Selecting (Show Details) I get:
    ====
    Assertion Message: Interface Builder encountered an error communicating with the iPhone Simulator. If you choose to file a crash report or radar for this issue, please check Console.app for crash reports for "Interface Builder Cocoa Touch Tool" and include their content in your crash report.
    IBUIViewImageRequester failed to rasterize a UILabel, UIButton, UITextField, and UISegmentedControl.
    Exception name: NSInternalInconsistencyException
    Exception reason: [NOTE: this exception originated in the server.]
    Invalid parameter not satisfying: font != nil
    Exception backtrace:
    0. CoreFoundation 0x30279dfb [NSException initWithName:reason:userInfo:]
    1. libobjc.A.dylib 0x92750e3b objcexceptionthrow
    2. CoreFoundation 0x3028e5fb CFReadStreamGetBuffer
    3. Foundation 0x305b0594 [NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
    4. UIKit 0x309fe074 [UILabel setFont:]
    5. UIKit 0x309fec08 [UILabel _commonInit]
    6. UIKit 0x309fd13c [UILabel initWithFrame:]
    7. Interface Builder Cocoa Touch Tool 0x00008655 [UIView initWithMarshalledValues:orderedKeys:marshallerClassNames:andMarshallerInstanti ationContexts:globalMarshallingContext:]
    8. Interface Builder Cocoa Touch Tool 0x0000b307 [IBCocoaTouchToolObjectPackage dealloc]
    9. Interface Builder Cocoa Touch Tool 0x0000b80f [IBCocoaTouchToolObjectPackage initWithData:]
    10. Interface Builder Cocoa Touch Tool 0x0000a5a1 [IBCocoaTouchToolObjectPackage dealloc]
    11. Interface Builder Cocoa Touch Tool 0x00002c74 [IBCocoaTouchTool produceImageForRequest:]
    12. Interface Builder Cocoa Touch Tool 0x00002445 [IBCocoaTouchTool produceImagesForRequests:]
    13. CoreFoundation 0x3024a10d CF_forwarding_prep0
    14. CoreFoundation 0x30249ff8 [NSInvocation invoke]
    15. CoreFoundation 0x3026eaf8 [NSInvocation invokeWithTarget:]
    16. CoreFoundation 0x3026e094 [NSDate initWithTimeIntervalSinceNow:]
    17. CoreFoundation 0x3024a0a2 CF_forwarding_prep0
    18. CoreFoundation 0x3024a10d CF_forwarding_prep0
    19. CoreFoundation 0x30249ff8 [NSInvocation invoke]
    20. Foundation 0x3053e15d [NSConnection dispatchInvocation:]
    21. Foundation 0x3053c307 [NSConnection handleRequest:sequence:]
    22. Foundation 0x3053ba13 [NSConnection handlePortCoder:]
    23. Foundation 0x3053b5be [NSConcretePortCoder dispatch]
    24. Foundation 0x3053ae33 [NSDOStreamData bytes]
    25. CoreFoundation 0x30246e79 CFRunLoopRemoveObserver
    26. CoreFoundation 0x30245560 CFRunLoopRunSpecific
    27. CoreFoundation 0x30244628 CFRunLoopRunInMode
    28. Foundation 0x30535525 [NSRunLoop runMode:beforeDate:]
    29. Interface Builder Cocoa Touch Tool 0x000020af [IBCocoaTouchTool startServingForPortName:]
    30. Interface Builder Cocoa Touch Tool 0x00002e77 [IBCocoaTouchTool produceImageForRequest:]
    Exception info:{
    Backtrace:
    0. Interface Builder 0x00004d29 [IBApplication handleAssertion:inFile:onLine:]
    1. IBCocoaTouchPlugin 0x16622659 [IBAssertionShim reportMarshallingFailure:]
    2. Foundation 0x9002b9bc [NSRunLoop getCFRunLoop]
    3. CoreFoundation 0x93ac9595 CFRunLoopRunSpecific
    4. CoreFoundation 0x93ac9c78 CFRunLoopRunInMode
    5. HIToolbox 0x91f3428c BlockUntilNextEventMatchingListInMode
    6. HIToolbox 0x91f33fde BlockUntilNextEventMatchingListInMode
    7. HIToolbox 0x91f33f19 BlockUntilNextEventMatchingListInMode
    8. AppKit 0x906e4d0d _DPSNextEvent
    9. AppKit 0x906e45c0 [NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
    10. Interface Builder 0x0000276b [IBApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
    11. AppKit 0x9092192b [NSApplication _realDoModalLoop:peek:]
    12. AppKit 0x9091c069 [NSApplication runModalForWindow:]
    13. InterfaceBuilderKit 0x00382511 [IBDetailedAlert runModal]
    14. Interface Builder 0x00004dd6 [IBApplication handleAssertion:inFile:onLine:]
    15. IBCocoaTouchPlugin 0x16622659 [IBAssertionShim reportMarshallingFailure:]
    16. Foundation 0x9002b9bc [NSRunLoop getCFRunLoop]
    17. CoreFoundation 0x93ac9595 CFRunLoopRunSpecific
    18. CoreFoundation 0x93ac9c78 CFRunLoopRunInMode
    19. HIToolbox 0x91f3428c BlockUntilNextEventMatchingListInMode
    20. HIToolbox 0x91f33fde BlockUntilNextEventMatchingListInMode
    21. HIToolbox 0x91f33f19 BlockUntilNextEventMatchingListInMode
    22. AppKit 0x906e4d0d _DPSNextEvent
    23. AppKit 0x906e45c0 [NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
    24. Interface Builder 0x0000276b [IBApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
    25. AppKit 0x9092192b [NSApplication _realDoModalLoop:peek:]
    26. AppKit 0x9091c069 [NSApplication runModalForWindow:]
    27. InterfaceBuilderKit 0x00382511 [IBDetailedAlert runModal]
    28. Interface Builder 0x00004dd6 [IBApplication handleAssertion:inFile:onLine:]
    29. IBCocoaTouchPlugin 0x16622659 [IBAssertionShim reportMarshallingFailure:]
    30. Foundation 0x9002b9bc [NSRunLoop getCFRunLoop]
    31. CoreFoundation 0x93ac9595 CFRunLoopRunSpecific
    32. CoreFoundation 0x93ac9c78 CFRunLoopRunInMode
    33. HIToolbox 0x91f3428c BlockUntilNextEventMatchingListInMode
    34. HIToolbox 0x91f33fde BlockUntilNextEventMatchingListInMode
    35. HIToolbox 0x91f33f19 BlockUntilNextEventMatchingListInMode
    36. AppKit 0x906e4d0d _DPSNextEvent
    37. AppKit 0x906e45c0 [NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
    38. Interface Builder 0x0000276b [IBApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
    39. AppKit 0x9092192b [NSApplication _realDoModalLoop:peek:]
    40. AppKit 0x9091c069 [NSApplication runModalForWindow:]
    41. InterfaceBuilderKit 0x00382511 [IBDetailedAlert runModal]
    42. Interface Builder 0x00004dd6 [IBApplication handleAssertion:inFile:onLine:]
    43. IBCocoaTouchPlugin 0x16622659 [IBAssertionShim reportMarshallingFailure:]
    44. Foundation 0x9002b9bc [NSRunLoop getCFRunLoop]
    45. CoreFoundation 0x93ac9595 CFRunLoopRunSpecific
    46. CoreFoundation 0x93ac9c78 CFRunLoopRunInMode
    47. HIToolbox 0x91f3428c BlockUntilNextEventMatchingListInMode
    48. HIToolbox 0x91f33fde BlockUntilNextEventMatchingListInMode
    49. HIToolbox 0x91f33f19 BlockUntilNextEventMatchingListInMode
    50. AppKit 0x906e4d0d _DPSNextEvent
    51. AppKit 0x906e45c0 [NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
    52. Interface Builder 0x0000276b [IBApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
    53. AppKit 0x906dd5fb [NSApplication run]
    54. AppKit 0x906aa834 NSApplicationMain
    55. Interface Builder 0x00004eca [IBApplication changeInspectorMode:]
    ====
    If I press (Continue) and then try to create any fields which need text, such as a label or button, I get the exact same alert window, and nothing "appears to work" as far as getting past this.
    Some background...
    I have no problems like this on my PPC development platform, just on my Intel-based system.
    Configuration:
    Intel hardware, 1.6 Ghz, 2GB, Mac OS/X 10.5.7
    Originally I installed the the devtools from: xcode3122621developerdvd.dmg
    and the 2.0 or 2.1 iPhone SDK, but never used Interface Builder (long story)
    When the final SDK for 3.0 came out, I installed that from:
    iphonesdk_3.0_leopard_9m2736final.dmg
    A few days ago, I said, OK, enough reading, I'm ready to start on my application, and fired up Xcode, created a new project and double-clicked on the .xib file to build my interface.
    That's when I first saw this problem... and now I'm stuck.
    What I've done since...
    #1) Deleted prefs for Interface Builder (ibtool), and XCode
    retried... same error
    #2) wiped /developer clean and resinsatlled from iphonesdk_3.0_leopard_9m2736final.dmg
    retried... same error
    retried #1, retried, same error
    #3) ran /Volumes/Olórin/Developer/Library/uninstall-devtools --mode=all
    rebooted
    checked international to make sure US/English was selected
    repaired disk permissions
    rebooted
    verified, no prefs files in ~/Library/Preferences or /Library/Preferences
    retried... same error
    HELP!!!

    ! ! ! - O M G - ! ! !
    {quote:title=reststop wrote:}
    #3) ran /Volumes/Olórin/Developer/Library/uninstall-devtools --mode=all
    {quote}
    I was about to post a reply which included the entire crash log for details... and saw this line:
    7/21/09 12:44:16 AM [0x0-0x28028].com.apple.InterfaceBuilder3[269] Couldn't read font cache (file://localhost/Volumes/Olo%C3%83%C3%85rin/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0. sdk/System/Library/.lilid/.lili).
    The file is there, so why can't it read it... uh oh, not exactly
    ... I typed /Olórin/ not /Olo%C3%83%C3%83rin/
    Apparently somewhere internal to Interface Builder, when it translates characters, it does it TWICE,
    so instead of 'ó' (that's 'option-e o', we have 'o%C3%83%C3%83' which may have worked if it had
    only been '%C3%83', without the extra o, or the extra %C3%83.
    I am so glad I found this, but I'm furious at Apple for making me rebuild my development system 3 times!
    ...someone really needs to do better QA on a product used by so many users.
    I changed the name of my disk from Olórin to Olorin and Interface Builder works fine!
    The PROBLEM all along was the name of my development disk ! ! !
    Someone at Apple, please NOTE!
    Someone please tell me how to report this, and maybe get Apple to hire me even if just for better QA!
    -Carl

  • "Run Scripts" giving a problem to create portal domain

    Hello All.
    I am new to weblogic portal development. Was trying to create my basic sample portal in weblogic_portal_10.3.4 with the help of documentation. I am getting in running scripts when I was creating the domain. I have followed the below steps, please help me if you find any issue with my steps.
    1. downloaded Weblogic_Portal_10.3.4 and installed in my windows 7 environment.
    2. launched eclipse for weblogic portal.
    3. opened portal prospective in eclipse.
    4. right click on server tab and selected "Oracle WebLogic Server 11gR1 (10.3.4)"
    5. opened "Domain Configuration Wizard"
    6. Selected "Create a new Weblogic domain" radio button.
    7. in the next screen for "Generate a domain configured automatically to support the following products"
    selected "Weblogic Portal 10.3.4" radio button
    8. in the next screen given the domain_name
    9. in the next screen provided the password/confirm-password for administrator user
    10. in the next screen selected JRocket SDK and development_mode for my domain.
    11. in the next screen just left all the default configuration for the datasources. ( non of the datasource is selected in their check boxes)
    12. in the next screen just clicked on "Next" button and "OK" on my popup
    13. in this screen "p13nDataSource" is selected on my left top window area, All 3 SQL Files are selected for loading database.
    Clicked on *"Run Scripts"*
    At this point i am getting an error saying : "CFGFWK-60839:  Database Load Failed!"
    java.lang.Exception: SQLException when executing file file:/C:/Oracle/Middleware/wlportal_10.3/p13n/db/derby/seq_drop_tables.sql
         at com.oracle.cie.domain.jdbc.JDBCDataLoader.load(JDBCDataLoader.java:183)
         at com.oracle.cie.wizard.domain.gui.tasks.JDBCConfigGUITask$LoadDatabaseThread$1.run(JDBCConfigGUITask.java:1673)
    Caused by: java.sql.SQLNonTransientConnectionException: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused: connect.
         at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
         at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
         at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
         at com.oracle.cie.domain.jdbc.JDBCConnectionTester.createConnection(JDBCConnectionTester.java:272)
         at com.oracle.cie.domain.jdbc.JDBCDataLoader.load(JDBCDataLoader.java:154)
         ... 1 more
    Caused by: org.apache.derby.client.am.DisconnectException: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused: connect.
         at org.apache.derby.client.net.NetAgent.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection.newAgent_(Unknown Source)
         at org.apache.derby.client.am.Connection.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection40.<init>(Unknown Source)
         at org.apache.derby.client.net.ClientJDBCObjectFactoryImpl40.newNetConnection(Unknown Source)
         at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
         at com.oracle.cie.domain.jdbc.JDBCConnectionTester.createConnection(JDBCConnectionTester.java:273)
         at com.oracle.cie.domain.jdbc.JDBCDataLoader.load(JDBCDataLoader.java:154)
         at com.oracle.cie.wizard.domain.gui.tasks.JDBCConfigGUITask$LoadDatabaseThread$1.run(JDBCConfigGUITask.java:1674)
    Caused by: java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
         at java.net.Socket.connect(Socket.java:529)
         at java.net.Socket.connect(Socket.java:478)
         at java.net.Socket.<init>(Socket.java:375)
         at java.net.Socket.<init>(Socket.java:189)
         at javax.net.DefaultSocketFactory.createSocket(SocketFactory.java:206)
         at org.apache.derby.client.net.OpenSocketAction.run(Unknown Source)
         at org.apache.derby.client.net.NetAgent.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection.newAgent_(Unknown Source)
         at org.apache.derby.client.am.Connection.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection40.<init>(Unknown Source)
         at org.apache.derby.client.net.ClientJDBCObjectFactoryImpl40.newNetConnection(Unknown Source)
         at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
         at com.oracle.cie.domain.jdbc.JDBCConnectionTester.createConnection(JDBCConnectionTester.java:272)
         at com.oracle.cie.domain.jdbc.JDBCDataLoader.load(JDBCDataLoader.java:154)
         at com.oracle.cie.wizard.domain.gui.tasks.JDBCConfigGUITask$LoadDatabaseThread$1.run(JDBCConfigGUITask.java:1673)
    CFGFWK-60839:  Database Load Failed!
    Please help me if you find any problem with the steps that I am following to create my weblogic_portal_domain.
    I was following the steps mentioned at : http://docs.oracle.com/cd/E15919_01/wlp.1032/e14252.pdf to create my domain to start portal development.

    Those are the WLP 10.3.2 instructions. But, the 10.3.4 instructions in the tutorial (http://docs.oracle.com/cd/E26806_01/wlp.1034/e14252/setup_dev_env.htm#i1014619) are wrong, too.
    In 10.3.4, with derby, Run Scripts doesn't work any longer; it should still work the other database (Oracle, SQL Server, etc.). Instead, for derby, just create the domain, accepting any warning dialogs about databases that come up. After that finishes, in the domain directory, run create_db.cmd (on windows) or create_db.sh (on *nix and Mac). It should create the derby database files in the domain, and include everything needed.
    I'll send a note to get the docs updated.
    Greg

  • The application Interface Builder quit unexpectedly

    Just installed the iPhone SDK and installed sample code. The Interface Builder will not start. At startup, the following message is displayed: "The application Interface Builder quit unexpectedly." I've tried the standard Xcode SDK and the interface builder has the same problem. I've repaired permissions on the disk, to no avail. I'm stumped on this.
    Here's the first section of the crash report, showing the builds for Interface builder and Mac OS (10.5.6).
    Process: Interface Builder [8090]
    Path: /Developer/Applications/Interface Builder.app/Contents/MacOS/Interface Builder
    Identifier: com.apple.InterfaceBuilder3
    Version: 3.1.2 (677)
    Build Info: InterfaceBuilder-6770000~1
    Code Type: X86 (Native)
    Parent Process: launchd [137]
    Date/Time: 2009-01-03 19:29:24.618 -0700
    OS Version: Mac OS X 10.5.6 (9G55)
    Report Version: 6
    Exception Type: EXCBADACCESS (SIGBUS)
    Exception Codes: KERNPROTECTIONFAILURE at 0x0000000000000011
    Crashed Thread: 0
    Thread 0 Crashed:
    0 com.apple.CoreFoundation 0x910272b4 CFRetain + 36
    1 com.apple.HIToolbox 0x911ff566 TThemeFont::SetCTFont(__CTFont const*) + 62
    2 com.apple.HIToolbox 0x911ff4f4 TThemeSpecifiedFont::Init(THIThemeTextInfo const*) + 32
    3 com.apple.HIToolbox 0x9110ccb3 ThemeFontCreate(THIThemeTextInfo const*) + 239
    4 com.apple.HIToolbox 0x9110cb85 TThemeText::ConstructThemeFontWithFontID(__CFString const*, THIThemeTextInfo const*) + 79
    5 com.apple.HIToolbox 0x9110ca49 TCoreTextEngine::Init(void const*, THIThemeTextInfo const*) + 159
    6 com.apple.HIToolbox 0x9110c781 TThemeTextCache::Create(void const*, THIThemeTextInfo const*) + 177
    7 com.apple.HIToolbox 0x9110c659 ThemeTextCreate(void const*, THIThemeTextInfo const*) + 33
    8 com.apple.HIToolbox 0x9110c3b5 DataEngine::GetTextDimensions(void const*, float, HIThemeTextInfo*, float*, float*, float*) + 289
    9 com.apple.HIToolbox 0x9110c250 HIThemeGetTextDimensions + 202
    10 com.apple.HIToolbox 0x912abbad HIClockView::CalculateTextDimensions() + 133
    11 com.apple.HIToolbox 0x912abd82 HIClockView::GetOptimalSizeSelf(CGSize*, float*) + 118
    12 com.apple.HIToolbox 0x9114852d HIView::SendGetOptimalBounds(CGRect*, float*) + 151
    13 com.apple.HIToolbox 0x9114846d HIView::GetOptimalSize(CGSize*, float*) + 53
    14 com.apple.HIToolbox 0x9119bd85 GetBestControlRect + 105
    15 ...terfaceBuilder.CarbonPlugin 0x162f127a IBWindowForHostingCarbonControls + 9638
    16 ...terfaceBuilder.CarbonPlugin 0x162f1b1f IBWindowForHostingCarbonControls + 11851
    17 ...terfaceBuilder.CarbonPlugin 0x162f2766 IBWindowForHostingCarbonControls + 14994
    18 ...terfaceBuilder.CarbonPlugin 0x162f37c8 IBWindowForHostingCarbonControls + 19188
    19 ...terfaceBuilder.CarbonPlugin 0x162eb17a 0x162e5000 + 24954
    20 com.apple.InterfaceBuilderKit 0x002c65e0 -[IBLibraryObjectTemplate classesOfPasteboardObjects] + 194
    21 com.apple.InterfaceBuilderKit 0x002c64b9 -[IBLibraryController typeSummaryForObjectTemplate:] + 106
    22 com.apple.InterfaceBuilderKit 0x002c5fc4 -[IBLibraryController createAssetForTemplate:inNamespace:] + 554
    23 com.apple.InterfaceBuilderKit 0x002c4fe3 -[IBLibraryController createAssetsFromTemplatesInNibNamed:forPlugin:] + 746
    24 com.apple.InterfaceBuilderKit 0x002c499e -[IBLibraryController loadLibraryObjectsForPlugin:] + 287
    25 com.apple.InterfaceBuilderKit 0x002c414e -[IBPlugin didLoad] + 480
    26 ...terfaceBuilder.CarbonPlugin 0x162ea66f 0x162e5000 + 22127
    27 com.apple.InterfaceBuilderKit 0x002c389f -[IBPluginController loadPluginAtPath:error:] + 2809
    28 com.apple.InterfaceBuilder3 0x00002345 0x1000 + 4933
    29 com.apple.AppKit 0x91f983a3 -[NSApplication run] + 83
    30 com.apple.AppKit 0x91f658a4 NSApplicationMain + 574
    31 com.apple.InterfaceBuilder3 0x00004eca 0x1000 + 16074

    I had customized the date & time formats in the International settings. Once I set those back to the default formats, Interface Builder runs just fine.

  • Manual coding vs. Interface Builder - iPhone

    I have most of an app done with IB and I've managed to get things to work mostly, but I did have a lot of problems with UIDatePicker and could only get it to work properly when creating it manually.
    I have some other strange bugs, like the Delete button sometimes animating accross the top of the window rather than on the row it's supposed to and based on my experience with the date picker, I don't know if that's a problem with my code or with using IB.
    Also, most of the sample code seems to create things manually.
    So, am I better off using Interface Builder for my iPhone apps, or creating everything manually in code? At this point I'm leaning towards doing everything manually.

    A lot of the sample code creates elements programmatically because Interface Builder didn't exist early in the beta. Others (like UICatalog) do it to make the view heirarchy more obvious.
    I usually recommend using Interface Builder wherever possible. Remember, there's nothing stopping you from altering IB-created views in your viewDidLoad method; just add outlets for the views you need to customize and connect them as needed. In my experience, it's usually easier to move parts of an application away from IB when you need to do so than it is to move them to IB to make them easier to maintain; working with pure code encourages certain design patterns (like not-really-needed view subclasses and custom constructors to avoid repetitive initialization code) that don't really play well with IB.

  • Run script with flag

    Hi guys,
    is it possible run a script if a flag cell is selected ??
    another question...
    is it possible run script when i print a table or when i save file ???
    Thank's

    syrahBau wrote:
    Hi guys,
    is it possible run a script if a flag cell is selected ??
    Numbers is unable to trigger a script by itself.
    So you are free to run a script by yourself if this or that attribute is set.
    another question...
    is it possible run script when i print a table or when i save file ???
    You are perfectly free to run a script which will save a document an do this or that action.
    For the print task, at this time the response is yes but no.
    If your document contains a single sheet containing a single table, you may run a script to print the document and do this or that task.
    If the document doesn't match the given requirements, a script will print the entire document which is not what you asked for.
    From my point of view, it would be a good idea to
    _Go to "Provide Numbers Feedback" in the "Numbers" menu_,
    explain them that you want a feature allowing Numbers to trigger a script
    like the MACRO() function available in AppleWorks.
    Then, cross your fingers, and wait _at least_ for iWork'11
    Yvan KOENIG (VALLAURIS, France) mercredi 30 juin 2010 12:40:08

Maybe you are looking for