Class structures

hi
i have written program which is in two classes
one class deals with the interface and one class deals with the writting to file etc
after writing the following methods i started getting the
exception in main thread stack overflow error
i know that this usually happens when recursive calling is happening
but i cant see how this happens
i think it could be the way i intergrate between the classes
this is the method which shows the data in the gui
public void IssueChoice(int c, int ind){
   String newline = "/n";
     choice = c;
     a = ind;
if (choice == 1){
InfoArea.setText("This member: "+((String)MemberCombo.getSelectedItem())+newline+
                                                            " already has a book on loan: "+((String)BookIssueList.get(a))+newline+
                                                            "and is not a provilaged member"+newline+"Issue has been denied");
                                                       }and this is how i try and give the needed data to the gui class
for(int b=0; b<MemberNmList.size(); b++) {
                         if(((((String)IMember).equals((String)MemberNmList.get(b))
                         &&((String)PrMemberList.get(b)).equals("PMem")))&&(numberbooks==2)){
                                   choice = 2;
theLibrary.IssueChoice(choice, a);i think it might be the way i try and access the gui class
can anyone help me

Sorry, I can't see it from what you've provided.
Could you knock up the minimal code needed to compile, run and demonstrate your problem? As well as being useful for us that sometimes highlights something that you might not have spotted before.

Similar Messages

  • Exporting Class structure

    Is there a way to export your class structure to something like Excel?  Currently, I expanded all the classes with my Data Explorer in Webi, copy all, and pasted them in Excel.  I get all objects this way but they loose their folder structure.  Is there a better way to do this?
    Thanks,
    Jimmy

    Shreya,
    Thanks for the quick reply.  Print to pdf is great if I only needed a read version but I am looking for an easy way to export the structure so I can modify it in Excel.  Sure I can copy from the pdf and paste it in Excel but I'll loose the structure.  Is there a way to export the class structure to Excel without loosing the structure?
    Thanks,
    Jimmy

  • Good class structure?

    what is a good class structure for example i will have a GUI for displaying personnel.
    1. create the FrmPersonnel.java
    public class FrmPersonnel{
    all codes for designing the GUI.
    2. create the JDBC connection class RSetPersonnel.java
    public class RSetPersonnel{
    public ResultSet rsProfile()
    ResultSet rs=null;
    rs.executQuery("SELECT * FROM personnel");
    return rs;
    is this the way it should be?

    what about in my GUI i have these navigation buttons
    top, previous,next and bottom, so i need to have a
    ResultSet that has all the rows of the personnel
    table. what is the best approach to handle this kind
    of data?what if personnel has 100,000 rows.if you want to page your data then page your data.
    Don't fetch 100,000 rows at once. The user doesn't want to see 100,000 at one time. The user wants at the very most to see maybe 100 rows at one time. Probably even less.
    So get 100 rows. Then when the user clicks next get the next 100.
    And so on.
    This is called pagination and it's not only applicable to JSP/Servlets or web applications in general but all GUI tied to data sources.

  • Basic class structure

    I've managed to create several applications in AS 3 without
    ever going face to face with packages and classes. I know that
    seems hard to believe, but anyway-- now I want to use something in
    the corelib and can't figure where I'm supposed to put these files
    I've downloaded. I know this is sub basic but would appreciate
    help.

    funonmars,
    > Hi David, Thanks for your help.
    Sure thing!
    > I tried to implement your class structure, then gave it
    a rest, then tried
    > again today to no avail. Here's a
    >
    http://henryjones.us/articles/using-the-as3-jpeg-encoder
    to the
    > JPGencoder demo that got me interested,
    Gotcha. Yes, that link helps. I ran through the tutorial
    (it's
    surprisingly quick!) and met with success. There are various
    ways it
    *could* be done -- classpath preferences are flexible -- but
    here's what I
    did.
    In the tutorial, just beneath the "First Things First"
    heading, Henry
    writes:
    "Once you have the library, just drop it into your classes
    folder and you
    are ready to go. Now we can import the JPGEncoder."
    The phrase that's open to interpretation is "your classes
    folder." For
    my development workflow, just personal preference, I keep
    third party AS2
    and AS3 classes in these folders:
    C:\Documents and Settings\<username>\My Documents\My
    Projects\ActionScript
    2.0 Classes
    C:\Documents and Settings\<username>\My Documents\My
    Projects\ActionScript
    3.0 Classes
    These corelib classes are written in AS3, so I put them into
    my
    ActionScript 3.0 Classes folder. Specifically, I visited the
    Google Code
    repository linked from Henry's site:
    http://code.google.com/p/as3corelib/.
    I downloaded corelib-.90.zip and extracted its contents to my
    desktop (this
    created a folder called corelib-.90 on my desktop). Inside
    that folder, I
    found a src subfolder. I assumed that meant "source," so I
    opened it -- and
    sure enough, there was the expected com folder. Inside that
    com folder was
    an adobe folder, and so on. The JPGEncoder class was
    ultimately in this
    folder structure: com\adobe\images\JPGEncoder.
    I already had a number of third party AS3 classes in my
    ActionScript 3.0
    Classes folder. Of those, some are located inside a root
    folder named net,
    some in edu, and some in com. My com folder already had a
    number of
    subfolders inside it, but not yet adobe; so I dragged the
    adobe folder
    (along with all of its subfolders) from the corelib-.90
    folder on my desktop
    into my ActionScript 3.0 Classes\com folder.
    From the standpoint of ActionScript 3.0 Classes, then, I had
    a
    com\adobe\images folder structure that led to the class file
    in question.
    Here's the relevant classpath setting in my Flash
    preferences:
    C:\Documents and Settings\<username>\My Documents\My
    Projects\ActionScript
    3.0 Classes
    Based on that classpath setting, here's my import statement:
    import com.adobe.images.JPGEncoder;
    I can see now, in my previous email, that I accidentally
    misled you with
    a suggestion for the wrong import path (apologies on that! I
    misread your
    folder structure). In short, the import path needs to match
    the folder
    structure of the class files themselves -- from the starting
    point of their
    parent-most (aka root) folder.
    I hope that clears it up!
    > Your book arrived today, so maybe that will help me make
    > sense of it.
    Foundation Flash CS3 for Designers is a FLA-centric book, so
    it may not
    help you especially with external class files -- but I
    certainly hope you
    get good use out of it! :) Tom and I tried to cover a broad
    range of
    topics.
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Persist class structure with XMLEncoder

    Hi,
    I am tring to persist the following class structure with an XMLEncoder:
    public class Header {
         public HeaderItem createHeaderItem() {
              //do some initialization
         public HeaderItem getHeaderItem() {
              return item;
         //no getter here
    public class HeaderItem {
         public void setName(String name) {
              this.name = name;
         public String getName() {
              return name;
    //creation
    Header h = new Header();
    HeaderItem item = h.createHeaderItem();
    item.setName("test");I dont want to use setters, so I need custom PersistenceDelegates to deal with the factory method. I have read the sun tutorial and tried several things
    but I don't succeed in persisting this structure. Can anyone help me?
    kind regards,
    Christiaan

    Does no one know a solution for this?

  • Problem in creating EJB and WebService using complex class structure

    Hi All,
    My requirement is like :
    I have a class with very complex structure.
    I have also used external .jars.
    Now when I have created an EJB with a method's return parameter as above class.
    But when I am creating a Webservice, it doesnot allow me to select this method.
    Not able to configure why ?
    Please Help.
    Thanks.

    Hi,
    I have gone through your code and the problem is that when you create jar it takes a complete path address (which is called using getAbsolutePath ) (when you extract you see the path; C:\..\...\..\ )
    You need to truncate this complete path and take only the path address where your files are stored and the problem must be solved.

  • Xcode, how do you take an app from an idea to a data model, data structure, or class structure?

    Hey everyone!
    I'm a beginner xcoder and computer engineering sophomore and have literally spent every hour of the past few weeks reading as much as I possibly can about becoming a developer.
    I've found plenty of documentation, and guides on how to do very specific things in xcode and objective-C but am still looking for more information on one topic; how do you decide which data models/structures/controllers etc to use?
    I mean, you personally. I've been looking for a resource on this and have not been able to find one. I just finished Apple's iOS Developers Guide and they mention "choosing a data model" but do not describe them in much detail.
    The following is what is provided in the guide:
    ● Choose a basic approach for your data model:
    ● Existing data model code—If you already have data model code written in a C-based language, you
    can integrate that code directly into your iOS apps. Because iOS apps are written in Objective-C, they
    work just fine with code written in other C-based languages. Of course, there is also benefit to writing
    an Objective-C wrapper for any non Objective-C code.
    ● Custom objects data model—A custom object typically combines some simple data (strings, numbers,
    dates, URLs, and so on) with the business logic needed to manage that data and ensure its consistency.
    Custom objects can store a combination of scalar values and pointers to other objects. For example,
    the Foundation framework defines classes for many simple data types and for storing collections of
    other objects. These classes make it much easier to define your own custom objects.
    ● Structured data model—If your data is highly structured—that is, it lends itself to storage in a
    database—use Core Data (or SQLite) to store the data. Core Data provides a simple object-oriented
    model for managing your structured data. It also provides built-in support for some advanced features
    like undo and iCloud. (SQLite files cannot be used in conjunction with iCloud.)
    ● Decide whether you need support for documents:
    The job of a document is to manage your app’s in-memory data model objects and coordinate the storage
    of that data in a corresponding file (or set of files) on disk. Documents normally connote files that the user
    created but apps can use documents to manage non user facing files too. One big advantage of using
    documents is that the UIDocument class makes interacting with iCloud and the local file system much
    simpler. For apps that use Core Data to store their content, the UIManagedDocument class provides similar
    support.
    I suppose my question boils down to, how do you decide which structures to use? If you can provide an example of an app idea and how its implemented that would be very helpful and much appreciated!
    For example, to implement the idea of an app which allows users to progress through levels of knowledge of a certain subject and rewarding them with badges and such (this is not an actual app just a whim) how would one model that?
    Thanks in advance for all your help!!!

    SgtChevelle wrote:
    how do you decide which structures to use?
    Trial and error.
    I wish I had a better answer for you, but that pretty much encapsulates it. There is some, but not much, good wisdom out there, but it takes a significant amount of experience to be able to recognize it. The software development community if currently afflicted with a case of copy-and-paste-itis. And the prognosis is poor.
    The solution is to be brutal to yourself and others. Focus on what you need and ignore everything else. Remember that other people have their own needs and methods and they might not be applicable to you. Apple, for example, can hire thousands of programmers, set them to coding for six months, pick the best results, and have the end-users spend their own time and monety to test it. If you don't have Apple's resources and power, think twice about adopting Apple's approach. And I am talking from a macro to a micro perspective. Apple's sample and boilerplate code is just junk. Don't assume you can't do better. You can.
    Unfortunately, all this takes time and practice. You can read popular books, but never assume that anyone knows more than you do. Maybe they do and maybe they don't. It takes time to figure that out. Just do your best, ignore the naysayers, and doubt other people even more than you doubt yourself.

  • Large App Design Class Structure - OOP or MVC?

    Helloooo Everyone!!
    I used flash a few years ago and am now getting into as3, I began watching hours of as3 tutorials and training in preparation to build a web app with multi user access and the structure of the design is a bit beyond my skills and need help please.
    My problem: I can design well in flash, love the graphic design tools and can draw the screens the way i want my app to look; i can build different library components and fla's and set up the project files.
    I best give a brief explanation of the system i want to design.....
    I am building an app, where different business types all work together on properties, repair projects and associated property data.
    For example a property owner owns a property, an agent runs the property for the owner and finds a tenant to live in the flat, the tenant who lives in the flat will use the online facility to tell the agent about repairs needed, or pay rent online, or check diary events such as when he needs to renew his tenancy or insurance. The repair the tenant requests will be authorised by the agent and a tradesman will then have to interact with the repair details and provide a quote or just carry out emergency work.
    First dilemma... Do i use MVC Architecture Or Object Oriented programming with custom classes.
         I was planning on the latter - OOP
         I cant quite get my head around how to think about structuring the folders and classes???
    For example. Do i build a class for 'Property' a class for 'projects' a class for 'project tasks' etc
    Is it that you think about Admin for example and build a class for invoices, a class for quotes.
    Different users will access the same property but see different information relavent to them only
    Could someone please mentor me through the design process? You can see the flash design at www.milesquicker.com/projectplanning
    I would be eernally grateful
    Miles

    MVC is an OOP Design Pattern.
    For a program like this i wouldn't use the MVC design pattern.
    I will probably create a class for each section in my application.
    Design Patterns are an advanced topic of OOP and i dought that you will be able to master it after watching
    a few tutorials, same goes for OOP. If you are just starting with programing i would suggest you to start with procedural programming
    and when you feel comfortable with that you can get into OOP although for an application like yours OOP will be the best solution.
    I dont know anything about your programming skills but the pull of an application like that they got to be really good.
    I would also suggest that you will look into flash and mysql because you will have to create databases that will hold the information.

  • Class Structure

    I have two java class files which are about 1MB in size. When I decompile them I get a file of size about 30KB. When these classes are run they show an iconified frame, but there is no icon in the folder (The class has been copied to a new location). It seems that the class has embedded files in it. I have tested the class under various environments, that makes me sure that the icon is somewhere in the class. The class shows a Jframe and a few swing components. But, when I search the byte code for isVisible,javax.swing ..., I find no sign of swing! The class extends ClassLoader. The gui class maybe kept in an byte[] in encrypted form, and loaded using loadClass(byte[],..) after decryption. But, the decompiled code has nothing like this. The code might be obfuscated or /as well as encrypted.
    Has anyone any idea?
    (I can give the class if someone wants to have a look.)
    Thanks.
    P.S. This thread has originated from http://forum.java.sun.com/thread.jspa?threadID=792241&tstart=0
    refer to the url for more information.

    I am not sure how wrong it is to decompile, when java
    is getting open sourced. I have been asked twiced why
    I want to do this, and this threatens me. Well I want
    to do this just because I find this new. Had anybody
    heard of embedding files in classes or something
    similar?
    It is curiosity I say.I don't mean to threaten. I was trying to determine your real question which I believe is wanting to know how to : embedding files in classes.
    And it doesn't have anything to do with decompiling etc.

  • Embedded files in class?(Orignated from thre thread "Class Structure")

    I have two classes which are about 1MB & 1.5MB in size. When I decompile them I get a code of only 30Kb. The classes shows swing gui components but there is no sign of swing in the byte code, forget the file produced by decompiling.
    I want to know that is special is the class that gives rise to such situation.
    A few things I would appreciated if repliers keep in mind:
    0)The classes are 1)Unistaller of JavaEE and 2)installer of Solaris10
    You may get a copy the decompiled code here:
    http://javautilities.sourceforge.net/class_and_source.zip
    1) Size of Byte code = 1.5MB
    2) Size of code generated by decompiling = 30KB
    30Kb/1.5Mb=0.02=2%=comparitively very small
    3)The class shows swing components like JFrame, JButtons....
    But when I search the byte code for javax.swing, or setVisible or any other set of characters generally found in a class that uses swing, I find nothing. There is no sign of swing!
    4) The class extends ClassLoader, so it may be using classloader for running the classes by loadClass(byte[]b...)
    5)The look and feel is JavaLookAndFeel
    6)Both the Solaris10 setup and JavaEE unistaller show the same icon and more or less same type of frames.
    7)I have kept them seperated from there respective environments, completely inert, and even then they work(show errors but still don't terminate)
    I would be really thankful for your replies.
    Thanks.
    PS: This topic has originated from
    http://forum.java.sun.com/thread.jspa?threadID=792867&start=0&tstart=0
    you would get a better idea if you go through the first few posts from the parent thread.

    My first priority is to get my question answered.I guess no matter how many multi-posts it takes
    I don't know how much patience one requires.Greater than what I have.
    And zodak why aren't you expressing your views in
    this topic? Why did you leave the topic yesterday?Because you began to frustrate me yesterday. I can choose what topics I want to respond to, when I want to. You do know that no one is payed to help you right?
    Also my name is Zadok not zodak.
    Well it has been about a week I have tried getting
    answers or this topic. And I am getting really weary.Then stop putting a drain on us and just do it yourself or give up.

  • Sort a 'std::list' containing classes/structures

    Hi all,
    I find that std::sort' cannot be used to sort 'std::list' because it requires a random access iterator which is not available for a list. Although that works for dqueue without any problem. Is any body know about any workaround for std::list sorting. I have one using template but i required without using template. ??
    Using template
    #include <iostream>
    #include <algorithm>
    #include <list>
    using namespace std;
    typedef struct xx {
    int a;
    int b;
    bool operator<(const xx& src) const;
    bool operator>(const xx& src) const;
    } X;
    bool xx::operator<(const xx& src) const
    if (b <= src.b) return true;
    return false;
    bool xx::operator>(const xx& src) const
    if (b > src.b) return true;
    return false;
    template<typename T>
    class PtrClass
    public:
    T *m_src;
    PtrClass(T &src):m_src(&src)
    bool operator<(const PtrClass& src) const
    return m_src->operator<(*src.m_src);
    bool operator>(const PtrClass& src) const
    return m_src->operator>(*src.m_src);
    int main()
    X o1 = {1, 9};
    X o2 = {2, 8};
    X o3 = {3, 7};
    list<PtrClass<X> > l;
    list<PtrClass<X> >::iterator it;
    l.push_back(o1);
    l.push_back(o2);
    l.push_back(o3);
    cout << " BEFORE ______"<<endl;
    for(it = l.begin(); it != l.end(); it++)
         cout << "Inside"<<endl;
    l.sort();
    cout << " AFTER ______"<<endl;
    for(it = l.begin(); it != l.end(); it++)
         cout << "Inside"<<endl;
    return 0;
    }

    1. You can use std::list::sort method.
    2. You can use std::set instead of std::list.

  • Question About Class Structure

    Okay, I'm new to AS3, so largely my first philosphy is,  "If it works, do it." However, my second is "Is this good practice?"
    I've been building a portfolio site.
    I've been using a real Composition-based method of webbing numerous external classes together by instance rather than Inheritance method of using extends. Reason being, simply because I've run into a bunch of unnecessary variable passing issues and the classes until now didn't have enough in common to troubleshoot it.
    Well now I've run into the major content portion of the site (thumbnails etc.) and I've run intot the situation where I believe I might be using extends backwards.
    I've got the SWFLoader class instancing the main Portfolio class that extends the Thumbnails class. Now typically my understanding is that you want subclasses extending from a superclass. Well, in this instance I want my Portfolio class to extend and take all the dynamic variables from the Thumbnails class even though the Thumbnails class is a subclass of Portfolio.
    Is that alright? That is, to instance Class B in Class A and also extend Class B to Class C?

    Cool, was hoping that was the case.
    Thanks!

  • Class structure proposal

    hi,
    I've dillema with organizing my classes in my program. The program should
    manage materials and their bill of materials (bom). So I've created one
    class "Materials" which hold id of the material and ... yes it's bom.
    The dillema is should bom object holds both parent code and child code?
    How would you solve my problem. The snippet of my code is bellow:
    class Material{
    int materialid;
    BOM bom;
    class BOM{
    Material parentmaterial; //schould I remove it since it's bound to
    //the Material
    Collection bomitems //collection of BOM Items since material can have
    //more component than one
    class BOMItem{
    Material childmaterial;
    int quantity;

    As per my understanding goes, in a Bills of Material (BOM) scenario,
    - An item is made up of sub-items and this hierarchy could go upto any limits.
    Essentially from data angle    Parent Item    Child Item
        Item 1         Item 2
        Item 2         Item 3
        Item 2         Item 4
        Item 2         Item 5
        Item 4         Item 6
        Item 6         Item 7
        Item 7         Item 8
        Item 9         Item 10java representationpublic class item() {
        //attributes of item e.g. ArrayList/HashSet/HashMap children;
        //methods of item e.g. getParent()
    }You could also use java collection objects like TreeSet/TreeMap to implement your BOM.
    Things get a little bit complicated if a sub-item might have multiple parents (say, Item i, could be made of a combination of Item j & Item k, or, a combination of Item m, Item n and Item o
    Hope it helps,

  • Where/how does a current source fit in the IVI class structure

    I have not seen any IVI drivers for download for current sources. This is one of the more challenging instruments for me to write general VIs.

    According to

  • Shared library extended class Error #1065: Variable is not defined

    Right, bit of a complicated set-up  here. I've got a class structure which includes the View class:
    com.website.buttons.MyButton
    Then i've got a shared library swc called sharedassets.swc  that contains a MovieClip in the library that uses  'com.website.buttons.MyButton' as its 'Linkage Properties' base class,  extending with the following empty class:
    com.website.timeline.sharedassets.BackButton
    Then i've got a second  swc that  imports the BackButton mc into its own library as a shared library asset, and uses an instance of  it on the stage in a MovieClip of it's own called LinearNavBar.  LinearNavBar's Linkage Properties are thus:
    Class: com.website.timeline.sequence.LinearNavBar
    Base class: com.website.navigation.LinearNavbar
    Again, 'com.website.navigation.LinearNavbar' is an actual class in the code base, whilst 'com.website.timeline.sequence.LinearNavBar' does not exits (ie: its dynamically created by the swc at compile time). 'Automatically declare stage instances' is unchecked
    Over in the class structure in my  Flash Builder project, I've got another class
    com.website.navigation.Sequence
    Which instantiates a new version of  LinearNavBar and adds it to the stage:
    var navBar:Navbar = new LinearNavBar();
    addChild(navBar);
    At which point the following error is  shown:
    ReferenceError: Error #1065: Variable BackButton is not defined.
    It seems Flash Builder cannot find 'com.website.timeline.sharedassets.BackButton', even though BOTH compiled swcs are included as part of the projects.
    What gives, my friends? I am most heartily perplexed.

    I have on the permit debugging option but it says nothing but these errors
    ReferenceError: Error #1065: Variable Button is not defined.
    ReferenceError: Error #1065: Variable ComponentShim is not defined.
    ReferenceError: Error #1065: Variable LoaderProV3AS3 is not defined.

Maybe you are looking for

  • IPAD/IPOD playing music to a Airport Express - No Sound?

    I have an IPAD and an IPOD.  IPAD is 4th gen, IOS7.  IPOD is 4th gen, IOS6. Airport express is the new one second generation.  Airport Express is wired to my home network, and its in bridged mode with wireless off.  Its purpose is only to play music

  • After download --firefox opens in a two x two window in upper corner not full web page

    Firefox opens only in a very small window with getting started within the window ---- Window in upper left of monitor screen and less than 2 x 2 inches -----Have tried three times to install product -----Uninstalled product this AM and not been able

  • UPDATE TABLE VBKD

    hello. The table VBKD is  not updated in quality, the table with the same data is however updated in devlopment. The item with billing plan is updated in teh VBKD table. The rest of the items with "TAN" item categories are not updated in the table in

  • What happens to AM instances used by asynchronous threads

    Hi, We have a long running process inside an AM, that calls pl/sql packages. Sometimes, this is causing http connection timeout depending on the volume of data it is processing. While we can increase the timeout, we are exploring other options. One t

  • Azure worker role throws after EF/Odata Nuget upgrades

    Have an Azure project with web and worker roles. Recently upgraded all nuget packages (EF went from 6.0 to 6.1 among other things). The web role seems to be fine The worker roles is not able to do much. Keep getting various exceptions coming from fra