Search Results

Search found 6 results on 1 pages for 'organiccat'.

Page 1/1 | 1 

  • Get text of button from IBAction - iPhone

    - by Organiccat
    When an IBAction is called: -(IBAction) onClick1: (id) sender; What is passed in the sender? Since it's hooked up through the IB, I'm not really sure. My question is how to get the text of the button to be the passed object (NSString most likely) so that I could call it inside the action implementation. -(IBAction) onClick1: (id) sender { NSLog(@"User clicked %@", sender); // Do something here with the variable 'sender' }

    Read the article

  • Adding Java packages to GWT

    - by Organiccat
    I've tried searching but couldn't come up with a defined way on how to add your own packages to a GWT project. My tree structure looks like this: -com.mycompany -public MyApplication.html MyApplication.gwt.xml -com.mycompany.client MyApp.java -com.mycompany.gui TableLayout.java The answer I've seen out there says to add the packages relative to the root directory of the gwt.xml file, like so: <module> <inherits name="com.google.gwt.user.User" /> <entry-point class="com.mycompany.client.MyApp" /> <source path="client" /> <source path="gui" /> </module> It then complains: Unable to find type 'com.technicon.client.MyApp' Hint: Previous compiler errors may have made this type unavailable Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly Can anyone tell me what I'm doing wrong and how to fix this?

    Read the article

  • Why use event listeners over function calls?

    - by Organiccat
    I've been studying event listeners lately and I think I've finally gotten them down. Basically, they are functions that are called on another object's method. My question is, why create an event listener when calling the function will work just fine? Example, I want to call player.display_health(), and when this is fired, the method player.get_health() should be fired and stored so that display_health() has access to it. Why should I use an event listener over simply calling the function? Even if display_health() were in another object, this still doesn't appear to be a problem to me. If you have another example that fits the usage better, please let me know. Perhaps particular languages don't benefit from it as much? (Javascript, PHP, ASP?)

    Read the article

1