473,387 Members | 1,749 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Setting a read-only attribute

I have an object and wish to set an attribute on it which,
unfortunately for me, is read-only.

How can I go about this?

Cheers.
-T

Aug 30 '07 #1
5 1696
On Aug 30, 10:35 pm, "tleeuwenb...@gmail.com" <tleeuwenb...@gmail.com>
wrote:
I have an object and wish to set an attribute on it which,
unfortunately for me, is read-only.
If it's read-only then you can't set it!
How can I go about this?
Joke aside, I think you need to be more specific.

--
Arnaud
Aug 30 '07 #2
Arnaud Delobelle wrote:
On Aug 30, 10:35 pm, "tleeuwenb...@gmail.com" <tleeuwenb...@gmail.com>
wrote:
>I have an object and wish to set an attribute on it which,
unfortunately for me, is read-only.

If it's read-only then you can't set it!
>How can I go about this?

Joke aside, I think you need to be more specific.
To be more specific about much more specific you should be:
If you know the exact problem/hurdle you have to overcome, explain it.
Otherwise kindly provide the traceback (error message) you get when
attempting to set the attribute.

/W
Aug 30 '07 #3
tl**********@gmail.com wrote:
>I have an object and wish to set an attribute on it which,
unfortunately for me, is read-only.

How can I go about this?

Cheers.
-T
I guess we all need an code example to show us the way 'read only' is
implemented.
If you cant access to the class wich you are instantiated from, well,
maybe you can just post the error or exception you get.

Cheers.
Gerardo
Aug 30 '07 #4
On Aug 30, 11:35 pm, "tleeuwenb...@gmail.com" <tleeuwenb...@gmail.com>
wrote:
I have an object and wish to set an attribute on it which,
unfortunately for me, is read-only.

How can I go about this?

Cheers.
-T

Could you show the object you want to set his attribute?
Until that, it's difficult to answer to you.

PS: If the attribut is on read only, their must a good reason for
that ;)

Aug 31 '07 #5
tl**********@gmail.com wrote:
I have an object and wish to set an attribute on it which,
unfortunately for me, is read-only.

How can I go about this?
This seems like a bizarre requirement. Why is the attribute read-only in
the first place? How is the read-only mechanism enforced? Is the object
created in Python or in an extension module? Do you have any evidence
that "setting" the attribute will effect the required change in the
behavior of the object.

A little more information would be helpful.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
--------------- Asciimercial ------------------
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
----------- Thank You for Reading -------------

Aug 31 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: huzz | last post by:
Am trying to read user defined setting from web.config as shown in this tutorial http://aspnet.4guysfromrolla.com/articles/053102-1.aspx When i try to read the value i get error "Method name...
18
by: Dixie | last post by:
Can I set the Format property in a date/time field in code? Can I set the Input Mask in a date/time field in code? Can I set the Format of a Yes/No field to Checkbox in code? I am working on...
18
by: MLH | last post by:
I have an A97 app that automatically sends eMail using OutLook Express. Each installation requires the user to reconfigure Outlook Express to avoid prompts waiting for them to authorize or deny...
1
by: Darrel | last post by:
I've figured out how to read a variable in one ASCX file from another. Works great. I now would like to have one ASCX file set a variable in its parent ASPX or another ASCX file. Can that be...
3
by: dotnet dev | last post by:
Hi, I have a plain text file called myVersions.ver which will have something like this: AppVersion: 1.0 DBVersion: 1.0 I will use this file to keep my app version number and database...
8
by: VB User | last post by:
I would like the text property of combo box to read the first item of the list on form load. I have a set of four items in the collection. How do I do it? Thanks
14
by: Roger Withnell | last post by:
How to I find out what size text the browser is set to? Thanks in anticipation.
8
by: Andrus | last post by:
..NET 2 Winforms application. How to create new setting and set it default value in userSettings section of app.config file or overwrite existing setting value ? I found code below in this list...
1
by: =?Utf-8?B?UmljaA==?= | last post by:
In the Registry at HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Jet \ 4.0 \ Engines \ Text the default key for Text Format is: "Format" = "CSVDelimited" I can use the following OleDB...
7
by: PetterL | last post by:
I have a setting called My.settings.firstrun set to True, set in the setting manager. When i read this in the first form form_Load in a IF sentence it always come out as false. I have tried to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.