How can I create an instance of an object using a class reference, and
ensure that the constructor is executed?
In this code example, the constructor of TMyClass will not be called:
type
TMyClass = class(TObject)
MyStrings: TStrings;
constructor Create; virtual;
end;
constructor TMyClass.Create;
begin
MyStrings := ...
In my Java project, I have a vector of various types of Traders. These different types of traders are subclasses of the Trader class. Right now, I have a method that takes a Trader as an argument and stores it 50 or so times in the vector. I am having problems because storing the same object 50 times is just storing 50 references of the ...
Can you point me to a good reference book for MySQL?
I'm an experienced database programmer, but I'm new to MySQL, so I need a book where I can look up specific things and get quick (short) answers (preferably with clear examples).
It needs to explain MySQL-specific things, not standard SQL.
I don't want a wordy book explaining the...
If I have a auto_ptr I can pass it for a reference?Like:
auto_ptr<MyClass>Class(new MyClass);
void SetOponent(MyClass& oponent);
//So I pass SetOponent(Class)
And what is odd copy behavior of auto_ptrs?
...
I want a setup like this:
+- /ApplicationFolder
-- App.exe
-- Core.dll
-- AnotherShared.dll
+- /PluginsFolder
-- plugin1.dll
-- plugin2.dll
But because plugin1.dll references to Core.dll and Shared.dll when I compile the application it drops a copy of "Copy.dll" and "Shared.dll" to plugins folder as well and if I remov...
Hi, I'm relatively new to excel programming. I'm working on making a spread sheet that shows exponential decay. I have one column (A1:A1000) of 1000 random numbers between 1 & 10 using the TRUNC(RAND()*10,0) in each cell. The next Column (B1:B1000) has a logic mask =IF(A1=0,1,0) , where if the value in the A cell is 0, then the B cell sh...
I've tried looking at similar problems, but could not easily find one that helped my problem.
I've created a project in C++ and am working on UNIX to compile, link, and run it. My specific problem is an undefined reference to a method I declare in a separate file.
In the file SharedCache.cpp, I have the following method:
int SharedCac...
How can we access and reference classes and variables in different pages in ASP.NET? In version 2003, it was straight forward, just reference the class name of the page and the whole page becomes at your command, but with Websites instead of Web Applications, that does not seem to be the case. I have an App_Code folder, with a class that...
Hello,
I have created a ClickOnce Solution with VS2008.
My main project references another project who references COM dll as "links".
When I build my solution in VS the dlls from the orther projects are moved in my bin folder but when I publish and launch the project these files are not presents in my Local Settings\Apps\2.0... folder...
Best reference sites for HTML and JavaScript programming:
SitePoint: DOM JavaScript, HTML, CSS -- Search
W3Cschools: DOM, JavaScript, HTML, CSS, XML, Multimedia, Server-side
Mozilla Dev Center: DOM, JavaScript, JS Lang, AJAX, HTML, XHTML, SVG, Standards
Quirksmode: DOM Javascript, CSS, Compatibility
ZVON: HTML, XML, CSS
DevGuru - Java...
Why does constructor ORDER matter in VB.Net? I am building a .Net type library which is meant to wrap an underlying COM library completely so that the consumers of the API can pretend to use a nice .Net library with .Net collections and whatnot instead of a COM library.
Currently most of my classes are just 1 to 1 wrappers built using R...
There are already two questions about F#/functional snippets.
However what I'm looking for here are useful snippets, little 'helper' functions that are reusable. Or obscure but nifty patterns that you can never quite remember.
Something like:
open System.IO
let rec visitor dir filter=
seq { yield! Directory.GetFiles(dir, filter)...
Is there an online reference manual I can query which contains details of LoadRunner functions such as:
lr_start_transaction
web_url
web_submit_data
web_custom_request
lr_end_transaction
etc.?
Essentially, I want to be able to find out about these functions without having the LoadRunner environment licenced/installed.
...
When I first began bash scripting I spent a lot of time online trying to find resources for various tasks and things were scattered across tons of different forums and newsgroups.
I'm not completely sure if the idea of a list of resources for those new to bash scripting is something fitting of SO's community wiki or not. I'm posting on...
Hi there,
Is there anyway to calling a function from another function .. little hard to explain. heres in example. One function loads html page and when ready it calls the original function.
I think i need to pass in a reference but unsure how to do this... if i set it to "this" - it doesn't seem to work
ANy ideas?
order.prototype.p...
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...
I'm trying to reconcile the various Adobe AIR HTML guides, and am totally lost. I want to do something with a socket.
Some general guides on the topic here and here refer to Air.Socket(); But the supposedly Adobe AIR HTML reference looks like it's not even JavaScript and it references a namespace (window.runtime.flash.net.Socket) that ...
Hi,
We have a multi-tiered application using CSLA Business Objects and NHibernate ORM.
In our Business Objects, we hold our collection data members as ICollection<T>, and in our object mapping files we define them as <set>s.
Since NHibernate uses its own concrete types to fetch these collections, we have a problem when these collection...
Hi there,
Whenever I run my program, I get: NullReferenceException was unhandled, Object Reference not set to an instance of an object.
When I start the program, I have a form appear called MaxScore where the user enters the max score and presses OK. In the OK event, I call a method from MainForm to update the maxGameCountLabel on MainF...
Hello,
I have a problem with a lost reference in a project where one SWF is loaded into another.
Here's a description of what the program looks like and how it functions.
I have a Container flash-project+SWF-file that functions as a window around another flash-project+swf.
In the outer-window I create pop-up movieclips triggered by an ...