User Profile

Collapse

Profile Sidebar

Collapse
phoenix1990
phoenix1990
Last Activity: Oct 24 '10, 11:26 PM
Joined: May 12 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Never mind i figured it out.
    See more | Go to post

    Leave a comment:


  • Return class(a) pointer in another class(b) function

    So i've been working on a program in c++ that uses classes, and i am having a few problems with returning a class value from another class's function.

    So i have a class called X, which is essentially a class that defines a linked list, and has some of the basic operations. In that class i have a '[]' operator that is overloaded with each value in the linked list. The operator can also override values in the linked list using
    ...
    See more | Go to post
    Last edited by Nepomuk; Sep 12 '10, 08:23 AM. Reason: Please use [CODE] tags

  • phoenix1990
    replied to C-AVR programming and saving to epprom
    in C
    thanks for the help guys, your comments saved me a lot of time.
    See more | Go to post

    Leave a comment:


  • phoenix1990
    started a topic C-AVR programming and saving to epprom
    in C

    C-AVR programming and saving to epprom

    so i started learning avr-c programming a few weeks ago and i'm a little confused about using the eeprom so save values.
    i've been working a snake game for my project, and i need to save everything at any point to the eeprom so that the user can load it from that spot again.
    but first i've been receiving warnings in regard to the way i've been trying to save the the highscore
    Code:
    #include <avr/eeprom.h> 
    eeprom_write_word(1,
    ...
    See more | Go to post

  • phoenix1990
    replied to turning a string into an equation
    thanks for the help Glenton.
    it worked like a charm.
    See more | Go to post

    Leave a comment:


  • phoenix1990
    started a topic turning a string into an equation

    turning a string into an equation

    so i have an entry frame where i want to input an equation, and i need to turn the string into an actual equation in terms of x. so that i can plot it on a canvas.
    i already know how to make the entry frame, and how to extract the string equation that was inputed.
    the only problem i'm having is converting it into an actual equation.
    e.g.
    the string input is 'sin(x)'
    and i want to turn it into sin(x)
    x is...
    See more | Go to post

  • phoenix1990
    replied to Tkinter, and calling other classes
    IT WORKED!!! and i'm finally finished with all the stuff i needed to do. thanks for all your help during the past week boxfish. you saved me a lot of time and stress....
    See more | Go to post

    Leave a comment:


  • phoenix1990
    replied to Tkinter, and calling other classes
    ok, so i've pretty much finished everything, but i'm having a little problem with creating a popup dialog box.
    i've defined a new class called DialogBox which looks like this
    Code:
    class DiaglogBox:
        def __init__(self, master):
            if self.entryframe.win==True:
                self.win()
            else:
                self.lose()
    however every time i try to call that function(self.d ialogbox=Dialog Box(None))...
    See more | Go to post

    Leave a comment:


  • phoenix1990
    replied to Tkinter, and calling other classes
    nevermind, it fixed itself somehow....
    See more | Go to post

    Leave a comment:


  • phoenix1990
    replied to Tkinter, and calling other classes
    ok so i've run into a problem with the code you gave me. when i click clear. it runs the clear definition that was defined in the entryframe class. however it will only delete the first entry in the GUI's frame and not the other three..
    See more | Go to post

    Leave a comment:


  • phoenix1990
    replied to Tkinter, and calling other classes
    thanks for the help boxfish.
    if i run into anymore problems i'll let you know
    See more | Go to post

    Leave a comment:


  • phoenix1990
    replied to Tkinter, and calling other classes
    nevermind i got it to work in the end, by adding this in
    Code:
            
    entryDigits = []
    for i in self.entries:
        entryDigits.append(i.get())
        for i in entryDigits:
            if i=='':
                entryDigits.remove(i)
    See more | Go to post

    Leave a comment:


  • phoenix1990
    replied to Tkinter, and calling other classes
    so i overrode the process entries to call the setStatus function, and everything seems to be working. however
    Code:
    entryDigits = []
    for i in self.entries:
        entryDigits.append(int(i.get()))
    won't work since every entry in self.entries is a string and each entry initally starts off as an empty string. so it can't turn an empty string into an integer. so i decided to remove the init and that seemed to work, but now it always...
    See more | Go to post

    Leave a comment:


  • phoenix1990
    replied to Tkinter, and calling other classes
    is this what had. i think it's a little different to what you are saying i should do
    Code:
    class View(EntryFrame):
        def __init__(self, parent, num):
            EntryFrame.__init__(self, parent, num)
            self.pack(anchor=W)
        def setStatus(self):
            n=0
            for i in self.entries:
                if i in self.entries[n+1:]: #not too sure on this part
                    self.statustext.set('Status:
    ...
    See more | Go to post

    Leave a comment:


  • phoenix1990
    replied to Tkinter, and calling other classes
    just one more question, and it quite a long one, but don't understand how inheritence works much

    so here's the full code of the EntryFrame class
    [code]
    Code:
    DIGITS=4
    class EntryFrame(Frame):
        """A widget base class for entering a list of digits
    
        Constructor: EntryFrame(parent, num) - parent is the parent widget
        and num is the number of digits to be entered.
    ...
    See more | Go to post

    Leave a comment:


  • phoenix1990
    replied to Tkinter, and calling other classes
    yeah it turns out that the code you gave me earlier did work, i just didn't pack it into the frame.
    thanks for you help boxfish...
    See more | Go to post

    Leave a comment:


  • phoenix1990
    replied to Tkinter, and calling other classes
    thank you, boxfish for replying. however that seems to have no effect on it whatsoever.
    i can specify a parent in another class if i want to, but i'm not sure how to do that. again i'm still a noob when it comes to programming....
    See more | Go to post

    Leave a comment:


  • phoenix1990
    started a topic Tkinter, and calling other classes

    Tkinter, and calling other classes

    Hi,
    i'm kind of new at programming, so i was just wandering if anyone can help me with a little problem that i've been having for a couple of hours now.
    i have a piece of code that's was given to me like this and can't be touched:
    ----------------------------------------------------------
    Code:
    DIGITS=4
    class EntryFrame(Frame):
        """A widget base class for entering a list of digits
    ...
    See more | Go to post
    Last edited by bvdet; May 12 '09, 12:55 PM. Reason: Add code tags
No activity results to display
Show More
Working...