Take for example:
CreateOrderTicket(ByVal items As List(Of OrderItems)) As String
Where would you put this sort of logic given:
CreateOrder should generate a simple list ( i.e. Item Name - Item Price )
PizzaOrderItem
SaladBarOrderItem
BarOrderItem
Would you recommend:
Refactoring common to an abstract class/interface with shared pr...
So I'm trying to make a client for my server in C#, that accepts messages as commands so I can control the client remotely. I've had problem after problem with my masterServer.Connect taking FOREVER to load, and almost every time I close my application I have to wait 10 seconds for it to completely stop. I've tried EVERYTHING to stop thi...
Why null is considered an object in javascript?
Is checking
if ( object == null )
do something
same as
if ( !object )
do something
And also
What is the difference between null and undefined??
...
Hello,
i was wondering how to trace a certain object in VC++6.
It can be done by tracing the unique object ID with "Trace Points",
in more recent versions of visual studio. I still haven't figured
out how to do this in VC++ 6. Maybe you guys can point me in the right direction.
Thanks in advance!
Best regards,
zhengtonic
...
i have a json object in a javascript file. i have to pass this object to a jsp file.the jsp picks up this object and processes it. how can i do it?
...
If you have a class A that is an aggregate of class B and C, is it better for A
to store ID's for B and C
to load and store the entire object for B and C (edit, store by reference to object B/C, i.e. instantiate objects B and C as opposed to storing id's for B and C.
store the ID's and provide methods to pull methods B and C
I'm assu...
Hi everyone!
I'm using Microsoft Reports (rdlc), and I need to create report with subreport. As a data source I created two Object Classes, PositionObject and PositionSubElementObject. PositionObject is data source for the main report, and PositionSubElementObject is a data source for the subreport.
When I run this two reports separatel...
i'm getting an error 'Object expected' for some odd reason due to jquery, and this does not 'submit' the form or enter the data into database.
without jquery, the data could be entered into the database. but now it doesn't.
i've used jquery mainly for validating asp.net controls.
...
I would move my former js codes to more OOP style. Here's the code.
function addEvent( obj, type, fn ) {
if ( obj.attachEvent ) {
obj['e'+type+fn] = fn;
obj[type+fn] = function(){obj['e'+type+fn]( window.event );}
obj.attachEvent( 'on'+type, obj[type+fn] );
} else
obj.addEventListener( type, fn, false );
}
function ...
i have a JSON object passed to the jsp page. it is passed as a string. now i have to parse this string and retrieve the values that are passed through the JSON object. so that i can print the values in the same jsp.
...
i have a JSON object sent from the browser to the jsp page. how do i receive that object and process it in jsp. do i need any specific parsers? i have used the following piece of code. but it wouldnt work. essentially i should read the contents of the object and print them in the jsp.
<%@page language="java" import="jso.JSONObject"%>
...
When referencing a silverlight scriptable object using javascript via,
var uploadControl = document.getElementById("FileUpload1");
uploadControl.Content.FileUploader.UploadFile();
I get a null pointer (FileUploader ref) when the silverlight object has an added attribute of style="display:none" or visibility set to hidden. This only ha...
Hi,
I have a simple windows application in C# with 3 forms.
first form is main form (its name is FrmMain), second is FrmData and third is FrmShow.
In main form (FrmMain) I have created an instance from second form (FrmData) and show it :
public partial class FrmMain : Form
{
public Form FrmModifyData; //for FrmData
...
I've seen a lot of this...
function myObject(data) {
var myData = data;
}
myObject.prototype.doSomething = function () {
alert("I did something!");
}
but the intellisense on Visual Studio gives me a .constructor for functions, which would lead me to believe this would be correct...
function myObject() {
var myData;...
Hi there, I know this is probably a very newbish question, so I apologize.
I am trying to access the Text property of a label on Form1 from another form, MaxScore.
When I click the Ok button on MaxScore, I want to set Form1's myGameCountLbl.Text to Form1's variable, max by using max.ToString().
Here is my code in the OK button event o...
Should we use object or variant? What difference does it make?
...
So I'm a Flash guy and I'm trying to convert the following code to Object C:
var slot:Object = new Object();
slot.id = i;
slot.xPos = 25*i;
slot.yPos = 25*i;
slot.isEmpty = False;
// push object to array
arrGrid.push(slot);
Later I can override like:
arrGrid[0].isEmpty = True;
I can't ...
Consider the below code:
DummyBean dum = new DummyBean();
dum.setDummy("foo");
System.out.println(dum.getDummy()); // prints 'foo'
DummyBean dumtwo = dum;
System.out.println(dumtwo.getDummy()); // prints 'foo'
dum.setDummy("bar");
System.out.println(dumtwo.getDummy()); // prints 'bar' but it should print 'foo'
So, I want to copy the...
The following two different code snippets seem equivalent to me:
var myArray = Array();
myArray['A'] = "Athens";
myArray['B'] = "Berlin";
and
var myObject = {'A': 'Athens', 'B':'Berlin'};
because they both behave the same, and also typeof(myArray) == typeof(myObjects) (both yield 'object').
Is there any difference between these va...
Which would you recommend - a deep objects hierarchy (where each object hold a reference to it child objects), or flat objects (where you provide services to retrieve child objects)?
Let's assume that you are creating a database management application. You will have objects such as:
Server
Database
Columns
Views
Which option would y...