473,385 Members | 1,641 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,385 software developers and data experts.

Attributes in a class module

I am using a PropertyGrid with some classes that have custom Type
Descriptor attributes. The attributes change how the PropertyGrid displays
the properties of the object.

The folder structure for my app is this:

MainAppFolder
|
-- Modules
|
-- Module1
CustomClasses.dll
CustomAttributes.dll
If I leave the CustomAttributes.dll in the Module1 folder, then the
PropertyGrid does not apply the attributes, although there is no error. If
I move the CustonAttributes.dll to the MainAppFolder, then the attributes
are applied correctly.

I would like to keep all the files for each module in its own folder. The
main app scans through the folders in the Modules folder and loads each
module (using an Interface). I want the modules to be independent and do
not want them to put any of their files into the MainAppFolder.

Can anyone offer any reason for this behavior? Is it possible to include
the Module directories in the MainApps search path when it tries to look
for the CustomAttributes dll?

Thanks,

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
Nov 21 '05 #1
1 985
On Fri, 3 Dec 2004 14:05:57 -0600, Chris Dunaway wrote:
Can anyone offer any reason for this behavior? Is it possible to include
the Module directories in the MainApps search path when it tries to look
for the CustomAttributes dll?


After a little searching, I found a solution. I used the following line of
code after loading the module:

AppDomain.CurrentDomain.AppendPrivatePath(sFolder)

and that did the trick.

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
Nov 21 '05 #2

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

Similar topics

6
by: beliavsky | last post by:
I have started using classes with Python and have a question about their use. In Python, 'attributes are all "public" and "virtual" in C++ terms; they're all accessible everywhere and all looked...
2
by: Andrew Degtiariov | last post by:
Hello! I tried to rewrite my python module in C. My module is successfully imported but i can't assing anything to class attributes (tp_setattr in PyTypeObject for class FlowReportRow filled up by...
1
by: Alexander Kervero | last post by:
Hi ,today i was reading diveinto python book,in chapter 5 it has a very generic module to get file information,html,mp3s ,etc. The code of the example is here :...
6
by: steven | last post by:
Hi, I'm new to python. Given a class, how can I get know what attributes/functins in it without dig into the source? - narke
0
by: michael.murr | last post by:
I've read a few posts about how to have attributes that are "linked" at run time. I've created a (simple) Python metaclass that accomplishes this with some behind-the-scenes __init__ redirection. ...
6
by: Jakub.Bednarczuk | last post by:
Hallo everybody I have the problem with getting attributes values and also attributes names. I am reading an xml file with DOM. Lets see an example: file I read <root> <Def></Def>...
28
by: Alan Isaac | last post by:
I have a class whose instances should only receive attribute assignments for attributes that were created at inititialization. If slots are not appropriate, what is the Pythonic design for this? ...
4
by: Ron Adam | last post by:
This is for a new version of pydoc if I can get the class attributes sorted out. The module level attributes aren't too difficult to categorize. (I might be just too tired to see the obvious.) ...
26
by: tjhnson | last post by:
Hi, With properties, attributes and methods seem very similar. I was wondering what techniques people use to give clues to end users as to which 'things' are methods and which are attributes. ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...

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.