I have a Array of Characters objects (extends Sprite).
public static var charlist:Array;
When a Character die, I set a flag to indicate that.
char.die = true;
When I spawn a new player, I check against this flag, to reuse the slot. This is where the problem comes.
What is the best way to do that? Actually I have this approach:
cha...
IList<Customer> Customers =
flat.GroupBy(cust => new { cust.ReferenceNumber, cust.Name, cust.Address })
.Select(c => new Customer()
{
ReferenceNumber = c.Key.ReferenceNumber,
Name = c.Key.Name,
Address = c.Key.Address,
...
So I am trying to invoke methods on a page and I know the values that I want to put inside the methods but I can't seem to get the syntax to work. I feel so, well.. lamerized.
Ok so here is the javascript method on the page
function ReturnValue (sValue, sText)
{
window.focus();
var oForm = document.EditForm;
switch (s...
I'm getting an error I don't know how to fix so I wondering if I could get some help.
This is the error
Fatal error: process_form() [<a href='function.process-form'>function.process-form</a>]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Template" ...
I have the following objective C class. It is to store information on a film for a cinema style setting, Title venue ID etc. Whenever I try to create an object of this class:
Film film = [[Film alloc] init];
i get the following errors: variable-sizedobject may not be initialized, statically allocated instance of Objective-C class "Fil...
Hello.
I'm working on my first object oriented bit of python and I have the following:
#!/usr/bin/python
import random
class triangle:
# Angle A To Angle C Connects Side F
# Angle C to Angle B Connects Side D
# Angle B to Angle A Connects Side E
def __init__(self, a, b, c, d, e, f):
self.a = a
self.b = b
self.c ...
Hi,
I have code that uses Microsoft.SqlServer.Management.Smo. (Built in Visual Studio 2005 SP1)
It works fine on SQL 2000 & SQL 2005 machine.
But when it is run on SQL 2008 machine it throws an exception:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.Smo, Version=9.0.242.0, Culture=neutral, Pu...
If I have a javascript object such as:
var list = { 'you': 100, 'me': 75, 'foo': 116, 'bar: 15};
is there a way to sort the properties based on value? So that I end up with
list = { 'bar':15, 'me': 75, 'you': 100, 'foo': 116 };
I'm having a real brain-dead moment regarding this.
...
I understand that Perl's OO model is rather primitive; it is, in most respects, essentially a namespace hack.
Nevertheless, I wonder if it is possible to create something like an "interface?" My goal is to have a base class from which others are extended whose principal purpose is to make mandatory the implementation of certain method...
I'm a relative newbie to thinking in OOP terms, and haven't yet found my ‘gut instinct’ as to the right way to do it. As an exercise I'm trying to figure out where you'd create the line between different types of objects, using the drinks on my desk as an example.
Assuming I create an object Drink, that has attributes like volume and te...
Hi,
I have a list of objects that have to int properties. The list is the output of anothre linq query. The object:
public class DimensionPair {
public int Height { get; set; }
public int Width { get; set; }
I want find and return the object in the list which has the largest Height property value.
I can manage to get the high...
Hey, I've got a question about refrencing properties from an actionscript object.
If i've got the following object named "groups"...
group1
item1 = sampledata1
item2 = sampledata2
item3 = sampledata3
group2
item1 = sampledata4
item2 = sampledata5
item3 = sampledata6
I would access group1/item2 by typing "groups.gro...
I have an application on a client's site that processes data each night, last night SQL Server 2005 gave the error "Could not find stored procedure 'xxxx'". The stored procedure does exist in the database, has the right permission as far as I can tell, the application runs fine in other nights as well.
In previous occasions, the SQL Ser...
I need to send to c# a array of objects from Flex. Anybody know how do I do this?
Sorry for my English, I am Brazilian.
Thank´s
Sidnei Cachate.
...
I'm at a crossroads, not exactly sure what is better to use. Right now I'm using sessions arrays to store calculations on the fly, but I need to switch to objects because I would like have some functions. But I was also considering using ajax and insert the data on the fly back and forth to the database but I'm worried it might be to man...
Hi,
I need some understanding about using Core Data.
Can it be used to save and retrieve all of my objects used in my program?
Is there any simple example demonstrating this ?
I am having hard time finding one online.
Thanks for any replies.
...
Hello all ...
i seem to be having difficulties in accessing and comparing objects in NSMutableArrays in objective c.
I'm very new so when explaining , some code would be nice.
I have a character class and a characterfound class. The code looks like this:
@implementation character
@synthesize IDE, name;
- (void) dealloc {
[text ...
Hey guys,
i am making a website using asp.net and C# and well i got stuck at the first hurdle, i found out that to use code you use the <% %> with asp but i dont get how i would create an object of my class to use in the aspx file?
I think its syntax more than anything i cant seem to get to work.
Thanks,
Ash
...
I'm very new with c#, and was previously attempting to ignore classes and build my small program structurally more similar to PHP. After reaching a road block, I'm trying to start over and approach the problem properly OO. I'm taking a long file, and in a loop, every time certain conditions are met, I want to make a new object. How can I...
Hi,
In the current project I am working on I have come across a piece of code which seems to be overblown. I considered rewriting it to avoid more objects in memory than need be, and had trouble making a decision about whether the performance benefits from refactoring would be worth the time, and whether the current design will impact p...