Objects and properties of properties
Okay, this should be an easy object oriented C# question, but for some reason I have been unable to find the answer yet.
I am creating an object of my own called JAddress. And basically I want to be able to do the following:
JAddress.ZipCode.Text
JAddress.ZipCode.MyId
I am unsure on how to create the second level of properties! Doing only a first level is really easy.....public string ZipCode
{
get { return m_ZipCode; }
set { m_ZipCode = value; }
}Does anyone know how to do this?
Thanks in advance,
csdietrich
You would have its own ZipCode type (class) which...
Sorting on fields bound to object properties
Hi,
I have implemented a custom gridview control 'SortableGridView' which handles sorting and paging of the gridview when bound to custom types (objects).
However, I am not able to figure out how to get the sorting working for columns that are bound to object properties.
For example, if my SortableGridView is bound to a collection of Car objects, and within the _RowDataBound event, I bind a column to the Colour of the Dashboard of the Car like this:
protected void SortableGridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.R...
Property of an object within an object
How do I access the property of an object that is within another object? For example, I have an object consisting of an ArrayList of object. The objects contained in the ArrayList have the properties DisplayText and ValueText. What is the syntax to retrieve those properties?
Here's the class file code:
Public Class MenuOption
Public DisplayText As String
Public ValueText As String
Public Sub New(DisplayText As String, ValueText As String)
MyBase.New()
Me.DisplayText = DisplayText
Me.ValueText = ValueText
End Sub
En...
Properties missing from object inspector Delphi XE2I am wrestling with something really annoying. I have created a Firemonkey HD application and certain properties are missing from the object inspector. For instance, when I put a TStatusBar on a form, the Font and Text properties are missing. When I open one of the sample applications, like ControlsDemo, that also has a TStatusBar, then these properties are there! I cannot find out what's the relevant difference in settings between my app and ControlsDemo. Right-clicking on the object inspector (rightclic
k > view), I see that all available properties are displayed. I have tried this o...
I want to setup property value in property page but there "Object reference not set to an instance of an object."
What is it?
And how i can debug my controls?
Hi,
we would pretty much more information. What kind of is the property in question? Is it string, URL or what?
You would be able to debug controls by having controls on separate Web Control Library project and then the actual consuming app on project that uses these controls (references the Web Control Library project). Put breakpoints on the code for your controls and run F5 in Visual Studio to start debugging (like you nornmally would). That's it.Thanks,Teemu KeiskiFinland, EU
If you access childobjects of your custom control in th...
Property returns "Object" object that contains custom objectsHi,
I had some difficulties on returning the property of a custom
JavaScript Object.
Assuming I had a JSObject ObjA that was created using JS_NewObject with
my own JSClass ObjA_class. And ObjA_class has one property getObjBs
that will return a JavaScript standard "Object" object.
And I want this "Object" object has properties that names are same as
each ObjB object's property "id" , and the value of each properties is
ObjB object.
e.g.
There are 2 ObjB objects:
student1 and student2.
The ObjB has a propperty "id":
student1.id...
v12.1 allows for object properties by diagramThis is a multi-part message in MIME format.
---=_forums-1-dub44d35e3d
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Just wanted to point out that the "sub-object" symbol
formatting feature of the new release addresses - in part -
an often requested enhancement to support displaying
different properties of an object depending on what diagram
it appears on. See attachment for one example of how to
use this feature > where the entity attributes of no
relevance to a specific diagram are grayed out and reduced
in font size.
...
Protected methods and properties in Objective-C vs DelphiI'm presently involved in writing an iPhone app and have come against
yet another learning curve.
Whereas Delphi has good visibility specifiers and easy ways to declare
properties and methods as private and protected, Objective-C has
traditionally been a tad "imprecise" about visibility :-)
For those who fancy a trip into the surreal world that is Objective-C
programming, I have written a small article in my own forums -
http://carterconsulting.org.uk/forums/viewtopic.php?f=3&t=18
Read it and you might be glad you still have work in Delphi ;-)
Joanna
...
How to Bind to property of inner object of an object?
Hi,
In my case, I have two objects like this: 1 public class Address{
2 private string _country;
3 public string Country { get {return _country;} set {_country=value;}}
4
5 private string _zip;
6 public string Zip { get {return _zip;} set {_zip=value;}}
7 }
8
9 public class Person{
10 private string _firstname;
11 public string FirstName{ get {return _firstname;} set {_firstname=value;}}
12
13 private string _lastname;
14 public string LastName{ get {return _lastname;} set {_lastname=value;}}
15 ...
objectdatasource and business objects with object properties
Hi
Lets say i have a business object called Customer which has a property called Address which is itself and object of type Address (in this sense there is a one-to-one relationship between Customer and Address). Lets say customer has properties forename and surname and Address has properties add1 and postcode
Could you use an objectdatasource to perform updates on a customer object? For example, if your objectdatasource had a method updateCustomer(Byval c as customer) and your gridview had fields forename and surname and add1 and postcode, would the objectdatasource know to map fore...
superreview requested: [Bug 226819] Javascript Object window should allow sort properties and methods by name : [Attachment 238736] patch v3Jason Barnabe (np) <jason_barnabe@fastmail.fm> has asked neil@parkwaycc.co.uk
<neil@httl.net> for superreview:
Bug 226819: Javascript Object window should allow sort properties and methods
by name
https://bugzilla.mozilla.org/show_bug.cgi?id=226819
Attachment 238736: patch v3
https://bugzilla.mozilla.org/attachment.cgi?id=238736&action=edit
------- Additional Comments from Jason Barnabe (np) <jason_barnabe@fastmail.fm>
Addresses all comments.
I've tweaked the sort order a bit to handle arrays better: constants with
numeric values sorted numerically by ...
superreview requested: [Bug 226819] Javascript Object window should allow sort properties and methods by name : [Attachment 238584] patch v2Jason Barnabe (np) <jason_barnabe@fastmail.fm> has asked neil@parkwaycc.co.uk
<neil@httl.net> for superreview:
Bug 226819: Javascript Object window should allow sort properties and methods
by name
https://bugzilla.mozilla.org/show_bug.cgi?id=226819
Attachment 238584: patch v2
https://bugzilla.mozilla.org/attachment.cgi?id=238584&action=edit
------- Additional Comments from Jason Barnabe (np) <jason_barnabe@fastmail.fm>
Bug 339396 doesn't seem to be causing errors with this patch any more.
...
superreview cancelled: [Bug 226819] Javascript Object window should allow sort properties and methods by name : [Attachment 223253] patch v1Jason Barnabe (np) <jason_barnabe@fastmail.fm> has cancelled superreview:
Bug 226819: Javascript Object window should allow sort properties and methods
by name
https://bugzilla.mozilla.org/show_bug.cgi?id=226819
Attachment 223253: patch v1
https://bugzilla.mozilla.org/attachment.cgi?id=223253&action=edit
...
superreview requested: [Bug 226819] Javascript Object window should allow sort properties and methods by name : [Attachment 223253] patch v1Jason Barnabe (np) <jason_barnabe@fastmail.fm> has asked neil@parkwaycc.co.uk
<neil@httl.net> for superreview:
Bug 226819: Javascript Object window should allow sort properties and methods
by name
https://bugzilla.mozilla.org/show_bug.cgi?id=226819
Attachment 223253: patch v1
https://bugzilla.mozilla.org/attachment.cgi?id=223253&action=edit
------- Additional Comments from Jason Barnabe (np) <jason_barnabe@fastmail.fm>
This patch makes the properties sorted alphabetically, case-sensitive.
...