Xcode-Show and Hide windows with checkbox?

I am making an applescript/cocoa application in Xcode 4.6. I in my Main Window, I have two windows that are hidden at launch ("Preferances", and "Advanced") and one window ("Simple") that is visible at launch. In the preferances window, I have a checkbox. I would like that box, when checked to display the "Simple" window, and Hide the "Advanced" window, and even when closed and relaunched, will remain how the preferances are, and not have to check the box everytime on startup of the app. Anyone know how to do this? Thanks!

Ok something isn't quit right
I in my Main Window, I have two windows that are hidden at launch ("Preferances", and "Advanced") and one window ("Simple") that is visible at launch. In the preferances window, I have a checkbox. I would like that box, when checked to display the "Simple" window, and Hide the "Advanced" window,
What do you mean by in the main window are two windows?  Also if the checkbox is in the preferences window and that is hidden at launch how do you get to it to check/uncheck it?
This checkbox basically toggles between the two windows? selected it displays the 'simple' window, when unchecked it displays the "Advanced" window?
This script
script AppDelegate
  property parent : class "NSObject"
    property ppw : missing value
    property isShowing : 0
          on applicationWillFinishLaunching_(aNotification)
  -- Insert code here to initialize your application before any files are opened
          end applicationWillFinishLaunching_
          on applicationShouldTerminate_(sender)
  -- Insert code here to do any housekeeping before your application quits
                    return current application's NSTerminateNow
          end applicationShouldTerminate_
    on displayButton_(sender)
        if (isShowing = 0) then
            ppw's orderFront_(sender)
            set isShowing to 1
        else
            ppw's orderOut_(sender)
            set isShowing to 0
        end
    end
end script
will toggle a second window from a button on the firsst window.
This is what the nib file looks like
ppw is attached to the panel.
This should get you started. Post back if you have more questions.

Similar Messages

  • Iframes show and hide

    Hi All,
    I have the Requirement like :
    I have two iframes side by side in a page, and two buttons show and hide,
    once i click hide button second iframe should disappear and first one should be increase in size to fit whole window. and once i click show first and second should be 50/50 in the page
    for this i followed below steps
    1) created page.
    2) created two report region (No Template)
    3) In one region source i called iframe like
    TABLE>
    <TR>
    <td>
    <IFRAME SRC="http://Localhost:7777/pls/apex/f?p=&APP_ID.:&P104_INTERFACE.:&SESSION." WIDTH=&P104_WIDTH. HEIGHT=540 scrolling="auto" frameborder="1"></IFRAME>
    </td>
    </tr>
    </table>
    4) in second region
    TABLE>
    <TR>
    <td>
    <IFRAME SRC="www.google.com ; HEIGHT=540 scrolling="auto" frameborder="1"></IFRAME>
    </td>
    </tr>
    </table>
    6)conditionally showing the region with the help of SHOW and HIDE BUTTON
    7)and also on Show and hide button i am setting the value of P104_WIDTH . So the size will vary with conditional display?
    NOW MY QUESTION IS:
    once i click hide button THE CONTENTS(item VALUES) OF THE FIRST FRAME ARE REFRESHED, DUE THAT ALL ENTERED DATA WIL DISAPPEAR SO HOW TO AVOID IT , without refreshing the frist frame i need to set the P104_width value so it interm width will set in the iframe region??????
    Thanks & Regards
    Nagaraj B K

    I had another idea that I am pursuing. I am looking into extending the current renderer CommandNavigationRenderer and will render another goLink just after the current goLink that will execute a close action. I was able to re-direct the rendering by added an override render-kit block in my current faces-config.xml file.
    <render-kit>
    <renderer>
    <component-family>org.apache.myfaces.trinidad.Command</component-family>
    <renderer-type>oracle.adf.rich.NavigationItem</renderer-type>
    <renderer-class>com.riscs.ui.backing.jsp.components.ClosableCommandNavigationItemRenderer</renderer-class>
    </renderer>
    </render-kit>
    If this works I am planning on extending the commandNavigationItem by creating a ClosableCommandNavigation tag and add a "closeAction" tag that will determine if a close item should render.
    Preliminary work looks promising. I will update if I make progress...please let me know if I am crazy.
    Thanks.

  • Show and hide columns.

    I have a rather large JTable with a lot of columns that are updated once in a while.
    Is there an easy way to show and hide columns, so that I don't have to keep track on which a shown and hide when I use setValueAt()...?

    JTable does the conversion between the column indexes of the view and the model.
    You should be able to add remove columns using addColumn and removeColumn methods. and in the TableColumn class you can specify the coulmn in the model that the TableColumn refers to.

  • Error in my show and hide button prg

    Hello Frnds,
    With this link tutorial iam doing now but error raised , and tried my best plz check the tutorial and solve my prb
    Method ONACTIONSHOW_HIDE
    *THIS IS CODE FOR SHOW AND HIDE THE INPUT FIED BUT GETTING ERROR IS
    **set_attribute_property doesnot exit similar ly get_attribute_property and set attribute is there like that getting error for this code
    . DATA lo_nd_radio_node1 TYPE REF TO if_wd_context_node.
    DATA lo_el_radio_node1 TYPE REF TO if_wd_context_element.
    DATA lw_index TYPE I.
    DATA lo_el_radio_node1_1 TYPE ref to if_wd_context_element.
    navigate from <CONTEXT> to <RADIO_NODE1> via lead selection
    lo_nd_radio_node1 = wd_context->get_child_node( name = wd_this->wdctx_radio_node1 ).* call method get lead selection index to get index
    CALL METHOD lo_nd_radio_node1->get_lead_selection_index
    receiving
    index = lw_index. lo_el_radio_node1_1 = wd_context->get_element( ). If lw_index = 1. * call method set attribute property and pass value as 'X' to show
    call method lo_el_radio_node1_1->set_attribute_property
    exporting
    attribute_name = 'FIRST_NAME_1'
    property = 1
    value = 'X'.
    call method set attribute property and pass value as 'X' to show
    call method lo_el_radio_node1_1->set_attribute_property
    exporting
    attribute_name = 'LAST_NAME_1'
    property = 1
    value = 'X'. Else. call method set attribute property and pass value as SPACE to HIDE*
    call method lo_el_radio_node1_1->set_attribute_property
    exporting
    attribute_name = 'FIRST_NAME_1'
    property = 1
    value = space.* call method set attribute property and pass value as SPACE to HIDE
    call method lo_el_radio_node1_1->set_attribute_property
    exporting
    attribute_name = 'LAST_NAME_1'
    property = 1
    value = space. Endif

    Hi Ananth,
    I tried the same code from that tutorial,its working fine.
    once again check the name of the nodes and the elements.
    you can try another way also to show and hide input fields.
    create one attibute of type WDY_BOOLEAN and bind this attribute to the visible property of the input fields.
    for example
    attibute name = 'visible ' : type = wdy_boolean :default value = X
    onaction of the radio button place the following code.it really works
      DATA lo_el_context TYPE REF TO if_wd_context_element.
      DATA ls_context TYPE wd_this->element_context.
      DATA lv_visible TYPE wd_this->element_context-visible.
      DATA lo_nd_radio_node1   TYPE REF TO if_wd_context_node.
      DATA lo_el_radio_node1   TYPE REF TO if_wd_context_element.
      DATA lw_index            TYPE i.
      DATA lo_el_radio_node1_1 TYPE REF TO if_wd_context_element.
      lo_nd_radio_node1 = wd_context->get_child_node( name = wd_this->wdctx_radio_node1 ).
      lo_el_context = wd_context->get_element( ).
      CALL METHOD lo_nd_radio_node1->get_lead_selection_index
        RECEIVING
          index = lw_index.
      lo_el_radio_node1_1 = wd_context->get_element(  ).
      IF lw_index = 1.
        lo_el_context->set_attribute(
      name =  `VISIBLE`
      value = 'X' ).
      ELSE.
        lo_el_context->set_attribute(
      name =  `VISIBLE`
      value = ' ' ).
      ENDIF.
    Thanks,
    krishna

  • SetVisible against show and hide

    Hello, making some practises I have observed that setVisible method doesn't just makes visible or not, it affects me when I change location of components I have played with setVisible, but when I use deprecated methods hide and show I haven't that problem.
    What else makes setVisible than make visible or not?

    Hello, the way I see it, setVisible is just a nicer way of setting visibility than show() and hide(). Anyway, the way setVisible is implemented in the Component class is :
    public void setVisible(boolean b) {
          show(b);
    }So I don't believe you should be experiencing any difference between show() and setVisible(). As to the change in positions of components, you might find the actual implementation useful:
        public void show(boolean b) {
            if (b) {
                show();
            } else {
                hide();
        public void show() {
            if (!visible) {
                synchronized (getTreeLock()) {
                    visible = true;
                    ComponentPeer peer = this.peer;
                    if (peer != null) {
                        peer.show();
                        createHierarchyEvents(HierarchyEvent.HIERARCHY_CHANGED,
                                              this, parent,
                                              HierarchyEvent.SHOWING_CHANGED,
                                              Toolkit.enabledOnToolkit(AWTEvent.HIERARCHY_EVENT_MASK));
                        if (peer instanceof LightweightPeer) {
                            repaint();
                        updateCursorImmediately();
                    if (componentListener != null ||
                        (eventMask & AWTEvent.COMPONENT_EVENT_MASK) != 0 ||
                        Toolkit.enabledOnToolkit(AWTEvent.COMPONENT_EVENT_MASK)) {
                        ComponentEvent e = new ComponentEvent(this,
                                                              ComponentEvent.COMPONENT_SHOWN);
                        Toolkit.getEventQueue().postEvent(e);
                Container parent = this.parent;
                if (parent != null) {
                    parent.invalidate();
        }I left out the hide() code, since it is quite similar. Anyway, if you are interested in this code you can always look it up - it's avaliable.
    Hope this helped, laginimaineb.

  • I am having a problem with pop pups and small windows with ads constantly opening up on my safari?? Thought that macs didn't get virus? this looks like one- any experts around? please help me fix it with your instructions? really don't know what to do...

    Hi everyone,
    I am having a problem with my Mac OS X 10.7.5 mac book air , there are constant pop pups and small windows with ads blinking constantly opening up on my safari in front of everything?? it is constantly interupting me and makes me mistakingly click on it then another new windows open behind the one im using..
    I am not too sure if thats a virus or trojan.. I always thought that macs didn't get virus? this looks like one to me… any experts around? please help me fix it with your instructions? really don't know what to do... thanks

    Those are not viruses. You have probably installed some malware:
    The Safe Mac » Adware Removal Guide
    Helpful Links Regarding Malware Protection
    An excellent link to read is Tom Reed's Mac Malware Guide.
    Also, visit The XLab FAQs and read Detecting and avoiding malware and spyware.
    See these Apple articles:
              Mac OS X Snow Leopard and malware detection
              OS X Lion- Protect your Mac from malware
              OS X Mountain Lion- Protect your Mac from malware
              About file quarantine in OS X
    If you require anti-virus protection Thomas Reed recommends using Dr.Web Light from the App Store. It's free, and since it's from the App Store, it won't destabilize the system. If you prefer one of the better known commercial products, then Thomas recommends using Sophos.(Thank you to Thomas Reed for these recommendations.) If you already use Sophos, then be aware of this if you are using Mavericks: OS X Mavericks- Sophos Anti-Virus on-access scanner versions 8.0 - 9.1 may cause unexpected restarts
    From user Joe Bailey comes this equally useful advice:
    The facts are:
    1. There is no anti-malware software that can detect 100% of the malware out there.
    2. There is no anti-malware that can detect anything targeting the Mac because there
         is no Mac malware in the wild, and therefore, no "signatures" to detect.
    3. The very best way to prevent the most attacks is for you as the user to be aware that
         the most successful malware attacks rely on very sophisticated social engineering
         techniques preying on human avarice, ****, and fear.
    4. Internet popups saying the FBI, NSA, Microsoft, your ISP has detected malware on
        your computer is intended to entice you to install their malware thinking it is a
        protection against malware.
    5. Some of the anti-malware products on the market are worse than the malware
        from which they purport to protect you.
    6. Be cautious where you go on the internet.
    7. Only download anything from sites you know are safe.
    8. Avoid links you receive in email, always be suspicious even if you get something
        you think is from a friend, but you were not expecting.
    9. If there is any question in your mind, then assume it is malware.

  • For the 2013 versions of macbook pro should I purchase 32 bit windows or 64 bit version to be able to install it on macbook and use windows with bootcamp?

    for the 2013 versions of macbook pro should I purchase 32 bit windows or 64 bit version to be able to install it on macbook and use windows with bootcamp?

    Then you might check at any of the other university book stores or software stores or any computer store in town for the 64-bit version.
    If you want to use the 32-bit version from the school (you probably get it for free or very cheap) then you could purchase Parallels and run it as a virtual machine concurrently with OS X. There are some caveats:
    1. You have to purchase Parallels (there may be an academic discount.) List is $79.95.
    2. Your computer needs minimally 4 GBs of RAM, but realistically 8 GBs would be better.
    3. Parallels creates a pseudo-drive on your hard drive. It could easily require 50 GBs of disk space.
    Accommodating these might be more costly than buying 64-bit Windows 7. And, if you look online you may find them with an academic discount (or may be able to order it through the school.)

  • Can I install lightroom on both a MacBook and a Windows with the same license??

    Can I install lightroom on both a MacBook and a Windows with the same license??

    Yes...the license is cross platform and allows 2 licenses installed (cross platform), not to be used at the same time.

  • Show and hide Lov icons and Date Picker image on conditional?

    How to show and hide Lov icons and Date Picker image on conditional?

    Why do you just want to make the icons conditional? Shouldn't the field also be conditional?
    Patrick
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/

  • I recently brought a mac and downloaded windows with the help of boot camp and by mistake i installed windows 7 ultimate version whereas i had the cd and serial key of windows home premium i started installing windows home premium from windows 7 cont...

    I recently brought a mac and downloaded windows with the help of boot camp and by mistake i installed windows 7 ultimate version whereas i had the cd and serial key of windows home premium i started installing windows home premium from windows 7 ULTIMATE then after the exctraction of files and everything the windows setup came and my mouse and keyboard stopped working and i dont know how to open mac os x there is no option anywhere?? what shall i do pls help!!!!if there are any keyboard shortcut key to open mac os x or boot camp pls mention.

    For Boot Camp issues please repost in the Boot Camp forum located by clicking Boot Camp

  • Open dialog box window with checkboxes for each child record - Please Help

    Hello Everybody
    I have a 10g form with master record and 20 child records. In the child record form, currently there is a “Notes” Editor, which pops up when user click the “Edit” button. In the “Notes” editor, user enters remarks if anything is missing. For example, typical remarks will be: Statement is missing, LOC paper is missing etc.
    Now, I would like to replace “Notes” editor with a dialog box. In the dialog box , I would like to add checkboxes with values “Statement is missing” and “LOC paper is missing” etc. along with “Notes” field. The user can select checkboxes. The value of the checkboxes should go in the “Notes” field with the ability to edit it. This way, user doesn’t need to type the most common notes every time.
    I have created a “NewNotes” dialog box with checkboxes and multiline text Item. It is pops up when I click on the button. I have also created to WHEN_CHECKBOC_CHANGED trigger for each checkboxes so that the its value will go in a multiline text item.
    But, I am not sure how I can link “NewNotes” dialog box to the each record in child record block. I would really appreciate it if anybody could give me some idea.
    Thanks,

    if i understand correctly you have a note item (based on table) on every child record? when you open the dialog box: how do you put data from notes to dialog box? in the same way as you can write it back ...

  • Data transfer B/W parent windonw and child window with out java script

    hi ,
    i am using h:outputLink Tag to open child window , i am unable to pass parent window text box value to child window with out java script , Here i am using two different backing beans for parent and child windows . Plz help me .

    Hi -- I pass details between pages regularly. The following has worked for me:
    ApplicationFactory factory = (ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
    ValueBinding binding = factory.getApplication().createValueBinding("#{beanName}");
    BeanName beanProperty = (BeanName) binding.getValue(FacesContext.getCurrentInstance());
    ... then set the you can set the values. Can't recall if I need to use SaveStates for the items. Probably if you use request scope beans.

  • Show and Share integration with MS SharePoint?

    Does Show and Share have any integration with Microsoft Share Point?  Customer is asking, I don't see anything.

    Dear
    yes of course you can , kindly cheeck the below datasheet and the integration will be through API
    http://www.cisco.com/en/US/prod/collateral/video/ps9339/ps6681/data_sheet_c78-477948.html.
    There is other option i just read about it few days ago  smarthub ASE.
    Thank you
    please rate if this will help

  • Show and Hide Actions Not Working

    I'm working on a project that involves showing and hiding objects.  I inserted a button and in the Action block for the object, I selected 'Show', then selected the object I wanted to be shown on click. When I preview that screen in the project and select the button to show the object, it shows the object, but then advances the project to the next screen. The only way I've found to combat this apparent flaw is to use an advanced action for what should be a really simple interaction. Also, I have the timing set for all objects on the screen in question to Display for the rest of the slide. Is anyone else experiencing this issue?

    Have a look at: Why choose Standard over Simple action? - Captivate blog
    As Rick points out, Captivate has always worked that way. And since you are talking about Hide/Show, very often you'll want to hide a group before showing one object. If  you are using Captivate 7/8 I recommend to create a shared action for that purpose that you can use over and over again in that project and in other projects.
    Dare to Share - part 1 - Captivate blog
    Reuse Shared Actions in other Projects - Captivate 7 vs. 8 - Captivate blog

  • JFileChooser show and hide

    I am using a jFileChooser to save a file in a selected location and then I use a check if the file exist to prompt an overwrite option dialog box. I do this like so....
    fileChooser.showSaveDialog(jPanel1);      
    File file = new File(fileChooser.getCurrentDirectory()+"/"+fileChooser.getName(fileChooser.getSelectedFile()) + ".jpg");
    filename = file.getPath();
    if (new File(filename).exists()) {   
            int n = JOptionPane.showConfirmDialog(this,
            "Do you want to overwrite?", "File Overwrite",
            JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
            if (n == JOptionPane.NO_OPTION)
                    showme(flag);          
    }The question I have is, Upon entering a filename and location in the file chooser and clicking the save button the filechooser goes away, if that file already exist the JOptionPane shows and a choice can be made, I want the JOptionPane to prompt over top of the file chooser. Right now when clicking save the fileChooser goes away, then an overwrite option can be made, if it is no the savedialog reappears, Does anyone know how to keep the filechooser shown until a file save of a non-existing file is chosen or a no overwrite option i sshown.
    BASICALLY: Does anyone know how to keep the filechooser component shown even when a optionPane component is shown? I don't want it to show and reshow.

    Why do you just want to make the icons conditional? Shouldn't the field also be conditional?
    Patrick
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/

Maybe you are looking for