customclasses

Data Binding on Custom Class

I'm trying to create a custom class that is based off of an XML file (using xsd.exe). The end goal of this class is to bind it to a UI element (probably a gridview or something like that - I haven't decided yet). Are there any interfaces that I need to be sure to implement in order to do this? I would think IEnumerable would be a key one...

iPhone Custom Class / Object in Responder Chain

Ola Folks, I am looking for strategies, best practices and solutions to adding a custom class to the responder chain. This came about because I realized I was handling touch events the same way in several different applications. To make life easy, I wanted to move the functionality into a custom class and have that class become the firs...

ASP.NET Listbox databound to List of custom objects. Does it keep the actual objects?

Hi All, in ASP.NET, I've bound a listbox control to a List of custom class (consisting of a TimeSpan and Int members). the ToString() function just displays them both as a long string. Now I want to save the modified listbox into the DB again, I need to use the custom class objects again. Does the ListBox save the actual custom object...

Returning Custom Classes as IQueryable so doesn't have 'has no supported translation to SQL' error

I have the below call in my repository where I return IQueryable of Node (my business object class) then I have a filter function in my service layer which adds to the IQueryable call and filters the repository function GetNodes by id. When I return the FilterById as a list (so it executes) I get error -- The member 'bo.Node.Id' has no ...

AS3: Accessing custom class public functions from a MovieClip on a timeline

Hi, I've got a AS3 program with a Main.as custom class. In this class I load an instance of a 'menu' movieclip which has simpleButton instances inside... How do I access the Main class public functions by the menu movieclip buttons? I.e. Menu button -> gotoPage(5); (which is a Main public function) If I try to access the Main functio...

ObservableCollection<T> in Winforms and possible alternatives

Hey there! Winforms .net 3.5 app. In my app I have a generic class that looks like so: public class FilterItem { public FilterItem() { } public string FilterProperty { get; set; } public bool FilterPropertyChecked { get; set; } public ComparitiveOperator FilterOperator { get; set; } public string FilterValue { get; set; } } ...

How to work with buttons in an extended movieclip class

Say I make a class that extends the movieclip class and this class has a number of buttons in it. This movie clip exists in an .fla and is linked to the class definition. How can I control the events from within the class? The following does not work: class newMovie extends MovieClip { var test_btn:Button; function newMovie() {...

getting the name of a class through an instance of that class

I have a function that takes as parameters 2 instances of a (custom) class. But they can each be one of several classes, and I need to then call another function based on what type they are. I'd like to do something like this: function any_any(inst1, inst2) { this[inst1.classname + "_" + inst2.classname] (inst1, inst2); } function C...

override a class/add properties to a ListviewItem (vb.net)

I have a listview but I would like to add 3 properties (for example one of them is "image") to the listviewitems in it. I was fine with making a custom class with the 3 properties and just inheriting ListViewItem but now I need to use MultiSelect, so it means doing things like(in For Each loops): ListView1.SelectedItems.Item(i).Image do...

Why I cannot get correct class of a custom class through isKindOfClass?

Hi, I've created a custom class AnimalView which is a subclass of UIView containing a UILabel and a UIImageView. @interface AnimalView : UIView { UILabel *nameLabel; UIImageView *picture; } Then I added in several AnimalView onto the ViewController.view. In the touchesBegan:withEvent: method, I wanted to detect if the touch...

Unable to access a primitive array inside a custom class from a UIViewController instance

Hello! I have made a subclass of NSObject that is meant to be the model of my application. The class has a few methods and on instance primitive array as such: @interface Cube : NSObject { int cubeState[5][2][2]; } - (void)printContent; @end @implementation Cube - (id)init { if (self = [super init]) { for (int i=0...

Using local class in web service

I have a web service that accepts and returns a custom class. The problem is that the Form that calls the web service method requires instantiation of the webservice.myClass instead of the local copy of the myClass? For example: **myservice:** class myclass { ... } class myservice { [WebMethod] public void mymethod(myclass cls) { cls.x...

as3 - how to add multi custom class into one asset ?

Hi everyone! I'm a new mem of as3. Today i make a work but i was stacked. pls help me: My example: • I have a Symbol in Library with linkage name: box_mc import flash.display.MovieClip; import flash.events.Event; import Src.smoothAnimate; var box_is:MovieClip = new box_mc(); box_is.name = 'box_na'; addChild(box_is); var box_is:smooth...

Trouble creating a map with vector as key and custom class as value.

Hey everybody, I have created the abstract class below to evaluate a board position of simple games. The abstract class is overridden by each derived class so that only the evaluate function is defined in game.h I am trying to make my program more efficient by using memoization, but I can't get my map to work correctly. The compiler th...