I have a public variable "testStr" in my applications main form. I have a tabControl which adds tabs loaded with user controls. How can I reference "testStr" from these user controls? I would imagine its either Application.* or parentForm.* ... but everything I'm trying isnt working, not really sure how to do it and I'm a bit new to .net...
Yet another one of my P/Invoke questions! I have this C function:
int _ei_x_new(ei_x_buff* x);
Essentially, it initializes a new buffer struct. In C#, I have this:
[DllImport(EIDLL, EntryPoint = "_ei_x_new")]
public static extern int ei_x_new(out ei_x_buff x);
ei_x_buff is pretty simple:
typedef struct ei_x_buff_TAG {
char* bu...
Imagine I have an object called "image", now I want to create multiply copies of this image to display it multiple times and with different properties. When I do image2 = image;, only the reference is copied and I thus still change the properties of the first object.
So, how to return a copy of an object instead of a reference in action...
UPDATED Scroll down to see the question re-asked more clearly....
If I had the name of a particular UIImageView (IBOutlet) stored in a variable, how can I use it to change the image that is displayed. I tried this, but it does not work.
I'm still new to iphone programming, so any help would be appreciated.
NSString *TmpImage = @"0.p...
I have an array that is a member of an structure:
$self->{myArray} = ["value1", "value2"];
And I'm trying to iterate over it using the following code:
my @myArray = $self->{myArray};
foreach my $foo (@myArray){
#Do something with the using $foo
...
}
The problem is that the 'foreach' loop is executed only once (when I would...
In C++, void somefunction(int) passes a value, while void somefunction(int&) passes a reference. In Java, primitives are passed by value, while objects are passed by reference. How does python make this decision?
Edit: Since everything is passed by reference, why does this:
def foo(num):
num *= 2
a = 4
foo(a)
print(a)
print '4'...
I have spent the last several years fighting tooth and nail to avoid working with C++ so I'm probably one of a very small number of people who likes systems programming and template meta programming but has absolutely no experience when it comes to the STL and very little C++ template experience.
Does anyone know of a good document for...
So in a previous question I asked about implementing a generic interface with a public class and bingo, it works. However, one of the types I'm looking to pass in is one of the built in nullable types such as: int, Guid, String, etc.
Here's my Interface:
public interface IOurTemplate<T, U>
where T : class
where U : class
{
...
Is anyone aware of a generic tree (nodes may have multiple children) implementation for Java? It should come from a well trusted source and must be fully tested.
It just doesn't seem right implementing it myself. Almost reminds me of my university years when we were supposed to write all our collections ourselves.
EDIT: Found this pro...
I have been developing desktop application in Java. Here, it shows how i reach string of Properties file. Key-value of String is HDI.Device.1.ID
org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(HDIManagementApp.class).getContext().getResourceMap(HDIManagementView.class);String ID=resour...
I have updated the Sharp Architecture solution (SharpArchitecture_1.0_RTM_build_486) (my local copy) and referenced NHibernate 2.1.0.4000 instead of NHibernate 2.1.0.3001 dll. I have also updated all other NHibernate related references in Sharp Architecture solution.
I was able to rebuild Sharp Architecture and to pass all the tests us...
Is there any sort of xml reference?
I found this which turned out to be invaluable for me
http://groups.google.com/group/android-developers/msg/d334017d72909c79
but I can't figure out how I was supposed to know how to do that, had
I not found that post.
I know that the api reference has xml attributes listed for many of
the classes......
I have searched up and down the internet for even the slightest mention of the 'this' reference, and have found NOTHING!!! Nobody seems to talk about 'this' at all. I'm an experienced c++ programmer, so I am more than familiar with the idea of a 'this' pointer/reference. My question is just what exactly is the 'this' reference in an a...
I wonder if there's an easy way to determine which classes from a library are "used" by a compiled .NET or Java application, and I need to write a simple utility to do that (so using any of the available decompilers won't do the job).
I don't need to analyze different inputs to figure out if a class is actually created for this or that ...
Are any reference card or cheat sheet available for UML?
...
Hello everyone,
I think I am missing smth back in my theoretical background on this thing. I know there were similar posts but I still do not get it.
I have such a code:
void somefunc1(Word &Key)
{
somefunc2(Key);
}
void somefunc2(char &char1)
{
return;
}
compiler generates me an error here:
somefunc2(Key);
[BCC32 Error]...
Hi,
I've always been a bit confused about how STL containers (vector, list, map...) store values. Do they store references to the values I pass in, or do they copy/copy construct +store the values themselves?
For example,
int i;
vector<int> vec;
vec.push_back(i);
// does &(vec[0]) == &i;
and
class abc;
abc inst;
vector<abc> vec;
ve...
Hi all,
I have a question, I want to connect my handphone with my ubuntu laptop using bluetooth connection. The handphone just need to send what key I pressed to the laptop and do process based on what key I pressed. Did you guys have any easy to learn reference about j2me and bluetooth for people who just know basic JAVA syntax?
...
In C++, passing const references is a common practice - for instance :
#include <iostream>
using namespace std;
class X
{
public :
X() {m_x = 0; }
X(const int & x) {m_x = x; }
X(const X & other) { *this = other; }
X & operator = (const X & other) { m_x = other...
Hi all,
Do you know of any way to reference an object in the replacement part of preg_replace. I'm trying to replace placeholders (delimited with precentage signs) in a string with the values of attributes of an object. This will be executed in the object itself, so I tried all kinds of ways to refer to $this with the /e modifier. Somet...