Where to place the General methods...

As one of my application is more and more, I found that some methods I've created for a single screen are useful to the screen one another.  I know it is bad practice to repeat encoding methods, but is it better to:

1 make the static methods in a single class and reference them from others or...

2. the methods of moving to another file from the main application?

Example, I have the main of the application myApp, screen1, screen2

myApp extend UiApplication and screen1, screen2 both extend screen...

I've created some methods in screen1 I want to use screen2, so it is better to simply reference then by:

Screen1. MyMethod, or move them all to myApp and referencing them in myApp.myMethod?  or is there a better way (maybe a whole new class of General methods, but what would be the constructor?)

According to what these methods do...

Make static methods and place them in a separate category called something like ScreenUtils.  No constructor that is necessary because the methods are all static.

-or-

Create your own superclass screen that covers the screen and put your common methods in it, then have your individual screens to extend it.

My general rule is that if the methods are General and do not run on the screen (I.e. convertAtoB()), create the static class.  If the methods work on the screen (drawMyText()) then push up to a superclass.

Tags: BlackBerry Developers

Similar Questions

  • you attempt to add a web form of Business Catalyst to my site Web of Adobe Muse (via insert html) and the shape is cut all the content below where to place the html area.

    You attempt to add a web form of Business Catalyst to my site Web of Adobe Muse (via insert html) and the shape is cut all the content below where to place the html area. I tried the basic troubleshooting and it's only when I insert a form of Catalyst Business that my web page is cut, where is the bottom of the form. I use this code when you insert form BC in Muse,

    "< div class ="bulletin of information-form"> < form name ="catemaillistform58787"onsubmit ="return checkWholeForm58787 (this)"method ="post"action =" http://theincitejournal.BusinessCatalyst.com/CampaignProcess.aspx?ListId=53681& OPTIN = true & PageID = / index.html"> < div class ="form"> < div class ="item"> < label for ="CLFullName"> full name < / label > < br / > < input class ="cat_textbox_small"type ="text"name ="Full name"id ="CLFullName"maxlength ="255"/ > < / div > < div class ="item"> < label for ="CLEmailAddress"> E-mail address < / label > < br / > < input class ="cat_textbox_small"type ="text"name ="EmailAddress"id = '" "CLEmailAddress" MaxLength = "255" / > < / div > < div class = "item" > < label > Enter Word verification in box below < / label > < br / > {module_captchav2} < / div > < div class = "item" > < input class = "cat_button" type = "submit" value = "subscribe" id = "catlistbutton" / > < / div > < / div > < script type = "text/javascript" src = "http://theincitejournal.businesscatalyst.com/CatalystScripts/ValidationFunctions.js" > < / script > < script type = "text/javascript" > '

    The only settings I did took the H3 header on opt-in and page navigation after the action to get rid of the opt in BC function as default. I tried to download the source code as well and I'm having the same problem. The web Page is here " copy " and a version of what I was creating the page to look like here is ' home ' As you can see, the 'House' version allows me to scroll past where I would have placed the shape box while the 'copy' stops at any user to parade before. I have called the shape slightly from the "development" of British Colombia under the style sheets tab and still tried to trouble shoot and get rid of the code to see if it affects something and it did not add style. For some reason only the HTML to the form is but I cannot understand what the section of the code would do that. Any ideas?

    I see that you have inserted a script tag open that you forgot to close, which generates errors on the page and prevent it from be returned correctly. You should ensure that the code that you insert in the Muse is syntactically correct.

    - Abhishek Maurya

  • I've never burned a cd before. Where to place the two dics-original vs white one - in my lap?

    ORIGINAL TITLE: I want to ask a question in the section "help", 'Jamal' how can I do this?

    Hey Jamal - I've never burned a cd before.  Here are the? : where to place the two dics-original vs white snap my tour?

    Hello

    Jamal could not see your question.

    Most system manufacturers have online help on their site with specific instructions on the actual
    equipment in their systems and provided programs (several include 3rd party programs
    to help burn the CD and DVD). Also check with their forums where others have the
    same or similar models.

    ---------------------------

    Burn a CD or DVD in Windows Explorer
    http://Windows.Microsoft.com/en-us/Windows7/burn-a-CD-or-DVD-in-Windows-Explorer

    ===============

    Burning a CD
    http://Windows.Microsoft.com/en-us/Windows7/help/videos/burn-a-CD

    Disc burning: frequently asked questions
    http://Windows.Microsoft.com/en-us/Windows7/disc-burning-frequently-asked-questions

    Disc burning tips
    http://Windows.Microsoft.com/en-us/Windows7/disc-burning-tips-for-Windows-7

    Should which CD or DVD format I use?
    http://Windows.Microsoft.com/en-us/Windows7/which-CD-or-DVD-format-should-I-use

    Format a CD or DVD
    http://Windows.Microsoft.com/en-us/Windows7/format-a-CD-or-DVD

    Burn a CD or DVD in Windows Explorer
    http://Windows.Microsoft.com/en-us/Windows7/burn-a-CD-or-DVD-in-Windows-Explorer

    Burn a CD or DVD in Windows Media Player
    http://Windows.Microsoft.com/en-us/Windows7/burn-a-CD-or-DVD-in-Windows-Media-Player

    Burn a CD or DVD in Windows Media Player: frequently asked questions
    http://Windows.Microsoft.com/en-us/Windows7/burn-a-CD-or-DVD-in-Windows-Media-Player-frequently-asked-questions

    Change settings for burning a CD or DVD in Windows Media Player
    http://Windows.Microsoft.com/en-us/Windows-Vista/change-settings-for-burning-a-CD-or-DVD-in-Windows-Media-Player

    Burn a CD or DVD in Windows Media Center
    http://Windows.Microsoft.com/en-us/Windows7/burn-a-CD-or-DVD-in-Windows-Media-Center

    Burn a DVD-video using Windows DVD Maker disc
    http://Windows.Microsoft.com/en-us/Windows7/burn-a-DVD-video-disc-with-Windows-DVD-Maker

    How to burn DVDs with Windows DVD Maker
    http://www.7tutorials.com/how-burn-DVDs-Windows-DVD-Maker

    Close or finalize a CD or DVD
    http://Windows.Microsoft.com/en-us/Windows7/close-or-finalize-a-CD-or-DVD

    ----------------------------------

    ImgBurn - free
    http://www.ImgBurn.com/

    ImgBurn - Forums
    http://Forum.ImgBurn.com/

    Excellent Forum for help with programs and CD/DVD problems
    http://Club.myce.com/

    Free Windows CD DVD burning software download list
    http://www.techmixer.com/free-Windows-CD-DVD-burner-software-list-download/

    20 Freeware for Windows 7 DVD burning applications
    http://www.learnthisblog.co.cc/2009/11/20-freeware-DVD-burning-application-for.html

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">

  • Where to place the sequence inhabitants in a setting of the sequence? up, down, left, right?

    Hello

    I have a sequence with multiple images and I need overgive of some values in an image to the image through sequence inhabitants.

    Where should I put the local sequence? On the top or bottom of the frame? Perhaps on the right?

    If I put them on the right side of the frame wiring looks good in one but it's ugly as part of another.

    How are you?

    Greetings

    Johannes

    Hi Johannes,

    Although this is not necessary, it is better programming practice.

    You might need to make changes in the future, or to use the code in another, similar project, then its way easier to implement when you used a before state machine. And this isn't a lot of work changing a sequence to a statemachine, except that you have hundreds of frames/States.

    Back to your first question, it depends on your taste where you place the tunnels in the sequence.

    Christian

  • Where to place the DBC file in jdeveloper 10g

    Where to place the DBC file in jdeveloper 10g...

    I do not see any folder of dbc files

    Published by: Rashmi Gupta on November 23, 2011 02:26

    Hello

    This Jdeveloper won't work for the development of the ofa and personalization, you must download a Jdeveloper separated by this requirement, so please read the note I mentioned in the previous quote in metalink and to download the compatible Version of Jdeveloper, depending on the version of your application in which oracle you make customization or development. The note will have an adjacent link to the version from here, you can easily download the Jdeveloper, it will be around 600 MB in size.
    If you can share your exact version apps, we can tell you the correct version of Jdeveloper, but reading that not in metalink will be useful for you.

    Thank you
    Pratap

  • Where to place the javascripts for break-in PremierePro CC2014?

    I have some javascripts linking in the ExtendScript Editor, but does not know where to place them in the folder first for access structure.

    I wrote several for AfterEffects, some that can be called via the options to run the Script and others that involve a user interface panel and can be started by the user of the AE app.

    How do both of those, within the first? I'm * not * interested in signing, extensions, c ++ plugin to do this, if we can always do as with AE (which had a file that you deleted the Script of the Panel in and it worked for all users on all connections, which is important since the plugin should work for people who may not yet have registered in the machine).

    There is no equivalent mechanism in the body. Also, those who are ExtendScripts, not JavaScripts.

    ~/Documents/Adobe scripts Scripts can be executed in the body (from the command line, for example) without any security warning, unlike the .jsx files from other directories.

  • Where and how the main method should be defined

    Hi all

    I am new to Java and learning of the http://docs.oracle.com.
    Can someone help me underneath program where and how define a main method.

    public enum {costume
    DIAMONDS,
    CLUBS,
    HEARTS,
    SPADES
    }

    public enum {rank
    TWO, THREE, FOUR, FIVE, SIX, SEVEN,
    EIGHT, NINE, TEN, JACK, QUEEN, KING, ACE
    }

    public class {Card3
    private rank final rank.
    final civil suit;

    Public Card3 (highest rank, suit suit) {}
    This.Rank = grade;
    This.suit = suit;
    }

    public getSuit() {} costume
    return of costume;
    }

    {public getRank() rank
    return of rank;
    }

    public String toString() {}
    return rank + 'of' + costume;
    }
    }

    MPort Java.util;

    public class Deck3 {}
    private static Card3 [] cards = Card3 News [52];
    public Deck3() {}
    int i = 0;
    {for (costume costume: {Suit.values ())}
    {for (the highest ranking: {Rank.values ())}
    maps [i ++] = new Card3 (rank, suit);
    }
    }
    }
    }

    Thank you
    Rambeau

    Hello

    When you are developing a Java application, that you must only have a class with a Main method, other classes do not need that method, the purpose of this methos is that it defines the beginning of your program, look at this link, it is an example and this explains also the Main method:

     http://docs.oracle.com/javase/tutorial/getStarted/application/index.html 
    

    Concerning
    Carlos

  • Where to place the files in the projector Mac .app bundle?

    I just read a technical note in the knowledge base on considerations for the creation of a Mac projector beam. For OSX, the note seems to suggest that you need to place them in the content folder.  The example they give is the executable in the MacOS and a file named example, dir in the content folder. I'm currently testing a package that I created in Windows Dir 11.5 on a PowerBook running Mac OS x 10.5.  My called executable launcher was delivered automatically in the .app/happy/MacOS folder, then I copied my DCR in the contents of the folder, the first menu.dcr is the starting pitcher is going to, but can't find it.  I tried to place the content in the same folder as the executable first, but that didn't work so I read the TechNote.  Now, placing them in the folder content does not either.  This technote seems a bit old, so I wonder where the application files will now and if the pitcher can use a gotoNetMovie "menu.dcr" to find the first file of the application?  Everything works under Windows, but every single app, I tried to convert for Mac has required major adjustments so I expect the same thing here?

    See if this solution will work for you: http://forums.adobe.com/thread/20822

  • where to place the server models

    Hello!

    I created a site that is supposed to be secure. This is why my site server requires that all the files (except index.html) must be placed in the folder named "net_static" (js, css, images etc.) or 'net_data' (html pages). When I place the models folder in the folder "net_static", they do not work because models should always be in the root folder (so I hear). This problem can be corrected somehow? The models are needed after the publication? Thank you!

    You mean the DW models?  Why do you need to download them all?  If you use DW templates, the files should not model to be uploaded to the server to work.  Is that just a DW file uses to help facilitate the creation of the new page for you.  If this is not what you're talking about you will need to go into a little more detail on your model.

  • where to place the frame supporting the library?

    Hi all
    I have a question about the framework of the adf.
    As part of the adf all the library which we add place in weblogic server and real applications we add only the library reference.
    If you see some othe framework like spring where we add every spring framework libray in the application ear file.

    How to put the associated Framework library is better to put on server to add the part of the ear file.

    Thank you
    AK.

    Put the library once on the server: it can be shared between multiple applications (where the name "shared library"). You could do the same thing with spring on WLS if libraries you want.

    John

  • Where to place the libraries?

    If someone sends you a VI library, where do you put this library if it appears in the window of functions under "user libraries"?

    It is somewhere in the folder program files?

    IThink this link will help you!

  • Where to place the verity_weuropean_locales

    Hi all. We have editing company with Verity separately installed. I placed the unzipped directory called: verity_weuropean_locales in the C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfusion directory and stop, and then restart the service of Verity and CF services. When I try to create a new collection of truth with the Spanish locale, I get the error: failed to create the servicesspan collection.
    An error occurred during the creation of the collection: com.verity.api.administration.ConfigurationException: regional settings are not installed (-6227). Can someone help me shed some light on this please?

    Thanks for your time.

    After much research, I found where the files are supposed to go:
    Verity local State incorrectly installation instructions to extract the zip file in the cf_root directory. However, the correct location is {verity} / k2/common. For example, if the truth is installed with the server configuration, it would be cf_root/verity/k2/common; If Verity is installed separately, using the value by default it would be C:\coldfusionverity\k2\common.

    Adobe documentation is incorrect.
    Thanks to jrunrandy for the post in another forum.

  • SWFObject code. I don't know where to place the params.

    Hello

    I'm having a little difficulty to identify ways to apply the code: so.addParam ("wmode", "transparent"); below to the html that is produced using Geoff Sterns SWFObject 1.4 Extension. I use the extension in Dreamweaver that generates html and javascript code. It is located in the associated .js file or directly in the html code of the page between < object > tags? How to apply the < param name = 'wmode' value = 'transparent' / > above under SWFObject Extension generated code?
    It is very different from the way in which integration > > Flash code is produced with the method of Dreamweaver by default.

    Thank you in advance.
    Steve

    Tuesday, June 24, 2008 02:42:02 + 0000 (UTC), "stevenicel".
    wrote:

    > var so = new SWFObject ("flash/slideshow.swf", "myMovie", "751", "218", "8",
    (> '424E55', 'params');
    so.addParam ("wmode", "transparent");
    > so.write ("slideshow");

    Gary

  • Where to place the folder forms and reports for oracle 10g on Linux server

    Hello...

    Currently, iam has a migration to oracle 10g module.
    All my modules which consists of form and report files are inside a
    folder named PROJECT and placed in C:\ in windows server.
    So when I want to call a form or a report I used the path as "C:\PROJECT\module_name\form_name.fmx."
    My client now wants her project to be used in the LINUX-based server.

    Now, I want to know where I should put my form project file and file reports
    and how I should call them...

    Thanks in advance

    Can you say how can I call reports as u said hardcode the path when the report is not a good practice.

    I agree with Dhiraj Madan, paths of coding is a very bad idea, your application has become non-portable.

    For FORMS_PATH, you can use default.env, as already said (or .env, if applicable).

    The same can be done for REPORTS_PATH, using the reports.sh script, in $ORACLE_HOME/bin.

  • Where to place the files .xls and .doc on SD card to E2?

    Howdy,

    I have searched but did not find a thread that explains the file structure that Palm uses on SD cards so that all .xls and .doc files are located when the card is inserted.  I tried to put it in the root directory of the card and which did not work, if someone could give me a brief explanation of the file structure that is created on the SD card once it is formatted by the device, then, what directory (on the map) can be used to "drag and drop" files .xls and .doc directly from my computer through a USB card reader SD card?

    Thank you

    Charlie

    It works beautifully.  MP3s are in a named directory on the SD card AUDIO and .doc and .xls files are in a directory on the card SD the DOCUMENTS.

    Owen,

    Charlie

    Message relates to: Tungsten E2

Maybe you are looking for

  • Timeline lost after accident FCPX

    Hello world I use a MBP13"having just finished happily (and exported) a video approx. 27 min so I was just import a logo image of my office ready to go to share > blu - ray and it just disappeared from the whole project... FCPX now displays a timelin

  • How do I know what carrier I'm on

    I recently got an iphone 5 s of my uncle, because it gets the data elements lost and found shops selling on ebay and they can buy. I restored the iphone from itunes and when I went to turn it on, I was told that I had to use a sim card to unlock it.

  • TrayApp.msi missing

    I recently replaced an older HP Photosmart printer with a Pro Officejet 8610.  Before you install the new printer, I went through the control panel and uninstalled all the HP software on my system. Connected to the new printer and installed, it is so

  • I bought microsoft points on my computer and they will not be shown on my xbox

    How can I fix the problem?

  • How to disable file deletion

    Hi all I have a server that is running in the working group. And a folder is shared to everyone with read and write permission. Now I have a workstation that I want to disable delete files and folders. And I also want to disable the command prompt th