473,480 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

AttributeError: 'Attributes' object has no attribute 'saveFile'

Not sure how to explain, but I'll try my best. I'm making a GUI with
wxGlade. The GUI has windows that open when the "Next Page" button is
pushed; the button also pickles the information that is input into the
frame at the same time. The saveFile name is autocreated based on the
data entered by the user in the first frame.

Each frame that is created is a new class, e.g. the first frame that
opens is "CharInfo", which opens the frame "Attributes". The pickling
works for the first frame but doesn't work for the ones after.
Apparently the saveFile attribute I created in the "CharInfo" class
isn't carried through to "Attribures", even though it's supposed to be
a subclass.

I've tried several different ways to get it working, such as expressly
calling CharInfo.saveFile, calling CharInfo.pushedButton.saveFile
(saveFile is part of the pushedButton method), calling
Attributes.saveFile, and calling self.saveFile. Every time, I get the
AttributeError message stating saveFile is not an attribute of either
the classes or any function.

The reason I want to keep the same saveFile attribute through every
class is because the initial button in CharInfo creates the file save
name and path; I'd like to have it carried through the rest of the
classes so each new frame will save it's information to the same file.

Is there a way to keep the saveFile "live" throughout the entire
program or would it be better to create a "choose a filename" window at
the end of the program? If the latter, is there anything special I
need to know so the information in each class is pickled correctly?

Aug 31 '06 #1
2 2538
Hi

Sounds like you've got a wizard-type interface thing happening.
I haven't used wxGlade but I have done similar things in GTK several
times.

Try putting all the windows in a notebook widget with hidden tabs.
Put the 'Next Page' button and the filename outside the notebook. This
makes the filename always available and the 'Next Page' button would
just switch pages in the notebook widget.

Hope this is helpful

Cheers
Tim

Sep 1 '06 #2

t.********@aranz.com wrote:
Hi

Sounds like you've got a wizard-type interface thing happening.
I haven't used wxGlade but I have done similar things in GTK several
times.

Try putting all the windows in a notebook widget with hidden tabs.
Put the 'Next Page' button and the filename outside the notebook. This
makes the filename always available and the 'Next Page' button would
just switch pages in the notebook widget.

Hope this is helpful

Cheers
Tim
Sounds simple enough. Of course, we all know the difference between
theory and practice. I think I rember seeing a wizard-type interface
in the wxGlade tutorial. I'll take a look at that to. Thanks for the
tip.

Sep 1 '06 #3

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

Similar topics

0
2446
by: seth | last post by:
Last week I encountered an AttributeError in my unit tests that I wasn'table to catch with an "except AttributeError" statement. The problem stemmed from a class that raised an error inside...
0
2020
by: Erlend Fuglum | last post by:
I have tried and tried, but cannot figure out the source of the following error: AttributeError: 'module' object has no attribute 'menyHMTL' __doc__ = 'Attribute not found.' __getitem__ =...
3
1620
by: Janaka | last post by:
I've seen and used some samples where you can set the onclick attrubute to a Button control to get it to do some javascript a la : btnUse.Attributes = "DoSomeJS()"; However when i try and get...
1
1626
by: Gérard Talbot | last post by:
Hello, According to DOM 2 Core, the attribute "nodeRef.attributes" is "A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise."...
2
3390
by: rsd | last post by:
Hi, I'm trying get Samsung YH-920 mp3 player to work with Debian GNU/Linux. To do that I need to run http://www.paul.sladen.org/toys/samsung-yh-925/yh-925-db-0.1.py script, the idea behind the...
7
31708
by: erikcw | last post by:
Hi, I'm trying to build a SQL string sql = """INSERT INTO ag ('cid', 'ag', 'test') VALUES(%i, %s, %d)""", (cid, ag, self.data) It raises this error: AttributeError: 'tuple' object has no...
2
2023
by: Thomas Guettler | last post by:
Hi, how can you list the attributes of an object if you catch an AttributeError? I couldn't find a reference in the exception object, which points to the object. I want to call dir() on...
26
1878
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. ...
4
6104
by: Nikhil | last post by:
I have recently written a small module. When I import the module, I always get the error only when I do -- Traceback (most recent call last): File "<stdin>", line 1, in <module>
0
6911
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7050
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
6966
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5344
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4488
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2999
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
564
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.