472,992 Members | 3,339 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,992 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 1686
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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

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.