How could I display a dialog attached to a window?

If there is a way to do this, how could I, in Xcode 5, cocoa applescript? Something like:
Display dialog "Hello Red_Menace" attached to MyWindow
I know sheets can do this, but this seems a lot more simple, because I wouldn't have to design a window and link it.

I saw what you did there...
You don't necessarily need to create another window for simple alerts, you can use the NSAlert class.  I think there is still some weirdness with sheets, so the easiest way to do a sheet would be to use Myriad Helpers, which has a category that adds some methods to the NSAlert class, for example:
tell Cocoa's NSAlert's makeAlert_buttons_text_("Alert", {"OK"}, "Hiya,  Apple_For_The_Win" & return & "This sheet will give up after 10 seconds")
  showOver_calling_wait_(mainWindow, {"sheetDismissed:", me}, 10)
end tell
on sheetDismissed_(theButton) -- the sheet has been dismissed
  # whatever
end sheetDismissed_
The completion handler (sheetDismissed in this case) is called when the sheet is dismissed, and is passed the name of the button (or 'Gave Up').

Similar Messages

  • How could i display  india as  i  n  d i a in rowize

    how could i display india as i n d i a in rowize in oracle query
    output
    i
    n
    d
    i
    a
    (i am newbiee to this forum ,i dont know on which category i should post this question is there any general category for orcle questions?)
    thanks

    Hi,
    Welcome to the forum!
    1008045 wrote:
    how could i display india as i n d i a in rowize in oracle query
    output
    i
    n
    d
    i
    aHere's one way:
    WITH     got_target     AS
         SELECT     'India'     AS target
         FROM     dual
    SELECT     SUBSTR (target, LEVEL, 1)     AS letter
    FROM     got_target
    CONNECT BY     LEVEL     <= LENGTH (target)
    ; (i am newbiee to this forum ,i dont know on which category i should post this question is there any general category for orcle questions?)This is the right place for questions like this, and for any question like "If I have this data ... then how do I get these results ... in SQL?"
    Take a few minutes now to read the forum FAQ {message:id=9360002}; it has lots of good tips.

  • How i can display default error message in alert window

    how i can display default error message in alert window
    i.e.,
    i have a text field with datatype Alpha
    if i am giving numbers.etc then it is displaying
    FRM-50001: Acceptable characters are a-z,A-z and space
    I want to display this message in alert window
    please tell how to do this

    In the on-error trigger :
    Capture error_code and error_text in a variable.
    Set the alert title to something meaningful.
    Set the alert message equal to the captured error information.
    Display the alert.
    declare
    v_alert varchar2(100) := 'ERROR' ; -- name of alert to use
    v_title varchar2(100) := 'Error !' ; -- text to display as title
    v_msg varchar2(200) := error_code || ':' || error_text; -- message to display
    v_btn number ; -- button pressed
    begin
    set_alert_property( v_alert, TITLE, v_title );
    set_alert_property( v_alert, ALERT_MESSAGE_TEXT, v_msg );
    v_btn := show_alert( v_alert );
    end;
    ----------

  • How could i download drivers for imac mc814 for windows 7 ? and from where ?

    how could i download drivers for imac mc814 for windows 7 ? and from where ?

    If you are trying to run MS Windows in Boot Camp then please post in the correct forum, the Boot Camp forum. That is where the Windows guys hang out.

  • How to increase display time of Toast notifications in Windows 10?

    Hi,
    I want to know how to increase display time for Windows toast notification in Windows 10.

    On Thu, 2 Apr 2015 09:08:12 +0000, david hk129 wrote:
    Start > left side, Settings > Ease of Access > left side, Other options > at Show notification for, change the time .
    If the OP is asking about the notifications generated by the new
    Notifications Center feature then the above won't do any good. The above
    setting only impacts the old style notifications generated by applications
    that have icons in the system tray area of the task bar.
    Paul Adare - FIM CM MVP
    "The most amazing achievement of the computer software industry is its
    continuing cancellation of the steady and staggering gains made by the
    computer hardware industry." -- Henry Petroski

  • How can i display a dialog view centerly?set_window_position has no effect

    hi ,all
    i try to open a dialog which is a normal view,
    here is the code i use,
    CALL METHOD cl_wdr_runtime_services=>display_view_in_popup
            EXPORTING
              component             = component
              target_view_name      = 'V_BP_MAIN'
              target_window_name = 'W_BP_MAIN'
         MODAL                 = ABAP_TRUE
               window_title          = ''
               close_button          = abap_true
            IMPORTING
               popup_window          = popup_window
    the first time the window i opened displayed is centered ,but if i open it twice or more
    the window is in the left corner of screen,i tried to use popup_window->set_window_position( position = if_wd_window=>CO_CENTER  ).but it has no effect at all
    can anyone help me out?
    thanks in advance.

    thanks for your answer.
    I did set  the height  and width of rootuielementcontainer of the dialog view .i,e,width:1200,height 700,
    It display pretty well the first time,but when i open it the second time,the dialog view is not centered,so i can't see the whole dialog view,i have to drag it,

  • How could I display some columns in a JTable?

    Help, please:
    I got a Table data(using AbstractedTableModel), and I can display all rows and columns. How can I just display several columns and all rows? Should I delete some columns from table and fireChanges or what? but I need these columns later. Make sense? any ideas?
    Thanks for any helps.
    Royan

    this worked for me,
    import java.util.*;
    import java.io.*;
    import java.net.URL;
    import java.sql.*;
    import javax.swing.table.*;
    import javax.swing.*;
    public class HideTableColumns
          public HideTableColumns()
          private void initialize()
          DefaultTableModel m = new DefaultTableModel();
          try {
             java.util.Vector data = new java.util.Vector();
             java.util.Vector headers = new java.util.Vector();
             String s = "";
             headers.addElement( "OrderID" );
             headers.addElement( "CustomerID" );
             java.util.Vector datum = null;
             datum = new java.util.Vector();
             s = "OrderID";
             datum.addElement( s );
             s = "CustomerID";
             datum.addElement( s );
             data.addElement( datum );
             m.setDataVector( data, headers );
             for( int r = 0; r < m.getRowCount(); r++ )
                for( int c = 0; c < m.getColumnCount(); c++ )
                s = ( m.getValueAt( r, c ) ).toString();
                System.out.println( s );
          } catch( Exception e ) {
             System.out.println(e.getMessage());
             e.printStackTrace();
          JFrame f = new JFrame();
          JPanel p = (JPanel) f.getContentPane();
          JTable tb = new JTable( m );
          TableColumn col = tb.getColumnModel().getColumn(1);
          col.setPreferredWidth(0);
          col.setMinWidth(0);
          col.setMaxWidth(0);
          p.add( tb );
          f.pack();
          f.show();
          public static void main( String[] args )
          HideTableColumns d1 = new HideTableColumns();
          d1.initialize();
    }

  • How could i display yahoo mail in Portal UWL

    Hi,
    Can any one tell me how can i diaplay my yahoo mail in Portal UWL any connector is avilable to connect Portal to yahoo server.
    thanks in advance
    Chitta

    Hi Chittya,
    You can crate a URL iview by selecting the URL Iview template while creating a new iview. Pass the URL of your internet address in the URL Iview wizard. For more information on how to create and use URL Iviews check  <a href="http://help.sap.com/saphelp_nw70/helpdata/en/4c/eee2bedf3b4082b14a933e5ee63472/frameset.htm">this</a> helpful link.
    Regards,
    Ankit
    Reward points if helpful.

  • How could I display an image a day/week?

    Hi guys, I'm a cartoonist and mid level webdesigner. I'm trying to put together an app version of a folio/comics website. I wanted to know what my options are for putting in a new featured image per day/week. And what are my best options for delivering this type of content. Forcing them to update the latest version of the image isn't going to work very well.
    The three options as I see it, and might not be the best ones, are:
    1. Single edition app, html points at website to show updated index page with image.
    2. Multi edition app, push notification when download of new image is available.
    3. Embed all the images into a single edition version of the app, but only allow the user to see the latest image on specific calendar dates.
    What are my other options and how would I implement them for iOS?
    The only other feature I wanted was to be able to point or link people back to my webstore if they wanted to purchase prints of the image they are viewing.
    I would really appreciate all the help I can get.

    Option #1 is the way to go, and the way customers do this in DPS. A good example is National Geographic that does rich, updating, pages with photos in their monthly issues using the web overlay to point to HTML somewhere. It's the easiest way to do it.
    If you intend to submit this to Apple, a word of warning: if all your Single Edition app does is host a web control that renders your web page they are likely going to reject the app. You have to have real, rich, interactivity in the application and lots of content to navigate through as part of the app.
    Neil

  • How do I display search results in a new window?

    Our current search feature (http://mainedreamvacation.businesscatalyst.com/business-search) displays the search results in the same page. When someone clicks to see the details page, the goes "back" the browser displays an alert asking the user if they want to re-submit the form.
    Is there a way for the search results to display in a new window? My hope is that by loading results into a new window, a user could click to see the detail, then return without the alert message.
    I'm open to simply suppressing the alert message, but I don't think that's possible.
    I should point out that this is NOT a site search. Also, I have tried  {module_webappsresults,,_blank} without success.
    Thanks!

    Hi Tim,
    The approach would be similar to customizing this for normal site search. 
    You'll need to locate the page where you inserted the web app search access the html and locate the pageID in the form action.  Use the same method found in the site search to apply the specific page.
    - http://helpx.adobe.com/business-catalyst/partner/add-search-form.html> Point to the results page
    **Ensure you please the {module_webappsresults} on the custom page to have the content display as well. 
    Kind regards,
    -Sidney

  • How to keep display on in low light for windows 8 installed on macbook pro retina display

    I am using macbook pro retina display 15". The Screen switches off in Windows 8 in low light conditions.
    How do i resolve this issue?

    Hi,
    Thanks for the reply,
    But I already knew how to manage GPO of a remote computer via MMC, which I have even explained about it in my query. 
    I'm looking for the possibilities and methods of using GPMC to Manage GPO of a remote computer.

  • How could I config TNS to use SQLPLUS in Windows NT

    I have installed the ORACLE in Linux, and I installed the Oracle8i Client on a Windows NT computer. But I could not use the SQLPLUS in Windows NT. The error message is: ORA-12560: TNS: Protocal Adapter error.
    I have test the connection between the Windows NT and Linux computer, and it seems good. Alos, I can start the OEM on Windows NT computer, and it runs ok.

    It sounds like Net8 wasn't set up properly on the NT client. Run the Oracle Net8 Assistant to tell the NT client how to connect to your Linux server.

  • How to re-show a dialog with the parent window

    I am writing an Menu drivern application:
    -- A JCMDIPane is put in the JFrame.
    -- Multiple JCMDIFrames are added to the JCMDIPane via menu selecting events
    -- Each JCMDIFrame (call it parent) may pop up a Dialog window (child) (Thes dialogs are modal)
    Here is my problem:
    When you switch away from this Java application to other applications (reading mauls, editing word documents, surfing web), of course, the Java program is hiding behind these applications and only left a Icon on your taskbar. The problem is that when switch back from other application to this Java program, However, it only shows the parent window (the JCMDIFrame ) and the child (the dialog) is behind. You have to using Alt_Tab to get the focus on the child and show it.
    My question is:
    Is there any way can we show the Dialog window is on the parent window (as it originally shown)?
    I have tried to overwriting the paint method of JCMDIFrame :
    public void paint(Graphics g)
    super.paint(g);
    if(child != null && child.isShowing())
    child.setVisible(true);
    This works on other applications but not on the Internet Explore (It always show the dialog).
    Anybody can give me a clue?
    Thanks!

    When you pop up a dialog, if you use the constructor:
    Dialog(Frame owner, boolean modal);
    and pass it an instance of the parent frame (and set "modal" to "true"), then it is my understanding that it should always appear in front of the parent - are you sure this is what you are doing?
    Double check by doing myDialog.getOwner() and make sure it's not null.

  • How could I turn off the Command Key to Windows Key mapping in Remote Desktop for Mac 8

    I'd like to be able to turn the Command key->Windows key mapping off.  In this new app, whenever I use the Command key to initiate a Mac-side function, it registers a press of the Windows key within the Remote Desktop session.  Speaking only
    for myself, I use the Command Key for quite a lot of Mac operations, while my need and expectation for a Windows key press is zero.

    I'd like to be able to turn the Command key->Windows key mapping off.  In this new app, whenever I use the Command key to initiate a Mac-side function, it registers a press of the Windows key within the Remote Desktop session.  Speaking
    only for myself, I use the Command Key for quite a lot of Mac operations, while my need and expectation for a Windows key press is zero.
    Agreed. Cannot stop it by disabling the "Windows" key (from within Windows 7). Every time I Cmd-Tab to change apps, the Start Menu pops up,
    and persists, overlaying other app windows. Much more than annoying.
    Also, there is no Clipboard Sharing, apparently. Love typing in long binary strings into the Registry.

  • How can BPC display the property in report input schedule

    When create a property, if the InApp is check, we can use the property in the MDX Query, however what is the best way to display the property in report and input schedule?
    Although we can use the EvPRO function, but according the definition of EvPRO
    "The EvPRO (Property value) function returns the value of a specified property for a specified member."
    for example =EVPRO("Finance","Sales","Currency") will returns USD, if the currency value for the member Sales is U.S. dollars., if I have a property group for account dimension, how could I display the value of group for all the account number?

    Hi
    you just use EVPRO like you mentioned:
    =EVPRO(Finance,$D20,group)
    In the cell $D20 your account number is displayed. You copy this function down for each account.
    -> just create an input schedule or report from a template, open the configuration panel. There you see this principle used for property High Level, Calc, ...
    D
    this method is perfect but you need to add the formula each time.
    I would prefer to use the formula using the after or before range in expansion options of evdre which would make it dynamic and you need not copy paste the formula to derive the property each time.
    Cheers
    Thanks and Regards
    Harish B K

Maybe you are looking for

  • ORA-600 [17069] error while running catrelod.sql to downgrade 11g database

    Hi, We are downgrading our 11.2.0.2 database to 10.2.0.4. We have successfullly run catdwgrd.sql without any errors in 11g env. While running catrelod.sql in 10g env we are facing the following error: SQL> @?/rdbms/admin/catrelod.sql TIMESTAMP COMP_T

  • Photosmart 7960w printer- which driver/procedure to work with Windows 7 64-bit

    RE: HP Photosmart 7960w printer- any success with a driver or workaround to use with Windows 7 64-bit? There seem to be three options on the HP site, but it's not clear at all what will work.

  • Mail sends question marks in place of spaces?

    My e-mails intermittently are received on PC's with question marks in place of spaces I typed. When I send myself test e-mails everything looks fine. What gives? Winks Mac Mini   Mac OS X (10.4.4)  

  • How to grab the view that comes from Onyx?

    Hello,   i started using Onyx project recently. That's really amazing what it does. I am wondering if there is some possibility to check the main view ... let my try to explain this. I want to change option for esxi5 box - advanced/Logging to externa

  • Itunes deletes Podcats I want to keep

    Hello, I download video podcasts on to my Ipod. Video-Podcasts I want to keep in Itunes after I have watched them, are being deleted from the Ipod and my computer, after syncing. I have highlighted the settings: Episodes to keep: All episodes, but it