I need to ensure a Macro which works on Visio 2003 doesn't cause problems on lower versions of Visio: specifically because I'm writing to a property which doesn't exist on lower versions of Visio. Currently I'm doing this:
...
On Error GoTo NoComplexScriptFont:
Set cellObject = shapeObject.Cells("Char.ComplexScriptFont")
On Error GoTo E...
This should be easy, but after several hours I’m coming up blank. ;(
I do a Registry Search (actually 2), because I need to check for either of 2 previous installs and then install my new files to the location of the prior install that was found.
Only one of these prior installs will actually exist.
I then need to install my new f...
When getting an object from the DB, should the object's properties also be loaded? There seems to be these approaches.
Create well-formed, fully-loaded objects.
Pro: No need to check if a property has been loaded; it has. Pass it around and don’t worry about parts of the object not being there.
Con: Where do you stop? If an object h...
Hello everyone,
I'm starting to study Silverlight 3 and Visual Studio 2008. I've been trying to create Windows sidebar gadget with button controls that look like circles (I have couple of "roundish" png images). The behavior, I want, is the following: when the mouse hovers over the image it gets larger a bit. When we click on it, then i...
I'm using Silverlight 3/C#, and I'm trying to create some XAML objects programatically in response to a user clicking on a button.
However, I can't seem to position a Canvas object that I have created - when I call SetValue() on the new Canvas with the Canvas.LeftProperty value, the browser window clears to an empty screen.
I have a si...
I want
Stats.singleton.twitter_count += 1
and I thought I could do
class Stats:
singleton_object = None
@property
@staticmethod
def singleton():
if Stats.singleton_object:
return Stats.singleton_object
Stats.singleton_object = Stats()
return Stats.singleton()
But it throws an exc...
I have two UserControls that I want to display in a Window. The value of the property "SelectedItem" of the first UserControl should be set to the second UserControl's "SelectedItem" property. How do I do this?
In my current code, the value set in the first UserControl's property does not trigger an update in the second UserControl. I h...
Take the following property:
public string Foo
{
get;
private set;
}
Using reflection, I can still set the value of this property from outside the owning class. Is there a way to prevent this? Removing the set accessor is not an option as it must be WCF friendly.
...
Hi,
My question is conceptually simple but seems not working in the xaml
Question:
I have two usercontrols in my mainPage.
My requirement is, In the mainpage, i am using two usercontorls, usercontrol1 is textblock and usercontrol2 is button.
In the Usercontrol2.xaml.cs, I have a Button_Click event which gets some value(say ID)as a pr...
I have downloaded a sample code of AA-Plot Chart.
One of the .h files:
@interface MainViewController : UIViewController <APYahooDataPullerDelegate, CPPlotDataSource> {
CPLayerHostingView *layerHost;
@private
APYahooDataPuller *datapuller;
CPXYGraph *graph;
}
@property (nonatomic, retain) IBOutlet CPLayerHostingView *la...
What I'm trying to do is compile to a file which takes it's version from a constant inside my source files.
I have a setup like this (or at least the significant bits):
tasks/compile.xml
<project name="Compile">
<target name="check.version">
<script language="javascript">
regex = /VERSION.+?"([\d\.]+)";/;
...
How can you write the following F# code (or similar) in one line:
let contextMenu = new ContextMenuStrip()
mainForm.ContextMenuStrip <- contextMenu
I have to declare contextMenu as it will be needed later.
Thank you
...
Hello,
I had an enquiry from a potential customer who would like to build a Real Estate website. He was looking to provide access to Agencies who can list their properties and add images and details to it.
I know that Joomla with Mosets Hot Property can handle this well. I do not want the complex CMS behind a property management websit...
Any ideas on how I could add type annotation to fix this error?
I'm getting a red squiggly under Foo.Bar in getFooBar and the following error message for it.
Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the o...
I am wondering if this is possible in JavaScript, I want to have an Object which could contain dynamic properties.
Give an example:
function MyObject()
{
}
var myobj = new MyObject();
myobj.property1 = "something";
alert(myobj.property1); // something
alert(myobj.property2); // this should never report error, instead the property s...
Let's say I have a class that has 3 properties. I don't know which property I want to read until runtime. Is there a way to do this without a switch/if-else statement?
If a DataTable is treated as a class, then the columns can be treated dynamically which would work, but I'm not able to change my class into a DataTable (long story).
Fo...
I have been climbing the learning curve of X-code for about two months now. I understand the purpose of the @property/@synthesize directives, but it seems that it is a bit redundant to always declare the properties in the .h file, and then synthesize them in the .m file.
Why does the compiler need both directives? If they are always ...
Hi, I already have an idea on how to do this, but I realized that the control "ControlParameter" did not have an "Id" property (which is needed for the JS). Is there a different way to use JavaScript to change the "DefaultValue" property without the need of using the "Id" property?
Here is the JavaScript and asp.net code that I have be...
I want to have compact class based python DSLs in the following form:
class MyClass(Static):
z = 3
def _init_(cls, x=0):
cls._x = x
def set_x(cls, x):
cls._x = x
def print_x_plus_z(cls):
print cls._x + cls.z
@property
def x(cls):
return cls._x
class MyOtherClass(MyClass):
z...
When i map columns from the inspected table, i do this:
<property name="InstanceName" type="MyNameUserType, MyApp.MyNamespace">
<column name="Name"/>
<column name="Name2"/>
</property>
How can I make property mapping initialize a UserType with data retrieved by the formula's sql query?
<property name="InstanceName" type="MyName...