runtime

Creating eventhandler at runtime in c#

I'm creating an array of BackgroundWorker that shares one event handler like this: BackgroundWorker[] workers = new BackgroundWorker[files.length]; for(int i = o; i<files.length; i++) { workers[i] = new BackgroundWorker(); workers[i].DoWork += new DoWorkEventHandler(worker_DoWork); workers[i].RunWorkerCompleted += new...

Segfault on C++ Plugin Library with Duplicate Symbols

Hi, I have a cross platform C++ application that is broken into several shared libraries and loads additional functionality from plugin shared libraries. The plugin libraries are supposed to be self contained and function by themselves, without knowledge of or dependency on the calling application. One of the plugins contains copied...

C# - Determine property type at runtime

Here is what I want to do: public [type determined at runtime] ImageToShow { get { if(this.IsWebContext) { return this.GetString(); } else { return this.GetBitmap(); } } } At first look it seems simple and doable if T was the generic type which with instance of this class was created. But w...

NetBeans IDE 6.7.1 Ant Script variables

How do I get the location of rt.jar in my Ant script with NetBeans without editing my project.properties? ${java.home} is returning the location of the jre folder and not the jdk folder. I know that I could easily add a value to project.properties but I don't want to. I also know that I could easily just modify the path whenever I switc...

Is it possible to construct an object by reading source code?

Background I have a few scripts that run as part of my build process that look at the various source code files and generate some more source code for me. The scripts use CodeDom to generate them and they read the .cs files using a simple text reader. Question One of the scripts is looking for use of a specific class attribute called...

What's the limit to the number of members you can have in a java enum?

Assuming you have a hypothetical enum in java like this (purely for demonstration purposes, this isn't code i'm seriously expecting to use): enum Example{ FIRST, SECOND, THIRD, ... LAST; } What's the maximum number of members you could have inside that enum before the compiler stops you? Secondly, is there any per...

What does it mean by C++ runtime?

What are all the activities done by C++ runtime? ...

FastMM, stack trace memory for leaks in dynamicly loaded DLL, compiled with runtime packages.

Hi, I'm using FastMM together with JCL Debug info to trace memory leaks in my application. However I have plugins which are dlls compiled in Delphi, both dlls and main application use common runtime packages. Now, when I'm shutting down the application, it generates memory leaks report in text file which is fine, but it contains stack tr...

When executing batch file from Java Runtime, native DOS commands fail to run

When I execute the batch file directly in DOS, everything runs as expected. But when I execute the batch file from Java runTime, it will run only the commands that invoke jar files (ie. invoke the JVM). It does not run any native dos commands. One problem is that I have no console to know why this is happening. I'm wondering if it's...

External program blocks when run by Runtime exec

Hi I'm attempting to launch an instance of the VideoLAN program from within a java application. One of the ways I've tried to do this is shown here: Process p = Runtime.getRuntime().exec("\"C:\\Program Files\\VideoLAN\\VLC\\vlc.exe\" \"http://www.dr.dk/Forms/Published/PlaylistGen.aspx?qid=1316859&amp;odp=true\" :sout=#std{access=udp,mu...

How to detect whether java runtime is installed or not on a computer using c#

I program windows applications using Java and this builds a ".jar" file not an ".exe" file. When a client computer with no java runtime installed opens the ".jar" file, it runs as an archive with winrar. All I want to know is how to detect whether java runtime is installed or not on a computer using c# code in order to show a MessageBox ...

Answering "Which method called me?" at the run-time in .NET? Or is CallStack data readable by the code?

Presume that there are methodA() , methodB() and methodC(). And methodC() is called at the run-time. Is is possible to know methodC() is called from what method? I was thinking if CallStack can be read at the run-time for some checks? If yes, I think it should not be a big deal. Any ideas? Thanks! ...

flex 3 retrieving colors values from MySql database with AMFPHP to style flex 3 Components at runtime

Hello Stackoverflowers, I'm making a social community application with profile. User must be able to style their profiles. That's why i'm looking for a way to store and retrieve color values from a MySql database to style flex 3 components at runtime. Does anybody know how i could accomplish this. (I don't want to use Runtime css swf s...

Excel VBA: "application-defined or object-defined error"

In Excel 2003 I'm getting a Runtime error 1004: "application-defined or object-defined error" on the last line of this code (commandtext = abc) Sub SCommandTxt() Dim abc as string abc = Sheets("Totals").PivotTables("PivotTable2").PivotCache.CommandText Sheets("Totals").PivotTables("PivotTable2").PivotCache.CommandText = abc End Sub T...

C# Create Snap To Grid Functionality

I am trying to create some snap to grid functionality to be used at run time but I am having problems with the snapping part. I have successfully drawn a dotted grid on a panel but when I add a label control to the panel how to I snap the top, left corner of the label to the nearest dot? Thanks ...

NSIS: How to add Items to a listbox control?

How to add items to a listbox control at run time in NSIS? ...

Contacts App crashes when switching between Dialer to Call log

I've altered the contact app so that in Dialer the soft keypad always stays and it hides when other tab activity resumes, We've given different look for the contacts app, but when using the same, a crash occurs when we rapidly change from dialer to call log. And the App crashes without the standard crash dialog. I have copied the log an...

conditional implementations of methods.

ok.. think of objectA.. objectA has optional properties defined in its protocol. the delegate may or may not implement these, but if you do decide to implement them, you must provide a valid return. now what if i have objectA.delegate set to objectB but object be needs to implement them all at compile time, and at runtime will decide wh...

Flex + Runtime + httpFaultHandler

I'm creating a graph and loading images. When I try to run the program using the builder, it works fine, but minute I export it and try to run it, I get an httpFaultHandler issue. I've tried to give the absolute path, logical path, but no success. My sequence of creation of object are: 1. In Application, i've set the creationPol...

C# Dynamic Code Analysis

Hi, I'm wondering if there are tools, or if there is a programmatic approach for mapping the execution of a web application ? To clarify, the company I work for develop a CRM product that is based around the concept of Dynamically loading ASCX controls on a page-by-page basis. What I would like to see is a map to see from the request ...