get the event's object
Posted: 21 Feb 2015, 11:19
I have an event function and i want to use this for multiple objects. So in the event function i try to get the object source of the event to do the right action.
public void changed(BaseComponent c, Noesis.RoutedEventArgs args)
{
mybox = new ComboBox ();
"this is not a noesis code but it's like that in flash it's just for the example it doesn't work in noesis of course":
mybox = args as Target ();
String str = mybox.GetSelectedItem ().AsString();
Debug.Log(str);
}
public void changed(BaseComponent c, Noesis.RoutedEventArgs args)
{
mybox = new ComboBox ();
"this is not a noesis code but it's like that in flash it's just for the example it doesn't work in noesis of course":
mybox = args as Target ();
String str = mybox.GetSelectedItem ().AsString();
Debug.Log(str);
}