473,545 Members | 2,776 Online
Bytes | Software Development & Data Engineering Community
+ 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.saveFi le, calling CharInfo.pushed Button.saveFile
(saveFile is part of the pushedButton method), calling
Attributes.save File, 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 2544
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.********@aran z.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
2454
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 __init__and defined a __del__ method to clean up resources. I then discovered asimilar problem in the shelve module. This led me to two...
0
2035
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__ = <bound method AttributeError.__getitem__ of <exceptions.AttributeError instance at 0x8187984>> __init__ = <bound method AttributeError.__init__ of...
3
1624
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 this to work on certain controls such as the ListItem in a RadioButtonList it just doesn't do anything? Does this attributes property only render for...
1
1635
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." http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-84CF096 The question I have is if such NamedNodeMap contains the specified attributes or all...
2
3401
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 script is described at http://www.paul.sladen.org/toys/samsung-yh-925/ I'm getting errors and hoping someone could give me some hints, for I have...
7
31758
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 attribute 'encode'
2
2026
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 the object to list the user the known attributes.
26
1886
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. With ipython, I use tab completion all the time, but I can rarely tell from the names alone whether it is an attribute or method. Tips? Ideas?...
4
6107
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
7499
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7689
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7943
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7456
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7786
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6022
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3490
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1919
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 we have to send another system

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.