properties

Why were window.scrollY and window.scrollX introduced?

As far as I know, pageY/XOffset properties were already available since Netscape 4 era. And it seems scrollY/X were introduced circa Netscape 6. Alternative question: Is there a browser which implements scrollY/X but doesn't support pageY/XOffset? ...

ActionScript - Dynamically Adding Property to Sprite

i'm pretty confused over the following issue and would be grateful for some clarity. generally, how i work involves designing all of my graphics in Flash Authoring, converting them to Sprite symbols by changing the base class to flash.display.Sprite, give my instances names and finally export them to ActionScript. the approach actually...

myView.frame Vs. self.myView.frame

I know it's often advisable to use the @property accessors, and I know it's important to use self.myView = x instead of mView = x, but: Isn't myView.frame sufficient? The AtomicElementFlippedView.m file in TheElements has self.wikipediaButton.frame=buttonFrame;. Shouldn't I leave out self if I'm getting/setting a property of my ivar an...

ActionScript - Dictionaries Best For Adding Bool Properties To Non-Dynamic Objects?

i'm currently using a dictionary to associate a boolean to my (non-dynamic) sprites, but i would like to know if there is a smarter way of doing this? i could just use MovieClips to assign my properties instead of Sprites since MovieClips are dynamic, but i will not be using any of the MovieClip properties or functions so it comes down ...

How to swap out hibernate.cfg.xml properties?

Hello all! I've got a hibernate configuration file called hibernate.cfg.xml. In this file there are hard-coded property names like: <hibernate-configuration> <session-factory> <property name="hibernate.connection.username">root</property> <property name="hibernate.connection.password">mysecretpassword</property> ... </s...

Netbeans custom component properties

This might be a stupid question but is it possible for NetBeans IDE to add custom properties to my custom component which I already have placed in the Palette and if so then how? I have been looking all over the internet and haven't found anything that would help me figure it out. Thanks, Martin S. ...

Is there a Property Dialog control that i can use in my WPF App?

I'm building an application using WPF that will be a designer of sorts, meaning, a user can drag and drop custom UI elements into a canvas and be able to configure their behavior via properties. (Think of this like a domain specific PowerPoint. You can add elements to the presentation, configure the elements' properties and then eventua...

How to designate a property as the Default Property for a VbScript class

Given that one can define a class in VB Script, is there any way to specify a default property for that class? e.g. Given Class MyClass Private myName Public Property Get Name() Name = myName End Property end class Is there anyway I can say that Name is the default property? NB: To do this in VB6, one would a...

How to portably read configuration data from a servlet

I'm writing a Java servlet that needs to read some site-specific configuration data; I would like it to be easily accessible/modifiable by the sysadmins at deployment time. There is no sensible default, so the data needs to be provided by the site admin. It consists of a few string key/value pairs (think Properties). It would only be r...

Can java properties file reference other properties file?

Can java properties file reference other properties file? ...

Properties of Properties as Templates

I try to implement C++ properties as templates as defined in WikiPedia template <typename T> class property { T value; public: T & operator = (const T &i) { ::std::cout << i << ::std::endl; return value = i; } // This template class member function template serves the purpose t...

PHP Automatic Properties / Overloading

I am writing some PHP. I have several classes that do not declare any properties, public or otherwise. I have a custom mySQL class that fetches objects from mySQL and sets property values for the newly init'd PHP object like so... while ($row = mysql_fetch_assoc($result)) { foreach($row as $key => $value) { $this->{$k...

Adding a Property to an existing class

I have a private class that I'm using to implement certain properties. As such, I don't have the ability to modify the actual private class, and don't want to use inheritance to create my own class in place of it. Is there a way where I can add properties to that private class? Thanks! ...

What is the best practice for ReadOnly Properties/Functions in VB.Net?

I'm not too new to VB.Net and the syntax, but I'm not an expert. I'm working on rewriting something in VB that was previously in C# and while I was doing so, I came across a "dilemna." I can have a ReadOnly Property: Public ReadOnly Property MaximumIndenture() Get Try 'If the connection is closed, open it.' ...

Flex components property change event

I have a custom component on which I have bound an array collection to one of its proeprties: <comp:MyComp id="comp" prop="{images}" /> images is an arraycollection In the components' code I would like to know which event to listen on everytime images updates props.I tried a setter on props but the setter only gets called once when p...

spring property files

Hello all... I need to use the values from the property file... I tried searching it.. What i got is... i need to define a bean of PropertyPlaceHolderConfirguartion under beans.factory.config package of spring framework. But i wish to use it in a pure java class. Depending on a particular value selected, i need to load a particular prope...

Log4j properties from each module

Hello, I'm writing an application that consists of several maven modules. All of them have to log stuff to their own log files. I created a log4j.properties file in the main/resources folder of each module. Now when I start the application from one of the modules, it writes everything to the log file of that module. I wondered if this w...

How should I expose an enum?

Here's my situation. I have a library that has a set of enums that I need to use. public enum showtype { comedy = 1001, horror = 1002, mystery = 1003, action = 1004; } This library is being referenced by another library that I created. My library is referenced by more than one console based app. I need to assign the show type dir...

Java: can't load applications.properties

Hello, I have a basic executable JAR with manifest.txt containg the MainClass and some other jar dependencies. I wanted to move my config file, "application.properties" outside the jar into a directory where it's easy to configure/maintain. The java code does a simple ResourceBundle.getBundle('application.props') to load it. I have a...

Dynamically modify JS Object's behavior

Hi, is it possible to decide at runtime which properties of a JS object should be enumerated? Something like myobj = {}; myobj.keys = function() { // I made this keys function up. Is there something like that in JS? if ((new Date).getSeconds() < 30) return [1,2,3]; else return [4,5,6]; } for(p in myobj) console.log(p);...