How to create "Verbose mode" (Enable/disable trace output)?

Hi there! I'd like to do as Papervision:
// Block Papervison3D trace output
Papervision3D.VERBOSE = false;
that is, a global variable for enabling/disabling the trace outputs of my own program. I come up with creating
a class and putting a static boolean member variable. But there is something I'm not sure about: How to use
it...
For example: every time I need to do a trace, would I have to put this ? -->
if( MyClass.VERBOSE ) trace("whatever");
So it isn't needed to instance the object because a static variable is used. That's the way, isn't it?
Thanks and regads.

From the book I'm reading, the author uses it the same way you're saying:
Inside your Classes, you have
private var _verbose:Boolean = false;
I noticed he uses it always (or almost) in the constructor of the classes:
public function whatever (var:*, verbose:Boolean);
//I tend to use verbose:Boolean = false on the constructor too so you don't have to always set it.
inside the constructor you have:
_verbose = verbose;
and normaly inside methods handling events like Event.OPEN, Event.INIT, IOErrorEvent.IO_ERROR, HTTPStatusEvent.HTTP_STATUS, you have something like this:
private function onOpen (e:Event):void {
     if (_verbose) {
          trace("The loading process has begun, or whatever");

Similar Messages

  • How to Create a Remotely Enabled Function Module

    Hi All,
    How to Create a Remotely Enabled Function Module.
    I Want to Create a FM Using Sample Data , This for Practice
    What Fields can i give in the Import and Export Parameters.
    Please Give me one Example
    Can Any one Give me the Steps to do this.
    Regards
    Vamsi

    Hi Vamsi,
    Lets do simple example where you will first create a RFC in one server (say A) and create normal program in othere server (say B). Finally you will call the RFC in A from B.
    Do the following steps for creating RFC in server A.
    1. log on to server A
    2. go to se37
    3. Edit -> function groups-> create function group and give the function group name (say ZGRP).
    4. create a FM ( say Z_TEST_RFC) in se37 providing the function group which is created just now.
    5. go to attribute tab -> choose remote-enabled module from processing type.
    so that your FM will become RFC.
    6. provide the import parameter in import tab.
    we will provide only two import parameters.
    - parameter name : P_NUM1, typing: TYPE, associated type : I & <b>check the pass value</b> (all the parameters of RFC must pass by value).
    - parameter name : P_NUM2, typing: TYPE, associated type : I & <b>check the pass value</b>
    7. provide the export parameter in export tab.
    parameter name : P_SUM, typing: TYPE, associated type : I & <b>check the pass value</b>
    8. write the given simple code in source code tab.
    FUNCTION Z_TEST_RFC.
    P_TOT = P_NUM1 + P_NUM2.
    ENDFUNCTION.
    Do the following steps for creating ABAP program which will call the RFC in server B.
    1. se38 - > creat a program.
    2. write the given simple code.
    data tot type i.
    call function 'Z_TEST_RFC' destination '<b>XXXXXX</b>'
      exporting
        p_num1 = 10
        p_num2 = 15
      importing
        p_tot = tot.
    write tot.
    please note that <b>XXXXXX</b> is RFC connection which is avialable in <b>sm59</b> transaction in server A.
    -go to sm59 - > abap connection (list of RFC connection configurations are avialable). choose server B connection and replace it of <b>XXXXXX</b> in the code.
    finally you can execute the normal abap program that will call the RFC and display the result.
    Regards,
    Sukhee

  • How to create payment mode in jsp and its process

    How to create payment mode and validate creditcard number
    plz anyone tel the process?

    can you be more specific

  • HT3630 How to creat an app-enabled accessories for iPhone? Please help me to get an answer..

    How to creat an app-enabled accessories for iPhone? Please help me to get an answer..

    To get hardware interfaces and API's via hardware you
    need to join the MFi program.  That info is here:
    https://developer.apple.com/programs/mfi/
    To get the additional software to be able to download
    and test code on any iDevice, you must join the
    iOS Developer Program.  That info is here:
    https://developer.apple.com/programs/ios/
    Both programs require fees and NDA agreements,
    especially hardware as most vendors that supply
    components development tools will not sell you any
    of their tools unless you are a member of the MFi
    program.

  • How to creat an app- enabled with iPhone ?

    How to creat an app- enabled with iPhone ?

    first there was FCP X now folks want FCP iPhone?
    well now that engineers  controll broadcast TV stations and pop concerts from an iPad,  I guess thats OK
    I guess we wont need a Mac Pro upgrade now.

  • How  we create the Remote enabled FM

    hi.. can any one tell me how to create the Remote Enabled FM
    venkat

    You create a RFC function module just as you create a normal function module.
    After you create the function module, in  the general tab of the function module select the "Remote Enabled" radio button which makes the function module as RFC function module.
    Also the parameters should be Pass by value so select the "Pass value" check box against each of the parameters.
    Last but not the least. RFC function modules cannot have exceptions, so define a return structure and pass all your messages like success, error etc. in the return structure.
    After the function module is created, the RFC function moule can be called using the statement
    CALL FUNCTION <FN Name> DESTINATION <RFC Dest>.
    where RFC Dest it the remote destination created in SM59.
    Ravi.

  • How to Create report in Material Master that outputs stock

    Hi,
         How to Create report in Material Master that outputs stock, grouped by Material Type and Plant. The output shows Material No, Storage location, Unit of Measure and Description in addition to group totals. Data was extracted from MARA, MARC, MARD, MAKT,MKPF,
         MSEG and T001W.and what are the fields to be used.

    hi,
    check the transaction MMBE or MC.9..
    for mmbe the program is RMMMBESTN.
    check the logic in the program.

  • How to create an input enabled query with Integrated Planning

    Hello experts. I have created an aggregation level in IP and I am trying to create an input enabled query based on this aggregation level.  My problem is in the properties.  On the query properties planning tab the Start query in change mode is grayed out and I am unable to select it.  Also on all the chararteristic properties on the planning tab, the planning settings are all grayed out as well and the No budgeting is selected.  There is a red exclamation here that says 'function not supported by server'  Any ideas?  Points will be awarded.
    Peter

    hi,
    go through this help for the procedure...
    [http://help.sap.com/saphelp_nw04s/helpdata/en/43/1d023a41130bd5e10000000a422035/frameset.htm]
    hope it helps...

  • Tutorial on how to create an Ajax-enabled JSF component in Creator?

    Is there a tutorial on how to create (not use/import existing) an Ajax-enabled JSF component using Creator 2? I read somewhere that it was done during a presentation in 3 minutes! Now that I really want to see ;-
    thanks,
    -nikita

    As far as I remeber, Edwin Goei's examples are the
    closest thing to the info you are looking. He has an
    example component, but don't remember if they're
    AJAX enabled. Check it on
    http://wiki.java.net/bin/view/Javatools/CustomCompone
    tLibraries.
    Best regards
    Antonio.Thanks for the plug. I've been meaning to update that article. Writing an AJAX component is similar to writing other kinds of components but the developer uses AJAX techniques. The latest version of the popup calendar which is checked into the bpcatalog project of java.net uses Dojo which also has some support for AJAX. I haven't yet had time to update the article yet, unfortunately.
    -Edwin
    http://blogs.sun.com/edwingo/

  • How to use "selectOneRadio" to enable/disable a Picklist.

    Hi,
    I m new to JSF and having a requirement to enable/disable two picklists using "<h:selectOneRadio>".
    Kindly reply if anyone has done similar thing before or if any one can provide any suggestions on how to acheive this?
    Thanks in Advance!
    Vivek

    Finally,
    I found a way to get this done... I managed to get this work using JavaScript. Look for the code below.
    <script type="text/javascript">
    function enablePickList(form,radio,picklist1,picklist2)
    var radio = document.forms[form][[form+":"+radio|http://www-128.ibm.com/developerworks/forums/]][0].checked;
    if(radio)
    document.getElementById(form+":"+picklist1).disabled = false;
    document.getElementById(form+":"+picklist2).disabled = true;
    else
    if(!radio)
    document.getElementById(form+":"+picklist1).disabled = true;
    document.getElementById(form+":"+picklist2).disabled = false;
    </script>
    <h:selectOneRadio id="myRadio1"
    value="#{GLAccountDimension.enablePicklist}" onclick="enablePickList ('glaccountinsert','myRadio1','AccountLevelList1','AccountLevelList2');">
    <j:selectItem itemValue="true" itemLabel="Select">
    <h:selectOneMenu id="AccountLevelList1"
    value="#{GLAccountDimension.glAccountLevel1}"
    immediate="true" disabled="true">
    <j:selectItems value="#{GLAccountDimension.glAccountLevel1List}" />
    </h:selectOneMenu>
    </j:selectItem>
    <j:selectItem itemValue="false" itemLabel="Select">
    <h:selectOneMenu id="AccountLevelList2"
    value="#{GLAccountDimension.glAccountLevel2}"
    immediate="true" disabled="true">
    <j:selectItems value="#{GLAccountDimension.glAccountLevel2List}" />
    </h:selectOneMenu>
    </j:selectItem>
    </h:selectOneRadio>

  • How to create a page break in PDF output

    Hi there
    Does anyone know how to create a page break in the PDF output when using the EXPORT TO PDF command?
    I can create a page break using the page-break-after/before HTML stylesheet command, but this is not "interpreted" when the PDF is generated, and I am required to print each table in my web template on a new page.
    Please ... been searching for ages for a solution to this and can't find anything.
    Cheers,
    Andrew

    Try posting in the iWorks forum.
    https://discussions.apple.com/community/app_store/iwork_for_ios

  • How to Create an Input Enabled Query

    Thanks in advance for your help, and sorry for the seemingly simple question, but I am new to integrated planning.
    I am trying to provide a simple method for the end users to update planning data in a cube.  From what I read I should be able to do this with a real time cube and an input enabled query.
    I have created the real time cube with my desired characteristics and key figures.  I have loaded base data to it and change it to be input ready.
    Now I need to create my input ready query.  I cannot seem to figure out how to do this.  From BEx Analyzer the options for enabling input and change mode at query start are greyed out.
    Can someone enlighten me on what I am missing or suggest some reading on how to do this?
    Regards
    KB

    OK, I got over this hurdle.  Turning a KF on for input enable the selection to have the query open in change mode.  However, when I do this and run the query in WeBEx the query line style changes to all blue and does not allow input.
    I have all my Characteristics from the cube included in the aggregation and have included them all in the query as well (in the same order).
    Any thoughts?

  • How can I control the enable/disable of command buttons in ADF JSF

    I have been having a great deal of trouble trying to work out how to control the command button such that if the rowset is null then the button is disabled. The trick is that the rowset is not defined by the view where the command button is located. The rowset is defined by a view which has a "view" command button which displays the specific row selected, then this view has a command button that will display the detail rowset of the selected master row, but if there are no detail records I want the button to be disabled. How can I do this in ADF JSF? If I use a backing bean to make the determination prior to the page rendering then how does the backing mean method set the parameter necessary to disable the command button? Any advice or tutorial that I can use is most appreciated. My goal with using ADF JSF effort was to demonstrate that a complex app could be generated with minimum coding, I would like to keep to this concept if possible. Thanks,
    Michael

    Hi Michael,
    You can probably set the Enabled property of the command button using an EL that would evaluate and return true or false based on your requirement.
    Check out these links for more information on using the EL.
    http://radio.weblogs.com/0118231/2006/11/10.html
    http://database.in2p3.fr/doc/oracle/Oracle_Application_Server_10_Release_3/web.1013/b25947/web_dcp006.htm
    -Arun

  • How to create schema to enable work with multiple users during developmet

    Hi,
    My goal is to enable all developers in the team to work on the same database and schema name installed on some server in the company but each developer will have a "personal" instance of the schema (so changes made to the database will not harm the other developers) and the connection to the schema will possibly made through different port (1521, 1522, 1523 etc). This kind of work is needed on developing time and possibly for the QA team. The oracle server is installed on some server and client installation can be installed (if needed) on each developer machine.
    What do i need to do in order to achieve this goal (if it possible at all) ?
    I am using Oracle 9.2
    Thanks a LOT for any help.
    simon.
    Message was edited by:
    user488209

    > Oracle and JBoss and Hibernate which is my
    persistence layer so Pl/SQL is not needed (right?)
    Simon, I would have taken a virtual lead pipe to you if you worked in our dev shop and made that statement. :-)
    Data persistance layers in the middle tier are fundementally flawed.
    Why? Because they attempt to do what the database is already doing. The database's core function is data persistance, data integrity, data processing.
    It does this better than any other piece of software in the architecture. If not, then why use a database tier (usually the most expensive one) anyway? What are the benefits? Why not simply persist the data in the middle tier and use file-based (not database-based) storage mechanism?
    Simple example. An employee object persist in the middle tier. Performance becomes a problem. JBOSS and other app server s/w scaled by adding more h/w. So now you have that employee object persisting as copies across several app platforms.
    One of the fundemental relational principles of dealing with a single copy of data is violated. Multiple copies exist. They need to be kept in sync'ed. Locking needs to be handled in a distributed fashion. And what happens when a batch process on the database, oblivious to the persistant copies in the app tier, changes that employee's data?
    Guess what.. the database does all this for you. Locking. Data integrity. Scalability. Etc.
    AND IT DOES IT BETTER THAN WHAT THE APP TIER CAN!
    So to answer your question. I write entire applications and systems in PL/SQL. Yes, PL/SQL is a capable language. Yes, anything you can do in Java (as far as data processing goes), PL/SQL does better and faster with more inherant scalability - with less development time. Fact and not opinion.
    Oracle has in excess of a million lines of PL/SQL source code for the Oracle Applications product suite. So PL/SQL is a "serious" language.. not something that is simply used for the odd thing.
    Performance wise? Oracle Replication is entirely written in PL/SQL - and not in something like C/C++ (which usually also outperforms Java).
    90% of all the code that we write, is PL/SQL. The remainder is Java (JBOSS) and Perl with some Pro*C legacy stuff (most of which is rewritten as PL/SQL). In fact, I think the guys now write more Perl code than Java (doing processing that needs to be done totally outside Oracle). And JBOSS is an integrated architecture that we're using... (we even have a JBOSS cluster with a Linux Virtual Server/Director as gateway)
    Not using PL/SQL? That will be a critical mistake. (I suggest that you visit http://asktom.oracle.com for more details on PL/SQL, Java, application tiers and database tiers).

  • How to create widget webservice Enabled RFC using SAP WidgetDevelopmentTool

    Hi,
    I have Exposed one RFC as webservice. How to execute that RFC using webservice using SAP Widget development tool.
    Regards
    Vijay

    hi vijay,
    this blog will be useful for your furthur development :
    /people/anton.wenzelhuemer/blog/2007/03/04/kpi-speedometer-widget
    aslo you check the services available in the widget foundation.
    try with this service ;
    /ewcs/service/rfct POST Executes specified RFC through JCO or WS and allows XSL transformation of results
    link : http://localhost:7531/SapMiddleTier/REST/ewcs/service/rfct
    thanks
    Jaideep Srinivasan

Maybe you are looking for

  • MacBook Pro audio not working. Help?

    I bought a MacBook Pro this summer and just last week the audio out stopped working. I tried resetting PRAM and have all the latest updates. All the sound control panel settings are correct, it's not muted. Any suggestions would be greatly appreciate

  • Stuck in "restore" after going from error 13019, to error 3194 to error 1604....now what?

    I'd be really grateful if someone could help me. I am very new to apple products and bought my ipod only in July this year. I didn't realise you had to keep updating them etc.. but anyway. My internet connection is extremely slow and unreliable (abou

  • Setting output file name in export transaction data package

    Hi all, I am running an "export transaction data" package in the data manager. I wanted to set the output file name so that it will be a constant value. I wrote the following in the package editor: INFO(%FILE%,\ROOT\WEBFOLDERS\COLMOBIL\VEHICLES1\DATA

  • Help! Office 365 and Windows Server 2012 R2 (Essentials) no longer communicating

    Hi - I have had this problem beginning November.  From what I can tell, it started after I applied a Windows Update patch of the latest Microsoft Online Services Sign-in Assistant.  Now when I go in to the Windows Essential Dashboard, where I have my

  • Maximum Video Size in Flash??

    Hello, I'm currently working on a website design. The idea is a big chromakeyed interactive video in Flash. The size of the video is 1080 (width) x 1500 (height) pixels. I've exported the video in After Effects with the standard settings for flash (F