Help needed to link up buttons on HUD Window to Applescript

Hi
I have very limited experience of XCode, though I did build a very simple application some time ago that appended text to the Comments field of the currently playing track in iTunes using Applescript. The design of this app was basically just a set of drop down menus.
I now want to redesign this as a HUD Window, and thought it best to start again. Unfortunately because it was a while ago I have forgotten the steps I took to design the original app and having done some reading and googling I am still stuck.
What I have done so far is to create a new Cocoa Application, design a HUD Window with all the necessary buttons in IB and add the Applescript from the original project to the Classes Folder in XCode. The AppleScript basically just consists of a series of arguments like this:
on tempo3_(aNotification)
tell application "iTunes"
set current track's comment to ((get current track's comment) & " " & "tempo:3")
end tell
end tempo3_
In the original document the Applescript was listed in the MainMenu.xib window in IB as an App Delegate and I could ctrl click on buttons/menu items and link them to the various applescript instances/arguments in the Applescript, but since I copied the applescript from the old project to the new it isn't showing up in the MainMenu.xib window, so I'm obviously missing out an important step, and wonder if someone could point me in the right direction.
Thanks
Nick

*AppleScript Studio* has been deprecated in Snow Leopard. You can still open and edit older projects, but the new framework is AppeScriptObjC. The regular AppleScript part of your project would be the same, but the way your script addresses the user interface (Interface Builder) is different in the new framework.
For an older project, you can enable the AppleScript Studio palette in Interface Builder (see the AppleScriptObjC Release Notes), and for a newer project there is a starting tutorial at MacScripter.net (see AppleScriptObjC in Xcode).

Similar Messages

  • Safari Upload file dialog box lets me click links and buttons on parent window.

    Safari Upload file dialog box lets me click links and buttons on parent window. I can even click Choose file button and open multiple Upload File dialog boxes. How can I show Upload file dialog box as modal?
    Operating system: Windows 7 and Windows XP.

    Safari Upload file dialog box lets me click links and buttons on parent window. I can even click Choose file button and open multiple Upload File dialog boxes. How can I show Upload file dialog box as modal?
    Operating system: Windows 7 and Windows XP.

  • Help with Re-Linking Navigation Buttons

    I have Adobe Flash CS3 Pro.
    I have a navigation header flash file that came with my website template and I am having difficulty making sense of the actionscript. It has a logo section with effects, 5 main nav buttons that move, and two extra link buttons above the navigation bar. Let’s focus on just the Navigation buttons for now. Here is what I have gathered. I have multiple text buttons on one movieclip, and I have successfully edited the text for each button. If I look at the actionscript in the top layer of this movieclip I see:
    “gotoAndStop(parent._parent.num);”
    I also have a separate movieclip symbol (with effects) with 5 buttons layers listed in the actionscript with the following actionscript tied to each button from numbers 1 through 5:
    onClipEvent (load) {
                num=1;
    onClipEvent (load) {
                num=2;
    onClipEvent (load) {
                num=3;
    onClipEvent (load) {
                num=4;
    onClipEvent (load) {
                num=5;
    On the top layer of these 5 buttons I have the following actionscript:
    stop();
    this["item"+_root.button].gotoAndPlay("s1");
    _root.link = _root.button;
    I also have a separate button symbol with the following actionscript:
    on (rollOver) {
                if (_root.link<>1) {
                            menu.item1.gotoAndPlay("s1");
    on (releaseOutside, rollOut) {
                if (_root.link<>1) {
                            menu.item1.gotoAndPlay("s2");
    on (release) {
                if (_root.link<>1) {
                            _root.menu["item"+_root.link].gotoAndPlay("s2");
                            _root.link = 1;
                            getURL("index.html");
    Now my website template came with 5 html pages that my flash navigation buttons correspond to: (index.html, index-1.html, index-2.html, index-3.html, index-4.html, index-5.html). My problem is that I have created new pages (index.html, about.html, featured.html, projects.html, contact.html). I would like each of the 5 buttons to correspond to these pages, not the existing standard “index-n.html” pages. 
    Also, this is probably not relevant, but each html page has something to this affect so I can see how they correspond to each button.
    <script type="text/javascript">
              var fo = new FlashObject("flash/menu_vf8.swf?button=2", "head", "100%", "144", "7", "");
              fo.addParam("quality", "high");
                        fo.addParam("wmode", "transparent");
                            fo.addParam("scale", "noscale");
              fo.write("head");
            </script>
    I guess my real question is: What actionscript do I need to update or remove for the nav button LINKS to work with my new html pages rather than the standard 5 index-n.html pages that it automatically wants to link to?
    When I try and add a “getURL” command to each of the 5 buttons and test preview the movie, the links work, but it messes up the effects of the movieclip. In other words, the buttons don’t move, they are motionless, however the links work. If I added this command to each button in some way, what actionscript would I need to remove so there weren’t any complications? I need some expert help here for it would be much appreciated. I am a novice with Flash script and its killing me that I can’t figure it out. I asked for help from the template support and all they came back with was the following message and it wasn’t helpful:
    You need to duplicate each button you are editing - it is very important.
    2) Update the scripting to look similar way:
    on (release) {
    if (_root.link<>num) {
    _parent["item"+_root.link].gotoAndPlay("s2");
    _root.link = num;
    if (num == 1) {
    getURL("index.html");
    } else {
    getURL("index-"+Number(num-1)+".html");
    Update it to:
    on (release) {
    getURL("http://www.google.com");
    Also, I read through the following discussion, which was helpful to a degree, but it still didn’t answer my questions about getting the links to work.
    http://forums.adobe.com/message/3614092#3614092

    First of all, thank you for showing interest and helping out in my dilemma here. I wish I understood your meaning behind “on” because with my luck there is probably some hidden way of placing script on an object that I don’t understand or haven’t discovered yet.
    This is what I know:
    I have multiple text buttons on one movieclip entitled “textbutton1” (see previous picture), and I have successfully edited the text for each button and created two extra frames/buttons to make 7 total. If I look at the actionscript in the top layer of this movieclip I see:
    “gotoAndStop(parent._parent.num);”
    But there is no action on each individual frame (all 7 of them) on that layer.
    Like I mentioned before I have a separate movieclip symbol (entitled “menu effect”) with 7 button movieclip layers listed in the actionscript with the following actionscript on each layer.
    onClipEvent (load) {
                num=1;
    onClipEvent (load) {
                num=2;
    onClipEvent (load) {
                num=3;
    onClipEvent (load) {
                num=4;
    onClipEvent (load) {
                num=5;
    onClipEvent (load) {
                num=6;
    onClipEvent (load) {
                num=7;
    On the top layer (layer 4 frame 25) of these 5 buttons I have the following actionscript:
    stop();
    this["item"+_root.button].gotoAndPlay("s1");
    _root.link = _root.button;
    I can upload another particular image of the movieclip/actionscript if it would be helpful. Let me know.

  • Help need on 'Link properties'

    Hi there,
    I have used the 'Add Attachment' to insert a .pdf into an Acrobat file I am working on. I have then used the Link tool to succesfully add a link to this inserted .pdf and configured it so that when the link is clicked it opens in a new window.
    I would like to know if it is at all possible to control the size and shape of the new window? Currently it always opens as a fully maximised window.
    I cannot see any options within the 'Go to a page in another document' options to specify this - all it has is:
    Open In:
    Window set by user preference
    New window
    Existing window
    The options below this only relate to Zoom.
    Does anyone know if this can be done?
    Thanks in advance for your help.
    Dave

    Hi,
    use the button "action" or "action listener" property to close the popup. Validation is processed after the apply request phase in the JSF lifecycle and thus comes before actions to be executed, which will be in invoke application phase.
    Frank

  • Adobe acrobat 8 standard - help neede with links!

    I have a document with over 3000 pages, I need to put a link at the bottom of each page which will link back to a certain page. Obviously I would like to do this without actually having to put the link on each individual page. Is there any way of duplicating the link???
    Any help would be greatly appreciated.

    Requires Acrobat pro to use a button to do it.
    Tools>forms>button
    place button and add a link action. Right-click the button and select duplicate and enter the page range.

  • Help needed in linked lists...

    I have been working on this computer assignment lately but I still don't understand linked lists yet..I did an assignment on array based implementation and now I am supposed to do the same thing in linked list implementation..
    I need help on how to change this into a linked list implementation..any help would be appreciated. Thank you..below is the code for the array based implementation..the only thing that needs change here is after where is says Array-based implementation of the ADT list.
    public class ListArrayBasedDriver {
      public static void main(String [] args) {
        ListArrayBased myGroceryList = new ListArrayBased();
        myGroceryList.add(1,"milk");
        myGroceryList.add(2,"eggs");
        myGroceryList.add(3,"butter");
        myGroceryList.add(4,"pecans");
        myGroceryList.add(5,"apples");
        myGroceryList.add(6,"bread");
        myGroceryList.add(7,"chicken");
        myGroceryList.add(8,"rice");
        myGroceryList.add(9,"red beans");
        myGroceryList.add(10,"sausage");
        myGroceryList.add(11,"flour");
        printList(myGroceryList); //print out original List
        System.out.print("numItems is now: " + myGroceryList.size() + "\n");
        System.out.println("adding juice for 5th item...");
        myGroceryList.add (5, (Object) "juice");  //add juice
        System.out.println("item 5 is: " + myGroceryList.get(5)); //get position 5
        printList(myGroceryList);
        System.out.print("numItems is now: " + myGroceryList.size() + "\n");
        System.out.println("removing juice...");
        myGroceryList.remove (5); //remove item at position 5
        printList(myGroceryList);
        System.out.print("numItems is now: " + myGroceryList.size() + "\n");
      public static void printList(ListArrayBased myList)
            //method prints a list, numbering the values,  e.g, "1.  milk" .... "5.  juice".... etc.
            int i;
            for(i=1; i <= myList.size(); i++)
                String tempString = new String((String)myList.get(i));
                System.out.println(i+" "+ tempString);
    // Array-based implementation of the ADT list.
    class ListArrayBased {
        private static final int MAX_LIST = 50;
        private Object items[];  // an array of list items
        private int numItems;  // number of items in list
        public ListArrayBased()
        // creates an empty list
             items = new Object[MAX_LIST];
             numItems = 0;
        }  // end default constructor
        public boolean isEmpty()
          return (numItems == 0);
        } // end isEmpty
        public int size()
           return numItems;
        }  // end size
        public void removeAll()
          // Creates a new array; marks old array for
          // garbage collection.
          items = new Object[MAX_LIST];
          numItems = 0;
        } // end removeAll
        public void add(int index, Object item) throws  ListIndexOutOfBoundsException
          if (numItems > MAX_LIST)
            throw new ListException("ListException on add");
        }  // end if
          if (index >= 1 && index <= numItems+1)
            // make room for new element by shifting all items at
            // positions >= index toward the end of the
            // list (no shift if index == numItems+1)
            for (int pos = numItems; pos >= index; pos--) {
              items[translate(pos+1)] = items[translate(pos)];
          } // end for
          // insert new item
          items[translate(index)] = item;
          numItems++;
          else
          {  // index out of range
            throw new ListIndexOutOfBoundsException(
             "ListIndexOutOfBoundsException on add");
          }  // end if
        } //end add
        public Object get(int index) throws ListIndexOutOfBoundsException
          if (index >= 1 && index <= numItems)
            return items[translate(index)];
          else 
          {  // index out of range
            throw new ListIndexOutOfBoundsException(
              "ListIndexOutOfBoundsException on get");
          }  // end if
        } // end get
        public void remove(int index) throws ListIndexOutOfBoundsException
          if (index >= 1 && index <= numItems)
            // delete item by shifting all items at
            // positions > index toward the beginning of the list
            // (no shift if index == size)
                for (int pos = index+1; pos <= size(); pos++) {
                    items[translate(pos-1)] = items[translate(pos)];
          }  // end for
          numItems--;    
          else
          {  // index out of range
            throw new ListIndexOutOfBoundsException("ListIndexOutOfBoundsException on remove");
          }  // end if
        } // end remove
        private int translate(int position) {
        return position - 1;
       } // end translate
    }  // end ListArrayBased
    class ListException extends RuntimeException
      public ListException(String s)
        super(s);
      }  // end constructor
    }  // end ListException
    class ListIndexOutOfBoundsException
                extends IndexOutOfBoundsException {
      public ListIndexOutOfBoundsException(String s) {
        super(s);
      }  // end constructor
    }  // end ListIndexOutOfBoundsException

    Could someone check for me if this will work and if it doesn't what I need to do to make it work..Thanks...
    public class ListArrayBasedDriver {
      public static void main(String [] args) {
        ListArrayBased myGroceryList = new ListArrayBased();
        myGroceryList.add(1,"milk");
        myGroceryList.add(2,"eggs");
        myGroceryList.add(3,"butter");
        myGroceryList.add(4,"pecans");
        myGroceryList.add(5,"apples");
        myGroceryList.add(6,"bread");
        myGroceryList.add(7,"chicken");
        myGroceryList.add(8,"rice");
        myGroceryList.add(9,"red beans");
        myGroceryList.add(10,"sausage");
        myGroceryList.add(11,"flour");
        printList(myGroceryList); //print out original List
        System.out.print("numItems is now: " + myGroceryList.size() + "\n");
        System.out.println("adding juice for 5th item...");
        myGroceryList.add (5, (Object) "juice");  //add juice
        System.out.println("item 5 is: " + myGroceryList.get(5)); //get position 5
        printList(myGroceryList);
        System.out.print("numItems is now: " + myGroceryList.size() + "\n");
        System.out.println("removing juice...");
        myGroceryList.remove (5); //remove item at position 5
        printList(myGroceryList);
        System.out.print("numItems is now: " + myGroceryList.size() + "\n");
      public static void printList(ListArrayBased myList)
            //method prints a list, numbering the values,  e.g, "1.  milk" .... "5.  juice".... etc.
            int i;
            for(i=1; i <= myList.size(); i++)
                String tempString = new String((String)myList.get(i));
                System.out.println(i+" "+ tempString);
    // Linked List-based implementation of the ADT list.
    class ListNode
         //class to represent one node in a list
         class ListNode
              //package access members; List can access these directly
              Object data;
              ListNode nextNode;
              //contructor creates a ListNode that refers to object
              ListNode( Object object)
                   this( object, null );
              } //end ListNode one-argument constructor
              //constructor creates ListNode that refers to
              // Object and to the next ListNode
              ListNode ( Object object, ListNode node)
                   data = object;
                   nextNode = node;
              // end ListNode two-argument contructor
              //return reference to data in node
              Object getObject()
                   return data; // return Object in this mode
              //return reference to next node in list
              ListNode getNext()
                   return nextNode; // get next node
              } // end method getNext
    } //end class ListNode
    //class List Definition
    public class List
         private ListNode firstNode;
         private ListNode lastNode;
         private String name; // string like " list " used in printing
         //contructor creates empty List with " list " as the name
         public List()
              this(" list ");
         } //end List no-arguement constructor
    //contructor creates an empty list with a name
    public List( String listName )
         name = listname;
         firstNode = lastNode = null;
    } //end List no-arguement contructor
    //insert Object at front of List
    public void insertAtFront ( object insertItem )
         if ( isEmpty() ) //firstNode and lastNode refer to same object
              firstNode = lastNode = newListNode( insertItem );
         else // firstNode refers to new node
              firstNode = new ListNode ( insertItem, firstNode );
    } // end method insertAtFront
    // insert Object at end of List
    public void insert AtBack ( Object insertItem )
         if ( isEmpty() ) //firstNode and lastNode refer to same object
              firstNode = new ListNode ( insertItem );
         else // firstNode refers to new node
         firstNode = new ListNode (insertItem, firstNode );
    } // end method insertAtFront
    // insert Object at end of List
    public void insertAtBack ( Object insertItem )
         if ( isEmpty() ) //firstNode and LastNode refer to same Object
              firstNode = lastNode = new ListNode ( insertItem );
         else // lastNode = lastNode.nextNode = new ListNode ( insertItem );
    } // end method insertAtBack
    //remove first node from List
    public Object removeFromFront() throws EmptyListException
         if( isEmpty() ) //throw exception if list is empty
         throw new EmptyListException( name );
         object removedItem = firstNode.data; //retrieve data being removed
    // update references firstNode and lastNode
    if (firstNode == lastNode )
         firstNode =lastNode = null;
    else
         firstNode = firstNode.nextNode;
         return removedItem; // return removed node data
    } //end method removeFromFront
    //remove last node from List
    Public Object removeFromBack() throws EmptyListException
         If ( isEmpty() ) // throw exception if list is empty
              throw new EmptyListException( name );
         Object removedItem = lastNode.data; // retrieve data being removed
         // update references firstNode and lastNode
         If ( firstNode == lastNode )
              firstNode = lastNode = null;
         else // locate new last node
              ListNode current = firstNode;
              // loop while current node does not refer to lastNode
              while ( current.nextNode != lastNode )
                   current = current.nextNode;
              lastNode = current; // current is new lastNode
              current.nextNode = null;
         } // end else
         return removedItem; // return removed node data
    } // end method removeFromBack
    // determine whether list is empty
    public boolean isEmpty()
         return firstNode == null; // return true if list is empty
    }     // end method isEmpty
    //output List contents
    public void print()
         if (isEmpty() )
              System.out.printf(�Empty %s\n�, name );
              return;
         System.out.printf(�The %s is: �, name );
         ListNode current = firstNode;
         //while (current != null )
              System.out,printf(�%s �, current.data );
              current = current.nextNode;
         } //end while
         System.out.println( �\n� );
    } //end method print
    } end class List

  • Help needed with link in AI

    I am creating packaging artwork file in Illustrator with an embedded link to a jpeg pattern element. However, when I print the layout the embedded link is missing. This also happened on a second file which printed out OK on first 2 tries, then the link was also missing from the 3rd printout. What am I doing wrong?
    I have many years experience working with Illustrator, this is the first time I have encoutered this problem, please help!

    CS4 on Mac OS X 10.5.6
    Lazer Printer NRG MP C
    The artwork is built up in layers as follows:
    1. Placed art background with clipping path (Jpeg created in Photoshop - no paths) embedded
    2. Additional ground colours
    3. box cutter
    4. additional graphics - logos, text, additional placed art (small images embedded which print OK??!)
    I embed placed images as I send ai artwork to print rather than PDF - the suppliers I work with are mostly China/India & they prefer ai files.
    All placed images are CMYK.
    I have tried re-creating the artwork from scratch, renaming the large link & replacing it in the boxart, removing the clipping path, flattening the artwork to a single layer. I can usually find a way round a problem, but this one has me & my colleagues stumped!

  • Help needed in refreshing a button array

    Hi,
    I am developing a GUI, in which window1 is in package pack1 & window2 in pack2. from window1, clicking "Add" button window2 appears.
    In window1, I am storing the content of a particular directory in my file system as a string array. So, each string in the string array is used as the label of a button in the button array. The no. of buttons corresponds to the no. of files in the directory. window1 is having a panel that displays the buttonarray.
    In window2, I have created a textfield and a "ok" button. whatever textinput(string) I give to the textfield, after clicking "ok" that is stored as a file in the directory, to which window1 refers for its buttons.
    My requirement is: During runtime, when I am creating new files thru the textfield of window2,those files need to be added to the panel of window1 dynamically updating the directory content.
    So, how can I refresh the panel in window1 after adding a file thru textfiels in window2.
    If anybody has any idea about this, please let me know soon.
    Regards.

    Hello,
    I have not got the solution. So, still I am waitiong for the answer.
    If you have any idea, please let me know.

  • Javascript help needed (confirmation for cancel button )

    Hi guys!
    I am not good at javascript but am going to improve shortly :-). Now i need very quick fix.
    I'm using <html:cancel> button in Struts 1.1 and I'm using without thinking the following code:
    <html:cancel onclick="bCancel=true;" >
    <bean:message key="cancel.operation"/>
    </html:cancel>
    It is not that important though. I would like very much to alert user on possible loss of data (long multipaged form - could press mistakingly, who knows).
    Would you, please post the javascript code that is needed to accomplish this - just alert and if yes - cancel, no - leave alone?
    I'll really appreciate this.

    Thank you for your response.
    I also manage to write this. Is this correct?
    <script language="JavaScript">
    function ensure() {
    return confirm("Are you sure that you want to cancel this operation?");
    </script>
    <td colspan="3" align="center">
    <html:cancel onclick="bCancel=ensure();" >
    <bean:message key="cancel.operation"/>
    </html:cancel>
    </td>

  • Need to link menu buttons ?

    OK, so as you can see i have home, games, hardware ect, I want to link them to...
    index.html
    /games
    /hardware
    /accessories
    /outlet
    /contact
    Im new to flash and im really having trouble can you do it for me or explain what i need to do, please view my .fla source before telling me what to do.
    http://www.megaupload.com/?d=R3YDRBUO
    Thanks

    What code have you tried?  Where do you have the code planted?  If you plant all of the code in one place, such as the main timeline then it might be easier for you to manage targeting whichever objects you intend to.

  • Help needed with a form button

    Two years ago I designed a form with a button that opened an email screen so the document could be emailed to several people.  The form was built in Acrobat Pro 9 with an XP operating system.  The form was put on the company wiki and worked perfectly until about six months ago.  Now the button doesn't work at all for some people and others get a message about whether they want to send a link or a copy.  When they choose to send a copy, the recipient receives a blank form.  The form still works perfectly on my computer.  Does the fact that many of the employees now have new computers with Windows 7 on them make a difference?  How can I get this form to work for everyone?

    with 1.4 you can also set the dialog to "undecorated" meaning you can have a modal dialog w/o the titlebar. InstallAnywhere has a similar progress interface and I think it looks really sharp. You can set an etched border or something on it so it looks good. A progress dialog with no buttons but a titlebar would look a bit goofy I think.

  • Help needed on clicking a button !

    Hi
    I am trying to upload a .CSV file. I have created a form to ask the user to select the desired file. This form contains a text box to select the file, a "Browse" button,
    a "Send" button and a "Reset" button.
    when i click on send button, the .CSV file shuld be sent to mentioned e-mail address.
    Now, my problem is, "Send" button and "Reset" button should be blured before selecting a file. Once a .CSV file is selected, these two buttons should be activated. I DON'T KNOW HOW TO DO THAT.
    can anyone help me in this matter ??
    Code
    <HTML>
    <HEAD>
    <TITLE>Default1</TITLE>
    </HEAD>
    <BODY background=clearday.jpg>
    <TABLE border=0 width=100%>
    <TR>
    <TD><font SIZE=6 color=brown face=" "><b>File Upload</b></TD>
    </TR>
    <tr></tr>
    <tr></tr>
    <TR>
         <TD><font size=4 FACE=" " color=DarkGreen align=left>Home</TD>
         <TD align=right><A href = "signout1.jsp"><font size=4 FACE=" " color=Red>SignOff </A></TD>
    </TR>
    </TABLE>
    <hr size=2>
    <FORM action="uploadcsv1.jsp" method=post id=form1 name=form1>
    <table border=1 align="center">
    <tr width=100% align=center><td>
    <font size=4 color="Blue">Please Select the .CSV file to e-mail</font></td>
    </tr>
    <tr>
    </tr>
    <tr>
    </tr>
    <tr>
    </tr>
    <tr>
    </tr>
    <tr>
    </tr>
    <tr>
    </tr>
    <tr>
    </tr>
    <tr>
    <td><input type=FILE Accept="csv/*" size=30 name="acsvfile" title="Find a vaild .CSV file and Click SEND_EMAIL button">
    <td><input type="button" name="sendbutton" Value="SEND" onChange="enable_button1()" onKeyDown="blur(); title="Click to send e-mail"></td>
    <td><input type="Reset" name="resetbutton" Value="RESET" onChange="enable_button2()" onKeyDown="blur(); title="Click to clear all files"></td></tr>
    </table>
    </BODY>
    </HTML>

    Maybe with an onChange() event on the file element? Make the buttons blurred initially, then in the onChange() of the file element check if the user selected a file. If so, unblur the buttons.

  • [iPhone] Help Needed with 'crash' on Button action handling

    Hi, I've just started testing the water with the iPhone and decided the best way to learn would be to try to create a fairly simple application to switch between screens on a menu when a button is clicked. However I'm having problems handling my 'aButtonHasBeenClicked' action as the program crashes when it attempts to do so.
    I think my problem stems from how I set up my view controllers so before I start posting any code I have a question about how to use them correctly.
    In my Main Application window xib file, created in Interface Builder I have the application delegate object which is linked to a blank Window and an outlet to a class which when instantiated will inherit from UIViewController and load the view controller from a separate xib file (this is instead of having the actual view controller object in the same xib and connecting it up in interface builder)
    The separate xib file contains a view controller and a view with a UIButton whose 'Touch Up Inside' event is linked to an action in the view controller to handle the button click.
    Is this a suitable method to use for the view controller? i.e. instead of having a view controller in the same xib as the application delegate and connecting it to my class outlet in interface builder, should I be able to load the view controller from a separate xib file and still access it from the class outlet in the delegate file? If I should be able to do that, then I'll post more detailed code as it must be some other problem I'm having.
    Btw, what happens with my program is that everything is displayed fine in the simulator but the it hangs when the button is clicked without actually crashing.

    How did you get this working?
    The only way I got this to work, is to wire the actions to the View Class instead of the controller.
    This is not the way this is suppose to work

  • Help needed on linking drop down boxes

    Hello there,
    I am using adobe life cycle designer 8 to make forms. These forms are usesd to collect information on persons working in the healthcare industry.
    I want to use drop down lists that are "connected". Depending on the choice made in the first dropbox, the user will get new options in the second dropbox.
    Example:
    Dropbox 1
    Values
    - value 1
    - value 2
    - value 3
    Dropbox 2
    If user choses value 1, they can chose the following values in dropbox 2:
    - Value A
    - Value B
    If user choses value 2, they can chose the following values in dropbox 2:
    - Value C
    - Value D
    If user choses value 3, they can chose the following values in dropbox 2:
    - Value E
    - Value F
    I have been puzzeling for a while, but cannot find the solution for this.
    THank you in advance
    Daniel

    Hi,
    1. You create the first dropdown, for example with the following entries:
        123
        456
        789
    2. You create a second dropdown which is empty.
    3. Then you have to copy the follwoing script in the change-event of the first dropdown:
    switch (xfa.event.newText)
        case "123":
            DropdownListe2.clearItems();
            DropdownListe2.addItem("Please select a value");
            DropdownListe2.addItem("456");
            DropdownListe2.addItem("789");
            DropdownListe2.selectedIndex = 0;
            break;
        case "456":
            DropdownListe2.clearItems();
            DropdownListe2.addItem("Please select a value");
            DropdownListe2.addItem("123");
            DropdownListe2.addItem("789");
            DropdownListe2.selectedIndex = 0;
            break;
        case "789":
            DropdownListe2.clearItems();
            DropdownListe2.addItem("Please select a value");
            DropdownListe2.addItem("123");
            DropdownListe2.addItem("456");
            DropdownListe2.selectedIndex = 0;
            break;
        default:
            break;
    That's all.
    In your case you  have to change "123", "345", "678" in "value 1", "value 2", "value 3".
    In the first case "value 1" you have to change in the first case "value 1": the DropdownListe2.addItem("123"); to DropdownListe2.addItem("Value A"); ...
    I hope it's helpful for you,
    kind regards,
    Mandy

  • Help needed in refreshing a panel in my window.

    I have some problem in refreshing a panel of a window.
    Here I am writting the sample code bellow.
    My program contains 2 classes, one is "Test" other is "Testwindow".
    class Test contains main(),displays the buttons reading from the string array obtained by listing a directory in my local file system through the panel p2 .If I click "Add" button in Test, class Testwindow's constructor is called & "Testwindow" is visible, which has a textfield. If you enter a string in the textfield, that string will be stored as a file in the same directory that the 1st window use. here I choose "C:\\temp" of my filesystem as the directory.
    My requirement is:
    when I enter a string in the textfield of Testwindow, then after clicking "Finish" button, that inputted string should be added to the panel p2 of 1st window(Test)during runtime.It means the panel p2 should be refreshed reading from the "C:\\temp" as soon as a new button is added to temp directory during runtime.
    If any of you have idea over this,please help sending me the updated version of the code given below.
    Regards.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    public class Test extends JFrame
         JPanel p1,p2;
         JButton b1,bdir[];
         File f;
         String s[];
         int n,nmax;
         public Test()
              super("Test");
              JPanel con=(JPanel)getContentPane();
              con.setLayout(new BorderLayout());
              addWindowListener(new WindowAdapter(){
                   public void windowClosing(WindowEvent e)
                        System.exit(0);
              p1=new JPanel();
              p2=new JPanel();
              p2.setLayout(new GridLayout(nmax,1));
              b1=new JButton("Add");
              b1.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent e)
                        if(e.getActionCommand()=="Add")
                             new Testwindow();
              p1.add(b1);
              f=new File("c:\\temp");
              s=f.list();
              n=s.length;
              nmax=n+20;
              bdir=new JButton[n];
              for(int i=0; i<n; i++)
                   bdir=new JButton(s[i]);
                   bdir[i].setHorizontalAlignment(AbstractButton.LEADING);
                   p2.add(bdir[i]);
              int hor=ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED;
              int ver=ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
              JScrollPane jsp=new JScrollPane(p2,hor,ver);
              con.add(p1,"North");
              con.add(jsp,"Center");
              setSize(250,300);
         public static void main(String arg[])
              Test frame=new Test();
              frame.setVisible(true);
    class Testwindow extends JFrame implements ActionListener
         JPanel p1,p2,p3;
         JLabel l1;
         JTextField tf1;
         JButton b1,b2;
         String s1, sdir[];
         public Testwindow()
              setTitle("Testwindow");
              Container con=getContentPane();
              con.setLayout(new BorderLayout());
              p1=new JPanel();
              p1.setLayout(new GridLayout(1,2));
              p2=new JPanel();
              l1=new JLabel("Enter a string: ");
              tf1=new JTextField();
              b1=new JButton("Finish");
              b1.addActionListener(this);
              p1.add(l1);
              p1.add(tf1);
              p2.add(b1);
              con.add(p1,"North");
              con.add(p2, "South");
              setSize(300,150);
              show();
         public void actionPerformed(ActionEvent e)
              if(e.getActionCommand()=="Finish"){
                   try{
                        s1=tf1.getText();
                        File id_name=new File("C:\\temp\\"+s1+".txt");
                        FileOutputStream out=new FileOutputStream(id_name);
                        out.close();
                   catch(IOException x)
                        System.out.println("Exception caught"+x);
                   this.setVisible(false);

    You have 2 JFrame's: Test and TestWindow
    In order for TestWindow to send messages to Test it needs a reference of Test. Therefor write in TestWindow this:private Test parentFrame;
    public void setParentFrame (Test t)
      parentFrame = t;
    }... then after create an instance of TestWindow in Test call this method like this:...
    TestWindow tw = new TestWindow ();
    tw.setParentFrame (this);
    ...Next, in Test create a method that will be called when a string is inputted:public void sendString (String s)
      //update the panel or whatever
    }call this method when the user clicks on a button or whatever in TestWindow:parentFrame.sendString (s);greetz,
    Stijn

Maybe you are looking for

  • Sql type to Java class?

    I want to write a utility class to generate a java source file (bean) from out of the metadata of a database table. the metadata returns the column type as a java.sql.Types constant (int value). now, i want to map these int values to Java classes. (e

  • Problem of buffer with adobe flash player

    Hi, I have a problem of buffer playing a song. I'm playing a sound using streaming. (loadSound("my flow", true)) The buffer size is the default one: 5s. When I play using Macromedia Flash Professional 8, everything is OK, the buffer size stays around

  • SOA 11g Installation

    Hi All, I am already having SOA SUITE 10g on my machine in C: drive. i.e Oracle Database:10.2,Jdev:10.1.3.4 and SOA Suite 10.1.3.3 I also want to install 11g in my machine say in E: Drive .Could anybody please tell me if I can install oracle DB 11g,s

  • Object locking in Charm

    In testing Charm functionality, I am finding that objects are not being locked and 2 developers can make customizing changes in a table at the same time and one transport can overwrite the others changes with no notification! This seems very dangerou

  • List Multiple Selection to MySQL

    How do I take multiple selections from the List box in a form in Dreamweaver 8 and post to MySQL? I tried using implode as recommended here: http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12&catid=263&threadid =1112556&highlight